@arcgis/coding-components 5.1.0-next.87 → 5.1.0-next.89

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 (92) hide show
  1. package/dist/cdn/3VRELPEF.js +2 -0
  2. package/dist/cdn/4B64NBIM.js +2 -0
  3. package/dist/cdn/5DAIGIIS.js +2 -0
  4. package/dist/cdn/6EKA3H3N.js +2 -0
  5. package/dist/cdn/6G5URSC7.js +2 -0
  6. package/dist/cdn/{BVNLUX5A.js → 6HL5GBWZ.js} +1 -1
  7. package/dist/cdn/7B33SKQD.js +2 -0
  8. package/dist/cdn/{GJMI6M3I.js → BA546EMZ.js} +1 -1
  9. package/dist/cdn/{2PRSVBDA.js → BKBBI4SA.js} +1 -1
  10. package/dist/cdn/BQISDYES.js +2 -0
  11. package/dist/cdn/E3TJIEWT.js +2 -0
  12. package/dist/cdn/FEYQMPLI.js +2 -0
  13. package/dist/cdn/GLJQQLP2.js +2 -0
  14. package/dist/cdn/{4I7VT4LW.js → I22MLDO4.js} +1 -1
  15. package/dist/cdn/ID3QICBM.js +4 -0
  16. package/dist/cdn/IIER7Z56.js +2 -0
  17. package/dist/cdn/{LWXQURWG.js → ILQJDTTW.js} +1 -1
  18. package/dist/cdn/JIBWBXDI.js +3 -0
  19. package/dist/cdn/{KEROXLGY.js → JT3FBAVQ.js} +1 -1
  20. package/dist/cdn/KA5TX72B.js +64 -0
  21. package/dist/cdn/MC6EICRD.js +2 -0
  22. package/dist/cdn/MJ7MJPGA.js +2 -0
  23. package/dist/cdn/MTIHPCIF.js +2 -0
  24. package/dist/cdn/N75AXIUZ.js +2 -0
  25. package/dist/cdn/NEIT2PGG.js +2 -0
  26. package/dist/cdn/{N7KYUPBV.js → NK5J27LM.js} +1 -1
  27. package/dist/cdn/NKJUJKFG.js +2 -0
  28. package/dist/cdn/NZDJGAT2.js +2 -0
  29. package/dist/cdn/{JHVMGSI2.js → OI3DH7N2.js} +1 -1
  30. package/dist/cdn/QMNQFBIA.js +4 -0
  31. package/dist/cdn/{INPMAY4D.js → SM3MA3KP.js} +1 -1
  32. package/dist/cdn/SMAQD57G.js +2 -0
  33. package/dist/cdn/{6XDEGPYR.js → UOQZCTHQ.js} +1 -1
  34. package/dist/cdn/{QOX2FNYP.js → VA6SZILK.js} +1 -1
  35. package/dist/cdn/VKNLGQFU.js +2 -0
  36. package/dist/cdn/{YLJUOSJJ.js → XBM4ZDJT.js} +1 -1
  37. package/dist/cdn/YVF4PPDB.js +2 -0
  38. package/dist/cdn/assets/arcade-debugger-console/t9n/messages.en.json +1 -0
  39. package/dist/cdn/assets/arcade-debugger-output/t9n/messages.en.json +1 -0
  40. package/dist/cdn/assets/arcade-editor/t9n/messages.en.json +1 -1
  41. package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
  42. package/dist/cdn/index.js +1 -1
  43. package/dist/chunks/ArcadeDebuggerPreviewTabsState.js +178 -0
  44. package/dist/chunks/arcade-executor.js +76 -67
  45. package/dist/chunks/arcade-service-accessors.js +2 -2
  46. package/dist/chunks/colorize.js +9 -9
  47. package/dist/chunks/debugger-value-components.js +275 -0
  48. package/dist/chunks/debugger-value-styles.js +171 -0
  49. package/dist/chunks/functional.js +83 -0
  50. package/dist/chunks/setup-monaco-theme.js +1 -1
  51. package/dist/chunks/utilities.js +44 -34
  52. package/dist/components/arcgis-arcade-debugger-console/customElement.js +201 -0
  53. package/dist/components/arcgis-arcade-debugger-console/index.js +11 -0
  54. package/dist/components/arcgis-arcade-debugger-output/customElement.js +42 -0
  55. package/dist/components/arcgis-arcade-debugger-output/index.js +5 -0
  56. package/dist/components/arcgis-arcade-editor/customElement.d.ts +34 -1
  57. package/dist/components/arcgis-arcade-editor/customElement.js +639 -111
  58. package/dist/components/arcgis-arcade-editor/index.js +2 -0
  59. package/dist/components/arcgis-arcade-results/customElement.js +52 -155
  60. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  61. package/dist/components/arcgis-code-editor-shell/customElement.d.ts +2 -1
  62. package/dist/components/arcgis-code-editor-shell/customElement.js +17 -8
  63. package/dist/components/arcgis-code-viewer/customElement.d.ts +28 -1
  64. package/dist/components/arcgis-code-viewer/customElement.js +65 -52
  65. package/dist/docs/api.json +1 -1
  66. package/dist/docs/docs.json +1 -1
  67. package/dist/docs/vscode.html-custom-data.json +1 -1
  68. package/dist/docs/web-types.json +1 -1
  69. package/dist/loader.js +5 -3
  70. package/dist/types/lumina.d.ts +2 -2
  71. package/dist/types/preact.d.ts +2 -2
  72. package/dist/types/react.d.ts +2 -2
  73. package/dist/types/stencil.d.ts +2 -2
  74. package/dist/utils/arcade-executor.d.ts +2 -1
  75. package/package.json +5 -5
  76. package/dist/cdn/3GNGWLOI.js +0 -2
  77. package/dist/cdn/3UZ3JCYW.js +0 -4
  78. package/dist/cdn/43A7UCSS.js +0 -2
  79. package/dist/cdn/4Y64BGY2.js +0 -2
  80. package/dist/cdn/BGQRJR32.js +0 -2
  81. package/dist/cdn/CPJ4MNMY.js +0 -2
  82. package/dist/cdn/G2Z2DNVW.js +0 -2
  83. package/dist/cdn/ISAWP6I3.js +0 -2
  84. package/dist/cdn/IVNVT7UT.js +0 -2
  85. package/dist/cdn/KD7MZWFX.js +0 -2
  86. package/dist/cdn/MSV4QVR2.js +0 -2
  87. package/dist/cdn/PX32GRG7.js +0 -2
  88. package/dist/cdn/QRXX4WHP.js +0 -3
  89. package/dist/cdn/T4G2IY4F.js +0 -2
  90. package/dist/cdn/TTOHS2DV.js +0 -11
  91. package/dist/cdn/VUYXKN7I.js +0 -2
  92. package/dist/cdn/YMEY2NOQ.js +0 -4
