@arcgis/coding-components 4.29.0-beta.47 → 4.29.0-beta.49
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.
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +1 -1
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +13 -13
- package/dist/arcgis-coding-components/index.esm.js +1 -1
- package/dist/arcgis-coding-components/{p-10a322ec.js → p-0d616249.js} +9 -9
- package/dist/arcgis-coding-components/p-2c0d6f15.js +2 -0
- package/dist/arcgis-coding-components/{p-71faf9a4.js → p-5802524a.js} +1 -1
- package/dist/arcgis-coding-components/{p-9eabda86.js → p-5ddccf04.js} +1 -1
- package/dist/arcgis-coding-components/p-7475f3a6.js +1 -0
- package/dist/arcgis-coding-components/{p-e6ede32d.js → p-7d8caba9.js} +1 -1
- package/dist/arcgis-coding-components/{p-f7d7d78d.js → p-9f6db08a.js} +1 -1
- package/dist/arcgis-coding-components/{p-e475e6cd.js → p-aefe77ce.js} +1 -1
- package/dist/arcgis-coding-components/p-ce2be55e.entry.js +1 -0
- package/dist/arcgis-coding-components/{p-ce586a8c.js → p-d425a387.js} +1 -1
- package/dist/arcgis-coding-components/{p-c084ada8.js → p-ff21f230.js} +1 -1
- package/dist/cjs/{arcade-defaults-8445d852.js → arcade-defaults-2d513b59.js} +1534 -1534
- package/dist/cjs/arcade-mode-6219f1b8.js +599 -0
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1404 -1408
- package/dist/cjs/arcgis-coding-components.cjs.js +2 -2
- package/dist/cjs/{cssMode-e63287bb.js → cssMode-1ec48254.js} +2 -2
- package/dist/cjs/{html-c0d4db3b.js → html-0e1741fe.js} +2 -2
- package/dist/cjs/{htmlMode-fdc44d57.js → htmlMode-279d3c29.js} +2 -2
- package/dist/cjs/{index-6a382a34.js → index-ac186201.js} +67 -24
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{javascript-a419d064.js → javascript-04f1bce0.js} +3 -3
- package/dist/cjs/{jsonMode-73aee5d2.js → jsonMode-59322f7a.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tsMode-37d1b053.js → tsMode-17561f70.js} +2 -2
- package/dist/cjs/{typescript-53f9f36a.js → typescript-b7da8629.js} +2 -2
- package/dist/components/arcade-api.js +160 -160
- package/dist/components/arcade-contribution.js +60 -60
- package/dist/components/arcade-defaults.js +1240 -1240
- package/dist/components/arcade-mode.js +514 -513
- package/dist/components/arcade-results.js +426 -430
- package/dist/components/arcade-suggestions.js +130 -132
- package/dist/components/arcade-variables.js +157 -155
- package/dist/components/arcgis-arcade-api.d.ts +2 -2
- package/dist/components/arcgis-arcade-editor.d.ts +2 -2
- package/dist/components/arcgis-arcade-editor.js +391 -391
- package/dist/components/arcgis-arcade-results.d.ts +2 -2
- package/dist/components/arcgis-arcade-suggestions.d.ts +2 -2
- package/dist/components/arcgis-arcade-variables.d.ts +2 -2
- package/dist/components/arcgis-code-editor.d.ts +2 -2
- package/dist/components/code-editor.js +251 -251
- package/dist/components/fields.js +69 -69
- package/dist/components/functional-components.js +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/components/markdown.js +28 -28
- package/dist/components/utilities.js +20 -20
- package/dist/esm/{arcade-defaults-d7893362.js → arcade-defaults-0bafa696.js} +1534 -1534
- package/dist/esm/arcade-mode-c17a1fa1.js +595 -0
- package/dist/esm/arcgis-arcade-api_6.entry.js +1404 -1408
- package/dist/esm/arcgis-coding-components.js +3 -3
- package/dist/esm/{cssMode-b1771f92.js → cssMode-3d18bd2b.js} +2 -2
- package/dist/esm/{html-af635d52.js → html-2bce5d77.js} +2 -2
- package/dist/esm/{htmlMode-3021c301.js → htmlMode-69d56956.js} +2 -2
- package/dist/esm/{index-fd6b2fd8.js → index-022fb97b.js} +67 -24
- package/dist/esm/index.js +2 -2
- package/dist/esm/{javascript-70589186.js → javascript-ded5c9d7.js} +3 -3
- package/dist/esm/{jsonMode-cb509b79.js → jsonMode-0bf84cb2.js} +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{tsMode-ed90c9aa.js → tsMode-15d4e936.js} +2 -2
- package/dist/esm/{typescript-db8a0b18.js → typescript-cc4d00f0.js} +2 -2
- package/dist/types/components/arcade-api/arcade-api.d.ts +40 -40
- package/dist/types/components/arcade-api/t9n-types.d.ts +6 -6
- package/dist/types/components/arcade-editor/arcade-editor.d.ts +127 -127
- package/dist/types/components/arcade-editor/t9n-types.d.ts +6 -6
- package/dist/types/components/arcade-results/arcade-results.d.ts +47 -47
- package/dist/types/components/arcade-results/t9n-types.d.ts +11 -11
- package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +34 -34
- package/dist/types/components/arcade-suggestions/t9n-types.d.ts +4 -4
- package/dist/types/components/arcade-variables/arcade-variables.d.ts +41 -41
- package/dist/types/components/arcade-variables/t9n-types.d.ts +6 -6
- package/dist/types/components/code-editor/code-editor.d.ts +73 -73
- package/dist/types/stencil-public-runtime.d.ts +8 -0
- package/dist/types/utils/arcade-executor.d.ts +79 -79
- package/dist/types/utils/arcade-monaco/arcade-defaults.d.ts +66 -66
- package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +23 -23
- package/dist/types/utils/arcade-monaco/arcade-mode.d.ts +9 -9
- package/dist/types/utils/arcade-monaco/arcade-theme.d.ts +7 -7
- package/dist/types/utils/arcade-monaco/arcade-worker-manager.d.ts +9 -9
- package/dist/types/utils/arcade-monaco/arcade.worker.d.ts +12 -12
- package/dist/types/utils/arcade-monaco/types.d.ts +29 -29
- package/dist/types/utils/editor-suggestions.d.ts +24 -24
- package/dist/types/utils/functional-components.d.ts +1 -1
- package/dist/types/utils/markdown.d.ts +1 -1
- package/dist/types/utils/profile/editor-profile.d.ts +185 -185
- package/dist/types/utils/profile/types.d.ts +101 -101
- package/dist/types/utils/utilities.d.ts +1 -1
- package/package.json +7 -7
- package/dist/arcgis-coding-components/p-5d670bd2.js +0 -2
- package/dist/arcgis-coding-components/p-9e242e76.js +0 -1
- package/dist/arcgis-coding-components/p-ccdf0ac1.entry.js +0 -1
- package/dist/cjs/arcade-mode-b77afcc9.js +0 -598
- package/dist/esm/arcade-mode-70e22d22.js +0 -594
|
@@ -7,31 +7,31 @@ import { BundleType, ApiItem, ApiVariableType, ProfileId } from "@arcgis/arcade-
|
|
|
7
7
|
* - formatting code
|
|
8
8
|
*/
|
|
9
9
|
export interface IEditorProfileDefinition {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Optional label for the profile. Used in the editor when displaying the variables panel.
|
|
12
|
+
*/
|
|
13
|
+
label?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The collection of variables that will be passed to the expression at execution time.
|
|
16
|
+
* The variable declartions are used to help the editor provide validation and completion.
|
|
17
|
+
*/
|
|
18
|
+
variables: IProfileVariable[];
|
|
19
|
+
/**
|
|
20
|
+
* The version of the Arcade API that the editor should use during validation and completion.
|
|
21
|
+
*/
|
|
22
|
+
apiVersion?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The Arcade API bundles that the editor should use during validation and completion.
|
|
25
|
+
*/
|
|
26
|
+
bundles?: Array<BundleType>;
|
|
27
|
+
/**
|
|
28
|
+
* A collection of additional Arcade API items that will be provided at runtime.
|
|
29
|
+
*/
|
|
30
|
+
additionalApiItems?: Array<ApiItem>;
|
|
31
|
+
/**
|
|
32
|
+
* A collection of api item names to hide.
|
|
33
|
+
*/
|
|
34
|
+
hiddenApiItems?: Array<string>;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* The type of variables supported.
|
|
@@ -49,40 +49,40 @@ export type IProfileVariable = IProfileValue | IProfileDictionary | IProfileArra
|
|
|
49
49
|
* Properties common to all profile variables.
|
|
50
50
|
*/
|
|
51
51
|
export interface IProfileVariableBase {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Name of the variable
|
|
54
|
+
*/
|
|
55
|
+
name: string;
|
|
56
|
+
/**
|
|
57
|
+
* Description for the variable
|
|
58
|
+
*/
|
|
59
|
+
description?: string;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* Single value profile variable declaration.
|
|
63
63
|
*/
|
|
64
64
|
export interface IProfileValue extends IProfileVariableBase {
|
|
65
|
-
|
|
65
|
+
readonly type: "number" | "text" | "date" | "boolean" | "geometry" | "dateOnly" | "time";
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
68
|
* Dictionary profile variable declaration. Properties of a dictionary are profile variables.
|
|
69
69
|
*/
|
|
70
70
|
export interface IProfileDictionary extends IProfileVariableBase {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
readonly type: "dictionary";
|
|
72
|
+
/**
|
|
73
|
+
* The dictionary properties. Properties are variables as well.
|
|
74
|
+
*/
|
|
75
|
+
properties: Array<IProfileVariable>;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* Dictionary profile variable declaration. Properties of a dictionary are profile variables.
|
|
79
79
|
*/
|
|
80
80
|
export interface IProfileArray extends IProfileVariableBase {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
readonly type: "array";
|
|
82
|
+
/**
|
|
83
|
+
* The type for the array elements.
|
|
84
|
+
*/
|
|
85
|
+
elementType: IProfileVariable;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* Feature profile variable declaration.
|
|
@@ -90,11 +90,11 @@ export interface IProfileArray extends IProfileVariableBase {
|
|
|
90
90
|
* Optionally features can have a geometry that can be accessed by a specialized Arcade function.
|
|
91
91
|
*/
|
|
92
92
|
export interface IProfileFeature extends IProfileVariableBase {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
readonly type: "feature";
|
|
94
|
+
/**
|
|
95
|
+
* Describes how the editor will find the definition for the feature.
|
|
96
|
+
*/
|
|
97
|
+
definition?: FeatureDefinition;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
100
|
* FeatureSet profile variable declaration.
|
|
@@ -102,11 +102,11 @@ export interface IProfileFeature extends IProfileVariableBase {
|
|
|
102
102
|
* Individual feature or subset of features can be accessed by using specialized Arcade functions.
|
|
103
103
|
*/
|
|
104
104
|
export interface IProfileFeatureSet extends IProfileVariableBase {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
readonly type: "featureSet";
|
|
106
|
+
/**
|
|
107
|
+
* Describes how the editor will find the definition for the feature set.
|
|
108
|
+
*/
|
|
109
|
+
definition?: FeatureSetDefinition;
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* FeatureSetCollection profile variable declaration.
|
|
@@ -114,62 +114,62 @@ export interface IProfileFeatureSet extends IProfileVariableBase {
|
|
|
114
114
|
* FeatureSetCollections expose two collections of Layers and Tables.
|
|
115
115
|
*/
|
|
116
116
|
export interface IProfileFeatureSetCollection extends IProfileVariableBase {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
readonly type: "featureSetCollection";
|
|
118
|
+
/**
|
|
119
|
+
* Describes how the featureSetCollection will find its definition.
|
|
120
|
+
*/
|
|
121
|
+
definition?: FeatureSetCollectionDefinition;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Describes a portal item.
|
|
125
125
|
*/
|
|
126
126
|
export interface IPortalItemProperties {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
127
|
+
/**
|
|
128
|
+
* The unique portal item id.
|
|
129
|
+
*/
|
|
130
|
+
id: string;
|
|
131
|
+
/**
|
|
132
|
+
* The optional portal url. Default: www.arcgis.com.
|
|
133
|
+
*/
|
|
134
|
+
portal?: {
|
|
135
|
+
url: string;
|
|
136
|
+
};
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
139
|
* WebMap and Service FeatureSetCollection can be defined by a portal item.
|
|
140
140
|
*/
|
|
141
141
|
export interface IPortalItemDefinition {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
/**
|
|
143
|
+
* Describes a portal item.
|
|
144
|
+
*/
|
|
145
|
+
portalItem: IPortalItemProperties;
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
148
|
* FeatureLayer can be defined from a Feature Layer portal item.
|
|
149
149
|
*/
|
|
150
150
|
export interface IFeatureLayerItemDefinition extends IPortalItemDefinition {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
/**
|
|
152
|
+
* The layer id in the feature layer portal item. Default to 0.
|
|
153
|
+
*/
|
|
154
|
+
layerId?: number;
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
157
|
* FeatureLayers and GroupLayers can be created by providing the url to the resource in a feature service.
|
|
158
158
|
*/
|
|
159
159
|
export interface IUrlDefinition {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
/**
|
|
161
|
+
* The url of the resource.
|
|
162
|
+
*/
|
|
163
|
+
url: string;
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
166
|
* The most basic way to define a feature or feature set is by passing a collection of fields
|
|
167
167
|
*/
|
|
168
168
|
export interface IFieldsDefinition {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
/**
|
|
170
|
+
* An array of fields.
|
|
171
|
+
*/
|
|
172
|
+
fields: __esri.Field[];
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
175
|
* Supported layer for feature
|
|
@@ -191,20 +191,20 @@ export type FeatureSetDefinition = __esri.FeatureLayer | __esri.FeatureSet | IUr
|
|
|
191
191
|
export type FeatureSetCollectionDefinition = IPortalItemDefinition | __esri.WebMap | FeatureSetDefinition;
|
|
192
192
|
export type VariableDefinitions = Record<string, FeatureDefinition | FeatureSetDefinition | FeatureSetCollectionDefinition | Array<IProfileVariable> | undefined>;
|
|
193
193
|
export interface IPredefinedProfile {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
194
|
+
/**
|
|
195
|
+
* The well known profile ID.
|
|
196
|
+
*/
|
|
197
|
+
id: ProfileId;
|
|
198
|
+
/**
|
|
199
|
+
* The variables that should be disabled for the profile.
|
|
200
|
+
*/
|
|
201
|
+
disabledVariables?: string[];
|
|
202
|
+
/**
|
|
203
|
+
* Provides the definitions for the definition based variables (feature, featureSet, featureSetCollection).
|
|
204
|
+
*/
|
|
205
|
+
definitions: VariableDefinitions;
|
|
206
|
+
/**
|
|
207
|
+
* A collection of api item names to hide.
|
|
208
|
+
*/
|
|
209
|
+
hiddenApiItems?: Array<string>;
|
|
210
210
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
3
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
4
4
|
"homepage": "https://developers.arcgis.com/javascript/latest/",
|
|
5
|
-
"version": "4.29.0-beta.
|
|
5
|
+
"version": "4.29.0-beta.49",
|
|
6
6
|
"module": "dist/components/index.js",
|
|
7
7
|
"main": "dist/index.cjs.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
@@ -48,16 +48,16 @@
|
|
|
48
48
|
"generate": "stencil generate"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@arcgis/arcade-languageservice": "4.29.0-beta.
|
|
52
|
-
"@stencil/core": "4.
|
|
51
|
+
"@arcgis/arcade-languageservice": "4.29.0-beta.49",
|
|
52
|
+
"@stencil/core": "4.8.2",
|
|
53
53
|
"monaco-editor": "^0.44.0",
|
|
54
54
|
"vscode-languageserver-types": "^3.17.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@arcgis/components-plugins": "4.29.0-beta.
|
|
58
|
-
"@arcgis/components-utils": "4.29.0-beta.
|
|
57
|
+
"@arcgis/components-plugins": "4.29.0-beta.49",
|
|
58
|
+
"@arcgis/components-utils": "4.29.0-beta.49",
|
|
59
59
|
"@arcgis/core": ">=4.29.0-next <4.30",
|
|
60
|
-
"@arcgis/core-adapter": "4.29.0-beta.
|
|
60
|
+
"@arcgis/core-adapter": "4.29.0-beta.49",
|
|
61
61
|
"@arcgis/typescript-config": "1.0.0",
|
|
62
62
|
"@esri/calcite-components": "^2.1.0",
|
|
63
63
|
"@stencil/angular-output-target": "0.8.1",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"@arcgis/core": ">=4.29.0-next <4.30",
|
|
111
111
|
"@esri/calcite-components": "^2.1.0"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "346c710a59323519e7fbabc4d208f70b68a21946"
|
|
114
114
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e,n,t=!1;const l=e=>{const n=new URL(e,oe.t);return n.origin!==te.location.origin?n.href:n.pathname},o="http://www.w3.org/1999/xlink",s={},i=e=>"object"==(e=typeof e)||"function"===e;function c(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const r=(e,n,...t)=>{let l=null,o=null,s=!1,c=!1;const r=[],a=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!i(l))&&(l+=""),s&&c?r[r.length-1].l+=l:r.push(s?u(null,l):l),c=s)};if(a(t),n){n.key&&(o=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}if("function"==typeof e)return e(null===n?{}:n,r,f);const d=u(e,null);return d.o=n,r.length>0&&(d.i=r),d.u=o,d},u=(e,n)=>({p:0,h:e,l:n,m:null,i:null,o:null,u:null}),a={},f={forEach:(e,n)=>e.map(d).forEach(n),map:(e,n)=>e.map(d).map(n).map(y)},d=e=>({vattrs:e.o,vchildren:e.i,vkey:e.u,vname:e.v,vtag:e.h,vtext:e.l}),y=e=>{if("function"==typeof e.vtag){const n=Object.assign({},e.vattrs);return e.vkey&&(n.key=e.vkey),e.vname&&(n.name=e.vname),r(e.vtag,n,...e.vchildren||[])}const n=u(e.vtag,e.vtext);return n.o=e.vattrs,n.i=e.vchildren,n.u=e.vkey,n.v=e.vname,n},p=e=>J(e).$hostElement$,h=(e,n,t)=>{const l=p(e);return{emit:e=>m(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},m=(e,n,t)=>{const l=oe.ce(n,t);return e.dispatchEvent(l),l},v=new WeakMap,$=e=>"sc-"+e.$,b=(e,n,t,l,s,c)=>{if(t!==l){let r=X(e,n),u=n.toLowerCase();if("class"===n){const n=e.classList,o=g(t),s=g(l);n.remove(...o.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===n){for(const n in t)l&&null!=l[n]||(n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in l)t&&l[n]===t[n]||(n.includes("-")?e.style.setProperty(n,l[n]):e.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&l(e);else if(r||"o"!==n[0]||"n"!==n[1]){const a=i(l);if((r||a&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[n]=l;else{const o=null==l?"":l;"list"===n?r=!1:null!=t&&e[n]==o||(e[n]=o)}}catch(e){}let f=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(n=u,f=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(n)||(f?e.removeAttributeNS(o,n):e.removeAttribute(n)):(!r||4&c||s)&&!a&&(l=!0===l?"":l,f?e.setAttributeNS(o,n,l):e.setAttribute(n,l))}else if(n="-"===n[2]?n.slice(3):X(te,u)?u.slice(2):u[2]+n.slice(3),t||l){const o=n.endsWith(k);n=n.replace(S,""),t&&oe.rel(e,n,t,o),l&&oe.ael(e,n,l,o)}}},w=/\s/,g=e=>e?e.split(w):[],k="Capture",S=RegExp(k+"$"),j=(e,n,t,l)=>{const o=11===n.m.nodeType&&n.m.host?n.m.host:n.m,i=e&&e.o||s,c=n.o||s;for(l in i)l in c||b(o,l,i[l],void 0,t,n.p);for(l in c)b(o,l,i[l],c[l],t,n.p)},O=(n,t,l)=>{const o=t.i[l];let s,i,c=0;if(null!==o.l)s=o.m=le.createTextNode(o.l);else if(s=o.m=le.createElement(o.h),j(null,o,!1),null!=e&&s["s-si"]!==e&&s.classList.add(s["s-si"]=e),o.i)for(c=0;c<o.i.length;++c)i=O(n,o,c),i&&s.appendChild(i);return s},C=(e,t,l,o,s,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=O(null,l,s),c&&(o[s].m=c,r.insertBefore(c,t)))},M=(e,n,t)=>{for(let l=n;l<=t;++l){const n=e[l];if(n){const e=n.m;E(n),e&&e.remove()}}},x=(e,n)=>e.h===n.h&&e.u===n.u,P=(e,n)=>{const t=n.m=e.m,l=e.i,o=n.i,s=n.l;null===s?(j(e,n,!1),null!==l&&null!==o?((e,n,t,l)=>{let o,s,i=0,c=0,r=0,u=0,a=n.length-1,f=n[0],d=n[a],y=l.length-1,p=l[0],h=l[y];for(;i<=a&&c<=y;)if(null==f)f=n[++i];else if(null==d)d=n[--a];else if(null==p)p=l[++c];else if(null==h)h=l[--y];else if(x(f,p))P(f,p),f=n[++i],p=l[++c];else if(x(d,h))P(d,h),d=n[--a],h=l[--y];else if(x(f,h))P(f,h),e.insertBefore(f.m,d.m.nextSibling),f=n[++i],h=l[--y];else if(x(d,p))P(d,p),e.insertBefore(d.m,f.m),d=n[--a],p=l[++c];else{for(r=-1,u=i;u<=a;++u)if(n[u]&&null!==n[u].u&&n[u].u===p.u){r=u;break}r>=0?(s=n[r],s.h!==p.h?o=O(n&&n[c],t,r):(P(s,p),n[r]=void 0,o=s.m),p=l[++c]):(o=O(n&&n[c],t,c),p=l[++c]),o&&f.m.parentNode.insertBefore(o,f.m)}i>a?C(e,null==l[y+1]?null:l[y+1].m,t,l,c,y):c>y&&M(n,i,a)})(t,l,n,o):null!==o?(null!==e.l&&(t.textContent=""),C(t,null,n,o,0,o.length-1)):null!==l&&M(l,0,l.length-1)):e.l!==s&&(t.data=s)},E=e=>{e.o&&e.o.ref&&e.o.ref(null),e.i&&e.i.map(E)},L=(e,n)=>{n&&!e.k&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.k=n)))},R=(e,n)=>{if(e.p|=16,!(4&e.p))return L(e,e.S),ye((()=>A(e,n)));e.p|=512},A=(e,n)=>{const t=e.j;let l;return n&&(l=q(t,"componentWillLoad")),N(l,(()=>U(e,t,n)))},N=(e,n)=>T(e)?e.then(n):n(),T=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,U=async(e,n,t)=>{var l;const o=e.$hostElement$,s=o["s-rc"];t&&(e=>{const n=e.O,t=e.$hostElement$,l=n.p,o=((e,n)=>{var t;const l=$(n),o=ne.get(l);if(e=11===e.nodeType?e:le,o)if("string"==typeof o){let n,s=v.get(e=e.head||e);if(s||v.set(e,s=new Set),!s.has(l)){{n=le.createElement("style"),n.innerHTML=o;const l=null!==(t=oe.C)&&void 0!==t?t:c(le);null!=l&&n.setAttribute("nonce",l),e.insertBefore(n,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=o,t.classList.add(o+"-h"))})(e);W(e,n,o,t),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const n=null!==(l=o["s-p"])&&void 0!==l?l:[],t=()=>F(e);0===n.length?t():(Promise.all(n).then(t),e.p|=4,n.length=0)}},W=(t,l,o,s)=>{try{l=l.render(),t.p&=-17,t.p|=2,((t,l,o=!1)=>{const s=t.$hostElement$,i=t.O,c=t.M||u(null,null),f=(e=>e&&e.h===a)(l)?l:r(null,null,l);if(n=s.tagName,i.P&&(f.o=f.o||{},i.P.map((([e,n])=>f.o[n]=s[e]))),o&&f.o)for(const e of Object.keys(f.o))s.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(f.o[e]=s[e]);f.h=null,f.p|=4,t.M=f,f.m=c.m=s.shadowRoot||s,e=s["s-sc"],P(c,f)})(t,l,s)}catch(e){Y(e,t.$hostElement$)}return null},F=e=>{const n=e.$hostElement$,t=e.j,l=e.S;64&e.p||(e.p|=64,D(n),q(t,"componentDidLoad"),e.L(n),l||H()),e.R(n),e.k&&(e.k(),e.k=void 0),512&e.p&&de((()=>R(e,!1))),e.p&=-517},H=()=>{D(le.documentElement),de((()=>m(te,"appload",{detail:{namespace:"arcgis-coding-components"}})))},q=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){Y(e)}},D=e=>e.setAttribute("hydrated",""),V=(e,n,t)=>{var l;if(n.A){e.watchers&&(n.N=e.watchers);const o=Object.entries(n.A),s=e.prototype;if(o.map((([e,[l]])=>{31&l||2&t&&32&l?Object.defineProperty(s,e,{get(){return((e,n)=>J(this).T.get(n))(0,e)},set(t){((e,n,t,l)=>{const o=J(e),s=o.$hostElement$,c=o.T.get(n),r=o.p,u=o.j;if(t=((e,n)=>null==e||i(e)?e:4&n?"false"!==e&&(""===e||!!e):1&n?e+"":e)(t,l.A[n][0]),(!(8&r)||void 0===c)&&t!==c&&(!Number.isNaN(c)||!Number.isNaN(t))&&(o.T.set(n,t),u)){if(l.N&&128&r){const e=l.N[n];e&&e.map((e=>{try{u[e](t,c,n)}catch(e){Y(e,s)}}))}2==(18&r)&&R(o,!1)}})(this,e,t,n)},configurable:!0,enumerable:!0}):1&t&&64&l&&Object.defineProperty(s,e,{value(...n){const t=J(this);return t.U.then((()=>t.j[e](...n)))}})})),1&t){const t=new Map;s.attributeChangedCallback=function(e,l,o){oe.jmp((()=>{const i=t.get(e);if(this.hasOwnProperty(i))o=this[i],delete this[i];else{if(s.hasOwnProperty(i)&&"number"==typeof this[i]&&this[i]==o)return;if(null==i){const t=J(this),s=null==t?void 0:t.p;if(!(8&s)&&128&s&&o!==l){const s=t.j,i=n.N[e];null==i||i.forEach((n=>{null!=s[n]&&s[n].call(s,o,l,e)}))}return}}this[i]=(null!==o||"boolean"!=typeof this[i])&&o}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!==(l=n.N)&&void 0!==l?l:{}),...o.filter((([e,n])=>15&n[0])).map((([e,l])=>{const o=l[1]||e;return t.set(o,e),512&l[0]&&n.P.push([e,o]),o}))]))}}return e},_=e=>{q(e,"disconnectedCallback")},z=(e,n={})=>{var t;const l=[],o=n.exclude||[],s=te.customElements,i=le.head,r=i.querySelector("meta[charset]"),u=le.createElement("style"),a=[];let f,d=!0;Object.assign(oe,n),oe.t=new URL(n.resourcesUrl||"./",le.baseURI).href,e.map((e=>{e[1].map((n=>{var t;const i={p:n[0],$:n[1],A:n[2],W:n[3]};i.A=n[2],i.P=[],i.N=null!==(t=n[4])&&void 0!==t?t:{};const c=i.$,r=class extends HTMLElement{constructor(e){super(e),Q(e=this,i),1&i.p&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):oe.jmp((()=>(e=>{if(0==(1&oe.p)){const n=J(e),t=n.O,l=()=>{};if(1&n.p)(null==n?void 0:n.j)||(null==n?void 0:n.F)&&n.F.then((()=>{}));else{n.p|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){L(n,n.S=t);break}}t.A&&Object.entries(t.A).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t)=>{let l;if(0==(32&n.p)){n.p|=32;{if(l=ee(t),l.then){const e=()=>{};l=await l,e()}l.isProxied||(t.N=l.watchers,V(l,t,2),l.isProxied=!0);const e=()=>{};n.p|=8;try{new l(n)}catch(e){Y(e)}n.p&=-9,n.p|=128,e()}if(l.style){let e=l.style;const n=$(t);if(!ne.has(n)){const l=()=>{};((e,n,t)=>{let l=ne.get(e);ie&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,ne.set(e,l)})(n,e,!!(1&t.p)),l()}}}const o=n.S,s=()=>R(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(0,n,t)}l()}})(this)))}disconnectedCallback(){oe.jmp((()=>(async()=>{if(0==(1&oe.p)){const e=J(this);(null==e?void 0:e.j)?_(e.j):(null==e?void 0:e.F)&&e.F.then((()=>_(e.j)))}})()))}componentOnReady(){return J(this).F}};i.H=e[0],o.includes(c)||s.get(c)||(l.push(c),s.define(c,V(r,i,1)))}))}));{u.innerHTML=l+"{visibility:hidden}[hydrated]{visibility:inherit}",u.setAttribute("data-styles","");const e=null!==(t=oe.C)&&void 0!==t?t:c(le);null!=e&&u.setAttribute("nonce",e),i.insertBefore(u,r?r.nextSibling:i.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):oe.jmp((()=>f=setTimeout(H,30)))},B=(e,n)=>n,G=e=>oe.C=e,I=new WeakMap,J=e=>I.get(e),K=(e,n)=>I.set(n.j=e,n),Q=(e,n)=>{const t={p:0,$hostElement$:e,O:n,T:new Map};return t.U=new Promise((e=>t.R=e)),t.F=new Promise((e=>t.L=e)),e["s-p"]=[],e["s-rc"]=[],I.set(e,t)},X=(e,n)=>n in e,Y=(e,n)=>(0,console.error)(e,n),Z=new Map,ee=e=>{const n=e.$.replace(/-/g,"_"),t=e.H,l=Z.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(Z.set(t,e),e[n])),Y)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ne=new Map,te="undefined"!=typeof window?window:{},le=te.document||{head:{}},oe={p:0,t:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},se=e=>Promise.resolve(e),ie=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),ce=[],re=[],ue=(e,n)=>l=>{e.push(l),t||(t=!0,n&&4&oe.p?de(fe):oe.raf(fe))},ae=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){Y(e)}e.length=0},fe=()=>{ae(ce),ae(re),(t=ce.length>0)&&oe.raf(fe)},de=e=>se().then(e),ye=ue(re,!0);export{B as F,a as H,p as a,z as b,h as c,l as g,r as h,se as p,K as r,G as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,e as t,M as n,R as r,l as i,E as s}from"./p-10a322ec.js";import"./p-5d670bd2.js";var o,a=((o=a||{}).False="false",o.Null="null",o.True="true",o),c=(e=>(e.Break="break",e.Continue="continue",e.Else="else",e.For="for",e.From="from",e.Function="function",e.If="if",e.Import="import",e.Export="export",e.In="in",e.Return="return",e.Var="var",e.While="while",e))(c||{}),l=(e=>(e.AssignmentExpression="AssignmentExpression",e.ArrayExpression="ArrayExpression",e.BlockComment="BlockComment",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.ContinueStatement="ContinueStatement",e.EmptyStatement="EmptyStatement",e.ExpressionStatement="ExpressionStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.LineComment="LineComment",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.ObjectExpression="ObjectExpression",e.Program="Program",e.Property="Property",e.ReturnStatement="ReturnStatement",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e))(l||{}),p=(e=>(e[e.Unknown=0]="Unknown",e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.Template=10]="Template",e))(p||{}),d=(e=>(e.InvalidModuleUri="InvalidModuleUri",e.ForInOfLoopInitializer="ForInOfLoopInitializer",e.IdentiferExpected="IdentiferExpected",e.InvalidEscapedReservedWord="InvalidEscapedReservedWord",e.InvalidExpression="InvalidExpression",e.InvalidFunctionIdentifier="InvalidFunctionIdentifier",e.InvalidHexEscapeSequence="InvalidHexEscapeSequence",e.InvalidLeftHandSideInAssignment="InvalidLeftHandSideInAssignment",e.InvalidLeftHandSideInForIn="InvalidLeftHandSideInForIn",e.InvalidTemplateHead="InvalidTemplateHead",e.InvalidVariableAssignment="InvalidVariableAssignment",e.KeyMustBeString="KeyMustBeString",e.NoFunctionInsideBlock="NoFunctionInsideBlock",e.NoFunctionInsideFunction="NoFunctionInsideFunction",e.ModuleExportRootOnly="ModuleExportRootOnly",e.ModuleImportRootOnly="ModuleImportRootOnly",e.PunctuatorExpected="PunctuatorExpected",e.TemplateOctalLiteral="TemplateOctalLiteral",e.UnexpectedBoolean="UnexpectedBoolean",e.UnexpectedEndOfScript="UnexpectedEndOfScript",e.UnexpectedIdentifier="UnexpectedIdentifier",e.UnexpectedKeyword="UnexpectedKeyword",e.UnexpectedNull="UnexpectedNull",e.UnexpectedNumber="UnexpectedNumber",e.UnexpectedPunctuator="UnexpectedPunctuator",e.UnexpectedString="UnexpectedString",e.UnexpectedTemplate="UnexpectedTemplate",e.UnexpectedToken="UnexpectedToken",e))(d||{}),u=[[],[],[]];["++","--"].forEach((e=>u[e.length-1].push(e))),["-","+","!","~"].forEach((e=>u[e.length-1].push(e))),["||","&&"].forEach((e=>u[e.length-1].push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>u[e.length-1].push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>u[e.length-1].push(e)));var g,m=((g=m||{}).AlreadyDefined="AlreadyDefined",g.ApiConflict="ApiConflict",g.AssignedNeverUsed="AssignedNeverUsed",g.DefinedNeverAssigned="DefinedNeverAssigned",g.DefinedNeverUsed="DefinedNeverUsed",g.EmptyBlockStatement="EmptyBlockStatement",g.ExecutionError="ExecutionError",g.InvalidApiFunctionUsage="InvalidApiFunctionUsage",g.InvalidConstantIdentifier="InvalidConstantIdentifier",g.InvalidPropertyIdentifier="InvalidPropertyIdentifier",g.NoArgumentExpected="NoArgumentExpected",g.NotADictionary="NotADictionary",g.NotDefined="NotDefined",g.NotEnoughArguments="NotEnoughArguments",g.ProfileVariablesAreImmutable="ProfileVariablesAreImmutable",g.ProfileVariablesConflict="ProfileVariablesConflict",g.ReservedKeyword="ReservedKeyword",g.TooManyArguments="TooManyArguments",g.UnexpectedEmptyFunction="UnexpectedEmptyFunction",g.UnexpectedPropertyIdentifier="UnexpectedPropertyIdentifier",g.UnknownPropertyIdentifier="UnknownPropertyIdentifier",g),x=Object.values(c);Object.values(a).map((t=>({label:t,kind:e.CompletionItemKind.Constant}))),x.map((t=>({label:t,kind:e.CompletionItemKind.Keyword})));const h={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/}},f={defaultToken:"invalid",tokenPostfix:".arc",ignoreCase:!0,keywords:x.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number"],[/0[xX](@hexdigits)/,"number"],[/0[oO]?(@octaldigits)/,"number"],[/0[bB](@binarydigits)/,"number"],[/(@digits)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],import:[[/import(?=\s)/,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/,"identifier"],{include:"@whitespace"},[/from/,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};class b{constructor(e,n,{defaults:r,diagnosticsService:i}){this._languageId=e,this._worker=n,this._disposables=[],this._listener=Object.create(null),this._diagnosticsService=i,this._defaults=r;const s=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;let n;this._listener[e.uri.toString()]=e.onDidChangeContent((()=>{window.clearTimeout(n),n=window.setTimeout((()=>this._doValidate(e,t)),500)})),this._doValidate(e,t)},o=e=>{const n=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const r=this._listener[n];r&&(r.dispose(),delete this._listener[n])};this._disposables.push(t.onDidCreateModel(s)),this._disposables.push(t.onWillDisposeModel((e=>{o(e)}))),this._disposables.push(t.onDidChangeModelLanguage((e=>{o(e.model),s(e.model)}))),this._disposables.push(r.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),s(e))}))}))),this._disposables.push(r.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId)}))}))),this._disposables.push({dispose:()=>{for(const e in this._listener)this._listener[e].dispose()}}),t.getModels().forEach(s)}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables=[]}async _doValidate(e,n){if(e.isAttachedToEditor())try{const r=await this._worker(e.uri),i=this._defaults.getApiContextForModel(e.uri),s=await r.doValidation(e.uri.toString(),i),o=s.map((e=>{return{severity:k((t=e).severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message};var t}));this._diagnosticsService.fireDiagnosticsChange(e.uri,s),t.setModelMarkers(e,n,o)}catch(e){console.error(e)}}}function k(t){switch(t){case e.DiagnosticSeverity.Error:return n.Error;case e.DiagnosticSeverity.Warning:return n.Warning;case e.DiagnosticSeverity.Information:return n.Info;case e.DiagnosticSeverity.Hint:return n.Hint;default:return n.Info}}function w(e){return new r(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function I(e){return{range:w(e.range),text:e.newText}}function y(t){const n=i.CompletionItemKind;switch(t){case e.CompletionItemKind.Text:return n.Text;case e.CompletionItemKind.Method:return n.Method;case e.CompletionItemKind.Function:return n.Function;case e.CompletionItemKind.Constructor:return n.Constructor;case e.CompletionItemKind.Field:return n.Field;case e.CompletionItemKind.Variable:return n.Variable;case e.CompletionItemKind.Class:return n.Class;case e.CompletionItemKind.Interface:return n.Interface;case e.CompletionItemKind.Module:return n.Module;case e.CompletionItemKind.Property:return n.Property;case e.CompletionItemKind.Unit:return n.Unit;case e.CompletionItemKind.Value:return n.Value;case e.CompletionItemKind.Enum:return n.Enum;case e.CompletionItemKind.Keyword:return n.Keyword;case e.CompletionItemKind.Snippet:return n.Snippet;case e.CompletionItemKind.Color:return n.Color;case e.CompletionItemKind.File:return n.File;case e.CompletionItemKind.Reference:return n.Reference;case e.CompletionItemKind.Folder:return n.Folder;case e.CompletionItemKind.EnumMember:return n.EnumMember;case e.CompletionItemKind.Constant:return n.Constant;case e.CompletionItemKind.Struct:return n.Struct;case e.CompletionItemKind.Event:return n.Event;case e.CompletionItemKind.Operator:return n.Operator;case e.CompletionItemKind.TypeParameter:return n.TypeParameter}return n.Property}class v{constructor(e,t){this._worker=e,this._defaults=t,this.triggerCharacters=[".","("]}async provideCompletionItems(t,n){const s=await this._worker(t.uri),o=this._defaults.getApiContextForModel(t.uri),a=await s.doComplete(t.uri.toString(),function(e){return{character:e.column-1,line:e.lineNumber-1}}(n),o);if(!a)return;const c=t.getWordUntilPosition(n),l=new r(n.lineNumber,c.startColumn,n.lineNumber,c.endColumn),p=a.items.map((t=>{const n={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:l,kind:y(t.kind)};var r;return t.textEdit&&(n.range=void 0!==(r=t.textEdit).insert&&void 0!==r.replace?{insert:w(t.textEdit.insert),replace:w(t.textEdit.replace)}:w(t.textEdit.range),n.insertText=t.textEdit.newText),t.additionalTextEdits&&(n.additionalTextEdits=t.additionalTextEdits.map(I)),t.insertTextFormat===e.InsertTextFormat.Snippet&&(n.insertTextRules=i.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(n.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),n}));return{incomplete:a.isIncomplete,suggestions:p}}}class E{constructor(e,t){this._worker=e,this._defaults=t}async provideDocumentFormattingEdits(e){const t=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri.toString()),r=await t.doFormat(e.uri.toString(),n);return r?r.map((e=>({range:w(e.range),text:e.newText}))):[]}}class S{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}_getClientProxy(){if(!this._client){const{languageId:e,languageOptions:n}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e,languageOptions:n}}),this._client=this._worker.getProxy()}return this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}let A;async function C(...e){return new Promise(((t,n)=>{if(!A)return n("TypeScript not registered!");t(A(...e))}))}const U=new class{constructor(){this._onDiagnosticsChange=new s}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function F(){return U}function P(e){const t=new S(e),n=(...e)=>t.getLanguageServiceWorker(...e);A=n,i.setMonarchTokensProvider(e.languageId,f),i.setLanguageConfiguration(e.languageId,h),i.registerCompletionItemProvider(e.languageId,new v(n,e)),i.registerDocumentFormattingEditProvider(e.languageId,new E(n,e)),new b(e.languageId,n,{defaults:e,diagnosticsService:U})}export{F as getArcadeDiagnosticService,C as getArcadeWorker,P as setupMode}
|