@arcgis/coding-components 4.30.0-next.60 → 4.30.0-next.62
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 +2 -2
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ar.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hu.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ja.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lt.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lv.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ro.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +2 -0
- package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +2 -0
- package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +1 -1
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-55ac23d1.js → p-318fb418.js} +2 -2
- package/dist/arcgis-coding-components/{p-45801ffe.js → p-38edc354.js} +1 -1
- package/dist/arcgis-coding-components/{p-a7f7c1aa.entry.js → p-3b6e229e.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-53b69ec3.js → p-4823505e.js} +10 -10
- package/dist/arcgis-coding-components/{p-297663c9.js → p-705469d1.js} +2 -2
- package/dist/arcgis-coding-components/{p-f411a906.js → p-92bd8457.js} +2 -2
- package/dist/arcgis-coding-components/{p-9c6bb77a.js → p-981cd353.js} +1 -1
- package/dist/arcgis-coding-components/{p-6be741ea.js → p-c0ae53b1.js} +2 -2
- package/dist/arcgis-coding-components/{p-48f37b8e.js → p-c51ea67a.js} +2 -2
- package/dist/arcgis-coding-components/{p-6d2daea8.js → p-cd56cf49.js} +2 -2
- package/dist/arcgis-coding-components/{p-c3c62032.js → p-cfc6adab.js} +2 -2
- package/dist/arcgis-coding-components/{p-c94e9b77.js → p-f661a8d3.js} +2 -2
- package/dist/cjs/{arcade-defaults-25e01647.js → arcade-defaults-5c1c0ecb.js} +38 -31
- package/dist/cjs/{arcade-mode-80f256b2.js → arcade-mode-6fa9d9f6.js} +3 -3
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-coding-components.cjs.js +2 -2
- package/dist/cjs/{css-a4343f63.js → css-0dd4f61e.js} +1 -1
- package/dist/cjs/{cssMode-a55308d9.js → cssMode-b840c8b5.js} +3 -3
- package/dist/cjs/{html-0d7ea22e.js → html-009b9fcc.js} +3 -3
- package/dist/cjs/{htmlMode-f49a890f.js → htmlMode-7acf57eb.js} +3 -3
- package/dist/cjs/{index-cc90af2a.js → index-1e515ac1.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{javascript-ca83132d.js → javascript-e87b1198.js} +4 -4
- package/dist/cjs/{jsonMode-4ae5f2d3.js → jsonMode-3be3c50a.js} +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{tsMode-f3f32f78.js → tsMode-c2c38c3a.js} +3 -3
- package/dist/cjs/{typescript-a3feebd1.js → typescript-ebffaab1.js} +3 -3
- package/dist/components/arcade-api.js +1 -1
- package/dist/components/arcade-contribution.js +1 -1
- package/dist/components/arcade-defaults.js +29 -22
- package/dist/components/arcade-mode.js +1 -1
- package/dist/components/arcade-results.js +1 -1
- package/dist/components/arcade-suggestions.js +1 -1
- package/dist/components/arcade-variables.js +1 -1
- package/dist/components/arcgis-arcade-api.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +1 -1
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-variables.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/chunk-A2KF2X73.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/fields.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/useT9n.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{arcade-defaults-c0b9c076.js → arcade-defaults-ac123ced.js} +38 -31
- package/dist/esm/{arcade-mode-792cbcf5.js → arcade-mode-957a60b5.js} +3 -3
- package/dist/esm/arcgis-arcade-api_6.entry.js +4 -4
- package/dist/esm/arcgis-coding-components.js +3 -3
- package/dist/esm/{css-5c8d2920.js → css-9f99ae66.js} +1 -1
- package/dist/esm/{cssMode-8fa2f14c.js → cssMode-b89fc46f.js} +3 -3
- package/dist/esm/{html-e888de7a.js → html-645adbbc.js} +3 -3
- package/dist/esm/{htmlMode-774cf48f.js → htmlMode-fc416dae.js} +3 -3
- package/dist/esm/{index-052906ef.js → index-d4c5ac07.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/{javascript-b5c99634.js → javascript-830b5438.js} +4 -4
- package/dist/esm/{jsonMode-48b7186d.js → jsonMode-aed4f2cc.js} +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{tsMode-a9ff7531.js → tsMode-4b3dff8e.js} +3 -3
- package/dist/esm/{typescript-9bbf3eca.js → typescript-1ea81da5.js} +3 -3
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/types/utils/profile/types.d.ts +2 -2
- package/dist/types/utils/profile/utils.d.ts +1 -0
- package/package.json +9 -9
|
@@ -1,6 +1,6 @@
|
|
|
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.
|
|
4
|
+
* v4.30.0-next.62
|
|
5
5
|
*/
|
|
6
|
-
import{p as e,b as t}from"./p-
|
|
6
|
+
import{p as e,b as t}from"./p-981cd353.js";export{s as setNonce}from"./p-981cd353.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-3b6e229e",[[0,"arcgis-arcade-editor",{profile:[16],script:[1025],testData:[16],suggestions:[16],snippets:[16],hideDocumentationActions:[4,"hide-documentation-actions"],hideSideBar:[4,"hide-side-bar"],sideActionBarExpanded:[1540,"side-action-bar-expanded"],openedSidePanel:[1537,"opened-side-panel"],editorOptions:[16],editorInstance:[16],messages:[32],_preparingProfile:[32],_editorProfile:[32],_showExecutionPanel:[32],_resultPanel:[32],_executingScript:[32],_consoleLogs:[32],_executionResult:[32],getScript:[64],setFocus:[64],getEditorInstance:[64],getTestResult:[64],updateThemeColors:[64]},null,{profile:["_profileChanged"],testData:["_testDataChanged"],snippets:["_snippetChanged"]}],[1,"arcgis-arcade-api",{hideDocumentationActions:[4,"hide-documentation-actions"],modelId:[1,"model-id"],_selectedApiItem:[32],_filterValue:[32],_colorizeStyle:[32],_preparingApi:[32],_apiLibrary:[32]}],[1,"arcgis-arcade-results",{loading:[4],openedResultPanel:[1537,"opened-result-panel"],result:[16],consoleLogs:[16]}],[1,"arcgis-arcade-suggestions",{suggestions:[16],_selectedSuggestion:[32],_filterValue:[32],_colorizeStyle:[32]},null,{suggestions:["suggestionsPropChanged"]}],[1,"arcgis-arcade-variables",{loading:[4],modelId:[1,"model-id"],_mutationCounter:[32],_flowItemRenderers:[32],_filterValue:[32]},null,{modelId:["modelIdPropChanged"]}],[0,"arcgis-code-editor",{value:[1],language:[1],modelId:[1,"model-id"],options:[16],editorInstance:[16],getValue:[64],setValue:[64],insertText:[64],insertSnippet:[64],getEditorInstance:[64],setFocus:[64]},null,{language:["languagePropChange"],modelId:["modelIdPropChange"],options:["optionsPropChange"]}]]]],e)));
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "الطبقة",
|
|
3
3
|
"featureservice": "خدمة المعالم",
|
|
4
4
|
"mapservice": "خدمة الخريطة",
|
|
5
|
+
"map": "بيت_Web Map_______________لاحقة",
|
|
5
6
|
"webmap": "خريطة ويب",
|
|
7
|
+
"webscene": "بيت_Web Scene___________________لاحقة",
|
|
6
8
|
"webmapformat": "خريطة الويب: {webMapTitle}",
|
|
7
9
|
"item": "عنصر",
|
|
8
10
|
"invoking": "استدعاء",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Слой",
|
|
3
3
|
"featureservice": "Услуга с обекти",
|
|
4
4
|
"mapservice": "Услуга за карти",
|
|
5
|
+
"map": "й_Web Map_______________й",
|
|
5
6
|
"webmap": "Уеб карта",
|
|
7
|
+
"webscene": "й_Web Scene___________________й",
|
|
6
8
|
"webmapformat": "Уеб карта: {webMapTitle}",
|
|
7
9
|
"item": "Елемент",
|
|
8
10
|
"invoking": "Извикване",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Sloj",
|
|
3
3
|
"featureservice": "Usluga geoobjekata",
|
|
4
4
|
"mapservice": "Usluga karte",
|
|
5
|
+
"map": "Č_Web Map_______________ž",
|
|
5
6
|
"webmap": "Web-karta",
|
|
7
|
+
"webscene": "Č_Web Scene___________________ž",
|
|
6
8
|
"webmapformat": "Web-karta: {webMapTitle}",
|
|
7
9
|
"item": "Stavka",
|
|
8
10
|
"invoking": "Pozivanje",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Capa",
|
|
3
3
|
"featureservice": "Servei d\\'entitats",
|
|
4
4
|
"mapservice": "Servei de mapes",
|
|
5
|
+
"map": "ó_Web Map_______________à",
|
|
5
6
|
"webmap": "Mapa web",
|
|
7
|
+
"webscene": "ó_Web Scene___________________à",
|
|
6
8
|
"webmapformat": "Mapa web: {webMapTitle}",
|
|
7
9
|
"item": "Element",
|
|
8
10
|
"invoking": "S\\'està invocant",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Vrstva",
|
|
3
3
|
"featureservice": "Feature služba",
|
|
4
4
|
"mapservice": "Mapová služba",
|
|
5
|
+
"map": "Ř_Web Map_______________ů",
|
|
5
6
|
"webmap": "Webová mapa",
|
|
7
|
+
"webscene": "Ř_Web Scene___________________ů",
|
|
6
8
|
"webmapformat": "Webová mapa: {webMapTitle}",
|
|
7
9
|
"item": "Položka",
|
|
8
10
|
"invoking": "Vyvolání",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Lag",
|
|
3
3
|
"featureservice": "Objekttjeneste",
|
|
4
4
|
"mapservice": "Korttjeneste",
|
|
5
|
+
"map": "ø_Web Map_______________å",
|
|
5
6
|
"webmap": "Webkort",
|
|
7
|
+
"webscene": "ø_Web Scene___________________å",
|
|
6
8
|
"webmapformat": "Webkort: {webMapTitle}",
|
|
7
9
|
"item": "Element",
|
|
8
10
|
"invoking": "Aktiverer",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Layer",
|
|
3
3
|
"featureservice": "Feature-Service",
|
|
4
4
|
"mapservice": "Kartenservice",
|
|
5
|
+
"map": "ä_Web Map_______________Ü",
|
|
5
6
|
"webmap": "Webkarte",
|
|
7
|
+
"webscene": "ä_Web Scene___________________Ü",
|
|
6
8
|
"webmapformat": "Webkarte: {webMapTitle}",
|
|
7
9
|
"item": "Element",
|
|
8
10
|
"invoking": "Wird aufgerufen",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Θεματικό επίπεδο",
|
|
3
3
|
"featureservice": "Feature service",
|
|
4
4
|
"mapservice": "Υπηρεσία χάρτη",
|
|
5
|
+
"map": "π_Web Map_______________Ω",
|
|
5
6
|
"webmap": "Web Χάρτης",
|
|
7
|
+
"webscene": "π_Web Scene___________________Ω",
|
|
6
8
|
"webmapformat": "Web χάρτης: {webMapTitle}",
|
|
7
9
|
"item": "Αντικείμενο",
|
|
8
10
|
"invoking": "Κλήση",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Capa",
|
|
3
3
|
"featureservice": "Servicio de entidades",
|
|
4
4
|
"mapservice": "Servicio de mapas",
|
|
5
|
+
"map": "á_Web Map_______________Ó",
|
|
5
6
|
"webmap": "Mapa Web",
|
|
7
|
+
"webscene": "á_Web Scene___________________Ó",
|
|
6
8
|
"webmapformat": "Mapa web: {webMapTitle}",
|
|
7
9
|
"item": "Elemento",
|
|
8
10
|
"invoking": "Invocar",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Kiht",
|
|
3
3
|
"featureservice": "Objektiteenus",
|
|
4
4
|
"mapservice": "Kaarditeenus",
|
|
5
|
+
"map": "Š_Web Map_______________ä",
|
|
5
6
|
"webmap": "Veebikaart",
|
|
7
|
+
"webscene": "Š_Web Scene___________________ä",
|
|
6
8
|
"webmapformat": "Veebikaart: {webMapTitle}",
|
|
7
9
|
"item": "Sisuüksus",
|
|
8
10
|
"invoking": "Käivitamine",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Karttataso",
|
|
3
3
|
"featureservice": "Kohdepalvelu",
|
|
4
4
|
"mapservice": "Karttapalvelu",
|
|
5
|
+
"map": "Å_Web Map_______________ö",
|
|
5
6
|
"webmap": "Web-kartta",
|
|
7
|
+
"webscene": "Å_Web Scene___________________ö",
|
|
6
8
|
"webmapformat": "Web-kartta: {webMapTitle}",
|
|
7
9
|
"item": "Kohde",
|
|
8
10
|
"invoking": "Kutsutaan",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Couche",
|
|
3
3
|
"featureservice": "Service d’entités",
|
|
4
4
|
"mapservice": "Service de carte",
|
|
5
|
+
"map": "æ_Web Map_______________Â",
|
|
5
6
|
"webmap": "Carte Web",
|
|
7
|
+
"webscene": "æ_Web Scene___________________Â",
|
|
6
8
|
"webmapformat": "Carte Web : {webMapTitle}",
|
|
7
9
|
"item": "Élément",
|
|
8
10
|
"invoking": "Appel",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "שכבה",
|
|
3
3
|
"featureservice": "שירות ישויות",
|
|
4
4
|
"mapservice": "שירות מפה",
|
|
5
|
+
"map": "כן_Web Map_______________ש",
|
|
5
6
|
"webmap": "Web Map",
|
|
7
|
+
"webscene": "כן_Web Scene___________________ש",
|
|
6
8
|
"webmapformat": "Web map: {webMapTitle}",
|
|
7
9
|
"item": "פריט",
|
|
8
10
|
"invoking": "גורם",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Sloj",
|
|
3
3
|
"featureservice": "Usluga geoobjekata",
|
|
4
4
|
"mapservice": "Usluga karte",
|
|
5
|
+
"map": "Č_Web Map_______________ž",
|
|
5
6
|
"webmap": "Web-karta",
|
|
7
|
+
"webscene": "Č_Web Scene___________________ž",
|
|
6
8
|
"webmapformat": "Web-karta: {webMapTitle}",
|
|
7
9
|
"item": "Stavka",
|
|
8
10
|
"invoking": "Pozivanje",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Réteg",
|
|
3
3
|
"featureservice": "Vektoros szolgáltatás",
|
|
4
4
|
"mapservice": "Térképi szolgáltatás",
|
|
5
|
+
"map": "í_Web Map_______________ő",
|
|
5
6
|
"webmap": "Webtérkép",
|
|
7
|
+
"webscene": "í_Web Scene___________________ő",
|
|
6
8
|
"webmapformat": "Webtérkép: {webMapTitle}",
|
|
7
9
|
"item": "Tétel",
|
|
8
10
|
"invoking": "Meghívás",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Layer",
|
|
3
3
|
"featureservice": "Feature service",
|
|
4
4
|
"mapservice": "Map service",
|
|
5
|
+
"map": "ng_Web Map_______________ny",
|
|
5
6
|
"webmap": "Peta Web",
|
|
7
|
+
"webscene": "ng_Web Scene___________________ny",
|
|
6
8
|
"webmapformat": "Web map: {webMapTitle}",
|
|
7
9
|
"item": "Item",
|
|
8
10
|
"invoking": "Memohon",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Layer",
|
|
3
3
|
"featureservice": "Feature service",
|
|
4
4
|
"mapservice": "Map service",
|
|
5
|
+
"map": "é_Web Map_______________È",
|
|
5
6
|
"webmap": "Mappa Web",
|
|
7
|
+
"webscene": "é_Web Scene___________________È",
|
|
6
8
|
"webmapformat": "Mappa Web: {webMapTitle}",
|
|
7
9
|
"item": "Elemento",
|
|
8
10
|
"invoking": "Richiamo",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "レイヤー",
|
|
3
3
|
"featureservice": "フィーチャ サービス",
|
|
4
4
|
"mapservice": "マップ サービス",
|
|
5
|
+
"map": "須_Web Map_______________鷗",
|
|
5
6
|
"webmap": "Web マップ",
|
|
7
|
+
"webscene": "須_Web Scene___________________鷗",
|
|
6
8
|
"webmapformat": "Web マップ: {webMapTitle}",
|
|
7
9
|
"item": "アイテム",
|
|
8
10
|
"invoking": "呼び出し中",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Sluoksnis",
|
|
3
3
|
"featureservice": "Elementų paslauga",
|
|
4
4
|
"mapservice": "Žemėlapio paslauga",
|
|
5
|
+
"map": "Į_Web Map_______________š",
|
|
5
6
|
"webmap": "Internetinis žemėlapis",
|
|
7
|
+
"webscene": "Į_Web Scene___________________š",
|
|
6
8
|
"webmapformat": "Internetinis žemėlapis: {webMapTitle}",
|
|
7
9
|
"item": "Elementas",
|
|
8
10
|
"invoking": "Iškvietimas",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Slānis",
|
|
3
3
|
"featureservice": "Elementu pakalpojums",
|
|
4
4
|
"mapservice": "Karšu serviss",
|
|
5
|
+
"map": "ķ_Web Map_______________ū",
|
|
5
6
|
"webmap": "Tīmekļa karte",
|
|
7
|
+
"webscene": "ķ_Web Scene___________________ū",
|
|
6
8
|
"webmapformat": "Tīmekļa karte: {webMapTitle}",
|
|
7
9
|
"item": "Vienība",
|
|
8
10
|
"invoking": "Izsauc",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Lag",
|
|
3
3
|
"featureservice": "Geoobjektstjeneste",
|
|
4
4
|
"mapservice": "Karttjeneste",
|
|
5
|
+
"map": "å_Web Map_______________ø",
|
|
5
6
|
"webmap": "Webkart",
|
|
7
|
+
"webscene": "å_Web Scene___________________ø",
|
|
6
8
|
"webmapformat": "Webkart: {webMapTitle}",
|
|
7
9
|
"item": "Element",
|
|
8
10
|
"invoking": "Starter",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Laag",
|
|
3
3
|
"featureservice": "Objectservice",
|
|
4
4
|
"mapservice": "Map service",
|
|
5
|
+
"map": "IJ_Web Map_______________ä",
|
|
5
6
|
"webmap": "Web Map",
|
|
7
|
+
"webscene": "IJ_Web Scene___________________ä",
|
|
6
8
|
"webmapformat": "Webmap: {webMapTitle}",
|
|
7
9
|
"item": "Item",
|
|
8
10
|
"invoking": "Aanroepen",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Warstwa",
|
|
3
3
|
"featureservice": "Usługa obiektowa",
|
|
4
4
|
"mapservice": "Usługa mapowa",
|
|
5
|
+
"map": "ł_Web Map_______________ą",
|
|
5
6
|
"webmap": "Mapa internetowa",
|
|
7
|
+
"webscene": "ł_Web Scene___________________ą",
|
|
6
8
|
"webmapformat": "Mapa internetowa: {webMapTitle}",
|
|
7
9
|
"item": "Element",
|
|
8
10
|
"invoking": "Wywoływanie",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Camada",
|
|
3
3
|
"featureservice": "Serviço da feição",
|
|
4
4
|
"mapservice": "Serviço de mapa",
|
|
5
|
+
"map": "ã_Web Map_______________Ç",
|
|
5
6
|
"webmap": "Mapa da Web",
|
|
7
|
+
"webscene": "ã_Web Scene___________________Ç",
|
|
6
8
|
"webmapformat": "Mapa da web: {webMapTitle}",
|
|
7
9
|
"item": "Item",
|
|
8
10
|
"invoking": "Solicitando",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Camada",
|
|
3
3
|
"featureservice": "Serviço de elementos",
|
|
4
4
|
"mapservice": "Serviço de mapa",
|
|
5
|
+
"map": "ã_Web Map_______________Ç",
|
|
5
6
|
"webmap": "Mapa Web",
|
|
7
|
+
"webscene": "ã_Web Scene___________________Ç",
|
|
6
8
|
"webmapformat": "Mapa web: {webMapTitle}",
|
|
7
9
|
"item": "Item",
|
|
8
10
|
"invoking": "Invocar",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Strat tematic",
|
|
3
3
|
"featureservice": "Serviciu de obiecte spațiale",
|
|
4
4
|
"mapservice": "Serviciu de hărți",
|
|
5
|
+
"map": "Ă_Web Map_______________ș",
|
|
5
6
|
"webmap": "Hartă Web",
|
|
7
|
+
"webscene": "Ă_Web Scene___________________ș",
|
|
6
8
|
"webmapformat": "Hartă web: {webMapTitle}",
|
|
7
9
|
"item": "Element",
|
|
8
10
|
"invoking": "Invocare",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Слой",
|
|
3
3
|
"featureservice": "Сервис объектов",
|
|
4
4
|
"mapservice": "Картографический сервис",
|
|
5
|
+
"map": "Ж_Web Map_______________Я",
|
|
5
6
|
"webmap": "Веб-карта",
|
|
7
|
+
"webscene": "Ж_Web Scene___________________Я",
|
|
6
8
|
"webmapformat": "Веб-карта: {webMapTitle}",
|
|
7
9
|
"item": "Элемент",
|
|
8
10
|
"invoking": "Вызов",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Vrstva",
|
|
3
3
|
"featureservice": "Prvková služba",
|
|
4
4
|
"mapservice": "Mapová služba",
|
|
5
|
+
"map": "ĺ_Web Map_______________ľ",
|
|
5
6
|
"webmap": "Webmapa",
|
|
7
|
+
"webscene": "ĺ_Web Scene___________________ľ",
|
|
6
8
|
"webmapformat": "Webová mapa: {webMapTitle}",
|
|
7
9
|
"item": "Položka",
|
|
8
10
|
"invoking": "Vyvolávanie",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Sloj",
|
|
3
3
|
"featureservice": "Geoobjektna storitev",
|
|
4
4
|
"mapservice": "Kartna storitev",
|
|
5
|
+
"map": "Š_Web Map_______________č",
|
|
5
6
|
"webmap": "Spletna karta",
|
|
7
|
+
"webscene": "Š_Web Scene___________________č",
|
|
6
8
|
"webmapformat": "Spletna karta: {webMapTitle}",
|
|
7
9
|
"item": "Element",
|
|
8
10
|
"invoking": "Pozivanje",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Sloj",
|
|
3
3
|
"featureservice": "Servis geoobjekata",
|
|
4
4
|
"mapservice": "Servis mape",
|
|
5
|
+
"map": "Č_Web Map_______________ž",
|
|
5
6
|
"webmap": "Web Map",
|
|
7
|
+
"webscene": "Č_Web Scene___________________ž",
|
|
6
8
|
"webmapformat": "Veb mapa: {webMapTitle}",
|
|
7
9
|
"item": "Stavka",
|
|
8
10
|
"invoking": "Pozivanje",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Lager",
|
|
3
3
|
"featureservice": "Geoobjekttjänst",
|
|
4
4
|
"mapservice": "Karttjänst",
|
|
5
|
+
"map": "Å_Web Map_______________ö",
|
|
5
6
|
"webmap": "Webbkarta",
|
|
7
|
+
"webscene": "Å_Web Scene___________________ö",
|
|
6
8
|
"webmapformat": "Webbkarta: {webMapTitle}",
|
|
7
9
|
"item": "Objekt",
|
|
8
10
|
"invoking": "Anropar",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "ชั้นข้อมูล",
|
|
3
3
|
"featureservice": "ฟีเจอร์เซอร์วิส",
|
|
4
4
|
"mapservice": "เซอร์วิสแผนที่",
|
|
5
|
+
"map": "ก้_Web Map_______________ษฺ",
|
|
5
6
|
"webmap": "เว็บแมพ",
|
|
7
|
+
"webscene": "ก้_Web Scene___________________ษฺ",
|
|
6
8
|
"webmapformat": "เว็บแมป: {webMapTitle}",
|
|
7
9
|
"item": "รายการ",
|
|
8
10
|
"invoking": "การเรียกใช้",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Katman",
|
|
3
3
|
"featureservice": "Detay servisi",
|
|
4
4
|
"mapservice": "Harita servisi",
|
|
5
|
+
"map": "ı_Web Map_______________İ",
|
|
5
6
|
"webmap": "Web Haritası",
|
|
7
|
+
"webscene": "ı_Web Scene___________________İ",
|
|
6
8
|
"webmapformat": "Web haritası: {webMapTitle}",
|
|
7
9
|
"item": "Öge",
|
|
8
10
|
"invoking": "Başlatılıyor",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Шар",
|
|
3
3
|
"featureservice": "Сервіс об\\'єктів",
|
|
4
4
|
"mapservice": "Картографічний сервіс",
|
|
5
|
+
"map": "ґ_Web Map_______________Ї",
|
|
5
6
|
"webmap": "Веб-карта",
|
|
7
|
+
"webscene": "ґ_Web Scene___________________Ї",
|
|
6
8
|
"webmapformat": "Веб-карта: {webMapTitle}",
|
|
7
9
|
"item": "Елемент",
|
|
8
10
|
"invoking": "Виклик",
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"layer": "Lớp",
|
|
3
3
|
"featureservice": "Dịch vụ đối tượng",
|
|
4
4
|
"mapservice": "Dịch vụ bản đồ",
|
|
5
|
+
"map": "Đ_Web Map_______________ớ",
|
|
5
6
|
"webmap": "Bản đồ Web",
|
|
7
|
+
"webscene": "Đ_Web Scene___________________ớ",
|
|
6
8
|
"webmapformat": "Bản đồ web: {webMapTitle}",
|
|
7
9
|
"item": "Mục",
|
|
8
10
|
"invoking": "Gọi",
|
|
@@ -41,4 +41,4 @@
|
|
|
41
41
|
$0
|
|
42
42
|
}`,insertTextMode:fe.adjustIndentation,insertTextFormat:he.Snippet},{label:"import",kind:ee.Snippet,detail:"Import Statement",insertText:'import ${1:namespace} from "${0:uri}"',insertTextMode:fe.adjustIndentation,insertTextFormat:he.Snippet},{label:"while",kind:ee.Snippet,detail:"While Loop Statement",insertText:`while (\${1:false}) {
|
|
43
43
|
$0
|
|
44
|
-
}`,insertTextMode:fe.adjustIndentation,insertTextFormat:he.Snippet}],c0=/\$\{(.*?)\}/gu;function ln(e,t){return t?e.replace(c0,(n,i)=>t[i].toString()):e}var Xr=/[-[\]/{}()*+?.\\^$|]/gu;function h0(e,t){return e.line>t.end.line}function f0(e,t){return e.line<t.start.line}function T1(e,t){return!(f0(e,t)||h0(e,t)||e.line===t.start.line&&e.column<t.start.column||e.line===t.end.line&&e.column>t.end.column)}var te={None:0,Keywords:1,All:255,NoKeywords:254},tt={identifiers:"a",profileVariables:"aa",constants:"ab",literals:"ab",functions:"ac",snippets:"b",keywords:"c"};function d0(e,t,n,i={}){let r=e.getText({start:{line:0,character:0},end:t}),{tokens:s,errors:o=[]}=vl(r,{loc:!0,tolerant:!0});if(o.length)return{isIncomplete:!1,items:[]};let a=s.at(s.length-1),l="",c=L0(t);a?.type==="Identifier"&&T1(c,a.loc)&&(l=a.value,s.pop(),a=s[s.length-1]);let h={variables:i.profile?.variables??[],additionalCompletionItems:(i.snippets??[]).map(f=>({kind:ee.Snippet,insertTextMode:fe.adjustIndentation,insertTextFormat:he.Snippet,...f})),apiDatabase:n};return a?.type==="Punctuator"&&a.value==="."?g0(s,l,h):m0(s,l,c,h)}function m0(e,t,n,i){let r=D0(e,n);if(r===te.None)return{isIncomplete:!1,items:[]};let s=A0(e),o=[],a=new RegExp(t.replaceAll(Xr,"\\$&"),"i");return s.forEach((l,c)=>{a.test(c)&&o.push({...l,sortText:tt.identifiers})}),i.variables.forEach(l=>{a.test(l.name)&&l.completion&&o.push({...l.completion,sortText:tt.profileVariables})}),b1(r)&&l0.forEach(l=>{l.label.startsWith(t)&&o.push({...l,sortText:tt.snippets})}),i.additionalCompletionItems.forEach(l=>{a.test(l.label)&&o.push({...l,sortText:tt.snippets})}),b1(r)&&u0.forEach(l=>{a.test(l.label)&&o.push({...l,sortText:tt.keywords})}),a0.forEach(l=>{a.test(l.label)&&o.push({...l,sortText:tt.literals})}),i.apiDatabase.constantDefinitions.forEach((l,c)=>{l.type==="constant"&&l.disableDocumentation===!0||!a.test(c)||o.push({...l.completion,sortText:tt.constants})}),i.apiDatabase.functionDefinitions.forEach((l,c)=>{a.test(c)&&l.overloads.forEach(h=>{h.disableDocumentation||o.push({...h.completion,sortText:tt.functions})})}),{isIncomplete:!1,items:o}}function g0(e,t,n){let i=[...e],r=i.pop(),s=r,o=[];for(;r&&!(r.type!=="Punctuator"||r.value!=="."||(r=i.pop(),r?.type!=="Identifier"));)o=[r.value.toLowerCase(),...o],r=i.pop();if(o.length===0||!s)return{isIncomplete:!1,items:[]};let a=p0(o,t,n);return a||(a=x0(o,t,s,n),a)?a:{isIncomplete:!1,items:[]}}function p0(e,t,n){if(e.length>1)return null;let i=n.apiDatabase.constantDefinitions.get(e[0]);if(!i)return null;if(i.type!=="namespace")return{isIncomplete:!1,items:[]};let r=[],s=new RegExp(t.replaceAll(Xr,"\\$&"),"i");return i.members.forEach(o=>{o.disableDocumentation===!0||!s.test(o.name)||r.push(o.completion)}),{isIncomplete:!1,items:r}}function x0(e,t,n,i){if(!i.variables.length||!e.length)return null;let r=e.shift(),s=i.variables;for(;r;){let c=s.find(h=>h.name.toLowerCase()===r);if(!fl(c))return null;s=c.properties,r=e.shift()}let o=[],a=new RegExp(t.replaceAll(Xr,"\\$&"),"i"),l=F0(n.loc.start);return s.forEach(c=>{a.test(c.name)&&c.completion&&o.push(w0(l,c.completion))}),{isIncomplete:!1,items:o}}function b1(e){return(e&te.Keywords)===te.Keywords}function D0(e,t){if(!e.length)return te.All;let n=e[e.length-1];switch(n.type){case"Identifier":return te.All;case"Keyword":return["return","in","else"].includes(n.value)?te.NoKeywords:te.None;case"Punctuator":return b0(e);case"Template":return n.value.endsWith("${")?te.NoKeywords:te.All;default:return T1(t,n.loc)?te.None:te.All}}function b0(e){let t=[...e],n=t.pop();if(!n)return te.All;if(n.type!=="Punctuator")return te.None;if(n.value!=="("&&n.value!==",")return te.All;if(n.value==="(")return C1(t);let i=0;for(n=t.pop();n;){if(n.type==="Keyword")return te.None;if(n.type!=="Punctuator"){n=t.pop();continue}if(n.value===")"||n.value==="]"){i-=1,n=t.pop();continue}if(n.value==="["){if(i===0)return te.NoKeywords;i+=1,n=t.pop();continue}if(n.value==="("){if(i===0)return C1(t);i+=1,n=t.pop();continue}n=t.pop()}return te.None}function C1(e){let t=[...e],n=t.pop();return n?n.type==="Keyword"?n.value.toLowerCase()==="for"?te.All:te.NoKeywords:n.type!=="Identifier"?te.All:(n=t.pop(),n?.type==="Keyword"&&n.value.toLowerCase()==="function"?te.None:te.NoKeywords):te.All}var C0=class{constructor(e){this.tokens=e,this.currentIndex=0}increment(){if(!(this.currentIndex>=this.tokens.length))return this.currentIndex+=1,this.tokens[this.currentIndex]}get next(){return this.tokens[this.currentIndex+1]}get previous(){return this.tokens[this.currentIndex-1]}get current(){return this.tokens[this.currentIndex]}},ai={parameterFormat:"(parameter) ${name}",variableFormat:"var ${name}",functionFormat:"function ${name} (${paramsDetail})"};function A0(e){let t=new Map;if(!e.length)return t;let n=new C0(e);for(;n.current;){if(n.current.type==="Keyword"){if(n.current.value.toLowerCase()==="var"){n.increment(),E0(n,t);continue}if(n.current.value.toLowerCase()==="function"){n.increment(),_0(n,t);continue}}n.increment()}return t}function E0(e,t){for(;e.current;){if(e.current.type!=="Identifier")return;let n=e.current.value,i=n.toLowerCase();t.set(i,{label:n,kind:ee.Variable,detail:ln(ai.variableFormat,{name:n})});let r=e.increment();if(r?.type!=="Punctuator")return;if(r.value===","){e.increment();continue}if(r.value==="="){e.increment(),v0(e);continue}}}function _0(e,t){for(;e.current;){if(e.current.type!=="Identifier")return;let n=e.current.value,i=n.toLowerCase(),r={label:n,kind:ee.Function,detail:ln(ai.functionFormat,{name:n,paramsDetail:""}),insertText:`${n}()`,insertTextMode:fe.adjustIndentation,insertTextFormat:he.Snippet};t.set(i,r);let s=e.increment();if(!ht(s,"("))return;s=e.increment();let o=[];for(;s&&!(s.type!=="Identifier"||(o.push(s.value),s=e.increment(),!ht(s,",")));)s=e.increment();if(o.length){r.detail=ln(ai.functionFormat,{name:r.label,paramsDetail:o.join(", ")});let c=o.map((h,f)=>`\${${f+1}:${h}}`).join(", ");r.insertText=`${r.label}(${c})`}if(!ht(s,")")||(s=e.increment(),!ht(s,"{")))return;s=e.increment();let a=e.currentIndex,l=1;for(;s&&l>0;)ht(s,"{")?l+=1:ht(s,"}")&&(l-=1),s=e.increment();if(l===0)return;e.currentIndex=a,o.forEach(c=>{let h=c.toLowerCase();t.set(h,{label:c,kind:ee.Variable,detail:ln(ai.parameterFormat,{name:c})})})}}function ht(e,t){return e?.type==="Punctuator"&&e.value===t}function v0(e){let t=0;for(;e.current;){if(e.current.type==="Keyword"){if(ht(e.previous,".")){e.increment();continue}return}if(e.current.type==="Punctuator"&&e.current.value===";")return;if(e.current.type==="Template"&&e.current.value.startsWith("`")){t+=1,e.increment();continue}if(e.current.type==="Punctuator"&&["(","[","{"].includes(e.current.value)){t+=1,e.increment();continue}if(e.current.type==="Template"&&e.current.value.endsWith("`")){t-=1,e.increment();continue}if(e.current.type==="Punctuator"&&[")","]","}"].includes(e.current.value)){t-=1,e.increment();continue}if(!t&&e.current.type==="Punctuator"&&e.current.value===","){e.increment();return}e.increment()}}function w0(e,t){return t.insertText&&t.insertText.startsWith("[")&&(t.additionalTextEdits=[{newText:"",range:{start:{...e},end:{line:e.line,character:e.character+1}}}]),t}function L0(e){return{line:e.line+1,column:e.character}}function F0(e){return{line:e.line-1,character:e.column}}var y0=class{constructor(e,t=[]){this._apiDefinitions=e,this._profileVariables=t,this._isInBlock=!1,this._isInCallExpression=!1,this._identifierBeingAssigned=void 0,this._assignmentValidationMode="disabled",this._scriptScopeIdentifiers=new Map,this._diagnostics=[],this._undeclaredIdentifiersInFunctions=new Map,this.handleException=n=>{if(S0(n)){let{range:i,code:r,data:s}=n;this.logDiagnostic(i,{code:r,data:s})}else this.logDiagnostic({start:{line:1,column:0},end:{line:1,column:0}},{code:P.ExecutionError,data:{stack:n.stack??""}})},this.validateStatement=n=>{if(n)switch(n.type){case g.BlockStatement:n.body.forEach(this.validateStatement);return;case g.VariableDeclaration:n.declarations.forEach(i=>this.validateVariableDeclarator(i));return;case g.FunctionDeclaration:this.validateFunctionDeclaration(n);return;case g.ExportNamedDeclaration:this.validateExportDeclaration(n);return;case g.ImportDeclaration:this.validateImportDeclaration(n);return;case g.WhileStatement:this.validateWhileStatement(n);return;case g.ForStatement:this.validateForStatement(n);return;case g.ForInStatement:this.validateForInStatement(n);return;case g.IfStatement:this.validateIfStatement(n);return;case g.ReturnStatement:this.validateExpression(n.argument);return;case g.ExpressionStatement:this.validateExpression(n.expression);return;case g.BreakStatement:case g.ContinueStatement:case g.EmptyStatement:return}},this.validateExpression=n=>{if(n)switch(n.type){case g.AssignmentExpression:this.validateAssignmentExpression(n);return;case g.CallExpression:this.validateCallExpression(n);return;case g.Identifier:this.validateIdentifier(n);return;case g.Literal:this.validateLiteral(n);return;case g.ArrayExpression:n.elements.forEach(this.validateExpression);return;case g.ObjectExpression:this.validateObjectExpression(n);return;case g.UnaryExpression:this.validateUnaryExpression(n);return;case g.UpdateExpression:this.validateUpdateExpression(n);return;case g.BinaryExpression:case g.LogicalExpression:this.validateBinaryAndLogicalExpression(n);return;case g.MemberExpression:this.validateMemberExpression(n);return;case g.TemplateLiteral:n.expressions.forEach(this.validateExpression);return;default:return}}}validateScript(e){if(!e)return{diagnostics:[],program:null};this._isInBlock=!1,this._identifierBeingAssigned=void 0,this._assignmentValidationMode="disabled",this._diagnostics=[],this._scriptScopeIdentifiers.clear(),this._undeclaredIdentifiersInFunctions.clear(),this._functionScopeIdentifiers=void 0;let t=null;try{t=k1(e,{tolerant:!0}),this.handleErrors(t.errors),t.body.forEach(this.validateStatement),this.diagnoseIdentifiers(),this._undeclaredIdentifiersInFunctions.size>0&&this._undeclaredIdentifiersInFunctions.forEach(n=>{for(let i of n)this.logDiagnostic(i.node.loc,{code:P.NotDefined,data:{identifier:i.node.name}})})}catch(n){this.handleException(n)}return{diagnostics:this._diagnostics,program:t}}disableRecordIdentifierAssignment(e,t){let n=this._assignmentValidationMode;this._assignmentValidationMode="disabled",e.call(this,t),this._assignmentValidationMode=n}inBlock(e,t){let n=this._isInBlock;this._isInBlock=!0,e.call(this,t),this._isInBlock=n}get _isInFunctionScope(){return!!this._functionScopeIdentifiers}inFunctionScope(e){this._functionScopeIdentifiers=new Map,e.call(this),this.diagnoseIdentifiers(),this._functionScopeIdentifiers=void 0}logDiagnostic(e,t){let n={severity:ue.Error,...t,message:ln(wl[t.code],t.data),range:{start:{line:e.start.line-1,character:e.start.column},end:{line:e.end.line-1,character:e.end.column}}};this._diagnostics.push(n)}handleErrors(e){(e??[]).forEach(this.handleException)}getIdentifierInfo(e){return this._functionScopeIdentifiers?.get(e)??this._scriptScopeIdentifiers.get(e)}setIdentiferInfo(e,t){if(this._functionScopeIdentifiers){this._functionScopeIdentifiers.set(e,t);return}this._scriptScopeIdentifiers.set(e,t),this._undeclaredIdentifiersInFunctions.has(e)&&(this._undeclaredIdentifiersInFunctions.delete(e),t.used=!0)}isProfileVariable(e){return this._profileVariables.some(t=>t.name.toLowerCase()===e)}isApiConstant(e){return!!this._apiDefinitions?.constantDefinitions.get(e)}isApiFunction(e){return!!this._apiDefinitions?.functionDefinitions.get(e)}isApiItem(e){return this.isApiConstant(e)||this.isApiFunction(e)}validateVariableDeclarator(e){this.validateExpression(e.init),this.recordVariableIdentifier(e.id,{initialized:!!e.init})}validateFunctionDeclaration(e){this.recordFunctionIdentifier(e),this.inFunctionScope(()=>{e.params.forEach(t=>this.recordParamAsIdentifier(t)),Ut(e.body)&&this.logDiagnostic(e.body.loc,{code:P.UnexpectedEmptyFunction,data:{identifier:e.id.name},severity:ue.Warning}),this.validateStatement(e.body)})}validateExportDeclaration(e){this.validateStatement(e.declaration)}validateImportDeclaration(e){this.recordImportIdentifier(e)}validateForStatement(e){ci(e.init)?this.inBlock(this.validateStatement,e.init):this.validateExpression(e.init),this.validateExpression(e.update),this.validateExpression(e.test),Ut(e.body)&&this.logDiagnostic(e.body.loc,{code:P.EmptyBlockStatement,severity:ue.Warning}),this.inBlock(this.validateStatement,e.body)}validateWhileStatement(e){this.validateExpression(e.test),Ut(e.body)&&this.logDiagnostic(e.body.loc,{code:P.EmptyBlockStatement,severity:ue.Warning}),this.inBlock(this.validateStatement,e.body)}validateForInStatement(e){Me(e.left)?this.validateExpression(e.left):this.recordVariableIdentifier(e.left.declarations[0].id,{initialized:!0,inBlock:!0}),this.validateExpression(e.right),Ut(e.body)&&this.logDiagnostic(e.body.loc,{code:P.EmptyBlockStatement,severity:ue.Warning}),this.validateStatement(e.body)}validateIfStatement(e){this.validateExpression(e.test),Ut(e.consequent)&&this.logDiagnostic(e.consequent.loc,{code:P.EmptyBlockStatement,severity:ue.Warning}),e.alternate&&Ut(e.alternate)&&this.logDiagnostic(e.alternate.loc,{code:P.EmptyBlockStatement,severity:ue.Warning}),this.inBlock(this.validateStatement,e.consequent),this.inBlock(this.validateStatement,e.alternate)}validateAssignmentExpression(e){let t=this._identifierBeingAssigned,n=this._assignmentValidationMode;Me(e.left)&&(this._identifierBeingAssigned=e.left.name.toLowerCase(),this._assignmentValidationMode="left"),this.validateExpression(e.left),Me(e.left)&&(this._assignmentValidationMode="right"),this.validateExpression(e.right),this._identifierBeingAssigned=t,this._assignmentValidationMode=n}validateCallExpression(e){let t=this._isInCallExpression;if(this._isInCallExpression=!0,this.validateExpression(e.callee),Me(e.callee)){let n=e.callee.name.toLowerCase(),i=this.getIdentifierInfo(n),r=this._apiDefinitions?.functionDefinitions.get(n);if(!i&&r){let s=N0(r,e.arguments.length);s&&this.logDiagnostic(e.loc,s)}}e.arguments.forEach(this.validateExpression),this._isInCallExpression=t}validateIdentifier(e){let t=e.name.toLowerCase(),n=this.getIdentifierInfo(t);if(n){if(this._assignmentValidationMode==="left"&&this._identifierBeingAssigned===t){n.initialized=!0;return}if(this._assignmentValidationMode==="right"&&this._identifierBeingAssigned===t)return;n.used=!0;return}if(!(this.isProfileVariable(t)||this.isApiConstant(t))){if(this.isApiFunction(t)){if(this._isInCallExpression)return;this.logDiagnostic(e.loc,{code:P.InvalidApiFunctionUsage,data:{identifier:e.name}});return}if(this._isInFunctionScope){let i=this._undeclaredIdentifiersInFunctions.get(t);i||(i=[],this._undeclaredIdentifiersInFunctions.set(t,i)),i.push({node:e,identifier:t});return}this.logDiagnostic(e.loc,{code:P.NotDefined,data:{identifier:e.name}})}}validateLiteral(e){I0(e.raw).forEach(t=>{let n=this.getIdentifierInfo(t.toLowerCase());n&&(n.used=!0)})}logProfileOrApiConflict(e){let t=e.name.toLowerCase(),n=this.isProfileVariable(t),i=this.isApiItem(t);!n&&!i||this.logDiagnostic(e.loc,{code:n?P.ProfileVariablesConflict:P.ApiConflict,severity:ue.Warning,data:{identifier:e.name}})}logReservedKeywordsConflict(e){let t=e.name.toLowerCase();Zl.includes(t)&&this.logDiagnostic(e.loc,{code:P.ReservedKeyword,severity:ue.Warning,data:{identifier:e.name}})}validateObjectExpression(e){e.properties.forEach(t=>{this.validateExpression(t.value)})}validateUnaryExpression(e){this.validateExpression(e.argument)}validateUpdateExpression(e){this.validateExpression(e.argument)}validateBinaryAndLogicalExpression(e){this.validateExpression(e.left),this.validateExpression(e.right)}validateMemberExpression(e){let t=this.flattenMemberExpressionAndValidate(e),n=t[0].object;this.disableRecordIdentifierAssignment(this.validateExpression,n),Me(n)&&(this.getIdentifierInfo(n.name.toLowerCase())||this.validateMemberExpressionWithProfile(t)||this.validateConstantMemberExpression(t))}flattenMemberExpressionAndValidate(e){switch(e.type){case g.MemberExpression:return(!Me(e.property)||e.computed)&&this.validateExpression(e.property),[...this.flattenMemberExpressionAndValidate(e.object),e];default:return[]}}extractAndValidatePropertyName(e){switch(e.type){case g.Identifier:return e.name.toLowerCase();case g.Literal:return typeof e.value!="string"?(this.logDiagnostic(e.loc,{code:P.UnexpectedPropertyIdentifier}),null):e.value.toLowerCase();default:return this.logDiagnostic(e.loc,{code:P.UnexpectedPropertyIdentifier}),null}}validateConstantMemberExpression(e){let t=e[0];if(!Me(t.object))return!1;let n=t.object.name.toLowerCase(),i=this._apiDefinitions?.constantDefinitions.get(n);if(!i)return!1;if(i.type!=="namespace")return this.logDiagnostic(t.property.loc,{code:P.NotADictionary,data:{identifier:n}}),!0;let r=this.extractAndValidatePropertyName(t.property);if(!r)return!0;if(!i.members.some(s=>s.name.toLowerCase()===r)){let s=i.members.reduce((o,a)=>`${o}${o?" | ":""}${a.completion.label.split(".").pop()}`,"");this.logDiagnostic(t.property.loc,{code:P.InvalidConstantIdentifier,data:{list:s}})}return e.length>1&&this.logDiagnostic(e[1].property.loc,{code:P.UnexpectedPropertyIdentifier}),!0}validateMemberExpressionWithProfile(e){let t=e[0];if(t.object.type!==g.Identifier)return!1;let n=t.object.name.toLowerCase(),i=this._profileVariables.find(s=>s.name.toLowerCase()===n);if(!i)return!1;if(i1(i))return this.logDiagnostic(t.object.loc,{code:P.NotADictionary,data:{identifier:i.name}}),!0;if(this._identifierBeingAssigned===n)return this.logDiagnostic(t.loc,{code:P.ProfileVariablesAreImmutable}),!0;let r=i;for(let s=0;s<e.length;s++){if(e[s].computed)return!0;if(i1(r))return this.logDiagnostic(e[s-1]?.property.loc??e[s].object.loc,{code:P.NotADictionary,data:{identifier:r.name}}),!0;let o=this.extractAndValidatePropertyName(e[s].property);if(!o)return!0;if(r.properties.length===0)return this.logDiagnostic(e[s].property.loc,{code:P.UnknownPropertyIdentifier,data:{identifier:o},severity:ue.Warning}),!0;let a=r.properties.find(l=>l.name.toLowerCase()===o);if(!a){let l=r.properties.reduce((c,h)=>`${c}${c?" | ":""}${h.name.split(".").pop()}`,"");return this.logDiagnostic(e[s].property.loc,{code:P.InvalidPropertyIdentifier,data:{list:l}}),!0}r=a}return!0}recordVariableIdentifier(e,t){this.logReservedKeywordsConflict(e),this.logProfileOrApiConflict(e);let n=e.name.toLowerCase(),i=this.getIdentifierInfo(n),r=this._isInFunctionScope&&i?.scope==="function",s=!this._isInFunctionScope&&i?.scope==="script";(r||s)&&this.logDiagnostic(e.loc,{code:P.AlreadyDefined,data:{identifier:e.name},severity:ue.Warning});let o=t.inBlock??this._isInBlock,{initialized:a}=t;if(!i||this._isInFunctionScope&&i.scope!=="function"){let l=this._isInFunctionScope?"function":o?"block":"script";i={node:e,used:!1,initialized:a,scope:l}}else i.node=e,i.used=!1,i.initialized=a;return i.scope==="block"&&!o&&(i.scope="script",this.logDiagnostic(e.loc,{code:P.AlreadyDefined,data:{identifier:e.name},severity:ue.Warning})),this.setIdentiferInfo(n,i),!1}recordImportIdentifier(e){let t=e.specifiers[0].local;this.logProfileOrApiConflict(t);let n=t.name.toLowerCase(),i=this.getIdentifierInfo(n);i?.scope&&this.logDiagnostic(e.specifiers[0].local.loc,{code:P.AlreadyDefined,data:{identifier:e.specifiers[0].local.name},severity:ue.Warning}),i={node:e.specifiers[0].local,used:!1,...i,scope:"script",initialized:!0},this.setIdentiferInfo(n,i)}recordFunctionIdentifier(e){this.logProfileOrApiConflict(e.id);let t=e.id.name.toLowerCase(),n=this.getIdentifierInfo(t);n?.scope&&this.logDiagnostic(e.id.loc,{code:P.AlreadyDefined,data:{identifier:e.id.name},severity:ue.Warning}),n={node:e.id,used:!1,...n,scope:"script",initialized:!0},this.setIdentiferInfo(t,n)}recordParamAsIdentifier(e){return this.recordVariableIdentifier(e,{initialized:!0})}diagnoseIdentifiers(){(this._functionScopeIdentifiers??this._scriptScopeIdentifiers).forEach(e=>{e.used?e.initialized||this.logDiagnostic(e.node.loc,{code:P.DefinedNeverAssigned,data:{identifier:e.node.name},severity:ue.Warning}):this.logDiagnostic(e.node.loc,{code:e.initialized?P.AssignedNeverUsed:P.DefinedNeverUsed,data:{identifier:e.node.name},severity:ue.Warning})})}};function S0(e){return e.name==="ParsingError"}function Ut(e){return $r(e)||Re(e)&&!e.body.length}function N0(e,t){let{min:n,max:i}=e.overloads.reduce((r,s)=>{let{min:o,max:a}=s.parametersInfo;return r.min>=0&&(r.min=Math.min(o,r.min)),r.max>=0&&(r.max=a<0?a:Math.max(a,r.max)),r},{min:Number.POSITIVE_INFINITY,max:0});return t<n?n>0?{code:P.NotEnoughArguments,data:{min:n}}:{code:P.NoArgumentExpected}:i>=0&&t>i?{code:P.TooManyArguments,data:{max:i}}:null}var k0=/\B@\w+/gu;function I0(e=""){return Array.from(e.matchAll(k0),t=>t[0].slice(1))}var U1=class{constructor(){this.languageOptions={}}configure(e={}){this.languageOptions=e,this.apiService=new n0(this.languageOptions)}async doValidation(e,t){if(!this.apiService)return[];let n=await this.apiService.getApiDatabase(t),{profile:{variables:i=[]}={}}=t,{diagnostics:r}=new y0(n,i).validateScript(e.getText());return r}async doComplete(e,t,n){if(!this.apiService)return{isIncomplete:!1,items:[]};let i=await this.apiService.getApiDatabase(n);return d0(e,t,i,n)}async getApiLibrary(e){return this.apiService?(await this.apiService.getApiDatabase(e)).categories:[]}};var gi=class e{constructor(t,n,i,r){this._uri=t,this._languageId=n,this._version=i,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),i=this.offsetAt(t.end);return this._content.substring(n,i)}return this._content}update(t,n){for(let i of t)if(e.isIncremental(i)){let r=z1(i.range),s=this.offsetAt(r.start),o=this.offsetAt(r.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(o,this._content.length);let a=Math.max(r.start.line,0),l=Math.max(r.end.line,0),c=this._lineOffsets,h=V1(i.text,!1,s);if(l-a===h.length)for(let d=0,m=h.length;d<m;d++)c[d+a+1]=h[d];else h.length<1e4?c.splice(a+1,l-a,...h):this._lineOffsets=c=c.slice(0,a+1).concat(h,c.slice(l+1));let f=i.text.length-(o-s);if(f!==0)for(let d=a+1+h.length,m=c.length;d<m;d++)c[d]=c[d]+f}else if(e.isFull(i))this._content=i.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=V1(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),i=0,r=n.length;if(r===0)return{line:0,character:t};for(;i<r;){let o=Math.floor((i+r)/2);n[o]>t?r=o:i=o+1}let s=i-1;return{line:s,character:t-n[s]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let i=n[t.line],r=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(i+t.character,r),i)}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},pi;(function(e){function t(r,s,o,a){return new gi(r,s,o,a)}e.create=t;function n(r,s,o){if(r instanceof gi)return r.update(s,o),r;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function i(r,s){let o=r.getText(),a=Jr(s.map(B0),(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=0,c=[];for(let h of a){let f=r.offsetAt(h.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&c.push(o.substring(l,f)),h.newText.length&&c.push(h.newText),l=r.offsetAt(h.range.end)}return c.push(o.substr(l)),c.join("")}e.applyEdits=i})(pi||(pi={}));function Jr(e,t){if(e.length<=1)return e;let n=e.length/2|0,i=e.slice(0,n),r=e.slice(n);Jr(i,t),Jr(r,t);let s=0,o=0,a=0;for(;s<i.length&&o<r.length;)t(i[s],r[o])<=0?e[a++]=i[s++]:e[a++]=r[o++];for(;s<i.length;)e[a++]=i[s++];for(;o<r.length;)e[a++]=r[o++];return e}function V1(e,t,n=0){let i=t?[n]:[];for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);(s===13||s===10)&&(s===13&&r+1<e.length&&e.charCodeAt(r+1)===10&&r++,i.push(n+r+1))}return i}function z1(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function B0(e){let t=z1(e.range);return t!==e.range?{newText:e.newText,range:t}:e}globalThis.onmessage=()=>{Dr((e,t)=>new Qr(e,t))};var Qr=class{constructor(t,{languageId:n,languageOptions:i}){this._ctx=t;this._languageId=n,this._languageService=new U1,this._languageService.configure(i)}async doValidation(t,n){let i=this._getTextDocument(t);return i?await this._languageService.doValidation(i,n):await Promise.resolve([])}async doComplete(t,n,i){let r=this._getTextDocument(t);return r?await this._languageService.doComplete(r,n,i):await Promise.resolve({isIncomplete:!1,items:[]})}async doFormat(t,n){let i=this._getTextDocument(t);if(!i)return await Promise.resolve([]);let r=R1(i,n);return await Promise.resolve(r)}async getApiLibrary(t){return await this._languageService.getApiLibrary(t)}_getTextDocument(t){let n=this._ctx.getMirrorModels();for(let i of n)if(i.uri.toString()===t)return pi.create(t,this._languageId,i.version,i.getValue());return null}};})();
|
|
44
|
+
}`,insertTextMode:fe.adjustIndentation,insertTextFormat:he.Snippet}],c0=/\$\{(.*?)\}/gu;function ln(e,t){return t?e.replace(c0,(n,i)=>t[i].toString()):e}var Xr=/[-[\]/{}()*+?.\\^$|]/gu;function h0(e,t){return e.line>t.end.line}function f0(e,t){return e.line<t.start.line}function T1(e,t){return!(f0(e,t)||h0(e,t)||e.line===t.start.line&&e.column<t.start.column||e.line===t.end.line&&e.column>t.end.column)}var te={None:0,Keywords:1,All:255,NoKeywords:254},tt={identifiers:"a",profileVariables:"aa",constants:"ab",literals:"ab",functions:"ac",snippets:"b",keywords:"c"};function d0(e,t,n,i={}){let r=e.getText({start:{line:0,character:0},end:t}),{tokens:s,errors:o=[]}=vl(r,{loc:!0,tolerant:!0});if(o.length)return{isIncomplete:!1,items:[]};let a=s.at(s.length-1),l="",c=L0(t);a?.type==="Identifier"&&T1(c,a.loc)&&(l=a.value,s.pop(),a=s[s.length-1]);let h={variables:i.profile?.variables??[],additionalCompletionItems:(i.snippets??[]).map(f=>({kind:ee.Snippet,insertTextMode:fe.adjustIndentation,insertTextFormat:he.Snippet,...f})),apiDatabase:n};return a?.type==="Punctuator"&&a.value==="."?g0(s,l,h):m0(s,l,c,h)}function m0(e,t,n,i){let r=D0(e,n);if(r===te.None)return{isIncomplete:!1,items:[]};let s=A0(e),o=[],a=new RegExp(t.replaceAll(Xr,"\\$&"),"i");return s.forEach((l,c)=>{a.test(c)&&o.push({...l,sortText:tt.identifiers})}),i.variables.forEach(l=>{a.test(l.name)&&l.completion&&o.push({...l.completion,sortText:tt.profileVariables})}),b1(r)&&l0.forEach(l=>{l.label.startsWith(t)&&o.push({...l,sortText:tt.snippets})}),i.additionalCompletionItems.forEach(l=>{a.test(l.label)&&o.push({...l,sortText:tt.snippets})}),b1(r)&&u0.forEach(l=>{a.test(l.label)&&o.push({...l,sortText:tt.keywords})}),a0.forEach(l=>{a.test(l.label)&&o.push({...l,sortText:tt.literals})}),i.apiDatabase.constantDefinitions.forEach((l,c)=>{l.type==="constant"&&l.disableDocumentation===!0||!a.test(c)||o.push({...l.completion,sortText:tt.constants})}),i.apiDatabase.functionDefinitions.forEach((l,c)=>{a.test(c)&&l.overloads.forEach(h=>{h.disableDocumentation||o.push({...h.completion,sortText:tt.functions})})}),{isIncomplete:!1,items:o}}function g0(e,t,n){let i=[...e],r=i.pop(),s=r,o=[];for(;r&&!(r.type!=="Punctuator"||r.value!=="."||(r=i.pop(),r?.type!=="Identifier"));)o=[r.value.toLowerCase(),...o],r=i.pop();if(o.length===0||!s)return{isIncomplete:!1,items:[]};let a=p0(o,t,n);return a||(a=x0(o,t,s,n),a)?a:{isIncomplete:!1,items:[]}}function p0(e,t,n){if(e.length>1)return null;let i=n.apiDatabase.constantDefinitions.get(e[0]);if(!i)return null;if(i.type!=="namespace")return{isIncomplete:!1,items:[]};let r=[],s=new RegExp(t.replaceAll(Xr,"\\$&"),"i");return i.members.forEach(o=>{o.disableDocumentation===!0||!s.test(o.name)||r.push(o.completion)}),{isIncomplete:!1,items:r}}function x0(e,t,n,i){if(!i.variables.length||!e.length)return null;let r=e.shift(),s=i.variables;for(;r;){let c=s.find(h=>h.name.toLowerCase()===r);if(!fl(c))return null;s=c.properties??[],r=e.shift()}let o=[],a=new RegExp(t.replaceAll(Xr,"\\$&"),"i"),l=F0(n.loc.start);return s.forEach(c=>{a.test(c.name)&&c.completion&&o.push(w0(l,c.completion))}),{isIncomplete:!1,items:o}}function b1(e){return(e&te.Keywords)===te.Keywords}function D0(e,t){if(!e.length)return te.All;let n=e[e.length-1];switch(n.type){case"Identifier":return te.All;case"Keyword":return["return","in","else"].includes(n.value)?te.NoKeywords:te.None;case"Punctuator":return b0(e);case"Template":return n.value.endsWith("${")?te.NoKeywords:te.All;default:return T1(t,n.loc)?te.None:te.All}}function b0(e){let t=[...e],n=t.pop();if(!n)return te.All;if(n.type!=="Punctuator")return te.None;if(n.value!=="("&&n.value!==",")return te.All;if(n.value==="(")return C1(t);let i=0;for(n=t.pop();n;){if(n.type==="Keyword")return te.None;if(n.type!=="Punctuator"){n=t.pop();continue}if(n.value===")"||n.value==="]"){i-=1,n=t.pop();continue}if(n.value==="["){if(i===0)return te.NoKeywords;i+=1,n=t.pop();continue}if(n.value==="("){if(i===0)return C1(t);i+=1,n=t.pop();continue}n=t.pop()}return te.None}function C1(e){let t=[...e],n=t.pop();return n?n.type==="Keyword"?n.value.toLowerCase()==="for"?te.All:te.NoKeywords:n.type!=="Identifier"?te.All:(n=t.pop(),n?.type==="Keyword"&&n.value.toLowerCase()==="function"?te.None:te.NoKeywords):te.All}var C0=class{constructor(e){this.tokens=e,this.currentIndex=0}increment(){if(!(this.currentIndex>=this.tokens.length))return this.currentIndex+=1,this.tokens[this.currentIndex]}get next(){return this.tokens[this.currentIndex+1]}get previous(){return this.tokens[this.currentIndex-1]}get current(){return this.tokens[this.currentIndex]}},ai={parameterFormat:"(parameter) ${name}",variableFormat:"var ${name}",functionFormat:"function ${name} (${paramsDetail})"};function A0(e){let t=new Map;if(!e.length)return t;let n=new C0(e);for(;n.current;){if(n.current.type==="Keyword"){if(n.current.value.toLowerCase()==="var"){n.increment(),E0(n,t);continue}if(n.current.value.toLowerCase()==="function"){n.increment(),_0(n,t);continue}}n.increment()}return t}function E0(e,t){for(;e.current;){if(e.current.type!=="Identifier")return;let n=e.current.value,i=n.toLowerCase();t.set(i,{label:n,kind:ee.Variable,detail:ln(ai.variableFormat,{name:n})});let r=e.increment();if(r?.type!=="Punctuator")return;if(r.value===","){e.increment();continue}if(r.value==="="){e.increment(),v0(e);continue}}}function _0(e,t){for(;e.current;){if(e.current.type!=="Identifier")return;let n=e.current.value,i=n.toLowerCase(),r={label:n,kind:ee.Function,detail:ln(ai.functionFormat,{name:n,paramsDetail:""}),insertText:`${n}()`,insertTextMode:fe.adjustIndentation,insertTextFormat:he.Snippet};t.set(i,r);let s=e.increment();if(!ht(s,"("))return;s=e.increment();let o=[];for(;s&&!(s.type!=="Identifier"||(o.push(s.value),s=e.increment(),!ht(s,",")));)s=e.increment();if(o.length){r.detail=ln(ai.functionFormat,{name:r.label,paramsDetail:o.join(", ")});let c=o.map((h,f)=>`\${${f+1}:${h}}`).join(", ");r.insertText=`${r.label}(${c})`}if(!ht(s,")")||(s=e.increment(),!ht(s,"{")))return;s=e.increment();let a=e.currentIndex,l=1;for(;s&&l>0;)ht(s,"{")?l+=1:ht(s,"}")&&(l-=1),s=e.increment();if(l===0)return;e.currentIndex=a,o.forEach(c=>{let h=c.toLowerCase();t.set(h,{label:c,kind:ee.Variable,detail:ln(ai.parameterFormat,{name:c})})})}}function ht(e,t){return e?.type==="Punctuator"&&e.value===t}function v0(e){let t=0;for(;e.current;){if(e.current.type==="Keyword"){if(ht(e.previous,".")){e.increment();continue}return}if(e.current.type==="Punctuator"&&e.current.value===";")return;if(e.current.type==="Template"&&e.current.value.startsWith("`")){t+=1,e.increment();continue}if(e.current.type==="Punctuator"&&["(","[","{"].includes(e.current.value)){t+=1,e.increment();continue}if(e.current.type==="Template"&&e.current.value.endsWith("`")){t-=1,e.increment();continue}if(e.current.type==="Punctuator"&&[")","]","}"].includes(e.current.value)){t-=1,e.increment();continue}if(!t&&e.current.type==="Punctuator"&&e.current.value===","){e.increment();return}e.increment()}}function w0(e,t){return t.insertText&&t.insertText.startsWith("[")&&(t.additionalTextEdits=[{newText:"",range:{start:{...e},end:{line:e.line,character:e.character+1}}}]),t}function L0(e){return{line:e.line+1,column:e.character}}function F0(e){return{line:e.line-1,character:e.column}}var y0=class{constructor(e,t=[]){this._apiDefinitions=e,this._profileVariables=t,this._isInBlock=!1,this._isInCallExpression=!1,this._identifierBeingAssigned=void 0,this._assignmentValidationMode="disabled",this._scriptScopeIdentifiers=new Map,this._diagnostics=[],this._undeclaredIdentifiersInFunctions=new Map,this.handleException=n=>{if(S0(n)){let{range:i,code:r,data:s}=n;this.logDiagnostic(i,{code:r,data:s})}else this.logDiagnostic({start:{line:1,column:0},end:{line:1,column:0}},{code:P.ExecutionError,data:{stack:n.stack??""}})},this.validateStatement=n=>{if(n)switch(n.type){case g.BlockStatement:n.body.forEach(this.validateStatement);return;case g.VariableDeclaration:n.declarations.forEach(i=>this.validateVariableDeclarator(i));return;case g.FunctionDeclaration:this.validateFunctionDeclaration(n);return;case g.ExportNamedDeclaration:this.validateExportDeclaration(n);return;case g.ImportDeclaration:this.validateImportDeclaration(n);return;case g.WhileStatement:this.validateWhileStatement(n);return;case g.ForStatement:this.validateForStatement(n);return;case g.ForInStatement:this.validateForInStatement(n);return;case g.IfStatement:this.validateIfStatement(n);return;case g.ReturnStatement:this.validateExpression(n.argument);return;case g.ExpressionStatement:this.validateExpression(n.expression);return;case g.BreakStatement:case g.ContinueStatement:case g.EmptyStatement:return}},this.validateExpression=n=>{if(n)switch(n.type){case g.AssignmentExpression:this.validateAssignmentExpression(n);return;case g.CallExpression:this.validateCallExpression(n);return;case g.Identifier:this.validateIdentifier(n);return;case g.Literal:this.validateLiteral(n);return;case g.ArrayExpression:n.elements.forEach(this.validateExpression);return;case g.ObjectExpression:this.validateObjectExpression(n);return;case g.UnaryExpression:this.validateUnaryExpression(n);return;case g.UpdateExpression:this.validateUpdateExpression(n);return;case g.BinaryExpression:case g.LogicalExpression:this.validateBinaryAndLogicalExpression(n);return;case g.MemberExpression:this.validateMemberExpression(n);return;case g.TemplateLiteral:n.expressions.forEach(this.validateExpression);return;default:return}}}validateScript(e){if(!e)return{diagnostics:[],program:null};this._isInBlock=!1,this._identifierBeingAssigned=void 0,this._assignmentValidationMode="disabled",this._diagnostics=[],this._scriptScopeIdentifiers.clear(),this._undeclaredIdentifiersInFunctions.clear(),this._functionScopeIdentifiers=void 0;let t=null;try{t=k1(e,{tolerant:!0}),this.handleErrors(t.errors),t.body.forEach(this.validateStatement),this.diagnoseIdentifiers(),this._undeclaredIdentifiersInFunctions.size>0&&this._undeclaredIdentifiersInFunctions.forEach(n=>{for(let i of n)this.logDiagnostic(i.node.loc,{code:P.NotDefined,data:{identifier:i.node.name}})})}catch(n){this.handleException(n)}return{diagnostics:this._diagnostics,program:t}}disableRecordIdentifierAssignment(e,t){let n=this._assignmentValidationMode;this._assignmentValidationMode="disabled",e.call(this,t),this._assignmentValidationMode=n}inBlock(e,t){let n=this._isInBlock;this._isInBlock=!0,e.call(this,t),this._isInBlock=n}get _isInFunctionScope(){return!!this._functionScopeIdentifiers}inFunctionScope(e){this._functionScopeIdentifiers=new Map,e.call(this),this.diagnoseIdentifiers(),this._functionScopeIdentifiers=void 0}logDiagnostic(e,t){let n={severity:ue.Error,...t,message:ln(wl[t.code],t.data),range:{start:{line:e.start.line-1,character:e.start.column},end:{line:e.end.line-1,character:e.end.column}}};this._diagnostics.push(n)}handleErrors(e){(e??[]).forEach(this.handleException)}getIdentifierInfo(e){return this._functionScopeIdentifiers?.get(e)??this._scriptScopeIdentifiers.get(e)}setIdentiferInfo(e,t){if(this._functionScopeIdentifiers){this._functionScopeIdentifiers.set(e,t);return}this._scriptScopeIdentifiers.set(e,t),this._undeclaredIdentifiersInFunctions.has(e)&&(this._undeclaredIdentifiersInFunctions.delete(e),t.used=!0)}isProfileVariable(e){return this._profileVariables.some(t=>t.name.toLowerCase()===e)}isApiConstant(e){return!!this._apiDefinitions?.constantDefinitions.get(e)}isApiFunction(e){return!!this._apiDefinitions?.functionDefinitions.get(e)}isApiItem(e){return this.isApiConstant(e)||this.isApiFunction(e)}validateVariableDeclarator(e){this.validateExpression(e.init),this.recordVariableIdentifier(e.id,{initialized:!!e.init})}validateFunctionDeclaration(e){this.recordFunctionIdentifier(e),this.inFunctionScope(()=>{e.params.forEach(t=>this.recordParamAsIdentifier(t)),Ut(e.body)&&this.logDiagnostic(e.body.loc,{code:P.UnexpectedEmptyFunction,data:{identifier:e.id.name},severity:ue.Warning}),this.validateStatement(e.body)})}validateExportDeclaration(e){this.validateStatement(e.declaration)}validateImportDeclaration(e){this.recordImportIdentifier(e)}validateForStatement(e){ci(e.init)?this.inBlock(this.validateStatement,e.init):this.validateExpression(e.init),this.validateExpression(e.update),this.validateExpression(e.test),Ut(e.body)&&this.logDiagnostic(e.body.loc,{code:P.EmptyBlockStatement,severity:ue.Warning}),this.inBlock(this.validateStatement,e.body)}validateWhileStatement(e){this.validateExpression(e.test),Ut(e.body)&&this.logDiagnostic(e.body.loc,{code:P.EmptyBlockStatement,severity:ue.Warning}),this.inBlock(this.validateStatement,e.body)}validateForInStatement(e){Me(e.left)?this.validateExpression(e.left):this.recordVariableIdentifier(e.left.declarations[0].id,{initialized:!0,inBlock:!0}),this.validateExpression(e.right),Ut(e.body)&&this.logDiagnostic(e.body.loc,{code:P.EmptyBlockStatement,severity:ue.Warning}),this.validateStatement(e.body)}validateIfStatement(e){this.validateExpression(e.test),Ut(e.consequent)&&this.logDiagnostic(e.consequent.loc,{code:P.EmptyBlockStatement,severity:ue.Warning}),e.alternate&&Ut(e.alternate)&&this.logDiagnostic(e.alternate.loc,{code:P.EmptyBlockStatement,severity:ue.Warning}),this.inBlock(this.validateStatement,e.consequent),this.inBlock(this.validateStatement,e.alternate)}validateAssignmentExpression(e){let t=this._identifierBeingAssigned,n=this._assignmentValidationMode;Me(e.left)&&(this._identifierBeingAssigned=e.left.name.toLowerCase(),this._assignmentValidationMode="left"),this.validateExpression(e.left),Me(e.left)&&(this._assignmentValidationMode="right"),this.validateExpression(e.right),this._identifierBeingAssigned=t,this._assignmentValidationMode=n}validateCallExpression(e){let t=this._isInCallExpression;if(this._isInCallExpression=!0,this.validateExpression(e.callee),Me(e.callee)){let n=e.callee.name.toLowerCase(),i=this.getIdentifierInfo(n),r=this._apiDefinitions?.functionDefinitions.get(n);if(!i&&r){let s=N0(r,e.arguments.length);s&&this.logDiagnostic(e.loc,s)}}e.arguments.forEach(this.validateExpression),this._isInCallExpression=t}validateIdentifier(e){let t=e.name.toLowerCase(),n=this.getIdentifierInfo(t);if(n){if(this._assignmentValidationMode==="left"&&this._identifierBeingAssigned===t){n.initialized=!0;return}if(this._assignmentValidationMode==="right"&&this._identifierBeingAssigned===t)return;n.used=!0;return}if(!(this.isProfileVariable(t)||this.isApiConstant(t))){if(this.isApiFunction(t)){if(this._isInCallExpression)return;this.logDiagnostic(e.loc,{code:P.InvalidApiFunctionUsage,data:{identifier:e.name}});return}if(this._isInFunctionScope){let i=this._undeclaredIdentifiersInFunctions.get(t);i||(i=[],this._undeclaredIdentifiersInFunctions.set(t,i)),i.push({node:e,identifier:t});return}this.logDiagnostic(e.loc,{code:P.NotDefined,data:{identifier:e.name}})}}validateLiteral(e){I0(e.raw).forEach(t=>{let n=this.getIdentifierInfo(t.toLowerCase());n&&(n.used=!0)})}logProfileOrApiConflict(e){let t=e.name.toLowerCase(),n=this.isProfileVariable(t),i=this.isApiItem(t);!n&&!i||this.logDiagnostic(e.loc,{code:n?P.ProfileVariablesConflict:P.ApiConflict,severity:ue.Warning,data:{identifier:e.name}})}logReservedKeywordsConflict(e){let t=e.name.toLowerCase();Zl.includes(t)&&this.logDiagnostic(e.loc,{code:P.ReservedKeyword,severity:ue.Warning,data:{identifier:e.name}})}validateObjectExpression(e){e.properties.forEach(t=>{this.validateExpression(t.value)})}validateUnaryExpression(e){this.validateExpression(e.argument)}validateUpdateExpression(e){this.validateExpression(e.argument)}validateBinaryAndLogicalExpression(e){this.validateExpression(e.left),this.validateExpression(e.right)}validateMemberExpression(e){let t=this.flattenMemberExpressionAndValidate(e),n=t[0].object;this.disableRecordIdentifierAssignment(this.validateExpression,n),Me(n)&&(this.getIdentifierInfo(n.name.toLowerCase())||this.validateMemberExpressionWithProfile(t)||this.validateConstantMemberExpression(t))}flattenMemberExpressionAndValidate(e){switch(e.type){case g.MemberExpression:return(!Me(e.property)||e.computed)&&this.validateExpression(e.property),[...this.flattenMemberExpressionAndValidate(e.object),e];default:return[]}}extractAndValidatePropertyName(e){switch(e.type){case g.Identifier:return e.name.toLowerCase();case g.Literal:return typeof e.value!="string"?(this.logDiagnostic(e.loc,{code:P.UnexpectedPropertyIdentifier}),null):e.value.toLowerCase();default:return this.logDiagnostic(e.loc,{code:P.UnexpectedPropertyIdentifier}),null}}validateConstantMemberExpression(e){let t=e[0];if(!Me(t.object))return!1;let n=t.object.name.toLowerCase(),i=this._apiDefinitions?.constantDefinitions.get(n);if(!i)return!1;if(i.type!=="namespace")return this.logDiagnostic(t.property.loc,{code:P.NotADictionary,data:{identifier:n}}),!0;let r=this.extractAndValidatePropertyName(t.property);if(!r)return!0;if(!i.members.some(s=>s.name.toLowerCase()===r)){let s=i.members.reduce((o,a)=>`${o}${o?" | ":""}${a.completion.label.split(".").pop()}`,"");this.logDiagnostic(t.property.loc,{code:P.InvalidConstantIdentifier,data:{list:s}})}return e.length>1&&this.logDiagnostic(e[1].property.loc,{code:P.UnexpectedPropertyIdentifier}),!0}validateMemberExpressionWithProfile(e){let t=e[0];if(t.object.type!==g.Identifier)return!1;let n=t.object.name.toLowerCase(),i=this._profileVariables.find(s=>s.name.toLowerCase()===n);if(!i)return!1;if(i1(i))return this.logDiagnostic(t.object.loc,{code:P.NotADictionary,data:{identifier:i.name}}),!0;if(this._identifierBeingAssigned===n)return this.logDiagnostic(t.loc,{code:P.ProfileVariablesAreImmutable}),!0;let r=i;for(let s=0;s<e.length;s++){if(e[s].computed)return!0;if(i1(r))return this.logDiagnostic(e[s-1]?.property.loc??e[s].object.loc,{code:P.NotADictionary,data:{identifier:r.name}}),!0;let o=this.extractAndValidatePropertyName(e[s].property);if(!o)return!0;if(!r.properties||r.properties.length===0)return this.logDiagnostic(e[s].property.loc,{code:P.UnknownPropertyIdentifier,data:{identifier:o},severity:ue.Warning}),!0;let a=r.properties.find(l=>l.name.toLowerCase()===o);if(!a){let l=r.properties.reduce((c,h)=>`${c}${c?" | ":""}${h.name.split(".").pop()}`,"");return this.logDiagnostic(e[s].property.loc,{code:P.InvalidPropertyIdentifier,data:{list:l}}),!0}r=a}return!0}recordVariableIdentifier(e,t){this.logReservedKeywordsConflict(e),this.logProfileOrApiConflict(e);let n=e.name.toLowerCase(),i=this.getIdentifierInfo(n),r=this._isInFunctionScope&&i?.scope==="function",s=!this._isInFunctionScope&&i?.scope==="script";(r||s)&&this.logDiagnostic(e.loc,{code:P.AlreadyDefined,data:{identifier:e.name},severity:ue.Warning});let o=t.inBlock??this._isInBlock,{initialized:a}=t;if(!i||this._isInFunctionScope&&i.scope!=="function"){let l=this._isInFunctionScope?"function":o?"block":"script";i={node:e,used:!1,initialized:a,scope:l}}else i.node=e,i.used=!1,i.initialized=a;return i.scope==="block"&&!o&&(i.scope="script",this.logDiagnostic(e.loc,{code:P.AlreadyDefined,data:{identifier:e.name},severity:ue.Warning})),this.setIdentiferInfo(n,i),!1}recordImportIdentifier(e){let t=e.specifiers[0].local;this.logProfileOrApiConflict(t);let n=t.name.toLowerCase(),i=this.getIdentifierInfo(n);i?.scope&&this.logDiagnostic(e.specifiers[0].local.loc,{code:P.AlreadyDefined,data:{identifier:e.specifiers[0].local.name},severity:ue.Warning}),i={node:e.specifiers[0].local,used:!1,...i,scope:"script",initialized:!0},this.setIdentiferInfo(n,i)}recordFunctionIdentifier(e){this.logProfileOrApiConflict(e.id);let t=e.id.name.toLowerCase(),n=this.getIdentifierInfo(t);n?.scope&&this.logDiagnostic(e.id.loc,{code:P.AlreadyDefined,data:{identifier:e.id.name},severity:ue.Warning}),n={node:e.id,used:!1,...n,scope:"script",initialized:!0},this.setIdentiferInfo(t,n)}recordParamAsIdentifier(e){return this.recordVariableIdentifier(e,{initialized:!0})}diagnoseIdentifiers(){(this._functionScopeIdentifiers??this._scriptScopeIdentifiers).forEach(e=>{e.used?e.initialized||this.logDiagnostic(e.node.loc,{code:P.DefinedNeverAssigned,data:{identifier:e.node.name},severity:ue.Warning}):this.logDiagnostic(e.node.loc,{code:e.initialized?P.AssignedNeverUsed:P.DefinedNeverUsed,data:{identifier:e.node.name},severity:ue.Warning})})}};function S0(e){return e.name==="ParsingError"}function Ut(e){return $r(e)||Re(e)&&!e.body.length}function N0(e,t){let{min:n,max:i}=e.overloads.reduce((r,s)=>{let{min:o,max:a}=s.parametersInfo;return r.min>=0&&(r.min=Math.min(o,r.min)),r.max>=0&&(r.max=a<0?a:Math.max(a,r.max)),r},{min:Number.POSITIVE_INFINITY,max:0});return t<n?n>0?{code:P.NotEnoughArguments,data:{min:n}}:{code:P.NoArgumentExpected}:i>=0&&t>i?{code:P.TooManyArguments,data:{max:i}}:null}var k0=/\B@\w+/gu;function I0(e=""){return Array.from(e.matchAll(k0),t=>t[0].slice(1))}var U1=class{constructor(){this.languageOptions={}}configure(e={}){this.languageOptions=e,this.apiService=new n0(this.languageOptions)}async doValidation(e,t){if(!this.apiService)return[];let n=await this.apiService.getApiDatabase(t),{profile:{variables:i=[]}={}}=t,{diagnostics:r}=new y0(n,i).validateScript(e.getText());return r}async doComplete(e,t,n){if(!this.apiService)return{isIncomplete:!1,items:[]};let i=await this.apiService.getApiDatabase(n);return d0(e,t,i,n)}async getApiLibrary(e){return this.apiService?(await this.apiService.getApiDatabase(e)).categories:[]}};var gi=class e{constructor(t,n,i,r){this._uri=t,this._languageId=n,this._version=i,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),i=this.offsetAt(t.end);return this._content.substring(n,i)}return this._content}update(t,n){for(let i of t)if(e.isIncremental(i)){let r=z1(i.range),s=this.offsetAt(r.start),o=this.offsetAt(r.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(o,this._content.length);let a=Math.max(r.start.line,0),l=Math.max(r.end.line,0),c=this._lineOffsets,h=V1(i.text,!1,s);if(l-a===h.length)for(let d=0,m=h.length;d<m;d++)c[d+a+1]=h[d];else h.length<1e4?c.splice(a+1,l-a,...h):this._lineOffsets=c=c.slice(0,a+1).concat(h,c.slice(l+1));let f=i.text.length-(o-s);if(f!==0)for(let d=a+1+h.length,m=c.length;d<m;d++)c[d]=c[d]+f}else if(e.isFull(i))this._content=i.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=V1(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),i=0,r=n.length;if(r===0)return{line:0,character:t};for(;i<r;){let o=Math.floor((i+r)/2);n[o]>t?r=o:i=o+1}let s=i-1;return{line:s,character:t-n[s]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let i=n[t.line],r=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(i+t.character,r),i)}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},pi;(function(e){function t(r,s,o,a){return new gi(r,s,o,a)}e.create=t;function n(r,s,o){if(r instanceof gi)return r.update(s,o),r;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function i(r,s){let o=r.getText(),a=Jr(s.map(B0),(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=0,c=[];for(let h of a){let f=r.offsetAt(h.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&c.push(o.substring(l,f)),h.newText.length&&c.push(h.newText),l=r.offsetAt(h.range.end)}return c.push(o.substr(l)),c.join("")}e.applyEdits=i})(pi||(pi={}));function Jr(e,t){if(e.length<=1)return e;let n=e.length/2|0,i=e.slice(0,n),r=e.slice(n);Jr(i,t),Jr(r,t);let s=0,o=0,a=0;for(;s<i.length&&o<r.length;)t(i[s],r[o])<=0?e[a++]=i[s++]:e[a++]=r[o++];for(;s<i.length;)e[a++]=i[s++];for(;o<r.length;)e[a++]=r[o++];return e}function V1(e,t,n=0){let i=t?[n]:[];for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);(s===13||s===10)&&(s===13&&r+1<e.length&&e.charCodeAt(r+1)===10&&r++,i.push(n+r+1))}return i}function z1(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function B0(e){let t=z1(e.range);return t!==e.range?{newText:e.newText,range:t}:e}globalThis.onmessage=()=>{Dr((e,t)=>new Qr(e,t))};var Qr=class{constructor(t,{languageId:n,languageOptions:i}){this._ctx=t;this._languageId=n,this._languageService=new U1,this._languageService.configure(i)}async doValidation(t,n){let i=this._getTextDocument(t);return i?await this._languageService.doValidation(i,n):await Promise.resolve([])}async doComplete(t,n,i){let r=this._getTextDocument(t);return r?await this._languageService.doComplete(r,n,i):await Promise.resolve({isIncomplete:!1,items:[]})}async doFormat(t,n){let i=this._getTextDocument(t);if(!i)return await Promise.resolve([]);let r=R1(i,n);return await Promise.resolve(r)}async getApiLibrary(t){return await this._languageService.getApiLibrary(t)}_getTextDocument(t){let n=this._ctx.getMirrorModels();for(let i of n)if(i.uri.toString()===t)return pi.create(t,this._languageId,i.version,i.getValue());return null}};})();
|
|
@@ -1,6 +1,6 @@
|
|
|
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.
|
|
4
|
+
* v4.30.0-next.62
|
|
5
5
|
*/
|
|
6
|
-
export{a as arcade}from"./p-
|
|
6
|
+
export{a as arcade}from"./p-4823505e.js";import"./p-981cd353.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
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.
|
|
4
|
+
* v4.30.0-next.62
|
|
5
5
|
*/
|
|
6
|
-
import{B as e}from"./p-
|
|
6
|
+
import{B as e}from"./p-4823505e.js";import"./p-981cd353.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|