@arcgis/coding-components 4.30.0-next.1 → 4.30.0-next.101

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 (191) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +2 -4
  3. package/dist/arcgis-coding-components/arcgis-coding-components.css +1 -1
  4. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  5. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
  6. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
  7. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
  8. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
  9. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
  10. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
  11. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
  12. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
  13. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
  14. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
  15. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
  16. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
  17. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
  18. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
  19. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
  20. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
  21. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
  22. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
  23. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
  24. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
  25. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
  26. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
  27. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
  28. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
  29. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
  30. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
  31. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
  32. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
  33. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
  34. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
  35. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
  36. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
  37. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
  38. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
  39. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
  40. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
  41. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
  42. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
  43. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
  44. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
  45. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ar.json +2 -0
  46. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +2 -0
  47. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +2 -0
  48. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +2 -0
  49. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +2 -0
  50. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +2 -0
  51. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +2 -0
  52. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +2 -0
  53. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.en.json +2 -0
  54. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +2 -0
  55. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +2 -0
  56. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +2 -0
  57. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +2 -0
  58. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +2 -0
  59. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +2 -0
  60. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hu.json +2 -0
  61. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +2 -0
  62. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +2 -0
  63. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ja.json +2 -0
  64. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +2 -0
  65. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lt.json +2 -0
  66. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lv.json +2 -0
  67. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +2 -0
  68. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +2 -0
  69. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +2 -0
  70. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +2 -0
  71. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +2 -0
  72. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ro.json +2 -0
  73. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +2 -0
  74. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +2 -0
  75. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +2 -0
  76. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +2 -0
  77. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +2 -0
  78. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +2 -0
  79. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +2 -0
  80. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +2 -0
  81. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +2 -0
  82. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +2 -0
  83. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +2 -0
  84. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +2 -0
  85. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +2 -2
  86. package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
  87. package/dist/arcgis-coding-components/assets/code-editor/editor.worker.js +1 -1
  88. package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
  89. package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
  90. package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
  91. package/dist/arcgis-coding-components/index.esm.js +2 -2
  92. package/dist/arcgis-coding-components/{p-2c66cecd.js → p-0f5ea6a1.js} +2 -2
  93. package/dist/arcgis-coding-components/p-2d2b6eae.js +6 -0
  94. package/dist/arcgis-coding-components/p-31eb70a4.js +6 -0
  95. package/dist/arcgis-coding-components/{p-01d806ab.js → p-4bab7731.js} +3 -3
  96. package/dist/arcgis-coding-components/{p-0ecfaaf8.js → p-5105798e.js} +2 -2
  97. package/dist/arcgis-coding-components/p-55e2b096.js +7 -0
  98. package/dist/arcgis-coding-components/p-5a2d1bbd.entry.js +6 -0
  99. package/dist/arcgis-coding-components/{p-3162633c.js → p-76488b50.js} +1 -1
  100. package/dist/arcgis-coding-components/{p-4aab897b.js → p-7787a74a.js} +3 -3
  101. package/dist/arcgis-coding-components/{p-5050b8e6.js → p-8f50109f.js} +2 -2
  102. package/dist/arcgis-coding-components/{p-9556a8c6.js → p-c8a959eb.js} +3 -3
  103. package/dist/arcgis-coding-components/{p-c5c082c2.js → p-fc9f6d89.js} +3 -3
  104. package/dist/arcgis-coding-components/p-fee904e7.js +68 -0
  105. package/dist/cjs/app-globals-bb91d518.js +10 -0
  106. package/dist/cjs/{arcade-defaults-337189cc.js → arcade-defaults-4898d970.js} +760 -295
  107. package/dist/cjs/{arcade-mode-3b9ec201.js → arcade-mode-6490aec6.js} +76 -82
  108. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1677 -315
  109. package/dist/cjs/arcgis-coding-components.cjs.js +14 -12
  110. package/dist/cjs/{css-9d93d685.js → css-aabfc91d.js} +1 -1
  111. package/dist/cjs/{cssMode-cf97e01f.js → cssMode-3a27637c.js} +3 -3
  112. package/dist/cjs/{html-9bbb2b9f.js → html-a8ccb23b.js} +3 -3
  113. package/dist/cjs/{htmlMode-29fbfd01.js → htmlMode-8e2f185d.js} +3 -3
  114. package/dist/cjs/index-a3fb2965.js +1303 -0
  115. package/dist/cjs/index.cjs.js +3 -3
  116. package/dist/cjs/{javascript-ea7308ab.js → javascript-abb50119.js} +4 -4
  117. package/dist/cjs/{jsonMode-25c548e6.js → jsonMode-a2d6e8f7.js} +3 -3
  118. package/dist/cjs/loader.cjs.js +6 -4
  119. package/dist/cjs/{tsMode-c54b0496.js → tsMode-67ff84f3.js} +3 -3
  120. package/dist/cjs/{typescript-89d35abd.js → typescript-24e83bb2.js} +3 -3
  121. package/dist/components/arcade-api.js +25 -34
  122. package/dist/components/arcade-contribution.js +72 -13
  123. package/dist/components/arcade-defaults.js +175 -168
  124. package/dist/components/arcade-mode.js +44 -50
  125. package/dist/components/arcade-results.js +49 -61
  126. package/dist/components/arcade-suggestions.js +25 -34
  127. package/dist/components/arcade-variables.js +24 -37
  128. package/dist/components/arcgis-arcade-api.js +1 -1
  129. package/dist/components/arcgis-arcade-editor.js +68 -165
  130. package/dist/components/arcgis-arcade-results.js +1 -1
  131. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  132. package/dist/components/arcgis-arcade-variables.js +1 -1
  133. package/dist/components/arcgis-assets.d.ts +35 -0
  134. package/dist/components/arcgis-assets.js +3 -3
  135. package/dist/components/arcgis-code-editor.js +1 -1
  136. package/dist/components/chunk-IHYYRFLQ.js +1363 -0
  137. package/dist/components/code-editor.js +75 -82
  138. package/dist/components/fields.js +45 -45
  139. package/dist/components/index.d.ts +3 -18
  140. package/dist/components/index.js +2 -2
  141. package/dist/components/index2.js +394 -3
  142. package/dist/components/markdown.js +13 -27
  143. package/dist/components/useT9n.js +37 -0
  144. package/dist/components/utilities.js +3 -3
  145. package/dist/esm/app-globals-6786f5f7.js +8 -0
  146. package/dist/esm/{arcade-defaults-80ab7068.js → arcade-defaults-a8fc1923.js} +743 -281
  147. package/dist/esm/{arcade-mode-145e7a14.js → arcade-mode-6fe947ed.js} +76 -82
  148. package/dist/esm/arcgis-arcade-api_6.entry.js +1677 -315
  149. package/dist/esm/arcgis-coding-components.js +15 -13
  150. package/dist/esm/{css-d2e6a792.js → css-0813d5f7.js} +1 -1
  151. package/dist/esm/{cssMode-6d9545da.js → cssMode-cd23aebd.js} +3 -3
  152. package/dist/esm/{html-0af5dfb9.js → html-0575e99e.js} +3 -3
  153. package/dist/esm/{htmlMode-7006edc4.js → htmlMode-cb330b8f.js} +3 -3
  154. package/dist/esm/index-87f79540.js +1272 -0
  155. package/dist/esm/index.js +3 -3
  156. package/dist/esm/{javascript-89b3eeb2.js → javascript-b65b7062.js} +4 -4
  157. package/dist/esm/{jsonMode-a3501a18.js → jsonMode-e0567430.js} +3 -3
  158. package/dist/esm/loader.js +7 -5
  159. package/dist/esm/{tsMode-29dad6cb.js → tsMode-9c8bd51b.js} +3 -3
  160. package/dist/esm/{typescript-6f3a39e0.js → typescript-044e2911.js} +3 -3
  161. package/dist/loader/cdn.js +1 -1
  162. package/dist/loader/index.cjs.js +1 -1
  163. package/dist/loader/index.es2017.js +1 -1
  164. package/dist/loader/index.js +1 -1
  165. package/dist/types/components/arcade-api/arcade-api.d.ts +6 -7
  166. package/dist/types/components/arcade-editor/arcade-editor.d.ts +21 -15
  167. package/dist/types/components/arcade-results/arcade-results.d.ts +6 -9
  168. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +7 -8
  169. package/dist/types/components/arcade-variables/arcade-variables.d.ts +6 -8
  170. package/dist/types/components/code-editor/code-editor.d.ts +25 -15
  171. package/dist/types/components.d.ts +57 -35
  172. package/dist/types/controllers/useT9n.d.ts +1 -0
  173. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +3 -0
  174. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +34 -0
  175. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +15 -0
  176. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +6 -0
  177. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +9 -0
  178. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +9 -0
  179. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +19 -0
  180. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +6 -0
  181. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
  182. package/dist/types/utils/profile/editor-profile.d.ts +1 -1
  183. package/dist/types/utils/profile/types.d.ts +40 -13
  184. package/dist/types/utils/profile/utils.d.ts +6 -5
  185. package/package.json +24 -24
  186. package/dist/arcgis-coding-components/p-0f15d754.entry.js +0 -6
  187. package/dist/arcgis-coding-components/p-26cb350b.js +0 -6
  188. package/dist/arcgis-coding-components/p-68bd0d31.js +0 -7
  189. package/dist/arcgis-coding-components/p-bad6d07f.js +0 -68
  190. package/dist/cjs/index-b66d3898.js +0 -1958
  191. package/dist/esm/index-a2b632a0.js +0 -1927
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.1
4
+ * v4.30.0-next.101
5
5
  */
6
6
  'use strict';
7
7
 
8
- const index = require('./index-b66d3898.js');
8
+ const index = require('./index-a3fb2965.js');
9
9
 
10
10
  function _interopNamespace(e) {
11
11
  if (e && e.__esModule) return e;
@@ -6123,6 +6123,7 @@ const uiMap = new KeyCodeStrMap();
6123
6123
  const userSettingsUSMap = new KeyCodeStrMap();
6124
6124
  const userSettingsGeneralMap = new KeyCodeStrMap();
6125
6125
  const EVENT_KEY_CODE_MAP = new Array(230);
6126
+ const NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE = {};
6126
6127
  const scanCodeIntToStr = [];
6127
6128
  const scanCodeStrToInt = Object.create(null);
6128
6129
  const scanCodeLowerCaseStrToInt = Object.create(null);
@@ -6411,6 +6412,9 @@ for (let i = 0; i <= 132 /* KeyCode.MAX_VALUE */; i++) {
6411
6412
  if (eventKeyCode) {
6412
6413
  EVENT_KEY_CODE_MAP[eventKeyCode] = keyCode;
6413
6414
  }
6415
+ if (vkey) {
6416
+ NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[vkey] = keyCode;
6417
+ }
6414
6418
  }
6415
6419
  // Manually added due to the exclusion above (due to duplication with NumpadEnter)
6416
6420
  IMMUTABLE_KEY_CODE_TO_CODE[3 /* KeyCode.Enter */] = 46 /* ScanCode.Enter */;
@@ -20641,7 +20645,7 @@ class DragAndDropObserver extends Disposable {
20641
20645
  }
20642
20646
  }
