@arcgis/coding-components 5.2.0-next.110 → 5.2.0-next.112

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 (204) hide show
  1. package/dist/cdn/2D4U4CLP.js +2 -0
  2. package/dist/cdn/{QVQ2F4FZ.js → 2PRBQXD6.js} +2 -2
  3. package/dist/cdn/{S2C4HKOX.js → 2SCD7KX4.js} +2 -2
  4. package/dist/cdn/{FGLIEVP7.js → 2TM3P5BM.js} +2 -2
  5. package/dist/cdn/{DM652BN5.js → 2VEQTRYC.js} +2 -2
  6. package/dist/cdn/{2F63EE2U.js → 2YJMSLBY.js} +2 -2
  7. package/dist/cdn/{UFXE4IZN.js → 2ZNNQF33.js} +2 -2
  8. package/dist/cdn/{YNL5IR5N.js → 3HICEKL5.js} +2 -2
  9. package/dist/cdn/{JE5OL4CR.js → 3IIYWUMQ.js} +2 -2
  10. package/dist/cdn/{PAKESORJ.js → 3QA7M6CT.js} +2 -2
  11. package/dist/cdn/{ETWIM3JN.js → 3YUOOZQC.js} +2 -2
  12. package/dist/cdn/{X4E3DMKU.js → 43C5J4GE.js} +2 -2
  13. package/dist/cdn/{FXVHXXMO.js → 46HXMXDY.js} +2 -2
  14. package/dist/cdn/{75S5WTKO.js → 4TJFIFRU.js} +2 -2
  15. package/dist/cdn/{TMDKU727.js → 4VR6NKWG.js} +2 -2
  16. package/dist/cdn/{DE7DTRJU.js → 53BLLGWD.js} +2 -2
  17. package/dist/cdn/{5D42Q6HZ.js → 57OI3HYY.js} +2 -2
  18. package/dist/cdn/{GBR2RZWQ.js → 5BDVHLU3.js} +2 -2
  19. package/dist/cdn/{OCP4ARTL.js → 5HKDO4SX.js} +1 -1
  20. package/dist/cdn/{MI25Z4XR.js → 5KM3AKLY.js} +2 -2
  21. package/dist/cdn/{5EQ47LC5.js → 6CZQZTMF.js} +2 -2
  22. package/dist/cdn/{72HVECOM.js → 6JE7UXRZ.js} +2 -2
  23. package/dist/cdn/{ENGVAUVW.js → 6NHGNIVD.js} +2 -2
  24. package/dist/cdn/{WAXOC3S3.js → 6NKJB46V.js} +2 -2
  25. package/dist/cdn/{P4YHKVWH.js → 6W4UAJL7.js} +2 -2
  26. package/dist/cdn/{HP6QCNY5.js → 7627LBHY.js} +2 -2
  27. package/dist/cdn/{LGXTHIN5.js → 7BW4HK2A.js} +2 -2
  28. package/dist/cdn/{FFUK5H35.js → 7CO7POPG.js} +2 -2
  29. package/dist/cdn/{IY4WENNM.js → 7DK3ZTRU.js} +2 -2
  30. package/dist/cdn/{4GNE5NUG.js → 7IS2FKEF.js} +2 -2
  31. package/dist/cdn/{DIPC5YOM.js → 7OK7ZF7N.js} +2 -2
  32. package/dist/cdn/{2CW2NG6F.js → 7VS5GHCL.js} +2 -2
  33. package/dist/cdn/{FZNEFP52.js → 7Z6G332Z.js} +1 -1
  34. package/dist/cdn/{TEKFIWYR.js → ADOCXALG.js} +2 -2
  35. package/dist/cdn/{J4QEQUQU.js → AHV3AN6P.js} +2 -2
  36. package/dist/cdn/{U2CLVIBS.js → AK3FYTHS.js} +2 -2
  37. package/dist/cdn/{XHS2XIEP.js → BFPEJYVB.js} +1 -1
  38. package/dist/cdn/{77VUY2BM.js → BHSILWSL.js} +2 -2
  39. package/dist/cdn/{ZG7GR73C.js → BXWGMUCF.js} +2 -2
  40. package/dist/cdn/{SO2TOJKE.js → C7FU7YNV.js} +2 -2
  41. package/dist/cdn/{L7BKLGBU.js → CEVSS7MF.js} +2 -2
  42. package/dist/cdn/{KCD2HNNA.js → CLAJKAD4.js} +2 -2
  43. package/dist/cdn/{NCLDVE2T.js → CLPF64WZ.js} +2 -2
  44. package/dist/cdn/{YD6KUKDR.js → CMRUQ3BN.js} +3 -3
  45. package/dist/cdn/{PFKN4QUY.js → CNEKU4E5.js} +2 -2
  46. package/dist/cdn/{SCA6T4TV.js → CPU5A7GB.js} +2 -2
  47. package/dist/cdn/{VNVJ2BIK.js → CSJQLSJC.js} +2 -2
  48. package/dist/cdn/{NRXVZLS2.js → DAVBQKOS.js} +2 -2
  49. package/dist/cdn/{CGOWYFRJ.js → DCWOXZNV.js} +2 -2
  50. package/dist/cdn/{VFM5ICS4.js → DDDIP43Y.js} +2 -2
  51. package/dist/cdn/{IVIOEWS4.js → DFRZVVZZ.js} +2 -2
  52. package/dist/cdn/{NIGQKZIF.js → DOGQU7EL.js} +2 -2
  53. package/dist/cdn/{NE365JK4.js → DSQ2DQQL.js} +2 -2
  54. package/dist/cdn/{NYYE7KLB.js → E557OH6C.js} +2 -2
  55. package/dist/cdn/{TEE3JA6M.js → E76ZT2V2.js} +2 -2
  56. package/dist/cdn/{62O2SN6X.js → EJQAPUJS.js} +2 -2
  57. package/dist/cdn/{VWWU4OF5.js → EPZJ7KZC.js} +2 -2
  58. package/dist/cdn/{BQZRKAOC.js → FM45ZTLA.js} +2 -2
  59. package/dist/cdn/{S7CSURUU.js → FPYDAXFV.js} +2 -2
  60. package/dist/cdn/{2PANAQNE.js → FQOANF2G.js} +2 -2
  61. package/dist/cdn/{YFZ6IT57.js → FT5ERUIM.js} +2 -2
  62. package/dist/cdn/{NXX7HK24.js → G7BVWE35.js} +2 -2
  63. package/dist/cdn/{PQE425PV.js → GKYUW47U.js} +2 -2
  64. package/dist/cdn/{ED2MLVNF.js → GSCCYBOK.js} +2 -2
  65. package/dist/cdn/{AFQVHEDP.js → H4TDHI2Q.js} +2 -2
  66. package/dist/cdn/{HREC4KDD.js → H5EGZU2S.js} +1 -1
  67. package/dist/cdn/{DUIJO5RQ.js → H6RQVSYM.js} +1 -1
  68. package/dist/cdn/{2ZPTX5XB.js → HCNKB3RA.js} +2 -2
  69. package/dist/cdn/{UT4ZW2KH.js → HNPCFI2T.js} +2 -2
  70. package/dist/cdn/{ETD4OOM2.js → HYNFJPLU.js} +2 -2
  71. package/dist/cdn/{P5HU7ICX.js → HZI3CRZA.js} +2 -2
  72. package/dist/cdn/{D45B6SJX.js → IEPJZHSS.js} +2 -2
  73. package/dist/cdn/{RQHNMC7T.js → J4I4EROF.js} +1 -1
  74. package/dist/cdn/{BQ2ABCKR.js → J7HO6RTJ.js} +2 -2
  75. package/dist/cdn/{5BRNAKOA.js → JI422GNR.js} +2 -2
  76. package/dist/cdn/{MVJVWVFK.js → JIAPMYH4.js} +2 -2
  77. package/dist/cdn/{Q2YI4ERF.js → JKD3QPJA.js} +2 -2
  78. package/dist/cdn/{X2TKI5ZL.js → JMC6K5HI.js} +2 -2
  79. package/dist/cdn/K2GKGBLS.js +66 -0
  80. package/dist/cdn/{MG76JGIW.js → KJ2SRGSL.js} +2 -2
  81. package/dist/cdn/{ZZQOEEAM.js → KLBYHXFF.js} +2 -2
  82. package/dist/cdn/{UJVMH76M.js → KM6YSFH6.js} +2 -2
  83. package/dist/cdn/{OJMQQYME.js → KXTNFBJX.js} +2 -2
  84. package/dist/cdn/{U3D2E7KO.js → LEFE3FVL.js} +1 -1
  85. package/dist/cdn/{Z2MOMLO4.js → LSWMYSG5.js} +2 -2
  86. package/dist/cdn/{2J4KPRKE.js → LWIX4BHD.js} +2 -2
  87. package/dist/cdn/{YYCILDRG.js → MKNN7Z33.js} +2 -2
  88. package/dist/cdn/{DKHAZ22G.js → MXOZNCTB.js} +2 -2
  89. package/dist/cdn/{YIJ2W5SY.js → MZMKV7FA.js} +1 -1
  90. package/dist/cdn/{P5PZTXGV.js → NE7AQ3M2.js} +2 -2
  91. package/dist/cdn/{FM67B7TX.js → NHREAORV.js} +2 -2
  92. package/dist/cdn/{XRZNOWZH.js → NKXS3GN7.js} +2 -2
  93. package/dist/cdn/{N27Z4BYH.js → NNOHKAUR.js} +2 -2
  94. package/dist/cdn/{O7ZGR2OB.js → O3NHJWA2.js} +2 -2
  95. package/dist/cdn/{2SMUB2AN.js → O5VTBJWD.js} +2 -2
  96. package/dist/cdn/{LSZP7GSG.js → OHFJJGVA.js} +2 -2
  97. package/dist/cdn/{CDPLT3P6.js → OTJIHBW2.js} +2 -2
  98. package/dist/cdn/{IIAV7M3T.js → OVP6UXO6.js} +2 -2
  99. package/dist/cdn/P4HNDIFA.js +2 -0
  100. package/dist/cdn/{EFSTKTYF.js → PDL4ZTCL.js} +2 -2
  101. package/dist/cdn/QAMR6MWW.js +2 -0
  102. package/dist/cdn/{GFGWPQAZ.js → QLSHKD7Y.js} +2 -2
  103. package/dist/cdn/{E2ISDDZI.js → QNTJG5AA.js} +2 -2
  104. package/dist/cdn/{KY6GW77P.js → QU5CZLK5.js} +2 -2
  105. package/dist/cdn/{LIXWDXFR.js → RABQPAZP.js} +2 -2
  106. package/dist/cdn/{FRU35NCB.js → RKHLMCND.js} +2 -2
  107. package/dist/cdn/{JB2WFUP4.js → RWKSK7LJ.js} +2 -2
  108. package/dist/cdn/{WD5XAJT4.js → SA3CPVD5.js} +2 -2
  109. package/dist/cdn/{FNZPH4EB.js → SG2BKJM5.js} +2 -2
  110. package/dist/cdn/SGH4ISZJ.js +2 -0
  111. package/dist/cdn/{725GI7GH.js → SUSHGSN5.js} +2 -2
  112. package/dist/cdn/{66KMFF5K.js → T2SRJU3Q.js} +2 -2
  113. package/dist/cdn/{E6AUP62B.js → TQWS6NIV.js} +2 -2
  114. package/dist/cdn/{ML6NV6LG.js → TUQPDQ74.js} +2 -2
  115. package/dist/cdn/{RSPHBMSI.js → U2T7AGOO.js} +2 -2
  116. package/dist/cdn/{GBYEDBHX.js → UFF53OEH.js} +2 -2
  117. package/dist/cdn/{YH2P46T6.js → UOUMWCH7.js} +2 -2
  118. package/dist/cdn/{ENGKQDUR.js → UYCJKS7C.js} +2 -2
  119. package/dist/cdn/{DEATLTXZ.js → UZD32YRD.js} +2 -2
  120. package/dist/cdn/{HOZL4XMO.js → V4HDH7ZM.js} +2 -2
  121. package/dist/cdn/{CFHYRUEF.js → VFJCPUWU.js} +2 -2
  122. package/dist/cdn/{IXY56EA3.js → VVY2ZBRC.js} +2 -2
  123. package/dist/cdn/{W2GZ6TKY.js → VWAHKT2W.js} +2 -2
  124. package/dist/cdn/{HRUTJ4EN.js → WBN7AYGG.js} +2 -2
  125. package/dist/cdn/{DNGLNDJE.js → WF2ENOGH.js} +2 -2
  126. package/dist/cdn/WJD2BFZM.js +2 -0
  127. package/dist/cdn/{NSYM7QGF.js → WLWSPMNE.js} +2 -2
  128. package/dist/cdn/{ILP7TRTY.js → WSXKO7QU.js} +2 -2
  129. package/dist/cdn/WYJB4DB6.js +2 -0
  130. package/dist/cdn/{YA5TTPKE.js → WYJEPX44.js} +2 -2
  131. package/dist/cdn/{E4NVOXNZ.js → XEK22IDA.js} +1 -1
  132. package/dist/cdn/{FNJBXM4D.js → XG3S7JQW.js} +2 -2
  133. package/dist/cdn/{DOPXAKRD.js → XNIZBSS5.js} +2 -2
  134. package/dist/cdn/{TPJHGX2T.js → XZXSPFYV.js} +2 -2
  135. package/dist/cdn/{25DS4NAV.js → Y3RD24PA.js} +2 -2
  136. package/dist/cdn/{MFBYQCHS.js → Y4MQH574.js} +2 -2
  137. package/dist/cdn/{CANP72B6.js → Y7KC4KFN.js} +2 -2
  138. package/dist/cdn/{LXD6SLUX.js → YKJS4OIT.js} +2 -2
  139. package/dist/cdn/{I46H3BJ3.js → YO6TWJFE.js} +2 -2
  140. package/dist/cdn/{YHSEYWV5.js → Z6466HTT.js} +2 -2
  141. package/dist/cdn/ZUCC43DN.js +2 -0
  142. package/dist/cdn/{CQL63XNG.js → ZXM7ND6Q.js} +2 -2
  143. package/dist/cdn/{KZ6GNR2I.js → ZYCEN3JJ.js} +2 -2
  144. package/dist/cdn/{2XRE5BCZ.js → ZZDJOW42.js} +2 -2
  145. package/dist/cdn/index.js +2 -2
  146. package/dist/chunks/ArcadeDebuggerPreviewTabsState.js +1 -1
  147. package/dist/chunks/arcade-defaults.js +1 -1
  148. package/dist/chunks/arcade-executor.js +43 -39
  149. package/dist/chunks/arcade-mode.js +1 -1
  150. package/dist/chunks/arcade-service-accessors.js +3 -3
  151. package/dist/chunks/bigquery.js +1 -1
  152. package/dist/chunks/colorize.js +1 -1
  153. package/dist/chunks/debugger-value-components.js +1 -1
  154. package/dist/chunks/debugger-value-styles.js +1 -1
  155. package/dist/chunks/fields.js +1 -1
  156. package/dist/chunks/functional.js +1 -1
  157. package/dist/chunks/language-defaults-base.js +1 -1
  158. package/dist/chunks/markdown.js +1 -1
  159. package/dist/chunks/monaco-importer.js +1 -1
  160. package/dist/chunks/monaco-theme.js +1 -1
  161. package/dist/chunks/oracle.js +1 -1
  162. package/dist/chunks/postgres.js +1 -1
  163. package/dist/chunks/runtime.js +1 -1
  164. package/dist/chunks/setup-monaco-theme.js +2 -2
  165. package/dist/chunks/sql-expr-defaults.js +1 -1
  166. package/dist/chunks/sql-expr-mode.js +1 -1
  167. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  168. package/dist/chunks/sql-layer-defaults.js +1 -1
  169. package/dist/chunks/sql-layer-mode.js +1 -1
  170. package/dist/chunks/sqlServer.js +1 -1
  171. package/dist/chunks/useT9n.js +1 -1
  172. package/dist/chunks/utilities.js +1 -1
  173. package/dist/chunks/utils.js +1 -1
  174. package/dist/chunks/utils2.js +1 -1
  175. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  176. package/dist/components/arcgis-arcade-debugger-console/customElement.js +1 -1
  177. package/dist/components/arcgis-arcade-debugger-output/customElement.js +1 -1
  178. package/dist/components/arcgis-arcade-editor/customElement.d.ts +14 -1
  179. package/dist/components/arcgis-arcade-editor/customElement.js +455 -401
  180. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  181. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  182. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  183. package/dist/components/arcgis-code-editor-shell/customElement.js +1 -1
  184. package/dist/components/arcgis-code-viewer/customElement.js +1 -1
  185. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  186. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  187. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  188. package/dist/components/arcgis-sql-layer-editor/customElement.js +1 -1
  189. package/dist/docs/api.json +1 -1
  190. package/dist/docs/docs.json +1 -1
  191. package/dist/docs/vscode.html-custom-data.json +1 -1
  192. package/dist/docs/web-types.json +1 -1
  193. package/dist/index.js +1 -1
  194. package/dist/loader.js +2 -2
  195. package/dist/utils/arcade-executor.d.ts +18 -0
  196. package/package.json +8 -8
  197. package/dist/cdn/4QTI3S4L.js +0 -2
  198. package/dist/cdn/FIDEVUIF.js +0 -2
  199. package/dist/cdn/NMJ7T7FN.js +0 -2
  200. package/dist/cdn/RD26M6DT.js +0 -2
  201. package/dist/cdn/TCTFWJLH.js +0 -66
  202. package/dist/cdn/UG7MOB3R.js +0 -2
  203. package/dist/cdn/WJUWXPOD.js +0 -2
  204. package/dist/cdn/X6ZVSZ5Q.js +0 -2
