@arcgis/coding-components 4.34.0-next.127 → 4.34.0-next.129

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 (96) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{BQ3VAANG.js → 2JJBMAY2.js} +2 -2
  3. package/dist/cdn/{QPN3WOVJ.js → 2TZ4WNB2.js} +2 -2
  4. package/dist/cdn/{BV6FAGXT.js → 2Y4QWUQ5.js} +2 -2
  5. package/dist/cdn/{C2LWYXK2.js → 3BAPPI5A.js} +1 -1
  6. package/dist/cdn/{NBAEDVU7.js → 3OTSLDGR.js} +2 -2
  7. package/dist/cdn/{KMDEJYHR.js → 3VYPPYN2.js} +2 -2
  8. package/dist/cdn/{5EKI3VHY.js → 4XLQ3TIM.js} +2 -2
  9. package/dist/cdn/{EZRQL3V5.js → 5AAZTIQL.js} +2 -2
  10. package/dist/cdn/{KXC2K6MP.js → 5JFZAWYW.js} +2 -2
  11. package/dist/cdn/{D7A65QAT.js → 6MXMTSQB.js} +2 -2
  12. package/dist/cdn/{SS62SMVV.js → 7VY4ZFTY.js} +2 -2
  13. package/dist/cdn/{YBA5LBUQ.js → BT4ACDC4.js} +2 -2
  14. package/dist/cdn/DUHD2WEC.js +8 -0
  15. package/dist/cdn/{OOQCYIGC.js → EWJPI4K3.js} +2 -2
  16. package/dist/cdn/{GXTCOJXP.js → FDYED5F2.js} +2 -2
  17. package/dist/cdn/{N3QFTQGU.js → FLSE56KS.js} +2 -2
  18. package/dist/cdn/{MQC6VFHO.js → HEQUWZSF.js} +4 -4
  19. package/dist/cdn/{RQ7S4B5S.js → HV2EUOMS.js} +2 -2
  20. package/dist/cdn/{3TTIN52W.js → IEGREDGD.js} +2 -2
  21. package/dist/cdn/{L6FLWBQW.js → IEGVLDQY.js} +2 -2
  22. package/dist/cdn/{YGUHMT5S.js → JM3TNAV2.js} +2 -2
  23. package/dist/cdn/{K6QSZMSY.js → JVIVTV57.js} +2 -2
  24. package/dist/cdn/{5PFSFE4Q.js → JZL444LG.js} +2 -2
  25. package/dist/cdn/{WAAQ76SZ.js → K2A3TUUC.js} +2 -2
  26. package/dist/cdn/{KW67OACY.js → KYAO2ZUR.js} +1 -1
  27. package/dist/cdn/{MF7AJU7K.js → L4PG6X53.js} +2 -2
  28. package/dist/cdn/{K23J5R4T.js → L5G7YF5J.js} +2 -2
  29. package/dist/cdn/{RB5VEDVC.js → LR63OZBB.js} +2 -2
  30. package/dist/cdn/LUROZOMB.js +14 -0
  31. package/dist/cdn/{M54D6KE5.js → NFEER5QJ.js} +2 -2
  32. package/dist/cdn/{75GXGTBQ.js → OEFBH3WB.js} +2 -2
  33. package/dist/cdn/{ZSQWUBYU.js → OKKIHEDD.js} +2 -2
  34. package/dist/cdn/{QD3PSCEY.js → QESHZN4W.js} +2 -2
  35. package/dist/cdn/QGSWW3NM.js +4 -0
  36. package/dist/cdn/{XG4524QO.js → QUT4VJRY.js} +1 -1
  37. package/dist/cdn/STHV2ZWY.js +4 -0
  38. package/dist/cdn/{6BGS4U4A.js → SWMMEXIO.js} +1 -1
  39. package/dist/cdn/{QRWCK4JS.js → T3RBCTRD.js} +2 -2
  40. package/dist/cdn/{OBRGYXAJ.js → U2OPLXBP.js} +2 -2
  41. package/dist/cdn/{KLPV3RCE.js → UCTN2Y42.js} +2 -2
  42. package/dist/cdn/{DT5CWNRT.js → UDSJ3U6Q.js} +2 -2
  43. package/dist/cdn/{OCTGHWZG.js → UN2TOEHW.js} +1 -1
  44. package/dist/cdn/{IWSM7Q5E.js → WD27FFED.js} +1 -1
  45. package/dist/cdn/{O4K3WI7G.js → YHHR4A3C.js} +2 -2
  46. package/dist/cdn/assets/code-editor/sql-expr.worker.js +55960 -55294
  47. package/dist/cdn/index.js +2 -2
  48. package/dist/chunks/arcade-defaults.js +138 -104
  49. package/dist/chunks/arcade-executor.js +1 -1
  50. package/dist/chunks/arcade-mode.js +1 -1
  51. package/dist/chunks/arcade-service-accessors.js +1 -1
  52. package/dist/chunks/editor.js +1 -1
  53. package/dist/chunks/fields.js +52 -11
  54. package/dist/chunks/language-defaults-base.js +378 -243
  55. package/dist/chunks/markdown.js +1 -1
  56. package/dist/chunks/monaco-importer.js +1 -1
  57. package/dist/chunks/runtime.js +1 -1
  58. package/dist/chunks/setup-monaco.js +1 -1
  59. package/dist/chunks/sql-expr-contribution.js +1 -1
  60. package/dist/chunks/sql-expr-defaults.js +1 -1
  61. package/dist/chunks/sql-expr-mode.js +1 -1
  62. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  63. package/dist/chunks/useT9n.js +1 -1
  64. package/dist/components/arcgis-arcade-coding-assistant/customElement.d.ts +0 -8
  65. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  66. package/dist/components/arcgis-arcade-editor/customElement.d.ts +0 -71
  67. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  68. package/dist/components/arcgis-arcade-results/customElement.d.ts +0 -14
  69. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  70. package/dist/components/arcgis-arcade-suggestions/customElement.d.ts +0 -8
  71. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  72. package/dist/components/arcgis-code-editor/customElement.d.ts +0 -53
  73. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  74. package/dist/components/arcgis-editor-variables/customElement.d.ts +0 -19
  75. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  76. package/dist/components/arcgis-language-api-panel/customElement.d.ts +0 -23
  77. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  78. package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +0 -28
  79. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  80. package/dist/components/arcgis-sql-expression-fields/customElement.d.ts +0 -8
  81. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  82. package/dist/docs/api.json +2 -2
  83. package/dist/docs/docs.json +2 -2
  84. package/dist/docs/web-types.json +1 -1
  85. package/dist/index.js +1 -1
  86. package/dist/loader.js +1 -1
  87. package/dist/monacoStyles.js +1 -1
  88. package/dist/utils/fields.d.ts +8 -1
  89. package/dist/utils/profile/editor-profile.d.ts +30 -12
  90. package/dist/utils/profile/types.d.ts +28 -1
  91. package/dist/utils/profile/utils.d.ts +5 -1
  92. package/package.json +5 -5
  93. package/dist/cdn/FBC5VUHQ.js +0 -4
  94. package/dist/cdn/FYVBP75X.js +0 -10
  95. package/dist/cdn/LKDQOQC2.js +0 -4
  96. package/dist/cdn/MFRHU2JZ.js +0 -8
