@dpuse/dpuse-shared 1.0.214 → 1.0.216

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.
@@ -400,11 +400,11 @@ function T(e) {
400
400
  return t;
401
401
  }
402
402
  /* @__NO_SIDE_EFFECTS__ */
403
- function ee(e, t) {
403
+ function E(e, t) {
404
404
  return d({
405
405
  kind: "schema",
406
406
  type: "union",
407
- reference: ee,
407
+ reference: E,
408
408
  expects: /* @__PURE__ */ u(e.map((e) => e.expects), "|"),
409
409
  async: !1,
410
410
  options: e,
@@ -432,7 +432,7 @@ function ee(e, t) {
432
432
  });
433
433
  }
434
434
  /* @__NO_SIDE_EFFECTS__ */
435
- function te(...e) {
435
+ function D(...e) {
436
436
  return d({
437
437
  ...e[0],
438
438
  pipe: e,
@@ -449,7 +449,7 @@ function te(...e) {
449
449
  });
450
450
  }
451
451
  /* @__NO_SIDE_EFFECTS__ */
452
- function ne(e, t, n) {
452
+ function O(e, t, n) {
453
453
  let r = e["~run"]({ value: t }, /* @__PURE__ */ a(n));
454
454
  return {
455
455
  typed: r.typed,
@@ -459,10 +459,10 @@ function ne(e, t, n) {
459
459
  };
460
460
  }
461
461
  // src/locale/locale.schema.ts
462
- var E = /* @__PURE__ */ C({
462
+ var k = /* @__PURE__ */ C({
463
463
  en: /* @__PURE__ */ w(),
464
464
  es: /* @__PURE__ */ w()
465
- }), re = {
465
+ }), ee = {
466
466
  id: /* @__PURE__ */ w(),
467
467
  label: /* @__PURE__ */ C({
468
468
  en: /* @__PURE__ */ x(/* @__PURE__ */ w()),
@@ -474,7 +474,7 @@ var E = /* @__PURE__ */ C({
474
474
  }),
475
475
  icon: /* @__PURE__ */ y(/* @__PURE__ */ w()),
476
476
  iconDark: /* @__PURE__ */ y(/* @__PURE__ */ w())
477
- }, D = (e) => /* @__PURE__ */ ee(e.map((e) => /* @__PURE__ */ _(e))), ie = D([
477
+ }, A = (e) => /* @__PURE__ */ E(e.map((e) => /* @__PURE__ */ _(e))), te = A([
478
478
  "app",
479
479
  "connector",
480
480
  "connectorConnection",
@@ -496,32 +496,32 @@ var E = /* @__PURE__ */ C({
496
496
  "presenter",
497
497
  "presenterPresentation",
498
498
  "tool"
499
- ]), ae = D([
499
+ ]), ne = A([
500
500
  "danger",
501
501
  "success",
502
502
  "warning"
503
- ]), oe = D([
503
+ ]), re = A([
504
504
  "alpha",
505
505
  "beta",
506
506
  "releaseCandidate",
507
507
  "generalAvailability"
508
- ]), se = /* @__PURE__ */ C({
509
- color: ae,
508
+ ]), ie = /* @__PURE__ */ C({
509
+ color: ne,
510
510
  label: /* @__PURE__ */ w()
511
- }), O = {
512
- ...re,
513
- typeId: ie
514
- }, k = /* @__PURE__ */ C({
515
- ...O,
511
+ }), ae = {
512
+ ...ee,
513
+ typeId: te
514
+ }, oe = /* @__PURE__ */ C({
515
+ ...ae,
516
516
  order: /* @__PURE__ */ b(),
517
517
  path: /* @__PURE__ */ w()
518
- }), ce = {
519
- ...O,
518
+ }), se = {
519
+ ...ae,
520
520
  firstCreatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
521
521
  lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ b()),
522
- status: /* @__PURE__ */ y(se),
523
- statusId: /* @__PURE__ */ y(oe)
524
- }, le = /* @__PURE__ */ C({ ...ce }), ue = [
522
+ status: /* @__PURE__ */ y(ie),
523
+ statusId: /* @__PURE__ */ y(re)
524
+ }, ce = /* @__PURE__ */ C({ ...se }), le = [
525
525
  {
526
526
  id: "alpha",
527
527
  color: "danger",
@@ -555,8 +555,8 @@ var E = /* @__PURE__ */ C({
555
555
  }
556
556
  }
557
557
  ];
558
- function de(e, t = "en") {
559
- let n = ue.find((t) => t.id === e);
558
+ function ue(e, t = "en") {
559
+ let n = le.find((t) => t.id === e);
560
560
  if (n) {
561
561
  let e = n.labels[t] ?? n.labels.en ?? n.id;
562
562
  return {
@@ -570,86 +570,99 @@ function de(e, t = "en") {
570
570
  };
571
571
  }
572
572
  // src/component/dataView/index.ts
573
- var fe = [
573
+ var de = [
574
574
  {
575
575
  id: "arrow",
576
+ isStructured: !1,
576
577
  isTable: !1,
577
578
  isText: !1,
578
579
  supportId: "planned"
579
580
  },
580
581
  {
581
582
  id: "avro",
583
+ isStructured: !1,
582
584
  isTable: !1,
583
585
  isText: !1,
584
586
  supportId: "planned"
585
587
  },
586
588
  {
587
589
  id: "dtv",
590
+ isStructured: !1,
588
591
  isTable: !0,
589
592
  isText: !0,
590
593
  supportId: "supported"
591
594
  },
592
595
  {
593
596
  id: "json",
594
- isTable: !1,
595
- isText: !1,
596
- supportId: "planned"
597
+ isStructured: !0,
598
+ isTable: !0,
599
+ isText: !0,
600
+ supportId: "supported"
597
601
  },
598
602
  {
599
603
  id: "jsonl",
600
- isTable: !1,
601
- isText: !1,
602
- supportId: "planned"
604
+ isStructured: !0,
605
+ isTable: !0,
606
+ isText: !0,
607
+ supportId: "supported"
603
608
  },
604
609
  {
605
610
  id: "markdown",
611
+ isStructured: !1,
606
612
  isTable: !1,
607
613
  isText: !0,
608
614
  supportId: "unsupported"
609
615
  },
610
616
  {
611
617
  id: "ods",
618
+ isStructured: !0,
612
619
  isTable: !1,
613
620
  isText: !1,
614
621
  supportId: "planned"
615
622
  },
616
623
  {
617
624
  id: "parquet",
625
+ isStructured: !1,
618
626
  isTable: !1,
619
627
  isText: !1,
620
628
  supportId: "planned"
621
629
  },
622
630
  {
623
631
  id: "sav",
632
+ isStructured: !1,
624
633
  isTable: !1,
625
634
  isText: !1,
626
635
  supportId: "planned"
627
636
  },
628
637
  {
629
638
  id: "sqlite",
639
+ isStructured: !1,
630
640
  isTable: !1,
631
641
  isText: !1,
632
642
  supportId: "planned"
633
643
  },
634
644
  {
635
645
  id: "xlsx",
646
+ isStructured: !0,
636
647
  isTable: !1,
637
648
  isText: !1,
638
649
  supportId: "planned"
639
650
  },
640
651
  {
641
652
  id: "xml",
653
+ isStructured: !0,
642
654
  isTable: !1,
643
655
  isText: !1,
644
656
  supportId: "planned"
645
657
  },
646
658
  {
647
659
  id: "unknown",
660
+ isStructured: !1,
648
661
  isTable: !1,
649
662
  isText: !1,
650
663
  supportId: "unsupported"
651
664
  }
652
- ], A = [
665
+ ], j = [
653
666
  {
654
667
  id: ",",
655
668
  character: ","
@@ -690,7 +703,7 @@ var fe = [
690
703
  id: "0x1E",
691
704
  character: ""
692
705
  }
693
- ], pe = [
706
+ ], fe = [
694
707
  {
695
708
  id: "string",
696
709
  defaultSubtypeId: "plain",
@@ -747,11 +760,11 @@ var fe = [
747
760
  isChoosable: !1,
748
761
  subtypeIds: []
749
762
  }
750
- ], me = [",", "."];
751
- function he(e) {
752
- return A.find(({ id: t }) => t === e)?.character ?? e;
763
+ ], pe = [",", "."];
764
+ function me(e) {
765
+ return j.find(({ id: t }) => t === e)?.character ?? e;
753
766
  }
754
- D([
767
+ A([
755
768
  "app",
756
769
  "engine",
757
770
  "connector",
@@ -760,16 +773,16 @@ D([
760
773
  "tool"
761
774
  ]);
762
775
  // src/component/module/moduleConfig.schema.ts
763
- var j = {
764
- ...ce,
776
+ var M = {
777
+ ...se,
765
778
  vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
766
779
  vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
767
780
  vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ w()),
768
781
  version: /* @__PURE__ */ w()
769
782
  };
770
- ({ ...j });
783
+ ({ ...M });
771
784
  // src/component/module/connector/connectorConfig.schema.ts
772
- var ge = D([
785
+ var he = A([
773
786
  "auditObjectContent",
774
787
  "closeStore",
775
788
  "createObject",
@@ -779,7 +792,9 @@ var ge = D([
779
792
  "getInfo",
780
793
  "getReadableStream",
781
794
  "getRecord",
795
+ "indexObjectStructure",
782
796
  "listNodes",
797
+ "listObjectStructureEntries",
783
798
  "loadObjectRecords",
784
799
  "openStore",
785
800
  "previewObject",
@@ -787,22 +802,22 @@ var ge = D([
787
802
  "removeRecords",
788
803
  "retrieveRecords",
789
804
  "upsertRecords"
790
- ]), _e = D([
805
+ ]), ge = A([
791
806
  "application",
792
807
  "curatedDataset",
793
808
  "database",
794
809
  "fileStore"
795
- ]), ve = /* @__PURE__ */ C({ label: E }), ye = D([
810
+ ]), _e = /* @__PURE__ */ C({ label: k }), ve = A([
796
811
  "apiEndpoint",
797
812
  "file",
798
813
  "table"
799
- ]), be = D([
814
+ ]), ye = A([
800
815
  "bidirectional",
801
816
  "destination",
802
817
  "source",
803
818
  "unknown"
804
- ]), xe = /* @__PURE__ */ C({ label: E }), Se = /* @__PURE__ */ C({
805
- authMethodId: D([
819
+ ]), be = /* @__PURE__ */ C({ label: k }), xe = /* @__PURE__ */ C({
820
+ authMethodId: A([
806
821
  "apiKey",
807
822
  "disabled",
808
823
  "oAuth2",
@@ -811,20 +826,168 @@ var ge = D([
811
826
  activeConnectionCount: /* @__PURE__ */ x(/* @__PURE__ */ b()),
812
827
  canDescribe: /* @__PURE__ */ x(/* @__PURE__ */ g()),
813
828
  id: /* @__PURE__ */ x(/* @__PURE__ */ w()),
814
- label: /* @__PURE__ */ x(E),
829
+ label: /* @__PURE__ */ x(k),
815
830
  maxConnectionCount: /* @__PURE__ */ y(/* @__PURE__ */ b()),
816
831
  params: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ S(/* @__PURE__ */ w(), /* @__PURE__ */ w())))
817
- }), Ce = /* @__PURE__ */ C({
818
- ...j,
832
+ }), Se = /* @__PURE__ */ C({
833
+ ...M,
819
834
  typeId: /* @__PURE__ */ _("connector"),
820
- actionNames: /* @__PURE__ */ h(ge),
821
- category: /* @__PURE__ */ y(ve),
822
- categoryId: _e,
823
- implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(), Se),
824
- itemTypeId: ye,
825
- usage: /* @__PURE__ */ y(xe),
826
- usageId: /* @__PURE__ */ y(be)
827
- }), we = {
835
+ actionNames: /* @__PURE__ */ h(he),
836
+ category: /* @__PURE__ */ y(_e),
837
+ categoryId: ge,
838
+ implementations: /* @__PURE__ */ S(/* @__PURE__ */ w(), xe),
839
+ itemTypeId: ve,
840
+ usage: /* @__PURE__ */ y(be),
841
+ usageId: /* @__PURE__ */ y(ye)
842
+ }), Ce = 2048, N = "[REDACTED]", we = 10, Te = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, Ee = [
843
+ [/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${N}`],
844
+ [/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => Te.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${N}` : e],
845
+ [/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => N],
846
+ [/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => N],
847
+ [/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => N]
848
+ ], P = class extends Error {
849
+ data;
850
+ locator;
851
+ constructor(e, t, n, r) {
852
+ super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
853
+ }
854
+ }, F = class extends P {
855
+ constructor(e, t, n, r) {
856
+ super(e, t, n, r), this.name = "AppError";
857
+ }
858
+ }, De = class extends P {
859
+ constructor(e, t, n, r) {
860
+ super(e, t, n, r), this.name = "APIError";
861
+ }
862
+ }, Oe = class extends P {
863
+ constructor(e, t, n, r) {
864
+ super(e, t, n, r), this.name = "EngineError";
865
+ }
866
+ }, ke = class extends P {
867
+ constructor(e, t, n, r) {
868
+ super(e, t, n, r), this.name = "ConnectorError";
869
+ }
870
+ }, I = class extends P {
871
+ constructor(e, t, n, r) {
872
+ super(e, t, n, r), this.name = "FetchError";
873
+ }
874
+ };
875
+ async function Ae(e, t, n) {
876
+ let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
877
+ try {
878
+ a = await e.text();
879
+ } catch (e) {
880
+ a = `<body unavailable: ${L(e).message}>`;
881
+ }
882
+ return new I(i, n, { body: Re(a) });
883
+ }
884
+ function je(e) {
885
+ return e.map((e) => e.message).join(" ");
886
+ }
887
+ function Me(e) {
888
+ try {
889
+ e();
890
+ } catch {}
891
+ }
892
+ function L(e) {
893
+ if (e instanceof Error) return e;
894
+ if (typeof e == "string") return Error(e);
895
+ if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
896
+ if (typeof e == "symbol") return Error(e.description ?? "Unknown error");
897
+ if (typeof e == "object") try {
898
+ return Error(JSON.stringify(e));
899
+ } catch {
900
+ return /* @__PURE__ */ Error("Unknown error");
901
+ }
902
+ return /* @__PURE__ */ Error("Unknown error");
903
+ }
904
+ function Ne(e) {
905
+ let t = /* @__PURE__ */ new Set(), n = [], r = L(e);
906
+ for (; r != null && !t.has(r);) {
907
+ t.add(r);
908
+ let [e, i] = ze(r), a = Le(e);
909
+ /(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
910
+ }
911
+ return n;
912
+ }
913
+ function Pe(e) {
914
+ let t;
915
+ for (let n of e.toReversed()) {
916
+ let e = Ie(n, t);
917
+ n.stack !== void 0 && (e.stack = n.stack), t = e;
918
+ }
919
+ return t ?? /* @__PURE__ */ Error("No error to unserialise.");
920
+ }
921
+ function Fe(e) {
922
+ let t;
923
+ try {
924
+ t = JSON.stringify(e);
925
+ } catch {
926
+ t = typeof e == "symbol" ? e.description ?? "Unknown error" : typeof e == "bigint" ? e.toString() : "Unknown error";
927
+ }
928
+ return t === "" && (t = "Unknown error"), t;
929
+ }
930
+ function Ie(e, t) {
931
+ switch (e.name) {
932
+ case "APIError": return new De(e.message, e.locator, e.data, { cause: t });
933
+ case "AppError": return new F(e.message, e.locator, e.data, { cause: t });
934
+ case "ConnectorError": return new ke(e.message, e.locator, e.data, { cause: t });
935
+ case "EngineError": return new Oe(e.message, e.locator, e.data, { cause: t });
936
+ case "FetchError": return new I(e.message, e.locator, e.data, { cause: t });
937
+ default: {
938
+ let n = e.name;
939
+ return new class extends Error {
940
+ name = n;
941
+ }(e.message, { cause: t });
942
+ }
943
+ }
944
+ }
945
+ function Le(e) {
946
+ let { data: t, message: n, stack: r } = e;
947
+ return {
948
+ ...e,
949
+ data: t === void 0 ? void 0 : z(t, /* @__PURE__ */ new WeakSet(), 0),
950
+ message: R(n),
951
+ stack: r === void 0 ? void 0 : R(r)
952
+ };
953
+ }
954
+ function R(e) {
955
+ let t = e;
956
+ for (let [e, n] of Ee) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
957
+ return t;
958
+ }
959
+ function z(e, t, n) {
960
+ return typeof e == "string" ? R(e) : typeof e != "object" || !e ? e : n >= we ? N : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => z(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && Te.test(e) ? N : z(r, t, n + 1)])));
961
+ }
962
+ function Re(e) {
963
+ if (e != null && e !== "") return e.length > Ce ? `${e.slice(0, Ce)}... [truncated]` : e;
964
+ }
965
+ function ze(e) {
966
+ let t = e.cause == null ? null : L(e.cause);
967
+ if (e instanceof P) return [{
968
+ data: e.data,
969
+ locator: e.locator,
970
+ message: e.message,
971
+ name: e.name,
972
+ stack: e.stack
973
+ }, t];
974
+ let n = Object.fromEntries(Object.entries(e).filter(([e]) => e !== "cause"));
975
+ return e.name ? [{
976
+ data: n,
977
+ locator: "",
978
+ message: e.message,
979
+ name: e.name,
980
+ stack: e.stack
981
+ }, t] : [{
982
+ data: n,
983
+ locator: "",
984
+ message: Fe(e),
985
+ name: "Error",
986
+ stack: void 0
987
+ }, null];
988
+ }
989
+ // src/encoding/index.ts
990
+ var Be = {
828
991
  arabic: {
829
992
  id: "arabic",
830
993
  label: {
@@ -979,7 +1142,7 @@ var ge = D([
979
1142
  es: "Occidental"
980
1143
  }
981
1144
  }
982
- }, Te = {
1145
+ }, Ve = {
983
1146
  "armscii-8": {
984
1147
  id: "armscii-8",
985
1148
  groupId: "armenian",
@@ -1771,16 +1934,16 @@ var ge = D([
1771
1934
  textDecoderId: "windows-1257",
1772
1935
  iconvLiteDecoderId: "windows1257"
1773
1936
  }
1774
- }, Ee = we, M = Te;
1775
- function De(e) {
1776
- return Object.hasOwn(M, e);
1937
+ }, He = Be, B = Ve;
1938
+ function Ue(e) {
1939
+ return Object.hasOwn(B, e);
1777
1940
  }
1778
- function Oe(e) {
1779
- return De(e) ? M[e].textDecoderId ?? e : e;
1941
+ function We(e) {
1942
+ return Ue(e) ? B[e].textDecoderId ?? e : e;
1780
1943
  }
1781
- function ke(e = "en") {
1782
- return Array.from(Object.values(M), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
1783
- let o = t == null ? "" : Ae(t, e);
1944
+ function Ge(e = "en") {
1945
+ return Array.from(Object.values(B), ({ groupId: t, iconvLiteDecoderId: n, id: r, isDetectable: i, textDecoderId: a }) => {
1946
+ let o = t == null ? "" : Ke(t, e);
1784
1947
  return {
1785
1948
  id: r,
1786
1949
  groupLabel: o,
@@ -1792,159 +1955,11 @@ function ke(e = "en") {
1792
1955
  };
1793
1956
  }).toSorted((t, n) => t.groupLabel.localeCompare(n.groupLabel, e) || t.id.localeCompare(n.id, e, { numeric: !0 }));
1794
1957
  }
1795
- function Ae(e, t) {
1796
- let n = Ee[e].label;
1958
+ function Ke(e, t) {
1959
+ let n = He[e].label;
1797
1960
  return n[t] ?? n.en ?? e;
1798
1961
  }
1799
- // src/errors/index.ts
1800
- var je = 2048, N = "[REDACTED]", Me = 10, Ne = /api[-_]?key|authori[sz]ation|cookie|credential|passw(?:or)?d|private[-_]?key|secret|token/i, Pe = [
1801
- [/\b(Bearer|Basic) +[\w.~+/=-]+/gi, (e, t) => `${t} ${N}`],
1802
- [/(?<![\w-])([\w-]+)(["']?[ \t]*[:=][ \t]*["']?)([^\s"'&,;}?#]+)/g, (e, t, n, r) => Ne.test(t) && !/^(?:Basic|Bearer)$/i.test(r) ? `${t}${n}${N}` : e],
1803
- [/\beyJ[\w-]+\.[\w-]+\.[\w-]*/g, () => N],
1804
- [/\b(?:sk-|xaat-|xapt-|sl\.)[\w-]{16,}/g, () => N],
1805
- [/(?<![\w.+-])[\w.+-]+@[\w-]+\.[\w.-]+/g, () => N]
1806
- ], P = class extends Error {
1807
- data;
1808
- locator;
1809
- constructor(e, t, n, r) {
1810
- super(e, r), this.name = "DPUseError", this.data = n, this.locator = t;
1811
- }
1812
- }, F = class extends P {
1813
- constructor(e, t, n, r) {
1814
- super(e, t, n, r), this.name = "AppError";
1815
- }
1816
- }, I = class extends P {
1817
- constructor(e, t, n, r) {
1818
- super(e, t, n, r), this.name = "APIError";
1819
- }
1820
- }, L = class extends P {
1821
- constructor(e, t, n, r) {
1822
- super(e, t, n, r), this.name = "EngineError";
1823
- }
1824
- }, Fe = class extends P {
1825
- constructor(e, t, n, r) {
1826
- super(e, t, n, r), this.name = "ConnectorError";
1827
- }
1828
- }, R = class extends P {
1829
- constructor(e, t, n, r) {
1830
- super(e, t, n, r), this.name = "FetchError";
1831
- }
1832
- };
1833
- async function Ie(e, t, n) {
1834
- let r = ` - ${e.statusText}`, i = `${t} Response status '${String(e.status)}${e.statusText ? r : ""}' received.`, a;
1835
- try {
1836
- a = await e.text();
1837
- } catch (e) {
1838
- a = `<body unavailable: ${z(e).message}>`;
1839
- }
1840
- return new R(i, n, { body: We(a) });
1841
- }
1842
- function Le(e) {
1843
- return e.map((e) => e.message).join(" ");
1844
- }
1845
- function Re(e) {
1846
- try {
1847
- e();
1848
- } catch {}
1849
- }
1850
- function z(e) {
1851
- if (e instanceof Error) return e;
1852
- if (typeof e == "string") return Error(e);
1853
- if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return Error(String(e));
1854
- if (typeof e == "symbol") return Error(e.description ?? "Unknown error");
1855
- if (typeof e == "object") try {
1856
- return Error(JSON.stringify(e));
1857
- } catch {
1858
- return /* @__PURE__ */ Error("Unknown error");
1859
- }
1860
- return /* @__PURE__ */ Error("Unknown error");
1861
- }
1862
- function ze(e) {
1863
- let t = /* @__PURE__ */ new Set(), n = [], r = z(e);
1864
- for (; r != null && !t.has(r);) {
1865
- t.add(r);
1866
- let [e, i] = Ge(r), a = Ue(e);
1867
- /(?:\.{3}|[.!?])$/.test(a.message) || (a.message += "."), n.push(a), r = i;
1868
- }
1869
- return n;
1870
- }
1871
- function Be(e) {
1872
- let t;
1873
- for (let n of e.toReversed()) {
1874
- let e = He(n, t);
1875
- n.stack !== void 0 && (e.stack = n.stack), t = e;
1876
- }
1877
- return t ?? /* @__PURE__ */ Error("No error to unserialise.");
1878
- }
1879
- function Ve(e) {
1880
- let t;
1881
- try {
1882
- t = JSON.stringify(e);
1883
- } catch {
1884
- t = typeof e == "symbol" ? e.description ?? "Unknown error" : typeof e == "bigint" ? e.toString() : "Unknown error";
1885
- }
1886
- return t === "" && (t = "Unknown error"), t;
1887
- }
1888
- function He(e, t) {
1889
- switch (e.name) {
1890
- case "APIError": return new I(e.message, e.locator, e.data, { cause: t });
1891
- case "AppError": return new F(e.message, e.locator, e.data, { cause: t });
1892
- case "ConnectorError": return new Fe(e.message, e.locator, e.data, { cause: t });
1893
- case "EngineError": return new L(e.message, e.locator, e.data, { cause: t });
1894
- case "FetchError": return new R(e.message, e.locator, e.data, { cause: t });
1895
- default: {
1896
- let n = e.name;
1897
- return new class extends Error {
1898
- name = n;
1899
- }(e.message, { cause: t });
1900
- }
1901
- }
1902
- }
1903
- function Ue(e) {
1904
- let { data: t, message: n, stack: r } = e;
1905
- return {
1906
- ...e,
1907
- data: t === void 0 ? void 0 : V(t, /* @__PURE__ */ new WeakSet(), 0),
1908
- message: B(n),
1909
- stack: r === void 0 ? void 0 : B(r)
1910
- };
1911
- }
1912
- function B(e) {
1913
- let t = e;
1914
- for (let [e, n] of Pe) t = t.replaceAll(e, (e, ...t) => n(e, ...t));
1915
- return t;
1916
- }
1917
- function V(e, t, n) {
1918
- return typeof e == "string" ? B(e) : typeof e != "object" || !e ? e : n >= Me ? N : t.has(e) ? "[Circular]" : (t.add(e), Array.isArray(e) ? e.map((e) => V(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, r != null && Ne.test(e) ? N : V(r, t, n + 1)])));
1919
- }
1920
- function We(e) {
1921
- if (e != null && e !== "") return e.length > je ? `${e.slice(0, je)}... [truncated]` : e;
1922
- }
1923
- function Ge(e) {
1924
- let t = e.cause == null ? null : z(e.cause);
1925
- if (e instanceof P) return [{
1926
- data: e.data,
1927
- locator: e.locator,
1928
- message: e.message,
1929
- name: e.name,
1930
- stack: e.stack
1931
- }, t];
1932
- let n = Object.fromEntries(Object.entries(e).filter(([e]) => e !== "cause"));
1933
- return e.name ? [{
1934
- data: n,
1935
- locator: "",
1936
- message: e.message,
1937
- name: e.name,
1938
- stack: e.stack
1939
- }, t] : [{
1940
- data: n,
1941
- locator: "",
1942
- message: Ve(e),
1943
- name: "Error",
1944
- stack: void 0
1945
- }, null];
1946
- }
1947
- var Ke = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ te(/* @__PURE__ */ h(D([
1962
+ var qe = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ D(/* @__PURE__ */ h(A([
1948
1963
  "arrow",
1949
1964
  "avro",
1950
1965
  "dtv",
@@ -1957,15 +1972,15 @@ var Ke = /* @__PURE__ */ C({ dataFormatIds: /* @__PURE__ */ te(/* @__PURE__ */ h
1957
1972
  "sqlite",
1958
1973
  "xlsx",
1959
1974
  "xml"
1960
- ])), /* @__PURE__ */ f(1)) }), qe = /* @__PURE__ */ h(/* @__PURE__ */ w()), Je = /* @__PURE__ */ C({
1961
- ...j,
1975
+ ])), /* @__PURE__ */ f(1)) }), Je = /* @__PURE__ */ h(/* @__PURE__ */ w()), Ye = /* @__PURE__ */ C({
1976
+ ...M,
1962
1977
  typeId: /* @__PURE__ */ _("tool"),
1963
- actionNames: /* @__PURE__ */ x(qe),
1964
- parser: /* @__PURE__ */ x(Ke)
1978
+ actionNames: /* @__PURE__ */ x(Je),
1979
+ parser: /* @__PURE__ */ x(qe)
1965
1980
  });
1966
1981
  // src/component/module/tool/delimitedText.ts
1967
- async function Ye(e, t, n) {
1968
- let r = Xe(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await Ze(e, t.valueDelimiterIds, t.isComplete, n);
1982
+ async function Xe(e, t, n) {
1983
+ let r = Ze(e), { issues: i, parsedRecords: a, valueDelimiterId: o } = await Qe(e, t.valueDelimiterIds, t.isComplete, n);
1969
1984
  return {
1970
1985
  issues: i,
1971
1986
  parsedRecords: a,
@@ -1973,16 +1988,16 @@ async function Ye(e, t, n) {
1973
1988
  valueDelimiterId: o
1974
1989
  };
1975
1990
  }
1976
- function Xe(e) {
1991
+ function Ze(e) {
1977
1992
  let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
1978
1993
  return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
1979
1994
  }
1980
- async function Ze(e, t, n, r) {
1995
+ async function Qe(e, t, n, r) {
1981
1996
  let i, a, o, s = [], c, l = !1;
1982
1997
  for (let u of t) {
1983
1998
  let { issues: t, records: d } = await r(e, u, n);
1984
1999
  if (t.length > 0) {
1985
- c = Qe(c, {
2000
+ c = $e(c, {
1986
2001
  delimiter: u,
1987
2002
  issues: t,
1988
2003
  records: d
@@ -1990,7 +2005,7 @@ async function Ze(e, t, n, r) {
1990
2005
  continue;
1991
2006
  }
1992
2007
  if (l = !0, d.length === 0) continue;
1993
- let { averageValueCount: f, sumOfValueCountDiffs: p } = $e(d);
2008
+ let { averageValueCount: f, sumOfValueCountDiffs: p } = et(d);
1994
2009
  (a === void 0 || a <= 1 || p <= (o ?? 0)) && (a === void 0 || f > a) && (i = u, a = f, o = p, s = d);
1995
2010
  }
1996
2011
  if (!l && c != null) {
@@ -1998,19 +2013,19 @@ async function Ze(e, t, n, r) {
1998
2013
  return {
1999
2014
  issues: t,
2000
2015
  parsedRecords: n,
2001
- valueDelimiterId: H(n) ? e : void 0
2016
+ valueDelimiterId: V(n) ? e : void 0
2002
2017
  };
2003
2018
  }
2004
2019
  return {
2005
2020
  issues: [],
2006
2021
  parsedRecords: s,
2007
- valueDelimiterId: i != null && H(s) ? i : void 0
2022
+ valueDelimiterId: i != null && V(s) ? i : void 0
2008
2023
  };
2009
2024
  }
2010
- function Qe(e, t) {
2025
+ function $e(e, t) {
2011
2026
  return e == null || t.issues.length < e.issues.length ? t : e;
2012
2027
  }
2013
- function $e(e) {
2028
+ function et(e) {
2014
2029
  let t = 0, n = 0, r;
2015
2030
  for (let i of e) r != null && (n += Math.abs(i.length - r)), r = i.length, t += i.length;
2016
2031
  return {
@@ -2018,19 +2033,19 @@ function $e(e) {
2018
2033
  sumOfValueCountDiffs: n
2019
2034
  };
2020
2035
  }
2021
- function H(e) {
2036
+ function V(e) {
2022
2037
  let t = /* @__PURE__ */ new Map();
2023
2038
  for (let n of e) t.set(n.length, (t.get(n.length) ?? 0) + 1);
2024
2039
  let [n = 0, r = 0] = [...t].toSorted((e, t) => t[1] - e[1])[0] ?? [];
2025
2040
  return n > 1 && r * 2 > e.length;
2026
2041
  }
2027
2042
  // src/component/module/tool/index.ts
2028
- var et = "https://engine-eu.dpuse.app/tools", tt = { dtv: "dpuse-tool-rust-csv-core-parser" }, U = "dpuse-tool-";
2029
- function W(e, t) {
2043
+ var tt = "https://engine-eu.dpuse.app/tools", nt = { dtv: "dpuse-tool-rust-csv-core-parser" }, H = "dpuse-tool-";
2044
+ function U(e, t) {
2030
2045
  return e.filter((e) => e.parser?.dataFormatIds.some((e) => e === t) === !0).toSorted((e, t) => e.id.localeCompare(t.id, "en"));
2031
2046
  }
2032
- function G(e, t, n) {
2033
- let r = W(e, t), [i] = r;
2047
+ function W(e, t, n) {
2048
+ let r = U(e, t), [i] = r;
2034
2049
  if (i === void 0) {
2035
2050
  let n = {
2036
2051
  availableToolIds: e.map((e) => e.id),
@@ -2038,11 +2053,11 @@ function G(e, t, n) {
2038
2053
  };
2039
2054
  throw new F(`No tool reads the '${t}' data format.`, "dpuse-shared.component.module.tool.resolveParserToolConfig", n);
2040
2055
  }
2041
- let a = tt[t];
2056
+ let a = nt[t];
2042
2057
  return r.find((e) => e.id === n) ?? r.find((e) => e.id === a) ?? i;
2043
2058
  }
2044
- async function K(e, t) {
2045
- let n = `${U}${t}`, r = e.find((e) => e.id === n);
2059
+ async function rt(e, t) {
2060
+ let n = `${H}${t}`, r = e.find((e) => e.id === n);
2046
2061
  if (!r) {
2047
2062
  let r = {
2048
2063
  availableToolIds: e.map((e) => e.id),
@@ -2050,7 +2065,7 @@ async function K(e, t) {
2050
2065
  };
2051
2066
  throw new F(`Tool '${t}' not found.`, "dpuse-shared.component.module.tool.loadTool", r);
2052
2067
  }
2053
- let i = `${et}/${t}_v${r.version}/${n}.es.js`;
2068
+ let i = `${tt}/${t}_v${r.version}/${n}.es.js`;
2054
2069
  try {
2055
2070
  return new (await (import(
2056
2071
  /* @vite-ignore */
@@ -2066,8 +2081,8 @@ async function K(e, t) {
2066
2081
  }
2067
2082
  }
2068
2083
  // src/component/module/connector/objectParsing.ts
2069
- var nt = "\n", q = ",", rt = 13, J = 10, it = 34, Y = 1048576;
2070
- async function at(e) {
2084
+ var it = "\n", G = ",", K = new Set(de.filter(({ isStructured: e }) => e).map(({ id: e }) => e)), at = 13, q = 10, ot = 34, J = 1048576;
2085
+ async function st(e) {
2071
2086
  let { asAt: t, declaredColumnConfigs: n, declaredReadingConfig: r, filePreview: i, inferDataTypes: a, readingChoiceConfig: o, startedAt: s, toolConfigs: c } = e, { isComplete: l, text: u } = i, d = r != null, f = i.bytes.length, p = {
2072
2087
  decodedEncodingId: i.decodedEncodingId,
2073
2088
  replacementCharacterCount: i.replacementCharacterCount
@@ -2077,7 +2092,7 @@ async function at(e) {
2077
2092
  encodingSourceId: r?.encodingId == null ? i.encodingSourceId : void 0
2078
2093
  };
2079
2094
  if (f === 0) return {
2080
- contentAuditConfig: lt({
2095
+ contentAuditConfig: pt({
2081
2096
  asAt: t,
2082
2097
  columns: [],
2083
2098
  isComplete: !0,
@@ -2101,10 +2116,10 @@ async function at(e) {
2101
2116
  hasHeaders: !1,
2102
2117
  parsedRecords: [],
2103
2118
  parserId: void 0,
2104
- recordDelimiterId: nt,
2119
+ recordDelimiterId: it,
2105
2120
  size: 0,
2106
2121
  text: void 0,
2107
- valueDelimiterId: q
2122
+ valueDelimiterId: G
2108
2123
  },
2109
2124
  readingConfig: {
2110
2125
  dataFormatId: "dtv",
@@ -2114,117 +2129,161 @@ async function at(e) {
2114
2129
  hasHeaders: !1,
2115
2130
  isDeclared: d,
2116
2131
  parserId: void 0,
2117
- recordDelimiterId: nt,
2118
- valueDelimiterId: q
2132
+ recordDelimiterId: it,
2133
+ valueDelimiterId: G
2119
2134
  },
2120
2135
  encodingCandidates: m
2121
2136
  };
2122
- let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = await pt({
2137
+ let g = r?.dataFormatId ?? i.dataFormatId, _ = r?.valueDelimiterId, v = await yt({
2138
+ dataFormatId: g,
2139
+ filePreview: i,
2140
+ parserId: void 0,
2141
+ toolConfigs: c
2142
+ }), y = await vt({
2123
2143
  dataFormatId: g,
2124
2144
  isComplete: l,
2125
2145
  parserId: void 0,
2146
+ structureIndex: v,
2147
+ structurePath: v?.suggestedStructurePath,
2126
2148
  text: u,
2127
2149
  toolConfigs: c,
2128
2150
  valueDelimiterId: _
2129
- }), y = o?.dataFormatId ?? g, b = o?.dataFormatId != null || o?.parserId != null || o?.valueDelimiterId != null, x = b ? await pt({
2130
- dataFormatId: y,
2151
+ }), b = o?.dataFormatId ?? g, x = o?.dataFormatId != null || o?.parserId != null, S = x || o?.valueDelimiterId != null || o?.structurePath != null, C = x ? await yt({
2152
+ dataFormatId: b,
2153
+ filePreview: i,
2154
+ parserId: o.parserId,
2155
+ toolConfigs: c
2156
+ }) : v, w = S ? await vt({
2157
+ dataFormatId: b,
2131
2158
  isComplete: l,
2132
2159
  parserId: o.parserId,
2160
+ structureIndex: C,
2161
+ structurePath: o.structurePath ?? C?.suggestedStructurePath,
2133
2162
  text: u,
2134
2163
  toolConfigs: c,
2135
2164
  valueDelimiterId: _ ?? o.valueDelimiterId
2136
- }) : v, S = x?.parseTextResult.parsedRecords ?? [], C = x == null ? void 0 : a(S, r?.hasHeaders, n), w = b && v != null ? a(v.parseTextResult.parsedRecords, r?.hasHeaders, n) : C;
2165
+ }) : y, T = w?.parseTextResult.parsedRecords ?? [], E = w?.parseTextResult.hasHeaders ?? r?.hasHeaders, D = w == null ? void 0 : a(T, E, n), O = S && y != null ? a(y.parseTextResult.parsedRecords, y.parseTextResult.hasHeaders ?? r?.hasHeaders, n) : D;
2137
2166
  return {
2138
- contentAuditConfig: lt({
2167
+ contentAuditConfig: pt({
2139
2168
  asAt: t,
2140
- columns: C?.columnConfigs ?? [],
2169
+ columns: D?.columnConfigs ?? [],
2141
2170
  isComplete: l,
2142
- recordCount: Math.max(0, S.length - +(C?.hasHeaders === !0)),
2171
+ recordCount: Math.max(0, T.length - +(D?.hasHeaders === !0)),
2143
2172
  size: f,
2144
2173
  startedAt: s
2145
2174
  }),
2146
2175
  sampleConfig: {
2147
2176
  ...p,
2148
- dataFormatId: y ?? "unknown",
2149
- hasHeaders: C?.hasHeaders,
2150
- issues: x?.parseTextResult.issues ?? [],
2151
- parsedRecords: S,
2152
- parserId: x?.parserId,
2153
- recordDelimiterId: x?.parseTextResult.recordDelimiterId,
2177
+ dataFormatId: b ?? "unknown",
2178
+ hasHeaders: D?.hasHeaders,
2179
+ issues: w?.parseTextResult.issues ?? [],
2180
+ parsedRecords: T,
2181
+ parserId: w?.parserId,
2182
+ recordDelimiterId: w?.parseTextResult.recordDelimiterId,
2154
2183
  size: f,
2184
+ structurePath: w?.structurePath,
2155
2185
  text: u,
2156
- valueDelimiterId: x?.valueDelimiterId
2186
+ valueDelimiterId: w?.valueDelimiterId
2157
2187
  },
2158
2188
  readingConfig: {
2159
2189
  dataFormatId: g ?? "unknown",
2160
2190
  dataFormatSourceId: r == null ? i.dataFormatSourceId : void 0,
2161
2191
  ...h,
2162
2192
  fileType: i.fileTypeConfig,
2163
- hasHeaders: w?.hasHeaders,
2193
+ hasHeaders: O?.hasHeaders,
2164
2194
  isDeclared: d,
2165
- parserId: v?.parserId,
2166
- recordDelimiterId: v?.parseTextResult.recordDelimiterId,
2167
- valueDelimiterId: v?.valueDelimiterId
2195
+ parserId: y?.parserId,
2196
+ recordDelimiterId: y?.parseTextResult.recordDelimiterId,
2197
+ structurePath: v?.suggestedStructurePath,
2198
+ valueDelimiterId: y?.valueDelimiterId
2168
2199
  },
2169
- encodingCandidates: m
2200
+ encodingCandidates: m,
2201
+ structureIndex: C
2170
2202
  };
2171
2203
  }
2172
- async function* ot(e) {
2173
- let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } = ct(t), { parser: s } = await X(i, t.dataFormatId, t.parserId), { recordCount: c } = yield* s.parseStream(r, {
2204
+ async function* ct(e) {
2205
+ let { options: t, signal: n, stream: r, toolConfigs: i } = e, { encodingId: a, valueDelimiterId: o } = ft(t), { parser: s } = await Y(i, t.dataFormatId, t.parserId), { recordCount: c } = yield* s.parseStream(r, {
2174
2206
  abortSignal: n,
2175
2207
  chunkSize: t.chunkSize,
2176
2208
  dataFormatId: t.dataFormatId,
2177
2209
  encodingId: a,
2210
+ structurePath: t.structurePath,
2178
2211
  valueDelimiterId: o
2179
2212
  });
2180
2213
  return { recordCount: c };
2181
2214
  }
2182
- async function st(e) {
2183
- let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } = ct(i), u = Date.now(), d = performance.now(), f = t(i.hasHeaders, n), { parser: p } = await X(s, i.dataFormatId, i.parserId), m = ft(o), h = ut(m.stream, {
2215
+ async function lt(e) {
2216
+ let { constructColumnAuditor: t, declaredColumnConfigs: n, onProgress: r, options: i, signal: a, stream: o, toolConfigs: s } = e, { encodingId: c, valueDelimiterId: l } = ft(i), u = Date.now(), d = performance.now(), f = t(i.hasHeaders, n), { parser: p } = await Y(s, i.dataFormatId, i.parserId), m = _t(o), h = K.has(i.dataFormatId), g = h ? gt(m.stream) : mt(m.stream, {
2184
2217
  byteLimit: i.byteLimit,
2185
2218
  encodingId: c,
2186
2219
  stopSignal: i.stopSignal
2187
- }), g = p.parseStream(h.stream, {
2220
+ }), _ = p.parseStream(g.stream, {
2188
2221
  abortSignal: a,
2222
+ byteLimit: h ? i.byteLimit : void 0,
2189
2223
  chunkSize: i.chunkSize,
2190
2224
  dataFormatId: i.dataFormatId,
2191
2225
  encodingId: c,
2226
+ stopSignal: h ? i.stopSignal : void 0,
2227
+ structurePath: i.structurePath,
2192
2228
  valueDelimiterId: l
2193
- }), _ = await g.next();
2194
- for (; _.done !== !0;) {
2229
+ }), v = await _.next();
2230
+ for (; v.done !== !0;) {
2195
2231
  try {
2196
- f.auditRecords(_.value.records), r(_.value.records.length, h.byteCount());
2232
+ f.auditRecords(v.value.records), r(v.value.records.length, g.byteCount());
2197
2233
  } catch (e) {
2198
- throw await g.throw(e), e;
2234
+ throw await _.throw(e), e;
2199
2235
  }
2200
- _ = await g.next();
2236
+ v = await _.next();
2201
2237
  }
2202
- let v = _.value, { columnConfigs: y, hasHeaders: b } = f.completeAudit();
2238
+ let y = v.value, { columnConfigs: b, hasHeaders: x } = f.completeAudit();
2203
2239
  return {
2204
2240
  contentAuditConfig: {
2205
2241
  asAt: u,
2206
- byteCount: h.byteCount(),
2207
- columns: y,
2208
- commentLineCount: v.commentLineCount,
2242
+ byteCount: g.byteCount(),
2243
+ columns: b,
2244
+ commentLineCount: y.commentLineCount,
2209
2245
  duration: performance.now() - d,
2210
- emptyLineCount: v.emptyLineCount,
2211
- invalidFieldLengthCount: v.nonUniformRecordCount,
2212
- isComplete: h.isComplete(),
2213
- lineCount: v.lineCount,
2214
- recordCount: Math.max(0, v.recordCount - +!!b),
2246
+ emptyLineCount: y.emptyLineCount,
2247
+ invalidFieldLengthCount: y.nonUniformRecordCount,
2248
+ isComplete: y.isComplete ?? g.isComplete(),
2249
+ lineCount: y.lineCount,
2250
+ recordCount: Math.max(0, y.recordCount - +!!x),
2215
2251
  sourceWaitDuration: m.waitDuration()
2216
2252
  },
2217
- hasHeaders: b
2253
+ hasHeaders: x
2218
2254
  };
2219
2255
  }
2220
- function ct(e) {
2221
- if (e.encodingId == null || e.valueDelimiterId == null) throw Error(`'${e.path}' has no encoding or value delimiter, which a parser needs to read it.`);
2256
+ async function ut(e) {
2257
+ let { onProgress: t, options: n, signal: r, stream: i, toolConfigs: a } = e, o = await X(a, n.dataFormatId, n.parserId), s = n.encodingId ?? "utf-8";
2258
+ return await o.buildStructureIndex(i, {
2259
+ abortSignal: r,
2260
+ dataFormatId: n.dataFormatId,
2261
+ encodingId: s,
2262
+ isComplete: !0,
2263
+ maxDepth: void 0,
2264
+ onProgress: t
2265
+ });
2266
+ }
2267
+ async function dt(e) {
2268
+ let { options: t, signal: n, stream: r, toolConfigs: i } = e;
2269
+ return await (await X(i, t.dataFormatId, t.parserId)).listStructureEntries(r, {
2270
+ abortSignal: n,
2271
+ dataFormatId: t.dataFormatId,
2272
+ entryCount: t.entryCount,
2273
+ locator: t.locator,
2274
+ maxValueLength: t.maxValueLength,
2275
+ path: t.structurePath
2276
+ });
2277
+ }
2278
+ function ft(e) {
2279
+ let t = e.valueDelimiterId ?? (K.has(e.dataFormatId) ? "" : void 0);
2280
+ if (t == null || e.encodingId == null) throw Error(`'${e.path}' has no encoding or value delimiter, which a parser needs to read it.`);
2222
2281
  return {
2223
2282
  encodingId: e.encodingId,
2224
- valueDelimiterId: e.valueDelimiterId
2283
+ valueDelimiterId: t
2225
2284
  };
2226
2285
  }
2227
- function lt(e) {
2286
+ function pt(e) {
2228
2287
  let { asAt: t, columns: n, isComplete: r, recordCount: i, size: a, startedAt: o } = e;
2229
2288
  return {
2230
2289
  asAt: t,
@@ -2240,8 +2299,8 @@ function lt(e) {
2240
2299
  sourceWaitDuration: void 0
2241
2300
  };
2242
2301
  }
2243
- function ut(e, t) {
2244
- let n = e.getReader(), r = dt(t.encodingId), i = 0, a = !1, o;
2302
+ function mt(e, t) {
2303
+ let n = e.getReader(), r = ht(t.encodingId), i = 0, a = !1, o;
2245
2304
  return {
2246
2305
  byteCount: () => i,
2247
2306
  isComplete: () => a,
@@ -2256,8 +2315,8 @@ function ut(e, t) {
2256
2315
  }
2257
2316
  s = t.value;
2258
2317
  }
2259
- let c = s.subarray(0, Y);
2260
- o = s.length > Y ? s.subarray(Y) : void 0;
2318
+ let c = s.subarray(0, J);
2319
+ o = s.length > J ? s.subarray(J) : void 0;
2261
2320
  let l = t.stopSignal?.aborted === !0 ? i : t.byteLimit ?? Infinity, u = r(c, i, l - i);
2262
2321
  u == null ? (i += c.length, e.enqueue(c)) : (i += u, o = void 0, e.enqueue(c.subarray(0, u)), e.close(), await n.cancel());
2263
2322
  },
@@ -2267,19 +2326,35 @@ function ut(e, t) {
2267
2326
  }, { highWaterMark: 0 })
2268
2327
  };
2269
2328
  }
2270
- function dt(e) {
2271
- let t = Oe(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
2329
+ function ht(e) {
2330
+ let t = We(e), n = t.startsWith("utf-16"), r = n ? 2 : 1, i = +(t === "utf-16be"), a = !1;
2272
2331
  return (e, t, o) => {
2273
2332
  for (let s = 0; s < e.length; s++) {
2274
2333
  let c = e[s];
2275
- if ((c === it || c === J || c === rt) && (!n || (t + s) % 2 === i && e[s + 1 - 2 * i] === 0)) {
2276
- if (c === it) a = !a;
2277
- else if (!a && s >= o && (c === J || e[s + r] !== J)) return s + r - i;
2334
+ if ((c === ot || c === q || c === at) && (!n || (t + s) % 2 === i && e[s + 1 - 2 * i] === 0)) {
2335
+ if (c === ot) a = !a;
2336
+ else if (!a && s >= o && (c === q || e[s + r] !== q)) return s + r - i;
2278
2337
  }
2279
2338
  }
2280
2339
  };
2281
2340
  }
2282
- function ft(e) {
2341
+ function gt(e) {
2342
+ let t = e.getReader(), n = 0, r = !1;
2343
+ return {
2344
+ byteCount: () => n,
2345
+ isComplete: () => r,
2346
+ stream: new ReadableStream({
2347
+ async pull(e) {
2348
+ let i = await t.read();
2349
+ i.done ? (r = !0, e.close()) : (n += i.value.length, e.enqueue(i.value));
2350
+ },
2351
+ cancel(e) {
2352
+ return t.cancel(e);
2353
+ }
2354
+ }, { highWaterMark: 0 })
2355
+ };
2356
+ }
2357
+ function _t(e) {
2283
2358
  let t = e.getReader(), n = 0;
2284
2359
  return {
2285
2360
  stream: new ReadableStream({
@@ -2294,57 +2369,101 @@ function ft(e) {
2294
2369
  waitDuration: () => n
2295
2370
  };
2296
2371
  }
2297
- async function pt(e) {
2298
- let { dataFormatId: t, isComplete: n, parserId: r, text: i, toolConfigs: a, valueDelimiterId: o } = e;
2299
- if (t == null || i == null || W(a, t).length === 0) return;
2300
- let { parser: s, parserId: c } = await X(a, t, r), l = o == null ? A.map(({ id: e }) => e) : [o], u = await s.parseText(i, {
2372
+ async function vt(e) {
2373
+ let { dataFormatId: t, isComplete: n, parserId: r, structureIndex: i, structurePath: a, text: o, toolConfigs: s, valueDelimiterId: c } = e;
2374
+ if (t == null || o == null || U(s, t).length === 0) return;
2375
+ let { parser: l, parserId: u } = await Y(s, t, r);
2376
+ if (i != null) {
2377
+ let e = i.nodes.length === 0 && i.issues.length > 0;
2378
+ return e || a == null ? {
2379
+ parserId: u,
2380
+ parseTextResult: {
2381
+ issues: e ? i.issues : [],
2382
+ parsedRecords: [],
2383
+ recordDelimiterId: "\n",
2384
+ valueDelimiterId: void 0
2385
+ },
2386
+ structurePath: void 0,
2387
+ valueDelimiterId: void 0
2388
+ } : {
2389
+ parserId: u,
2390
+ parseTextResult: await l.parseText(o, {
2391
+ dataFormatId: t,
2392
+ isComplete: n,
2393
+ structurePath: a,
2394
+ valueDelimiterIds: []
2395
+ }),
2396
+ structurePath: a,
2397
+ valueDelimiterId: void 0
2398
+ };
2399
+ }
2400
+ let d = c == null ? j.map(({ id: e }) => e) : [c], f = await l.parseText(o, {
2301
2401
  dataFormatId: t,
2302
2402
  isComplete: n,
2303
- valueDelimiterIds: l
2304
- }), d = t === "dtv", f = d && o == null && u.valueDelimiterId == null ? await s.parseText(i, {
2403
+ valueDelimiterIds: d
2404
+ }), p = t === "dtv", m = p && c == null && f.valueDelimiterId == null ? await l.parseText(o, {
2305
2405
  dataFormatId: t,
2306
2406
  isComplete: n,
2307
- valueDelimiterIds: [q]
2308
- }) : u;
2407
+ valueDelimiterIds: [G]
2408
+ }) : f;
2309
2409
  return {
2310
- parserId: c,
2311
- parseTextResult: f,
2312
- valueDelimiterId: d ? o ?? f.valueDelimiterId ?? q : f.valueDelimiterId
2410
+ parserId: u,
2411
+ parseTextResult: m,
2412
+ structurePath: void 0,
2413
+ valueDelimiterId: p ? c ?? m.valueDelimiterId ?? G : m.valueDelimiterId
2313
2414
  };
2314
2415
  }
2315
- async function X(e, t, n) {
2316
- let r = G(e, t, n);
2416
+ async function yt(e) {
2417
+ let { dataFormatId: t, filePreview: n, parserId: r, toolConfigs: i } = e;
2418
+ if (!(t != null && K.has(t) && U(i, t).length > 0 && W(i, t, r).actionNames?.includes("buildStructureIndex") === !0)) return;
2419
+ let a = await X(i, t, r), o = new Blob([n.bytes]).stream(), s = n.decodedEncodingId ?? "utf-8";
2420
+ return await a.buildStructureIndex(o, {
2421
+ abortSignal: new AbortController().signal,
2422
+ dataFormatId: t,
2423
+ encodingId: s,
2424
+ isComplete: n.isComplete,
2425
+ maxDepth: void 0,
2426
+ onProgress: void 0
2427
+ });
2428
+ }
2429
+ async function Y(e, t, n) {
2430
+ let r = W(e, t, n);
2317
2431
  return {
2318
- parser: await K(e, r.id.slice(U.length)),
2432
+ parser: await rt(e, r.id.slice(H.length)),
2319
2433
  parserId: r.id
2320
2434
  };
2321
2435
  }
2436
+ async function X(e, t, n) {
2437
+ let { parser: r, parserId: i } = await Y(e, t, n);
2438
+ if (!("buildStructureIndex" in r)) throw new F(`Tool '${i}' does not map the structure of '${t}' items.`, "dpuse-shared.component.module.connector.objectParsing.loadStructuredParser");
2439
+ return r;
2440
+ }
2322
2441
  // src/component/module/connector/storePath.ts
2323
- var mt = /^[\w-]+$/u;
2324
- function ht(e) {
2442
+ var bt = /^[\w-]+$/u;
2443
+ function xt(e) {
2325
2444
  if (!e.startsWith("/")) return {
2326
2445
  databaseName: void 0,
2327
2446
  tableName: e
2328
2447
  };
2329
2448
  let [, t, n, ...r] = e.split("/");
2330
- if (t == null || n == null || n === "" || r.length > 0 || !mt.test(t)) throw Error(`Encountered invalid store path '${e}'.`);
2449
+ if (t == null || n == null || n === "" || r.length > 0 || !bt.test(t)) throw Error(`Encountered invalid store path '${e}'.`);
2331
2450
  return {
2332
2451
  databaseName: t,
2333
2452
  tableName: n
2334
2453
  };
2335
2454
  }
2336
2455
  // src/component/module/connector/storeValues.ts
2337
- function gt(e) {
2456
+ function St(e) {
2338
2457
  return e.map((e) => ({
2339
- value: _t(e),
2458
+ value: Ct(e),
2340
2459
  valueWasQuoted: !1
2341
2460
  }));
2342
2461
  }
2343
- function _t(e) {
2462
+ function Ct(e) {
2344
2463
  return e == null ? null : e instanceof Date ? e.toISOString() : String(e);
2345
2464
  }
2346
2465
  // src/component/module/connector/webLock.ts
2347
- async function vt(e) {
2466
+ async function wt(e) {
2348
2467
  let t = Promise.withResolvers(), n = navigator.locks.request(e, { ifAvailable: !0 }, (e) => {
2349
2468
  if (e == null) t.resolve(void 0);
2350
2469
  else return new Promise((e) => {
@@ -2355,16 +2474,16 @@ async function vt(e) {
2355
2474
  })();
2356
2475
  return await Promise.race([t.promise, r]);
2357
2476
  }
2358
- var yt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
2477
+ var Tt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
2359
2478
  format: /* @__PURE__ */ x(/* @__PURE__ */ w()),
2360
2479
  name: /* @__PURE__ */ w(),
2361
2480
  title: /* @__PURE__ */ x(/* @__PURE__ */ w()),
2362
2481
  type: /* @__PURE__ */ x(/* @__PURE__ */ w())
2363
- })) }), bt = /* @__PURE__ */ v({
2482
+ })) }), Et = /* @__PURE__ */ v({
2364
2483
  delimiter: /* @__PURE__ */ x(/* @__PURE__ */ w()),
2365
2484
  header: /* @__PURE__ */ x(/* @__PURE__ */ g()),
2366
2485
  headerRows: /* @__PURE__ */ x(/* @__PURE__ */ h(/* @__PURE__ */ b()))
2367
- }), xt = {
2486
+ }), Dt = {
2368
2487
  boolean: {
2369
2488
  dataSubtypeId: void 0,
2370
2489
  dataTypeId: "boolean"
@@ -2397,18 +2516,18 @@ var yt = /* @__PURE__ */ v({ fields: /* @__PURE__ */ h(/* @__PURE__ */ v({
2397
2516
  dataSubtypeId: "integer",
2398
2517
  dataTypeId: "numeric"
2399
2518
  }
2400
- }, St = {
2519
+ }, Ot = {
2401
2520
  email: "email",
2402
2521
  uri: "url",
2403
2522
  uuid: "uuid"
2404
2523
  };
2405
- function Ct(e) {
2406
- let t = /* @__PURE__ */ ne(yt, e.schema);
2524
+ function kt(e) {
2525
+ let t = /* @__PURE__ */ O(Tt, e.schema);
2407
2526
  if (!t.success) throw new F("The table schema is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
2408
- let n = /* @__PURE__ */ ne(bt, e.dialect ?? {});
2527
+ let n = /* @__PURE__ */ O(Et, e.dialect ?? {});
2409
2528
  if (!n.success) throw new F("The table dialect is not valid.", "dpuse-shared.component.module.connector.tableSchema.readTableSchema");
2410
2529
  let r = t.output.fields.map((e) => {
2411
- let t = wt(e.type, e.format);
2530
+ let t = At(e.type, e.format);
2412
2531
  return {
2413
2532
  name: e.name,
2414
2533
  label: e.title,
@@ -2422,22 +2541,22 @@ function Ct(e) {
2422
2541
  dataFormatId: "dtv",
2423
2542
  encodingId: e.encoding?.toLowerCase(),
2424
2543
  hasHeaders: a && o.length > 0,
2425
- valueDelimiterId: A.find(({ character: e }) => e === i)?.id
2544
+ valueDelimiterId: j.find(({ character: e }) => e === i)?.id
2426
2545
  }
2427
2546
  };
2428
2547
  }
2429
- function wt(e, t) {
2430
- let n = e == null ? void 0 : xt[e];
2548
+ function At(e, t) {
2549
+ let n = e == null ? void 0 : Dt[e];
2431
2550
  return n == null ? {
2432
2551
  dataSubtypeId: void 0,
2433
2552
  dataTypeId: void 0
2434
2553
  } : t == null || n.dataTypeId !== "string" ? n : {
2435
- dataSubtypeId: St[t] ?? "plain",
2554
+ dataSubtypeId: Ot[t] ?? "plain",
2436
2555
  dataTypeId: "string"
2437
2556
  };
2438
2557
  }
2439
2558
  // src/component/module/connector/index.ts
2440
- var Tt = [
2559
+ var jt = [
2441
2560
  {
2442
2561
  id: "application",
2443
2562
  label: {
@@ -2466,7 +2585,7 @@ var Tt = [
2466
2585
  es: "Almacén de Archivos"
2467
2586
  }
2468
2587
  }
2469
- ], Et = [
2588
+ ], Mt = [
2470
2589
  {
2471
2590
  id: "apiEndpoint",
2472
2591
  label: {
@@ -2488,7 +2607,7 @@ var Tt = [
2488
2607
  es: "Tabla"
2489
2608
  }
2490
2609
  }
2491
- ], Dt = {
2610
+ ], Nt = {
2492
2611
  auditObjectContent: "Audit Object Content",
2493
2612
  closeStore: "Close Store",
2494
2613
  createObject: "Create Object",
@@ -2498,7 +2617,9 @@ var Tt = [
2498
2617
  getInfo: "Get Info",
2499
2618
  getReadableStream: "Get Readable Stream",
2500
2619
  getRecord: "Get Record",
2620
+ indexObjectStructure: "Index Object Structure",
2501
2621
  listNodes: "List Nodes",
2622
+ listObjectStructureEntries: "List Object Structure Entries",
2502
2623
  loadObjectRecords: "Load Object Records",
2503
2624
  openStore: "Open Store",
2504
2625
  previewObject: "Preview Object",
@@ -2506,7 +2627,7 @@ var Tt = [
2506
2627
  removeRecords: "Remove Records",
2507
2628
  retrieveRecords: "Retrieve Records",
2508
2629
  upsertRecords: "Upsert Records"
2509
- }, Ot = [
2630
+ }, Pt = [
2510
2631
  {
2511
2632
  id: "bidirectional",
2512
2633
  label: {
@@ -2535,30 +2656,32 @@ var Tt = [
2535
2656
  es: "Desconocido"
2536
2657
  }
2537
2658
  }
2538
- ], kt = /* @__PURE__ */ new Set([
2659
+ ], Ft = /* @__PURE__ */ new Set([
2539
2660
  "createObject",
2540
2661
  "dropObject",
2541
2662
  "loadObjectRecords",
2542
2663
  "removeRecords",
2543
2664
  "upsertRecords"
2544
- ]), At = /* @__PURE__ */ new Set([
2665
+ ]), It = /* @__PURE__ */ new Set([
2545
2666
  "auditObjectContent",
2546
2667
  "findObject",
2547
2668
  "getInfo",
2548
2669
  "getReadableStream",
2549
2670
  "getRecord",
2671
+ "indexObjectStructure",
2550
2672
  "listNodes",
2673
+ "listObjectStructureEntries",
2551
2674
  "previewObject",
2552
2675
  "queryRecords",
2553
2676
  "retrieveRecords"
2554
2677
  ]);
2555
- function jt(e) {
2678
+ function Lt(e) {
2556
2679
  let t = !1, n = !1;
2557
- for (let r of e) At.has(r) && (t = !0), kt.has(r) && (n = !0);
2680
+ for (let r of e) It.has(r) && (t = !0), Ft.has(r) && (n = !0);
2558
2681
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
2559
2682
  }
2560
- var Mt = (e, t = "en") => {
2561
- let i = Tt.find((t) => t.id === e);
2683
+ var Rt = (e, t = "en") => {
2684
+ let i = jt.find((t) => t.id === e);
2562
2685
  return i ? {
2563
2686
  label: r(n(i.label), t) ?? i.id,
2564
2687
  description: ""
@@ -2566,8 +2689,8 @@ var Mt = (e, t = "en") => {
2566
2689
  label: e,
2567
2690
  description: ""
2568
2691
  };
2569
- }, Nt = (e, t = "en") => {
2570
- let i = Et.find((t) => t.id === e);
2692
+ }, zt = (e, t = "en") => {
2693
+ let i = Mt.find((t) => t.id === e);
2571
2694
  return i ? {
2572
2695
  label: r(n(i.label), t) ?? i.id,
2573
2696
  description: ""
@@ -2575,8 +2698,8 @@ var Mt = (e, t = "en") => {
2575
2698
  label: e,
2576
2699
  description: ""
2577
2700
  };
2578
- }, Pt = (e, t = "en") => {
2579
- let i = Ot.find((t) => t.id === e);
2701
+ }, Bt = (e, t = "en") => {
2702
+ let i = Pt.find((t) => t.id === e);
2580
2703
  return i ? {
2581
2704
  label: r(n(i.label), t) ?? i.id,
2582
2705
  description: ""
@@ -2585,36 +2708,36 @@ var Mt = (e, t = "en") => {
2585
2708
  description: ""
2586
2709
  };
2587
2710
  };
2588
- function Ft(e) {
2711
+ function Vt(e) {
2589
2712
  let t = new Set(e), n = "|Action|Supported|\n";
2590
2713
  n += "|:----|:-------:|\n";
2591
- for (let e of Object.keys(Dt)) n += `| ${Dt[e]} | ${t.has(e) ? "✓" : ""} |\n`;
2714
+ for (let e of Object.keys(Nt)) n += `| ${Nt[e]} | ${t.has(e) ? "✓" : ""} |\n`;
2592
2715
  return n;
2593
2716
  }
2594
2717
  // src/component/module/cookbook/cookbookConfig.schema.ts
2595
- var It = D(["list"]), Lt = /* @__PURE__ */ C({
2596
- ...j,
2718
+ var Ht = A(["list"]), Ut = /* @__PURE__ */ C({
2719
+ ...M,
2597
2720
  typeId: /* @__PURE__ */ _("cookbook"),
2598
- actionNames: /* @__PURE__ */ h(It),
2599
- recipes: /* @__PURE__ */ h(k)
2721
+ actionNames: /* @__PURE__ */ h(Ht),
2722
+ recipes: /* @__PURE__ */ h(oe)
2600
2723
  });
2601
2724
  // src/component/module/engine/index.ts
2602
- function Rt(e) {
2725
+ function Wt(e) {
2603
2726
  return e.signal ?? new AbortController().signal;
2604
2727
  }
2605
2728
  // src/component/module/presenter/presenterConfig.schema.ts
2606
- var zt = D([
2729
+ var Gt = A([
2607
2730
  "list",
2608
2731
  "render",
2609
2732
  "setColorMode"
2610
- ]), Bt = /* @__PURE__ */ C({
2611
- ...j,
2733
+ ]), Kt = /* @__PURE__ */ C({
2734
+ ...M,
2612
2735
  typeId: /* @__PURE__ */ _("presenter"),
2613
- actionNames: /* @__PURE__ */ h(zt),
2614
- presentations: /* @__PURE__ */ h(k)
2615
- }), Vt = "https://engine-eu.dpuse.app/presenters";
2616
- async function Ht(e, t, n, r) {
2617
- let i = e.id, a = `${Vt}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
2736
+ actionNames: /* @__PURE__ */ h(Gt),
2737
+ presentations: /* @__PURE__ */ h(oe)
2738
+ }), qt = "https://engine-eu.dpuse.app/presenters";
2739
+ async function Jt(e, t, n, r) {
2740
+ let i = e.id, a = `${qt}/${i.split("-").slice(2).join("-")}_v${e.version}/${i}.es.js`;
2618
2741
  try {
2619
2742
  return new (await (import(
2620
2743
  /* @vite-ignore */
@@ -2630,7 +2753,7 @@ async function Ht(e, t, n, r) {
2630
2753
  }
2631
2754
  }
2632
2755
  // src/locale/index.ts
2633
- function Ut(e, t) {
2756
+ function Yt(e, t) {
2634
2757
  return {
2635
2758
  ...e,
2636
2759
  label: e.label[t] ?? e.id,
@@ -2638,7 +2761,7 @@ function Ut(e, t) {
2638
2761
  verb: e.verb?.[t] ?? void 0
2639
2762
  };
2640
2763
  }
2641
- function Wt(e, t, n = !1) {
2764
+ function Xt(e, t, n = !1) {
2642
2765
  let r = e.map((e) => ({
2643
2766
  ...e,
2644
2767
  label: e.label[t] ?? e.id,
@@ -2647,7 +2770,7 @@ function Wt(e, t, n = !1) {
2647
2770
  }));
2648
2771
  return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
2649
2772
  }
2650
- function Gt(e, t) {
2773
+ function Zt(e, t) {
2651
2774
  return {
2652
2775
  ...e,
2653
2776
  label: e.label[t] ?? e.id,
@@ -2655,7 +2778,7 @@ function Gt(e, t) {
2655
2778
  };
2656
2779
  }
2657
2780
  // src/utilities/index.ts
2658
- var Kt = /* @__PURE__ */ new Map([
2781
+ var Qt = /* @__PURE__ */ new Map([
2659
2782
  ["arrow", "application/vnd.apache.arrow.file"],
2660
2783
  ["avro", "application/vnd.apache.avro"],
2661
2784
  ["bin", "application/octet-stream"],
@@ -2682,14 +2805,14 @@ var Kt = /* @__PURE__ */ new Map([
2682
2805
  ["minute", 6e4],
2683
2806
  ["second", 1e3],
2684
2807
  ["millisecond", 1]
2685
- ], qt = [
2808
+ ], $t = [
2686
2809
  ["byte", 1],
2687
2810
  ["kilobyte", 1024],
2688
2811
  ["megabyte", 1048576],
2689
2812
  ["gigabyte", 1073741824],
2690
2813
  ["terabyte", 1099511627776]
2691
- ], Jt = /* @__PURE__ */ new Map(), Yt = /* @__PURE__ */ new Map();
2692
- function Xt(e, t = 2, n = t, r = Z) {
2814
+ ], en = /* @__PURE__ */ new Map(), tn = /* @__PURE__ */ new Map();
2815
+ function nn(e, t = 2, n = t, r = Z) {
2693
2816
  return e == null ? "" : $(r, {
2694
2817
  localeMatcher: "best fit",
2695
2818
  maximumFractionDigits: t,
@@ -2699,18 +2822,18 @@ function Xt(e, t = 2, n = t, r = Z) {
2699
2822
  useGrouping: !0
2700
2823
  }).format(e);
2701
2824
  }
2702
- function Zt(e, t = Z) {
2703
- return Xt(e, 0, 0, t);
2825
+ function rn(e, t = Z) {
2826
+ return nn(e, 0, 0, t);
2704
2827
  }
2705
- function Qt(e, t = 1, n = Z) {
2828
+ function an(e, t = 1, n = Z) {
2706
2829
  return e == null || !Number.isFinite(e) ? "" : $(n, {
2707
2830
  maximumFractionDigits: t,
2708
2831
  notation: "compact"
2709
2832
  }).format(e);
2710
2833
  }
2711
- function $t(e, t = 1, n = Z) {
2834
+ function on(e, t = 1, n = Z) {
2712
2835
  if (e == null || !Number.isFinite(e)) return "";
2713
- let [r, i] = qt.find(([, n]) => ln(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["terabyte", 1099511627776];
2836
+ let [r, i] = $t.find(([, n]) => hn(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["terabyte", 1099511627776];
2714
2837
  return $(n, {
2715
2838
  maximumFractionDigits: i === 1 ? 0 : t,
2716
2839
  style: "unit",
@@ -2718,7 +2841,7 @@ function $t(e, t = 1, n = Z) {
2718
2841
  unitDisplay: i === 1 ? "long" : "short"
2719
2842
  }).format(e / i);
2720
2843
  }
2721
- function en(e, t = "millisecond", n = Z) {
2844
+ function sn(e, t = "millisecond", n = Z) {
2722
2845
  if (e == null || !Number.isFinite(e)) return "";
2723
2846
  let r = Math.round(Math.abs(e)), i = Q.findIndex(([, e]) => r >= e), a = i === -1 ? Q.length - 1 : i, o = Q.findIndex(([e]) => e === t), s = Q.slice(a, Math.max(o, a) + 1), c = [];
2724
2847
  for (let [t, i] of s) {
@@ -2732,25 +2855,25 @@ function en(e, t = "millisecond", n = Z) {
2732
2855
  unitDisplay: "short"
2733
2856
  }).format(o));
2734
2857
  }
2735
- return cn(n).format(c);
2858
+ return mn(n).format(c);
2736
2859
  }
2737
- function tn(e) {
2860
+ function cn(e) {
2738
2861
  if (!e) return;
2739
- let t = sn(e);
2862
+ let t = pn(e);
2740
2863
  return t === void 0 ? e : e.slice(0, t);
2741
2864
  }
2742
- function nn(e) {
2865
+ function ln(e) {
2743
2866
  if (!e) return;
2744
- let t = sn(e);
2867
+ let t = pn(e);
2745
2868
  return t === void 0 ? void 0 : e.slice(t + 1);
2746
2869
  }
2747
- function rn(e) {
2748
- return e != null && Kt.has(e.toLowerCase());
2870
+ function un(e) {
2871
+ return e != null && Qt.has(e.toLowerCase());
2749
2872
  }
2750
- function an(e) {
2751
- return (e == null ? void 0 : Kt.get(e.toLowerCase())) ?? "application/octet-stream";
2873
+ function dn(e) {
2874
+ return (e == null ? void 0 : Qt.get(e.toLowerCase())) ?? "application/octet-stream";
2752
2875
  }
2753
- function on(e) {
2876
+ function fn(e) {
2754
2877
  switch (e) {
2755
2878
  case "Edm.Boolean": return "boolean";
2756
2879
  case "Edm.Byte":
@@ -2771,23 +2894,23 @@ function on(e) {
2771
2894
  default: return "unknown";
2772
2895
  }
2773
2896
  }
2774
- function sn(e) {
2897
+ function pn(e) {
2775
2898
  let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
2776
2899
  return n > t && n < e.length - 1 ? n : void 0;
2777
2900
  }
2778
- function cn(e) {
2779
- let t = Jt.get(e);
2901
+ function mn(e) {
2902
+ let t = en.get(e);
2780
2903
  return t || (t = new Intl.ListFormat(e, {
2781
2904
  style: "narrow",
2782
2905
  type: "unit"
2783
- }), Jt.set(e, t)), t;
2906
+ }), en.set(e, t)), t;
2784
2907
  }
2785
2908
  function $(e, t) {
2786
- let n = `${e}|${JSON.stringify(t)}`, r = Yt.get(n);
2787
- return r || (r = new Intl.NumberFormat(e, t), Yt.set(n, r)), r;
2909
+ let n = `${e}|${JSON.stringify(t)}`, r = tn.get(n);
2910
+ return r || (r = new Intl.NumberFormat(e, t), tn.set(n, r)), r;
2788
2911
  }
2789
- function ln(e, t) {
2912
+ function hn(e, t) {
2790
2913
  let n = 10 ** t;
2791
2914
  return Math.round(e * n) / n;
2792
2915
  }
2793
- export { I as APIError, F as AppError, Fe as ConnectorError, fe as DATA_FORMAT_CONFIGS, pe as DATA_TYPE_CONFIGS, me as DECIMAL_SEPARATOR_IDS, e as DEFAULT_LOCALE_ID, Ee as ENCODING_GROUP_CONFIG_MAP, M as ENCODING_TYPE_CONFIG_MAP, L as EngineError, R as FetchError, t as SUPPORTED_LANGUAGES, U as TOOL_NAME_PREFIX, A as VALUE_DELIMITER_CONFIGS, vt as acquireWebLock, st as auditObjectContentWithParser, Ie as buildFetchError, at as buildPreviewObjectResult, le as componentInstanceConfigSchema, Le as concatenateSerialisedErrorMessages, Ce as connectorConfigSchema, Mt as constructConnectorCategoryConfig, Nt as constructConnectorItemTypeConfig, Pt as constructConnectorUsageConfig, on as convertODataTypeIdToUsageTypeId, gt as convertStoreRecordToParsedRecord, _t as convertStoreValueToText, Lt as cookbookConfigSchema, n as createLabelMap, jt as determineConnectorUsageId, nn as extractExtensionFromPath, tn as extractPathWithoutExtension, Xt as formatNumberAsDecimalNumber, en as formatNumberAsDuration, Qt as formatNumberAsSize, $t as formatNumberAsStorageSize, Zt as formatNumberAsWholeNumber, de as getComponentStatus, Ft as getConnectorActionsTable, ke as getEncodingTypeConfigs, he as getValueDelimiterCharacter, rn as hasMimeTypeForExtension, Re as ignoreErrors, De as isEncodingTypeId, W as listParserToolConfigs, Ht as loadPresenter, K as loadTool, Ut as localiseConfig, Wt as localiseConfigs, Gt as localiseReference, an as lookupMimeTypeForExtension, z as normalizeToError, Ye as parseDelimitedText, Bt as presenterConfigSchema, Ct as readTableSchema, Oe as resolveDecoderId, r as resolveLabel, G as resolveParserToolConfig, Rt as resolveRequestSignal, ht as resolveStorePath, ot as retrieveRecordsWithParser, ze as serialiseError, Je as toolConfigSchema, Be as unserialiseError };
2916
+ export { De as APIError, F as AppError, ke as ConnectorError, de as DATA_FORMAT_CONFIGS, fe as DATA_TYPE_CONFIGS, pe as DECIMAL_SEPARATOR_IDS, e as DEFAULT_LOCALE_ID, He as ENCODING_GROUP_CONFIG_MAP, B as ENCODING_TYPE_CONFIG_MAP, Oe as EngineError, I as FetchError, t as SUPPORTED_LANGUAGES, H as TOOL_NAME_PREFIX, j as VALUE_DELIMITER_CONFIGS, wt as acquireWebLock, lt as auditObjectContentWithParser, Ae as buildFetchError, st as buildPreviewObjectResult, ce as componentInstanceConfigSchema, je as concatenateSerialisedErrorMessages, Se as connectorConfigSchema, Rt as constructConnectorCategoryConfig, zt as constructConnectorItemTypeConfig, Bt as constructConnectorUsageConfig, fn as convertODataTypeIdToUsageTypeId, St as convertStoreRecordToParsedRecord, Ct as convertStoreValueToText, Ut as cookbookConfigSchema, n as createLabelMap, Lt as determineConnectorUsageId, ln as extractExtensionFromPath, cn as extractPathWithoutExtension, nn as formatNumberAsDecimalNumber, sn as formatNumberAsDuration, an as formatNumberAsSize, on as formatNumberAsStorageSize, rn as formatNumberAsWholeNumber, ue as getComponentStatus, Vt as getConnectorActionsTable, Ge as getEncodingTypeConfigs, me as getValueDelimiterCharacter, un as hasMimeTypeForExtension, Me as ignoreErrors, ut as indexObjectStructureWithParser, Ue as isEncodingTypeId, dt as listObjectStructureEntriesWithParser, U as listParserToolConfigs, Jt as loadPresenter, rt as loadTool, Yt as localiseConfig, Xt as localiseConfigs, Zt as localiseReference, dn as lookupMimeTypeForExtension, L as normalizeToError, Xe as parseDelimitedText, Kt as presenterConfigSchema, kt as readTableSchema, We as resolveDecoderId, r as resolveLabel, W as resolveParserToolConfig, Wt as resolveRequestSignal, xt as resolveStorePath, ct as retrieveRecordsWithParser, Ne as serialiseError, Ye as toolConfigSchema, Pe as unserialiseError };