@septkit/ui 0.0.92 → 0.0.94

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.
Files changed (27) hide show
  1. package/dist/context-menu/context-menu.vue_vue_type_script_setup_true_lang.js +41 -25
  2. package/dist/dialecte/create-document-store.js +4 -4
  3. package/dist/explorer/explorer-search.js +2 -1
  4. package/dist/explorer/explorer.js +1 -1
  5. package/dist/explorer/explorer.vue_vue_type_script_setup_true_lang.js +123 -112
  6. package/dist/external/.pnpm/{@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/dialecte-DHj8__Ch.js → @dialecte_core@0.14.0/node_modules/@dialecte/core/dist/dialecte-BEbOM6IE.js} +1808 -1564
  7. package/dist/external/.pnpm/{@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/helpers-Bfv2XDC-.js → @dialecte_core@0.14.0/node_modules/@dialecte/core/dist/helpers-v10NItuU.js} +82 -82
  8. package/dist/external/.pnpm/@dialecte_core@0.14.0/node_modules/@dialecte/core/dist/index.js +6 -0
  9. package/dist/external/.pnpm/{@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/open-connections-ClJo0-Af.js → @dialecte_core@0.14.0/node_modules/@dialecte/core/dist/open-connections-CWORY1A2.js} +2 -2
  10. package/dist/external/.pnpm/{@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/project-key-DD8DyQ8-.js → @dialecte_core@0.14.0/node_modules/@dialecte/core/dist/project-key-WGrHzudb.js} +199 -199
  11. package/dist/external/.pnpm/{@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/qname-definition-C6GUFWL8.js → @dialecte_core@0.14.0/node_modules/@dialecte/core/dist/qname-definition-Cnw9CbiG.js} +8 -8
  12. package/dist/external/.pnpm/{@dialecte_core@0.12.1 → @dialecte_core@0.14.0}/node_modules/@dialecte/core/dist/rolldown-runtime-CYdcPHCu.js +1 -1
  13. package/dist/external/.pnpm/{@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/same-json-value-DTtSsGUF.js → @dialecte_core@0.14.0/node_modules/@dialecte/core/dist/same-json-value-Co-vqEAg.js} +66 -66
  14. package/dist/external/.pnpm/{@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/utils-Q5zsKl3Y.js → @dialecte_core@0.14.0/node_modules/@dialecte/core/dist/utils-9L5_yIvs.js} +2 -2
  15. package/dist/external/.pnpm/@dialecte_core@0.14.0/node_modules/@dialecte/core/dist/utils.js +2 -0
  16. package/dist/index.d.ts +25 -12
  17. package/dist/tree/collect-expandable-node-ids.js +8 -10
  18. package/dist/tree/flatten-tree.js +25 -24
  19. package/dist/tree/has-children.js +6 -0
  20. package/dist/tree/tree-index.js +21 -23
  21. package/dist/tree/tree.js +1 -1
  22. package/dist/tree/tree.vue_vue_type_script_setup_true_lang.js +37 -38
  23. package/dist/tree/use-tree-virtualization.js +54 -34
  24. package/dist/ui.css +1 -1
  25. package/package.json +3 -3
  26. package/dist/external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/index.js +0 -6
  27. package/dist/external/.pnpm/@dialecte_core@0.12.1/node_modules/@dialecte/core/dist/utils.js +0 -2