@@ -1,122 +1,135 @@
1
- import b from "@arcgis/core/layers/FeatureLayer.js";
2
- import X from "@arcgis/core/request.js";
3
- import { p as Y, i as Z } from "./monaco-importer.js";
4
- import ee from "@arcgis/core/portal/PortalItem.js";
5
- import te from "@arcgis/core/WebMap.js";
6
- import ie from "@arcgis/core/WebScene.js";
7
- import { isNotNull as w, isNotUndefined as U } from "@arcgis/toolkit/predicate";
8
- import { addLtrMark as re, setValuesInString as I } from "@arcgis/toolkit/string";
9
- import { s as F, f as se, a as _, b as ne } from "./fields.js";
10
- import { CompletionItemKind as V, InsertTextFormat as M, InsertTextMode as x } from "vscode-languageserver-types";
11
- import { g as oe } from "./runtime.js";
12
- import { normalizeLocale as ae } from "@arcgis/toolkit/intl";
13
- import { filterApiLibraryForContext as le } from "@arcgis/languages-api-utils";
14
- import { Emitter as $, Uri as A } from "monaco-editor";
1
+ import m from "@arcgis/core/layers/FeatureLayer.js";
2
+ import ee from "@arcgis/core/request.js";
3
+ import { p as te, i as ie } from "./monaco-importer.js";
4
+ import re from "@arcgis/core/portal/PortalItem.js";
5
+ import se from "@arcgis/core/WebMap.js";
6
+ import ne from "@arcgis/core/WebScene.js";
7
+ import { isNotNull as C, isNotUndefined as O } from "@arcgis/toolkit/predicate";
8
+ import { addLtrMark as oe, setValuesInString as A } from "@arcgis/toolkit/string";
9
+ import { s as g, f as ae, a as b, m as le, b as ue } from "./fields.js";
10
+ import { CompletionItemKind as v, InsertTextFormat as F, InsertTextMode as x } from "vscode-languageserver-types";
11
+ import { getDeclaredVoxelMembers as pe, getDeclaredPixelMembers as ce } from "@arcgis/core/applications/Components/arcadeEditorUtils.js";
12
+ import { g as he } from "./runtime.js";
13
+ import { normalizeLocale as fe } from "@arcgis/toolkit/intl";
14
+ import { filterApiLibraryForContext as de } from "@arcgis/languages-api-utils";
15
+ import { Emitter as G, Uri as E } from "monaco-editor";
15
16
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
16
17
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
17
- v4.34.0-next.127 */
18
- function B(t) {
19
- return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass.startsWith("esri.layers.") && g(t) && "queryFeatures" in t && typeof t.queryFeatures == "function";
18
+ v4.34.0-next.129 */
19
+ function k(t) {
20
+ return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass.startsWith("esri.layers.") && w(t) && "queryFeatures" in t && typeof t.queryFeatures == "function";
20
21
  }
21
- function W(t) {
22
+ function q(t) {
22
23
  return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && (t.declaredClass === "esri.Map" || t.declaredClass === "esri.WebMap" || t.declaredClass === "esri.WebScene");
23
24
  }
24
- function ue(t) {
25
+ function ye(t) {
25
26
  return !!t && typeof t == "object" && "loadAll" in t && typeof t.loadAll == "function";
26
27
  }
27
- function O(t) {
28
+ function K(t) {
28
29
  return !!t && typeof t == "object" && "portalItem" in t && t.portalItem != null;
29
30
  }
30
- function R(t) {
31
+ function z(t) {
31
32
  return !!t && typeof t == "object" && "portalItem" in t && t.portalItem != null;
32
33
  }
33
- function g(t) {
34
+ function w(t) {
34
35
  return !!t && typeof t == "object" && "fields" in t && Array.isArray(t.fields);
35
36
  }
36
37
  function D(t) {
37
38
  return !!t && typeof t == "object" && "url" in t && typeof t.url == "string";
38
39
  }
39
- function pe(t) {
40
+ function _e(t) {
40
41
  return D(t) && /\/(?:featureserver|mapserver)(?:\/|$)/iu.test(t.url ?? "");
41
42
  }
42
- function We(t) {
43
- return D(t) || g(t) || R(t);
43
+ function H(t) {
44
+ return D(t) || w(t) || z(t);
45
+ }
46
+ function Xe(t) {
47
+ return H(t) && "type" in t && t.type === "voxel";
44
48
  }
45
- function Oe(t) {
46
- return D(t) || g(t) || R(t);
49
+ function Ye(t) {
50
+ return H(t) && "type" in t && t.type === "pixel";
47
51
  }
48
- function Re(t) {
49
- return O(t) || W(t) || pe(t);
52
+ function Ze(t) {
53
+ return D(t) || w(t) || z(t);
50
54
  }
51
- function L(t) {
55
+ function et(t) {
56
+ return K(t) || q(t) || _e(t);
57
+ }
58
+ function j(t) {
52
59
  return !!t && typeof t == "object" && "declaredClass" in t && t.declaredClass === "esri.layers.support.Subtype";
53
60
  }
54
- function C(t) {
61
+ function S(t) {
55
62
  return !!t && typeof t == "object" && "declaredClass" in t && t.declaredClass === "esri.layers.support.CodedValueDomain";
56
63
  }
57
- function ce(t) {
64
+ function be(t) {
58
65
  return !!t && typeof t == "object" && "declaredClass" in t && t.declaredClass === "esri.layers.support.InheritedDomain";
59
66
  }
60
- function ke(t) {
67
+ function tt(t) {
61
68
  return !!t && typeof t == "object" && "id" in t && typeof t.id == "string" && "definitions" in t && typeof t.definitions == "object" && !Array.isArray(t.definitions);
62
69
  }
63
- function m(t) {
70
+ function h(t) {
64
71
  return !!t && typeof t == "object" && "title" in t && typeof t.title == "string";
65
72
  }
66
- function he(t) {
73
+ function me(t) {
67
74
  return !!t && typeof t == "object" && "url" in t && typeof t.url == "string";
68
75
  }
69
- function k(t) {
76
+ function J(t) {
70
77
  return !!t && typeof t == "object" && "layerId" in t && typeof t.layerId == "number";
71
78
  }
72
- function S(t) {
79
+ function P(t) {
73
80
  return !!t && typeof t == "object" && "typeIdField" in t && "types" in t;
74
81
  }
75
- function G(t) {
82
+ function N(t) {
76
83
  return !!t && typeof t == "object" && "getFieldDomain" in t && typeof t.getFieldDomain == "function";
77
84
  }
78
- function f(t) {
85
+ function d(t) {
79
86
  return !!t && typeof t == "object" && "subtypeField" in t;
80
87
  }
81
- function fe(t) {
82
- return f(t) && "subtypes" in t;
88
+ function ge(t) {
89
+ return d(t) && "subtypes" in t;
83
90
  }
84
- function de(t) {
91
+ function we(t) {
85
92
  return !!t && typeof t == "object" && "portalItem" in t;
86
93
  }
87
- function ye(t) {
88
- return k(t) && "relationships" in t && "url" in t && Array.isArray(t.relationships) && typeof t.url == "string";
94
+ function De(t) {
95
+ return J(t) && "relationships" in t && "url" in t && Array.isArray(t.relationships) && typeof t.url == "string";
89
96
  }
90
- function _e(t) {
97
+ function Se(t) {
91
98
  return !!t && typeof t == "object" && "isTable" in t && typeof t.isTable == "boolean";
92
99
  }
93
- function be(t) {
100
+ function Ce(t) {
94
101
  if (t && typeof t == "object") {
95
- if (_e(t))
102
+ if (Se(t))
96
103
  return t.isTable || "type" in t && t.type === "table";
97
104
  if ("geometryType" in t)
98
105
  return t.geometryType === "" || t.geometryType === "esriGeometryNull" || t.geometryType === null;
99
106
  }
100
107
  return !1;
101
108
  }
102
- function me(t) {
103
- return !be(t);
109
+ function ve(t) {
110
+ return !Ce(t);
104
111
  }
105
- function ge(t) {
112
+ function Fe(t) {
106
113
  return !!t && typeof t == "object" && "load" in t && typeof t.load == "function";
107
114
  }
108
- async function q(t) {
115
+ function xe(t) {
116
+ return !!t && typeof t == "object" && "type" in t && t.type === "voxel";
117
+ }
118
+ function U(t) {
119
+ return !!t && typeof t == "object" && "type" in t && typeof t.type == "string" && ["imagery", "imagery-tile"].includes(t.type);
120
+ }
121
+ async function Q(t) {
109
122
  if (!t)
110
123
  return null;
111
124
  let e;
112
- return g(t) ? e = t : e = new b(t), ge(e) && await e.load(), e;
125
+ return w(t) ? e = t : e = new m(t), Fe(e) && await e.load(), e;
113
126
  }
114
- async function De(t) {
127
+ async function Pe(t) {
115
128
  t += "/layers";
116
- const e = await X(t, { responseType: "json", query: { f: "json" } }), i = t.endsWith("MapServer/layers") ? "data" : "query", r = j(e.data?.layers, i), s = j(e.data?.tables, i);
129
+ const e = await ee(t, { responseType: "json", query: { f: "json" } }), i = t.endsWith("MapServer/layers") ? "data" : "query", r = B(e.data?.layers, i), s = B(e.data?.tables, i);
117
130
  return { layers: r, tables: s };
118
131
  }
119
- function j(t, e) {
132
+ function B(t, e) {
120
133
  return t ? t.filter((i) => {
121
134
  switch (i.type) {
122
135
  case "Feature Layer":
@@ -129,23 +142,23 @@ function j(t, e) {
129
142
  }
130
143
  }) : [];
131
144
  }
132
- async function Ce(t, e) {
133
- const i = new b({ url: `${t.url}/${e.relatedTableId}` });
145
+ async function Ve(t, e) {
146
+ const i = new m({ url: `${t.url}/${e.relatedTableId}` });
134
147
  return await i.load(), i;
135
148
  }
136
- function K(t) {
149
+ function V(t) {
137
150
  return (e, i) => {
138
151
  if (e.type === "oid")
139
152
  return -1;
140
153
  if (i.type === "oid")
141
154
  return 1;
142
- if (f(t)) {
155
+ if (d(t)) {
143
156
  if (e.name === t.subtypeField)
144
157
  return -1;
145
158
  if (i.name === t.subtypeField)
146
159
  return 1;
147
160
  }
148
- if (S(t)) {
161
+ if (P(t)) {
149
162
  if (e.name === t.typeIdField)
150
163
  return -1;
151
164
  if (i.name === t.typeIdField)
@@ -154,65 +167,89 @@ function K(t) {
154
167
  return e.name.localeCompare(i.name, "en", { sensitivity: "base" });
155
168
  };
156
169
  }
157
- function E(t, e) {
170
+ function W(t, e) {
158
171
  return t?.every((i) => i.domains?.[e.name]?.type === "inherited") ?? !1;
159
172
  }
160
- const we = /^[a-z_$][a-z0-9_$]*$/giu;
161
- function z(t, e = !0) {
162
- return t.match(we) ? `${e ? "." : ""}${t}` : `["${t}"]`;
173
+ const Ie = /^[a-z_$][a-z0-9_$]*$/giu;
174
+ function I(t, e = !0) {
175
+ return t.match(Ie) ? `${e ? "." : ""}${t}` : `["${t}"]`;
163
176
  }
164
- function H(t, e) {
165
- return t ? `${t}${z(e)}` : e;
177
+ function X(t, e) {
178
+ return t ? `${t}${I(e)}` : e;
166
179
  }
167
- function N(t) {
168
- return de(t) ? t.portalItem : null;
180
+ function R(t) {
181
+ return we(t) ? t.portalItem : null;
169
182
  }
170
- function qe(t, e, i = !1) {
183
+ function it(t, e, i = !1) {
171
184
  let r = e;
172
- const s = [], o = [];
173
- return F(t).forEach((n) => {
185
+ const s = [], n = [];
186
+ return g(t).forEach((o) => {
174
187
  r && (r += `
175
188
 
176
- `), r += `**${n.name}** (${n.alias})
177
- ${n.type}`, n.description && (r += `
178
- '${n.description}`);
179
- const c = ne(n), p = z(n.name, !1), y = _(n);
189
+ `), r += `**${o.name}** (${o.alias})
190
+ ${o.type}`, o.description && (r += `
191
+ '${o.description}`);
192
+ const c = ue(o), p = I(o.name, !1), _ = b(o);
180
193
  if (s.push({
181
- name: n.name,
182
- description: y,
194
+ name: o.name,
195
+ description: _,
183
196
  type: c,
184
197
  completion: {
185
- label: n.name,
186
- detail: y,
198
+ label: o.name,
199
+ detail: _,
187
200
  insertText: p,
188
201
  insertTextMode: x.asIs,
189
- insertTextFormat: M.PlainText,
190
- kind: V.Field
202
+ insertTextFormat: F.PlainText,
203
+ kind: v.Field
191
204
  }
192
205
  }), i) {
193
- if (!n.alias || n.alias.toLowerCase() === n.name.toLowerCase())
206
+ if (!o.alias || o.alias.toLowerCase() === o.name.toLowerCase())
194
207
  return;
195
- let h = `**${n.alias}**
196
- ${n.type}`;
197
- n.description && (h += `
198
- '${n.description}`), o.push({
199
- name: n.alias,
200
- description: n.name,
208
+ let f = `**${o.alias}**
209
+ ${o.type}`;
210
+ o.description && (f += `
211
+ '${o.description}`), n.push({
212
+ name: o.alias,
213
+ description: o.name,
201
214
  type: c,
202
215
  completion: {
203
- label: n.alias,
204
- detail: n.name,
216
+ label: o.alias,
217
+ detail: o.name,
205
218
  insertText: p,
206
219
  insertTextMode: x.asIs,
207
- insertTextFormat: M.PlainText,
208
- kind: V.Field,
209
- documentation: { kind: "markdown", value: h }
220
+ insertTextFormat: F.PlainText,
221
+ kind: v.Field,
222
+ documentation: { kind: "markdown", value: f }
210
223
  }
211
224
  });
212
225
  }
213
- }), [[...s, ...o], r];
226
+ }), [[...s, ...n], r];
227
+ }
228
+ function rt(t, e) {
229
+ let i = e;
230
+ const r = [];
231
+ return t.forEach((s) => {
232
+ i && (i += `
233
+
234
+ `), i += `**${s.name}**
235
+ ${s.type}`, s.name && (i += `
236
+ '${s.name}`), r.push({
237
+ name: s.name,
238
+ description: s.name,
239
+ // pixel members are always arrays
240
+ type: "array",
241
+ completion: {
242
+ label: s.name,
243
+ detail: s.name,
244
+ insertText: I(s.name, !1),
245
+ insertTextMode: x.asIs,
246
+ insertTextFormat: F.PlainText,
247
+ kind: v.Field
248
+ }
249
+ });
250
+ }), [r, i];
214
251
  }
215
- class J {
252
+ class Y {
216
253
  constructor(e, i, r) {
217
254
  this._profile = e, this._label = i, this.description = r, this.filterDescription = !1;
218
255
  }
@@ -220,13 +257,13 @@ class J {
220
257
  * Returns the label string.
221
258
  */
222
259
  getLabel() {
223
- return this._label == null ? "" : typeof this._label == "string" ? re(this._label) : I(this._profile?.intlStrings[this._label.code], this._label.formatValues);
260
+ return this._label == null ? "" : typeof this._label == "string" ? oe(this._label) : A(this._profile?.intlStrings[this._label.code], this._label.formatValues);
224
261
  }
225
262
  /**
226
263
  * Returns the description string.
227
264
  */
228
265
  getDescription() {
229
- return this.description == null ? "" : typeof this.description == "string" ? this.description : I(this._profile?.intlStrings[this.description.code], this.description.formatValues);
266
+ return this.description == null ? "" : typeof this.description == "string" ? this.description : A(this._profile?.intlStrings[this.description.code], this.description.formatValues);
230
267
  }
231
268
  /**
232
269
  * Returns true if the item pass the filter test
@@ -235,12 +272,12 @@ class J {
235
272
  return !e || e.test(this.getLabel()) ? !0 : this.filterDescription && e.test(this.getDescription());
236
273
  }
237
274
  }
238
- class v extends J {
275
+ class T extends Y {
239
276
  constructor(e) {
240
277
  super(e.profile, e.label, e.description ?? e.declaration?.description), this.declaration = e.declaration ?? {}, this.name = e.declaration?.name ?? "", this.snippet = e.snippet ?? "", this.nonInteractive = e.nonInteractive ?? !1, this.filterDescription = e.filterDescription ?? !1, this.icon = e.icon;
241
278
  }
242
279
  }
243
- class a extends v {
280
+ class l extends T {
244
281
  constructor(e) {
245
282
  super(e), this.type = "text", this.isCollection = !1, this.type = e.declaration?.type ?? "text";
246
283
  }
@@ -251,7 +288,7 @@ class a extends v {
251
288
  return { type: this.type, name: "", ...this.declaration };
252
289
  }
253
290
  }
254
- class Se extends v {
291
+ class Te extends T {
255
292
  constructor(e) {
256
293
  super(e), this.type = "array", this.isCollection = !1, this.elementType = e.declaration?.elementType ?? { type: "number", name: "number" };
257
294
  }
@@ -262,7 +299,7 @@ class Se extends v {
262
299
  return { type: this.type, elementType: this.elementType, name: "", ...this.declaration };
263
300
  }
264
301
  }
265
- class P extends v {
302
+ class M extends T {
266
303
  constructor(e, i) {
267
304
  super(i), this.owner = e, this.isCollection = !0, this._loaded = !0, this.variables = [];
268
305
  }
@@ -289,7 +326,7 @@ class P extends v {
289
326
  return "";
290
327
  }
291
328
  }
292
- class l extends J {
329
+ class u extends Y {
293
330
  constructor(e, i, r = [], s = !1) {
294
331
  super(e, i), this.variables = r, this.isHeader = s, this.type = "group", this.isCollection = !0;
295
332
  }
@@ -297,9 +334,9 @@ class l extends J {
297
334
  return !0;
298
335
  }
299
336
  }
300
- class d extends P {
337
+ class y extends M {
301
338
  constructor(e, i) {
302
- super(e, i), this.type = "dictionary", this.dictionaryVariables = [], this.loadPropertyDeclarations(i.declaration?.properties), this.snippet && this.dictionaryVariables.length && (this.variables = [new l(this._profile, this.snippet, this.dictionaryVariables)]);
339
+ super(e, i), this.type = "dictionary", this.dictionaryVariables = [], this.loadPropertyDeclarations(i.declaration?.properties), this.snippet && this.dictionaryVariables.length && (this.variables = [new u(this._profile, this.snippet, this.dictionaryVariables)]);
303
340
  }
304
341
  async loadSource() {
305
342
  }
@@ -316,7 +353,7 @@ class d extends P {
316
353
  }), i;
317
354
  }
318
355
  createVariableInstance(e) {
319
- const i = H(this.snippet, e.name);
356
+ const i = X(this.snippet, e.name);
320
357
  switch (e.type) {
321
358
  case "number":
322
359
  case "text":
@@ -326,29 +363,33 @@ class d extends P {
326
363
  case "time":
327
364
  case "geometry":
328
365
  case "knowledgeGraph":
329
- return new a({ profile: this._profile, declaration: e, label: i, snippet: i });
366
+ return new l({ profile: this._profile, declaration: e, label: i, snippet: i });
367
+ case "pixel":
368
+ return new Le(this, { profile: this._profile, declaration: e, label: i, snippet: i });
369
+ case "voxel":
370
+ return new $e(this, { profile: this._profile, declaration: e, label: i, snippet: i });
330
371
  case "feature":
331
- return new Fe(this, { profile: this._profile, declaration: e, label: i, snippet: i });
372
+ return new Me(this, { profile: this._profile, declaration: e, label: i, snippet: i });
332
373
  case "featureSet":
333
- return new T(this, { profile: this._profile, declaration: e, label: i, snippet: i }, [
334
- new a({ profile: this._profile, label: i, description: "", snippet: i })
374
+ return new L(this, { profile: this._profile, declaration: e, label: i, snippet: i }, [
375
+ new l({ profile: this._profile, label: i, description: "", snippet: i })
335
376
  ]);
336
377
  case "featureSetCollection":
337
- return new ve(this, {
378
+ return new Ae(this, {
338
379
  profile: this._profile,
339
380
  declaration: e,
340
381
  label: i,
341
382
  snippet: i
342
383
  });
343
384
  case "dictionary":
344
- return new d(this, {
385
+ return new y(this, {
345
386
  profile: this._profile,
346
387
  declaration: e,
347
388
  label: i,
348
389
  snippet: i
349
390
  });
350
391
  case "array":
351
- return new Se({
392
+ return new Te({
352
393
  profile: this._profile,
353
394
  declaration: e,
354
395
  label: i,
@@ -367,58 +408,69 @@ class d extends P {
367
408
  };
368
409
  }
369
410
  }
370
- class Q extends P {
411
+ class Z extends M {
371
412
  constructor(e, i, r) {
372
413
  super(e, i), this.relationshipsProperties = r, this._source = null, this._loaded = !1, this._definition = i.declaration?.definition;
373
414
  }
374
415
  get title() {
375
- return m(this._source) ? this._source.title ?? "" : "";
416
+ return h(this._source) ? this._source.title ?? "" : "";
376
417
  }
377
418
  get url() {
378
- return he(this._source) ? this._source.url ?? "" : "";
419
+ return me(this._source) ? this._source.url ?? "" : "";
379
420
  }
380
421
  get informationUrl() {
381
- return !this.loaded || !this.url ? null : k(this._source) ? `${this.url}/${this._source.layerId}` : this.url;
422
+ return !this.loaded || !this.url ? null : J(this._source) ? `${this.url}/${this._source.layerId}` : this.url;
382
423
  }
383
424
  get informationType() {
384
425
  return this._profile?.intlStrings.layer ?? "layer";
385
426
  }
386
427
  async loadSource() {
387
- return w(this._loadPromise) && U(this._loadPromise) ? await this._loadPromise : (this._loadPromise = this._loadSource(), await this._loadPromise);
428
+ return C(this._loadPromise) && O(this._loadPromise) ? await this._loadPromise : (this._loadPromise = this._loadSource(), await this._loadPromise);
388
429
  }
389
430
  _getValueSnippet(e) {
390
- return this.type === "feature" ? H(this.snippet, e.name) : e.name;
431
+ return ["feature", "voxel", "pixel"].includes(this.type) ? X(this.snippet, e.name) : e.name;
391
432
  }
392
433
  _getSubtypeOrDomainNameSnippet(e) {
393
- return this.type !== "feature" ? null : f(this._source) && e.name === this._source.subtypeField ? `SubtypeName(${this.snippet})` : `DomainName(${this.snippet}, "${e.name}")`;
394
- }
395
- _getFieldProperty(e) {
396
- const i = this._getDomainDictionary(e);
397
- if (i)
398
- return i;
399
- const r = this._getValueSnippet(e);
400
- return new a({
434
+ return this.type !== "feature" ? null : d(this._source) && e.name === this._source.subtypeField ? `SubtypeName(${this.snippet})` : `DomainName(${this.snippet}, "${e.name}")`;
435
+ }
436
+ _getFieldProperty(e, i) {
437
+ const r = this._getDomainDictionary(e);
438
+ if (r)
439
+ return r;
440
+ const s = this._getValueSnippet(e);
441
+ return new l({
401
442
  profile: this._profile,
402
- label: r,
403
- description: _(e),
404
- snippet: r,
405
- icon: se(e),
443
+ label: s,
444
+ description: b(e),
445
+ snippet: s,
446
+ icon: ae(e, i),
447
+ filterDescription: !0
448
+ });
449
+ }
450
+ _getMemberProperty(e) {
451
+ const i = this._getValueSnippet(e);
452
+ return new l({
453
+ profile: this._profile,
454
+ label: i,
455
+ description: e.name,
456
+ snippet: i,
457
+ icon: le(e),
406
458
  filterDescription: !0
407
459
  });
408
460
  }
409
461
  _getDomainDictionary(e) {
410
- return G(this._source) ? f(this._source) && this._source.subtypeField ? this._getSubtypeDomainDictionary(e) : S(this._source) && this._source.typeIdField ? this._getFeatureTypeDomainDictionary(e) : this._getFieldDomainDictionary(e) : null;
462
+ return N(this._source) ? d(this._source) && this._source.subtypeField ? this._getSubtypeDomainDictionary(e) : P(this._source) && this._source.typeIdField ? this._getFeatureTypeDomainDictionary(e) : this._getFieldDomainDictionary(e) : null;
411
463
  }
412
464
  _getSubtypeDomainDictionary(e) {
413
- if (!f(this._source))
465
+ if (!d(this._source))
414
466
  return null;
415
- if (!fe(this._source))
467
+ if (!ge(this._source))
416
468
  return e.name === this._source.subtypeField ? null : this._getFieldDomainDictionary(e);
417
469
  if (e.name === this._source.subtypeField) {
418
470
  const s = this._createDomainDictionary(e);
419
471
  return s.icon = "subtype", s.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, e)), s;
420
472
  }
421
- if (E(this._source.subtypes, e))
473
+ if (W(this._source.subtypes, e))
422
474
  return this._getFieldDomainDictionary(e);
423
475
  const i = this._getDomainValuesGroup(this._source.subtypes, e);
424
476
  if (!i)
@@ -427,13 +479,13 @@ class Q extends P {
427
479
  return r.variables.push(i), r;
428
480
  }
429
481
  _getFeatureTypeDomainDictionary(e) {
430
- if (!S(this._source))
482
+ if (!P(this._source))
431
483
  return null;
432
484
  if (e.name === this._source.typeIdField) {
433
485
  const s = this._createDomainDictionary(e);
434
486
  return s.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.types, e)), s;
435
487
  }
436
- if (E(this._source.types, e))
488
+ if (W(this._source.types, e))
437
489
  return this._getFieldDomainDictionary(e);
438
490
  const i = this._getDomainValuesGroup(this._source.types, e);
439
491
  if (!i)
@@ -442,10 +494,10 @@ class Q extends P {
442
494
  return r.variables.push(i), r;
443
495
  }
444
496
  _getFieldDomainDictionary(e) {
445
- if (!G(this._source))
497
+ if (!N(this._source))
446
498
  return null;
447
499
  const i = this._source.getFieldDomain(e.name);
448
- if (!C(i))
500
+ if (!S(i))
449
501
  return null;
450
502
  const r = this._getCodedValueDomainGroup(i, {
451
503
  code: "domainvalues"
@@ -453,22 +505,22 @@ class Q extends P {
453
505
  return s.variables.push(r), s;
454
506
  }
455
507
  _getTypeOrSubtypeDomainGroup(e, i) {
456
- if (C(i.domain))
508
+ if (S(i.domain))
457
509
  return this._getCodedValueDomainGroup(i.domain, { code: "subtypes" });
458
510
  const r = e?.map((s) => {
459
- const o = L(s) ? s.code : s.id;
460
- return new a({
511
+ const n = j(s) ? s.code : s.id;
512
+ return new l({
461
513
  profile: this._profile,
462
- label: `${o}`,
514
+ label: `${n}`,
463
515
  description: s.name,
464
- snippet: `"${o}"`
516
+ snippet: `"${n}"`
465
517
  });
466
518
  }) ?? [];
467
- return new l(this._profile, { code: "subtypes" }, r);
519
+ return new u(this._profile, { code: "subtypes" }, r);
468
520
  }
469
521
  _getCodedValueDomainGroup(e, i) {
470
522
  const r = e.codedValues.map(
471
- (s) => new a({
523
+ (s) => new l({
472
524
  profile: this._profile,
473
525
  label: `${s.code}`,
474
526
  description: s.name,
@@ -476,54 +528,54 @@ class Q extends P {
476
528
  filterDescription: !0
477
529
  })
478
530
  );
479
- return new l(this._profile, i, r);
531
+ return new u(this._profile, i, r);
480
532
  }
481
533
  _getDomainValuesGroup(e, i) {
482
534
  const r = [];
483
535
  return !e || e.length === 0 || (e.forEach((s) => {
484
- const o = s.domains?.[i.name];
485
- if (!o || ce(o) || !C(o))
536
+ const n = s.domains?.[i.name];
537
+ if (!n || be(n) || !S(n))
486
538
  return;
487
- const u = _(i), n = this._getCodedValueDomainGroup(o, {
539
+ const a = b(i), o = this._getCodedValueDomainGroup(n, {
488
540
  code: "domainvaluesfortypeformat",
489
541
  formatValues: {
490
- fieldName: u,
542
+ fieldName: a,
491
543
  typeName: s.name
492
544
  }
493
- }), c = L(s) ? s.code : s.id, p = `${c}`, y = `"${c}""`, h = new d(this, {
545
+ }), c = j(s) ? s.code : s.id, p = `${c}`, _ = `"${c}""`, f = new y(this, {
494
546
  profile: this._profile,
495
547
  label: p,
496
- snippet: y,
548
+ snippet: _,
497
549
  description: s.name,
498
- declaration: { name: u }
550
+ declaration: { name: a }
499
551
  });
500
- h.variables = [n], r.push(h);
501
- }), !r.length) ? null : new l(this._profile, { code: "domainvaluesbysubtypes" }, r);
552
+ f.variables = [o], r.push(f);
553
+ }), !r.length) ? null : new u(this._profile, { code: "domainvaluesbysubtypes" }, r);
502
554
  }
503
555
  _createDomainDictionary(e) {
504
- const i = this._getValueSnippet(e), r = _(e), s = new d(this, {
556
+ const i = this._getValueSnippet(e), r = b(e), s = new y(this, {
505
557
  profile: this._profile,
506
558
  label: i,
507
559
  description: r,
508
560
  snippet: i,
509
561
  icon: "form-dropdown",
510
562
  declaration: { name: e.name }
511
- }), o = new l(this._profile, r, [
512
- new a({
563
+ }), n = new u(this._profile, r, [
564
+ new l({
513
565
  profile: this._profile,
514
566
  label: i,
515
567
  description: "",
516
568
  snippet: i
517
569
  })
518
570
  ]);
519
- s.variables = [o];
520
- const u = this._getSubtypeOrDomainNameSnippet(e);
521
- return u && o.variables.push(
522
- new a({
571
+ s.variables = [n];
572
+ const a = this._getSubtypeOrDomainNameSnippet(e);
573
+ return a && n.variables.push(
574
+ new l({
523
575
  profile: this._profile,
524
- label: u,
576
+ label: a,
525
577
  description: "",
526
- snippet: u
578
+ snippet: a
527
579
  })
528
580
  ), s;
529
581
  }
@@ -531,48 +583,56 @@ class Q extends P {
531
583
  if (!this.relationshipsProperties?.exposeRelationships || !this._profile?.supportFeatureSetFunctions)
532
584
  return null;
533
585
  const e = this._source;
534
- if (!ye(e))
586
+ if (!De(e))
535
587
  return null;
536
- const i = new l(this._profile, { code: "relationships" }), r = await Promise.all(
588
+ const i = new u(this._profile, { code: "relationships" }), r = await Promise.all(
537
589
  e.relationships?.map(async (s) => {
538
- const o = await Ce(e, s);
539
- if (!B(o) || s.relatedTableId === this.relationshipsProperties?.sourceTableId)
590
+ const n = await Ve(e, s);
591
+ if (!k(n) || s.relatedTableId === this.relationshipsProperties?.sourceTableId)
540
592
  return null;
541
- const u = `FeatureSetByRelationshipName(${this.snippet}, "${s.name}")`;
542
- return new T(
593
+ const a = `FeatureSetByRelationshipName(${this.snippet}, "${s.name}")`;
594
+ return new L(
543
595
  this,
544
596
  {
545
597
  profile: this._profile,
546
- declaration: { definition: o },
547
- label: o.title,
598
+ declaration: { definition: n },
599
+ label: n.title,
548
600
  description: "",
549
601
  nonInteractive: !0
550
602
  },
551
- [new a({ profile: this._profile, label: u, description: "", snippet: u })],
603
+ [new l({ profile: this._profile, label: a, description: "", snippet: a })],
552
604
  { exposeRelationships: !0, sourceTableId: e.layerId }
553
605
  );
554
606
  }) ?? []
555
607
  );
556
- return i.variables = r.filter(w), i.variables.length ? i : null;
608
+ return i.variables = r.filter(C), i.variables.length ? i : null;
557
609
  }
558
610
  }
559
- class Fe extends Q {
560
- constructor(e, i) {
561
- super(e, i, { exposeRelationships: !0 }), this.type = "feature";
611
+ class $ extends Z {
612
+ constructor(e, i, r, s = { exposeRelationships: !0 }) {
613
+ super(e, i, s), this.type = r;
562
614
  }
563
615
  get title() {
564
- return m(this._source) ? this._source.title ?? "" : { code: "feature" };
616
+ return h(this._source) ? this._source.title ?? "" : { code: this.type };
617
+ }
618
+ toProfileVariableDefinition() {
619
+ return { type: this.type, name: "", ...this.declaration };
620
+ }
621
+ }
622
+ class Me extends $ {
623
+ constructor(e, i) {
624
+ super(e, i, "feature", { exposeRelationships: !0 }), this.type = "feature";
565
625
  }
566
626
  async _loadSource() {
567
627
  if (this.loaded)
568
628
  return this._source;
569
629
  try {
570
- if (this._source = await q(this._definition), !this._source)
630
+ if (this._source = await Q(this._definition), !this._source)
571
631
  throw new Error("Invalid definition");
572
- const e = m(this._source) ? this._source.title ?? "" : "";
632
+ const e = h(this._source) ? this._source.title ?? "" : "";
573
633
  this.variables.push(
574
- new l(this._profile, e, [
575
- new a({
634
+ new u(this._profile, e, [
635
+ new l({
576
636
  profile: this._profile,
577
637
  label: this.snippet,
578
638
  description: "",
@@ -580,24 +640,25 @@ class Fe extends Q {
580
640
  })
581
641
  ])
582
642
  );
583
- const i = new l(this._profile, { code: "values" });
584
- if (this.variables.push(i), me(this._source)) {
585
- const s = `Geometry(${this.snippet})`, o = new a({
643
+ const i = new u(this._profile, { code: "values" });
644
+ if (this.variables.push(i), ve(this._source)) {
645
+ const n = `Geometry(${this.snippet})`, a = new l({
586
646
  profile: this._profile,
587
- declaration: { name: s },
588
- label: s,
647
+ declaration: { name: n },
648
+ label: n,
589
649
  description: "Geometry",
590
- snippet: s,
650
+ snippet: n,
591
651
  icon: "shapes",
592
652
  filterDescription: !0
593
653
  });
594
- i.variables.push(o);
654
+ i.variables.push(a);
595
655
  }
596
- F(this._source.fields).sort(K(this._source)).forEach((s) => {
597
- i.variables.push(this._getFieldProperty(s));
656
+ const r = this._source;
657
+ g(this._source.fields).map((n) => r.fields.find((a) => a.name === n.name)).sort(V(r)).forEach((n) => {
658
+ i.variables.push(this._getFieldProperty(n));
598
659
  });
599
- const r = await this._getRelationshipsProperty();
600
- r && this.variables.push(r);
660
+ const s = await this._getRelationshipsProperty();
661
+ s && this.variables.push(s);
601
662
  } catch (e) {
602
663
  console.error("Error with definition", e, this._definition), this._source = null;
603
664
  } finally {
@@ -605,26 +666,97 @@ class Fe extends Q {
605
666
  }
606
667
  return this._source;
607
668
  }
608
- toProfileVariableDefinition() {
609
- return { type: this.type, name: "", ...this.declaration, definition: this._definition };
669
+ }
670
+ class $e extends $ {
671
+ constructor(e, i) {
672
+ super(e, i, "voxel", { exposeRelationships: !1 }), this.type = "voxel", this._source = null;
673
+ }
674
+ async _loadSource() {
675
+ if (this.loaded)
676
+ return this._source;
677
+ try {
678
+ if (!xe(this._definition))
679
+ throw new Error("Invalid definition - not a VoxelLayer");
680
+ if (await this._definition.load(), this._source = this._definition, !this._source)
681
+ throw new Error("Invalid definition");
682
+ const e = h(this._source) ? this._source.title ?? "" : "";
683
+ this.variables.push(
684
+ new u(this._profile, e, [
685
+ new l({
686
+ profile: this._profile,
687
+ label: this.snippet,
688
+ description: "",
689
+ snippet: this.snippet
690
+ })
691
+ ])
692
+ );
693
+ const i = new u(this._profile, { code: "values" });
694
+ this.variables.push(i);
695
+ const r = await pe(this._source), s = this._source;
696
+ g(this._source.fields).map((n) => s.fields.find((a) => a.name === n.name)).sort(V(s)).forEach((n) => {
697
+ i.variables.push(this._getFieldProperty(n, r));
698
+ });
699
+ } catch (e) {
700
+ console.error("Error with definition", e, this._definition), this._source = null;
701
+ } finally {
702
+ this._loaded = !0;
703
+ }
704
+ return this._source;
705
+ }
706
+ }
707
+ class Le extends $ {
708
+ constructor(e, i) {
709
+ super(e, i, "pixel", { exposeRelationships: !1 }), this.type = "pixel", this._source = null;
710
+ }
711
+ async _loadSource() {
712
+ if (this.loaded)
713
+ return this._source;
714
+ try {
715
+ if (!U(this._definition))
716
+ throw new Error("Invalid definition - not an ImageryLayer");
717
+ if (await this._definition.load(), this._source = this._definition, !this._source)
718
+ throw new Error("Invalid definition");
719
+ const e = h(this._source) ? this._source.title ?? "" : "";
720
+ this.variables.push(
721
+ new u(this._profile, e, [
722
+ new l({
723
+ profile: this._profile,
724
+ label: this.snippet,
725
+ description: "",
726
+ snippet: this.snippet
727
+ })
728
+ ])
729
+ );
730
+ const i = new u(this._profile, { code: "values" });
731
+ if (this.variables.push(i), !U(this._source))
732
+ throw new Error("Invalid definition - not an ImageryLayer");
733
+ (await ce(this._source)).forEach((s) => {
734
+ i.variables.push(this._getMemberProperty(s));
735
+ });
736
+ } catch (e) {
737
+ console.error("Error with definition", e, this._definition), this._source = null;
738
+ } finally {
739
+ this._loaded = !0;
740
+ }
741
+ return this._source;
610
742
  }
611
743
  }
612
- class T extends Q {
744
+ class L extends Z {
613
745
  constructor(e, i, r = [], s) {
614
746
  super(e, i, s), this.featureSetSnippets = r, this.type = "featureSet";
615
747
  }
616
748
  get title() {
617
- return m(this._source) ? this._source.title ?? "" : { code: "featureset" };
749
+ return h(this._source) ? this._source.title ?? "" : { code: "featureset" };
618
750
  }
619
751
  async _loadSource() {
620
752
  if (this.loaded)
621
753
  return this._source;
622
754
  try {
623
- if (this._source = await q(this._definition), !this._source)
755
+ if (this._source = await Q(this._definition), !this._source)
624
756
  throw new Error("Invalid definition");
625
- this.variables.push(new l(this._profile, this.title, this.featureSetSnippets, !0));
626
- const e = new l(this._profile, { code: "fields" });
627
- this.variables.push(e), e.variables = F(this._source.fields).sort(K(this._source)).map((r) => this._getFieldProperty(r));
757
+ this.variables.push(new u(this._profile, this.title, this.featureSetSnippets, !0));
758
+ const e = new u(this._profile, { code: "fields" });
759
+ this.variables.push(e), e.variables = g(this._source.fields).sort(V(this._source)).map((r) => this._getFieldProperty(r));
628
760
  const i = await this._getRelationshipsProperty();
629
761
  i && this.variables.push(i);
630
762
  } catch (e) {
@@ -638,12 +770,12 @@ class T extends Q {
638
770
  return { type: this.type, name: "", ...this.declaration, definition: this._definition };
639
771
  }
640
772
  }
641
- class ve extends P {
773
+ class Ae extends M {
642
774
  constructor(e, i) {
643
775
  super(e, i), this.type = "featureSetCollection", this._featureSetCollections = null, this._loaded = !1, this._definition = i.declaration?.definition;
644
776
  }
645
777
  get informationUrl() {
646
- return !this.loaded || !this._featureSetCollections ? null : typeof this._featureSetCollections.source != "string" ? Y(N(this._featureSetCollections.source)) : null;
778
+ return !this.loaded || !this._featureSetCollections ? null : typeof this._featureSetCollections.source != "string" ? te(R(this._featureSetCollections.source)) : null;
647
779
  }
648
780
  get informationType() {
649
781
  if (!this.loaded || !this._featureSetCollections)
@@ -660,7 +792,7 @@ class ve extends P {
660
792
  }
661
793
  }
662
794
  async loadSource() {
663
- return w(this._loadPromise) && U(this._loadPromise) ? await this._loadPromise : (this._loadPromise = this._loadSource(), await this._loadPromise);
795
+ return C(this._loadPromise) && O(this._loadPromise) ? await this._loadPromise : (this._loadPromise = this._loadSource(), await this._loadPromise);
664
796
  }
665
797
  async _loadSource() {
666
798
  if (this.loaded)
@@ -671,16 +803,16 @@ class ve extends P {
671
803
  const e = typeof this._featureSetCollections.source == "string" ? { code: this._featureSetCollections.source.endsWith("FeatureServer") ? "featureservice" : "mapservice" } : {
672
804
  code: "webmapformat",
673
805
  formatValues: {
674
- webMapTitle: N(this._featureSetCollections.source)?.title || "Untitled map"
806
+ webMapTitle: R(this._featureSetCollections.source)?.title || "Untitled map"
675
807
  }
676
- }, i = new l(this._profile, e, [
677
- new a({
808
+ }, i = new u(this._profile, e, [
809
+ new l({
678
810
  profile: this._profile,
679
811
  label: this.snippet,
680
812
  description: "",
681
813
  snippet: this.snippet
682
814
  })
683
- ]), r = new l(this._profile, { code: "layers" }, this._featureSetCollections.layers), s = new l(this._profile, { code: "tables" }, this._featureSetCollections.tables);
815
+ ]), r = new u(this._profile, { code: "layers" }, this._featureSetCollections.layers), s = new u(this._profile, { code: "tables" }, this._featureSetCollections.tables);
684
816
  this.variables.push(i, r, s);
685
817
  } catch (e) {
686
818
  console.error("Error with definition", e, this._definition), this._featureSetCollections = null;
@@ -690,24 +822,24 @@ class ve extends P {
690
822
  return this._featureSetCollections;
691
823
  }
692
824
  async _featureSetCollectionsFromDefinition() {
693
- return this._definition ? W(this._definition) ? await this._featureSetCollectionFromMap(this._definition) : D(this._definition) ? await this._featureSetCollectionFromUrl(this._definition.url) : O(this._definition) ? await this._featureSetCollectionFromPortalItem(this._definition.portalItem) : null : null;
825
+ return this._definition ? q(this._definition) ? await this._featureSetCollectionFromMap(this._definition) : D(this._definition) ? await this._featureSetCollectionFromUrl(this._definition.url) : K(this._definition) ? await this._featureSetCollectionFromPortalItem(this._definition.portalItem) : null : null;
694
826
  }
695
827
  async _featureSetCollectionFromMap(e) {
696
- return ue(e) && await e.loadAll(), await Promise.all(e.allTables.map(async (i) => await i.load())), {
828
+ return ye(e) && await e.loadAll(), await Promise.all(e.allTables.map(async (i) => await i.load())), {
697
829
  layers: this._convertWebMapLayersToVariables(e.allLayers),
698
830
  tables: this._convertWebMapLayersToVariables(e.allTables),
699
831
  source: e
700
832
  };
701
833
  }
702
834
  async _featureSetCollectionFromPortalItem(e) {
703
- const i = new ee(e);
835
+ const i = new re(e);
704
836
  switch (await i.load(), i.type) {
705
837
  case "Web Map": {
706
- const r = new te({ portalItem: i });
838
+ const r = new se({ portalItem: i });
707
839
  return await this._featureSetCollectionFromMap(r);
708
840
  }
709
841
  case "Web Scene": {
710
- const r = new ie({ portalItem: i });
842
+ const r = new ne({ portalItem: i });
711
843
  return await this._featureSetCollectionFromMap(r);
712
844
  }
713
845
  case "Feature Service":
@@ -720,30 +852,30 @@ class ve extends P {
720
852
  let i = e?.replace(/\/featureserver\/[0-9]*/iu, "/FeatureServer");
721
853
  if (i = i?.replace(/\/mapserver\/[0-9]*/iu, "/MapServer"), i = i?.split("?")[0], !i)
722
854
  return null;
723
- const r = await De(i), s = Promise.all(
855
+ const r = await Pe(i), s = Promise.all(
724
856
  r.layers.map(async (c) => {
725
- const p = new b({ url: `${i}/${c.id}` });
857
+ const p = new m({ url: `${i}/${c.id}` });
726
858
  return await p.load(), this._createFeatureSetVariable(p);
727
859
  })
728
- ), o = Promise.all(
860
+ ), n = Promise.all(
729
861
  r.tables.map(async (c) => {
730
- const p = new b({ url: `${i}/${c.id}` });
862
+ const p = new m({ url: `${i}/${c.id}` });
731
863
  return await p.load(), this._createFeatureSetVariable(p);
732
864
  })
733
- ), [u, n] = await Promise.all([s, o]);
734
- return { layers: u, tables: n, source: i };
865
+ ), [a, o] = await Promise.all([s, n]);
866
+ return { layers: a, tables: o, source: i };
735
867
  }
736
868
  _convertWebMapLayersToVariables(e) {
737
869
  const i = [];
738
870
  return e.toArray().reverse().forEach((r) => {
739
- if (B(r)) {
871
+ if (k(r)) {
740
872
  i.push(this._createFeatureSetVariable(r, !0));
741
873
  return;
742
874
  }
743
875
  }), i;
744
876
  }
745
877
  _createFeatureSetVariable(e, i = !1) {
746
- return new T(
878
+ return new L(
747
879
  this,
748
880
  {
749
881
  profile: this._profile,
@@ -761,19 +893,19 @@ class ve extends P {
761
893
  if (i) {
762
894
  const r = `FeatureSetById(${this.snippet}, "${e.id}")`, s = `FeatureSetByName(${this.snippet}, "${e.title}")`;
763
895
  return [
764
- new a({ profile: this._profile, label: r, description: "", snippet: r }),
765
- new a({ profile: this._profile, label: s, description: "", snippet: s })
896
+ new l({ profile: this._profile, label: r, description: "", snippet: r }),
897
+ new l({ profile: this._profile, label: s, description: "", snippet: s })
766
898
  ];
767
899
  } else {
768
900
  const r = `FeatureSetById(${this.snippet}, "${e.layerId}")`;
769
- return [new a({ profile: this._profile, label: r, description: "", snippet: r })];
901
+ return [new l({ profile: this._profile, label: r, description: "", snippet: r })];
770
902
  }
771
903
  }
772
904
  toProfileVariableDefinition() {
773
905
  return { type: this.type, name: "", ...this.declaration, definition: this._definition };
774
906
  }
775
907
  }
776
- class Ke extends d {
908
+ class st extends y {
777
909
  constructor(e, i, r = "en") {
778
910
  super(void 0, {
779
911
  profile: null,
@@ -797,15 +929,15 @@ class Ke extends d {
797
929
  };
798
930
  }
799
931
  }
800
- const Pe = {
932
+ const Ge = {
801
933
  locale: "en"
802
934
  };
803
- class ze {
935
+ class nt {
804
936
  // #endregion
805
937
  constructor(e, i) {
806
- this.languageId = e, this._apiConfig = i, this._onDidChange = new $(), this._modelToProfileMap = /* @__PURE__ */ new Map(), this._modelToApiContextMap = /* @__PURE__ */ new Map(), this._localeToApiLibraryPromiseMap = /* @__PURE__ */ new Map(), this._onModelContextDidChange = new $(), this._onDidModelContextChangeTimeout = -1, this.workerHost = {
938
+ this.languageId = e, this._apiConfig = i, this._onDidChange = new G(), this._modelToProfileMap = /* @__PURE__ */ new Map(), this._modelToApiContextMap = /* @__PURE__ */ new Map(), this._localeToApiLibraryPromiseMap = /* @__PURE__ */ new Map(), this._onModelContextDidChange = new G(), this._onDidModelContextChangeTimeout = -1, this.workerHost = {
807
939
  getApiLibrary: async (r) => await this.getApiLibrary(r)
808
- }, Z().then((r) => {
940
+ }, ie().then((r) => {
809
941
  r.onWillDisposeModel((s) => {
810
942
  this.disposeForModel(s.uri);
811
943
  });
@@ -818,7 +950,7 @@ class ze {
818
950
  }, 0));
819
951
  }
820
952
  _getApiKey(e) {
821
- return A.isUri(e) || (e = A.parse(e)), e.toString();
953
+ return E.isUri(e) || (e = E.parse(e)), e.toString();
822
954
  }
823
955
  // #endregion
824
956
  // #region Public methods
@@ -847,7 +979,7 @@ class ze {
847
979
  * @returns The API context for the model.
848
980
  */
849
981
  getApiContextForModel(e) {
850
- return this._modelToApiContextMap.get(this._getApiKey(e)) ?? Pe;
982
+ return this._modelToApiContextMap.get(this._getApiKey(e)) ?? Ge;
851
983
  }
852
984
  /**
853
985
  * Set or update api context for the given model id.
@@ -868,31 +1000,34 @@ class ze {
868
1000
  */
869
1001
  async getApiLibraryForModel(e) {
870
1002
  const i = this.getApiContextForModel(e), r = this.getApiLibrary(i.locale ?? "en");
871
- return (await le(r, i)).categories;
1003
+ return (await de(r, i)).categories;
872
1004
  }
873
1005
  // #endregion
874
1006
  //#region Private methods
875
1007
  async fetchApiLibrary(e) {
876
1008
  try {
877
- const { apiPath: i, apiPrefix: r } = this._apiConfig, s = oe(`${i}/${r}${e}.json`), o = await fetch(s);
878
- return o.ok ? await o.json() : [];
1009
+ const { apiPath: i, apiPrefix: r } = this._apiConfig, s = he(`${i}/${r}${e}.json`), n = await fetch(s);
1010
+ return n.ok ? await n.json() : [];
879
1011
  } catch {
880
1012
  return [];
881
1013
  }
882
1014
  }
883
1015
  async getApiLibrary(e) {
884
- const i = ae(e);
1016
+ const i = fe(e);
885
1017
  return this._localeToApiLibraryPromiseMap.has(i) || this._localeToApiLibraryPromiseMap.set(i, this.fetchApiLibrary(i)), await this._localeToApiLibraryPromiseMap.get(i) ?? [];
886
1018
  }
887
1019
  // #endregion
888
1020
  }
889
1021
  export {
890
- Ke as E,
891
- ze as L,
892
- Oe as a,
893
- B as b,
894
- Re as c,
895
- We as d,
896
- qe as f,
897
- ke as i
1022
+ st as E,
1023
+ nt as L,
1024
+ Ze as a,
1025
+ k as b,
1026
+ et as c,
1027
+ Xe as d,
1028
+ Ye as e,
1029
+ it as f,
1030
+ H as g,
1031
+ tt as i,
1032
+ rt as m
898
1033
  };