@@ -0,0 +1,178 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import p from "@arcgis/core/core/Accessor.js";
3
+ import { property as d, subclass as v } from "@arcgis/core/core/accessorSupport/decorators.js";
4
+ var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor, r = (t, s, e, i) => {
5
+ for (var a = i > 1 ? void 0 : i ? g(s, e) : s, n = t.length - 1, c; n >= 0; n--)
6
+ (c = t[n]) && (a = (i ? c(s, e, a) : c(a)) || a);
7
+ return i && a && f(s, e, a), a;
8
+ };
9
+ const b = "scope";
10
+ function l(t) {
11
+ return `preview:${t}`;
12
+ }
13
+ function u(t) {
14
+ const e = t.split(".").filter(Boolean).at(-1) ?? t;
15
+ return e.length > 9 ? `${e.slice(0, 12)}...` : e;
16
+ }
17
+ let o = class extends p {
18
+ constructor(t) {
19
+ super(t), this.fields = [], this.id = "", this.invalidated = !1, this.label = "", this.message = "", this.requestId = 0, this.rows = [], this.sourcePath = "", this.status = "idle", this.title = "";
20
+ }
21
+ };
22
+ r([
23
+ d()
24
+ ], o.prototype, "fields", 2);
25
+ r([
26
+ d()
27
+ ], o.prototype, "id", 2);
28
+ r([
29
+ d()
30
+ ], o.prototype, "invalidated", 2);
31
+ r([
32
+ d()
33
+ ], o.prototype, "label", 2);
34
+ r([
35
+ d()
36
+ ], o.prototype, "message", 2);
37
+ r([
38
+ d()
39
+ ], o.prototype, "requestId", 2);
40
+ r([
41
+ d()
42
+ ], o.prototype, "rows", 2);
43
+ r([
44
+ d()
45
+ ], o.prototype, "sourcePath", 2);
46
+ r([
47
+ d()
48
+ ], o.prototype, "status", 2);
49
+ r([
50
+ d()
51
+ ], o.prototype, "title", 2);
52
+ o = r([
53
+ v("ArcadeDebuggerPreviewTabState")
54
+ ], o);
55
+ let h = class extends p {
56
+ constructor(t) {
57
+ super(t), this.activeTabId = b, this.tabs = [], this.revision = 0, this.tabsById = /* @__PURE__ */ new Map();
58
+ }
59
+ /**
60
+ * The active tab's state.
61
+ */
62
+ get activeTab() {
63
+ return this.tabsById.get(this.activeTabId);
64
+ }
65
+ /**
66
+ * Clears all preview tabs and resets to the default state with only the scope tab available.
67
+ */
68
+ clear() {
69
+ this.revision += 1, this.activeTabId = b, this.destroyTabs();
70
+ }
71
+ /**
72
+ * Closes a specific tab by id.
73
+ * If the closed tab is active, the first adjacent tab will be activated.
74
+ */
75
+ closeTab(t) {
76
+ const s = this.tabs.findIndex((n) => n.id === t);
77
+ if (s < 0)
78
+ return;
79
+ const e = this.activeTabId === t, i = this.tabs[s + 1] ?? this.tabs[s - 1], a = this.tabs[s];
80
+ this.tabsById.delete(t), a.destroy(), this.tabs = this.tabs.filter((n) => n.id !== t), e && (this.activeTabId = i?.id ?? b);
81
+ }
82
+ /**
83
+ * Ensures a preview tab exists for the given label and source path, creating it if necessary, and returns the tab state.
84
+ */
85
+ getOrCreateTab(t, s) {
86
+ const e = l(t), i = this.tabsById.get(e);
87
+ if (i)
88
+ return i.label = t, i.sourcePath = s, i.title = u(t), i;
89
+ const a = new o();
90
+ return a.id = e, a.label = t, a.sourcePath = s, a.title = u(t), this.tabsById.set(e, a), this.tabs = [...this.tabs, a], a;
91
+ }
92
+ /**
93
+ * Returns the tab state for a given tab id.
94
+ */
95
+ getTab(t) {
96
+ return this.tabsById.get(t);
97
+ }
98
+ /**
99
+ * Invalidates all tabs.
100
+ * This is used to mark all existing preview data as stale.
101
+ */
102
+ invalidateAll() {
103
+ this.revision += 1, this.activeTabId = b;
104
+ for (const t of this.tabs)
105
+ t.invalidated = !0, this.resetTab(t);
106
+ }
107
+ isTabLoading(t) {
108
+ return this.tabsById.get(l(t))?.status === "loading";
109
+ }
110
+ /**
111
+ * Selects the scope tab, which is the default tab that shows variable scopes when debugging.
112
+ */
113
+ selectScope() {
114
+ this.activeTabId = b;
115
+ }
116
+ /**
117
+ * Selects a specific tab by id, if it exists. If the scope tab id is provided, selects the scope tab instead.
118
+ */
119
+ selectTab(t) {
120
+ if (t === b) {
121
+ this.selectScope();
122
+ return;
123
+ }
124
+ this.tabsById.has(t) && (this.activeTabId = t);
125
+ }
126
+ /**
127
+ * Starts loading data for a specific preview tab.
128
+ */
129
+ startLoad(t, s) {
130
+ const e = this.getOrCreateTab(t, s), i = e.requestId + 1;
131
+ return e.requestId = i, e.invalidated = !1, this.resetTab(e), e.status = "loading", this.activeTabId = e.id, {
132
+ snapshot: {
133
+ revision: this.revision,
134
+ requestId: i,
135
+ tabId: e.id
136
+ },
137
+ tab: e
138
+ };
139
+ }
140
+ setError(t, s) {
141
+ const e = this.validateSnapshot(t);
142
+ e && (e.status = "error", e.message = s);
143
+ }
144
+ setLoaded(t, s, e) {
145
+ const i = this.validateSnapshot(t);
146
+ i && (i.status = "loaded", i.message = "", i.fields = s, i.rows = e);
147
+ }
148
+ setUnavailable(t, s) {
149
+ const e = this.validateSnapshot(t);
150
+ e && (e.status = "unavailable", e.message = s, e.fields = [], e.rows = []);
151
+ }
152
+ destroyTabs() {
153
+ for (const t of this.tabsById.values())
154
+ t.destroy();
155
+ this.tabsById.clear(), this.tabs = [];
156
+ }
157
+ resetTab(t) {
158
+ t.status = "idle", t.message = "", t.fields = [], t.rows = [];
159
+ }
160
+ validateSnapshot(t) {
161
+ const s = this.tabsById.get(t.tabId);
162
+ if (!(!s || this.revision !== t.revision || s.requestId !== t.requestId))
163
+ return s;
164
+ }
165
+ };
166
+ r([
167
+ d()
168
+ ], h.prototype, "activeTabId", 2);
169
+ r([
170
+ d()
171
+ ], h.prototype, "tabs", 2);
172
+ h = r([
173
+ v("ArcadeDebuggerPreviewTabsState")
174
+ ], h);
175
+ export {
176
+ h as A,
177
+ b as d
178
+ };
@@ -1,83 +1,91 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { createArcadeExecutor as C } from "@arcgis/core/arcade.js";
3
- const O = "https://developers.arcgis.com/arcade/", P = 100, A = 100;
4
- function g(t) {
5
- return !!t && typeof t == "object" && "declaredRootClass" in t && typeof t.declaredRootClass == "string" && t.declaredRootClass === "esri.arcade.featureset.support.FeatureSet";
2
+ import { createArcadeDebugExecutor as A, createArcadeExecutor as b } from "@arcgis/core/arcade.js";
3
+ import w from "@arcgis/core/geometry/SpatialReference.js";
4
+ const K = "https://developers.arcgis.com/arcade/", M = 100, D = 100;
5
+ function R(e) {
6
+ return !!e && typeof e == "object" && "declaredRootClass" in e && typeof e.declaredRootClass == "string" && e.declaredRootClass === "esri.arcade.featureset.support.FeatureSet";
6
7
  }
7
- function u(t) {
8
- return !!t && typeof t == "object" && "arcadeDeclaredClass" in t && typeof t.arcadeDeclaredClass == "string" && t.arcadeDeclaredClass === "esri.arcade.Feature";
8
+ function x(e) {
9
+ return !!e && typeof e == "object" && "arcadeDeclaredClass" in e && typeof e.arcadeDeclaredClass == "string" && e.arcadeDeclaredClass === "esri.arcade.Feature";
9
10
  }
10
- function b(t) {
11
- return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass === "esri.arcade.Dictionary";
11
+ function S(e) {
12
+ return !!e && typeof e == "object" && "declaredClass" in e && typeof e.declaredClass == "string" && e.declaredClass === "esri.arcade.Dictionary";
12
13
  }
13
- function R(t) {
14
- return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass.startsWith("esri.geometry.");
14
+ function h(e) {
15
+ return !!e && typeof e == "object" && "declaredClass" in e && typeof e.declaredClass == "string" && e.declaredClass.startsWith("esri.geometry.");
15
16
  }
16
- function w(t) {
17
- return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass.startsWith("esri.rest.knowledgeGraph.KnowledgeGraph");
17
+ function T(e) {
18
+ return !!e && typeof e == "object" && "declaredClass" in e && typeof e.declaredClass == "string" && e.declaredClass.startsWith("esri.rest.knowledgeGraph.KnowledgeGraph");
18
19
  }
19
- function D(t) {
20
- return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass === "esri.arcade.Portal";
20
+ function F(e) {
21
+ return !!e && typeof e == "object" && "declaredClass" in e && typeof e.declaredClass == "string" && e.declaredClass === "esri.arcade.Portal";
21
22
  }
22
- function h(t) {
23
- return !!t && typeof t == "object" && "declaredClass" in t && typeof t.declaredClass == "string" && t.declaredClass === "esri.arcade.Attachment";
23
+ function j(e) {
24
+ return !!e && typeof e == "object" && "declaredClass" in e && typeof e.declaredClass == "string" && e.declaredClass === "esri.arcade.Attachment";
24
25
  }
25
- function x(t) {
26
- return !!t && typeof t == "object" && "declaredRootClass" in t && typeof t.declaredRootClass == "string" && t.declaredRootClass === "esri.arcade.arcadedate";
26
+ function k(e) {
27
+ return !!e && typeof e == "object" && "declaredRootClass" in e && typeof e.declaredRootClass == "string" && e.declaredRootClass === "esri.arcade.arcadedate";
27
28
  }
28
- function S(t) {
29
- return !!t && typeof t == "object" && "declaredRootClass" in t && typeof t.declaredRootClass == "string" && t.declaredRootClass === "esri.core.sql.dateonly";
29
+ function P(e) {
30
+ return !!e && typeof e == "object" && "declaredRootClass" in e && typeof e.declaredRootClass == "string" && e.declaredRootClass === "esri.core.sql.dateonly";
30
31
  }
31
- function F(t) {
32
- return !!t && typeof t == "object" && "declaredRootClass" in t && typeof t.declaredRootClass == "string" && t.declaredRootClass === "esri.core.sql.timeonly";
32
+ function Z(e) {
33
+ return !!e && typeof e == "object" && "declaredRootClass" in e && typeof e.declaredRootClass == "string" && e.declaredRootClass === "esri.core.sql.timeonly";
33
34
  }
34
- function T(t) {
35
- return !!t && typeof t == "object" && "arcadeDeclaredClass" in t && typeof t.arcadeDeclaredClass == "string" && t.arcadeDeclaredClass === "esri.arcade.Pixel";
35
+ function G(e) {
36
+ return !!e && typeof e == "object" && "arcadeDeclaredClass" in e && typeof e.arcadeDeclaredClass == "string" && e.arcadeDeclaredClass === "esri.arcade.Pixel";
36
37
  }
37
- function j(t) {
38
- return !!t && typeof t == "object" && "length" in t && typeof t.length == "function" && "get" in t && typeof t.get == "function" && "toArray" in t && typeof t.toArray == "function" && "_elements" in t && Array.isArray(t._elements);
38
+ function O(e) {
39
+ return !!e && typeof e == "object" && "length" in e && typeof e.length == "function" && "get" in e && typeof e.get == "function" && "toArray" in e && typeof e.toArray == "function" && "_elements" in e && Array.isArray(e._elements);
39
40
  }
40
- function Z(t) {
41
- return t == null ? { type: "null" } : Array.isArray(t) ? { type: "array", value: t } : j(t) ? { type: "array", value: t.toArray() } : t instanceof Date ? { type: "date", value: t } : typeof t == "string" ? { type: "text", value: t } : typeof t == "number" ? { type: "number", value: t } : typeof t == "boolean" ? { type: "boolean", value: t } : typeof t != "object" ? { type: "unknown" } : x(t) ? { type: "date", value: t } : S(t) ? { type: "dateOnly", value: t } : F(t) ? { type: "time", value: t } : h(t) ? { type: "attachment", value: t } : D(t) ? { type: "portal", value: t } : g(t) ? { type: "featureSet", value: t, features: [], iterator: null } : u(t) ? { type: "feature", value: t } : T(t) ? { type: "pixel", value: t } : b(t) ? { type: "dictionary", value: t } : R(t) ? { type: "geometry", value: t } : w(t) ? { type: "knowledgeGraph", value: t } : { type: "unknown" };
41
+ function E(e) {
42
+ return e == null ? { type: "null" } : Array.isArray(e) ? { type: "array", value: e } : O(e) ? { type: "array", value: e.toArray() } : e instanceof Date ? { type: "date", value: e } : typeof e == "string" ? { type: "text", value: e } : typeof e == "number" ? { type: "number", value: e } : typeof e == "boolean" ? { type: "boolean", value: e } : typeof e != "object" ? { type: "unknown" } : k(e) ? { type: "date", value: e } : P(e) ? { type: "dateOnly", value: e } : Z(e) ? { type: "time", value: e } : j(e) ? { type: "attachment", value: e } : F(e) ? { type: "portal", value: e } : R(e) ? { type: "featureSet", value: e, features: [], iterator: null } : x(e) ? { type: "feature", value: e } : G(e) ? { type: "pixel", value: e } : S(e) ? { type: "dictionary", value: e } : h(e) ? { type: "geometry", value: e } : T(e) ? { type: "knowledgeGraph", value: e } : { type: "unknown" };
42
43
  }
43
- function I(t, r = "en") {
44
- return t.value instanceof Date ? new Intl.DateTimeFormat(r, { dateStyle: "medium", timeStyle: "long" }).format(t.value) : t.value.toDateTime().setLocale(r).toFormat(t.value.isUnknownTimeZone ? "FF" : "FF ZZZZZ");
44
+ function U(e, r = "en") {
45
+ return e.value instanceof Date ? new Intl.DateTimeFormat(r, { dateStyle: "medium", timeStyle: "long" }).format(e.value) : e.value.toDateTime().setLocale(r).toFormat(e.value.isUnknownTimeZone ? "FF" : "FF ZZZZZ");
45
46
  }
46
- function B(t) {
47
- return t.value.toString();
47
+ function _(e) {
48
+ return e.value.toString();
48
49
  }
49
- function E(t) {
50
- return t.value.toString();
50
+ function z(e) {
51
+ return e.value.toString();
51
52
  }
52
- async function k(t, r = "system") {
53
- const e = Z(t);
54
- return e.type !== "featureSet" || (await e.value.load(), e.iterator = e.value.iterator({ aborted: !1 }), e.features = await e.iterator.nextBatchAsArcadeFeatures(A, r) ?? []), e;
53
+ async function I(e, r = "system") {
54
+ const t = E(e);
55
+ return t.type !== "featureSet" || (await t.value.load(), t.iterator = t.value.iterator({ aborted: !1 }), t.features = await t.iterator.nextBatchAsArcadeFeatures(D, r) ?? []), t;
55
56
  }
56
- async function W(t, r, e, i) {
57
- const a = /* @__PURE__ */ new Date();
58
- i ??= () => {
57
+ function L(e) {
58
+ return "compilationTime" in e || "executionTime" in e || "timeStamp" in e;
59
+ }
60
+ async function V(e, r, t, n = {}) {
61
+ const a = /* @__PURE__ */ new Date(), c = n.mode ?? "run";
62
+ n.console ??= () => {
59
63
  };
60
64
  try {
61
- const n = performance.now(), o = await C(r ?? "", {
62
- variables: t?.variables ?? []
63
- }), c = performance.now(), { profileVariableInstances: f, spatialReference: y, timeZone: d, services: p } = e, m = {
64
- spatialReference: y,
65
- timeZone: d,
66
- rawOutput: !0,
67
- console: i,
68
- services: p
69
- }, l = await o.executeAsync(
70
- f,
71
- // TODO: the core type is updated and we should be able to remove this cast
72
- m
73
- ), s = await k(l, d);
74
- return s.timeStamp = a, s.compilationTime = c - n, s.executionTime = performance.now() - c, s;
75
- } catch (n) {
76
- let o = "Unknown Error";
77
- return n instanceof Error && (o = n.message), {
65
+ const o = performance.now(), s = r ?? "", d = {
66
+ variables: e?.variables ?? []
67
+ }, m = c === "debug" ? await A(s, d, {
68
+ services: {
69
+ debugger: n.onDebugPause ? { pause: n.onDebugPause } : void 0
70
+ },
71
+ breakpoints: n.breakpoints
72
+ }) : await b(s, d), f = performance.now(), { profileVariableInstances: l, spatialReference: u, timeZone: p, services: g } = t, C = {
73
+ spatialReference: new w({ wkid: u?.wkid ?? 3857 }),
74
+ timeZone: p,
75
+ console: n.console,
76
+ services: g,
77
+ rawOutput: !0
78
+ }, y = await m.executeAsync(l, C);
79
+ if (c === "debug")
80
+ return y;
81
+ const i = await I(y, p);
82
+ return i.timeStamp = a, i.compilationTime = f - o, i.executionTime = performance.now() - f, i;
83
+ } catch (o) {
84
+ let s = "Unknown Error";
85
+ return o instanceof Error && (s = o.message), {
78
86
  type: "error",
79
- value: o,
80
- error: n,
87
+ value: s,
88
+ error: o,
81
89
  timeStamp: a,
82
90
  compilationTime: 0,
83
91
  executionTime: 0
@@ -85,12 +93,13 @@ async function W(t, r, e, i) {
85
93
  }
86
94
  }
87
95
  export {
88
- A as B,
89
- O as D,
90
- P as M,
91
- B as a,
92
- I as b,
93
- W as e,
94
- E as f,
95
- Z as v
96
+ D as B,
97
+ K as D,
98
+ M,
99
+ _ as a,
100
+ U as b,
101
+ V as e,
102
+ z as f,
103
+ L as i,
104
+ E as v
96
105
  };
@@ -98,7 +98,7 @@ async function k() {
98
98
  return await import("./arcade-mode.js");
99
99
  }
100
100
  export {
101
- k as a,
102
- E as g,
101
+ E as a,
102
+ k as g,
103
103
  U as s
104
104
  };
@@ -1,24 +1,24 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import { i } from "./monaco-importer.js";
3
- import { StandaloneServices as r } from "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
3
+ import { StandaloneServices as t } from "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
4
4
  import { IStandaloneThemeService as n } from "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
5
5
  import { generateTokensCSSForColorMap as a } from "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
6
6
  async function c(e, o) {
7
- return await (await i()).colorize(e, o, { tabSize: 2 });
7
+ return (await (await i()).colorize(e, o, { tabSize: 2 })).replace(/<br\s*\/?>$/u, "");
8
8
  }
9
- async function C(e, o, t) {
10
- e?.tagName === "CODE" && (e.innerHTML = await c(o ?? "", t));
9
+ async function S(e, o, r) {
10
+ e?.tagName === "CODE" && (e.innerHTML = await c(o ?? "", r));
11
11
  }
12
- function S() {
13
- const o = r.get(n).getColorTheme();
12
+ function d() {
13
+ const o = t.get(n).getColorTheme();
14
14
  return a(o.tokenTheme.getColorMap());
15
15
  }
16
16
  function g(e) {
17
- return r.get(n).onDidColorThemeChange(() => e());
17
+ return t.get(n).onDidColorThemeChange(() => e());
18
18
  }
19
19
  export {
20
- C as a,
20
+ S as a,
21
21
  c,
22
- S as g,
22
+ d as g,
23
23
  g as o
24
24
  };