20643
20647
  const H_REGEX = /(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;
20644
- function h$1(tag, ...args) {
20648
+ function h(tag, ...args) {
20645
20649
  let attributes;
20646
20650
  let children;
20647
20651
  if (Array.isArray(args[0])) {
@@ -21872,6 +21876,7 @@ CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS = '\'"`;
21872
21876
  * Licensed under the MIT License. See License.txt in the project root for license information.
21873
21877
  *--------------------------------------------------------------------------------------------*/
21874
21878
  const hasBuffer = (typeof Buffer !== 'undefined');
21879
+ new Lazy(() => new Uint8Array(256));
21875
21880
  let textDecoder;
21876
21881
  class VSBuffer {
21877
21882
  /**
@@ -22782,6 +22787,12 @@ Registry.add(Extensions$7.JSONContribution, jsonContributionRegistry);
22782
22787
  const Extensions$6 = {
22783
22788
  Configuration: 'base.contributions.configuration'
22784
22789
  };
22790
+ const allSettings = { properties: {}, patternProperties: {} };
22791
+ const applicationSettings = { properties: {}, patternProperties: {} };
22792
+ const machineSettings = { properties: {}, patternProperties: {} };
22793
+ const machineOverridableSettings = { properties: {}, patternProperties: {} };
22794
+ const windowSettings = { properties: {}, patternProperties: {} };
22795
+ const resourceSettings = { properties: {}, patternProperties: {} };
22785
22796
  const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';
22786
22797
  const contributionRegistry = Registry.as(Extensions$7.JSONContribution);
22787
22798
  class ConfigurationRegistry {
@@ -22954,18 +22965,25 @@ class ConfigurationRegistry {
22954
22965
  register(configuration);
22955
22966
  }
22956
22967
  updateSchema(key, property) {
22968
+ allSettings.properties[key] = property;
22957
22969
  switch (property.scope) {
22958
22970
  case 1 /* ConfigurationScope.APPLICATION */:
22971
+ applicationSettings.properties[key] = property;
22959
22972
  break;
22960
22973
  case 2 /* ConfigurationScope.MACHINE */:
22974
+ machineSettings.properties[key] = property;
22961
22975
  break;
22962
22976
  case 6 /* ConfigurationScope.MACHINE_OVERRIDABLE */:
22977
+ machineOverridableSettings.properties[key] = property;
22963
22978
  break;
22964
22979
  case 3 /* ConfigurationScope.WINDOW */:
22980
+ windowSettings.properties[key] = property;
22965
22981
  break;
22966
22982
  case 4 /* ConfigurationScope.RESOURCE */:
22983
+ resourceSettings.properties[key] = property;
22967
22984
  break;
22968
22985
  case 5 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */:
22986
+ resourceSettings.properties[key] = property;
22969
22987
  this.resourceLanguageSettingsSchema.properties[key] = property;
22970
22988
  break;
22971
22989
  }
@@ -22980,15 +22998,27 @@ class ConfigurationRegistry {
22980
22998
  $ref: resourceLanguageSettingsSchemaId,
22981
22999
  };
22982
23000
  this.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);
23001
+ allSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
23002
+ applicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
23003
+ machineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
23004
+ machineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
23005
+ windowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
23006
+ resourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
22983
23007
  }
22984
23008
  }
22985
23009
  registerOverridePropertyPatternKey() {
22986
- ({
23010
+ const resourceLanguagePropertiesSchema = {
22987
23011
  type: 'object',
22988
23012
  description: localize('overrideSettings.defaultDescription', "Configure editor settings to be overridden for a language."),
22989
23013
  errorMessage: localize('overrideSettings.errorMessage', "This setting does not support per-language configuration."),
22990
23014
  $ref: resourceLanguageSettingsSchemaId,
22991
- });
23015
+ };
23016
+ allSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
23017
+ applicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
23018
+ machineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
23019
+ machineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
23020
+ windowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
23021
+ resourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
22992
23022
  this._onDidSchemaChange.fire();
22993
23023
  }
22994
23024
  updatePropertyDefaultValue(key, property) {
@@ -60194,6 +60224,34 @@ class ExtUri {
60194
60224
  * ```
60195
60225
  */
60196
60226
  const extUri = new ExtUri(() => false);
60227
+ /**
60228
+ * BIASED utility that _mostly_ ignored the case of urs paths. ONLY use this util if you
60229
+ * understand what you are doing.
60230
+ *
60231
+ * This utility is INCOMPATIBLE with `uri.toString()`-usages and both CANNOT be used interchanged.
60232
+ *
60233
+ * When dealing with uris from files or documents, `extUri` (the unbiased friend)is sufficient
60234
+ * because those uris come from a "trustworthy source". When creating unknown uris it's always
60235
+ * better to use `IUriIdentityService` which exposes an `IExtUri`-instance which knows when path
60236
+ * casing matters.
60237
+ */
60238
+ new ExtUri(uri => {
60239
+ // A file scheme resource is in the same platform as code, so ignore case for non linux platforms
60240
+ // Resource can be from another platform. Lowering the case as an hack. Should come from File system provider
60241
+ return uri.scheme === Schemas.file ? !isLinux : true;
60242
+ });
60243
+ /**
60244
+ * BIASED utility that always ignores the casing of uris paths. ONLY use this util if you
60245
+ * understand what you are doing.
60246
+ *
60247
+ * This utility is INCOMPATIBLE with `uri.toString()`-usages and both CANNOT be used interchanged.
60248
+ *
60249
+ * When dealing with uris from files or documents, `extUri` (the unbiased friend)is sufficient
60250
+ * because those uris come from a "trustworthy source". When creating unknown uris it's always
60251
+ * better to use `IUriIdentityService` which exposes an `IExtUri`-instance which knows when path
60252
+ * casing matters.
60253
+ */
60254
+ new ExtUri(_ => true);
60197
60255
  const isEqual = extUri.isEqual.bind(extUri);
60198
60256
  extUri.isEqualOrParent.bind(extUri);
60199
60257
  extUri.getComparisonKey.bind(extUri);
@@ -105036,6 +105094,20 @@ const intlFileNameCollatorBaseNumeric = new Lazy(() => {
105036
105094
  collatorIsNumeric: collator.resolvedOptions().numeric
105037
105095
  };
105038
105096
  });
105097
+ // A collator with numeric sorting enabled.
105098
+ new Lazy(() => {
105099
+ const collator = new Intl.Collator(undefined, { numeric: true });
105100
+ return {
105101
+ collator
105102
+ };
105103
+ });
105104
+ // A collator with numeric sorting enabled, and sensitivity to accents and diacritics but not case.
105105
+ new Lazy(() => {
105106
+ const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'accent' });
105107
+ return {
105108
+ collator
105109
+ };
105110
+ });
105039
105111
  /** Compares filenames without distinguishing the name from the extension. Disambiguates by unicode comparison. */
105040
105112
  function compareFileNames(one, other, caseSensitive = false) {
105041
105113
  const a = one || '';
@@ -113897,15 +113969,15 @@ class LinesLayout {
113897
113969
  }
113898
113970
  class MovedBlockOverlayWidget extends ViewZoneOverlayWidget {
113899
113971
  constructor(_editor, _viewZone, _move, _kind, _diffModel) {
113900
- const root = h$1('div.diff-hidden-lines-widget');
113972
+ const root = h('div.diff-hidden-lines-widget');
113901
113973
  super(_editor, _viewZone, root.root);
113902
113974
  this._editor = _editor;
113903
113975
  this._move = _move;
113904
113976
  this._kind = _kind;
113905
113977
  this._diffModel = _diffModel;
113906
- this._nodes = h$1('div.diff-moved-code-block', { style: { marginRight: '4px' } }, [
113907
- h$1('div.text-content@textContent'),
113908
- h$1('div.action-bar@actionBar'),
113978
+ this._nodes = h('div.diff-moved-code-block', { style: { marginRight: '4px' } }, [
113979
+ h('div.text-content@textContent'),
113980
+ h('div.action-bar@actionBar'),
113909
113981
  ]);
113910
113982
  root.root.appendChild(this._nodes.root);
113911
113983
  const editorLayout = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
@@ -114104,7 +114176,7 @@ class RevertButton {
114104
114176
  this._diffs = _diffs;
114105
114177
  this._selection = _selection;
114106
114178
  this._id = `revertButton${RevertButton.counter++}`;
114107
- this._domNode = h$1('div.revertButton', {
114179
+ this._domNode = h('div.revertButton', {
114108
114180
  title: this._selection
114109
114181
  ? localize('revertSelectedChanges', 'Revert Selected Changes')
114110
114182
  : localize('revertChange', 'Revert Change')
@@ -114577,7 +114649,7 @@ HideUnchangedRegionsFeature = __decorate$1B([
114577
114649
  ], HideUnchangedRegionsFeature);
114578
114650
  class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
114579
114651
  constructor(_editor, _viewZone, _unchangedRegion, _unchangedRegionRange, _hide, _modifiedOutlineSource, _revealModifiedHiddenLine, _options) {
114580
- const root = h$1('div.diff-hidden-lines-widget');
114652
+ const root = h('div.diff-hidden-lines-widget');
114581
114653
  super(_editor, _viewZone, root.root);
114582
114654
  this._editor = _editor;
114583
114655
  this._unchangedRegion = _unchangedRegion;
@@ -114586,13 +114658,13 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
114586
114658
  this._modifiedOutlineSource = _modifiedOutlineSource;
114587
114659
  this._revealModifiedHiddenLine = _revealModifiedHiddenLine;
114588
114660
  this._options = _options;
114589
- this._nodes = h$1('div.diff-hidden-lines', [
114590
- h$1('div.top@top', { title: localize('diff.hiddenLines.top', 'Click or drag to show more above') }),
114591
- h$1('div.center@content', { style: { display: 'flex' } }, [
114592
- h$1('div@first', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: '0' } }, [$$d('a', { title: localize('showUnchangedRegion', 'Show Unchanged Region'), role: 'button', onclick: () => { this._unchangedRegion.showAll(undefined); } }, ...renderLabelWithIcons('$(unfold)'))]),
114593
- h$1('div@others', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' } }),
114661
+ this._nodes = h('div.diff-hidden-lines', [
114662
+ h('div.top@top', { title: localize('diff.hiddenLines.top', 'Click or drag to show more above') }),
114663
+ h('div.center@content', { style: { display: 'flex' } }, [
114664
+ h('div@first', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: '0' } }, [$$d('a', { title: localize('showUnchangedRegion', 'Show Unchanged Region'), role: 'button', onclick: () => { this._unchangedRegion.showAll(undefined); } }, ...renderLabelWithIcons('$(unfold)'))]),
114665
+ h('div@others', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' } }),
114594
114666
  ]),
114595
- h$1('div.bottom@bottom', { title: localize('diff.bottom', 'Click or drag to show more below'), role: 'button' }),
114667
+ h('div.bottom@bottom', { title: localize('diff.bottom', 'Click or drag to show more below'), role: 'button' }),
114596
114668
  ]);
114597
114669
  root.root.appendChild(this._nodes.root);
114598
114670
  const layoutInfo = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
@@ -114717,7 +114789,7 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
114717
114789
  for (let i = 0; i < items.length; i++) {
114718
114790
  const item = items[i];
114719
114791
  const icon = SymbolKinds.toIcon(item.kind);
114720
- const divItem = h$1('div.breadcrumb-item', {
114792
+ const divItem = h('div.breadcrumb-item', {
114721
114793
  style: { display: 'flex', alignItems: 'center' },
114722
114794
  }, [
114723
114795
  renderIcon(icon),
@@ -116134,7 +116206,7 @@ let OverviewRulerPart = OverviewRulerPart_1 = class OverviewRulerPart extends Di
116134
116206
  const viewportDomElement = createFastDomNode(document.createElement('div'));
116135
116207
  viewportDomElement.setClassName('diffViewport');
116136
116208
  viewportDomElement.setPosition('absolute');
116137
- const diffOverviewRoot = h$1('div.diffOverview', {
116209
+ const diffOverviewRoot = h('div.diffOverview', {
116138
116210
  style: { position: 'absolute', top: '0px', width: OverviewRulerPart_1.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px' }
116139
116211
  }).root;
116140
116212
  this._register(appendRemoveOnDispose(diffOverviewRoot, viewportDomElement.domNode));
@@ -116614,11 +116686,11 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
116614
116686
  this._parentInstantiationService = _parentInstantiationService;
116615
116687
  this._audioCueService = _audioCueService;
116616
116688
  this._editorProgressService = _editorProgressService;
116617
- this.elements = h$1('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
116618
- h$1('div.noModificationsOverlay@overlay', { style: { position: 'absolute', height: '100%', visibility: 'hidden', } }, [$$d('span', {}, 'No Changes')]),
116619
- h$1('div.editor.original@original', { style: { position: 'absolute', height: '100%' } }),
116620
- h$1('div.editor.modified@modified', { style: { position: 'absolute', height: '100%' } }),
116621
- h$1('div.accessibleDiffViewer@accessibleDiffViewer', { style: { position: 'absolute', height: '100%' } }),
116689
+ this.elements = h('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
116690
+ h('div.noModificationsOverlay@overlay', { style: { position: 'absolute', height: '100%', visibility: 'hidden', } }, [$$d('span', {}, 'No Changes')]),
116691
+ h('div.editor.original@original', { style: { position: 'absolute', height: '100%' } }),
116692
+ h('div.editor.modified@modified', { style: { position: 'absolute', height: '100%' } }),
116693
+ h('div.accessibleDiffViewer@accessibleDiffViewer', { style: { position: 'absolute', height: '100%' } }),
116622
116694
  ]);
116623
116695
  this._diffModel = observableValue(this, undefined);
116624
116696
  this._shouldDisposeDiffModel = false;
@@ -117752,8 +117824,8 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
117752
117824
  return { maxScroll: scroll2, width: this._originalWidth.read(reader) };
117753
117825
  }
117754
117826
  });
117755
- this._elements = h$1('div.multiDiffEntry', [
117756
- h$1('div.content', {
117827
+ this._elements = h('div.multiDiffEntry', [
117828
+ h('div.content', {
117757
117829
  style: {
117758
117830
  display: 'flex',
117759
117831
  flexDirection: 'column',
@@ -117761,19 +117833,19 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
117761
117833
  overflow: 'hidden',
117762
117834
  }
117763
117835
  }, [
117764
- h$1('div.header@header', [
117765
- h$1('div.collapse-button@collapseButton'),
117766
- h$1('div.title.show-file-icons@title', []),
117767
- h$1('div.actions@actions'),
117836
+ h('div.header@header', [
117837
+ h('div.collapse-button@collapseButton'),
117838
+ h('div.title.show-file-icons@title', []),
117839
+ h('div.actions@actions'),
117768
117840
  ]),
117769
- h$1('div.editorParent', {
117841
+ h('div.editorParent', {
117770
117842
  style: {
117771
117843
  flex: '1',
117772
117844
  display: 'flex',
117773
117845
  flexDirection: 'column',
117774
117846
  }
117775
117847
  }, [
117776
- h$1('div.editorContainer@editor', { style: { flex: '1' } }),
117848
+ h('div.editorContainer@editor', { style: { flex: '1' } }),
117777
117849
  ])
117778
117850
  ])
117779
117851
  ]);
@@ -117974,17 +118046,17 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
117974
118046
  this._workbenchUIElementFactory = _workbenchUIElementFactory;
117975
118047
  this._parentContextKeyService = _parentContextKeyService;
117976
118048
  this._parentInstantiationService = _parentInstantiationService;
117977
- this._elements = h$1('div', {
118049
+ this._elements = h('div', {
117978
118050
  style: {
117979
118051
  overflowY: 'hidden',
117980
118052
  }
117981
118053
  }, [
117982
- h$1('div@content', {
118054
+ h('div@content', {
117983
118055
  style: {
117984
118056
  overflow: 'hidden',
117985
118057
  }
117986
118058
  }),
117987
- h$1('div.monaco-editor@overflowWidgetsDomNode', {}),
118059
+ h('div.monaco-editor@overflowWidgetsDomNode', {}),
117988
118060
  ]);
117989
118061
  this._sizeObserver = this._register(new ObservableElementSizeObserver(this._element, undefined));
117990
118062
  this._objectPool = this._register(new ObjectPool((data) => {
@@ -120544,7 +120616,7 @@ registerLanguage({
120544
120616
  mimetypes: ["text/css"],
120545
120617
  loader: () => {
120546
120618
  {
120547
- return Promise.resolve().then(function () { return require('./css-9d93d685.js'); });
120619
+ return Promise.resolve().then(function () { return require('./css-aabfc91d.js'); });
120548
120620
  }
120549
120621
  }
120550
120622
  });
@@ -120562,7 +120634,7 @@ registerLanguage({
120562
120634
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
120563
120635
  loader: () => {
120564
120636
  {
120565
- return Promise.resolve().then(function () { return require('./html-9bbb2b9f.js'); });
120637
+ return Promise.resolve().then(function () { return require('./html-a8ccb23b.js'); });
120566
120638
  }
120567
120639
  }
120568
120640
  });
@@ -120582,7 +120654,7 @@ registerLanguage({
120582
120654
  mimetypes: ["text/javascript"],
120583
120655
  loader: () => {
120584
120656
  {
120585
- return Promise.resolve().then(function () { return require('./javascript-ea7308ab.js'); });
120657
+ return Promise.resolve().then(function () { return require('./javascript-abb50119.js'); });
120586
120658
  }
120587
120659
  }
120588
120660
  });
@@ -120600,7 +120672,7 @@ registerLanguage({
120600
120672
  mimetypes: ["text/typescript"],
120601
120673
  loader: () => {
120602
120674
  {
120603
- return Promise.resolve().then(function () { return require('./typescript-89d35abd.js'); });
120675
+ return Promise.resolve().then(function () { return require('./typescript-24e83bb2.js'); });
120604
120676
  }
120605
120677
  }
120606
120678
  });
@@ -120721,7 +120793,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
120721
120793
  monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
120722
120794
  function getMode$3() {
120723
120795
  {
120724
- return Promise.resolve().then(function () { return require('./cssMode-cf97e01f.js'); });
120796
+ return Promise.resolve().then(function () { return require('./cssMode-3a27637c.js'); });
120725
120797
  }
120726
120798
  }
120727
120799
  monaco_editor_core_exports$3.languages.onLanguage("less", () => {
@@ -120846,7 +120918,7 @@ monaco_editor_core_exports$2.languages.html = {
120846
120918
  };
120847
120919
  function getMode$2() {
120848
120920
  {
120849
- return Promise.resolve().then(function () { return require('./htmlMode-29fbfd01.js'); });
120921
+ return Promise.resolve().then(function () { return require('./htmlMode-8e2f185d.js'); });
120850
120922
  }
120851
120923
  }
120852
120924
  function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
@@ -120948,7 +121020,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
120948
121020
  monaco_editor_core_exports$1.languages.json = { jsonDefaults };
120949
121021
  function getMode$1() {
120950
121022
  {
120951
- return Promise.resolve().then(function () { return require('./jsonMode-25c548e6.js'); });
121023
+ return Promise.resolve().then(function () { return require('./jsonMode-a2d6e8f7.js'); });
120952
121024
  }
120953
121025
  }
120954
121026
  monaco_editor_core_exports$1.languages.register({
@@ -121217,7 +121289,7 @@ monaco_editor_core_exports.languages.typescript = {
121217
121289
  };
121218
121290
  function getMode() {
121219
121291
  {
121220
- return Promise.resolve().then(function () { return require('./tsMode-c54b0496.js'); });
121292
+ return Promise.resolve().then(function () { return require('./tsMode-67ff84f3.js'); });
121221
121293
  }
121222
121294
  }
121223
121295
  monaco_editor_core_exports.languages.onLanguage("typescript", () => {
@@ -132875,8 +132947,8 @@ let InlineSuggestionHintsContentWidget = InlineSuggestionHintsContentWidget_1 =
132875
132947
  this.id = `InlineSuggestionHintsContentWidget${InlineSuggestionHintsContentWidget_1.id++}`;
132876
132948
  this.allowEditorOverflow = true;
132877
132949
  this.suppressMouseDown = false;
132878
- this.nodes = h$1('div.inlineSuggestionsHints', { className: this.withBorder ? '.withBorder' : '' }, [
132879
- h$1('div@toolBar'),
132950
+ this.nodes = h('div.inlineSuggestionsHints', { className: this.withBorder ? '.withBorder' : '' }, [
132951
+ h('div@toolBar'),
132880
132952
  ]);
132881
132953
  this.previousAction = this.createCommandAction(showPreviousInlineSuggestionActionId, localize('previous', 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon));
132882
132954
  this.availableSuggestionCountAction = new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false);
@@ -133012,7 +133084,7 @@ class StatusBarViewItem$1 extends MenuEntryActionViewItem {
133012
133084
  return super.updateLabel();
133013
133085
  }
133014
133086
  if (this.label) {
133015
- const div = h$1('div.keybinding').root;
133087
+ const div = h('div.keybinding').root;
133016
133088
  const k = new KeybindingLabel(div, OS, { disableTitle: true, ...unthemedKeybindingLabelOptions });
133017
133089
  k.set(kb);
133018
133090
  this.label.textContent = this._action.label;
@@ -166666,21 +166738,13 @@ registerEditorAction(ToggleHighContrast);
166666
166738
 
166667
166739
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
166668
166740
 
166669
- function createCommonjsModule(fn, basedir, module) {
166670
- return module = {
166671
- path: basedir,
166672
- exports: {},
166673
- require: function (path, base) {
166674
- return commonjsRequire();
166675
- }
166676
- }, fn(module, module.exports), module.exports;
166741
+ function commonjsRequire (path) {
166742
+ throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
166677
166743
  }
166678
166744
 
166679
- function commonjsRequire () {
166680
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
166681
- }
166745
+ var main = {exports: {}};
166682
166746
 
166683
- var main = createCommonjsModule(function (module, exports) {
166747
+ (function (module, exports) {
166684
166748
  (function (factory) {
166685
166749
  {
166686
166750
  var v = factory(commonjsRequire, exports);
@@ -168945,101 +169009,80 @@ var main = createCommonjsModule(function (module, exports) {
168945
169009
  Is.typedArray = typedArray;
168946
169010
  })(Is || (Is = {}));
168947
169011
  });
168948
- });
169012
+ }(main, main.exports));
168949
169013
 
168950
- const isAMD = "define" in window && typeof window.define === "function" && "amd" in window.define;
169014
+ // src/index.ts
169015
+ var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
168951
169016
  function isDefaultModule(module) {
168952
- return module.default !== undefined;
168953
- }
168954
- async function requireModule(modulePath) {
168955
- return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
168956
- resolve(moduleDefault);
168957
- }));
169017
+ return module.default !== void 0;
168958
169018
  }
168959
169019
  async function importLayersFeatureLayer() {
168960
- if (isAMD) {
168961
- return await requireModule("esri/layers/FeatureLayer");
168962
- }
168963
- const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/layers/FeatureLayer.js')); });
168964
- return isDefaultModule(module) ? module.default : module;
169020
+ if (isAMD) {
169021
+ return await window.$arcgis.import("esri/layers/FeatureLayer");
169022
+ }
169023
+ const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/layers/FeatureLayer.js')); });
169024
+ return isDefaultModule(module) ? module.default : module;
169025
+ }
169026
+ async function newLayersFeatureLayer(properties) {
169027
+ const ModConstructor = await importLayersFeatureLayer();
169028
+ return new ModConstructor(properties);
168965
169029
  }
168966
169030
  async function importPortalPortalItem() {
168967
- if (isAMD) {
168968
- return await requireModule("esri/portal/PortalItem");
168969
- }
168970
- const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/portal/PortalItem.js')); });
168971
- return isDefaultModule(module) ? module.default : module;
169031
+ if (isAMD) {
169032
+ return await window.$arcgis.import("esri/portal/PortalItem");
169033
+ }
169034
+ const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/portal/PortalItem.js')); });
169035
+ return isDefaultModule(module) ? module.default : module;
168972
169036
  }
168973
169037
  async function newPortalPortalItem(properties) {
168974
- const ModConstructor = await importPortalPortalItem();
168975
- return new ModConstructor(properties);
169038
+ const ModConstructor = await importPortalPortalItem();
169039
+ return new ModConstructor(properties);
168976
169040
  }
168977
169041
  async function importWebMap() {
168978
- if (isAMD) {
168979
- return await requireModule("esri/WebMap");
168980
- }
168981
- const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/WebMap.js')); });
168982
- return isDefaultModule(module) ? module.default : module;
169042
+ if (isAMD) {
169043
+ return await window.$arcgis.import("esri/WebMap");
169044
+ }
169045
+ const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/WebMap.js')); });
169046
+ return isDefaultModule(module) ? module.default : module;
168983
169047
  }
168984
169048
  async function newWebMap(properties) {
168985
- const ModConstructor = await importWebMap();
168986
- return new ModConstructor(properties);
169049
+ const ModConstructor = await importWebMap();
169050
+ return new ModConstructor(properties);
168987
169051
  }
168988
169052
  async function importWebScene() {
168989
- if (isAMD) {
168990
- return await requireModule("esri/WebScene");
168991
- }
168992
- const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/WebScene.js')); });
168993
- return isDefaultModule(module) ? module.default : module;
169053
+ if (isAMD) {
169054
+ return await window.$arcgis.import("esri/WebScene");
169055
+ }
169056
+ const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/WebScene.js')); });
169057
+ return isDefaultModule(module) ? module.default : module;
168994
169058
  }
168995
169059
  async function newWebScene(properties) {
168996
- const ModConstructor = await importWebScene();
168997
- return new ModConstructor(properties);
169060
+ const ModConstructor = await importWebScene();
169061
+ return new ModConstructor(properties);
168998
169062
  }
168999
169063
  async function importArcade() {
169000
- if (isAMD) {
169001
- return await requireModule("esri/arcade");
169002
- }
169003
- const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/arcade.js')); });
169004
- return isDefaultModule(module) ? module.default : module;
169064
+ if (isAMD) {
169065
+ return await window.$arcgis.import("esri/arcade");
169066
+ }
169067
+ const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/arcade.js')); });
169068
+ return isDefaultModule(module) ? module.default : module;
169005
169069
  }
169006
169070
  async function importRequest() {
169007
- if (isAMD) {
169008
- return await requireModule("esri/request");
169009
- }
169010
- const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/request.js')); });
169011
- return isDefaultModule(module) ? module.default : module;
169071
+ if (isAMD) {
169072
+ return await window.$arcgis.import("esri/request");
169073
+ }
169074
+ const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/request.js')); });
169075
+ return isDefaultModule(module) ? module.default : module;
169012
169076
  }
169013
169077
 
169014
- //#region core adapter fix
169015
- async function newFeatureLayer(definition) {
169016
- const FeatureLayer = await importLayersFeatureLayer();
169017
- // Fix title for the layer. Instead of defaulting to the map viewer style.
169018
- return new FeatureLayer({ ...definition, sublayerTitleMode: "service-name" });
169019
- }
169020
- //#endregion
169021
169078
  //#region Type Guards
169022
- function isSupportedLayerInstance(item) {
169023
- return (!!item &&
169024
- typeof item === "object" &&
169025
- "declaredClass" in item &&
169026
- typeof item.declaredClass === "string" &&
169027
- item.declaredClass.startsWith("esri.layers."));
169028
- }
169029
- function isFeatureSetInstance(item) {
169030
- return (!!item &&
169031
- typeof item === "object" &&
169032
- "declaredClass" in item &&
169033
- typeof item.declaredClass === "string" &&
169034
- item.declaredClass === "esri.rest.support.FeatureSet");
169035
- }
169036
- function isQueryableLayerInstance(item) {
169079
+ function isFeatureLayerLikeInstance(item) {
169037
169080
  return (!!item &&
169038
169081
  typeof item === "object" &&
169039
169082
  "declaredClass" in item &&
169040
169083
  typeof item.declaredClass === "string" &&
169041
169084
  item.declaredClass.startsWith("esri.layers.") &&
169042
- "fields" in item &&
169085
+ isFieldsDefinition(item) &&
169043
169086
  "queryFeatures" in item &&
169044
169087
  typeof item.queryFeatures === "function");
169045
169088
  }
@@ -169062,7 +169105,18 @@ function isMapInstance(item) {
169062
169105
  typeof item === "object" &&
169063
169106
  "declaredClass" in item &&
169064
169107
  typeof item.declaredClass === "string" &&
169065
- (item.declaredClass === "esri.WebMap" || item.declaredClass === "esri.WebScene"));
169108
+ (item.declaredClass === "esri.Map" ||
169109
+ item.declaredClass === "esri.WebMap" ||
169110
+ item.declaredClass === "esri.WebScene"));
169111
+ }
169112
+ function isWebMapInstance(item) {
169113
+ return item.declaredClass === "esri.WebMap";
169114
+ }
169115
+ function isWebSceneInstance(item) {
169116
+ return item.declaredClass === "esri.WebScene";
169117
+ }
169118
+ function isLoadableMapInstance(item) {
169119
+ return item.declaredClass === "esri.WebMap" || item.declaredClass === "esri.WebScene";
169066
169120
  }
169067
169121
  function isPortalItemDefinition(item) {
169068
169122
  return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
@@ -169071,10 +169125,13 @@ function isFeatureLayerItemDefinition(item) {
169071
169125
  return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
169072
169126
  }
169073
169127
  function isFieldsDefinition(item) {
169074
- return (!!item && typeof item === "object" && "fields" in item && Array.isArray(item.fields) && !("declaredClass" in item));
169128
+ return !!item && typeof item === "object" && "fields" in item && Array.isArray(item.fields);
169075
169129
  }
169076
169130
  function isUrlDefinition(item) {
169077
- return (!!item && typeof item === "object" && "url" in item && typeof item.url === "string" && !("declaredClass" in item));
169131
+ return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
169132
+ }
169133
+ function isSupportedServiceUrlDefinition(item) {
169134
+ return isUrlDefinition(item) && /\/(?:featureserver|mapserver)(?:\/|$)/iu.test(item.url);
169078
169135
  }
169079
169136
  function isSubtypeInstance(item) {
169080
169137
  return (!!item &&
@@ -169144,11 +169201,11 @@ async function supportedSourceFromDefinition(definition) {
169144
169201
  return null;
169145
169202
  }
169146
169203
  let source = null;
169147
- if (isSupportedLayerInstance(definition) || isFeatureSetInstance(definition) || isFieldsDefinition(definition)) {
169204
+ if (isFieldsDefinition(definition)) {
169148
169205
  source = definition;
169149
169206
  }
169150
169207
  else {
169151
- source = await newFeatureLayer(definition);
169208
+ source = await newLayersFeatureLayer(definition);
169152
169209
  }
169153
169210
  if (isLoadableSource(source)) {
169154
169211
  await source.load();
@@ -169159,32 +169216,428 @@ async function serviceMetaData(url) {
169159
169216
  url += "/layers";
169160
169217
  const request = await importRequest();
169161
169218
  const response = await request(url, { responseType: "json", query: { f: "json" } });
169162
- const data = {
169163
- layers: response.data?.layers ?? [],
169164
- tables: response.data?.tables ?? []
169165
- };
169166
169219
  const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
169167
- const layers = filterFeatureLayerInfos(data.layers, queryCapability);
169168
- const tables = filterFeatureLayerInfos(data.tables, queryCapability);
169220
+ const layers = getSupportedLayerInfos(response.data?.layers, queryCapability);
169221
+ const tables = getSupportedLayerInfos(response.data?.tables, queryCapability);
169169
169222
  return { layers, tables };
169170
169223
  }
169171
- function filterFeatureLayerInfos(layers, queryCapability) {
169224
+ function getSupportedLayerInfos(layers, queryCapability) {
169225
+ if (!layers) {
169226
+ return [];
169227
+ }
169172
169228
  return layers.filter((layer) => {
169173
- if (layer.type !== "Feature Layer" && layer.type !== "Table") {
169174
- return false;
169229
+ switch (layer.type) {
169230
+ case "Feature Layer":
169231
+ case "Oriented Imagery Layer":
169232
+ case "Catalog Layer":
169233
+ case "Table": {
169234
+ const capabilities = layer.capabilities
169235
+ ? layer.capabilities
169236
+ .toLowerCase()
169237
+ .split(",")
169238
+ .map((value) => value.trim())
169239
+ : [];
169240
+ return capabilities.includes(queryCapability);
169241
+ }
169242
+ default:
169243
+ return false;
169175
169244
  }
169176
- const capabilities = layer.capabilities
169177
- ? layer.capabilities
169178
- .toLowerCase()
169179
- .split(",")
169180
- .map((value) => value.trim())
169181
- : [];
169182
- return capabilities.includes(queryCapability);
169183
169245
  });
169184
169246
  }
169185
169247
  //#endregion
169186
169248
 
169187
- var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function x(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let s of o)S(e,s.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function k(e){let t=T(e,":is(.calcite-mode-light, .calcite-mode-dark)");return t&&t.classList.contains("calcite-mode-dark")?"dark":"light"}function f(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}function M(e){return e.nodeType===Node.ELEMENT_NODE}function R(e){return "setFocus"in e&&typeof e.setFocus=="function"}function d(e,t=""){if(!M(e))return !1;if(e.matches(t))return R(e)&&setTimeout(()=>e.setFocus(),0),!0;for(let r of e.children)if(d(r,t))return !0;let n=e.shadowRoot;if(n){for(let r of n.children)if(d(r,t))return !0}return !1}function W(e,t){if(!e?.shadowRoot)return;if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){d(e,t);return}let n=new MutationObserver(()=>{n.disconnect(),d(e,t);});n.observe(e,{attributes:!0,attributeFilter:["hydrated","calcite-hydrated"]});}function c(e){let t="";for(let n=0;n<e;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}function U(){return [c(2),c(1),c(1),c(1),c(3)].join("-")}var E=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function v(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let i=await o.json();return a.set(r,i),i}if(e==="en"){a.set(r,void 0);return}let s=await v("en",t,n);return a.set(r,s),s}catch{a.set(r,void 0);return}}function _(e){let t=f(e,"lang",navigator.language||"en");if(E.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:E.has(n)?n:"en"}}var p=new WeakMap,m=new WeakMap,C=new WeakMap;async function B(e,t,n){m.set(e,t),p.set(e,x(e._hostElement,["lang"],()=>{b(e,n).catch(console.error);})),await b(e,n);}function q(e){p.get(e)?.disconnect(),p.delete(e),m.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=_(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=C.get(e);if(!o){let s=m.get(e)??"",i=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),l=`${s}/${i}/t9n`,u=`${i}.t9n.`;o=await v(r,l,u);}r!==e._t9nLocale&&(e._t9nLocale=r,e._t9nStrings=o,await t?.call(e));}var N='"',w="'";function L(e,t){return new Array(t+1).join(e)}function D(e){let t=N,n=w;e.includes(t)&&!e.includes(n)&&(n=N,t=w);let o=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${n})+)`,"gu");e=e.replace(o,(i,l,u,g)=>l+u+L(n,g.length/2));let s=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return e=e.replace(s,(i,l,u,g)=>l+u+L(`\\${t}`,g.length)),t+e+t}function K(e){let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")}function Z(e,t={}){return (e??"").replace(/\{(.*?)\}/gu,(n,r)=>t[r]??n)}function G(e){return `\u200E${e??""}\u200E`}function ee(e){return e!==null}function te(e){return e!==void 0}function re(e,t=100){let n;return (...r)=>{let o=()=>{clearTimeout(n),e(...r);};clearTimeout(n),n=setTimeout(o,t);}}function se(e,t,n=!1){if(!e||!t)return !1;let r=new URL(e),o=new URL(t);return !n&&r.protocol!==o.protocol||r.host==null||o.host==null?!1:r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port}function ie(e){try{return new URL(e),!0}catch{return !1}}
169249
+ // src/array-utils.ts
169250
+
169251
+ // src/deferred.ts
169252
+ var Deferred = class {
169253
+ /**
169254
+ * Resolves the promise.
169255
+ * @param value The value to resolve the promise with.
169256
+ */
169257
+ resolve(_value) {
169258
+ }
169259
+ /**
169260
+ * Rejects the promise.
169261
+ */
169262
+ reject(_error) {
169263
+ }
169264
+ /**
169265
+ * Creates a new deferred promise.
169266
+ */
169267
+ constructor() {
169268
+ this.promise = new Promise((resolve, reject) => {
169269
+ this.resolve = resolve;
169270
+ this.reject = reject;
169271
+ });
169272
+ }
169273
+ };
169274
+
169275
+ // src/dom.ts
169276
+ function inTargetElement(element, targetElement) {
169277
+ let currentElement = element;
169278
+ while (currentElement) {
169279
+ if (currentElement === targetElement) {
169280
+ return true;
169281
+ }
169282
+ if (!currentElement.parentNode) {
169283
+ return false;
169284
+ }
169285
+ if (currentElement.parentNode instanceof ShadowRoot) {
169286
+ currentElement = currentElement.parentNode.host;
169287
+ } else {
169288
+ currentElement = currentElement.parentNode;
169289
+ }
169290
+ }
169291
+ return false;
169292
+ }
169293
+ function observeAncestorsMutation(element, attributeFilter, callback) {
169294
+ const { subscribe } = observe(attributeFilter);
169295
+ return subscribe((mutations) => {
169296
+ const matched = mutations.some((mutation) => inTargetElement(element, mutation.target));
169297
+ if (matched) {
169298
+ callback();
169299
+ }
169300
+ });
169301
+ }
169302
+ var observers = {};
169303
+ function observe(attributeFilter) {
169304
+ const attributes = attributeFilter.join(",");
169305
+ const previousObserver = observers[attributes];
169306
+ if (previousObserver !== void 0) {
169307
+ return previousObserver;
169308
+ }
169309
+ const subscribers = /* @__PURE__ */ new Set();
169310
+ const mutationObserver = new MutationObserver((mutations) => subscribers.forEach((callback) => callback(mutations)));
169311
+ mutationObserver.observe(document.documentElement, {
169312
+ attributes: true,
169313
+ attributeFilter,
169314
+ subtree: true
169315
+ });
169316
+ const observer = {
169317
+ subscribe(callback) {
169318
+ subscribers.add(callback);
169319
+ return {
169320
+ remove: () => {
169321
+ subscribers.delete(callback);
169322
+ if (subscribers.size === 0) {
169323
+ mutationObserver.disconnect();
169324
+ observers[attributes] = void 0;
169325
+ }
169326
+ }
169327
+ };
169328
+ }
169329
+ };
169330
+ observers[attributes] = observer;
169331
+ return observer;
169332
+ }
169333
+ function closestElement(base, selector) {
169334
+ let currentElement = base;
169335
+ while (currentElement) {
169336
+ const element = currentElement.closest(selector);
169337
+ if (element) {
169338
+ return element;
169339
+ }
169340
+ const rootElement = currentElement.getRootNode();
169341
+ if (rootElement === document) {
169342
+ return null;
169343
+ }
169344
+ currentElement = rootElement.host;
169345
+ }
169346
+ return null;
169347
+ }
169348
+ function getElementTheme(base) {
169349
+ const themeElt = closestElement(base, ":is(.calcite-mode-light, .calcite-mode-dark)");
169350
+ return themeElt && themeElt.classList.contains("calcite-mode-dark") ? "dark" : "light";
169351
+ }
169352
+ function getElementAttribute(el, prop, fallbackValue) {
169353
+ const closest = closestElement(el, `[${prop}]`);
169354
+ return closest?.getAttribute(prop) ?? fallbackValue;
169355
+ }
169356
+ function isElement(ref) {
169357
+ return ref.nodeType === Node.ELEMENT_NODE;
169358
+ }
169359
+ function isHTMLWithSetFocus(ref) {
169360
+ return "setFocus" in ref && typeof ref.setFocus === "function";
169361
+ }
169362
+ function setFocus(ref, selector = "") {
169363
+ if (!isElement(ref)) {
169364
+ return false;
169365
+ }
169366
+ if (ref.matches(selector)) {
169367
+ if (isHTMLWithSetFocus(ref)) {
169368
+ setTimeout(() => ref.setFocus(), 0);
169369
+ }
169370
+ return true;
169371
+ }
169372
+ for (const child of ref.children) {
169373
+ if (setFocus(child, selector)) {
169374
+ return true;
169375
+ }
169376
+ }
169377
+ const shadowRoot = ref.shadowRoot;
169378
+ if (shadowRoot) {
169379
+ for (const child of shadowRoot.children) {
169380
+ if (setFocus(child, selector)) {
169381
+ return true;
169382
+ }
169383
+ }
169384
+ }
169385
+ return false;
169386
+ }
169387
+ function setFocusOnElement(ref, selector) {
169388
+ if (!ref?.shadowRoot) {
169389
+ return;
169390
+ }
169391
+ if (ref.hasAttribute("hydrated") || ref.hasAttribute("calcite-hydrated")) {
169392
+ setFocus(ref, selector);
169393
+ return;
169394
+ }
169395
+ const mutationObserver = new MutationObserver(() => {
169396
+ mutationObserver.disconnect();
169397
+ setFocus(ref, selector);
169398
+ });
169399
+ mutationObserver.observe(ref, {
169400
+ attributes: true,
169401
+ attributeFilter: ["hydrated", "calcite-hydrated"]
169402
+ });
169403
+ }
169404
+
169405
+ // src/errors.ts
169406
+ function safeCall(callback, thisContext, ...rest) {
169407
+ try {
169408
+ return callback?.call(thisContext, ...rest);
169409
+ } catch (error) {
169410
+ console.error(error, callback);
169411
+ }
169412
+ return void 0;
169413
+ }
169414
+ async function safeAsyncCall(callback, thisContext, ...rest) {
169415
+ try {
169416
+ const result = callback?.call(thisContext, ...rest);
169417
+ return result instanceof Promise ? await result : result;
169418
+ } catch (error) {
169419
+ console.error(error, callback);
169420
+ }
169421
+ return void 0;
169422
+ }
169423
+
169424
+ // src/guid.ts
169425
+ function gen(count) {
169426
+ let out = "";
169427
+ for (let i = 0; i < count; i++) {
169428
+ out += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
169429
+ }
169430
+ return out;
169431
+ }
169432
+ function generateGuid() {
169433
+ return [gen(2), gen(1), gen(1), gen(1), gen(3)].join("-");
169434
+ }
169435
+ var camelToKebab = (string) => string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : "-"}${upper.toLowerCase()}`);
169436
+ var upperBeforeLower = /[A-Z]+(?![a-z])|[A-Z]/gu;
169437
+ var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
169438
+ var camelToHuman = (string) => capitalize(string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : " "}${upper}`));
169439
+
169440
+ // src/intl.ts
169441
+ var supportedLocales = /* @__PURE__ */ new Set([
169442
+ "ar",
169443
+ "bg",
169444
+ "bs",
169445
+ "ca",
169446
+ "cs",
169447
+ "da",
169448
+ "de",
169449
+ "el",
169450
+ "en",
169451
+ "es",
169452
+ "et",
169453
+ "fi",
169454
+ "fr",
169455
+ "he",
169456
+ "hr",
169457
+ "hu",
169458
+ "id",
169459
+ "it",
169460
+ "ja",
169461
+ "ko",
169462
+ "lt",
169463
+ "lv",
169464
+ "nl",
169465
+ "nb",
169466
+ "pl",
169467
+ "pt-BR",
169468
+ "pt-PT",
169469
+ "ro",
169470
+ "ru",
169471
+ "sk",
169472
+ "sl",
169473
+ "sr",
169474
+ "sv",
169475
+ "th",
169476
+ "tr",
169477
+ "uk",
169478
+ "vi",
169479
+ "zh-CN",
169480
+ "zh-HK",
169481
+ "zh-TW"
169482
+ ]);
169483
+ var defaultLocale = "en";
169484
+ async function fetchT9NStringsBundle(locale, assetsPath, prefix = "") {
169485
+ const path = `${assetsPath}/${prefix}`;
169486
+ const filePath = `${path}${locale}.json`;
169487
+ t9nStringsCache[filePath] ?? (t9nStringsCache[filePath] = fetchBundle(locale, path));
169488
+ return await t9nStringsCache[filePath];
169489
+ }
169490
+ var t9nStringsCache = {};
169491
+ async function fetchBundle(locale, path) {
169492
+ const filePath = `${path}${locale}.json`;
169493
+ try {
169494
+ const response = await fetch(filePath);
169495
+ if (response.ok) {
169496
+ return await response.json();
169497
+ }
169498
+ } catch (error) {
169499
+ console.error(error);
169500
+ return fallbackBundle;
169501
+ }
169502
+ if (locale === defaultLocale) {
169503
+ return fallbackBundle;
169504
+ }
169505
+ return await fetchBundle(defaultLocale, path);
169506
+ }
169507
+ var fallbackBundle = new Proxy(
169508
+ {},
169509
+ {
169510
+ get: (_target, property) => camelToHuman(property.toString())
169511
+ }
169512
+ );
169513
+ function getElementLocales(element) {
169514
+ const lang = getElementAttribute(element, "lang", navigator.language || defaultLocale);
169515
+ if (supportedLocales.has(lang)) {
169516
+ return { lang, t9nLocale: lang };
169517
+ }
169518
+ const rootCode = lang.slice(0, 2);
169519
+ return { lang, t9nLocale: supportedLocales.has(rootCode) ? rootCode : defaultLocale };
169520
+ }
169521
+ function startLocaleObserver(element, assetsPath, onUpdated, assetName) {
169522
+ let result = void 0;
169523
+ const callback = () => void updateComponentLocateState(element, assetsPath, assetName).then((newResult) => {
169524
+ if (result?.lang !== newResult.lang || result.t9nLocale !== newResult.t9nLocale || result.t9nStrings !== newResult.t9nStrings) {
169525
+ onUpdated(newResult);
169526
+ }
169527
+ result = newResult;
169528
+ }).catch(console.error);
169529
+ callback();
169530
+ return observeAncestorsMutation(element, ["lang"], callback);
169531
+ }
169532
+ async function updateComponentLocateState(element, assetsPath, assetName = element.tagName.toLowerCase().replace("arcgis-", "")) {
169533
+ const { lang, t9nLocale } = getElementLocales(element);
169534
+ const t9nAssetsPath = `${assetsPath}/${assetName}/t9n`;
169535
+ const prefix = `${assetName}.t9n.`;
169536
+ const t9nStrings = await fetchT9NStringsBundle(t9nLocale, t9nAssetsPath, prefix);
169537
+ return { lang, t9nLocale, t9nStrings };
169538
+ }
169539
+
169540
+ // src/strings.ts
169541
+ var doubleQuote = '"';
169542
+ var singleQuote = "'";
169543
+ function repeatString(value, n) {
169544
+ return new Array(n + 1).join(value);
169545
+ }
169546
+ function quoteString(value) {
169547
+ let quote = doubleQuote;
169548
+ let alternateQuote = singleQuote;
169549
+ const avoidEscape = value.includes(quote) && !value.includes(alternateQuote);
169550
+ if (avoidEscape) {
169551
+ alternateQuote = doubleQuote;
169552
+ quote = singleQuote;
169553
+ }
169554
+ const alternateEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${alternateQuote})+)`, "gu");
169555
+ value = value.replace(
169556
+ alternateEscape,
169557
+ (_, boundaryChar, leadingEscapedSlashes, escapedQuoteChars) => (
169558
+ // We divide the escapedQuoteChars by 2 since there are 2 characters in each escaped part ('\\"'.length === 2)
169559
+ boundaryChar + leadingEscapedSlashes + repeatString(alternateQuote, escapedQuoteChars.length / 2)
169560
+ )
169561
+ );
169562
+ const quoteEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${quote}+)`, "gu");
169563
+ value = value.replace(
169564
+ quoteEscape,
169565
+ (_, boundaryChar, leadingEscapedSlashes, quoteChars) => boundaryChar + leadingEscapedSlashes + repeatString(`\\${quote}`, quoteChars.length)
169566
+ );
169567
+ return quote + value + quote;
169568
+ }
169569
+ function createFilterExpression(filterWord) {
169570
+ const sanitizedWord = filterWord ? filterWord.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu, "\\$&") : "^.*$";
169571
+ return new RegExp(sanitizedWord, "i");
169572
+ }
169573
+ function setValuesInString(message, values = {}) {
169574
+ return (message ?? "").replace(/\{(?<valueName>.*?)\}/gu, (match, valueName) => values[valueName] ?? match);
169575
+ }
169576
+ function addLTRMark(value) {
169577
+ return `\u200E${value ?? ""}\u200E`;
169578
+ }
169579
+
169580
+ // src/timeouts.ts
169581
+ function devToolsAwareTimeout(callback, timeout) {
169582
+ const interval = timeout > longTimeoutThreshold ? longTimeoutInterval : timeout / shortTimeoutIntervals;
169583
+ let elapsed = 0;
169584
+ const reference = setInterval(() => {
169585
+ elapsed += interval;
169586
+ if (elapsed >= timeout) {
169587
+ clearInterval(reference);
169588
+ callback();
169589
+ }
169590
+ }, interval);
169591
+ return reference;
169592
+ }
169593
+ var longTimeoutThreshold = 4e3;
169594
+ var longTimeoutInterval = 2e3;
169595
+ var shortTimeoutIntervals = 4;
169596
+
169597
+ // src/type-guards.ts
169598
+ function isNotNull(item) {
169599
+ return item !== null;
169600
+ }
169601
+ function isNotUndefined(item) {
169602
+ return item !== void 0;
169603
+ }
169604
+
169605
+ // src/ui.ts
169606
+ function debounce(func, waitFor = 100) {
169607
+ let timeout;
169608
+ return (...args) => {
169609
+ const later = () => {
169610
+ clearTimeout(timeout);
169611
+ func(...args);
169612
+ };
169613
+ clearTimeout(timeout);
169614
+ timeout = setTimeout(later, waitFor);
169615
+ };
169616
+ }
169617
+
169618
+ // src/url.ts
169619
+ function hasSameOrigin(url1, url2, ignoreProtocol = false) {
169620
+ if (!url1 || !url2) {
169621
+ return false;
169622
+ }
169623
+ const url1Obj = new URL(url1);
169624
+ const url2Obj = new URL(url2);
169625
+ if (!ignoreProtocol && url1Obj.protocol !== url2Obj.protocol) {
169626
+ return false;
169627
+ }
169628
+ if (url1Obj.host == null || url2Obj.host == null) {
169629
+ return false;
169630
+ }
169631
+ return url1Obj.host.toLowerCase() === url2Obj.host.toLowerCase() && url1Obj.port === url2Obj.port;
169632
+ }
169633
+ function isURL(url) {
169634
+ try {
169635
+ new URL(url);
169636
+ return true;
169637
+ } catch (e) {
169638
+ return false;
169639
+ }
169640
+ }
169188
169641
 
