@arcgis/coding-components 4.31.0-next.21 → 4.31.0-next.23
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/code-editor/sql-expr.worker.js +433 -22
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/p-08b8fd1f.js +6 -0
- package/dist/arcgis-coding-components/{p-cdc52d2f.js → p-1402a8f3.js} +1 -1
- package/dist/arcgis-coding-components/{p-8eb7e694.js → p-1635ee06.js} +2 -2
- package/dist/arcgis-coding-components/{p-57b8bcd7.js → p-1d45a6dd.js} +1 -1
- package/dist/arcgis-coding-components/{p-5b67b62b.js → p-22c2d840.js} +2 -2
- package/dist/arcgis-coding-components/{p-cbee273f.js → p-2cfa8f19.js} +2 -2
- package/dist/arcgis-coding-components/{p-ffce0588.entry.js → p-3f1b5f73.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-a2341e0c.js → p-50e53c02.js} +2 -2
- package/dist/arcgis-coding-components/{p-1b799777.js → p-5872baf9.js} +2 -2
- package/dist/arcgis-coding-components/{p-d7d1f130.js → p-776d550d.js} +9 -9
- package/dist/arcgis-coding-components/{p-4d5cf512.entry.js → p-9c58968d.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-b715834b.js → p-9c7cef40.js} +2 -2
- package/dist/arcgis-coding-components/{p-6621a80f.js → p-9e1c9066.js} +2 -2
- package/dist/arcgis-coding-components/{p-56266a64.js → p-9edc9c4b.js} +2 -2
- package/dist/arcgis-coding-components/{p-64137fec.js → p-a444264e.js} +2 -2
- package/dist/arcgis-coding-components/{p-e5a924a1.js → p-b4912aa0.js} +1 -1
- package/dist/arcgis-coding-components/{p-f2d64a9d.js → p-c4521d1d.js} +2 -2
- package/dist/arcgis-coding-components/{p-e1f9b463.entry.js → p-d99efb76.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-ff62d134.js → p-f18cfc50.js} +2 -2
- package/dist/cjs/{app-globals-a9ef3ca8.js → app-globals-b0c856f6.js} +1 -1
- package/dist/cjs/{arcade-defaults-f5241680.js → arcade-defaults-25d38bc0.js} +4 -4
- package/dist/cjs/{arcade-language-features-0b9f3947.js → arcade-language-features-0422f79b.js} +2 -2
- package/dist/cjs/{arcade-mode-cc08d9cd.js → arcade-mode-151f7044.js} +3 -3
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +5 -5
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-bb6a49ec.js → css-c3bfee00.js} +1 -1
- package/dist/cjs/{cssMode-e7fac7d7.js → cssMode-c7d6c64b.js} +2 -2
- package/dist/cjs/{html-7ff4071d.js → html-3ff5bd3b.js} +2 -2
- package/dist/cjs/{htmlMode-c89193ec.js → htmlMode-71714c3e.js} +2 -2
- package/dist/cjs/{index-4b7880ab.js → index-d386d3e2.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-864c0220.js → javascript-d1a20c9f.js} +3 -3
- package/dist/cjs/{jsonMode-ac4a7be7.js → jsonMode-2b25e5f4.js} +2 -2
- package/dist/cjs/{language-defaults-base-57b37f9f.js → language-defaults-base-fe1d850e.js} +29 -9
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{sql-expr-defaults-245b036d.js → sql-expr-defaults-0acd5dfe.js} +4 -4
- package/dist/cjs/sql-expr-mode-bc156416.js +1825 -0
- package/dist/cjs/{tsMode-d30d4ab1.js → tsMode-9cfe75b9.js} +2 -2
- package/dist/cjs/{typescript-6c87ddb3.js → typescript-fc9b2e83.js} +2 -2
- package/dist/components/arcade-defaults.js +1 -1
- package/dist/components/arcade-language-features.js +1 -1
- 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-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/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +1 -1
- package/dist/components/arcgis-sql-expression-fields.js +1 -1
- package/dist/components/chunk-2JTWBRMN.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/fields.js +20 -2
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/language-api-panel.js +1 -1
- package/dist/components/language-defaults-base.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +1 -1
- package/dist/components/sql-expr-mode.js +33 -19051
- package/dist/components/sql-expression-fields.js +1 -1
- package/dist/components/useT9n.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-6d0ca11d.js → app-globals-1d6b10d3.js} +1 -1
- package/dist/esm/{arcade-defaults-066445c4.js → arcade-defaults-059a08f1.js} +4 -4
- package/dist/esm/{arcade-language-features-0e00c199.js → arcade-language-features-749f495a.js} +2 -2
- package/dist/esm/{arcade-mode-abf1e1cf.js → arcade-mode-5e2da07e.js} +3 -3
- package/dist/esm/arcgis-arcade-editor_6.entry.js +5 -5
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-c6dae12d.js → css-0fa06f45.js} +1 -1
- package/dist/esm/{cssMode-052bb603.js → cssMode-7d51359f.js} +2 -2
- package/dist/esm/{html-572696a1.js → html-900c5e2a.js} +2 -2
- package/dist/esm/{htmlMode-fc184f2d.js → htmlMode-aaba1915.js} +2 -2
- package/dist/esm/{index-0edd9846.js → index-51f840b4.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-8bfc0096.js → javascript-4a0ddd5a.js} +3 -3
- package/dist/esm/{jsonMode-7adf94ff.js → jsonMode-bcfe66f5.js} +2 -2
- package/dist/esm/{language-defaults-base-85a7f476.js → language-defaults-base-5cb37b1e.js} +28 -10
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{sql-expr-defaults-be84ec7f.js → sql-expr-defaults-f1fd7291.js} +4 -4
- package/dist/esm/sql-expr-mode-0f087c3e.js +1821 -0
- package/dist/esm/{tsMode-d10773c8.js → tsMode-6deb8933.js} +2 -2
- package/dist/esm/{typescript-9491f23e.js → typescript-11a558e0.js} +2 -2
- 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/sql-expr-monaco/sql-expr-completion.d.ts +1 -1
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation-utils.d.ts +7 -8
- package/dist/types/utils/sql-expr-monaco/sql-expr-validation.d.ts +2 -3
- package/dist/types/utils/sql-expr-monaco/types.d.ts +2 -6
- package/package.json +13 -14
- package/dist/arcgis-coding-components/p-77dd5521.js +0 -6
- package/dist/cjs/sql-expr-mode-304f5ce2.js +0 -20844
- package/dist/esm/sql-expr-mode-a4413e5c.js +0 -20840
- package/dist/types/utils/sql-expr-monaco/DependentFiles/DateOnly.d.ts +0 -41
- package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlInterval.d.ts +0 -16
- package/dist/types/utils/sql-expr-monaco/DependentFiles/SqlTimestampOffset.d.ts +0 -26
- package/dist/types/utils/sql-expr-monaco/DependentFiles/TimeOnly.d.ts +0 -37
- package/dist/types/utils/sql-expr-monaco/DependentFiles/UnknownTimeZone.d.ts +0 -11
- package/dist/types/utils/sql-expr-monaco/DependentFiles/WhereGrammar.d.ts +0 -122
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlCompareUtils.d.ts +0 -5
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlDateParsingUtils.d.ts +0 -18
- package/dist/types/utils/sql-expr-monaco/DependentFiles/sqlUtils.d.ts +0 -6
- package/dist/types/utils/sql-expr-monaco/DependentFiles/standardizedFunctions.d.ts +0 -156
- package/dist/types/utils/sql-expr-monaco/DependentFiles/support.d.ts +0 -150
- package/dist/types/utils/sql-expr-monaco/PeggyGrammar/sql92grammar.d.ts +0 -1397
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.23
|
|
5
5
|
*/
|
|
6
|
-
export{a as arcade}from"./p-
|
|
6
|
+
export{a as arcade}from"./p-1635ee06.js";import"./p-776d550d.js";import"./p-1d45a6dd.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
+
* v4.31.0-next.23
|
|
5
|
+
*/
|
|
6
|
+
import{g as E,T,V as e,z as t,m as R,Q as n,O as N}from"./p-776d550d.js";import{b as A,s as I}from"./p-c4521d1d.js";import{t as s}from"./p-50e53c02.js";import"./p-1d45a6dd.js";class i{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}async _getClientProxy(){if(!this._client){const{languageId:T,languageOptions:e}=this._defaults;this._worker=E.createWebWorker({moduleId:"SqlExprWorker",label:T,createData:{languageId:T,languageOptions:e}}),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...E){const T=await this._getClientProxy();return await(this._worker?.withSyncedResources(E)),T}}const S={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},o={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT","ABSOLUTE","ACTION","ADA","ADD","AFTER","ALL","ALLOCATE","ALTER","ALWAYS","ANALYZE","AND","ANY","ARE","AS","ASC","ASSERTION","AT","ATTACH","AUTHORIZATION","AUTOINCREMENT","AVG","BACKUP","BEFORE","BEGIN","BETWEEN","BIT","BIT_LENGTH","BOTH","BREAK","BROWSE","BULK","BY","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLLATION","COLUMN","COMMIT","COMPUTE","CONFLICT","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATE","DAY","DBCC","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DETACH","DIAGNOSTICS","DISCONNECT","DISK","DISTINCT","DISTRIBUTED","DO","DOMAIN","DOUBLE","DROP","DUMP","EACH","ELSE","END","END-EXEC","ERRLVL","ESCAPE","EXCEPT","EXCEPTION","EXCLUDE","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTERNAL","EXTRACT","FAIL","FALSE","FETCH","FILE","FILLFACTOR","FILTER","FIRST","FLOAT","FOLLOWING","FOR","FOREIGN","FORTRAN","FOUND","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GENERATED","GET","GLOB","GLOBAL","GO","GOTO","GRANT","GROUP","GROUPS","HAVING","HOLDLOCK","HOUR","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IGNORE","IMMEDIATE","IN","INCLUDE","INDEX","INDEXED","INDICATOR","INITIALLY","INNER","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","ISNULL","ISOLATION","JOIN","KEY","KILL","LANGUAGE","LAST","LEADING","LEFT","LEVEL","LIKE","LIMIT","LINENO","LOAD","LOCAL","LOWER","MATCH","MATERIALIZED","MAX","MERGE","MIN","MINUTE","MODULE","MONTH","NAMES","NATIONAL","NATURAL","NCHAR","NEXT","NO","NOCHECK","NONCLUSTERED","NONE","NOT","NOTHING","NOTNULL","NULL","NULLIF","NULLS","NUMERIC","OCTET_LENGTH","OF","OFF","OFFSET","OFFSETS","ON","ONLY","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OTHERS","OUTER","OUTPUT","OVER","OVERLAPS","PAD","PARTIAL","PARTITION","PASCAL","PERCENT","PIVOT","PLAN","POSITION","PRAGMA","PRECEDING","PRECISION","PREPARE","PRESERVE","PRIMARY","PRINT","PRIOR","PRIVILEGES","PROC","PROCEDURE","PUBLIC","QUERY","RAISE","RAISERROR","RANGE","READ","READTEXT","REAL","RECONFIGURE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELATIVE","RELEASE","RENAME","REPLACE","REPLICATION","RESTORE","RESTRICT","RETURN","RETURNING","REVERT","REVOKE","RIGHT","ROLLBACK","ROW","ROWCOUNT","ROWGUIDCOL","ROWS","RULE","SAVE","SAVEPOINT","SCHEMA","SCROLL","SECOND","SECTION","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION","SESSION_USER","SET","SETUSER","SHUTDOWN","SIZE","SMALLINT","SOME","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","STATISTICS","SUBSTRING","SUM","SYSTEM_USER","TABLE","TABLESAMPLE","TEMP","TEMPORARY","TEXTSIZE","THEN","TIES","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TOP","TRAILING","TRAN","TRANSACTION","TRANSLATE","TRANSLATION","TRIGGER","TRIM","TRUE","TRUNCATE","TRY_CONVERT","TSEQUAL","UNBOUNDED","UNION","UNIQUE","UNKNOWN","UNPIVOT","UPDATE","UPDATETEXT","UPPER","USAGE","USE","USER","USING","VACUUM","VALUE","VALUES","VARCHAR","VARYING","VIEW","VIRTUAL","WAITFOR","WHEN","WHENEVER","WHERE","WHILE","WINDOW","WITH","WITHIN GROUP","WITHOUT","WORK","WRITE","WRITETEXT","YEAR","ZONE"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}},O=({model:E,node:T,position:e,context:t,sdkFunctions:R,delimiterPos:n})=>{switch(T.type){case"interval":{if(!n)return void r(t,"INTERVAL",!1);const R=E.findNextMatch(/\)|,/u,{lineNumber:T.location.end.line,column:T.location.end.column},!0,!0,null,!0).range,[N,A]=m(e,n,R);return void((N??A)&&r(t,"INTERVAL",!1))}case"case-expression":{const E={startColumn:T.location.start.column,endColumn:T.location.start.column+4,startLineNumber:T.location.start.line,endLineNumber:T.location.start.line},R={startColumn:T.location.end.column-3,endColumn:T.location.end.column,startLineNumber:T.location.end.line,endLineNumber:T.location.end.line},[n,N]=m(e,E,R);return void((n??N)&&r(t,"CASE",!1))}case"expression-list":{const n=T.value;let N;return void n.forEach(((A,I)=>{if(0===I){const e=E.findMatches("(",{startLineNumber:1,endLineNumber:T.location.start.line,startColumn:1,endColumn:T.location.start.column},!1,!0,null,!0);N=e[e.length-1].range}O({model:E,node:A,position:e,context:t,sdkFunctions:R,delimiterPos:N}),N=_(I+1,A,E,n.length)}))}case"unary-expression":return void O({model:E,node:T.expr,position:e,context:t,sdkFunctions:R});case"binary-expression":return O({model:E,node:T.left,position:e,context:t,sdkFunctions:R}),void O({model:E,node:T.right,position:e,context:t,sdkFunctions:R});case"null":case"boolean":case"string":case"timestamp":case"date":case"time":case"number":case"current-time":case"data-type":case"parameter":case"when-clause":case"interval-period":case"interval-qualifier":return;case"column-reference":{const R=T.column,N=Y(R);if(!n)return void(N&&r(t,R,!1));const A=E.getValueInRange(n),I=E.findNextMatch(/\)|,/u,{column:T.location.start.column,lineNumber:T.location.start.line},!0,!0,null,!0).range,[s,i]=m(e,n,I);return void((s??i)&&N&&r(t,R,"("===A))}case"function":{const n=T.name,N=T.args.value,A={startLineNumber:T.location.start.line,endLineNumber:T.location.start.line,startColumn:T.location.start.column,endColumn:T.location.start.column+n.length},I={startLineNumber:T.location.end.line,endLineNumber:T.location.end.line,startColumn:T.location.end.column,endColumn:T.location.end.column},[s,i]=m(e,A,I);let S;return(s??i)&&r(t,n,!1),void N.forEach(((n,A)=>{let I=!1;switch(n.type){case"function":case"column-reference":case"interval":case"case-expression":I=!0}0===A&&(S=E.findNextMatch("(",{column:T.location.start.column,lineNumber:T.location.start.line},!1,!0,null,!0).range),!I&&"string"===n.type&&"BOTH"===n.value||(O({model:E,node:n,position:e,context:t,sdkFunctions:R,delimiterPos:S}),S=_(A+1,n,E,N.length))}))}default:throw new Error("Invalid syntax.")}},C=(E,T,e)=>{const R=d(E),n=R?.map((E=>{const R=M.includes(E.toUpperCase())?t.CompletionItemKind.TypeParameter:t.CompletionItemKind.Keyword;return{label:E,kind:R,insertText:E,range:T,sortText:String.fromCharCode(121-e)}}));return n??[]},r=(E,T,e)=>{e?E.additionalContext=T:E.contextString=T},L=["AND","OR","IS","ISNOT","IN","NOT IN","BETWEEN","NOTBETWEEN","LIKE","NOT LIKE"];var a,c;!function(E){E.ARGS="args",E.CLAUSES="clauses",E.ELSE="else",E.END="end",E.EXPR="expr",E.LEFT="left",E.OPERAND="operand",E.QUALIFIER="qualifier",E.RIGHT="right",E.START="start",E.VALUE="value"}(a||(a={})),function(E){E.CASE_EXPRESSION="case-expression",E.EXPRESSION_LIST="expression-list",E.FUNCTION="function",E.INTERVAL="interval",E.INTERVAL_QUALIFIER="interval-qualifier",E.WHEN_CLAUSE="when-clause",E.UNARY_EXPRESSION="unary-expression",E.BINARY_EXPRESSION="binary-expression"}(c||(c={}));const D={CAST:["DATE","FLOAT","INTEGER","REAL","SMALLINT","TIME","TIMESTAMP","VARCHAR"],EXTRACT:["YEAR","MONTH","DAY","HOUR","MINUTE","SECOND"],TRIM:["LEADING","TRAILING","BOTH"]};function P(E){return E.flatMap((E=>E.items)).reduce(((E,T)=>({...E,[T.name]:T})),{})}class l{constructor(E){this._defaults=E,this._sdkFunctions=P([])}async provideCompletionItems(E,n){const N=E.getWordUntilPosition(n),I={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:N.startColumn,endColumn:N.endColumn},i=this._defaults.getApiContextForModel(E.uri),S=i.profile?A(i.profile):[],o=await this._defaults.getApiLibrary(E.uri.toString());this._sdkFunctions=P(o);const r=await async function(E,t,R,n){try{const N=t.getValue(),A=await T(),I=await e([]),{parseTree:s}=await A.parseWhereClause(N,I);return((E,T,e,t,R)=>{const n={contextString:"NONE",additionalContext:"NONE"};O({model:E,node:T,position:t,context:n,sdkFunctions:R});const{contextString:N,additionalContext:A}=n;return[...C(N,e,0),...C(A,e,1)]})(t,s,E,R,n)}catch{const T=/(?:\(|\)|\s|,)/u,e=E=>{const T=void 0!==n[E],e=Y(E),t=""!==E&&"'"!==E,R=["(",")",",","END"].includes(E);return t&&(T||e||R)},N=t.getValueInRange({startColumn:1,endColumn:R.column,startLineNumber:1,endLineNumber:R.lineNumber}).toUpperCase().split(T).map((E=>E.trim())).filter((E=>e(E))),A=[];for(let E=0;E<N.length;E++){const T=N[E],e=A.length>0;if(!(E<N.length-1&&n[T]&&"("!==N[E+1]))if("("!==T&&","!==T)if(")"!==T&&"END"!==T){if(E!==N.length-1||!n[T])if(E>0){const e=Y(N[E-1]);Y(T)&&e||A.push(T)}else 0===E&&A.push(T)}else e&&A.pop();else e&&Y(A[A.length-1])&&A.pop()}let I=[];return[...new Set(A)].forEach(((T,e)=>{const t=C(T,E,e);I=[...I,...t]})),I}}(I,E,n,this._sdkFunctions),{sqlKeywordsCompletion:a,sqlBinOpsCompletion:c,sqlFunctionCompletion:D,fieldsCompletion:l,sqlDataTypeCompletion:u}=function(E,T,e){const n=E.map((E=>({label:E.completion?.label??E.name,insertText:E.completion?.insertText??E.name,sortText:"zaa",detail:E.completion?.detail,range:T,kind:t.CompletionItemKind.Variable,documentation:E.completion?.documentation}))),N=L.map((E=>{const e=E=>"ISNOT"===E?"IS NOT":"NOTBETWEEN"===E?"NOT BETWEEN":E;return{label:e(E),kind:t.CompletionItemKind.Keyword,insertText:e(E),range:T,sortText:"zc"}})),A=U.map((E=>"CASE"===E?{label:E,kind:t.CompletionItemKind.Snippet,insertText:"CASE\n\tWHEN condition1 THEN result1 \n\tELSE result\nEND",range:T,sortText:"zb"}:{label:E,kind:t.CompletionItemKind.Keyword,insertText:E,range:T,sortText:"zc"})),I=M.map((E=>({label:E,kind:t.CompletionItemKind.TypeParameter,insertText:E,range:T,sortText:"zd"})));return{fieldsCompletion:n,sqlFunctionCompletion:Object.values(e).map((E=>{const e=E.completion,n={label:e.label,insertText:e.insertText||e.label,sortText:"zac",filterText:e.filterText,detail:e.detail,range:T,kind:s(e.kind)};return e.insertTextFormat===R.exports.InsertTextFormat.Snippet&&(n.insertTextRules=t.CompletionItemInsertTextRule.InsertAsSnippet),e.documentation&&(n.documentation="string"==typeof e.documentation?e.documentation:{supportThemeIcons:!1,value:e.documentation.value,supportHtml:!0}),n})),sqlBinOpsCompletion:N,sqlKeywordsCompletion:A,sqlDataTypeCompletion:I}}(S,I,this._sdkFunctions),d=new Map;return[...a,...c,...u,...D,...l,...r].forEach((E=>{const{sortText:T}=E,e=E.label;d.get(e)||d.set(e,E),T.charCodeAt(0)<d.get(e).sortText.charCodeAt(0)&&d.set(e,E)})),{suggestions:Array.from(d.entries()).map((([,E])=>E))}}}class u{constructor(T,e,{defaults:t,diagnosticService:R}){this._languageId=T,this._worker=e,this._disposables=[],this._listener=new Map,this._diagnosticsService=R,this._defaults=t;const N=E=>{const T=E.getLanguageId();if(T!==this._languageId)return;const e=n((()=>{this._doValidate(E,T).catch((E=>{throw E}))}));this._listener.set(E.uri.toString(),E.onDidChangeContent(e)),this._doValidate(E,T).catch(console.error)},A=T=>{const e=T.uri.toString();E.setModelMarkers(T,this._languageId,[]);const t=this._listener.get(e);t&&(t.dispose(),this._listener.delete(e))};this._disposables.push(E.onDidCreateModel(N)),this._disposables.push(E.onWillDisposeModel((E=>A(E)))),this._disposables.push(E.onDidChangeModelLanguage((E=>{A(E.model),N(E.model)}))),this._disposables.push(t.onDidChange((()=>{E.getModels().forEach((E=>{E.getLanguageId()===this._languageId&&(A(E),N(E))}))}))),this._disposables.push(t.onModelContextDidChange((T=>{E.getModels().forEach((E=>{E.getLanguageId()===this._languageId&&E.uri.toString()===T&&this._doValidate(E,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._listener.forEach((E=>E.dispose())),this._listener.clear()}}),E.getModels().forEach(N)}async _doValidate(T,e){if(T.isAttachedToEditor())try{const t=await this._worker(T.uri),R=this._defaults.getApiContextForModel(T.uri),n=await t.doValidation(T.uri.toString(),R);this._diagnosticsService.fireDiagnosticsChange(T.uri,n),E.setModelMarkers(T,e,n)}catch(E){console.error(E)}}}const U=["INTERVAL","CASE"],M=D.CAST,d=E=>{switch(E.toLowerCase()){case"extract":return D.EXTRACT;case"position":return["IN"];case"trim":return D.TRIM;case"cast":return["AS",...D.CAST];case"interval":return[...D.EXTRACT];case"case":return["WHEN","THEN","ELSE","END"];default:return[]}},_=(E,T,e,t)=>{let R;const n=T.range.start,N=T.range.end;return R=0===E?e.findNextMatch("(",{lineNumber:n.line,column:n.column},!1,!0,null,!0).range:E===t?{startLineNumber:N.line,endLineNumber:N.line,startColumn:N.column,endColumn:N.column}:e.findNextMatch(",",{lineNumber:n.line,column:n.column},!1,!0,null,!0).range,R},Y=E=>{const T=E.toUpperCase();return U.includes(T)},m=(E,T,e)=>{let t=!1,R=!1;const n=E.column,N=E.lineNumber;return T.startLineNumber===e.startLineNumber&&T.startLineNumber===N&&n>T.startColumn&&n<e.endColumn&&(t=!0),T.startLineNumber!==e.startLineNumber&&(N===T.startLineNumber&&n>T.startColumn||N===e.startLineNumber&&n<e.endColumn||N>T.startLineNumber&&N<e.endLineNumber)&&(R=!0),[t,R]};let G;async function F(...E){return await new Promise(((T,e)=>{G?T(G(...E)):e(new Error("sql expression worker not registered!"))}))}const p=new class{constructor(){this._onDiagnosticsChange=new N}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(E,T){this._onDiagnosticsChange.fire({uri:E,diagnostics:T})}};function B(){return p}function H(E){const T=new i(E),e=async(...E)=>await T.getLanguageServiceWorker(...E);G=e,t.setMonarchTokensProvider(I.languageId,o),t.setLanguageConfiguration(I.languageId,S);const R=new l(I);t.registerCompletionItemProvider(I.languageId,R),new u(E.languageId,e,{defaults:E,diagnosticService:p})}export{B as getSqlExprDiagnosticService,F as getSqlExprWorker,H as setupMode}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.23
|
|
5
5
|
*/
|
|
6
|
-
import{m as t,f as e,i as n,a,b as r,c as i,s,L as o,d as c,E as u,U as d}from"./p-
|
|
6
|
+
import{m as t,f as e,i as n,a,b as r,c as i,s,L as o,d as c,E as u,U as d}from"./p-776d550d.js";import{g as l}from"./p-1d45a6dd.js";async function p(){return(await f()).getArcadeDiagnosticService()}async function f(){return await import("./p-2cfa8f19.js")}async function y(n,a=t.exports.CompletionItemKind.Variable){return await Promise.all(n.map((async n=>{switch(n.type){case"dictionary":return await async function(e,n){const{name:a,dictionaryVariables:r}=e,i=e.getDescription(),s=r.reduce(((t,e)=>{""!==t&&(t+=" \n \n"),t+=`**${e.name}** \n${e.type}`;const n=e.getDescription();return n&&(t+=` \n${n}`),t}),i);return{name:a,description:i,type:"dictionary",properties:await y(r,t.exports.CompletionItemKind.Field),completion:{label:a,detail:a,insertText:a,insertTextMode:t.exports.InsertTextMode.asIs,insertTextFormat:t.exports.InsertTextFormat.PlainText,kind:n,documentation:{kind:"markdown",value:s}}}}(n,a);case"feature":return await async function(n,a){const r=await n.loadSource(),{name:i}=n,s=n.getDescription(),o={label:i,detail:i,insertText:i,insertTextMode:t.exports.InsertTextMode.asIs,insertTextFormat:t.exports.InsertTextFormat.PlainText,kind:a},c={name:i,description:s,type:"dictionary",properties:[],completion:o};if(!r)return c;const[u,d]=e(r.fields,s,!0);return c.properties=u,o.documentation={kind:"markdown",value:d},c}(n,a);default:return function(e,n){const{name:a,type:r}=e,i=e.getDescription();return{name:a,description:i,type:r,completion:{label:a,detail:a,insertText:a,insertTextMode:t.exports.InsertTextMode.asIs,insertTextFormat:t.exports.InsertTextFormat.PlainText,kind:n,documentation:{kind:"markdown",value:i}}}}(n,a)}})))}async function w(t="en"){const e=m.get(t);if(e)return e;if(!s.has(t))return await w("en");try{const e=await fetch(l(`./assets/arcade-language/profiles/arcade-profiles.t9n.${t}.json`));return e.ok?function(t,e){const n=new Map;return e.forEach((t=>{n.set(t.id,t)})),m.set(t,n),n}(t,await e.json()):"en"===t?null:await w("en")}catch{return null}}const m=new Map;function h(t){switch(t.type){case"dictionary":return{...t,type:t.type,properties:(e=t.properties,e?.map(h))};case"array":return{...t,type:t.type,elementType:{type:"number",name:"number"}};default:return{...t,type:t.type}}var e}async function b(t,e="en"){if(!n(t))return;const s=await async function(t,e="en"){const n=await w(e);return n?.get(t)??null}(t.id,e);if(!s)return;const o={bundles:[...s.bundles],variables:[],hiddenApiItems:t.hiddenApiItems?.map((t=>t.toLowerCase()))};var c;return s.variables.forEach((e=>{if(t.disabledVariables?.includes(e.name))return;const n=t.definitions[e.name];switch(e.type){case"dictionary":return o.variables.push(h({...e,type:e.type,properties:Array.isArray(n)?[...n]:e.properties}));case"feature":if(!i(n))return;return o.variables.push({...e,type:e.type,definition:n});case"featureSet":if(!r(n))return;return o.variables.push({...e,type:e.type,definition:n});case"featureSetCollection":if(!a(n))return;return o.variables.push({...e,type:e.type,definition:n});default:return o.variables.push(h(e))}})),(c=t)&&"object"==typeof c&&"additionalVariables"in c&&Array.isArray(c.additionalVariables)&&o.variables.push(...t.additionalVariables??[]),o}const g=new class extends o{constructor(){super(...arguments),this._languageId="arcade",this._languageOptions={}}async setProfileForModel(t,e,a={locale:"en"}){n(e)&&(e=await b(e,a.locale));const r=await c(a.locale,l("./assets/arcade-language/t9n"),"profile.t9n.");if(!r)throw new Error(`Failed to load the language bundle for ${a.locale}`);this.disposeForModel(t);const i=this._getApiKey(t),s=new u(e,r);this._profileMap.set(i,s);const o=await async function(t){const{apiVersion:e,bundles:n,hiddenApiItems:a}=t.toEditorProfileDefinition();return{apiVersion:e,bundles:n,variables:await y(t.dictionaryVariables),hiddenApiItems:a?.map((t=>t.toLowerCase()))}}(s);this.updateApiContextForModel(t,{locale:a.locale,profile:o,snippets:a.snippets})}setLanguageOptions(t={}){this._languageOptions.assetsPath!==t.assetsPath&&(this._languageOptions={...this._languageOptions,...t},this._onDidChange.fire(this))}async getApiLibrary(t){const e=d.parse(t),n=await async function(t){const e=await f();return await e.getArcadeWorker(t)}(e);return await n.getApiLibrary(this.getApiContextForModel(e))}},x={setProfileForModel:g.setProfileForModel.bind(g)};export{x as a,g as b,f as c,p as g}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.23
|
|
5
5
|
*/
|
|
6
6
|
var e=Object.defineProperty,n=e=>{const n=new URL(e,ve.t);return n.origin!==de.location.origin?n.href:n.pathname},t={},l=e=>"object"==(e=typeof e)||"function"===e;function o(e){var n,t,l;return null!=(l=null==(t=null==(n=e.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:t.getAttribute("content"))?l:void 0}((n,t)=>{for(var l in t)e(n,l,{get:t[l],enumerable:!0})})({},{err:()=>r,map:()=>i,ok:()=>s,unwrap:()=>a,unwrapErr:()=>f});var s=e=>({isOk:!0,isErr:!1,value:e}),r=e=>({isOk:!1,isErr:!0,value:e});function i(e,n){if(e.isOk){const t=n(e.value);return t instanceof Promise?t.then((e=>s(e))):s(t)}if(e.isErr)return r(e.value);throw"should never get here"}var c,u,a=e=>{if(e.isOk)return e.value;throw e.value},f=e=>{if(e.isErr)return e.value;throw e.value},d="slot-fb{display:contents}slot-fb[hidden]{display:none}",p="http://www.w3.org/1999/xlink",v=(e,n,...t)=>{let o=null,s=null,r=!1,i=!1;const c=[],u=n=>{for(let t=0;t<n.length;t++)o=n[t],Array.isArray(o)?u(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof e&&!l(o))&&(o+=""),r&&i?c[c.length-1].l+=o:c.push(r?m(null,o):o),i=r)};if(u(t),n){n.key&&(s=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,c,h);const a=m(e,null);return a.o=n,c.length>0&&(a.i=c),a.u=s,a},m=(e,n)=>({p:0,v:e,l:n,m:null,i:null,o:null,u:null}),y={},h={forEach:(e,n)=>e.map(b).forEach(n),map:(e,n)=>e.map(b).map(n).map($)},b=e=>({vattrs:e.o,vchildren:e.i,vkey:e.u,vname:e.h,vtag:e.v,vtext:e.l}),$=e=>{if("function"==typeof e.vtag){const n={...e.vattrs};return e.vkey&&(n.key=e.vkey),e.vname&&(n.name=e.vname),v(e.vtag,n,...e.vchildren||[])}const n=m(e.vtag,e.vtext);return n.o=e.vattrs,n.i=e.vchildren,n.u=e.vkey,n.h=e.vname,n},w=e=>oe(e).$hostElement$,g=(e,n,t)=>{const l=w(e);return{emit:e=>k(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},k=(e,n,t)=>{const l=ve.ce(n,t);return e.dispatchEvent(l),l},j=new WeakMap,O=e=>"sc-"+e.$,S=(e,n,t,o,s,r)=>{if(t!==o){let i=ie(e,n),c=n.toLowerCase();if("class"===n){const n=e.classList,l=E(t),s=E(o);n.remove(...l.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===n){for(const n in t)o&&null!=o[n]||(n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in o)t&&o[n]===t[n]||(n.includes("-")?e.style.setProperty(n,o[n]):e.style[n]=o[n])}else if("key"===n);else if("ref"===n)o&&o(e);else if(i||"o"!==n[0]||"n"!==n[1]){const u=l(o);if((i||u&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[n]=o;else{const l=null==o?"":o;"list"===n?i=!1:null!=t&&e[n]==l||(e[n]=l)}}catch(e){}let a=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(n=c,a=!0),null==o||!1===o?!1===o&&""!==e.getAttribute(n)||(a?e.removeAttributeNS(p,n):e.removeAttribute(n)):(!i||4&r||s)&&!u&&(o=!0===o?"":o,a?e.setAttributeNS(p,n,o):e.setAttribute(n,o))}else if(n="-"===n[2]?n.slice(3):ie(de,c)?c.slice(2):c[2]+n.slice(3),t||o){const l=n.endsWith(M);n=n.replace(x,""),t&&ve.rel(e,n,t,l),o&&ve.ael(e,n,o,l)}}},C=/\s/,E=e=>e?e.split(C):[],M="Capture",x=RegExp(M+"$"),P=(e,n,l,o)=>{const s=11===n.m.nodeType&&n.m.host?n.m.host:n.m,r=e&&e.o||t,i=n.o||t;for(o of L(Object.keys(r)))o in i||S(s,o,r[o],void 0,l,n.p);for(o of L(Object.keys(i)))S(s,o,r[o],i[o],l,n.p)};function L(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var U=!1,R=(e,n,t)=>{const l=n.i[t];let o,s,r=0;if(null!==l.l)o=l.m=pe.createTextNode(l.l);else if(o=l.m=pe.createElement(l.v),P(null,l,U),null!=c&&o["s-si"]!==c&&o.classList.add(o["s-si"]=c),l.i)for(r=0;r<l.i.length;++r)s=R(e,l,r),s&&o.appendChild(s);return o["s-hn"]=u,o},W=(e,n,t,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===u&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=R(null,t,o),r&&(l[o].m=r,i.insertBefore(r,n)))},A=(e,n,t)=>{for(let l=n;l<=t;++l){const n=e[l];if(n){const e=n.m;D(n),e&&e.remove()}}},N=(e,n,t=!1)=>e.v===n.v&&(!!t||e.u===n.u),T=(e,n,t=!1)=>{const l=n.m=e.m,o=e.i,s=n.i,r=n.l;null===r?(P(e,n,U),null!==o&&null!==s?((e,n,t,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=n.length-1,d=n[0],p=n[f],v=l.length-1,m=l[0],y=l[v];for(;i<=f&&c<=v;)if(null==d)d=n[++i];else if(null==p)p=n[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--v];else if(N(d,m,o))T(d,m,o),d=n[++i],m=l[++c];else if(N(p,y,o))T(p,y,o),p=n[--f],y=l[--v];else if(N(d,y,o))T(d,y,o),e.insertBefore(d.m,p.m.nextSibling),d=n[++i],y=l[--v];else if(N(p,m,o))T(p,m,o),e.insertBefore(p.m,d.m),p=n[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(n[a]&&null!==n[a].u&&n[a].u===m.u){u=a;break}u>=0?(r=n[u],r.v!==m.v?s=R(n&&n[c],t,u):(T(r,m,o),n[u]=void 0,s=r.m),m=l[++c]):(s=R(n&&n[c],t,c),m=l[++c]),s&&d.m.parentNode.insertBefore(s,d.m)}i>f?W(e,null==l[v+1]?null:l[v+1].m,t,l,c,v):c>v&&A(n,i,f)})(l,o,n,s,t):null!==s?(null!==e.l&&(l.textContent=""),W(l,null,n,s,0,s.length-1)):null!==o&&A(o,0,o.length-1)):e.l!==r&&(l.data=r)},D=e=>{e.o&&e.o.ref&&e.o.ref(null),e.i&&e.i.map(D)},F=(e,n)=>{n&&!e.k&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.k=n)))},H=(e,n)=>{if(e.p|=16,!(4&e.p))return F(e,e.j),Oe((()=>q(e,n)));e.p|=512},q=(e,n)=>{const t=e.O;let l;return l=K(t,n?"componentWillLoad":"componentWillUpdate"),V(l,(()=>z(e,t,n)))},V=(e,n)=>_(e)?e.then(n):n(),_=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,z=async(e,n,t)=>{var l;const s=e.$hostElement$,r=s["s-rc"];t&&(e=>{const n=e.S,t=e.$hostElement$,l=n.p,s=((e,n)=>{var t;const l=O(n),s=fe.get(l);if(e=11===e.nodeType?e:pe,s)if("string"==typeof s){let r,i=j.get(e=e.head||e);if(i||j.set(e,i=new Set),!i.has(l)){{r=pe.createElement("style"),r.innerHTML=s;const n=null!=(t=ve.C)?t:o(pe);null!=n&&r.setAttribute("nonce",n),e.insertBefore(r,e.querySelector("link"))}4&n.p&&(r.innerHTML+=d),i&&i.add(l)}}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=s,t.classList.add(s+"-h"))})(e);B(e,n,s,t),r&&(r.map((e=>e())),s["s-rc"]=void 0);{const n=null!=(l=s["s-p"])?l:[],t=()=>G(e);0===n.length?t():(Promise.all(n).then(t),e.p|=4,n.length=0)}},B=(e,n,t,l)=>{try{n=n.render(),e.p&=-17,e.p|=2,((e,n,t=!1)=>{const l=e.$hostElement$,o=e.S,s=e.M||m(null,null),r=(e=>e&&e.v===y)(n)?n:v(null,null,n);if(u=l.tagName,o.P&&(r.o=r.o||{},o.P.map((([e,n])=>r.o[n]=l[e]))),t&&r.o)for(const e of Object.keys(r.o))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.o[e]=l[e]);r.v=null,r.p|=4,e.M=r,r.m=s.m=l.shadowRoot||l,c=l["s-sc"],T(s,r,t)})(e,n,l)}catch(n){ce(n,e.$hostElement$)}return null},G=e=>{const n=e.$hostElement$,t=e.O,l=e.j;64&e.p?K(t,"componentDidUpdate"):(e.p|=64,Q(n),K(t,"componentDidLoad"),e.L(n),l||J()),e.U(n),e.k&&(e.k(),e.k=void 0),512&e.p&&je((()=>H(e,!1))),e.p&=-517},I=e=>{{const n=oe(e),t=n.$hostElement$.isConnected;return t&&2==(18&n.p)&&H(n,!1),t}},J=()=>{Q(pe.documentElement),je((()=>k(de,"appload",{detail:{namespace:"arcgis-coding-components"}})))},K=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){ce(e)}},Q=e=>e.setAttribute("hydrated",""),X=(e,n,t)=>{var o;const s=e.prototype;if(n.R){e.watchers&&(n.W=e.watchers);const r=Object.entries(n.R);if(r.map((([e,[o]])=>{31&o||2&t&&32&o?Object.defineProperty(s,e,{get(){return((e,n)=>oe(this).A.get(n))(0,e)},set(t){((e,n,t,o)=>{const s=oe(e),r=s.$hostElement$,i=s.A.get(n),c=s.p,u=s.O;if(t=((e,n)=>null==e||l(e)?e:4&n?"false"!==e&&(""===e||!!e):1&n?e+"":e)(t,o.R[n][0]),(!(8&c)||void 0===i)&&t!==i&&(!Number.isNaN(i)||!Number.isNaN(t))&&(s.A.set(n,t),u)){if(o.W&&128&c){const e=o.W[n];e&&e.map((e=>{try{u[e](t,i,n)}catch(e){ce(e,r)}}))}if(2==(18&c)){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(t,i,n))return;H(s,!1)}}})(this,e,t,n)},configurable:!0,enumerable:!0}):1&t&&64&o&&Object.defineProperty(s,e,{value(...n){var t;const l=oe(this);return null==(t=null==l?void 0:l.N)?void 0:t.then((()=>{var t;return null==(t=l.O)?void 0:t[e](...n)}))}})})),1&t){const t=new Map;s.attributeChangedCallback=function(e,l,o){ve.jmp((()=>{var r;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=oe(this),s=null==t?void 0:t.p;if(s&&!(8&s)&&128&s&&o!==l){const s=t.O,i=null==(r=n.W)?void 0:r[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!=(o=n.W)?o:{}),...r.filter((([e,n])=>15&n[0])).map((([e,l])=>{var o;const s=l[1]||e;return t.set(s,e),512&l[0]&&(null==(o=n.P)||o.push([e,s])),s}))]))}}return e},Y=e=>{K(e,"connectedCallback")},Z=e=>{K(e,"disconnectedCallback")},ee=(e,n={})=>{var t;const l=[],s=n.exclude||[],r=de.customElements,i=pe.head,c=i.querySelector("meta[charset]"),u=pe.createElement("style"),a=[];let f,p=!0;Object.assign(ve,n),ve.t=new URL(n.resourcesUrl||"./",pe.baseURI).href;let v=!1;if(e.map((e=>{e[1].map((n=>{var t;const o={p:n[0],$:n[1],R:n[2],T:n[3]};4&o.p&&(v=!0),o.R=n[2],o.P=[],o.W=null!=(t=n[4])?t:{};const i=o.$,c=class extends HTMLElement{constructor(e){super(e),re(e=this,o),1&o.p&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),p?a.push(this):ve.jmp((()=>(e=>{if(!(1&ve.p)){const n=oe(e),t=n.S,l=()=>{};if(1&n.p)(null==n?void 0:n.O)?Y(n.O):(null==n?void 0:n.D)&&n.D.then((()=>Y(n.O)));else{n.p|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){F(n,n.j=t);break}}t.R&&Object.entries(t.R).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(!(32&n.p)){if(n.p|=32,t.F){if(l=ae(t),l.then){const e=()=>{};l=await l,e()}l.isProxied||(t.W=l.watchers,X(l,t,2),l.isProxied=!0);const e=()=>{};n.p|=8;try{l.__forceUpdate=I,l.__registerControllers=e=>(se(e,n),n.S.R??{}),new l(n),l.__registerControllers=void 0}catch(e){ce(e)}n.p&=-9,n.p|=128,e(),Y(n.O)}else l=e.constructor,customElements.whenDefined(t.$).then((()=>n.p|=128));if(l.style){let e=l.style;const n=O(t);if(!fe.has(n)){const l=()=>{};((e,n,t)=>{let l=fe.get(e);ye&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,fe.set(e,l)})(n,e,!!(1&t.p)),l()}}}const o=n.j,s=()=>H(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(e,n,t)}l()}})(this)))}disconnectedCallback(){ve.jmp((()=>(async()=>{if(!(1&ve.p)){const e=oe(this);(null==e?void 0:e.O)?Z(e.O):(null==e?void 0:e.D)&&e.D.then((()=>Z(e.O)))}})()))}componentOnReady(){return oe(this).D}};o.F=e[0],s.includes(i)||r.get(i)||(l.push(i),r.define(i,X(c,o,1)))}))})),l.length>0&&(v&&(u.textContent+=d),u.textContent+=l+"{visibility:hidden}[hydrated]{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const e=null!=(t=ve.C)?t:o(pe);null!=e&&u.setAttribute("nonce",e),i.insertBefore(u,c?c.nextSibling:i.firstChild)}p=!1,a.length?a.map((e=>e.connectedCallback())):ve.jmp((()=>f=setTimeout(J,30)))},ne=(e,n)=>n,te=e=>ve.C=e,le=new WeakMap,oe=e=>le.get(e),se=(e,n)=>le.set(n.O=e,n),re=(e,n)=>{const t={p:0,$hostElement$:e,S:n,A:new Map};return t.N=new Promise((e=>t.U=e)),t.D=new Promise((e=>t.L=e)),e["s-p"]=[],e["s-rc"]=[],le.set(e,t)},ie=(e,n)=>n in e,ce=(e,n)=>(0,console.error)(e,n),ue=new Map,ae=e=>{const n=e.$.replace(/-/g,"_"),t=e.F,l=ue.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(ue.set(t,e),e[n])),ce)
|
|
7
7
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},fe=new Map,de="undefined"!=typeof window?window:{},pe=de.document||{head:{}},ve={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)},me=e=>Promise.resolve(e),ye=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),he=!1,be=[],$e=[],we=(e,n)=>t=>{e.push(t),he||(he=!0,n&&4&ve.p?je(ke):ve.raf(ke))},ge=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){ce(e)}e.length=0},ke=()=>{ge(be),ge($e),(he=be.length>0)&&ve.raf(ke)},je=e=>me().then(e),Oe=we($e,!0);export{ne as F,y as H,w as a,ee as b,g as c,n as g,v as h,me as p,se as r,te as s}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.23
|
|
5
5
|
*/
|
|
6
|
-
import{M as e}from"./p-
|
|
6
|
+
import{M as e}from"./p-776d550d.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.23
|
|
5
5
|
*/
|
|
6
|
-
import{m as e,g as t,z as n,O as s}from"./p-
|
|
6
|
+
import{m as e,g as t,z as n,O as s}from"./p-776d550d.js";import{C as r,F as i,D as o}from"./p-50e53c02.js";var a=[[],[],[]];["++","--"].forEach((e=>a[e.length-1]?.push(e))),["-","+","!","~"].forEach((e=>a[e.length-1]?.push(e))),["||","&&"].forEach((e=>a[e.length-1]?.push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>a[e.length-1]?.push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>a[e.length-1]?.push(e)));var c=Object.values({Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"});Object.values({False:"false",Null:"null",True:"true"}).map((t=>({label:t,kind:e.exports.CompletionItemKind.Constant}))),c.map((t=>({label:t,kind:e.exports.CompletionItemKind.Keyword})));const u={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,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:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},g={defaultToken:"invalid",tokenPostfix:".arc",ignoreCase:!0,keywords:c.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}};class l{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}async _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 await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}let p;async function d(...e){return await new Promise(((t,n)=>{p?t(p(...e)):n(new Error("TypeScript not registered!"))}))}const m=new class{constructor(){this._onDiagnosticsChange=new s}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function x(){return m}function k(e){const t=new l(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);p=s,n.setMonarchTokensProvider(e.languageId,g),n.setLanguageConfiguration(e.languageId,u),n.registerCompletionItemProvider(e.languageId,new r(s,e)),n.registerDocumentFormattingEditProvider(e.languageId,new i(s,e)),new o(e.languageId,s,{defaults:e,diagnosticsService:m})}export{x as getArcadeDiagnosticService,d as getArcadeWorker,k as setupMode}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.23
|
|
5
5
|
*/
|
|
6
|
-
import{r as e,h as i,H as s,a}from"./p-
|
|
6
|
+
import{r as e,h as i,H as s,a}from"./p-1d45a6dd.js";import{u as o,s as t}from"./p-c4521d1d.js";import{o as r}from"./p-776d550d.js";const d=class{constructor(i){e(this,i),this.manager=o(this),this._modelId=r(),this._insertAsSnippet=e=>{this._codeEditorElt?.insertSnippet(e.detail).catch(console.error)},this._preparing=!1,this._editorProfile=void 0,this._activeAction=void 0,this._apiLibrary=void 0,this.profile=void 0}_profileChanged(){this._updateSqlExprDefaults().catch(console.error)}async _updateSqlExprDefaults(){this._preparing=!0;try{await t.setProfileForModel(this._modelId,this.profile),this._apiLibrary=await t.getApiLibrary(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(e){this._activeAction=e}_handleActionClick(e){this._setActiveAction(e.target.dataset.panelName)}async componentWillLoad(){await this._updateSqlExprDefaults().catch(console.error)}disconnectedCallback(){t.disposeForModel(this._modelId)}render(){return i(s,{key:"67f7ebf7a28a8ffc3fe967721389d45c4e2003a1"},i("div",{key:"b3bf4ec2a8d04105e97489593ccec95cd33237f0",class:"flex-row flex-adjustable"},i("div",{key:"fdac47e22baf64c72f786f9e09b637050f417f94",class:"flex-column flex-adjustable"},i("arcgis-code-editor",{key:"f4151dd39ec3523907cd907ebb7558e05bca9cc1",language:"arcgis-sql-expression",modelId:this._modelId,ref:e=>this._codeEditorElt=e})),"fields"===this._activeAction&&i("arcgis-sql-expression-fields",{key:"aa0e5d88429d4bf865b9adc506028efefec1a73a",class:"side-panel flex-panel border-inline-start",loading:this._preparing,modelId:this._modelId,"data-panel-name":"none",onArcgisFieldSelected:this._insertAsSnippet,onArcgisClose:()=>this._setActiveAction(void 0)}),"functions"===this._activeAction&&i("arcgis-language-api-panel",{key:"7826dbb1b08894c6c6385806a3aef6cff77395d0",class:"side-panel flex-panel border-inline-start",onArcgisItemSelected:this._insertAsSnippet,onArcgisClose:()=>this._setActiveAction(void 0),loading:this._preparing,apiLibrary:this._apiLibrary,"data-panel-name":"none"}),i("calcite-action-bar",{key:"ee618d666b70405495627a9d15238e8723c6f961",class:"side-action-bar border-inline-start",expanded:!1,position:"end"},i("calcite-action",{key:"2c828df5dded6347e13e59ba9e313824baa606ff",id:"fields-action",text:"Fields",icon:"profile-variables",active:"fields"===this._activeAction,"data-panel-name":"fields",onClick:e=>this._handleActionClick(e)}),i("calcite-action",{key:"eab785c5b14cadeb5047db1957134f5accfedc76",id:"functions-action",text:"Functions",icon:"function",active:"functions"===this._activeAction,"data-panel-name":"functions",onClick:e=>this._handleActionClick(e)}))))}static get assetsDirs(){return["assets"]}get el(){return a(this)}static get watchers(){return{profile:["_profileChanged"]}}};d.style="arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid var(--calcite-color-border-3);box-sizing:border-box;background-color:var(--calcite-color-foreground-1);height:100%}arcgis-sql-expression-editor .flex-adjustable{flex:1 1 auto;overflow:hidden}arcgis-sql-expression-editor .flex-panel{flex:1 0 auto}arcgis-sql-expression-editor .position-relative{position:relative}arcgis-sql-expression-editor .flex-row{display:flex;flex-direction:row;overflow:hidden}arcgis-sql-expression-editor .flex-column{display:flex;flex-direction:column;overflow:hidden}arcgis-sql-expression-editor .border-inline-start{border-inline-start:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .border-inline-end{border-inline-end:1px solid var(--calcite-color-border-3);box-sizing:border-box}arcgis-sql-expression-editor .side-action-bar{max-width:25%}arcgis-sql-expression-editor .side-panel{max-width:45%;width:600px}arcgis-sql-expression-editor .side-panel calcite-flow{height:100%}";export{d as arcgis_sql_expression_editor}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.23
|
|
5
5
|
*/
|
|
6
|
-
import{g as t,P as s,m as e,R as r,z as n,Q as a}from"./p-
|
|
6
|
+
import{g as t,P as s,m as e,R as r,z as n,Q as a}from"./p-776d550d.js";class i{constructor(s,e,{defaults:r,diagnosticsService:n}){this._languageId=s,this._worker=e,this._disposables=[],this._listener=new Map,this._diagnosticsService=n,this._defaults=r;const i=t=>{const s=t.getLanguageId();if(s!==this._languageId)return;const e=a((()=>{this._doValidate(t,s).catch((t=>{throw t}))}));this._listener.set(t.uri.toString(),t.onDidChangeContent(e)),this._doValidate(t,s).catch(console.error)},c=s=>{const e=s.uri.toString();t.setModelMarkers(s,this._languageId,[]);const r=this._listener.get(e);r&&(r.dispose(),this._listener.delete(e))};this._disposables.push(t.onDidCreateModel(i)),this._disposables.push(t.onWillDisposeModel((t=>{c(t)}))),this._disposables.push(t.onDidChangeModelLanguage((t=>{c(t.model),i(t.model)}))),this._disposables.push(r.onDidChange((()=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&(c(t),i(t))}))}))),this._disposables.push(r.onModelContextDidChange((s=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===s&&this._doValidate(t,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._listener.forEach((t=>t.dispose())),this._listener.clear()}}),t.getModels().forEach(i)}dispose(){this._disposables.forEach((t=>t.dispose())),this._disposables=[]}async _doValidate(s,e){if(s.isAttachedToEditor())try{const r=await this._worker(s.uri),n=this._defaults.getApiContextForModel(s.uri),a=await r.doValidation(s.uri.toString(),n),i=a.map((t=>{return{severity:c((s=t).severity),startLineNumber:s.range.start.line+1,startColumn:s.range.start.character+1,endLineNumber:s.range.end.line+1,endColumn:s.range.end.character+1,message:s.message};var s}));this._diagnosticsService.fireDiagnosticsChange(s.uri,a),t.setModelMarkers(s,e,i)}catch(t){console.error(t)}}}function c(t){switch(t){case e.exports.DiagnosticSeverity.Error:return s.Error;case e.exports.DiagnosticSeverity.Warning:return s.Warning;case e.exports.DiagnosticSeverity.Information:return s.Info;case e.exports.DiagnosticSeverity.Hint:return s.Hint;default:return s.Info}}function u(t){return new r(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function o(t){return{range:u(t.range),text:t.newText}}function h(t){const s=n.CompletionItemKind;switch(t){case e.exports.CompletionItemKind.Text:return s.Text;case e.exports.CompletionItemKind.Method:return s.Method;case e.exports.CompletionItemKind.Function:return s.Function;case e.exports.CompletionItemKind.Constructor:return s.Constructor;case e.exports.CompletionItemKind.Field:return s.Field;case e.exports.CompletionItemKind.Variable:return s.Variable;case e.exports.CompletionItemKind.Class:return s.Class;case e.exports.CompletionItemKind.Interface:return s.Interface;case e.exports.CompletionItemKind.Module:return s.Module;case e.exports.CompletionItemKind.Property:return s.Property;case e.exports.CompletionItemKind.Unit:return s.Unit;case e.exports.CompletionItemKind.Value:return s.Value;case e.exports.CompletionItemKind.Enum:return s.Enum;case e.exports.CompletionItemKind.Keyword:return s.Keyword;case e.exports.CompletionItemKind.Snippet:return s.Snippet;case e.exports.CompletionItemKind.Color:return s.Color;case e.exports.CompletionItemKind.File:return s.File;case e.exports.CompletionItemKind.Reference:return s.Reference;case e.exports.CompletionItemKind.Folder:return s.Folder;case e.exports.CompletionItemKind.EnumMember:return s.EnumMember;case e.exports.CompletionItemKind.Constant:return s.Constant;case e.exports.CompletionItemKind.Struct:return s.Struct;case e.exports.CompletionItemKind.Event:return s.Event;case e.exports.CompletionItemKind.Operator:return s.Operator;case e.exports.CompletionItemKind.TypeParameter:return s.TypeParameter;default:return s.Property}}class l{constructor(t,s){this._worker=t,this._defaults=s,this.triggerCharacters=[".","("]}async provideCompletionItems(t,s){const a=await this._worker(t.uri),i=this._defaults.getApiContextForModel(t.uri),c=await a.doComplete(t.uri.toString(),function(t){return{character:t.column-1,line:t.lineNumber-1}}(s),i),l=t.getWordUntilPosition(s),d=new r(s.lineNumber,l.startColumn,s.lineNumber,l.endColumn),p=c.items.map((t=>{const s={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:d,kind:h(t.kind)};var r;return t.textEdit&&(s.range=void 0!==(r=t.textEdit).insert&&void 0!==r.replace?{insert:u(t.textEdit.insert),replace:u(t.textEdit.replace)}:u(t.textEdit.range),s.insertText=t.textEdit.newText),t.additionalTextEdits&&(s.additionalTextEdits=t.additionalTextEdits.map(o)),t.insertTextFormat===e.exports.InsertTextFormat.Snippet&&(s.insertTextRules=n.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(s.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),s}));return{incomplete:c.isIncomplete,suggestions:p}}}class d{constructor(t,s){this._worker=t,this._defaults=s}async provideDocumentFormattingEdits(t){const s=await this._worker(t.uri),e=this._defaults.getApiContextForModel(t.uri.toString());return(await s.doFormat(t.uri.toString(),e)).map((t=>({range:u(t.range),text:t.newText})))}}export{l as C,i as D,d as F,h as t}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.23
|
|
5
5
|
*/
|
|
6
|
-
import{M as e}from"./p-
|
|
6
|
+
import{M as e}from"./p-776d550d.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|