@datapos/datapos-shared 0.3.335 → 0.3.337

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.
@@ -0,0 +1,723 @@
1
+ import { convertODataTypeIdToUsageTypeId as Ge, extractExtensionFromPath as Ve, extractNameFromPath as He, formatNumberAsDecimalNumber as We, formatNumberAsDuration as $e, formatNumberAsSize as Xe, formatNumberAsStorageSize as Be, formatNumberAsWholeNumber as Je, lookupMimeTypeForExtension as Ke } from "./datapos-shared.utilities.es.js";
2
+ let j;
3
+ // @__NO_SIDE_EFFECTS__
4
+ function G(t) {
5
+ return {
6
+ lang: t?.lang ?? j?.lang,
7
+ message: t?.message,
8
+ abortEarly: t?.abortEarly ?? j?.abortEarly,
9
+ abortPipeEarly: t?.abortPipeEarly ?? j?.abortPipeEarly
10
+ };
11
+ }
12
+ let V;
13
+ // @__NO_SIDE_EFFECTS__
14
+ function H(t) {
15
+ return V?.get(t);
16
+ }
17
+ let W;
18
+ // @__NO_SIDE_EFFECTS__
19
+ function $(t) {
20
+ return W?.get(t);
21
+ }
22
+ let X;
23
+ // @__NO_SIDE_EFFECTS__
24
+ function B(t, n) {
25
+ return X?.get(t)?.get(n);
26
+ }
27
+ // @__NO_SIDE_EFFECTS__
28
+ function T(t) {
29
+ const n = typeof t;
30
+ return n === "string" ? `"${t}"` : n === "number" || n === "bigint" || n === "boolean" ? `${t}` : n === "object" || n === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : n;
31
+ }
32
+ function y(t, n, e, r, s) {
33
+ const o = s && "input" in s ? s.input : e.value, i = s?.expected ?? t.expects ?? null, u = s?.received ?? /* @__PURE__ */ T(o), a = {
34
+ kind: t.kind,
35
+ type: t.type,
36
+ input: o,
37
+ expected: i,
38
+ received: u,
39
+ message: `Invalid ${n}: ${i ? `Expected ${i} but r` : "R"}eceived ${u}`,
40
+ requirement: t.requirement,
41
+ path: s?.path,
42
+ issues: s?.issues,
43
+ lang: r.lang,
44
+ abortEarly: r.abortEarly,
45
+ abortPipeEarly: r.abortPipeEarly
46
+ }, p = t.kind === "schema", d = s?.message ?? t.message ?? /* @__PURE__ */ B(t.reference, a.lang) ?? (p ? /* @__PURE__ */ $(a.lang) : null) ?? r.message ?? /* @__PURE__ */ H(a.lang);
47
+ d !== void 0 && (a.message = typeof d == "function" ? d(a) : d), p && (e.typed = !1), e.issues ? e.issues.push(a) : e.issues = [a];
48
+ }
49
+ // @__NO_SIDE_EFFECTS__
50
+ function g(t) {
51
+ return {
52
+ version: 1,
53
+ vendor: "valibot",
54
+ validate(n) {
55
+ return t["~run"]({ value: n }, /* @__PURE__ */ G());
56
+ }
57
+ };
58
+ }
59
+ // @__NO_SIDE_EFFECTS__
60
+ function J(t, n) {
61
+ return Object.hasOwn(t, n) && n !== "__proto__" && n !== "prototype" && n !== "constructor";
62
+ }
63
+ // @__NO_SIDE_EFFECTS__
64
+ function K(t, n) {
65
+ const e = [...new Set(t)];
66
+ return e.length > 1 ? `(${e.join(` ${n} `)})` : e[0] ?? "never";
67
+ }
68
+ // @__NO_SIDE_EFFECTS__
69
+ function q(t, n, e) {
70
+ return typeof t.fallback == "function" ? t.fallback(n, e) : t.fallback;
71
+ }
72
+ // @__NO_SIDE_EFFECTS__
73
+ function w(t, n, e) {
74
+ return typeof t.default == "function" ? t.default(n, e) : t.default;
75
+ }
76
+ // @__NO_SIDE_EFFECTS__
77
+ function E(t, n) {
78
+ return {
79
+ kind: "schema",
80
+ type: "array",
81
+ reference: E,
82
+ expects: "Array",
83
+ async: !1,
84
+ item: t,
85
+ message: n,
86
+ get "~standard"() {
87
+ return /* @__PURE__ */ g(this);
88
+ },
89
+ "~run"(e, r) {
90
+ const s = e.value;
91
+ if (Array.isArray(s)) {
92
+ e.typed = !0, e.value = [];
93
+ for (let o = 0; o < s.length; o++) {
94
+ const i = s[o], u = this.item["~run"]({ value: i }, r);
95
+ if (u.issues) {
96
+ const a = {
97
+ type: "array",
98
+ origin: "value",
99
+ input: s,
100
+ key: o,
101
+ value: i
102
+ };
103
+ for (const p of u.issues)
104
+ p.path ? p.path.unshift(a) : p.path = [a], e.issues?.push(p);
105
+ if (e.issues || (e.issues = u.issues), r.abortEarly) {
106
+ e.typed = !1;
107
+ break;
108
+ }
109
+ }
110
+ u.typed || (e.typed = !1), e.value.push(u.value);
111
+ }
112
+ } else y(this, "type", e, r);
113
+ return e;
114
+ }
115
+ };
116
+ }
117
+ // @__NO_SIDE_EFFECTS__
118
+ function _(t) {
119
+ return {
120
+ kind: "schema",
121
+ type: "boolean",
122
+ reference: _,
123
+ expects: "boolean",
124
+ async: !1,
125
+ message: t,
126
+ get "~standard"() {
127
+ return /* @__PURE__ */ g(this);
128
+ },
129
+ "~run"(n, e) {
130
+ return typeof n.value == "boolean" ? n.typed = !0 : y(this, "type", n, e), n;
131
+ }
132
+ };
133
+ }
134
+ // @__NO_SIDE_EFFECTS__
135
+ function k(t, n) {
136
+ return {
137
+ kind: "schema",
138
+ type: "literal",
139
+ reference: k,
140
+ expects: /* @__PURE__ */ T(t),
141
+ async: !1,
142
+ literal: t,
143
+ message: n,
144
+ get "~standard"() {
145
+ return /* @__PURE__ */ g(this);
146
+ },
147
+ "~run"(e, r) {
148
+ return e.value === this.literal ? e.typed = !0 : y(this, "type", e, r), e;
149
+ }
150
+ };
151
+ }
152
+ // @__NO_SIDE_EFFECTS__
153
+ function m(t, n) {
154
+ return {
155
+ kind: "schema",
156
+ type: "nullable",
157
+ reference: m,
158
+ expects: `(${t.expects} | null)`,
159
+ async: !1,
160
+ wrapped: t,
161
+ default: n,
162
+ get "~standard"() {
163
+ return /* @__PURE__ */ g(this);
164
+ },
165
+ "~run"(e, r) {
166
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ w(this, e, r)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, r);
167
+ }
168
+ };
169
+ }
170
+ // @__NO_SIDE_EFFECTS__
171
+ function x(t) {
172
+ return {
173
+ kind: "schema",
174
+ type: "number",
175
+ reference: x,
176
+ expects: "number",
177
+ async: !1,
178
+ message: t,
179
+ get "~standard"() {
180
+ return /* @__PURE__ */ g(this);
181
+ },
182
+ "~run"(n, e) {
183
+ return typeof n.value == "number" && !isNaN(n.value) ? n.typed = !0 : y(this, "type", n, e), n;
184
+ }
185
+ };
186
+ }
187
+ // @__NO_SIDE_EFFECTS__
188
+ function b(t, n) {
189
+ return {
190
+ kind: "schema",
191
+ type: "object",
192
+ reference: b,
193
+ expects: "Object",
194
+ async: !1,
195
+ entries: t,
196
+ message: n,
197
+ get "~standard"() {
198
+ return /* @__PURE__ */ g(this);
199
+ },
200
+ "~run"(e, r) {
201
+ const s = e.value;
202
+ if (s && typeof s == "object") {
203
+ e.typed = !0, e.value = {};
204
+ for (const o in this.entries) {
205
+ const i = this.entries[o];
206
+ if (o in s || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
207
+ const u = o in s ? s[o] : /* @__PURE__ */ w(i), a = i["~run"]({ value: u }, r);
208
+ if (a.issues) {
209
+ const p = {
210
+ type: "object",
211
+ origin: "value",
212
+ input: s,
213
+ key: o,
214
+ value: u
215
+ };
216
+ for (const d of a.issues)
217
+ d.path ? d.path.unshift(p) : d.path = [p], e.issues?.push(d);
218
+ if (e.issues || (e.issues = a.issues), r.abortEarly) {
219
+ e.typed = !1;
220
+ break;
221
+ }
222
+ }
223
+ a.typed || (e.typed = !1), e.value[o] = a.value;
224
+ } else if (i.fallback !== void 0) e.value[o] = /* @__PURE__ */ q(i);
225
+ else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (y(this, "key", e, r, {
226
+ input: void 0,
227
+ expected: `"${o}"`,
228
+ path: [{
229
+ type: "object",
230
+ origin: "key",
231
+ input: s,
232
+ key: o,
233
+ value: s[o]
234
+ }]
235
+ }), r.abortEarly))
236
+ break;
237
+ }
238
+ } else y(this, "type", e, r);
239
+ return e;
240
+ }
241
+ };
242
+ }
243
+ // @__NO_SIDE_EFFECTS__
244
+ function f(t, n) {
245
+ return {
246
+ kind: "schema",
247
+ type: "optional",
248
+ reference: f,
249
+ expects: `(${t.expects} | undefined)`,
250
+ async: !1,
251
+ wrapped: t,
252
+ default: n,
253
+ get "~standard"() {
254
+ return /* @__PURE__ */ g(this);
255
+ },
256
+ "~run"(e, r) {
257
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ w(this, e, r)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, r);
258
+ }
259
+ };
260
+ }
261
+ // @__NO_SIDE_EFFECTS__
262
+ function A(t, n, e) {
263
+ return {
264
+ kind: "schema",
265
+ type: "record",
266
+ reference: A,
267
+ expects: "Object",
268
+ async: !1,
269
+ key: t,
270
+ value: n,
271
+ message: e,
272
+ get "~standard"() {
273
+ return /* @__PURE__ */ g(this);
274
+ },
275
+ "~run"(r, s) {
276
+ const o = r.value;
277
+ if (o && typeof o == "object") {
278
+ r.typed = !0, r.value = {};
279
+ for (const i in o) if (/* @__PURE__ */ J(o, i)) {
280
+ const u = o[i], a = this.key["~run"]({ value: i }, s);
281
+ if (a.issues) {
282
+ const d = {
283
+ type: "object",
284
+ origin: "key",
285
+ input: o,
286
+ key: i,
287
+ value: u
288
+ };
289
+ for (const S of a.issues)
290
+ S.path = [d], r.issues?.push(S);
291
+ if (r.issues || (r.issues = a.issues), s.abortEarly) {
292
+ r.typed = !1;
293
+ break;
294
+ }
295
+ }
296
+ const p = this.value["~run"]({ value: u }, s);
297
+ if (p.issues) {
298
+ const d = {
299
+ type: "object",
300
+ origin: "value",
301
+ input: o,
302
+ key: i,
303
+ value: u
304
+ };
305
+ for (const S of p.issues)
306
+ S.path ? S.path.unshift(d) : S.path = [d], r.issues?.push(S);
307
+ if (r.issues || (r.issues = p.issues), s.abortEarly) {
308
+ r.typed = !1;
309
+ break;
310
+ }
311
+ }
312
+ (!a.typed || !p.typed) && (r.typed = !1), a.typed && (r.value[a.value] = p.value);
313
+ }
314
+ } else y(this, "type", r, s);
315
+ return r;
316
+ }
317
+ };
318
+ }
319
+ // @__NO_SIDE_EFFECTS__
320
+ function l(t) {
321
+ return {
322
+ kind: "schema",
323
+ type: "string",
324
+ reference: l,
325
+ expects: "string",
326
+ async: !1,
327
+ message: t,
328
+ get "~standard"() {
329
+ return /* @__PURE__ */ g(this);
330
+ },
331
+ "~run"(n, e) {
332
+ return typeof n.value == "string" ? n.typed = !0 : y(this, "type", n, e), n;
333
+ }
334
+ };
335
+ }
336
+ // @__NO_SIDE_EFFECTS__
337
+ function P(t) {
338
+ let n;
339
+ if (t) for (const e of t) n ? n.push(...e.issues) : n = e.issues;
340
+ return n;
341
+ }
342
+ // @__NO_SIDE_EFFECTS__
343
+ function F(t, n) {
344
+ return {
345
+ kind: "schema",
346
+ type: "union",
347
+ reference: F,
348
+ expects: /* @__PURE__ */ K(t.map((e) => e.expects), "|"),
349
+ async: !1,
350
+ options: t,
351
+ message: n,
352
+ get "~standard"() {
353
+ return /* @__PURE__ */ g(this);
354
+ },
355
+ "~run"(e, r) {
356
+ let s, o, i;
357
+ for (const u of this.options) {
358
+ const a = u["~run"]({ value: e.value }, r);
359
+ if (a.typed) if (a.issues) o ? o.push(a) : o = [a];
360
+ else {
361
+ s = a;
362
+ break;
363
+ }
364
+ else i ? i.push(a) : i = [a];
365
+ }
366
+ if (s) return s;
367
+ if (o) {
368
+ if (o.length === 1) return o[0];
369
+ y(this, "type", e, r, { issues: /* @__PURE__ */ P(o) }), e.typed = !0;
370
+ } else {
371
+ if (i?.length === 1) return i[0];
372
+ y(this, "type", e, r, { issues: /* @__PURE__ */ P(i) });
373
+ }
374
+ return e;
375
+ }
376
+ };
377
+ }
378
+ const h = (t) => /* @__PURE__ */ F(t.map((n) => /* @__PURE__ */ k(n))), Q = /* @__PURE__ */ b({
379
+ "en-au": /* @__PURE__ */ l(),
380
+ "en-gb": /* @__PURE__ */ l(),
381
+ "en-us": /* @__PURE__ */ l(),
382
+ "es-es": /* @__PURE__ */ l()
383
+ }), M = /* @__PURE__ */ b({
384
+ "en-au": /* @__PURE__ */ f(/* @__PURE__ */ l()),
385
+ "en-gb": /* @__PURE__ */ f(/* @__PURE__ */ l()),
386
+ "en-us": /* @__PURE__ */ f(/* @__PURE__ */ l()),
387
+ "es-es": /* @__PURE__ */ f(/* @__PURE__ */ l())
388
+ }), Y = h(["amber", "green", "red", "other"]), Z = h([
389
+ "alpha",
390
+ "beta",
391
+ "generalAvailability",
392
+ "notApplicable",
393
+ "preAlpha",
394
+ "proposed",
395
+ "releaseCandidate",
396
+ "unavailable",
397
+ "underReview"
398
+ ]), ee = h([
399
+ "app",
400
+ "connector",
401
+ "connectorConnection",
402
+ "context",
403
+ "contextModelGroup",
404
+ "contextModel",
405
+ "contextModelDimensionGroup",
406
+ "contextModelDimension",
407
+ "contextModelDimensionHierarchy",
408
+ "contextModelEntityGroup",
409
+ "contextModelEntity",
410
+ "contextModelEntityDataItem",
411
+ "contextModelEntityEvent",
412
+ "contextModelEntityPrimaryMeasure",
413
+ "contextModelSecondaryMeasureGroup",
414
+ "contextModelSecondaryMeasure",
415
+ "dataView",
416
+ "dimension",
417
+ "engine",
418
+ "eventQuery",
419
+ "presenter",
420
+ "presenterPresentation",
421
+ "tool"
422
+ ]);
423
+ h(["app", "engine", "connector", "context", "presenter", "tool"]);
424
+ const te = /* @__PURE__ */ b({
425
+ id: /* @__PURE__ */ l(),
426
+ color: Y,
427
+ label: /* @__PURE__ */ l()
428
+ }), R = {
429
+ id: /* @__PURE__ */ l(),
430
+ label: M,
431
+ description: M,
432
+ firstCreatedAt: /* @__PURE__ */ f(/* @__PURE__ */ x()),
433
+ icon: /* @__PURE__ */ m(/* @__PURE__ */ l()),
434
+ iconDark: /* @__PURE__ */ m(/* @__PURE__ */ l()),
435
+ lastUpdatedAt: /* @__PURE__ */ m(/* @__PURE__ */ x()),
436
+ status: /* @__PURE__ */ m(te),
437
+ statusId: Z
438
+ }, he = /* @__PURE__ */ b({
439
+ ...R,
440
+ typeId: ee
441
+ }), N = {
442
+ ...R,
443
+ version: /* @__PURE__ */ l()
444
+ }, U = /* @__PURE__ */ b({
445
+ id: /* @__PURE__ */ l(),
446
+ label: M,
447
+ description: M,
448
+ icon: /* @__PURE__ */ m(/* @__PURE__ */ l()),
449
+ iconDark: /* @__PURE__ */ m(/* @__PURE__ */ l()),
450
+ order: /* @__PURE__ */ x(),
451
+ path: /* @__PURE__ */ l()
452
+ }), v = (t) => {
453
+ const n = Object.entries(t).filter((e) => typeof e[1] == "string");
454
+ return new Map(n);
455
+ }, ne = (t, n, e = O) => {
456
+ const r = t.get(n);
457
+ if (r !== void 0) return r;
458
+ if (e !== n)
459
+ return t.get(e);
460
+ }, re = [
461
+ { id: "alpha", color: "red", labels: v({ "en-gb": "alpha" }) },
462
+ { id: "beta", color: "amber", labels: v({ "en-gb": "beta" }) },
463
+ { id: "generalAvailability", color: "green", labels: v({ "en-gb": "" }) },
464
+ { id: "notApplicable", color: "green", labels: v({ "en-gb": "not-applicable" }) },
465
+ { id: "preAlpha", color: "red", labels: v({ "en-gb": "pre-alpha" }) },
466
+ { id: "proposed", color: "other", labels: v({ "en-gb": "proposed" }) },
467
+ { id: "releaseCandidate", color: "green", labels: v({ "en-gb": "release-candidate" }) },
468
+ { id: "unavailable", color: "other", labels: v({ "en-gb": "unavailable" }) },
469
+ { id: "underReview", color: "other", labels: v({ "en-gb": "under-review" }) }
470
+ ], ve = (t, n = O) => {
471
+ const e = re.find((r) => r.id === t);
472
+ if (e) {
473
+ const r = ne(e.labels, n);
474
+ return { id: e.id, color: e.color, label: r ?? e.id };
475
+ }
476
+ return { id: t, color: "other", label: t };
477
+ }, se = h(["apiKey", "disabled", "oAuth2", "none"]), oe = h(["application", "curatedDataset", "database", "fileStore"]), ie = h([
478
+ "abortOperation",
479
+ "authenticateConnection",
480
+ "createObject",
481
+ "describeConnection",
482
+ "dropObject",
483
+ "findObject",
484
+ "getReadableStream",
485
+ "getRecord",
486
+ "listNodes",
487
+ "previewObject",
488
+ "removeRecords",
489
+ "retrieveChunks",
490
+ "retrieveRecords",
491
+ "upsertRecords"
492
+ ]), ae = h(["bidirectional", "destination", "source", "unknown"]), le = /* @__PURE__ */ b({
493
+ authMethodId: se,
494
+ activeConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ x()),
495
+ canDescribe: /* @__PURE__ */ f(/* @__PURE__ */ _()),
496
+ id: /* @__PURE__ */ f(/* @__PURE__ */ l()),
497
+ label: /* @__PURE__ */ f(Q),
498
+ maxConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ x()),
499
+ params: /* @__PURE__ */ f(/* @__PURE__ */ E(/* @__PURE__ */ A(/* @__PURE__ */ l(), /* @__PURE__ */ l())))
500
+ }), Ee = /* @__PURE__ */ b({
501
+ ...N,
502
+ typeId: /* @__PURE__ */ k("connector"),
503
+ category: /* @__PURE__ */ m(/* @__PURE__ */ b({ id: /* @__PURE__ */ l(), label: /* @__PURE__ */ l() })),
504
+ categoryId: oe,
505
+ implementations: /* @__PURE__ */ A(/* @__PURE__ */ l(), le),
506
+ operations: /* @__PURE__ */ E(ie),
507
+ usageId: ae,
508
+ vendorAccountURL: /* @__PURE__ */ m(/* @__PURE__ */ l()),
509
+ vendorDocumentationURL: /* @__PURE__ */ m(/* @__PURE__ */ l()),
510
+ vendorHomeURL: /* @__PURE__ */ m(/* @__PURE__ */ l())
511
+ }), Se = ["createObject", "dropObject", "removeRecords", "upsertRecords"], xe = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], D = (t) => {
512
+ const n = Object.entries(t).filter((e) => typeof e[1] == "string");
513
+ return new Map(n);
514
+ };
515
+ D({ "en-gb": "Application" }), D({ "en-gb": "Curated Dataset" }), D({ "en-gb": "Database" }), D({ "en-gb": "File Store" });
516
+ const ce = h(["list"]), ue = /* @__PURE__ */ b({
517
+ ...R,
518
+ typeId: /* @__PURE__ */ k("contextModelGroup"),
519
+ modelRefs: /* @__PURE__ */ E(U),
520
+ order: /* @__PURE__ */ x()
521
+ }), ke = /* @__PURE__ */ b({
522
+ ...N,
523
+ typeId: /* @__PURE__ */ k("context"),
524
+ models: /* @__PURE__ */ E(ue),
525
+ operations: /* @__PURE__ */ E(ce)
526
+ });
527
+ class I extends Error {
528
+ locator;
529
+ constructor(n, e, r) {
530
+ super(n, r), this.name = "DataPosError", this.locator = e;
531
+ }
532
+ }
533
+ class C extends I {
534
+ constructor(n, e, r) {
535
+ super(n, e, r), this.name = "ApplicationError";
536
+ }
537
+ }
538
+ class Ce extends C {
539
+ constructor(n, e, r) {
540
+ super(n, e, r), this.name = "APIError";
541
+ }
542
+ }
543
+ class Oe extends C {
544
+ constructor(n, e, r) {
545
+ super(n, e, r), this.name = "EngineError";
546
+ }
547
+ }
548
+ class z extends C {
549
+ body;
550
+ constructor(n, e, r, s) {
551
+ super(n, e, s), this.name = "FetchError", this.body = r;
552
+ }
553
+ }
554
+ class pe extends C {
555
+ componentName;
556
+ info;
557
+ constructor(n, e, r, s, o) {
558
+ super(n, e, o), this.name = "VueHandledError", this.info = r, this.componentName = s;
559
+ }
560
+ }
561
+ class De extends C {
562
+ constructor(n, e, r) {
563
+ super(n, e, r), this.name = "WindowHandledRuntimeError";
564
+ }
565
+ }
566
+ class Me extends C {
567
+ constructor(n, e, r) {
568
+ super(n, e, r), this.name = "WindowHandledPromiseRejectionError";
569
+ }
570
+ }
571
+ class je extends I {
572
+ constructor(n, e, r) {
573
+ super(n, e, r), this.name = "OperationalError";
574
+ }
575
+ }
576
+ async function we(t, n, e) {
577
+ const r = ` - ${t.statusText}`, s = `${n} Response status '${t.status}${t.statusText ? r : ""}' received.`, o = await t.text();
578
+ return new z(s, e, o);
579
+ }
580
+ function Ae(t) {
581
+ return t.map((n) => n.message).join(" ");
582
+ }
583
+ function Re(t) {
584
+ if (t instanceof Error) return t;
585
+ if (typeof t == "string") return new Error(t);
586
+ if (typeof t == "number" || typeof t == "boolean" || typeof t == "bigint") return new Error(String(t));
587
+ if (typeof t == "symbol") return new Error(t.description ?? "Unknown error");
588
+ if (t && typeof t == "object")
589
+ try {
590
+ return new Error(JSON.stringify(t));
591
+ } catch {
592
+ return new Error("Unknown error");
593
+ }
594
+ return new Error("Unknown error");
595
+ }
596
+ function Ne(t) {
597
+ const n = /* @__PURE__ */ new Set(), e = [];
598
+ let r = t;
599
+ for (; r && !n.has(r); ) {
600
+ n.add(r);
601
+ let s;
602
+ if (r instanceof z)
603
+ s = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
604
+ else if (r instanceof pe)
605
+ s = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
606
+ else if (r instanceof I)
607
+ s = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
608
+ else if (r instanceof Error) {
609
+ const o = r;
610
+ s = { locator: "", message: o.message, name: o.name, stack: o.stack }, r = o.cause;
611
+ } else
612
+ s = { locator: "", message: String(r), name: "Error" }, r = void 0;
613
+ /(?:\.{3}|[.!?])$/.test(s.message) || (s.message += "."), e.push(s);
614
+ }
615
+ return e;
616
+ }
617
+ const de = h(["list", "render", "setColorMode"]), Ie = /* @__PURE__ */ b({
618
+ ...N,
619
+ typeId: /* @__PURE__ */ k("presenter"),
620
+ presentations: /* @__PURE__ */ E(U),
621
+ operations: /* @__PURE__ */ E(de)
622
+ });
623
+ function Le() {
624
+ return { render: fe };
625
+ }
626
+ function fe(t, n, e) {
627
+ e.textContent = "Cytoscape.js diagram goes here...";
628
+ }
629
+ function Pe() {
630
+ return { render: be };
631
+ }
632
+ function be(t, n) {
633
+ console.log(1111, t), console.log(2222, n), console.log(3333, n.childNodes), console.log(4444, n.children);
634
+ }
635
+ const c = (t) => new Map(Object.entries(t)), L = (t, n, e = O) => {
636
+ const r = t.get(n);
637
+ if (r !== void 0) return r;
638
+ if (e !== n)
639
+ return t.get(e);
640
+ }, me = [
641
+ { id: "dtv", labels: c({ "en-gb": "Delimited Text" }) },
642
+ { id: "e/e", labels: c({ "en-gb": "Entity/Event" }) },
643
+ { id: "jsonArray", labels: c({ "en-gb": "JSON Array" }) },
644
+ { id: "spss", labels: c({ "en-gb": "SPSS" }) },
645
+ { id: "xls", labels: c({ "en-gb": "XLS" }) },
646
+ { id: "xlsx", labels: c({ "en-gb": "XLSX" }) },
647
+ { id: "xml", labels: c({ "en-gb": "XML" }) }
648
+ ], Te = (t = O) => {
649
+ const n = [];
650
+ for (const e of me) {
651
+ const r = L(e.labels, t);
652
+ n.push({ id: e.id, label: r ?? e.id });
653
+ }
654
+ return n;
655
+ }, ye = [
656
+ { id: `
657
+ `, labels: c({ "en-gb": "Newline" }) },
658
+ { id: "\r", labels: c({ "en-gb": "Carriage Return" }) },
659
+ { id: `\r
660
+ `, labels: c({ "en-gb": "Carriage Return/Newline" }) }
661
+ ], _e = (t = O) => {
662
+ const n = [];
663
+ for (const e of ye) {
664
+ const r = L(e.labels, t);
665
+ n.push({ id: e.id, label: r ?? e.id });
666
+ }
667
+ return n;
668
+ }, ge = [
669
+ { id: ":", labels: c({ "en-gb": "Colon" }) },
670
+ { id: ",", labels: c({ "en-gb": "Comma" }) },
671
+ { id: "!", labels: c({ "en-gb": "Exclamation Mark" }) },
672
+ // { id: '', label: { 'en-gb': 'Other' } }, // TODO: Maybe set this to a 'not printing' or special ascii character when there is a user supplied delimited, rather than ''?
673
+ { id: "0x1E", labels: c({ "en-gb": "Record Separator" }) },
674
+ { id: ";", labels: c({ "en-gb": "Semicolon" }) },
675
+ { id: " ", labels: c({ "en-gb": "Space" }) },
676
+ { id: " ", labels: c({ "en-gb": "Tab" }) },
677
+ { id: "_", labels: c({ "en-gb": "Underscore" }) },
678
+ { id: "0x1F", labels: c({ "en-gb": "Unit Separator" }) },
679
+ { id: "|", labels: c({ "en-gb": "Vertical Bar" }) }
680
+ ], Fe = (t = O) => {
681
+ const n = [];
682
+ for (const e of ge) {
683
+ const r = L(e.labels, t);
684
+ n.push({ id: e.id, label: r ?? e.id });
685
+ }
686
+ return n;
687
+ }, O = "en-gb";
688
+ export {
689
+ Ce as APIError,
690
+ C as ApplicationError,
691
+ Se as CONNECTOR_DESTINATION_OPERATIONS,
692
+ xe as CONNECTOR_SOURCE_OPERATIONS,
693
+ O as DEFAULT_LOCALE_CODE,
694
+ Oe as EngineError,
695
+ z as FetchError,
696
+ je as OperationalError,
697
+ pe as VueError,
698
+ Me as WindowPromiseRejectionError,
699
+ De as WindowRuntimeError,
700
+ we as buildFetchError,
701
+ he as componentConfigSchema,
702
+ Ae as concatenateSerialisedErrorMessages,
703
+ Ee as connectorConfigSchema,
704
+ ke as contextConfigSchema,
705
+ Ge as convertODataTypeIdToUsageTypeId,
706
+ Ve as extractExtensionFromPath,
707
+ He as extractNameFromPath,
708
+ We as formatNumberAsDecimalNumber,
709
+ $e as formatNumberAsDuration,
710
+ Xe as formatNumberAsSize,
711
+ Be as formatNumberAsStorageSize,
712
+ Je as formatNumberAsWholeNumber,
713
+ ve as getComponentStatus,
714
+ Te as getDataFormats,
715
+ _e as getRecordDelimiters,
716
+ Fe as getValueDelimiters,
717
+ Ke as lookupMimeTypeForExtension,
718
+ Re as normalizeToError,
719
+ Ie as presenterConfigSchema,
720
+ Ne as serialiseError,
721
+ Le as useCytoscapeJS,
722
+ Pe as useDataTable
723
+ };