@@ -1,130 +1,130 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import { g as F, c as O } from "../../chunks/runtime.js";
3
- import { css as N, html as l, nothing as k } from "lit";
4
- import { i as z } from "../../chunks/monaco-importer.js";
5
- import { LitElement as K, createEvent as B, safeClassMap as S } from "@arcgis/lumina";
6
- import { generateGuid as U } from "@arcgis/toolkit/string";
7
- import { i as P, D as W, e as C } from "../../chunks/arcade-executor.js";
8
- import { s as V, g as H } from "../../chunks/arcade-service-accessors.js";
9
- import { b as A } from "../../chunks/arcade-defaults.js";
10
- import { setArcadeAskAiBinding as $, arcadeAskAiCommandId as G, arcadeQuickFixKind as j } from "../../chunks/arcade-mode.js";
11
- import { u as Q } from "../../chunks/useT9n.js";
12
- import { createRef as T, ref as R } from "lit/directives/ref.js";
13
- import { load as q } from "@arcgis/lumina/controllers";
14
- import { g as Y } from "../../chunks/utils.js";
15
- import { rethrowError as h } from "@arcgis/toolkit/log";
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { g as O, c as N } from "../../chunks/runtime.js";
3
+ import { css as z, html as d, nothing as C } from "lit";
4
+ import { i as U } from "../../chunks/monaco-importer.js";
5
+ import { LitElement as K, createEvent as R, safeClassMap as S } from "@arcgis/lumina";
6
+ import { generateGuid as V } from "@arcgis/toolkit/string";
7
+ import { i as f, e as k, c as m, D as H } from "../../chunks/arcade-executor.js";
8
+ import { s as W, a as G } from "../../chunks/arcade-service-accessors.js";
9
+ import { b as P } from "../../chunks/arcade-defaults.js";
10
+ import { setArcadeAskAiBinding as $, arcadeAskAiCommandId as j, arcadeQuickFixKind as Q } from "../../chunks/arcade-mode.js";
11
+ import { u as Y } from "../../chunks/useT9n.js";
12
+ import { createRef as T, ref as L } from "lit/directives/ref.js";
13
+ import { load as J } from "@arcgis/lumina/controllers";
14
+ import { g as X } from "../../chunks/utils.js";
15
+ import { rethrowError as u } from "@arcgis/toolkit/log";
16
16
  import { watch as w } from "@arcgis/core/core/reactiveUtils.js";