169189
169642
  /**
169190
169643
  * Filters a collection of items by the given keys and filter word.
@@ -169197,7 +169650,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
169197
169650
  if (!_keys.length) {
169198
169651
  return [];
169199
169652
  }
169200
- const filterExpression = K(filterWord);
169653
+ const filterExpression = createFilterExpression(filterWord);
169201
169654
  return collection.filter((item) => {
169202
169655
  if (beforeFilteringFn) {
169203
169656
  const res = beforeFilteringFn(item);
@@ -169307,7 +169760,7 @@ function fieldAlias(field) {
169307
169760
  //#endregion
169308
169761
  //#region Support functions
169309
169762
  async function getRelatedFeatureLayer(layer, relationship) {
169310
- const relatedFeatureLayer = await newFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
169763
+ const relatedFeatureLayer = await newLayersFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
169311
169764
  await relatedFeatureLayer.load();
169312
169765
  return relatedFeatureLayer;
169313
169766
  }
@@ -169363,9 +169816,15 @@ function assembleMemberExpression(obj, prop) {
169363
169816
  }
169364
169817
  return `${obj}${getMemberExpressionProperty(prop)}`;
169365
169818
  }
169819
+ function getMapPortalItem(map) {
169820
+ if (isWebMapInstance(map) || isWebSceneInstance(map)) {
169821
+ return map.portalItem;
169822
+ }
169823
+ return null;
169824
+ }
169366
169825
  //#endregion
169367
169826
  //#region Editor Profile to Language Service Profile functions
169368
- async function variablesToLSVariable(editorVariables, kind = main.CompletionItemKind.Variable) {
169827
+ async function variablesToLSVariable(editorVariables, kind = main.exports.CompletionItemKind.Variable) {
169369
169828
  return await Promise.all(editorVariables.map(async (editorVariable) => {
169370
169829
  switch (editorVariable.type) {
169371
169830
  case "dictionary":
@@ -169388,11 +169847,11 @@ function variableToLSVariable(editorVariable, kind) {
169388
169847
  label: name,
169389
169848
  detail: name,
169390
169849
  insertText: name,
169391
- insertTextMode: main.InsertTextMode.asIs,
169392
- insertTextFormat: main.InsertTextFormat.PlainText,
169850
+ insertTextMode: main.exports.InsertTextMode.asIs,
169851
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
169393
169852
  kind,
169394
- documentation: { kind: "markdown", value: description }
169395
- }
169853
+ documentation: { kind: "markdown", value: description },
169854
+ },
169396
169855
  };
169397
169856
  }
169398
169857
  async function featureToLSFeature(editorFeature, kind) {
@@ -169404,16 +169863,16 @@ async function featureToLSFeature(editorFeature, kind) {
169404
169863
  label: name,
169405
169864
  detail: name,
169406
169865
  insertText: name,
169407
- insertTextMode: main.InsertTextMode.asIs,
169408
- insertTextFormat: main.InsertTextFormat.PlainText,
169409
- kind
169866
+ insertTextMode: main.exports.InsertTextMode.asIs,
169867
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
169868
+ kind,
169410
169869
  };
169411
169870
  const result = {
169412
169871
  name,
169413
169872
  description,
169414
169873
  type: "dictionary",
169415
169874
  properties: [],
169416
- completion: resultCompletion
169875
+ completion: resultCompletion,
169417
169876
  };
169418
169877
  // No source definition, then it will be a feature without any known fields
169419
169878
  if (!source) {
@@ -169448,11 +169907,11 @@ async function featureToLSFeature(editorFeature, kind) {
169448
169907
  label: field.name,
169449
169908
  detail: description,
169450
169909
  insertText,
169451
- insertTextMode: main.InsertTextMode.asIs,
169452
- insertTextFormat: main.InsertTextFormat.PlainText,
169453
- kind: main.CompletionItemKind.Field,
169454
- documentation: { kind: "markdown", value: fieldCompletionDescription }
169455
- }
169910
+ insertTextMode: main.exports.InsertTextMode.asIs,
169911
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
169912
+ kind: main.exports.CompletionItemKind.Field,
169913
+ documentation: { kind: "markdown", value: fieldCompletionDescription },
169914
+ },
169456
169915
  });
169457
169916
  if (!field.alias || field.alias.toLowerCase() === field.name.toLowerCase()) {
169458
169917
  return;
@@ -169470,11 +169929,11 @@ async function featureToLSFeature(editorFeature, kind) {
169470
169929
  label: field.alias,
169471
169930
  detail: field.name,
169472
169931
  insertText,
169473
- insertTextMode: main.InsertTextMode.asIs,
169474
- insertTextFormat: main.InsertTextFormat.PlainText,
169475
- kind: main.CompletionItemKind.Field,
169476
- documentation: { kind: "markdown", value: aliasCompletionDescription }
169477
- }
169932
+ insertTextMode: main.exports.InsertTextMode.asIs,
169933
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
169934
+ kind: main.exports.CompletionItemKind.Field,
169935
+ documentation: { kind: "markdown", value: aliasCompletionDescription },
169936
+ },
169478
169937
  });
169479
169938
  });
169480
169939
  result.properties = [...fieldProfileValues, ...aliasProfileValues];
@@ -169499,16 +169958,16 @@ async function dictionaryToLSDictionary(editorDictionary, kind) {
169499
169958
  name,
169500
169959
  description,
169501
169960
  type: "dictionary",
169502
- properties: await variablesToLSVariable(variables, main.CompletionItemKind.Field),
169961
+ properties: await variablesToLSVariable(variables, main.exports.CompletionItemKind.Field),
169503
169962
  completion: {
169504
169963
  label: name,
169505
169964
  detail: name,
169506
169965
  insertText: name,
169507
- insertTextMode: main.InsertTextMode.asIs,
169508
- insertTextFormat: main.InsertTextFormat.PlainText,
169966
+ insertTextMode: main.exports.InsertTextMode.asIs,
169967
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
169509
169968
  kind,
169510
- documentation: { kind: "markdown", value: completionDescription }
169511
- }
169969
+ documentation: { kind: "markdown", value: completionDescription },
169970
+ },
169512
169971
  };
169513
169972
  }
169514
169973
  /**
@@ -169535,9 +169994,9 @@ class ProfileItemBase {
169535
169994
  // If the component is under RTL, the string is messed up.
169536
169995
  // It is converted from $feature to feature$, This is not acceptable since the label
169537
169996
  // represents a variable name. We are adding in front of the $ sign a right to left mark.
169538
- return G(this._label);
169997
+ return addLTRMark(this._label);
169539
169998
  }
169540
- return Z(this._profile?.intlStrings[this._label.code], this._label.formatValues);
169999
+ return setValuesInString(this._profile?.intlStrings[this._label.code], this._label.formatValues);
169541
170000
  }
169542
170001
  /**
169543
170002
  * Returns the description string.
@@ -169549,7 +170008,7 @@ class ProfileItemBase {
169549
170008
  if (typeof this.description === "string") {
169550
170009
  return this.description;
169551
170010
  }
169552
- return Z(this._profile?.intlStrings[this.description.code], this.description.formatValues);
170011
+ return setValuesInString(this._profile?.intlStrings[this.description.code], this.description.formatValues);
169553
170012
  }
169554
170013
  /**
169555
170014
  * Returns true if the item pass the filter test
@@ -169726,28 +170185,28 @@ class DictionaryVariable extends CollectionBasedVariable {
169726
170185
  return new FeatureVariable(this, { profile: this._profile, declaration, label: snippet, snippet });
169727
170186
  case "featureSet":
169728
170187
  return new FeatureSetVariable(this, { profile: this._profile, declaration, label: snippet, snippet }, [
169729
- new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })
170188
+ new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet }),
169730
170189
  ]);
169731
170190
  case "featureSetCollection":
169732
170191
  return new FeatureSetCollectionVariable(this, {
169733
170192
  profile: this._profile,
169734
170193
  declaration,
169735
170194
  label: snippet,
169736
- snippet
170195
+ snippet,
169737
170196
  });
169738
170197
  case "dictionary":
169739
170198
  return new DictionaryVariable(this, {
169740
170199
  profile: this._profile,
169741
170200
  declaration,
169742
170201
  label: snippet,
169743
- snippet
170202
+ snippet,
169744
170203
  });
169745
170204
  case "array":
169746
170205
  return new ArrayVariable({
169747
170206
  profile: this._profile,
169748
170207
  declaration,
169749
170208
  label: snippet,
169750
- snippet
170209
+ snippet,
169751
170210
  });
169752
170211
  default:
169753
170212
  console.error("Editor profile: Invalid profile variable", declaration);
@@ -169759,7 +170218,7 @@ class DictionaryVariable extends CollectionBasedVariable {
169759
170218
  type: this.type,
169760
170219
  name: "",
169761
170220
  ...this.declaration,
169762
- properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
170221
+ properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
169763
170222
  };
169764
170223
  }
169765
170224
  }
@@ -169790,7 +170249,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169790
170249
  return this._profile?.intlStrings.layer ?? "layer";
169791
170250
  }
169792
170251
  async loadSource() {
169793
- if (ee(this._loadPromise) && te(this._loadPromise)) {
170252
+ if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
169794
170253
  return await this._loadPromise;
169795
170254
  }
169796
170255
  this._loadPromise = this._loadSource();
@@ -169825,7 +170284,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169825
170284
  description: fieldAlias(field),
169826
170285
  snippet: valueSnippet,
169827
170286
  icon: fieldTypeToIconName(field),
169828
- filterDescription: true
170287
+ filterDescription: true,
169829
170288
  });
169830
170289
  }
169831
170290
  _getDomainDictionary(field) {
@@ -169864,6 +170323,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169864
170323
  // Sepcial case for the subtype field
169865
170324
  if (field.name === this._source.subtypeField) {
169866
170325
  const domainDictionary = this._createDomainDictionary(field);
170326
+ domainDictionary.icon = "subtype";
169867
170327
  domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, field));
169868
170328
  return domainDictionary;
169869
170329
  }
@@ -169918,7 +170378,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169918
170378
  return null;
169919
170379
  }
169920
170380
  const domainValuesGroup = this._getCodedValueDomainGroup(fieldDomain, {
169921
- code: "domainvalues"
170381
+ code: "domainvalues",
169922
170382
  });
169923
170383
  const domainDictionary = this._createDomainDictionary(field);
169924
170384
  domainDictionary.variables.push(domainValuesGroup);
@@ -169936,7 +170396,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169936
170396
  profile: this._profile,
169937
170397
  label: `${label}`,
169938
170398
  description: t.name,
169939
- snippet: `"${label}"`
170399
+ snippet: `"${label}"`,
169940
170400
  });
169941
170401
  }) ?? [];
169942
170402
  return new GroupOfVariables(this._profile, { code: "subtypes" }, values);
@@ -169947,7 +170407,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169947
170407
  label: `${v.code}`,
169948
170408
  description: v.name,
169949
170409
  snippet: `"${v.code}"`,
169950
- filterDescription: true
170410
+ filterDescription: true,
169951
170411
  }));
169952
170412
  return new GroupOfVariables(this._profile, label, values);
169953
170413
  }
@@ -169973,8 +170433,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
169973
170433
  code: "domainvaluesfortypeformat",
169974
170434
  formatValues: {
169975
170435
  fieldName: alias,
169976
- typeName: type.name
169977
- }
170436
+ typeName: type.name,
170437
+ },
169978
170438
  });
169979
170439
  const id = isSubtypeInstance(type) ? type.code : type.id;
169980
170440
  const label = `${id}`;
@@ -169984,7 +170444,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169984
170444
  label,
169985
170445
  snippet,
169986
170446
  description: type.name,
169987
- declaration: { name: alias }
170447
+ declaration: { name: alias },
169988
170448
  });
169989
170449
  subtypeDictionary.variables = [domainValuesGroup];
169990
170450
  variables.push(subtypeDictionary);
@@ -170006,7 +170466,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
170006
170466
  description: alias,
170007
170467
  snippet: valueSnippet,
170008
170468
  icon: "form-dropdown",
170009
- declaration: { name: field.name }
170469
+ declaration: { name: field.name },
170010
170470
  });
170011
170471
  // Add the header group
170012
170472
  const headerGroup = new GroupOfVariables(this._profile, alias, [
@@ -170014,8 +170474,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
170014
170474
  profile: this._profile,
170015
170475
  label: valueSnippet,
170016
170476
  description: "",
170017
- snippet: valueSnippet
170018
- })
170477
+ snippet: valueSnippet,
170478
+ }),
170019
170479
  ]);
170020
170480
  domainDictionary.variables = [headerGroup];
170021
170481
  // Add the SubtypeName or DomainName snippet if available
@@ -170025,7 +170485,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
170025
170485
  profile: this._profile,
170026
170486
  label: subtypeOrDomainNameSnippet,
170027
170487
  description: "",
170028
- snippet: subtypeOrDomainNameSnippet
170488
+ snippet: subtypeOrDomainNameSnippet,
170029
170489
  }));
170030
170490
  }
170031
170491
  return domainDictionary;
@@ -170042,7 +170502,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
170042
170502
  const relationshipsGroup = new GroupOfVariables(this._profile, { code: "relationships" });
170043
170503
  const relationshipItems = await Promise.all(source.relationships.map(async (relationship) => {
170044
170504
  const relatedLayer = await getRelatedFeatureLayer(source, relationship);
170045
- if (!isQueryableLayerInstance(relatedLayer)) {
170505
+ if (!isFeatureLayerLikeInstance(relatedLayer)) {
170046
170506
  return null;
170047
170507
  }
170048
170508
  if (relationship.relatedTableId === this.relationshipsProperties?.sourceTableId) {
@@ -170055,10 +170515,10 @@ class SourceBasedVariable extends CollectionBasedVariable {
170055
170515
  declaration: { definition: relatedLayer },
170056
170516
  label: relatedLayer.title,
170057
170517
  description: "",
170058
- nonInteractive: true
170518
+ nonInteractive: true,
170059
170519
  }, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
170060
170520
  }));
170061
- relationshipsGroup.variables = relationshipItems.filter(ee);
170521
+ relationshipsGroup.variables = relationshipItems.filter(isNotNull);
170062
170522
  if (!relationshipsGroup.variables.length) {
170063
170523
  return null;
170064
170524
  }
@@ -170071,8 +170531,8 @@ class FeatureVariable extends SourceBasedVariable {
170071
170531
  this.type = "feature";
170072
170532
  }
170073
170533
  get title() {
170074
- if (isSupportedLayerInstance(this._source)) {
170075
- return this._source.title;
170534
+ if (isTitleCapableSource(this._source)) {
170535
+ return this._source.title ?? "";
170076
170536
  }
170077
170537
  return { code: "feature" };
170078
170538
  }
@@ -170086,14 +170546,14 @@ class FeatureVariable extends SourceBasedVariable {
170086
170546
  throw new Error("Invalid definition");
170087
170547
  }
170088
170548
  // The title group and snippet
170089
- const title = isSupportedLayerInstance(this._source) ? this._source.title : "";
170549
+ const title = isTitleCapableSource(this._source) ? this._source.title ?? "" : "";
170090
170550
  this.variables.push(new GroupOfVariables(this._profile, title, [
170091
170551
  new ValueVariable({
170092
170552
  profile: this._profile,
170093
170553
  label: this.snippet,
170094
170554
  description: "",
170095
- snippet: this.snippet
170096
- })
170555
+ snippet: this.snippet,
170556
+ }),
170097
170557
  ]));
170098
170558
  // The collection of feature attribute values
170099
170559
  const valuesGroup = new GroupOfVariables(this._profile, { code: "values" });
@@ -170108,7 +170568,7 @@ class FeatureVariable extends SourceBasedVariable {
170108
170568
  description: "Geometry",
170109
170569
  snippet,
170110
170570
  icon: "shapes",
170111
- filterDescription: true
170571
+ filterDescription: true,
170112
170572
  });
170113
170573
  valuesGroup.variables.push(geometryProperty);
170114
170574
  }
@@ -170121,8 +170581,8 @@ class FeatureVariable extends SourceBasedVariable {
170121
170581
  this.variables.push(relationshipsGroup);
170122
170582
  }
170123
170583
  }
170124
- catch (e) {
170125
- console.error("Loading issue", e, this);
170584
+ catch (error) {
170585
+ console.error("Error with definition", error, this._definition);
170126
170586
  this._source = null;
170127
170587
  }
170128
170588
  finally {
@@ -170144,8 +170604,8 @@ class FeatureSetVariable extends SourceBasedVariable {
170144
170604
  this.type = "featureSet";
170145
170605
  }
170146
170606
  get title() {
170147
- if (isSupportedLayerInstance(this._source)) {
170148
- return this._source.title;
170607
+ if (isTitleCapableSource(this._source)) {
170608
+ return this._source.title ?? "";
170149
170609
  }
170150
170610
  return { code: "featureset" };
170151
170611
  }
@@ -170172,8 +170632,8 @@ class FeatureSetVariable extends SourceBasedVariable {
170172
170632
  this.variables.push(relationshipsGroup);
170173
170633
  }
170174
170634
  }
170175
- catch (e) {
170176
- console.error("Loading issue", e, this);
170635
+ catch (error) {
170636
+ console.error("Error with definition", error, this._definition);
170177
170637
  this._source = null;
170178
170638
  }
170179
170639
  finally {
@@ -170198,7 +170658,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170198
170658
  return null;
170199
170659
  }
170200
170660
  if (typeof this._featureSetCollections.source !== "string") {
170201
- return portalItemPageUrl(this._featureSetCollections.source.portalItem);
170661
+ return portalItemPageUrl(getMapPortalItem(this._featureSetCollections.source));
170202
170662
  }
170203
170663
  // const firstLayer = this._featureSetCollection.layers[0] ?? this._featureSetCollection.tables[0];
170204
170664
  // if (!firstLayer) {
@@ -170210,13 +170670,19 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170210
170670
  if (!this.loaded || !this._featureSetCollections) {
170211
170671
  return "";
170212
170672
  }
170213
- if (typeof this._featureSetCollections.source !== "string") {
170673
+ if (typeof this._featureSetCollections.source === "string") {
170674
+ return this._profile?.intlStrings.featureservice ?? "featureservice";
170675
+ }
170676
+ if (isWebSceneInstance(this._featureSetCollections.source)) {
170677
+ return this._profile?.intlStrings.webscene ?? "webscene";
170678
+ }
170679
+ if (isWebMapInstance(this._featureSetCollections.source)) {
170214
170680
  return this._profile?.intlStrings.webmap ?? "webmap";
170215
170681
  }
170216
- return this._profile?.intlStrings.featureservice ?? "featureservice";
170682
+ return this._profile?.intlStrings.map ?? "map";
170217
170683
  }
170218
170684
  async loadSource() {
170219
- if (ee(this._loadPromise) && te(this._loadPromise)) {
170685
+ if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
170220
170686
  return await this._loadPromise;
170221
170687
  }
170222
170688
  this._loadPromise = this._loadSource();
@@ -170237,24 +170703,24 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170237
170703
  : {
170238
170704
  code: "webmapformat",
170239
170705
  formatValues: {
170240
- webMapTitle: this._featureSetCollections.source.portalItem?.title || "Untitled map"
170241
- }
170706
+ webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map",
170707
+ },
170242
170708
  };
170243
170709
  const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
170244
170710
  new ValueVariable({
170245
170711
  profile: this._profile,
170246
170712
  label: this.snippet,
170247
170713
  description: "",
170248
- snippet: this.snippet
170249
- })
170714
+ snippet: this.snippet,
170715
+ }),
170250
170716
  ]);
170251
170717
  // Creates the groups for the layer and tables
170252
170718
  const layersGroup = new GroupOfVariables(this._profile, { code: "layers" }, this._featureSetCollections.layers);
170253
170719
  const tablesGroup = new GroupOfVariables(this._profile, { code: "tables" }, this._featureSetCollections.tables);
170254
170720
  this.variables.push(headerGroup, layersGroup, tablesGroup);
170255
170721
  }
170256
- catch (e) {
170257
- console.error("Loading issue", e, this);
170722
+ catch (error) {
170723
+ console.error("Error with definition", error, this._definition);
170258
170724
  this._featureSetCollections = null;
170259
170725
  }
170260
170726
  finally {
@@ -170269,7 +170735,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170269
170735
  if (isMapInstance(this._definition)) {
170270
170736
  return await this._featureSetCollectionFromMap(this._definition);
170271
170737
  }
170272
- if (isSupportedLayerInstance(this._definition)) {
170738
+ if (isUrlDefinition(this._definition)) {
170273
170739
  return await this._featureSetCollectionFromUrl(this._definition.url);
170274
170740
  }
170275
170741
  if (isPortalItemDefinition(this._definition)) {
@@ -170277,21 +170743,19 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170277
170743
  // or Feature Service
170278
170744
  return await this._featureSetCollectionFromPortalItem(this._definition.portalItem);
170279
170745
  }
170280
- if (isUrlDefinition(this._definition)) {
170281
- // Assume that the url is pointing to a feature server
170282
- return await this._featureSetCollectionFromUrl(this._definition.url);
170283
- }
170284
170746
  return null;
170285
170747
  }
170286
170748
  async _featureSetCollectionFromMap(map) {
170287
- // Make sure the map is loaded
170288
- await map.loadAll();
170749
+ if (isLoadableMapInstance(map)) {
170750
+ // Make sure the map is loaded
170751
+ await map.loadAll();
170752
+ }
170289
170753
  // Until jsapi fix a bug we have to load the table separately
170290
170754
  await Promise.all(map.tables.map(async (t) => (await t.load())));
170291
170755
  return {
170292
170756
  layers: this._convertWebMapLayersToVariables(map.layers),
170293
170757
  tables: this._convertWebMapLayersToVariables(map.tables, true),
170294
- source: map
170758
+ source: map,
170295
170759
  };
170296
170760
  }
170297
170761
  async _featureSetCollectionFromPortalItem(definition) {
@@ -170322,12 +170786,12 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170322
170786
  }
170323
170787
  const metadata = await serviceMetaData(processedUrl);
170324
170788
  const layersPromise = Promise.all(metadata.layers.map(async (layerInfo) => {
170325
- const featureLayer = await newFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170789
+ const featureLayer = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170326
170790
  await featureLayer.load();
170327
170791
  return this._createFeatureSetVariable(featureLayer);
170328
170792
  }));
170329
170793
  const tablesPromise = Promise.all(metadata.tables.map(async (layerInfo) => {
170330
- const table = await newFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170794
+ const table = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170331
170795
  await table.load();
170332
170796
  return this._createFeatureSetVariable(table);
170333
170797
  }));
@@ -170340,7 +170804,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170340
170804
  .toArray()
170341
170805
  .reverse()
170342
170806
  .forEach((layer) => {
170343
- if (isQueryableLayerInstance(layer)) {
170807
+ if (isFeatureLayerLikeInstance(layer)) {
170344
170808
  layerVariables.push(this._createFeatureSetVariable(layer, true));
170345
170809
  return;
170346
170810
  }
@@ -170353,29 +170817,31 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170353
170817
  });
170354
170818
  return layerVariables;
170355
170819
  }
170356
- _createFeatureSetVariable(featureLayer, isFromWebMap = false) {
170820
+ _createFeatureSetVariable(featureLayerLike, isFromWebMap = false) {
170357
170821
  return new FeatureSetVariable(this, {
170358
170822
  profile: this._profile,
170359
- declaration: { name: featureLayer.title, definition: featureLayer },
170360
- label: featureLayer.title,
170823
+ declaration: { name: featureLayerLike.title, definition: featureLayerLike },
170824
+ label: isFromWebMap
170825
+ ? featureLayerLike.title
170826
+ : featureLayerLike.sourceJSON.name ?? featureLayerLike.title,
170361
170827
  description: "",
170362
- nonInteractive: true
170363
- }, this._makeFeatureSetSnippets(featureLayer, isFromWebMap));
170828
+ nonInteractive: true,
170829
+ }, this._makeFeatureSetSnippets(featureLayerLike, isFromWebMap));
170364
170830
  }
170365
- _makeFeatureSetSnippets(featureLayer, isFromWebMap = false) {
170831
+ _makeFeatureSetSnippets(featureLayerLike, isFromWebMap = false) {
170366
170832
  if (!this._profile?.supportFeatureSetFunctions) {
170367
170833
  return [];
170368
170834
  }
170369
170835
  if (isFromWebMap) {
170370
- const snippetById = `FeatureSetById(${this.snippet}, "${featureLayer.id}")`;
170371
- const snippetByName = `FeatureSetByName(${this.snippet}, "${featureLayer.title}")`;
170836
+ const snippetById = `FeatureSetById(${this.snippet}, "${featureLayerLike.id}")`;
170837
+ const snippetByName = `FeatureSetByName(${this.snippet}, "${featureLayerLike.title}")`;
170372
170838
  return [
170373
170839
  new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById }),
170374
- new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName })
170840
+ new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName }),
170375
170841
  ];
170376
170842
  }
170377
170843
  else {
170378
- const snippetById = `FeatureSetById(${this.snippet}, "${featureLayer.layerId}")`;
170844
+ const snippetById = `FeatureSetById(${this.snippet}, "${featureLayerLike.layerId}")`;
170379
170845
  return [new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById })];
170380
170846
  }
170381
170847
  }
@@ -170396,7 +170862,7 @@ class EditorProfile extends DictionaryVariable {
170396
170862
  // Delay the load of the variable declarations so we have a `this`
170397
170863
  super(undefined, {
170398
170864
  profile: null,
170399
- declaration: { properties: [] }
170865
+ declaration: { properties: [] },
170400
170866
  });
170401
170867
  this.definition = definition;
170402
170868
  this.intlStrings = intlStrings;
@@ -170428,28 +170894,20 @@ class EditorProfile extends DictionaryVariable {
170428
170894
  toEditorProfileDefinition() {
170429
170895
  return {
170430
170896
  ...this.definition,
170431
- variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
170897
+ variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
170432
170898
  };
170433
170899
  }
170434
170900
  }
170435
170901
  //#endregion
170436
170902
 
170437
170903
  function isFeatureDefinition(item) {
170438
- return (isSupportedLayerInstance(item) ||
170439
- isFeatureSetInstance(item) ||
170440
- isUrlDefinition(item) ||
170441
- isFieldsDefinition(item) ||
170442
- isFeatureLayerItemDefinition(item));
170904
+ return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
170443
170905
  }
170444
170906
  function isFeatureSetDefinition(item) {
170445
- return (isQueryableLayerInstance(item) ||
170446
- isFeatureSetInstance(item) ||
170447
- isUrlDefinition(item) ||
170448
- isFieldsDefinition(item) ||
170449
- isFeatureLayerItemDefinition(item));
170907
+ return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
170450
170908
  }
170451
170909
  function isFeatureSetCollectionDefinition(item) {
170452
- return isPortalItemDefinition(item) || isMapInstance(item) || isFeatureSetDefinition(item);
170910
+ return isPortalItemDefinition(item) || isMapInstance(item) || isSupportedServiceUrlDefinition(item);
170453
170911
  }
170454
170912
  /**
170455
170913
  * Get a PredefinedProfile for a locale. If not already loaded then fetch it.
@@ -170461,7 +170919,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
170461
170919
  if (profiles) {
170462
170920
  return profiles;
170463
170921
  }
170464
- if (!E.has(locale)) {
170922
+ if (!supportedLocales.has(locale)) {
170465
170923
  return await getSdkPredefinedProfiles("en");
170466
170924
  }
170467
170925
  try {
@@ -170499,7 +170957,7 @@ function isExtendedPredefinedProfileDefinition(item) {
170499
170957
  return !!item && typeof item === "object" && "additionalVariables" in item && Array.isArray(item.additionalVariables);
170500
170958
  }
170501
170959
  function convertApiVariables(variables) {
170502
- return variables.map(convertApiVariable);
170960
+ return variables?.map(convertApiVariable);
170503
170961
  }
170504
170962
  function convertApiVariable(variable) {
170505
170963
  switch (variable.type) {
@@ -170507,13 +170965,13 @@ function convertApiVariable(variable) {
170507
170965
  return {
170508
170966
  ...variable,
170509
170967
  type: variable.type,
170510
- properties: convertApiVariables(variable.properties)
170968
+ properties: convertApiVariables(variable.properties),
170511
170969
  };
170512
170970
  case "array": {
170513
170971
  return {
170514
170972
  ...variable,
170515
170973
  type: variable.type,
170516
- elementType: { type: "number", name: "number" }
170974
+ elementType: { type: "number", name: "number" },
170517
170975
  };
170518
170976
  }
170519
170977
  default:
@@ -170531,43 +170989,47 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
170531
170989
  const editorProfile = {
170532
170990
  bundles: [...sdkPredefinedProfile.bundles],
170533
170991
  variables: [],
170534
- hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase())
170992
+ hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase()),
170535
170993
  };
170536
170994
  // Merge the SDK variables' definitions/properties with the predefined profile definitions.
170537
- sdkPredefinedProfile.variables.forEach((sdkVariable) => {
170995
+ sdkPredefinedProfile.variables.forEach((predefinedVariable) => {
170538
170996
  // Don't include disabled variables
170539
- if (predefinedProfile.disabledVariables?.includes(sdkVariable.name)) {
170997
+ if (predefinedProfile.disabledVariables?.includes(predefinedVariable.name)) {
170540
170998
  return;
170541
170999
  }
170542
- // Try to get a definition from the predefined profile.
170543
- const definition = predefinedProfile.definitions[sdkVariable.name];
171000
+ // Try to get a definition from the predefined profile, for the variable that needs one.
171001
+ const definition = predefinedProfile.definitions[predefinedVariable.name];
170544
171002
  // Note: Something is weird with TS. The sdkVariables are being casted to the wrong type
170545
171003
  // despite the type checking from the switch statement.
170546
- switch (sdkVariable.type) {
170547
- case "dictionary":
171004
+ switch (predefinedVariable.type) {
171005
+ case "dictionary": {
170548
171006
  // For dictionary, we support properties overrride
170549
171007
  return editorProfile.variables.push(convertApiVariable({
170550
- ...sdkVariable,
170551
- type: sdkVariable.type,
170552
- properties: Array.isArray(definition) ? [...definition] : sdkVariable.properties
171008
+ ...predefinedVariable,
171009
+ type: predefinedVariable.type,
171010
+ properties: Array.isArray(definition) ? [...definition] : predefinedVariable.properties,
170553
171011
  }));
171012
+ }
170554
171013
  case "feature":
170555
- if (isFeatureDefinition(definition)) {
170556
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type, definition });
171014
+ // If the definition is not valid, then we don't include it.
171015
+ if (!isFeatureDefinition(definition)) {
171016
+ return;
170557
171017
  }
170558
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type });
171018
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
170559
171019
  case "featureSet":
170560
- if (isFeatureSetDefinition(definition)) {
170561
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type, definition });
171020
+ // If the definition is not valid, then we don't include it.
171021
+ if (!isFeatureSetDefinition(definition)) {
171022
+ return;
170562
171023
  }
170563
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type });
171024
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
170564
171025
  case "featureSetCollection":
170565
- if (isFeatureSetCollectionDefinition(definition)) {
170566
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type, definition });
171026
+ // If the definition is not valid, then we don't include it.
171027
+ if (!isFeatureSetCollectionDefinition(definition)) {
171028
+ return;
170567
171029
  }
170568
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type });
171030
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
170569
171031
  default:
170570
- return editorProfile.variables.push(convertApiVariable(sdkVariable));
171032
+ return editorProfile.variables.push(convertApiVariable(predefinedVariable));
170571
171033
  }
170572
171034
  });
170573
171035
  if (isExtendedPredefinedProfileDefinition(predefinedProfile)) {
@@ -170578,7 +171040,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
170578
171040
 
170579
171041
  const arcadeLanguageId = "arcade";
170580
171042
  const defaultContext = {
170581
- locale: "en"
171043
+ locale: "en",
170582
171044
  };
170583
171045
  class ArcadeLanguageServiceDefaults {
170584
171046
  constructor() {
@@ -170632,7 +171094,7 @@ class ArcadeLanguageServiceDefaults {
170632
171094
  if (isPredefinedProfile(definition)) {
170633
171095
  definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
170634
171096
  }
170635
- const intlStrings = await v(apiContext.locale, index.getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
171097
+ const intlStrings = await fetchT9NStringsBundle(apiContext.locale, index.getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
170636
171098
  if (!intlStrings) {
170637
171099
  throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
170638
171100
  }
@@ -170644,7 +171106,7 @@ class ArcadeLanguageServiceDefaults {
170644
171106
  this.updateApiContextForModel(modelId, {
170645
171107
  locale: apiContext.locale,
170646
171108
  profile: apiProfile,
170647
- snippets: apiContext.snippets
171109
+ snippets: apiContext.snippets,
170648
171110
  });
170649
171111
  }
170650
171112
  /**
@@ -170711,41 +171173,44 @@ class ArcadeLanguageServiceDefaults {
170711
171173
  }
170712
171174
  const arcadeDefaults = new ArcadeLanguageServiceDefaults();
170713
171175
  const arcade = {
170714
- setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults)
171176
+ setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
170715
171177
  };
170716
171178
 
170717
- exports.B = B;
170718
- exports.D = D;
171179
+ exports.Deferred = Deferred;
170719
171180
  exports.Emitter = Emitter;
170720
- exports.G = G;
170721
171181
  exports.IStandaloneThemeService = IStandaloneThemeService;
170722
- exports.K = K;
170723
171182
  exports.KeyCode = KeyCode;
170724
171183
  exports.KeyMod = KeyMod;
170725
171184
  exports.MarkerSeverity = MarkerSeverity;
170726
171185
  exports.Range = Range;
170727
- exports.U = U;
170728
171186
  exports.Uri = Uri;
170729
- exports.W = W;
170730
- exports.Z = Z;
171187
+ exports.addLTRMark = addLTRMark;
170731
171188
  exports.arcade = arcade;
170732
171189
  exports.arcadeDefaults = arcadeDefaults;
171190
+ exports.camelToKebab = camelToKebab;
170733
171191
  exports.commonjsGlobal = commonjsGlobal;
170734
- exports.createCommonjsModule = createCommonjsModule;
171192
+ exports.createFilterExpression = createFilterExpression;
171193
+ exports.debounce = debounce;
171194
+ exports.devToolsAwareTimeout = devToolsAwareTimeout;
170735
171195
  exports.editor = editor;
170736
171196
  exports.filterCollection = filterCollection;
171197
+ exports.generateGuid = generateGuid;
170737
171198
  exports.generateTokensCSSForColorMap = generateTokensCSSForColorMap;
170738
- exports.h = h;
170739
- exports.ie = ie;
171199
+ exports.getElementLocales = getElementLocales;
171200
+ exports.getElementTheme = getElementTheme;
171201
+ exports.hasSameOrigin = hasSameOrigin;
170740
171202
  exports.importArcade = importArcade;
170741
171203
  exports.importRequest = importRequest;
170742
- exports.k = k;
171204
+ exports.isURL = isURL;
170743
171205
  exports.languages = languages;
170744
171206
  exports.main = main;
170745
171207
  exports.monaco_editor_core_star = monaco_editor_core_star;
170746
- exports.q = q;
170747
- exports.re = re;
170748
- exports.se = se;
171208
+ exports.observeAncestorsMutation = observeAncestorsMutation;
171209
+ exports.quoteString = quoteString;
171210
+ exports.safeAsyncCall = safeAsyncCall;
171211
+ exports.safeCall = safeCall;
171212
+ exports.setFocusOnElement = setFocusOnElement;
171213
+ exports.setValuesInString = setValuesInString;
171214
+ exports.startLocaleObserver = startLocaleObserver;
170749
171215
  exports.supportedFields = supportedFields;
170750
171216
  exports.typescriptDefaults = typescriptDefaults;
170751
- exports.x = x;