@@ -1,6 +1,6 @@
1
- import { C as e, E as t, K as n, M as r, N as i, Q as a, Z as o, _ as s, a as c, b as l, et as u, f as d, h as f, j as p, rt as m, st as h, tt as g } from "./utils-Q5zsKl3Y.js";
2
- import { n as _, r as v } from "./qname-definition-C6GUFWL8.js";
3
- //#region node_modules/.pnpm/@dialecte+core@0.12.1/node_modules/@dialecte/core/dist/project-key-DD8DyQ8-.js
1
+ import { $ as e, D as t, M as n, N as r, P as i, Q as a, ct as o, g as s, it as c, nt as l, o as u, p as d, q as f, tt as p, v as m, w as h, x as g } from "./utils-9L5_yIvs.js";
2
+ import { n as _, r as v } from "./qname-definition-Cnw9CbiG.js";
3
+ //#region node_modules/.pnpm/@dialecte+core@0.14.0/node_modules/@dialecte/core/dist/project-key-WGrHzudb.js
4
4
  var ee = {
5
5
  bigint: "a BigInt",
6
6
  function: "a function",
@@ -8,21 +8,21 @@ var ee = {
8
8
  }, y = "not well-formed UTF-16 (a lone surrogate)", te = `text that is ${y}`, b = `a key that is ${y}`;
9
9
  function ne(e) {
10
10
  let { documentId: t } = e;
11
- h("STORE_DUPLICATE_ID", {
11
+ o("STORE_DUPLICATE_ID", {
12
12
  detail: `Document "${t}" is already registered`,
13
13
  meta: { documentId: t }
14
14
  });
15
15
  }
16
16
  function re(e) {
17
17
  let { path: t, reason: n } = e;
18
- h("DOCUMENT_PATH_INVALID", {
18
+ o("DOCUMENT_PATH_INVALID", {
19
19
  detail: `The document path ${JSON.stringify(t)} is refused: ${n}`,
20
20
  meta: { path: t }
21
21
  });
22
22
  }
23
23
  function ie(e) {
24
24
  let { documentId: t, path: n, takenBy: r } = e;
25
- h("DOCUMENT_PATH_TAKEN", {
25
+ o("DOCUMENT_PATH_TAKEN", {
26
26
  detail: `Document "${t}" cannot take the path "${n}": document "${r}" holds that place`,
27
27
  meta: {
28
28
  documentId: t,
@@ -33,14 +33,14 @@ function ie(e) {
33
33
  }
34
34
  function ae(e) {
35
35
  let { documentId: t, what: n } = e;
36
- h("DOCUMENT_NOT_REGISTERED", {
36
+ o("DOCUMENT_NOT_REGISTERED", {
37
37
  detail: `Cannot write ${n} to document "${t}": it is not registered`,
38
38
  meta: { documentId: t }
39
39
  });
40
40
  }
41
41
  function oe(e) {
42
42
  let { documentId: t, recordId: n } = e;
43
- h("STORE_RECORD_NOT_FOUND", {
43
+ o("STORE_RECORD_NOT_FOUND", {
44
44
  detail: `Record "${n}" is not in document "${t}": nothing to update`,
45
45
  meta: {
46
46
  documentId: t,
@@ -50,7 +50,7 @@ function oe(e) {
50
50
  }
51
51
  function se(e) {
52
52
  let { documentId: t, held: n, repeated: r, cause: i } = e;
53
- h("STORE_DUPLICATE_ID", {
53
+ o("STORE_DUPLICATE_ID", {
54
54
  detail: `Document "${t}" refuses ids to create - ${[n.length > 0 ? `already holds: ${x(n).join(", ")}` : void 0, r.length > 0 ? `given twice: ${x(r).join(", ")}` : void 0].filter((e) => e !== void 0).join("; ")}`,
55
55
  meta: {
56
56
  documentId: t,
@@ -64,7 +64,7 @@ function x(e) {
64
64
  }
65
65
  function ce(e) {
66
66
  let { storeName: t, connections: n } = e;
67
- h("PROJECT_OPEN_ELSEWHERE", {
67
+ o("PROJECT_OPEN_ELSEWHERE", {
68
68
  detail: `Project "${t}" cannot be destroyed while another connection has it open: close that one first`,
69
69
  meta: {
70
70
  project: t,
@@ -74,7 +74,7 @@ function ce(e) {
74
74
  }
75
75
  function le(e) {
76
76
  let { storeName: t } = e;
77
- h("STORE_CLOSED", {
77
+ o("STORE_CLOSED", {
78
78
  detail: `Store "${t}" is closed: open it again before using it`,
79
79
  meta: { storeName: t }
80
80
  });
@@ -95,7 +95,7 @@ function fe() {
95
95
  }
96
96
  function pe(e) {
97
97
  let { field: t, value: n } = e;
98
- n ?? h("STORE_VALUE_NOT_JSON", { detail: `The ${t} is missing` }), typeof n != "string" && h("STORE_VALUE_NOT_JSON", { detail: `The ${t} is not text` }), ue({ value: { [t]: n } });
98
+ n ?? o("STORE_VALUE_NOT_JSON", { detail: `The ${t} is missing` }), typeof n != "string" && o("STORE_VALUE_NOT_JSON", { detail: `The ${t} is not text` }), ue({ value: { [t]: n } });
99
99
  }
100
100
  function me(e) {
101
101
  return he({ walk: function() {
@@ -112,7 +112,7 @@ function he(e) {
112
112
  return e.walk();
113
113
  } catch (e) {
114
114
  let t = e instanceof Error ? e : void 0;
115
- h("STORE_VALUE_NOT_JSON", {
115
+ o("STORE_VALUE_NOT_JSON", {
116
116
  detail: t?.message ?? String(e),
117
117
  cause: t
118
118
  });
@@ -320,7 +320,7 @@ function De(e) {
320
320
  }
321
321
  function Oe(e) {
322
322
  let { project: t, dialecteId: n } = e;
323
- (Te.includes(t) || n !== void 0 && Te.includes(n)) && h("PROJECT_NAME_INVALID", {
323
+ (Te.includes(t) || n !== void 0 && Te.includes(n)) && o("PROJECT_NAME_INVALID", {
324
324
  detail: `A project cannot be named ${JSON.stringify(t)}${n === void 0 ? "" : ` in dialecte ${JSON.stringify(n)}`}: neither its name nor its dialecte's id may be empty, \`.\` or \`..\``,
325
325
  meta: {
326
326
  project: t,
@@ -488,7 +488,7 @@ function Ne(e) {
488
488
  return t.tagName === n.rootElementName && t.parent === null;
489
489
  }
490
490
  var Pe = "_temp-idb-id", Fe = {
491
- namespaceURI: n,
491
+ namespaceURI: f,
492
492
  prefix: null,
493
493
  localName: "xmlns",
494
494
  value: ""
@@ -707,16 +707,16 @@ function H(e) {
707
707
  });
708
708
  }
709
709
  function nt(e) {
710
- let { config: t, rootUri: n } = e, r = Object.values(t.namespaces).map((e) => e.prefix).filter((e) => e !== ""), i = !r.includes("xs"), a = /* @__PURE__ */ new Set([
710
+ let { config: t, rootUri: n } = e, r = Object.values(t.namespaces).map((e) => e.prefix).filter((e) => e !== ""), i = !r.includes("xs"), o = /* @__PURE__ */ new Set([
711
711
  ...r,
712
- o.prefix,
712
+ a.prefix,
713
713
  "xml",
714
714
  "xmlns"
715
715
  ]);
716
- return i && a.add("xs"), {
716
+ return i && o.add("xs"), {
717
717
  bindings: /* @__PURE__ */ new Map(),
718
718
  prefixByUri: /* @__PURE__ */ new Map(),
719
- reserved: a,
719
+ reserved: o,
720
720
  xsdTakesXs: i,
721
721
  nextGenerated: 1,
722
722
  defaultOnRoot: n !== "",
@@ -777,24 +777,24 @@ function W(e) {
777
777
  };
778
778
  }
779
779
  function rt(e) {
780
- let { table: t, config: n } = e, { prefixByUri: r } = t, i = t.bindings.get(""), a = [];
781
- i && a.push(K({
780
+ let { table: t, config: n } = e, { prefixByUri: r } = t, i = t.bindings.get(""), o = [];
781
+ i && o.push(K({
782
782
  uri: i,
783
783
  prefix: ""
784
- })), t.alias !== void 0 && a.push(K({
784
+ })), t.alias !== void 0 && o.push(K({
785
785
  uri: n.namespaces.default.uri,
786
786
  prefix: t.alias
787
787
  }));
788
788
  let s = [];
789
- r.has(o.uri) && s.push(o.uri);
789
+ r.has(a.uri) && s.push(a.uri);
790
790
  let c = /* @__PURE__ */ new Set();
791
- for (let e of Object.values(n.namespaces)) c.add(e.uri), e.uri !== n.namespaces.default.uri && e.uri !== o.uri && r.has(e.uri) && !s.includes(e.uri) && s.push(e.uri);
792
- let l = [...r.keys()].filter((e) => e !== i && e !== o.uri && !c.has(e)).sort(ct);
793
- for (let e of [...s, ...l]) a.push(K({
791
+ for (let e of Object.values(n.namespaces)) c.add(e.uri), e.uri !== n.namespaces.default.uri && e.uri !== a.uri && r.has(e.uri) && !s.includes(e.uri) && s.push(e.uri);
792
+ let l = [...r.keys()].filter((e) => e !== i && e !== a.uri && !c.has(e)).sort(ct);
793
+ for (let e of [...s, ...l]) o.push(K({
794
794
  uri: e,
795
795
  prefix: r.get(e) ?? ""
796
796
  }));
797
- return a;
797
+ return o;
798
798
  }
799
799
  function it(e) {
800
800
  let { table: t, config: n, documentRoot: r, element: i } = e;
@@ -815,27 +815,27 @@ function it(e) {
815
815
  return a.attributes.slice(i.attributes.length);
816
816
  }
817
817
  function at(e) {
818
- let { table: t, config: n, uri: r, storedPrefix: i } = e, a = t.nextGenerated;
818
+ let { table: t, config: n, uri: r, storedPrefix: i } = e, o = t.nextGenerated;
819
819
  if (r === n.namespaces.default.uri) return {
820
820
  prefix: "",
821
- nextGenerated: a
821
+ nextGenerated: o
822
822
  };
823
823
  let s = Object.values(n.namespaces).find((e) => e.uri === r && e.prefix !== "");
824
824
  return s ? {
825
825
  prefix: s.prefix,
826
- nextGenerated: a
827
- } : r === o.uri ? {
828
- prefix: o.prefix,
829
- nextGenerated: a
826
+ nextGenerated: o
827
+ } : r === a.uri ? {
828
+ prefix: a.prefix,
829
+ nextGenerated: o
830
830
  } : r === "http://www.w3.org/2001/XMLSchema" && t.xsdTakesXs ? {
831
831
  prefix: "xs",
832
- nextGenerated: a
832
+ nextGenerated: o
833
833
  } : i ? {
834
834
  prefix: ot({
835
835
  table: t,
836
836
  storedPrefix: i
837
837
  }),
838
- nextGenerated: a
838
+ nextGenerated: o
839
839
  } : st({ table: t });
840
840
  }
841
841
  function ot(e) {
@@ -870,14 +870,14 @@ function G(e) {
870
870
  return !t.reserved.has(n) && !t.bindings.has(n);
871
871
  }
872
872
  function K(e) {
873
- let { uri: t, prefix: r } = e;
874
- return r ? {
875
- namespaceURI: n,
873
+ let { uri: t, prefix: n } = e;
874
+ return n ? {
875
+ namespaceURI: f,
876
876
  prefix: "xmlns",
877
- localName: r,
877
+ localName: n,
878
878
  value: t
879
879
  } : {
880
- namespaceURI: n,
880
+ namespaceURI: f,
881
881
  prefix: null,
882
882
  localName: "xmlns",
883
883
  value: t
@@ -886,47 +886,47 @@ function K(e) {
886
886
  function ct(e, t) {
887
887
  return e === t ? 0 : e < t ? -1 : 1;
888
888
  }
889
- function lt(t) {
890
- let { config: n, element: r, namespace: i, rootRecord: a } = t, o = e({
891
- dialecteConfig: n,
892
- record: a
893
- })?.attributes.details ?? {}, c = i.uri === n.namespaces.default.uri;
894
- for (let [e, t] of Object.entries(o)) {
895
- let o = l({
896
- dialecteConfig: n,
897
- record: a,
889
+ function lt(e) {
890
+ let { config: t, element: n, namespace: r, rootRecord: i } = e, a = h({
891
+ dialecteConfig: t,
892
+ record: i
893
+ })?.attributes.details ?? {}, o = r.uri === t.namespaces.default.uri;
894
+ for (let [e, s] of Object.entries(a)) {
895
+ let a = g({
896
+ dialecteConfig: t,
897
+ record: i,
898
898
  attributeName: e,
899
899
  defaults: "required"
900
900
  });
901
- if (o === void 0 || !(c ? !t.namespace : t.namespace?.prefix === i.prefix && t.namespace?.uri === i.uri)) continue;
902
- let u = s(e);
903
- (t.namespace ? P({
904
- element: r,
905
- namespaceURI: t.namespace.uri,
906
- localName: u
901
+ if (a === void 0 || !(o ? !s.namespace : s.namespace?.prefix === r.prefix && s.namespace?.uri === r.uri)) continue;
902
+ let c = m(e);
903
+ (s.namespace ? P({
904
+ element: n,
905
+ namespaceURI: s.namespace.uri,
906
+ localName: c
907
907
  }) : N({
908
- element: r,
909
- qualifiedName: u
910
- })) || (t.namespace ? M({
911
- element: r,
912
- namespaceURI: t.namespace.uri,
913
- qualifiedName: `${t.namespace.prefix}:${u}`,
914
- value: o
908
+ element: n,
909
+ qualifiedName: c
910
+ })) || (s.namespace ? M({
911
+ element: n,
912
+ namespaceURI: s.namespace.uri,
913
+ qualifiedName: `${s.namespace.prefix}:${c}`,
914
+ value: a
915
915
  }) : j({
916
- element: r,
917
- qualifiedName: u,
918
- value: o
916
+ element: n,
917
+ qualifiedName: c,
918
+ value: a
919
919
  }));
920
920
  }
921
921
  }
922
922
  function ut(e) {
923
- let { settings: t, table: n, record: r, parent: i } = e, { config: a, declareNamespaces: o, withDatabaseIds: s } = t, c = o && g({
923
+ let { settings: t, table: n, record: r, parent: i } = e, { config: a, declareNamespaces: o, withDatabaseIds: s } = t, c = o && l({
924
924
  dialecteConfig: a,
925
925
  tagName: r.tagName
926
- }), l = o && i !== void 0, u = l || c ? v({
926
+ }), u = o && i !== void 0, d = u || c ? v({
927
927
  dialecteConfig: a,
928
928
  record: r
929
- }) : void 0, d = dt({
929
+ }) : void 0, f = dt({
930
930
  settings: t,
931
931
  table: n,
932
932
  record: r,
@@ -934,42 +934,42 @@ function ut(e) {
934
934
  holdsNoNamespaceName: o && bt({
935
935
  config: a,
936
936
  record: r,
937
- definition: u
937
+ definition: d
938
938
  })
939
- }), { element: f } = d, p = pt({
939
+ }), { element: p } = f, m = pt({
940
940
  settings: t,
941
- table: d.table,
942
- element: f,
941
+ table: f.table,
942
+ element: p,
943
943
  attributes: r.attributes
944
- }), m = r.value;
945
- if (u !== void 0 && c) {
944
+ }), h = r.value;
945
+ if (d !== void 0 && c) {
946
946
  let e = _t({
947
947
  settings: t,
948
- table: p,
949
- element: f,
948
+ table: m,
949
+ element: p,
950
950
  record: r,
951
- definition: u
951
+ definition: d
952
952
  });
953
- p = e.table, m = e.text;
953
+ m = e.table, h = e.text;
954
954
  }
955
- return u !== void 0 && l && (p = ht({
955
+ return d !== void 0 && u && (m = ht({
956
956
  settings: t,
957
- table: p,
958
- element: f,
957
+ table: m,
958
+ element: p,
959
959
  record: r,
960
- definition: u
960
+ definition: d
961
961
  })), s && j({
962
- element: f,
962
+ element: p,
963
963
  qualifiedName: "_temp-idb-id",
964
964
  value: r.id
965
- }), o && (p = gt({
965
+ }), o && (m = gt({
966
966
  settings: t,
967
- table: p,
968
- element: f
967
+ table: m,
968
+ element: p
969
969
  })), {
970
- element: f,
971
- table: p,
972
- text: m
970
+ element: p,
971
+ table: m,
972
+ text: h
973
973
  };
974
974
  }
975
975
  function dt(e) {
@@ -1038,7 +1038,7 @@ function pt(e) {
1038
1038
  });
1039
1039
  continue;
1040
1040
  }
1041
- let a = s(e.name);
1041
+ let a = m(e.name);
1042
1042
  t.declareNamespaces ? i = mt({
1043
1043
  settings: t,
1044
1044
  table: i,
@@ -1080,61 +1080,61 @@ function mt(e) {
1080
1080
  }
1081
1081
  function ht(e) {
1082
1082
  let { settings: t, element: n, record: r, definition: i } = e, { config: a } = t, { table: o } = e;
1083
- for (let [e, c] of Object.entries(i.attributes.details)) {
1084
- let i = l({
1083
+ for (let [e, s] of Object.entries(i.attributes.details)) {
1084
+ let i = g({
1085
1085
  dialecteConfig: a,
1086
1086
  record: r,
1087
1087
  attributeName: e,
1088
1088
  defaults: "required"
1089
1089
  });
1090
1090
  if (i === void 0) continue;
1091
- let u = s(e);
1092
- (c.namespace ? P({
1091
+ let c = m(e);
1092
+ (s.namespace ? P({
1093
1093
  element: n,
1094
- namespaceURI: c.namespace.uri,
1095
- localName: u
1094
+ namespaceURI: s.namespace.uri,
1095
+ localName: c
1096
1096
  }) : N({
1097
1097
  element: n,
1098
- qualifiedName: u
1099
- })) || (c.namespace && c.namespace.prefix ? o = mt({
1098
+ qualifiedName: c
1099
+ })) || (s.namespace && s.namespace.prefix ? o = mt({
1100
1100
  settings: t,
1101
1101
  table: o,
1102
1102
  element: n,
1103
- namespace: c.namespace,
1104
- localName: u,
1103
+ namespace: s.namespace,
1104
+ localName: c,
1105
1105
  value: i
1106
1106
  }) : j({
1107
1107
  element: n,
1108
- qualifiedName: u,
1108
+ qualifiedName: c,
1109
1109
  value: i
1110
1110
  }));
1111
1111
  }
1112
1112
  return o;
1113
1113
  }
1114
1114
  function gt(e) {
1115
- let { settings: t, table: n, element: r } = e, { config: i } = t, a = qe({
1115
+ let { settings: t, table: n, element: r } = e, { config: i } = t, o = qe({
1116
1116
  element: r,
1117
- namespaceURI: o.uri,
1117
+ namespaceURI: a.uri,
1118
1118
  localName: "type"
1119
1119
  });
1120
- if (a === null) return n;
1120
+ if (o === null) return n;
1121
1121
  let s = vt({
1122
1122
  settings: t,
1123
1123
  table: n,
1124
1124
  element: r,
1125
- value: a,
1125
+ value: o,
1126
1126
  notation: !1
1127
1127
  });
1128
1128
  if (s === void 0) return n;
1129
1129
  let c = U({
1130
1130
  table: s.table,
1131
1131
  config: i,
1132
- uri: o.uri,
1133
- storedPrefix: o.prefix
1132
+ uri: a.uri,
1133
+ storedPrefix: a.prefix
1134
1134
  });
1135
1135
  return M({
1136
1136
  element: r,
1137
- namespaceURI: o.uri,
1137
+ namespaceURI: a.uri,
1138
1138
  qualifiedName: `${c.prefix}:type`,
1139
1139
  value: s.value
1140
1140
  }), c.table;
@@ -1146,7 +1146,7 @@ function _t(e) {
1146
1146
  definition: i,
1147
1147
  attribute: e
1148
1148
  });
1149
- if (r === void 0 || !m(r)) continue;
1149
+ if (r === void 0 || !c(r)) continue;
1150
1150
  let o = q({
1151
1151
  settings: t,
1152
1152
  table: a,
@@ -1157,7 +1157,7 @@ function _t(e) {
1157
1157
  a = o.table, St(e) && e.namespace.prefix ? M({
1158
1158
  element: n,
1159
1159
  namespaceURI: e.namespace.uri,
1160
- qualifiedName: s(e.name),
1160
+ qualifiedName: m(e.name),
1161
1161
  value: o.value
1162
1162
  }) : j({
1163
1163
  element: n,
@@ -1166,11 +1166,11 @@ function _t(e) {
1166
1166
  });
1167
1167
  }
1168
1168
  let o = i.textContent?.type;
1169
- if (o === void 0 || !m(o) || r.value === "") return {
1169
+ if (o === void 0 || !c(o) || r.value === "") return {
1170
1170
  table: a,
1171
1171
  text: r.value
1172
1172
  };
1173
- let c = q({
1173
+ let s = q({
1174
1174
  settings: t,
1175
1175
  table: a,
1176
1176
  element: n,
@@ -1178,70 +1178,70 @@ function _t(e) {
1178
1178
  value: r.value
1179
1179
  });
1180
1180
  return {
1181
- table: c.table,
1182
- text: c.value
1181
+ table: s.table,
1182
+ text: s.value
1183
1183
  };
1184
1184
  }
1185
1185
  function q(e) {
1186
- let { settings: t, element: n, value: a } = e, { table: o } = e, s = r({
1186
+ let { settings: t, element: a, value: o } = e, { table: s } = e, c = r({
1187
1187
  type: e.type,
1188
- value: a,
1188
+ value: o,
1189
1189
  namespaceOf: i({ dialecteConfig: t.config })
1190
1190
  });
1191
- if (s === void 0) return {
1192
- table: o,
1193
- value: a
1191
+ if (c === void 0) return {
1192
+ table: s,
1193
+ value: o
1194
1194
  };
1195
- if ("builtin" in s) {
1196
- let e = s.builtin === "NOTATION";
1195
+ if ("builtin" in c) {
1196
+ let e = c.builtin === "NOTATION";
1197
1197
  return vt({
1198
1198
  settings: t,
1199
- table: o,
1200
- element: n,
1201
- value: a,
1199
+ table: s,
1200
+ element: a,
1201
+ value: o,
1202
1202
  notation: e
1203
1203
  }) ?? {
1204
- table: o,
1205
- value: a
1204
+ table: s,
1205
+ value: o
1206
1206
  };
1207
1207
  }
1208
- let c = [];
1209
- for (let e of p(a)) {
1210
- let r = q({
1208
+ let l = [];
1209
+ for (let e of n(o)) {
1210
+ let n = q({
1211
1211
  settings: t,
1212
- table: o,
1213
- element: n,
1214
- type: s.list,
1212
+ table: s,
1213
+ element: a,
1214
+ type: c.list,
1215
1215
  value: e
1216
1216
  });
1217
- o = r.table, c.push(r.value);
1217
+ s = n.table, l.push(n.value);
1218
1218
  }
1219
1219
  return {
1220
- table: o,
1221
- value: c.join(" ")
1220
+ table: s,
1221
+ value: l.join(" ")
1222
1222
  };
1223
1223
  }
1224
- function vt(e) {
1225
- let { settings: t, table: n, element: r, value: o, notation: s } = e, c = a({
1224
+ function vt(t) {
1225
+ let { settings: n, table: r, element: a, value: o, notation: s } = t, c = e({
1226
1226
  value: o,
1227
- namespaceOf: i({ dialecteConfig: t.config })
1227
+ namespaceOf: i({ dialecteConfig: n.config })
1228
1228
  });
1229
1229
  if (c === void 0) return;
1230
1230
  if (c.namespace === "") return F({
1231
- element: r,
1231
+ element: a,
1232
1232
  prefix: null
1233
1233
  }) ? void 0 : {
1234
- table: n,
1234
+ table: r,
1235
1235
  value: c.local
1236
1236
  };
1237
1237
  let l = xt({
1238
- settings: t,
1239
- table: n,
1240
- element: r,
1238
+ settings: n,
1239
+ table: r,
1240
+ element: a,
1241
1241
  uri: c.namespace
1242
1242
  }), u = s && l.prefix === "" && c.namespace !== "" ? W({
1243
1243
  table: l.table,
1244
- config: t.config,
1244
+ config: n.config,
1245
1245
  storedPrefix: void 0
1246
1246
  }) : l;
1247
1247
  return {
@@ -1254,7 +1254,7 @@ function yt(e) {
1254
1254
  return i ? n.namespace.uri === r.namespaces.default.uri ? bt({
1255
1255
  config: r,
1256
1256
  record: n,
1257
- definition: g({
1257
+ definition: l({
1258
1258
  dialecteConfig: r,
1259
1259
  tagName: n.tagName
1260
1260
  }) ? v({
@@ -1301,10 +1301,10 @@ function Ct(e) {
1301
1301
  return e.name === "xmlns" || e.name.startsWith("xmlns:") ? !0 : e.namespace?.prefix === "xmlns";
1302
1302
  }
1303
1303
  function wt(e) {
1304
- return p(e).some((e) => e.startsWith("{}"));
1304
+ return n(e).some((e) => e.startsWith("{}"));
1305
1305
  }
1306
1306
  function Tt(e) {
1307
- let t = f.exec(e.text);
1307
+ let t = s.exec(e.text);
1308
1308
  if (t) return `U+${t[0].charCodeAt(0).toString(16).toUpperCase().padStart(4, "0")}`;
1309
1309
  }
1310
1310
  function Et(e) {
@@ -1313,8 +1313,8 @@ function Et(e) {
1313
1313
  withId: n
1314
1314
  });
1315
1315
  if (!r) return;
1316
- let { character: i, attribute: a, part: o } = r;
1317
- h("XML_CHARACTER_NOT_ALLOWED", {
1316
+ let { character: i, attribute: a, part: s } = r;
1317
+ o("XML_CHARACTER_NOT_ALLOWED", {
1318
1318
  detail: `${kt({
1319
1319
  place: r,
1320
1320
  element: t.tagName ? `<${t.tagName}> '${t.id}'` : `the record '${t.id}'`
@@ -1327,7 +1327,7 @@ function Et(e) {
1327
1327
  recordId: t.id,
1328
1328
  ...t.tagName && { tagName: t.tagName },
1329
1329
  ...a && { attribute: a },
1330
- part: o,
1330
+ part: s,
1331
1331
  character: i
1332
1332
  }
1333
1333
  });
@@ -1475,7 +1475,7 @@ function At(e) {
1475
1475
  });
1476
1476
  }
1477
1477
  function jt(e) {
1478
- let { element: t, record: n, value: r, parent: i, rootScope: a, prefixes: o, indent: s } = e, c = r ? u({ text: r }) : "", l = i ? I({
1478
+ let { element: t, record: n, value: r, parent: i, rootScope: a, prefixes: o, indent: s } = e, c = r ? p({ text: r }) : "", l = i ? I({
1479
1479
  element: t,
1480
1480
  scope: i.scope,
1481
1481
  prefixes: o
@@ -1555,108 +1555,108 @@ async function Rt(e, t = {}) {
1555
1555
  signal: t.signal,
1556
1556
  documentId: i
1557
1557
  });
1558
- let o = await Bt({
1558
+ let s = await Bt({
1559
1559
  source: n,
1560
1560
  documentId: i
1561
- }), { config: s } = je({
1561
+ }), { config: c } = je({
1562
1562
  configs: r.configs,
1563
1563
  defaultConfigKey: r.defaultConfigKey,
1564
- configKey: o.configKey
1565
- }), c = zt({ options: e.options });
1564
+ configKey: s.configKey
1565
+ }), l = zt({ options: e.options });
1566
1566
  a.start("export");
1567
- let l;
1567
+ let u;
1568
1568
  try {
1569
1569
  let n = await Vt({
1570
1570
  ...e,
1571
- config: s,
1571
+ config: c,
1572
1572
  control: t,
1573
1573
  perf: a,
1574
- batchSize: c
1574
+ batchSize: l
1575
1575
  });
1576
- l = n.status === "moved" ? await Vt({
1576
+ u = n.status === "moved" ? await Vt({
1577
1577
  ...e,
1578
- config: s,
1578
+ config: c,
1579
1579
  control: t,
1580
1580
  perf: a,
1581
- batchSize: c
1581
+ batchSize: l
1582
1582
  }) : n;
1583
1583
  } finally {
1584
1584
  a.stop("export");
1585
1585
  }
1586
- return l.status === "moved" && h("EXPORT_CONFLICT", {
1587
- detail: `Document "${o.name}" changed twice while it was exported: export it again`,
1586
+ return u.status === "moved" && o("EXPORT_CONFLICT", {
1587
+ detail: `Document "${s.name}" changed twice while it was exported: export it again`,
1588
1588
  meta: { documentId: i }
1589
1589
  }), {
1590
- file: l.file,
1591
- filename: `${o.name}${o.extension}`,
1590
+ file: u.file,
1591
+ filename: `${s.name}${s.extension}`,
1592
1592
  ...r.perf && { perf: a.snapshot() }
1593
1593
  };
1594
1594
  }
1595
1595
  function zt(e) {
1596
1596
  let t = e.options?.batchSize ?? 2e3;
1597
- return (!Number.isInteger(t) || t < 1) && h("ASSERTION_FAILED", { detail: `An export batch size is a whole number from 1, not ${t}` }), t;
1597
+ return (!Number.isInteger(t) || t < 1) && o("ASSERTION_FAILED", { detail: `An export batch size is a whole number from 1, not ${t}` }), t;
1598
1598
  }
1599
1599
  async function Bt(e) {
1600
1600
  let { source: t, documentId: n } = e, r = await t.getDocument(n);
1601
1601
  return r && r.status === "ready" || Q({ documentId: n }), r;
1602
1602
  }
1603
1603
  async function Vt(e) {
1604
- let { source: t, documentId: n, options: r, config: i, control: a, perf: o, batchSize: s } = e, c = await t.getExportVersion({ documentId: n });
1605
- c === void 0 && Q({ documentId: n });
1606
- let l = await t.count(n), u = await Ut({
1604
+ let { source: t, documentId: n, options: r, config: i, control: a, perf: s, batchSize: c } = e, l = await t.getExportVersion({ documentId: n });
1605
+ l === void 0 && Q({ documentId: n });
1606
+ let u = await t.count(n), d = await Ut({
1607
1607
  source: t,
1608
1608
  documentId: n,
1609
1609
  config: i
1610
1610
  });
1611
- if (!u) {
1611
+ if (!d) {
1612
1612
  if (await Z({
1613
1613
  source: t,
1614
1614
  documentId: n,
1615
- version: c
1615
+ version: l
1616
1616
  })) return { status: "moved" };
1617
- h("EXPORT_ROOT_NOT_FOUND", { detail: `No ${i.rootElementName} root element found in document "${n}"` });
1617
+ o("EXPORT_ROOT_NOT_FOUND", { detail: `No ${i.rootElementName} root element found in document "${n}"` });
1618
1618
  }
1619
- let d = {
1619
+ let f = {
1620
1620
  source: t,
1621
1621
  documentId: n,
1622
- version: c,
1623
- totalRecords: l,
1622
+ version: l,
1623
+ totalRecords: u,
1624
1624
  control: a,
1625
- perf: o,
1625
+ perf: s,
1626
1626
  writer: Y({
1627
1627
  config: i,
1628
- documentRoot: u,
1628
+ documentRoot: d,
1629
1629
  indent: r?.indent,
1630
1630
  withDatabaseIds: r?.withDatabaseIds
1631
1631
  }),
1632
1632
  parts: [],
1633
1633
  recordsWritten: 0
1634
- }, f = [Ht({
1635
- pass: d,
1636
- record: u,
1634
+ }, p = [Ht({
1635
+ pass: f,
1636
+ record: d,
1637
1637
  config: i
1638
1638
  })];
1639
- if (d.recordsWritten % s === 0 && await X(d)) return { status: "moved" };
1640
- for (; f.length > 0;) {
1641
- let e = f.at(-1);
1639
+ if (f.recordsWritten % c === 0 && await X(f)) return { status: "moved" };
1640
+ for (; p.length > 0;) {
1641
+ let e = p.at(-1);
1642
1642
  if (e.next >= e.childRefs.length) {
1643
- o.time("export::write", () => d.writer.closeElement()), f.pop();
1643
+ s.time("export::write", () => f.writer.closeElement()), p.pop();
1644
1644
  continue;
1645
1645
  }
1646
1646
  if (e.next >= e.chunkStart + e.chunk.length) {
1647
- let r = e.childRefs.slice(e.next, e.next + s).map(Gt);
1648
- o.start("export::read");
1647
+ let r = e.childRefs.slice(e.next, e.next + c).map(Gt);
1648
+ s.start("export::read");
1649
1649
  try {
1650
1650
  e.chunk = await t.getMany(r, n);
1651
1651
  } finally {
1652
- o.stop("export::read");
1652
+ s.stop("export::read");
1653
1653
  }
1654
1654
  e.chunkStart = e.next;
1655
1655
  }
1656
1656
  let r = e.childRefs[e.next], a = e.chunk[e.next - e.chunkStart];
1657
1657
  if (e.next++, !a) {
1658
- if (await Z(d)) return { status: "moved" };
1659
- h("EXPORT_ORPHAN_CHILD_REF", {
1658
+ if (await Z(f)) return { status: "moved" };
1659
+ o("EXPORT_ORPHAN_CHILD_REF", {
1660
1660
  detail: `Parent '${e.record.tagName}' references non-existent child '${r.tagName}' (id: ${r.id})`,
1661
1661
  ref: {
1662
1662
  tagName: e.record.tagName,
@@ -1664,28 +1664,28 @@ async function Vt(e) {
1664
1664
  }
1665
1665
  });
1666
1666
  }
1667
- if (f.push(Ht({
1668
- pass: d,
1667
+ if (p.push(Ht({
1668
+ pass: f,
1669
1669
  record: a,
1670
1670
  config: i
1671
- })), d.recordsWritten % s === 0 && await X(d)) return { status: "moved" };
1671
+ })), f.recordsWritten % c === 0 && await X(f)) return { status: "moved" };
1672
1672
  }
1673
- if (Wt(d), d.recordsWritten % s !== 0 && await X(d)) return { status: "moved" };
1674
- o.start("export::assemble");
1673
+ if (Wt(f), f.recordsWritten % c !== 0 && await X(f)) return { status: "moved" };
1674
+ s.start("export::assemble");
1675
1675
  try {
1676
1676
  return {
1677
1677
  status: "written",
1678
- file: new Blob([d.writer.head(), ...d.parts], { type: "application/xml" })
1678
+ file: new Blob([f.writer.head(), ...f.parts], { type: "application/xml" })
1679
1679
  };
1680
1680
  } finally {
1681
- o.stop("export::assemble");
1681
+ s.stop("export::assemble");
1682
1682
  }
1683
1683
  }
1684
1684
  function Ht(e) {
1685
1685
  let { pass: t, record: n, config: r } = e;
1686
1686
  return t.perf.time("export::write", () => t.writer.openElement({ record: n })), t.recordsWritten++, {
1687
1687
  record: n,
1688
- childRefs: c({
1688
+ childRefs: u({
1689
1689
  parentTagName: n.tagName,
1690
1690
  children: n.children,
1691
1691
  childrenConfig: r.children,
@@ -1731,14 +1731,14 @@ function Gt(e) {
1731
1731
  }
1732
1732
  function Q(e) {
1733
1733
  let { documentId: t } = e;
1734
- h("DOCUMENT_NOT_REGISTERED", {
1734
+ o("DOCUMENT_NOT_REGISTERED", {
1735
1735
  detail: `Document "${t}" is not registered, or not ready, in this store`,
1736
1736
  meta: { documentId: t }
1737
1737
  });
1738
1738
  }
1739
1739
  function $(e) {
1740
1740
  let { signal: t, documentId: n } = e;
1741
- t?.aborted && h("EXPORT_ABORTED", {
1741
+ t?.aborted && o("EXPORT_ABORTED", {
1742
1742
  detail: `The export of document "${n}" was aborted`,
1743
1743
  meta: { documentId: n }
1744
1744
  });