17
- import x from "@arcgis/core/core/Accessor.js";
18
- import { property as c, subclass as f } from "@arcgis/core/core/accessorSupport/decorators.js";
19
- import { A as L } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
20
- import { r as J } from "../../chunks/utilities.js";
21
- import { Range as I, KeyCode as X, Uri as Z } from "monaco-editor";
22
- const ee = N`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}.main-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.bottom-action-bar.is-collapsed{border-bottom:0}.bottom-action-bar{display:flex;.bottom-action-bar__actions{flex:1 1 auto;min-inline-size:0}}`;
23
- var te = Object.defineProperty, se = Object.getOwnPropertyDescriptor, _ = (s, e, t, i) => {
24
- for (var a = i > 1 ? void 0 : i ? se(e, t) : e, r = s.length - 1, n; r >= 0; r--)
25
- (n = s[r]) && (a = (i ? n(e, t, a) : n(a)) || a);
26
- return i && a && te(e, t, a), a;
17
+ import _ from "@arcgis/core/core/Accessor.js";
18
+ import { property as o, subclass as x } from "@arcgis/core/core/accessorSupport/decorators.js";
19
+ import { A as M } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
20
+ import { r as Z } from "../../chunks/utilities.js";
21
+ import { Range as I, KeyCode as q, Uri as ee } from "monaco-editor";
22
+ const te = z`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}.main-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.bottom-action-bar.is-collapsed{border-bottom:0}.bottom-action-bar{display:flex;.bottom-action-bar__actions{flex:1 1 auto;min-inline-size:0}}`;
23
+ var ie = Object.defineProperty, se = Object.getOwnPropertyDescriptor, b = (i, e, t, s) => {
24
+ for (var a = s > 1 ? void 0 : s ? se(e, t) : e, n = i.length - 1, r; n >= 0; n--)
25
+ (r = i[n]) && (a = (s ? r(e, t, a) : r(a)) || a);
26
+ return s && a && ie(e, t, a), a;
27
27
  };
28
- const M = 100;
29
- let g = class extends x {
30
- constructor(s) {
31
- super(s), this.collectionItems = [], this.errorMessage = "", this.expanded = !1, this.requestId = 0, this.status = "idle", this.visibleChildCount = M;
28
+ const F = 100;
29
+ let h = class extends _ {
30
+ constructor(i) {
31
+ super(i), this.collectionItems = [], this.errorMessage = "", this.expanded = !1, this.requestId = 0, this.status = "idle", this.visibleChildCount = F;
32
32
  }
33
33
  };
34
- _([
35
- c()
36
- ], g.prototype, "collectionItems", 2);
37
- _([
38
- c()
39
- ], g.prototype, "errorMessage", 2);
40
- _([
41
- c()
42
- ], g.prototype, "expanded", 2);
43
- _([
44
- c()
45
- ], g.prototype, "requestId", 2);
46
- _([
47
- c()
48
- ], g.prototype, "schemaValue", 2);
49
- _([
50
- c()
51
- ], g.prototype, "status", 2);
52
- _([
53
- c()
54
- ], g.prototype, "visibleChildCount", 2);
55
- g = _([
56
- f("ArcadeDebuggerLazyTreeNodeState")
57
- ], g);
58
- let D = class extends x {
59
- constructor(s) {
60
- super(s), this.generation = 0, this.nodes = /* @__PURE__ */ new Map();
34
+ b([
35
+ o()
36
+ ], h.prototype, "collectionItems", 2);
37
+ b([
38
+ o()
39
+ ], h.prototype, "errorMessage", 2);
40
+ b([
41
+ o()
42
+ ], h.prototype, "expanded", 2);
43
+ b([
44
+ o()
45
+ ], h.prototype, "requestId", 2);
46
+ b([
47
+ o()
48
+ ], h.prototype, "schemaValue", 2);
49
+ b([
50
+ o()
51
+ ], h.prototype, "status", 2);
52
+ b([
53
+ o()
54
+ ], h.prototype, "visibleChildCount", 2);
55
+ h = b([
56
+ x("ArcadeDebuggerLazyTreeNodeState")
57
+ ], h);
58
+ let D = class extends _ {
59
+ constructor(i) {
60
+ super(i), this.generation = 0, this.nodes = /* @__PURE__ */ new Map();
61
61
  }
62
62
  reset() {
63
63
  this.generation += 1, this.destroyNodes();
64
64
  }
65
- ensureNode(s, e = !1, t) {
66
- const i = this.nodes.get(s);
67
- if (i)
68
- return i;
69
- const a = new g();
70
- return a.expanded = e, this.nodes.set(s, a), e && t && this.loadNode(s, t), a;
71
- }
72
- setExpanded(s, e, t) {
73
- const i = this.ensureNode(s, e, t);
74
- if (i.expanded === e) {
75
- e && t && this.loadNode(s, t);
65
+ ensureNode(i, e = !1, t) {
66
+ const s = this.nodes.get(i);
67
+ if (s)
68
+ return s;
69
+ const a = new h();
70
+ return a.expanded = e, this.nodes.set(i, a), e && t && this.loadNode(i, t), a;
71
+ }
72
+ setExpanded(i, e, t) {
73
+ const s = this.ensureNode(i, e, t);
74
+ if (s.expanded === e) {
75
+ e && t && this.loadNode(i, t);
76
76
  return;
77
77
  }
78
- i.expanded = e, e && t && this.loadNode(s, t);
78
+ s.expanded = e, e && t && this.loadNode(i, t);
79
79
  }
80
- showMore(s, e) {
81
- const t = this.ensureNode(s);
82
- t.visibleChildCount >= e || (t.visibleChildCount = Math.min(e, t.visibleChildCount + M));
80
+ showMore(i, e) {
81
+ const t = this.ensureNode(i);
82
+ t.visibleChildCount >= e || (t.visibleChildCount = Math.min(e, t.visibleChildCount + F));
83
83
  }
84
- loadNode(s, e) {
84
+ loadNode(i, e) {
85
85
  switch (e.kind) {
86
86
  case "collection":
87
- this.runLoad(s, e.load, (t, i) => {
88
- t.collectionItems = i;
87
+ this.runLoad(i, e.load, (t, s) => {
88
+ t.collectionItems = s;
89
89
  });
90
90
  return;
91
91
  case "schema":
92
- this.runLoad(s, e.load, (t, i) => {
93
- t.schemaValue = i;
92
+ this.runLoad(i, e.load, (t, s) => {
93
+ t.schemaValue = s;
94
94
  });
95
95
  return;
96
96
  }
97
97
  }
98
- runLoad(s, e, t) {
99
- const i = this.nodes.get(s);
100
- if (!i || i.status === "loading" || i.status === "loaded")
98
+ runLoad(i, e, t) {
99
+ const s = this.nodes.get(i);
100
+ if (!s || s.status === "loading" || s.status === "loaded")
101
101
  return;
102
- const a = this.generation, r = i.requestId + 1;
103
- i.requestId = r, i.status = "loading", i.errorMessage = "", i.schemaValue = void 0, i.collectionItems = [], e().then((n) => {
104
- const o = this.nodes.get(s);
105
- !o || this.generation !== a || o.requestId !== r || (t(o, n), o.status = "loaded");
102
+ const a = this.generation, n = s.requestId + 1;
103
+ s.requestId = n, s.status = "loading", s.errorMessage = "", s.schemaValue = void 0, s.collectionItems = [], e().then((r) => {
104
+ const l = this.nodes.get(i);
105
+ !l || this.generation !== a || l.requestId !== n || (t(l, r), l.status = "loaded");
106
106
  }).catch(() => {
107
- const n = this.nodes.get(s);
108
- !n || this.generation !== a || n.requestId !== r || (n.status = "error");
107
+ const r = this.nodes.get(i);
108
+ !r || this.generation !== a || r.requestId !== n || (r.status = "error");
109
109
  });
110
110
  }
111
111
  destroyNodes() {
112
- for (const s of this.nodes.values())
113
- s.destroy();
112
+ for (const i of this.nodes.values())
113
+ i.destroy();
114
114
  this.nodes.clear();
115
115
  }
116
116
  };
117
- D = _([
118
- f("ArcadeDebuggerLazyTreeState")
117
+ D = b([
118
+ x("ArcadeDebuggerLazyTreeState")
119
119
  ], D);
120
- var ie = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, d = (s, e, t, i) => {
121
- for (var a = i > 1 ? void 0 : i ? ae(e, t) : e, r = s.length - 1, n; r >= 0; r--)
122
- (n = s[r]) && (a = (i ? n(e, t, a) : n(a)) || a);
123
- return i && a && ie(e, t, a), a;
120
+ var ae = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, c = (i, e, t, s) => {
121
+ for (var a = s > 1 ? void 0 : s ? ne(e, t) : e, n = i.length - 1, r; n >= 0; n--)
122
+ (r = i[n]) && (a = (s ? r(e, t, a) : r(a)) || a);
123
+ return s && a && ae(e, t, a), a;
124
124
  };
125
- let b = class extends x {
126
- constructor(s) {
127
- super(s), this.phase = "idle", this.sessionId = 0, this.consoleLogs = [], this.hasExecuted = !1;
125
+ let p = class extends _ {
126
+ constructor(i) {
127
+ super(i), this.phase = "idle", this.sessionId = 0, this.consoleLogs = [], this.hasExecuted = !1;
128
128
  }
129
129
  get isExecuting() {
130
130
  return this.phase === "running" || this.phase === "debug-running" || this.phase === "debug-paused";
@@ -138,81 +138,84 @@ let b = class extends x {
138
138
  get runResult() {
139
139
  return this.result?.resultType === "run" ? this.result.result : void 0;
140
140
  }
141
+ get resultForLegacyRenderer() {
142
+ return this.result?.resultType === "debug" ? void 0 : this.result?.result;
143
+ }
141
144
  get debugResult() {
142
145
  return this.result?.resultType === "debug" ? this.result.result : void 0;
143
146
  }
144
147
  get executionTiming() {
145
- return this.result?.timing;
148
+ return this.result?.resultType === "error" ? void 0 : this.result?.timing;
146
149
  }
147
- addConsoleLog(s) {
148
- this.consoleLogs = [...this.consoleLogs, s];
150
+ addConsoleLog(i) {
151
+ this.consoleLogs = [...this.consoleLogs, i];
149
152
  }
150
153
  };
151
- d([
152
- c()
153
- ], b.prototype, "phase", 2);
154
- d([
155
- c()
156
- ], b.prototype, "mode", 2);
157
- d([
158
- c()
159
- ], b.prototype, "sessionId", 2);
160
- d([
161
- c()
162
- ], b.prototype, "result", 2);
163
- d([
164
- c()
165
- ], b.prototype, "consoleLogs", 2);
166
- d([
167
- c()
168
- ], b.prototype, "hasExecuted", 2);
169
- b = d([
170
- f("ArcadeDebuggerExecutionModel")
171
- ], b);
172
- let v = class extends x {
173
- constructor(s) {
174
- super(s), this.editorBreakpoints = [], this.executionBreakpoints = [];
175
- }
176
- setBreakpoints(s, e) {
177
- s === "editor" ? this.editorBreakpoints = Array.from(new Set(e)).sort((t, i) => t - i) : this.executionBreakpoints = Array.from(new Set(e)).sort((t, i) => t - i);
178
- }
179
- toggleBreakpoint(s, e) {
180
- const t = new Set(s === "editor" ? this.editorBreakpoints : this.executionBreakpoints);
181
- t.has(e) ? t.delete(e) : t.add(e), this.setBreakpoints(s, t);
182
- }
183
- clearBreakpoints(s) {
184
- s === "editor" ? this.editorBreakpoints = [] : this.executionBreakpoints = [];
154
+ c([
155
+ o()
156
+ ], p.prototype, "phase", 2);
157
+ c([
158
+ o()
159
+ ], p.prototype, "mode", 2);
160
+ c([
161
+ o()
162
+ ], p.prototype, "sessionId", 2);
163
+ c([
164
+ o()
165
+ ], p.prototype, "result", 2);
166
+ c([
167
+ o()
168
+ ], p.prototype, "consoleLogs", 2);
169
+ c([
170
+ o()
171
+ ], p.prototype, "hasExecuted", 2);
172
+ p = c([
173
+ x("ArcadeDebuggerExecutionModel")
174
+ ], p);
175
+ let A = class extends _ {
176
+ constructor(i) {
177
+ super(i), this.editorBreakpoints = [], this.executionBreakpoints = [];
178
+ }
179
+ setBreakpoints(i, e) {
180
+ i === "editor" ? this.editorBreakpoints = Array.from(new Set(e)).sort((t, s) => t - s) : this.executionBreakpoints = Array.from(new Set(e)).sort((t, s) => t - s);
181
+ }
182
+ toggleBreakpoint(i, e) {
183
+ const t = new Set(i === "editor" ? this.editorBreakpoints : this.executionBreakpoints);
184
+ t.has(e) ? t.delete(e) : t.add(e), this.setBreakpoints(i, t);
185
+ }
186
+ clearBreakpoints(i) {
187
+ i === "editor" ? this.editorBreakpoints = [] : this.executionBreakpoints = [];
185
188
  }
186
189
  syncExecutionBreakpointsFromEditor() {
187
190
  this.executionBreakpoints = this.editorBreakpoints;
188
191
  }
189
192
  };
190
- d([
191
- c()
192
- ], v.prototype, "editorBreakpoints", 2);
193
- d([
194
- c()
195
- ], v.prototype, "executionBreakpoints", 2);
196
- v = d([
197
- f("ArcadeDebuggerSessionModel")
198
- ], v);
199
- let E = class extends x {
200
- constructor(s) {
201
- super(s), this.openedPanel = "output", this.showPanel = !1;
193
+ c([
194
+ o()
195
+ ], A.prototype, "editorBreakpoints", 2);
196
+ c([
197
+ o()
198
+ ], A.prototype, "executionBreakpoints", 2);
199
+ A = c([
200
+ x("ArcadeDebuggerSessionModel")
201
+ ], A);
202
+ let y = class extends _ {
203
+ constructor(i) {
204
+ super(i), this.openedPanel = "output", this.showPanel = !1;
202
205
  }
203
206
  };
204
- d([
205
- c()
206
- ], E.prototype, "openedPanel", 2);
207
- d([
208
- c()
209
- ], E.prototype, "showPanel", 2);
210
- E = d([
211
- f("ArcadeDebuggerUiModel")
212
- ], E);
213
- let y = class extends x {
214
- constructor(s) {
215
- super(s);
207
+ c([
208
+ o()
209
+ ], y.prototype, "openedPanel", 2);
210
+ c([
211
+ o()
212
+ ], y.prototype, "showPanel", 2);
213
+ y = c([
214
+ x("ArcadeDebuggerUiModel")
215
+ ], y);
216
+ let v = class extends _ {
217
+ constructor(i) {
218
+ super(i);
216
219
  }
217
220
  get line() {
218
221
  return this.pausedState?.line;
@@ -223,29 +226,29 @@ let y = class extends x {
223
226
  reset() {
224
227
  this.pausedState = void 0, this.lastPausedState = void 0;
225
228
  }
226
- setPausedState(s) {
227
- this.pausedState = s, this.lastPausedState = s;
229
+ setPausedState(i) {
230
+ this.pausedState = i, this.lastPausedState = i;
228
231
  }
229
232
  };
230
- d([
231
- c()
232
- ], y.prototype, "pausedState", 2);
233
- d([
234
- c()
235
- ], y.prototype, "lastPausedState", 2);
236
- y = d([
237
- f("ArcadeDebuggerPausedFrameModel")
238
- ], y);
239
- let p = class extends x {
240
- constructor(s) {
241
- super(s), this.execution = new b(), this.lazyTreeState = new D(), this.pausedFrame = new y(), this.previewTabsState = new L(), this.session = new v(), this.ui = new E();
233
+ c([
234
+ o()
235
+ ], v.prototype, "pausedState", 2);
236
+ c([
237
+ o()
238
+ ], v.prototype, "lastPausedState", 2);
239
+ v = c([
240
+ x("ArcadeDebuggerPausedFrameModel")
241
+ ], v);
242
+ let g = class extends _ {
243
+ constructor(i) {
244
+ super(i), this.execution = new p(), this.lazyTreeState = new D(), this.pausedFrame = new v(), this.previewTabsState = new M(), this.session = new A(), this.ui = new y();
242
245
  }
243
246
  get editorBreakpoints() {
244
247
  return this.session.editorBreakpoints;
245
248
  }
246
249
  /** The "displayed" breakpoints within the console. depends on if the debugger is paused or not */
247
250
  get debuggerBreakpoints() {
248
- return this.isPaused ? this.session.executionBreakpoints.map((s) => ({ line: s })) : this.session.editorBreakpoints.map((s) => ({ line: s }));
251
+ return this.isPaused ? this.session.executionBreakpoints.map((i) => ({ line: i })) : this.session.editorBreakpoints.map((i) => ({ line: i }));
249
252
  }
250
253
  get executionBreakpoints() {
251
254
  return this.session.executionBreakpoints;
@@ -303,62 +306,65 @@ let p = class extends x {
303
306
  get runResult() {
304
307
  return this.execution.runResult;
305
308
  }
309
+ get resultForLegacyRenderer() {
310
+ return this.execution.resultForLegacyRenderer;
311
+ }
306
312
  get sessionId() {
307
313
  return this.execution.sessionId;
308
314
  }
309
315
  get showPanel() {
310
316
  return this.ui.showPanel;
311
317
  }
312
- addConsoleLog(s) {
313
- this.execution.addConsoleLog(s);
318
+ addConsoleLog(i) {
319
+ this.execution.addConsoleLog(i);
314
320
  }
315
- clearBreakpoints(s) {
316
- this.session.clearBreakpoints(s);
321
+ clearBreakpoints(i) {
322
+ this.session.clearBreakpoints(i);
317
323
  }
318
324
  clearForMissingTestData() {
319
- this.stopDebug({ hidePanel: !0 }), this.execution.hasExecuted = !1, this.execution.result = void 0;
325
+ this.cancelExecution({ hidePanel: !0 }), this.execution.hasExecuted = !1, this.execution.result = void 0;
320
326
  }
321
327
  closePanel() {
322
328
  this.ui.showPanel = !1;
323
329
  }
324
- completeDebug(s, e) {
325
- this.execution.mode = "debug", this.execution.result = { resultType: "debug", result: s, ...e ? { timing: e } : {} }, this.execution.phase = "completed", this.ui.openedPanel = "output", this.pausedFrame.reset(), this.resetTransientDebuggerState();
330
+ completeDebug(i, e) {
331
+ this.execution.mode = "debug", this.execution.result = { resultType: "debug", result: i, ...e ? { timing: e } : {} }, this.execution.phase = "completed", this.ui.openedPanel = "output", this.pausedFrame.reset(), this.resetTransientDebuggerState();
326
332
  }
327
- completeRun(s, e = {}) {
328
- this.execution.mode = "run", !e.useDebugRenderer && P(s) ? this.execution.result = { resultType: "run", result: s } : e.useDebugRenderer && !P(s) && (this.execution.result = {
333
+ completeRun(i, e = {}) {
334
+ this.execution.mode = "run", !e.useDebugRenderer && f(i) ? this.execution.result = { resultType: "run", result: i } : e.useDebugRenderer && !f(i) && (this.execution.result = {
329
335
  resultType: "debug",
330
- result: s,
336
+ result: i,
331
337
  ...e.timing ? { timing: e.timing } : {}
332
338
  }), this.execution.phase = "completed", this.pausedFrame.reset(), this.ui.openedPanel = "output", this.resetTransientDebuggerState();
333
339
  }
334
340
  continueDebug() {
335
- const s = this.pausedFrame.pausedState?.continue;
336
- s && (this.execution.phase = "debug-running", this.pausedFrame.clearPausedState(), s.resolve());
341
+ const i = this.pausedFrame.pausedState?.continue;
342
+ i && (this.execution.phase = "debug-running", this.pausedFrame.clearPausedState(), i.resolve());
337
343
  }
338
344
  disableDebugger() {
339
- this.stopDebug({ hidePanel: !0 }), this.clearBreakpoints("execution"), this.clearBreakpoints("editor");
345
+ this.cancelExecution({ hidePanel: !0 }), this.clearBreakpoints("execution"), this.clearBreakpoints("editor");
340
346
  }
341
- fail(s) {
342
- this.completeRun(s);
347
+ fail(i) {
348
+ this.execution.result = { resultType: "error", result: i }, this.execution.phase = "completed", this.pausedFrame.reset(), this.ui.openedPanel = "output", this.resetTransientDebuggerState();
343
349
  }
344
- pauseDebug(s) {
350
+ pauseDebug(i) {
345
351
  const e = this.pausedFrame.pausedState ?? this.pausedFrame.lastPausedState;
346
- this.syncPausedState(e, s), this.pausedFrame.setPausedState(s), this.execution.phase = "debug-paused";
352
+ this.syncPausedState(e, i), this.pausedFrame.setPausedState(i), this.execution.phase = "debug-paused";
347
353
  }
348
354
  reset() {
349
355
  this.execution.phase = "idle", this.execution.mode = void 0, this.execution.result = void 0, this.execution.consoleLogs = [], this.execution.hasExecuted = !1, this.execution.sessionId = 0, this.ui.openedPanel = "output", this.ui.showPanel = !1, this.pausedFrame.reset(), this.clearBreakpoints("execution"), this.clearBreakpoints("editor"), this.replaceTransientDebuggerState();
350
356
  }
351
357
  resetDebug() {
352
- this.stopDebug({ hidePanel: !1 }), this.execution.result = void 0, this.execution.consoleLogs = [], this.ui.openedPanel = "debug-console";
358
+ this.cancelExecution({ hidePanel: !1 }), this.execution.result = void 0, this.execution.consoleLogs = [], this.ui.openedPanel = "debug-console";
353
359
  }
354
360
  disconnect() {
355
- this.stopDebug({ hidePanel: !0 });
361
+ this.cancelExecution({ hidePanel: !0 });
356
362
  }
357
- setBreakpoints(s) {
358
- this.session.setBreakpoints("editor", s);
363
+ setBreakpoints(i) {
364
+ this.session.setBreakpoints("editor", i);
359
365
  }
360
- setPanel(s) {
361
- this.execution.hasExecuted && (this.ui.openedPanel = s, this.ui.showPanel = !0);
366
+ setPanel(i) {
367
+ this.execution.hasExecuted && (this.ui.openedPanel = i, this.ui.showPanel = !0);
362
368
  }
363
369
  startDebug() {
364
370
  return this.execution.mode = "debug", this.execution.phase = "debug-running", this.execution.hasExecuted = !0, this.execution.result = void 0, this.session.syncExecutionBreakpointsFromEditor(), this.execution.consoleLogs = [], this.ui.openedPanel = "debug-console", this.ui.showPanel = !0, this.execution.sessionId += 1, this.pausedFrame.reset(), this.replaceTransientDebuggerState(), this.execution.sessionId;
@@ -366,73 +372,183 @@ let p = class extends x {
366
372
  startRun() {
367
373
  return this.execution.mode = "run", this.execution.phase = "running", this.execution.hasExecuted = !0, this.execution.result = void 0, this.execution.consoleLogs = [], this.ui.openedPanel = "output", this.ui.showPanel = !0, this.execution.sessionId += 1, this.pausedFrame.reset(), this.replaceTransientDebuggerState(), this.execution.sessionId;
368
374
  }
369
- stopDebug({ hidePanel: s = !0, invalidateSession: e = !0 } = {}) {
375
+ cancelExecution({ hidePanel: i = !0, invalidateSession: e = !0 } = {}) {
370
376
  const t = this.pausedFrame.pausedState?.continue;
371
- e && (this.execution.sessionId += 1), this.execution.phase = this.execution.hasExecuted ? "completed" : "idle", this.pausedFrame.reset(), this.resetTransientDebuggerState(), s && (this.ui.showPanel = !1), this.ui.openedPanel === "debug-console" && (this.ui.openedPanel = "output"), t?.resolve();
377
+ e && (this.execution.sessionId += 1), this.execution.phase = this.execution.hasExecuted ? "completed" : "idle", this.pausedFrame.reset(), this.resetTransientDebuggerState(), i && (this.ui.showPanel = !1), this.ui.openedPanel === "debug-console" && (this.ui.openedPanel = "output"), t?.resolve();
372
378
  }
373
379
  /**
374
380
  * Resets transient debugger state (paused line, lazy tree state, preview tabs state).
375
381
  * If the paused state has changed, also invalidates all preview tabs to ensure they are reloaded when next opened.
376
382
  */
377
- syncPausedState(s, e) {
378
- this.lazyTreeState.reset(), s && e && s !== e && this.previewTabsState.invalidateAll(), this.pausedLine = e?.line;
383
+ syncPausedState(i, e) {
384
+ this.lazyTreeState.reset(), i && e && i !== e && this.previewTabsState.invalidateAll(), this.pausedLine = e?.line;
379
385
  }
380
- toggleBreakpoint(s) {
381
- this.session.toggleBreakpoint("editor", s);
386
+ toggleBreakpoint(i) {
387
+ this.session.toggleBreakpoint("editor", i);
382
388
  }
383
- togglePanel(s) {
389
+ togglePanel(i) {
384
390
  if (this.execution.hasExecuted) {
385
- if (s == null) {
391
+ if (i == null) {
386
392
  this.ui.showPanel = !this.ui.showPanel;
387
393
  return;
388
394
  }
389
- if (this.ui.openedPanel === s && this.ui.showPanel) {
395
+ if (this.ui.openedPanel === i && this.ui.showPanel) {
390
396
  this.ui.showPanel = !1;
391
397
  return;
392
398
  }
393
- this.setPanel(s);
399
+ this.setPanel(i);
394
400
  }
395
401
  }
396
402
  resetTransientDebuggerState() {
397
403
  this.pausedLine = void 0, this.lazyTreeState.reset(), this.previewTabsState.clear();
398
404
  }
399
405
  replaceTransientDebuggerState() {
400
- this.pausedLine = void 0, this.lazyTreeState = new D(), this.previewTabsState = new L();
406
+ this.pausedLine = void 0, this.lazyTreeState = new D(), this.previewTabsState = new M();
401
407
  }
402
408
  };
403
- d([
404
- c()
405
- ], p.prototype, "execution", 2);
406
- d([
407
- c()
408
- ], p.prototype, "lazyTreeState", 2);
409
- d([
410
- c()
411
- ], p.prototype, "pausedLine", 2);
412
- d([
413
- c()
414
- ], p.prototype, "pausedFrame", 2);
415
- d([
416
- c()
417
- ], p.prototype, "previewTabsState", 2);
418
- d([
419
- c()
420
- ], p.prototype, "session", 2);
421
- d([
422
- c()
423
- ], p.prototype, "ui", 2);
424
- p = d([
425
- f("ArcadeDebuggerStore")
426
- ], p);
427
- const ne = {
409
+ c([
410
+ o()
411
+ ], g.prototype, "execution", 2);
412
+ c([
413
+ o()
414
+ ], g.prototype, "lazyTreeState", 2);
415
+ c([
416
+ o()
417
+ ], g.prototype, "pausedLine", 2);
418
+ c([
419
+ o()
420
+ ], g.prototype, "pausedFrame", 2);
421
+ c([
422
+ o()
423
+ ], g.prototype, "previewTabsState", 2);
424
+ c([
425
+ o()
426
+ ], g.prototype, "session", 2);
427
+ c([
428
+ o()
429
+ ], g.prototype, "ui", 2);
430
+ g = c([
431
+ x("ArcadeDebuggerStore")
432
+ ], g);
433
+ class re {
434
+ #e;
435
+ #a;
436
+ #t;
437
+ constructor(e, t = k) {
438
+ this.#e = e, this.#a = t;
439
+ }
440
+ start(e) {
441
+ this.cancel({ hidePanel: !1 });
442
+ const t = e.mode === "debug" ? this.#e.startDebug() : this.#e.startRun();
443
+ setTimeout(() => {
444
+ this.#i(t) && this.#r(e, t);
445
+ }, 0);
446
+ }
447
+ cancel({ hidePanel: e = !0 } = {}) {
448
+ this.#t?.abort(), this.#t = void 0, this.#e.isExecuting && this.#e.cancelExecution({ hidePanel: e });
449
+ }
450
+ async #r(e, t) {
451
+ let s;
452
+ try {
453
+ const { externalExecutor: a } = e;
454
+ s = a ? await this.#c({ ...e, externalExecutor: a }, t) : await this.#o(e, t);
455
+ } catch (a) {
456
+ const n = a instanceof Error ? a.message : String(a);
457
+ s = { type: "failure", error: m(n, a) };
458
+ }
459
+ this.#d(t, s);
460
+ }
461
+ async #o(e, t) {
462
+ if (!e.testData)
463
+ return { type: "failure", error: m("Missing test data") };
464
+ const s = await e.editorProfile;
465
+ if (!s)
466
+ return { type: "failure", error: m("Missing editor profile") };
467
+ const a = await this.#a(s.definition, e.script, e.testData, {
468
+ mode: e.mode,
469
+ console: (n) => this.#s(t, n),
470
+ breakpoints: e.mode === "debug" ? e.breakpoints : void 0,
471
+ onDebugPause: e.mode === "debug" ? (n, r) => this.#n(t, n, r) : void 0
472
+ });
473
+ return e.mode === "debug" ? f(a) ? { type: "failure", error: this.#l(a) } : { type: "debug", value: a } : f(a) ? { type: "legacy-run", result: a } : { type: "failure", error: m("Unexpected debug result") };
474
+ }
475
+ async #c(e, t) {
476
+ const { externalExecutor: s } = e, a = new AbortController();
477
+ this.#t = a;
478
+ try {
479
+ if (e.mode === "debug") {
480
+ const r = await s.execute({
481
+ mode: "debug",
482
+ script: e.script,
483
+ console: (l) => this.#s(t, l),
484
+ signal: a.signal,
485
+ breakpoints: e.breakpoints,
486
+ onDebugPause: (l, E) => this.#n(t, l, E)
487
+ });
488
+ return { type: "debug", value: r.result, timing: r.timing };
489
+ }
490
+ const n = await s.execute({
491
+ mode: "run",
492
+ script: e.script,
493
+ console: (r) => this.#s(t, r),
494
+ signal: a.signal
495
+ });
496
+ return { type: "run", value: n.result, timing: n.timing };
497
+ } catch (n) {
498
+ const r = n instanceof Error ? n.message : String(n);
499
+ return { type: "failure", error: m(r, n) };
500
+ } finally {
501
+ this.#t === a && (this.#t = void 0);
502
+ }
503
+ }
504
+ #s(e, t) {
505
+ this.#i(e) && this.#e.addConsoleLog(t);
506
+ }
507
+ async #n(e, t, s) {
508
+ if (!this.#i(e) || !this.#e.isDebugging)
509
+ return;
510
+ const a = Promise.withResolvers();
511
+ return this.#e.pauseDebug({
512
+ line: t.line,
513
+ result: s,
514
+ continue: a
515
+ }), await a.promise;
516
+ }
517
+ #d(e, t) {
518
+ if (this.#i(e))
519
+ switch (t.type) {
520
+ case "debug":
521
+ this.#e.completeDebug(t.value, t.timing);
522
+ return;
523
+ case "failure":
524
+ this.#e.fail(t.error);
525
+ return;
526
+ case "legacy-run":
527
+ this.#e.completeRun(t.result);
528
+ return;
529
+ case "run":
530
+ this.#e.completeRun(t.value, {
531
+ useDebugRenderer: !0,
532
+ timing: t.timing
533
+ });
534
+ }
535
+ }
536
+ #l(e) {
537
+ return e.type === "error" ? m(e.value, e.error) : m("Unexpected legacy result");
538
+ }
539
+ #i(e) {
540
+ return e === this.#e.sessionId;
541
+ }
542
+ }
543
+ const oe = {
428
544
  glyphMargin: !0,
429
545
  lineNumbersMinChars: 1
430
546
  };
431
- class oe extends K {
547
+ class ce extends K {
432
548
  constructor() {
433
- super(...arguments), this._codeEditorElt = T(), this._arcadeAssistantElt = T(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this._debuggerState = new p(), this.messages = Q(), this._modelId = U(), this._openArcadeHelp = () => {
434
- window.open(W, "Arcade Help");
435
- }, this._decorations = void 0, this._monacoEditor = q(z), this._editorOptions = {}, this._toggleSidePanel = (e) => {
549
+ super(...arguments), this._codeEditorElt = T(), this._arcadeAssistantElt = T(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this._debuggerState = new g(), this._executionCoordinator = new re(this._debuggerState), this.messages = Y(), this._modelId = V(), this._openArcadeHelp = () => {
550
+ window.open(H, "Arcade Help");
551
+ }, this._decorations = void 0, this._monacoEditor = J(U), this._editorOptions = {}, this._toggleSidePanel = (e) => {
436
552
  e.currentTarget instanceof HTMLElement && this._setOpenedSidePanel(e.currentTarget.dataset.panelName ?? "none");
437
553
  }, this._closeSidePanel = () => {
438
554
  this._setOpenedSidePanel("none");
@@ -440,8 +556,8 @@ class oe extends K {
440
556
  const e = this.editorInstance;
441
557
  if (!e)
442
558
  return;
443
- const t = this._debuggerState.editorBreakpoints.map((i) => ({
444
- range: new I(i, 1, i, 1),
559
+ const t = this._debuggerState.editorBreakpoints.map((s) => ({
560
+ range: new I(s, 1, s, 1),
445
561
  options: {
446
562
  isWholeLine: !0,
447
563
  glyphMarginClassName: "arcgis-code-editor__breakpoint-glyph",
@@ -452,13 +568,13 @@ class oe extends K {
452
568
  this._decorations?.clear(), this._decorations = e.createDecorationsCollection(t);
453
569
  }, this._clearDebuggerDecorations = () => {
454
570
  this._decorations?.clear(), this._decorations = void 0, this._debuggerPausedLineDecoration?.clear(), this._debuggerPausedLineDecoration = void 0;
455
- }, this._debuggerPausedLineDecoration = void 0, this._preparingArcade = !1, this._arcadeAssistantRemoteState = { shouldRender: !1 }, this._diagnostics = [], this.enableDebugger = !1, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.disableAssistant = !1, this.arcgisDiagnosticsChange = B({ bubbles: !1 }), this.arcgisScriptChange = B({ bubbles: !1 });
571
+ }, this._debuggerPausedLineDecoration = void 0, this._preparingArcade = !1, this._arcadeAssistantRemoteState = { shouldRender: !1 }, this._diagnostics = [], this.enableDebugger = !1, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.disableAssistant = !1, this.arcgisDiagnosticsChange = R({ bubbles: !1 }), this.arcgisScriptChange = R({ bubbles: !1 });
456
572
  }
457
573
  static {
458
574
  this.properties = { _apiLibrary: 16, _editorProfile: 16, _preparingArcade: 16, _arcadeAssistantRemoteState: 16, _diagnostics: 16, editorInstance: 32, editorOptions: 0, enableDebugger: 5, hideDocumentationActions: 5, hideSideBar: 5, messageOverrides: 0, openedSidePanel: 3, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0, customPanels: 0, disableAssistant: 5, arcadeAssistant: 0, externalExecutor: 0 };
459
575
  }
460
576
  static {
461
- this.styles = [ee];
577
+ this.styles = [te];
462
578
  }
463
579
  get _canExecute() {
464
580
  return !!(this.testData || this.externalExecutor);
@@ -471,7 +587,7 @@ class oe extends K {
471
587
  }
472
588
  get editorOptions() {
473
589
  return {
474
- ...ne,
590
+ ...oe,
475
591
  ...this._editorOptions
476
592
  };
477
593
  }
@@ -485,8 +601,37 @@ class oe extends K {
485
601
  if (!e)
486
602
  return { type: "error", value: "Missing editor profile", error: null };
487
603
  await this._componentReadyDefer.promise;
488
- const t = this._codeEditorElt.value?.value, i = await C(e.definition, t, this.testData, { mode: "run" });
489
- return P(i) ? i : { type: "error", value: "Unexpected debug result", error: null };
604
+ const t = this._codeEditorElt.value?.value, s = await k(e.definition, t, this.testData, { mode: "run" });
605
+ return f(s) ? s : { type: "error", value: "Unexpected result", error: null };
606
+ }
607
+ async testRun() {
608
+ try {
609
+ const e = this._codeEditorElt.value?.value ?? this.script;
610
+ if (this.externalExecutor) {
611
+ const { result: n } = await this.externalExecutor.execute({
612
+ mode: "run",
613
+ script: e,
614
+ console: () => {
615
+ },
616
+ signal: new AbortController().signal
617
+ });
618
+ return n;
619
+ }
620
+ const t = this.testData;
621
+ if (!t)
622
+ throw new Error("Missing test data");
623
+ await this._componentReadyDefer.promise;
624
+ const s = await this._editorProfilePromise;
625
+ if (!s)
626
+ throw new Error("Missing editor profile");
627
+ const a = await k(s.definition, e, t, { mode: "debug" });
628
+ if (f(a))
629
+ throw a.type === "error" && a.error instanceof Error ? a.error : new Error(a.type === "error" ? a.value : "Unexpected Arcade result");
630
+ return a;
631
+ } catch (e) {
632
+ const t = e instanceof Error ? e.message : String(e);
633
+ return m(t, e);
634
+ }
490
635
  }
491
636
  async setFocus() {
492
637
  await this._componentReadyDefer.promise, await this._codeEditorElt.value?.setFocus();
@@ -500,15 +645,15 @@ class oe extends K {
500
645
  return e?.prompt && await t?.openPrompt(e.prompt), !0;
501
646
  }
502
647
  async load() {
503
- const e = F("./assets");
504
- V(e), await this._updateDataModelDeps(), this.manager.onLifecycle(() => (this.hasUpdated && this._connectMonacoCustomizations().catch(h(this)), () => {
648
+ const e = O("./assets");
649
+ W(e), await this._updateDataModelDeps(), this.manager.onLifecycle(() => (this.hasUpdated && this._connectMonacoCustomizations().catch(u(this)), () => {
505
650
  for (this._askAiBindingKey && ($(this._askAiBindingKey, void 0), this._askAiBindingKey = void 0); this._disposables.length; )
506
651
  this._disposables.pop()?.dispose();
507
- this._abortExternalExecution(), this._connectMonacoCustomizationsPromise = void 0, this._executeScriptAction = void 0, this._clearDebuggerDecorations(), this._debuggerState.disconnect();
652
+ this._executionCoordinator.cancel(), this._connectMonacoCustomizationsPromise = void 0, this._executeScriptAction = void 0, this._clearDebuggerDecorations(), this._debuggerState.disconnect();
508
653
  }));
509
654
  }
510
655
  willUpdate(e) {
511
- (e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), (e.has("testData") || e.has("externalExecutor")) && this._executionContextChanged(), e.has("enableDebugger") && !this.enableDebugger && this._debuggerState.disableDebugger(), e.has("snippets") && A.updateApiContextForModel(this._modelId, {
656
+ (e.has("messages") || e.has("profile")) && this._updateDataModelDeps(), (e.has("testData") || e.has("externalExecutor")) && this._executionContextChanged(), e.has("enableDebugger") && !this.enableDebugger && this._debuggerState.disableDebugger(), e.has("snippets") && P.updateApiContextForModel(this._modelId, {
512
657
  snippets: this.snippets
513
658
  }), (e.has("arcadeAssistant") || e.has("disableAssistant")) && this._updateArcadeAssistantRemoteState();
514
659
  }
@@ -524,16 +669,16 @@ class oe extends K {
524
669
  this._connectMonacoCustomizationsPromise = (async () => {
525
670
  if (!this.isConnected)
526
671
  return;
527
- const e = await H();
528
- this._disposables.push(e.onDiagnosticsChange((o) => {
529
- this._preparingArcade || (this._diagnostics = o.diagnostics, this.arcgisDiagnosticsChange.emit(o.diagnostics));
672
+ const e = await G();
673
+ this._disposables.push(e.onDiagnosticsChange((l) => {
674
+ this._preparingArcade || (this._diagnostics = l.diagnostics, this.arcgisDiagnosticsChange.emit(l.diagnostics));
530
675
  })), this._canExecute && !this._executeScriptAction && this._addExecuteScriptAction(), this._syncAskAiAction();
531
- const t = w(() => this._debuggerState.editorBreakpoints, () => this._updateBreakpointsDecorations(), { sync: !0 }), i = w(() => this._debuggerState.debuggerLine, () => this._updateDebuggerPausedLineDecoration(), { sync: !0 }), a = w(() => this._debuggerState.consoleLogs.length, () => this.requestUpdate(), { sync: !0 });
532
- this._disposables.push({ dispose: () => t.remove() }, { dispose: () => i.remove() }, { dispose: () => a.remove() });
533
- const r = this.editorInstance?.onMouseDown((o) => this._onEditorMouseDown(o));
534
- r && this._disposables.push(r);
535
- const n = this.editorInstance?.onDidChangeModelContent((o) => this._onEditorModelContentChange(o));
536
- n && this._disposables.push(n), this._updateBreakpointsDecorations(), this._updateDebuggerPausedLineDecoration();
676
+ const t = w(() => this._debuggerState.editorBreakpoints, () => this._updateBreakpointsDecorations(), { sync: !0 }), s = w(() => this._debuggerState.debuggerLine, () => this._updateDebuggerPausedLineDecoration(), { sync: !0 }), a = w(() => this._debuggerState.consoleLogs.length, () => this.requestUpdate(), { sync: !0 });
677
+ this._disposables.push({ dispose: () => t.remove() }, { dispose: () => s.remove() }, { dispose: () => a.remove() });
678
+ const n = this.editorInstance?.onMouseDown((l) => this._onEditorMouseDown(l));
679
+ n && this._disposables.push(n);
680
+ const r = this.editorInstance?.onDidChangeModelContent((l) => this._onEditorModelContentChange(l));
681
+ r && this._disposables.push(r), this._updateBreakpointsDecorations(), this._updateDebuggerPausedLineDecoration();
537
682
  })();
538
683
  try {
539
684
  await this._connectMonacoCustomizationsPromise;
@@ -550,8 +695,8 @@ class oe extends K {
550
695
  _onEditorModelContentChange(e) {
551
696
  if (!this.enableDebugger || !this._debuggerState.editorBreakpoints.length || e.isFlush)
552
697
  return;
553
- const t = J(this._debuggerState.editorBreakpoints, e.changes);
554
- t.length === this._debuggerState.editorBreakpoints.length && t.every((i, a) => i === this._debuggerState.editorBreakpoints[a]) || this._debuggerState.setBreakpoints(t);
698
+ const t = Z(this._debuggerState.editorBreakpoints, e.changes);
699
+ t.length === this._debuggerState.editorBreakpoints.length && t.every((s, a) => s === this._debuggerState.editorBreakpoints[a]) || this._debuggerState.setBreakpoints(t);
555
700
  }
556
701
  _updateDebuggerPausedLineDecoration() {
557
702
  const e = this.editorInstance;
@@ -577,78 +722,25 @@ class oe extends K {
577
722
  _continueDebugSession() {
578
723
  this._debuggerState.continueDebug();
579
724
  }
580
- _abortExternalExecution() {
581
- this._externalExecutionAbortController?.abort(), this._externalExecutionAbortController = void 0;
582
- }
583
725
  _stopDebugSession() {
584
- this._abortExternalExecution(), this._debuggerState.stopDebug({ hidePanel: !1 });
726
+ this._executionCoordinator.cancel({ hidePanel: !1 });
585
727
  }
586
728
  _resetDebugSession() {
587
- this._abortExternalExecution(), this._debuggerState.resetDebug(), this._executeScript("debug").catch(h(this));
588
- }
589
- async _handleDebugPause(e, t, i) {
590
- if (!this._debuggerState.isDebugging || e !== this._debuggerState.sessionId)
591
- return;
592
- const a = Promise.withResolvers();
593
- return this._debuggerState.pauseDebug({
594
- line: t.line,
595
- result: i,
596
- continue: a
597
- }), await a.promise;
729
+ this._debuggerState.resetDebug(), this._executeScript("debug").catch(u(this));
598
730
  }
599
731
  async _updateDataModelDeps() {
600
732
  await this._updateEditorProfile(), await this._updateApiLibrary();
601
733
  }
602
- async _executeWithExternalExecutor(e, t, i) {
603
- if (!this.externalExecutor)
604
- return { type: "error", value: "Missing external executor", error: null };
605
- const a = new AbortController();
606
- this._abortExternalExecution(), this._externalExecutionAbortController = a;
607
- const r = i.console ?? (() => {
608
- });
609
- try {
610
- if (e === "debug") {
611
- const { breakpoints: n, onDebugPause: o } = i;
612
- if (!n || !o)
613
- throw new Error("Missing debug execution options");
614
- return await this.externalExecutor.execute({
615
- mode: "debug",
616
- script: t,
617
- console: r,
618
- signal: a.signal,
619
- breakpoints: n,
620
- onDebugPause: o
621
- });
622
- }
623
- return await this.externalExecutor.execute({
624
- mode: "run",
625
- script: t,
626
- console: r,
627
- signal: a.signal
628
- });
629
- } catch (n) {
630
- return {
631
- type: "error",
632
- value: (n instanceof Error ? n : new Error(String(n))).message ?? "Execution failed",
633
- error: n instanceof Error ? n : new Error(String(n)),
634
- compilationTime: 0,
635
- executionTime: 0,
636
- timeStamp: /* @__PURE__ */ new Date()
637
- };
638
- } finally {
639
- this._externalExecutionAbortController === a && (this._externalExecutionAbortController = void 0);
640
- }
641
- }
642
734
  _executionContextChanged() {
643
- !this._canExecute && this._executeScriptAction && (this._disposeSafely(this._executeScriptAction), this._executeScriptAction = void 0), this._canExecute && !this._executeScriptAction && this._addExecuteScriptAction(), !this.testData && this.enableDebugger && this._debuggerState.clearForMissingTestData(), this._debuggerState.openedPanel === "debug-console" && !this.enableDebugger && this._debuggerState.closePanel(), this._debuggerState.showPanel && this._executeScript("run").catch(h(this));
735
+ !this._canExecute && this._executeScriptAction && (this._disposeSafely(this._executeScriptAction), this._executeScriptAction = void 0), this._canExecute && !this._executeScriptAction && this._addExecuteScriptAction(), !this.testData && this.enableDebugger && this._debuggerState.clearForMissingTestData(), this._debuggerState.openedPanel === "debug-console" && !this.enableDebugger && this._debuggerState.closePanel(), this._executionCoordinator.cancel({ hidePanel: !1 }), this._debuggerState.showPanel && this._executeScript("run").catch(u(this));
644
736
  }
645
737
  async _updateEditorProfile() {
646
738
  this._preparingArcade = !0;
647
739
  try {
648
- await A.setProfileForModel(this._modelId, this.profile, {
740
+ await P.setProfileForModel(this._modelId, this.profile, {
649
741
  locale: this.messages._t9nLocale,
650
742
  snippets: this.snippets
651
- }), this._editorProfile = A.getEditorProfileForModel(this._modelId);
743
+ }), this._editorProfile = P.getEditorProfileForModel(this._modelId);
652
744
  } catch {
653
745
  this._editorProfile = void 0;
654
746
  } finally {
@@ -656,59 +748,21 @@ class oe extends K {
656
748
  }
657
749
  }
658
750
  async _updateApiLibrary() {
659
- this._apiLibrary = await A.getApiLibraryForModel(this._modelId);
751
+ this._apiLibrary = await P.getApiLibraryForModel(this._modelId);
660
752
  }
661
753
  _setExecutionPanel(e) {
662
754
  this._debuggerState.setPanel(e);
663
755
  }
664
756
  async _executeScript(e) {
665
- const t = this.testData, i = this.externalExecutor;
666
- if (!this._codeEditorElt.value || !t && !i)
667
- return;
668
- const a = e === "debug" ? this._debuggerState.startDebug() : this._debuggerState.startRun();
669
- setTimeout(() => {
670
- (async () => {
671
- const r = this._codeEditorElt.value?.value ?? this.script, n = {
672
- mode: e,
673
- console: (u) => this._debuggerState.addConsoleLog(u),
674
- breakpoints: e === "debug" ? this._debuggerState.debuggerBreakpoints : void 0
675
- };
676
- e === "debug" && (n.onDebugPause = this._handleDebugPause.bind(this, a));
677
- let o, m;
678
- if (i) {
679
- const u = await this._executeWithExternalExecutor(e, r, n);
680
- "result" in u ? (o = u.result, m = u.timing) : o = u;
681
- } else if (t) {
682
- const u = await this._editorProfilePromise;
683
- if (!u) {
684
- this._debuggerState.fail({ type: "error", value: "Missing editor profile", error: null });
685
- return;
686
- }
687
- o = await C(u.definition, r, t, n);
688
- } else
689
- return;
690
- if (a === this._debuggerState.sessionId) {
691
- if (e === "debug") {
692
- if (P(o)) {
693
- this._debuggerState.fail(o);
694
- return;
695
- }
696
- this._debuggerState.completeDebug(o, m);
697
- return;
698
- }
699
- if (P(o))
700
- this._debuggerState.completeRun(o);
701
- else if (i) {
702
- if (!m) {
703
- this._debuggerState.fail({ type: "error", value: "Missing execution timing", error: null });
704
- return;
705
- }
706
- this._debuggerState.completeRun(o, { useDebugRenderer: !0, timing: m });
707
- } else
708
- this._debuggerState.fail({ type: "error", value: "Unexpected debug result", error: null });
709
- }
710
- })();
711
- }, 0);
757
+ const t = this.testData, s = this.externalExecutor;
758
+ !this._codeEditorElt.value || !t && !s || this._executionCoordinator.start({
759
+ mode: e,
760
+ script: this._codeEditorElt.value?.value ?? this.script,
761
+ testData: t,
762
+ editorProfile: this._editorProfilePromise,
763
+ externalExecutor: s,
764
+ breakpoints: this._debuggerState.debuggerBreakpoints
765
+ });
712
766
  }
713
767
  _toggleShowExecutionPanel() {
714
768
  this._debuggerState.togglePanel();
@@ -720,13 +774,13 @@ class oe extends K {
720
774
  e.stopPropagation(), this.script = e.detail, this.arcgisScriptChange.emit(e.detail);
721
775
  }
722
776
  _insertAsSnippet(e) {
723
- this._codeEditorElt.value?.insertSnippet(e.detail).catch(h(this));
777
+ this._codeEditorElt.value?.insertSnippet(e.detail).catch(u(this));
724
778
  }
725
779
  _insertAsText(e) {
726
780
  this._insertText(e.detail);
727
781
  }
728
782
  _insertText(e) {
729
- this._codeEditorElt.value?.insertText(e).catch(h(this));
783
+ this._codeEditorElt.value?.insertText(e).catch(u(this));
730
784
  }
731
785
  _onResultPanelChange(e) {
732
786
  const t = e.currentTarget;
@@ -740,17 +794,17 @@ class oe extends K {
740
794
  // An unique identifier for the action.
741
795
  id: "run-script",
742
796
  label: "Run Arcade Expression",
743
- keybindings: [X.F5],
797
+ keybindings: [q.F5],
744
798
  contextMenuGroupId: "code",
745
799
  contextMenuOrder: 1,
746
800
  run: () => {
747
- this._canExecute && this._executeScript("run").catch(h(this));
801
+ this._canExecute && this._executeScript("run").catch(u(this));
748
802
  }
749
803
  });
750
804
  e && (this._executeScriptAction = e, this._disposables.push(e));
751
805
  }
752
806
  _getAskAiBindingKey() {
753
- return Z.parse(this._modelId).toString();
807
+ return ee.parse(this._modelId).toString();
754
808
  }
755
809
  _canRenderAskAiCodeActions() {
756
810
  const e = this._arcadeAssistantRemoteState;
@@ -765,11 +819,11 @@ class oe extends K {
765
819
  return [];
766
820
  if (!e.markers.length)
767
821
  return [];
768
- const t = this.messages.askarcadeassistant ?? "Ask Arcade Assistant", i = this._getAskAiBindingKey();
822
+ const t = this.messages.askarcadeassistant ?? "Ask Arcade Assistant", s = this._getAskAiBindingKey();
769
823
  return [
770
824
  {
771
825
  title: t,
772
- kind: j,
826
+ kind: Q,
773
827
  diagnostics: e.markers,
774
828
  isPreferred: !1,
775
829
  // isAI adds the sparkle and adds it to the hover menu, but it changes the
@@ -777,9 +831,9 @@ class oe extends K {
777
831
  // The sparkle doesn't explain what it does, and imo will cause confusion, thus we are opting to not use it for now.
778
832
  isAI: !1,
779
833
  command: {
780
- id: G,
834
+ id: j,
781
835
  title: t,
782
- arguments: [i, this.messages.askarcadeassistantprompt ?? "Fix the errors in my script"]
836
+ arguments: [s, this.messages.askarcadeassistantprompt ?? "Fix the errors in my script"]
783
837
  }
784
838
  }
785
839
  ];
@@ -793,11 +847,11 @@ class oe extends K {
793
847
  return;
794
848
  }
795
849
  this._askAiBindingKey && this._askAiBindingKey !== t && $(this._askAiBindingKey, void 0), $(t, {
796
- provideCodeActions: ({ context: i }) => this._getAskAiCodeActions(i),
797
- run: (i) => {
850
+ provideCodeActions: ({ context: s }) => this._getAskAiCodeActions(s),
851
+ run: (s) => {
798
852
  this.openArcadeAssistant({
799
- prompt: i ?? this.messages.askarcadeassistantprompt ?? "Fix the errors in my script"
800
- }).catch(h(this));
853
+ prompt: s ?? this.messages.askarcadeassistantprompt ?? "Fix the errors in my script"
854
+ }).catch(u(this));
801
855
  }
802
856
  }), this._askAiBindingKey = t;
803
857
  }
@@ -807,21 +861,21 @@ class oe extends K {
807
861
  }
808
862
  async _updateArcadeAssistantRemoteState() {
809
863
  const e = this.arcadeAssistant;
810
- this.disableAssistant ? this._arcadeAssistantRemoteState = { shouldRender: !1 } : this._arcadeAssistantRemoteState = await Y(e ?? {}), this._syncAskAiAction();
864
+ this.disableAssistant ? this._arcadeAssistantRemoteState = { shouldRender: !1 } : this._arcadeAssistantRemoteState = await X(e ?? {}), this._syncAskAiAction();
811
865
  }
812
866
  renderMainActionBar() {
813
- return this._usesBottomExecutionDrawer || !this._canExecute ? null : l`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-toggle-disabled slot=top-action-bar><calcite-action-group scale=s><calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => {
814
- this._executeScript("run").catch(h(this));
815
- }}></calcite-action>${this._debuggerState.result ? l`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._debuggerState.showPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>`;
867
+ return this._usesBottomExecutionDrawer || !this._canExecute ? null : d`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-toggle-disabled slot=top-action-bar><calcite-action-group scale=s><calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => {
868
+ this._executeScript("run").catch(u(this));
869
+ }}></calcite-action>${this._debuggerState.result ? d`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._debuggerState.showPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>`;
816
870
  }
817
871
  renderMainPanel() {
818
- return l`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${A.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${R(this._codeEditorElt)}></arcgis-code-editor>`;
872
+ return d`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${P.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${L(this._codeEditorElt)}></arcgis-code-editor>`;
819
873
  }
820
- renderAction({ id: e, label: t, icon: i, active: a, panelName: r, iconFlipRtl: n = !1, onClick: o = this._toggleSidePanel }) {
821
- return l`<calcite-action id=${e ?? k} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${i} .active=${a} @click=${o} data-panel-name=${r ?? k} .iconFlipRtl=${n}></calcite-action>${!this.sideActionBarExpanded && l`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>` || ""}`;
874
+ renderAction({ id: e, label: t, icon: s, active: a, panelName: n, iconFlipRtl: r = !1, onClick: l = this._toggleSidePanel }) {
875
+ return d`<calcite-action id=${e ?? C} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${s} .active=${a} @click=${l} data-panel-name=${n ?? C} .iconFlipRtl=${r}></calcite-action>${!this.sideActionBarExpanded && d`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>` || ""}`;
822
876
  }
823
877
  renderSideActionBar() {
824
- return this.hideSideBar ? null : l`<calcite-action-bar slot=side-action-bar class="side-action-bar" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
878
+ return this.hideSideBar ? null : d`<calcite-action-bar slot=side-action-bar class="side-action-bar" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
825
879
  id: "profile-variables-action",
826
880
  label: this.messages.profilevariables ?? "",
827
881
  icon: "profile-variables",
@@ -865,19 +919,19 @@ class oe extends K {
865
919
  if (this.hideSideBar)
866
920
  return null;
867
921
  const { openedSidePanel: e, _arcadeAssistantRemoteState: t } = this;
868
- return l`<arcgis-language-api-panel slot=side-panel class=${S(e === "api" ? "" : "hidden")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none .closed=${e !== "api"}></arcgis-language-api-panel><arcgis-editor-variables slot=side-panel class=${S(e === "variables" ? "" : "hidden")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e !== "variables"} .messageOverrides=${{
922
+ return d`<arcgis-language-api-panel slot=side-panel class=${S(e === "api" ? "" : "hidden")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none .closed=${e !== "api"}></arcgis-language-api-panel><arcgis-editor-variables slot=side-panel class=${S(e === "variables" ? "" : "hidden")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e !== "variables"} .messageOverrides=${{
869
923
  profileempty: this.messages.profileempty,
870
924
  profilevariables: this.messages.profilevariables
871
- }}></arcgis-editor-variables>${this.suggestions?.length && l`<arcgis-arcade-suggestions slot=side-panel class=${S(e === "suggestions" ? "" : "hidden")} .closed=${e !== "suggestions"} .suggestions=${this.suggestions} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none></arcgis-arcade-suggestions>` || ""}${t?.shouldRender && l`<arcgis-arcade-coding-assistant slot=side-panel class=${S(e === "arcade-assistant" ? "" : "hidden")} .closed=${e !== "arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._closeSidePanel} .portalUrl=${t.portalUrl} .serviceUrl=${"serviceUrl" in t ? t.serviceUrl : void 0} .helpBase=${t.helpBase} .promptingEnabled=${this._canPromptWithArcadeAssistant()} .feedbackServiceUrl=${t.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant?.appVersion} .disableQuestionAnswerLogging=${this.arcadeAssistant?.disableQuestionAnswerLogging} .diagnostics=${this._diagnostics} ${R(this._arcadeAssistantElt)}></arcgis-arcade-coding-assistant>` || ""}${this.customPanels?.map((i) => l`<calcite-flow slot=side-panel class=${S(e === i.id ? "" : "hidden")}>${i?.useFlows ? i.renderer?.({
925
+ }}></arcgis-editor-variables>${this.suggestions?.length && d`<arcgis-arcade-suggestions slot=side-panel class=${S(e === "suggestions" ? "" : "hidden")} .closed=${e !== "suggestions"} .suggestions=${this.suggestions} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none></arcgis-arcade-suggestions>` || ""}${t?.shouldRender && d`<arcgis-arcade-coding-assistant slot=side-panel class=${S(e === "arcade-assistant" ? "" : "hidden")} .closed=${e !== "arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._closeSidePanel} .portalUrl=${t.portalUrl} .serviceUrl=${"serviceUrl" in t ? t.serviceUrl : void 0} .helpBase=${t.helpBase} .promptingEnabled=${this._canPromptWithArcadeAssistant()} .feedbackServiceUrl=${t.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant?.appVersion} .disableQuestionAnswerLogging=${this.arcadeAssistant?.disableQuestionAnswerLogging} .diagnostics=${this._diagnostics} ${L(this._arcadeAssistantElt)}></arcgis-arcade-coding-assistant>` || ""}${this.customPanels?.map((s) => d`<calcite-flow slot=side-panel class=${S(e === s.id ? "" : "hidden")}>${s?.useFlows ? s.renderer?.({
872
926
  closePanel: this._toggleSidePanel,
873
927
  insertText: this._insertText.bind(this),
874
- closed: e !== i.id,
928
+ closed: e !== s.id,
875
929
  /** pass this.el instead of "this" as it is what actually gets attached to the dom */
876
930
  editorRef: this.el
877
- }) : l`<calcite-flow-item .heading=${i.name} heading-level=2 closable .closed=${e !== i.id} @calciteFlowItemClose=${this._toggleSidePanel} .description=${i.description}>${i.renderer?.({
931
+ }) : d`<calcite-flow-item .heading=${s.name} heading-level=2 closable .closed=${e !== s.id} @calciteFlowItemClose=${this._toggleSidePanel} .description=${s.description}>${s.renderer?.({
878
932
  closePanel: this._toggleSidePanel,
879
933
  insertText: this._insertText.bind(this),
880
- closed: e !== i.id,
934
+ closed: e !== s.id,
881
935
  /** pass this.el instead of "this" as it is what actually gets attached to the dom */
882
936
  editorRef: this.el
883
937
  })}</calcite-flow-item>`}</calcite-flow>`)}`;
@@ -888,30 +942,30 @@ class oe extends K {
888
942
  if (!this._debuggerState.showPanel)
889
943
  return null;
890
944
  const e = this._debuggerState.openedPanel === "debug-console" ? "output" : this._debuggerState.openedPanel;
891
- return l`<arcgis-arcade-results slot=results-panel .openedResultPanel=${e} .loading=${this._debuggerState.isExecuting} .result=${this._debuggerState.runResult} .executionTiming=${this._debuggerState.executionTiming} .consoleLogs=${this._debuggerState.consoleLogs} @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange} @arcgisInternalClosePanel=${this._onExecutionPanelClose}></arcgis-arcade-results>`;
945
+ return d`<arcgis-arcade-results slot=results-panel .openedResultPanel=${e} .loading=${this._debuggerState.isExecuting} .result=${this._debuggerState.resultForLegacyRenderer} .executionTiming=${this._debuggerState.executionTiming} .consoleLogs=${this._debuggerState.consoleLogs} @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange} @arcgisInternalClosePanel=${this._onExecutionPanelClose}></arcgis-arcade-results>`;
892
946
  }
893
947
  renderBottomExecutionBody() {
894
- const { showPanel: e, openedPanel: t, debugResult: i, isExecuting: a, mode: r } = this._debuggerState;
948
+ const { showPanel: e, openedPanel: t, debugResult: s, isExecuting: a } = this._debuggerState;
895
949
  if (!e)
896
950
  return null;
897
951
  const n = t === "debug-console" ? "output" : t;
898
- return this.enableDebugger && t === "debug-console" ? l`<arcgis-arcade-debugger-console slot=results-panel .modelId=${this._modelId} .debuggerStore=${this._debuggerState}></arcgis-arcade-debugger-console>` : t === "output" && (r === "debug" || i) ? l`<arcgis-arcade-debugger-output .outputTitle=${this.messages.output} slot=results-panel .debuggerStore=${this._debuggerState} .result=${i}></arcgis-arcade-debugger-output>` : l`<arcgis-arcade-results slot=results-panel class="bottom-results" .openedResultPanel=${n} .loading=${t === "console" && this._debuggerState.isPaused ? !1 : a} .result=${this._debuggerState.runResult} .executionTiming=${this._debuggerState.executionTiming} .consoleLogs=${this._debuggerState.consoleLogs} hide-header @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange}></arcgis-arcade-results>`;
952
+ return this.enableDebugger && t === "debug-console" ? d`<arcgis-arcade-debugger-console slot=results-panel .modelId=${this._modelId} .debuggerStore=${this._debuggerState}></arcgis-arcade-debugger-console>` : t === "output" && s ? d`<arcgis-arcade-debugger-output .outputTitle=${this.messages.output} slot=results-panel .debuggerStore=${this._debuggerState} .result=${s}></arcgis-arcade-debugger-output>` : d`<arcgis-arcade-results slot=results-panel class="bottom-results" .openedResultPanel=${n} .loading=${t === "console" && this._debuggerState.isPaused ? !1 : a} .result=${this._debuggerState.resultForLegacyRenderer} .executionTiming=${this._debuggerState.executionTiming} .consoleLogs=${this._debuggerState.consoleLogs} hide-header @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange}></arcgis-arcade-results>`;
899
953
  }
900
954
  renderBottomActionBar() {
901
955
  if (!this._usesBottomExecutionDrawer)
902
956
  return null;
903
- const { showPanel: e, hasExecuted: t, openedPanel: i, isDebugging: a, isPaused: r, isExecuting: n } = this._debuggerState, o = this.messages.continue ?? "Continue", m = this.messages.reset ?? "Reset", u = this.messages.stop ?? "Stop";
904
- return l`<div slot=bottom-action-bar class=${`main-action-bar bottom-action-bar ${e ? "" : "is-collapsed"}`}><calcite-action-bar class="bottom-action-bar__actions" layout=horizontal scale=s expand-toggle-disabled expanded><calcite-action-group scale=s>${this.enableDebugger && a ? l`<calcite-action id=debugger-continue-action .text=${o} icon=forward scale=s .disabled=${!r} @click=${this._continueDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-continue-action placement=top><span>${o}</span></calcite-tooltip><calcite-action id=debugger-reset-action .text=${m} icon=reset scale=s @click=${this._resetDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-reset-action placement=top><span>${m}</span></calcite-tooltip><calcite-action id=debugger-stop-action .text=${u} icon=circle-stop scale=s @click=${this._stopDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-stop-action placement=top><span>${u}</span></calcite-tooltip>` : l`<calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade || n} @click=${() => {
905
- this._executeScript("run").catch(h(this));
906
- }}></calcite-action>${this.enableDebugger && l`<calcite-action .disabled=${this._debuggerState.editorBreakpoints.length === 0} .text=${this.messages.runanddebug ?? "Run and Debug"} text-enabled icon=debug-script scale=s .loading=${this._preparingArcade || n} @click=${() => {
907
- this._executeScript("debug").catch(h(this));
908
- }}></calcite-action>` || ""}`}</calcite-action-group>${t ? l`<calcite-action-group scale=s><calcite-action .active=${i === "output" && e} .text=${this.messages.output ?? "Output"} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${() => this._setExecutionPanel("output")}></calcite-action><calcite-action .active=${i === "console" && e} .text=${this.messages.console ?? "Console"} text-enabled scale=s icon=console icon-flip-rtl @click=${() => this._setExecutionPanel("console")}></calcite-action><calcite-action .active=${i === "log" && e} .text=${this.messages.log ?? "Log"} text-enabled scale=s icon=list icon-flip-rtl @click=${() => this._setExecutionPanel("log")} .disabled=${this.enableDebugger && this._debuggerState.mode === "debug"}></calcite-action>${this.enableDebugger && l`<calcite-action .active=${i === "debug-console" && e} .text=${this.messages.debugconsole ?? "Debug Console"} text-enabled scale=s icon=debug-script .disabled=${this._debuggerState.mode !== "debug"} @click=${() => this._setExecutionPanel("debug-console")}></calcite-action>` || ""}</calcite-action-group>` : null}</calcite-action-bar>${e ? l`<calcite-action .text=${this.messages.close ?? "Close"} scale=s icon=x icon-flip-rtl @click=${this._onExecutionPanelClose} slot=actions-end></calcite-action>` : null}</div>`;
957
+ const { showPanel: e, hasExecuted: t, openedPanel: s, isDebugging: a, isPaused: n, isExecuting: r } = this._debuggerState, l = this.messages.continue ?? "Continue", E = this.messages.reset ?? "Reset", B = this.messages.stop ?? "Stop";
958
+ return d`<div slot=bottom-action-bar class=${`main-action-bar bottom-action-bar ${e ? "" : "is-collapsed"}`}><calcite-action-bar class="bottom-action-bar__actions" layout=horizontal scale=s expand-toggle-disabled expanded><calcite-action-group scale=s>${this.enableDebugger && a ? d`<calcite-action id=debugger-continue-action .text=${l} icon=forward scale=s .disabled=${!n} @click=${this._continueDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-continue-action placement=top><span>${l}</span></calcite-tooltip><calcite-action id=debugger-reset-action .text=${E} icon=reset scale=s @click=${this._resetDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-reset-action placement=top><span>${E}</span></calcite-tooltip><calcite-action id=debugger-stop-action .text=${B} icon=circle-stop scale=s @click=${this._stopDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-stop-action placement=top><span>${B}</span></calcite-tooltip>` : d`<calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade || r} @click=${() => {
959
+ this._executeScript("run").catch(u(this));
960
+ }}></calcite-action>${this.enableDebugger && d`<calcite-action .disabled=${this._debuggerState.editorBreakpoints.length === 0} .text=${this.messages.runanddebug ?? "Run and Debug"} text-enabled icon=debug-script scale=s .loading=${this._preparingArcade || r} @click=${() => {
961
+ this._executeScript("debug").catch(u(this));
962
+ }}></calcite-action>` || ""}`}</calcite-action-group>${t ? d`<calcite-action-group scale=s><calcite-action .active=${s === "output" && e} .text=${this.messages.output ?? "Output"} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${() => this._setExecutionPanel("output")}></calcite-action><calcite-action .active=${s === "console" && e} .text=${this.messages.console ?? "Console"} text-enabled scale=s icon=console icon-flip-rtl @click=${() => this._setExecutionPanel("console")}></calcite-action><calcite-action .active=${s === "log" && e} .text=${this.messages.log ?? "Log"} text-enabled scale=s icon=list icon-flip-rtl @click=${() => this._setExecutionPanel("log")} .disabled=${this.enableDebugger && this._debuggerState.mode === "debug"}></calcite-action>${this.enableDebugger && d`<calcite-action .active=${s === "debug-console" && e} .text=${this.messages.debugconsole ?? "Debug Console"} text-enabled scale=s icon=debug-script .disabled=${this._debuggerState.mode !== "debug"} @click=${() => this._setExecutionPanel("debug-console")}></calcite-action>` || ""}</calcite-action-group>` : null}</calcite-action-bar>${e ? d`<calcite-action .text=${this.messages.close ?? "Close"} scale=s icon=x icon-flip-rtl @click=${this._onExecutionPanelClose} slot=actions-end></calcite-action>` : null}</div>`;
909
963
  }
910
964
  render() {
911
- return l`<arcgis-code-editor-shell>${this.renderMainActionBar()}${this.renderMainPanel()}${this.renderBottomActionBar()}${this.renderResultsPanel()}${this.renderSidePanel()}${this.renderSideActionBar()}</arcgis-code-editor-shell>`;
965
+ return d`<arcgis-code-editor-shell>${this.renderMainActionBar()}${this.renderMainPanel()}${this.renderBottomActionBar()}${this.renderResultsPanel()}${this.renderSidePanel()}${this.renderSideActionBar()}</arcgis-code-editor-shell>`;
912
966
  }
913
967
  }
914
- O("arcgis-arcade-editor", oe);
968
+ N("arcgis-arcade-editor", ce);
915
969
  export {
916
- oe as ArcgisArcadeEditor
970
+ ce as ArcgisArcadeEditor
917
971
  };