@arcgis/coding-components 4.29.0-beta.16 → 4.29.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +1 -1
- package/dist/arcgis-coding-components/index.esm.js +1 -1
- package/dist/arcgis-coding-components/{p-b83db734.js → p-1b9e06df.js} +1 -1
- package/dist/arcgis-coding-components/{p-b3500466.js → p-3ee54d78.js} +1 -1
- package/dist/arcgis-coding-components/{p-ff06e912.js → p-729b1c7d.js} +1 -1
- package/dist/arcgis-coding-components/{p-310f0408.js → p-9e48ce42.js} +1 -1
- package/dist/arcgis-coding-components/p-aef064f5.js +62 -0
- package/dist/arcgis-coding-components/{p-9dd33d3e.js → p-b027b305.js} +1 -1
- package/dist/arcgis-coding-components/p-bead9dae.entry.js +1 -0
- package/dist/arcgis-coding-components/{p-3664ab2a.js → p-e8783816.js} +1 -1
- package/dist/arcgis-coding-components/{p-443fe20e.js → p-eeed79a3.js} +1 -1
- package/dist/arcgis-coding-components/{p-9a164b63.js → p-f736c7df.js} +1 -1
- package/dist/cjs/{arcade-defaults-e128d6d9.js → arcade-defaults-66d482f5.js} +10 -10
- package/dist/cjs/{arcade-mode-8bf7a14b.js → arcade-mode-1005dec4.js} +1 -1
- package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +30 -25
- package/dist/cjs/arcgis-coding-components.cjs.js +1 -1
- package/dist/cjs/{cssMode-8c1d563a.js → cssMode-227ba353.js} +1 -1
- package/dist/cjs/{html-ead03bbb.js → html-136832b8.js} +1 -1
- package/dist/cjs/{htmlMode-5e1a0115.js → htmlMode-23c0a87d.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{javascript-3fe2de06.js → javascript-56139040.js} +2 -2
- package/dist/cjs/{jsonMode-8b4b19f9.js → jsonMode-9feba6fc.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tsMode-b9491227.js → tsMode-b9e964b4.js} +1 -1
- package/dist/cjs/{typescript-524fddbc.js → typescript-f0cfd4cb.js} +1 -1
- package/dist/components/arcade-api.js +7 -5
- package/dist/components/arcade-results.js +8 -6
- package/dist/components/arcade-suggestions.js +7 -5
- package/dist/components/arcade-variables.js +7 -5
- package/dist/components/arcgis-arcade-editor.js +12 -10
- package/dist/components/code-editor.js +2 -2
- package/dist/components/index2.js +2 -2
- package/dist/esm/{arcade-defaults-a34c2e51.js → arcade-defaults-ef3585ec.js} +9 -9
- package/dist/esm/{arcade-mode-c5a69066.js → arcade-mode-cf8f4b85.js} +1 -1
- package/dist/esm/arcgis-arcade-api_6.entry.js +30 -25
- package/dist/esm/arcgis-coding-components.js +1 -1
- package/dist/esm/{cssMode-cb48c437.js → cssMode-27708d0c.js} +1 -1
- package/dist/esm/{html-e7c0bd60.js → html-642f40ee.js} +1 -1
- package/dist/esm/{htmlMode-46638b7f.js → htmlMode-20c9ae62.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{javascript-2229cd63.js → javascript-676f09c6.js} +2 -2
- package/dist/esm/{jsonMode-08a2f0d2.js → jsonMode-067c027f.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{tsMode-46d0d8e8.js → tsMode-47a06325.js} +1 -1
- package/dist/esm/{typescript-88a09694.js → typescript-ae6043a9.js} +1 -1
- package/dist/types/components/arcade-api/arcade-api.d.ts +3 -2
- package/dist/types/components/arcade-editor/arcade-editor.d.ts +3 -2
- package/dist/types/components/arcade-results/arcade-results.d.ts +3 -2
- package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +3 -2
- package/dist/types/components/arcade-variables/arcade-variables.d.ts +3 -2
- package/package.json +8 -8
- package/dist/arcgis-coding-components/p-1b0246cd.entry.js +0 -1
- package/dist/arcgis-coding-components/p-236ce4a1.js +0 -62
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,e as t,M as n,R as r,l as i,E as s}from"./p-236ce4a1.js";import"./p-0fa0a06d.js";var o,a=((o=a||{}).False="false",o.Null="null",o.True="true",o),c=(e=>(e.Break="break",e.Continue="continue",e.Else="else",e.For="for",e.From="from",e.Function="function",e.If="if",e.Import="import",e.Export="export",e.In="in",e.Return="return",e.Var="var",e.While="while",e))(c||{}),l=(e=>(e.AssignmentExpression="AssignmentExpression",e.ArrayExpression="ArrayExpression",e.BlockComment="BlockComment",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.ContinueStatement="ContinueStatement",e.EmptyStatement="EmptyStatement",e.ExpressionStatement="ExpressionStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.LineComment="LineComment",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.ObjectExpression="ObjectExpression",e.Program="Program",e.Property="Property",e.ReturnStatement="ReturnStatement",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e))(l||{}),p=(e=>(e[e.Unknown=0]="Unknown",e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.Template=10]="Template",e))(p||{}),d=(e=>(e.InvalidModuleUri="InvalidModuleUri",e.ForInOfLoopInitializer="ForInOfLoopInitializer",e.IdentiferExpected="IdentiferExpected",e.InvalidEscapedReservedWord="InvalidEscapedReservedWord",e.InvalidExpression="InvalidExpression",e.InvalidFunctionIdentifier="InvalidFunctionIdentifier",e.InvalidHexEscapeSequence="InvalidHexEscapeSequence",e.InvalidLeftHandSideInAssignment="InvalidLeftHandSideInAssignment",e.InvalidLeftHandSideInForIn="InvalidLeftHandSideInForIn",e.InvalidTemplateHead="InvalidTemplateHead",e.InvalidVariableAssignment="InvalidVariableAssignment",e.KeyMustBeString="KeyMustBeString",e.NoFunctionInsideBlock="NoFunctionInsideBlock",e.NoFunctionInsideFunction="NoFunctionInsideFunction",e.ModuleExportRootOnly="ModuleExportRootOnly",e.ModuleImportRootOnly="ModuleImportRootOnly",e.PunctuatorExpected="PunctuatorExpected",e.TemplateOctalLiteral="TemplateOctalLiteral",e.UnexpectedBoolean="UnexpectedBoolean",e.UnexpectedEndOfScript="UnexpectedEndOfScript",e.UnexpectedIdentifier="UnexpectedIdentifier",e.UnexpectedKeyword="UnexpectedKeyword",e.UnexpectedNull="UnexpectedNull",e.UnexpectedNumber="UnexpectedNumber",e.UnexpectedPunctuator="UnexpectedPunctuator",e.UnexpectedString="UnexpectedString",e.UnexpectedTemplate="UnexpectedTemplate",e.UnexpectedToken="UnexpectedToken",e))(d||{}),u=[[],[],[]];["++","--"].forEach((e=>u[e.length-1].push(e))),["-","+","!","~"].forEach((e=>u[e.length-1].push(e))),["||","&&"].forEach((e=>u[e.length-1].push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>u[e.length-1].push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>u[e.length-1].push(e)));var g,m=((g=m||{}).AlreadyDefined="AlreadyDefined",g.ApiConflict="ApiConflict",g.AssignedNeverUsed="AssignedNeverUsed",g.DefinedNeverAssigned="DefinedNeverAssigned",g.DefinedNeverUsed="DefinedNeverUsed",g.EmptyBlockStatement="EmptyBlockStatement",g.ExecutionError="ExecutionError",g.InvalidApiFunctionUsage="InvalidApiFunctionUsage",g.InvalidConstantIdentifier="InvalidConstantIdentifier",g.InvalidPropertyIdentifier="InvalidPropertyIdentifier",g.NoArgumentExpected="NoArgumentExpected",g.NotADictionary="NotADictionary",g.NotDefined="NotDefined",g.NotEnoughArguments="NotEnoughArguments",g.ProfileVariablesAreImmutable="ProfileVariablesAreImmutable",g.ProfileVariablesConflict="ProfileVariablesConflict",g.ReservedKeyword="ReservedKeyword",g.TooManyArguments="TooManyArguments",g.UnexpectedEmptyFunction="UnexpectedEmptyFunction",g.UnexpectedPropertyIdentifier="UnexpectedPropertyIdentifier",g.UnknownPropertyIdentifier="UnknownPropertyIdentifier",g),x=Object.values(c);Object.values(a).map((t=>({label:t,kind:e.CompletionItemKind.Constant}))),x.map((t=>({label:t,kind:e.CompletionItemKind.Keyword})));const h={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/}},f={defaultToken:"invalid",tokenPostfix:".arc",ignoreCase:!0,keywords:x.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number"],[/0[xX](@hexdigits)/,"number"],[/0[oO]?(@octaldigits)/,"number"],[/0[bB](@binarydigits)/,"number"],[/(@digits)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],import:[[/import(?=\s)/,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/,"identifier"],{include:"@whitespace"},[/from/,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};class b{constructor(e,n,{defaults:r,diagnosticsService:i}){this._languageId=e,this._worker=n,this._disposables=[],this._listener=Object.create(null),this._diagnosticsService=i,this._defaults=r;const s=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;let n;this._listener[e.uri.toString()]=e.onDidChangeContent((()=>{window.clearTimeout(n),n=window.setTimeout((()=>this._doValidate(e,t)),500)})),this._doValidate(e,t)},o=e=>{const n=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const r=this._listener[n];r&&(r.dispose(),delete this._listener[n])};this._disposables.push(t.onDidCreateModel(s)),this._disposables.push(t.onWillDisposeModel((e=>{o(e)}))),this._disposables.push(t.onDidChangeModelLanguage((e=>{o(e.model),s(e.model)}))),this._disposables.push(r.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),s(e))}))}))),this._disposables.push(r.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId)}))}))),this._disposables.push({dispose:()=>{for(const e in this._listener)this._listener[e].dispose()}}),t.getModels().forEach(s)}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables=[]}async _doValidate(e,n){if(e.isAttachedToEditor())try{const r=await this._worker(e.uri),i=this._defaults.getApiContextForModel(e.uri),s=await r.doValidation(e.uri.toString(),i),o=s.map((e=>{return{severity:k((t=e).severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message};var t}));this._diagnosticsService.fireDiagnosticsChange(e.uri,s),t.setModelMarkers(e,n,o)}catch(e){console.error(e)}}}function k(t){switch(t){case e.DiagnosticSeverity.Error:return n.Error;case e.DiagnosticSeverity.Warning:return n.Warning;case e.DiagnosticSeverity.Information:return n.Info;case e.DiagnosticSeverity.Hint:return n.Hint;default:return n.Info}}function w(e){return new r(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function I(e){return{range:w(e.range),text:e.newText}}function y(t){const n=i.CompletionItemKind;switch(t){case e.CompletionItemKind.Text:return n.Text;case e.CompletionItemKind.Method:return n.Method;case e.CompletionItemKind.Function:return n.Function;case e.CompletionItemKind.Constructor:return n.Constructor;case e.CompletionItemKind.Field:return n.Field;case e.CompletionItemKind.Variable:return n.Variable;case e.CompletionItemKind.Class:return n.Class;case e.CompletionItemKind.Interface:return n.Interface;case e.CompletionItemKind.Module:return n.Module;case e.CompletionItemKind.Property:return n.Property;case e.CompletionItemKind.Unit:return n.Unit;case e.CompletionItemKind.Value:return n.Value;case e.CompletionItemKind.Enum:return n.Enum;case e.CompletionItemKind.Keyword:return n.Keyword;case e.CompletionItemKind.Snippet:return n.Snippet;case e.CompletionItemKind.Color:return n.Color;case e.CompletionItemKind.File:return n.File;case e.CompletionItemKind.Reference:return n.Reference;case e.CompletionItemKind.Folder:return n.Folder;case e.CompletionItemKind.EnumMember:return n.EnumMember;case e.CompletionItemKind.Constant:return n.Constant;case e.CompletionItemKind.Struct:return n.Struct;case e.CompletionItemKind.Event:return n.Event;case e.CompletionItemKind.Operator:return n.Operator;case e.CompletionItemKind.TypeParameter:return n.TypeParameter}return n.Property}class v{constructor(e,t){this._worker=e,this._defaults=t,this.triggerCharacters=[".","("]}async provideCompletionItems(t,n){const s=await this._worker(t.uri),o=this._defaults.getApiContextForModel(t.uri),a=await s.doComplete(t.uri.toString(),function(e){return{character:e.column-1,line:e.lineNumber-1}}(n),o);if(!a)return;const c=t.getWordUntilPosition(n),l=new r(n.lineNumber,c.startColumn,n.lineNumber,c.endColumn),p=a.items.map((t=>{const n={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:l,kind:y(t.kind)};var r;return t.textEdit&&(n.range=void 0!==(r=t.textEdit).insert&&void 0!==r.replace?{insert:w(t.textEdit.insert),replace:w(t.textEdit.replace)}:w(t.textEdit.range),n.insertText=t.textEdit.newText),t.additionalTextEdits&&(n.additionalTextEdits=t.additionalTextEdits.map(I)),t.insertTextFormat===e.InsertTextFormat.Snippet&&(n.insertTextRules=i.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(n.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),n}));return{incomplete:a.isIncomplete,suggestions:p}}}class E{constructor(e,t){this._worker=e,this._defaults=t}async provideDocumentFormattingEdits(e){const t=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri.toString()),r=await t.doFormat(e.uri.toString(),n);return r?r.map((e=>({range:w(e.range),text:e.newText}))):[]}}class S{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}_getClientProxy(){if(!this._client){const{languageId:e,languageOptions:n}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e,languageOptions:n}}),this._client=this._worker.getProxy()}return this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}let A;async function C(...e){return new Promise(((t,n)=>{if(!A)return n("TypeScript not registered!");t(A(...e))}))}const U=new class{constructor(){this._onDiagnosticsChange=new s}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function F(){return U}function P(e){const t=new S(e),n=(...e)=>t.getLanguageServiceWorker(...e);A=n,i.setMonarchTokensProvider(e.languageId,f),i.setLanguageConfiguration(e.languageId,h),i.registerCompletionItemProvider(e.languageId,new v(n,e)),i.registerDocumentFormattingEditProvider(e.languageId,new E(n,e)),new b(e.languageId,n,{defaults:e,diagnosticsService:U})}export{F as getArcadeDiagnosticService,C as getArcadeWorker,P as setupMode}
|
|
1
|
+
import{o as e,e as t,M as n,R as r,l as i,E as s}from"./p-aef064f5.js";import"./p-0fa0a06d.js";var o,a=((o=a||{}).False="false",o.Null="null",o.True="true",o),c=(e=>(e.Break="break",e.Continue="continue",e.Else="else",e.For="for",e.From="from",e.Function="function",e.If="if",e.Import="import",e.Export="export",e.In="in",e.Return="return",e.Var="var",e.While="while",e))(c||{}),l=(e=>(e.AssignmentExpression="AssignmentExpression",e.ArrayExpression="ArrayExpression",e.BlockComment="BlockComment",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.ContinueStatement="ContinueStatement",e.EmptyStatement="EmptyStatement",e.ExpressionStatement="ExpressionStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.LineComment="LineComment",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.ObjectExpression="ObjectExpression",e.Program="Program",e.Property="Property",e.ReturnStatement="ReturnStatement",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e))(l||{}),p=(e=>(e[e.Unknown=0]="Unknown",e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.Template=10]="Template",e))(p||{}),d=(e=>(e.InvalidModuleUri="InvalidModuleUri",e.ForInOfLoopInitializer="ForInOfLoopInitializer",e.IdentiferExpected="IdentiferExpected",e.InvalidEscapedReservedWord="InvalidEscapedReservedWord",e.InvalidExpression="InvalidExpression",e.InvalidFunctionIdentifier="InvalidFunctionIdentifier",e.InvalidHexEscapeSequence="InvalidHexEscapeSequence",e.InvalidLeftHandSideInAssignment="InvalidLeftHandSideInAssignment",e.InvalidLeftHandSideInForIn="InvalidLeftHandSideInForIn",e.InvalidTemplateHead="InvalidTemplateHead",e.InvalidVariableAssignment="InvalidVariableAssignment",e.KeyMustBeString="KeyMustBeString",e.NoFunctionInsideBlock="NoFunctionInsideBlock",e.NoFunctionInsideFunction="NoFunctionInsideFunction",e.ModuleExportRootOnly="ModuleExportRootOnly",e.ModuleImportRootOnly="ModuleImportRootOnly",e.PunctuatorExpected="PunctuatorExpected",e.TemplateOctalLiteral="TemplateOctalLiteral",e.UnexpectedBoolean="UnexpectedBoolean",e.UnexpectedEndOfScript="UnexpectedEndOfScript",e.UnexpectedIdentifier="UnexpectedIdentifier",e.UnexpectedKeyword="UnexpectedKeyword",e.UnexpectedNull="UnexpectedNull",e.UnexpectedNumber="UnexpectedNumber",e.UnexpectedPunctuator="UnexpectedPunctuator",e.UnexpectedString="UnexpectedString",e.UnexpectedTemplate="UnexpectedTemplate",e.UnexpectedToken="UnexpectedToken",e))(d||{}),u=[[],[],[]];["++","--"].forEach((e=>u[e.length-1].push(e))),["-","+","!","~"].forEach((e=>u[e.length-1].push(e))),["||","&&"].forEach((e=>u[e.length-1].push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>u[e.length-1].push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>u[e.length-1].push(e)));var g,m=((g=m||{}).AlreadyDefined="AlreadyDefined",g.ApiConflict="ApiConflict",g.AssignedNeverUsed="AssignedNeverUsed",g.DefinedNeverAssigned="DefinedNeverAssigned",g.DefinedNeverUsed="DefinedNeverUsed",g.EmptyBlockStatement="EmptyBlockStatement",g.ExecutionError="ExecutionError",g.InvalidApiFunctionUsage="InvalidApiFunctionUsage",g.InvalidConstantIdentifier="InvalidConstantIdentifier",g.InvalidPropertyIdentifier="InvalidPropertyIdentifier",g.NoArgumentExpected="NoArgumentExpected",g.NotADictionary="NotADictionary",g.NotDefined="NotDefined",g.NotEnoughArguments="NotEnoughArguments",g.ProfileVariablesAreImmutable="ProfileVariablesAreImmutable",g.ProfileVariablesConflict="ProfileVariablesConflict",g.ReservedKeyword="ReservedKeyword",g.TooManyArguments="TooManyArguments",g.UnexpectedEmptyFunction="UnexpectedEmptyFunction",g.UnexpectedPropertyIdentifier="UnexpectedPropertyIdentifier",g.UnknownPropertyIdentifier="UnknownPropertyIdentifier",g),x=Object.values(c);Object.values(a).map((t=>({label:t,kind:e.CompletionItemKind.Constant}))),x.map((t=>({label:t,kind:e.CompletionItemKind.Keyword})));const h={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/}},f={defaultToken:"invalid",tokenPostfix:".arc",ignoreCase:!0,keywords:x.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number"],[/0[xX](@hexdigits)/,"number"],[/0[oO]?(@octaldigits)/,"number"],[/0[bB](@binarydigits)/,"number"],[/(@digits)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],import:[[/import(?=\s)/,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/,"identifier"],{include:"@whitespace"},[/from/,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};class b{constructor(e,n,{defaults:r,diagnosticsService:i}){this._languageId=e,this._worker=n,this._disposables=[],this._listener=Object.create(null),this._diagnosticsService=i,this._defaults=r;const s=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;let n;this._listener[e.uri.toString()]=e.onDidChangeContent((()=>{window.clearTimeout(n),n=window.setTimeout((()=>this._doValidate(e,t)),500)})),this._doValidate(e,t)},o=e=>{const n=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const r=this._listener[n];r&&(r.dispose(),delete this._listener[n])};this._disposables.push(t.onDidCreateModel(s)),this._disposables.push(t.onWillDisposeModel((e=>{o(e)}))),this._disposables.push(t.onDidChangeModelLanguage((e=>{o(e.model),s(e.model)}))),this._disposables.push(r.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),s(e))}))}))),this._disposables.push(r.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId)}))}))),this._disposables.push({dispose:()=>{for(const e in this._listener)this._listener[e].dispose()}}),t.getModels().forEach(s)}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables=[]}async _doValidate(e,n){if(e.isAttachedToEditor())try{const r=await this._worker(e.uri),i=this._defaults.getApiContextForModel(e.uri),s=await r.doValidation(e.uri.toString(),i),o=s.map((e=>{return{severity:k((t=e).severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message};var t}));this._diagnosticsService.fireDiagnosticsChange(e.uri,s),t.setModelMarkers(e,n,o)}catch(e){console.error(e)}}}function k(t){switch(t){case e.DiagnosticSeverity.Error:return n.Error;case e.DiagnosticSeverity.Warning:return n.Warning;case e.DiagnosticSeverity.Information:return n.Info;case e.DiagnosticSeverity.Hint:return n.Hint;default:return n.Info}}function w(e){return new r(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function I(e){return{range:w(e.range),text:e.newText}}function y(t){const n=i.CompletionItemKind;switch(t){case e.CompletionItemKind.Text:return n.Text;case e.CompletionItemKind.Method:return n.Method;case e.CompletionItemKind.Function:return n.Function;case e.CompletionItemKind.Constructor:return n.Constructor;case e.CompletionItemKind.Field:return n.Field;case e.CompletionItemKind.Variable:return n.Variable;case e.CompletionItemKind.Class:return n.Class;case e.CompletionItemKind.Interface:return n.Interface;case e.CompletionItemKind.Module:return n.Module;case e.CompletionItemKind.Property:return n.Property;case e.CompletionItemKind.Unit:return n.Unit;case e.CompletionItemKind.Value:return n.Value;case e.CompletionItemKind.Enum:return n.Enum;case e.CompletionItemKind.Keyword:return n.Keyword;case e.CompletionItemKind.Snippet:return n.Snippet;case e.CompletionItemKind.Color:return n.Color;case e.CompletionItemKind.File:return n.File;case e.CompletionItemKind.Reference:return n.Reference;case e.CompletionItemKind.Folder:return n.Folder;case e.CompletionItemKind.EnumMember:return n.EnumMember;case e.CompletionItemKind.Constant:return n.Constant;case e.CompletionItemKind.Struct:return n.Struct;case e.CompletionItemKind.Event:return n.Event;case e.CompletionItemKind.Operator:return n.Operator;case e.CompletionItemKind.TypeParameter:return n.TypeParameter}return n.Property}class v{constructor(e,t){this._worker=e,this._defaults=t,this.triggerCharacters=[".","("]}async provideCompletionItems(t,n){const s=await this._worker(t.uri),o=this._defaults.getApiContextForModel(t.uri),a=await s.doComplete(t.uri.toString(),function(e){return{character:e.column-1,line:e.lineNumber-1}}(n),o);if(!a)return;const c=t.getWordUntilPosition(n),l=new r(n.lineNumber,c.startColumn,n.lineNumber,c.endColumn),p=a.items.map((t=>{const n={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:l,kind:y(t.kind)};var r;return t.textEdit&&(n.range=void 0!==(r=t.textEdit).insert&&void 0!==r.replace?{insert:w(t.textEdit.insert),replace:w(t.textEdit.replace)}:w(t.textEdit.range),n.insertText=t.textEdit.newText),t.additionalTextEdits&&(n.additionalTextEdits=t.additionalTextEdits.map(I)),t.insertTextFormat===e.InsertTextFormat.Snippet&&(n.insertTextRules=i.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(n.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),n}));return{incomplete:a.isIncomplete,suggestions:p}}}class E{constructor(e,t){this._worker=e,this._defaults=t}async provideDocumentFormattingEdits(e){const t=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri.toString()),r=await t.doFormat(e.uri.toString(),n);return r?r.map((e=>({range:w(e.range),text:e.newText}))):[]}}class S{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}_getClientProxy(){if(!this._client){const{languageId:e,languageOptions:n}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e,languageOptions:n}}),this._client=this._worker.getProxy()}return this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}let A;async function C(...e){return new Promise(((t,n)=>{if(!A)return n("TypeScript not registered!");t(A(...e))}))}const U=new class{constructor(){this._onDiagnosticsChange=new s}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function F(){return U}function P(e){const t=new S(e),n=(...e)=>t.getLanguageServiceWorker(...e);A=n,i.setMonarchTokensProvider(e.languageId,f),i.setLanguageConfiguration(e.languageId,h),i.registerCompletionItemProvider(e.languageId,new v(n,e)),i.registerDocumentFormattingEditProvider(e.languageId,new E(n,e)),new b(e.languageId,n,{defaults:e,diagnosticsService:U})}export{F as getArcadeDiagnosticService,C as getArcadeWorker,P as setupMode}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as e}from"./p-aef064f5.js";import"./p-0fa0a06d.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as t}from"./p-aef064f5.js";import"./p-0fa0a06d.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -118050,7 +118050,7 @@ registerLanguage({
|
|
|
118050
118050
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
118051
118051
|
loader: () => {
|
|
118052
118052
|
{
|
|
118053
|
-
return Promise.resolve().then(function () { return require('./html-
|
|
118053
|
+
return Promise.resolve().then(function () { return require('./html-136832b8.js'); });
|
|
118054
118054
|
}
|
|
118055
118055
|
}
|
|
118056
118056
|
});
|
|
@@ -118070,7 +118070,7 @@ registerLanguage({
|
|
|
118070
118070
|
mimetypes: ["text/javascript"],
|
|
118071
118071
|
loader: () => {
|
|
118072
118072
|
{
|
|
118073
|
-
return Promise.resolve().then(function () { return require('./javascript-
|
|
118073
|
+
return Promise.resolve().then(function () { return require('./javascript-56139040.js'); });
|
|
118074
118074
|
}
|
|
118075
118075
|
}
|
|
118076
118076
|
});
|
|
@@ -118088,7 +118088,7 @@ registerLanguage({
|
|
|
118088
118088
|
mimetypes: ["text/typescript"],
|
|
118089
118089
|
loader: () => {
|
|
118090
118090
|
{
|
|
118091
|
-
return Promise.resolve().then(function () { return require('./typescript-
|
|
118091
|
+
return Promise.resolve().then(function () { return require('./typescript-f0cfd4cb.js'); });
|
|
118092
118092
|
}
|
|
118093
118093
|
}
|
|
118094
118094
|
});
|
|
@@ -118209,7 +118209,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
|
|
|
118209
118209
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
118210
118210
|
function getMode$3() {
|
|
118211
118211
|
{
|
|
118212
|
-
return Promise.resolve().then(function () { return require('./cssMode-
|
|
118212
|
+
return Promise.resolve().then(function () { return require('./cssMode-227ba353.js'); });
|
|
118213
118213
|
}
|
|
118214
118214
|
}
|
|
118215
118215
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -118334,7 +118334,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
118334
118334
|
};
|
|
118335
118335
|
function getMode$2() {
|
|
118336
118336
|
{
|
|
118337
|
-
return Promise.resolve().then(function () { return require('./htmlMode-
|
|
118337
|
+
return Promise.resolve().then(function () { return require('./htmlMode-23c0a87d.js'); });
|
|
118338
118338
|
}
|
|
118339
118339
|
}
|
|
118340
118340
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -118436,7 +118436,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
|
|
|
118436
118436
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults };
|
|
118437
118437
|
function getMode$1() {
|
|
118438
118438
|
{
|
|
118439
|
-
return Promise.resolve().then(function () { return require('./jsonMode-
|
|
118439
|
+
return Promise.resolve().then(function () { return require('./jsonMode-9feba6fc.js'); });
|
|
118440
118440
|
}
|
|
118441
118441
|
}
|
|
118442
118442
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -118705,7 +118705,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
118705
118705
|
};
|
|
118706
118706
|
function getMode() {
|
|
118707
118707
|
{
|
|
118708
|
-
return Promise.resolve().then(function () { return require('./tsMode-
|
|
118708
|
+
return Promise.resolve().then(function () { return require('./tsMode-b9e964b4.js'); });
|
|
118709
118709
|
}
|
|
118710
118710
|
}
|
|
118711
118711
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -167309,7 +167309,7 @@ function isPredefinedProfile(item) {
|
|
|
167309
167309
|
!Array.isArray(item.definitions));
|
|
167310
167310
|
}
|
|
167311
167311
|
|
|
167312
|
-
var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function
|
|
167312
|
+
var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function p(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let i of o)S(e,i.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function P(e){let t=T(e,":is(.calcite-mode-light, .calcite-mode-dark)");return t&&t.classList.contains("calcite-mode-dark")?"dark":"light"}function E(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}function M(e){return e.nodeType===Node.ELEMENT_NODE}function c(e,t=""){if(!M(e))return !1;if(e.matches(t))return setTimeout(()=>e?.setFocus(),0),!0;for(let r=0;r<e.children.length;r++)if(c(e.children[r],t))return !0;let n=e.shadowRoot;if(n){for(let r=0;r<n.children.length;r++)if(c(n.children[r],t))return !0}return !1}function C(e,t){if(!e||!e.shadowRoot)return;if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){c(e,t);return}let n=new MutationObserver(()=>{n.disconnect(),c(e,t);});n.observe(e,{attributes:!0,attributeFilter:["hydrated","calcite-hydrated"]});}function d(e){let t="";for(let n=0;n<e;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}function k(){return [d(2),d(1),d(1),d(1),d(3)].join("-")}var x=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function N(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let s=await o.json();return a.set(r,s),s}if(e==="en"){a.set(r,void 0);return}let i=await N("en",t,n);return a.set(r,i),i}catch{a.set(r,void 0);return}}function R(e){let t=E(e,"lang",navigator?.language||"en");if(x.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:x.has(n)?n:"en"}}var f=new WeakMap,m=new WeakMap,_=new WeakMap;async function $(e,t,n){m.set(e,t),f.set(e,p(e._hostElement,["lang"],()=>{b(e,n);})),await b(e,n);}function F(e){f.get(e)?.disconnect(),f.delete(e),m.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=R(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=_.get(e);if(!o){let i=m.get(e)??"",s=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),u=`${i}/${s}/t9n`,l=`${s}.t9n.`;o=await N(r,u,l);}e._t9nLocale=r,e._t9nStrings=o,await t?.call(e);}var v='"',w="'";function L(e,t){return new Array(t+1).join(e)}function W(e){let t=v,n=w;e.indexOf(t)>=0&&e.indexOf(n)<0&&(n=v,t=w);let o=new RegExp("(^|[^\\\\])((?:\\\\{2})*)((?:\\\\"+n+")+)","g");e=e.replace(o,(s,u,l,g)=>u+l+L(n,g.length/2));let i=new RegExp("(^|[^\\\\])((?:\\\\{2})*)("+t+"+)","g");return e=e.replace(i,(s,u,l,g)=>u+l+L("\\"+t,g.length)),t+e+t}function z(e){let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"):"^.*$";return new RegExp(t,"i")}function B(e,t={}){return (e??"").replace(/\{(.*?)\}/g,(n,r)=>t[r]??n)}function q(e){return "\u200E"+(e??"")+"\u200E"}function Q(e){return e!==null}function G(e){return e!==void 0}function V(e,t,n=!1){if(!e||!t)return !1;let r=new URL(e),o=new URL(t);return !n&&r.protocol!==o.protocol||r.host==null||o.host==null?!1:r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port}function D(e){try{return new URL(e),!0}catch{return !1}}
|
|
167313
167313
|
|
|
167314
167314
|
/**
|
|
167315
167315
|
* Filters a collection of items by the given keys and filter word.
|
|
@@ -168809,12 +168809,11 @@ exports.IStandaloneThemeService = IStandaloneThemeService;
|
|
|
168809
168809
|
exports.KeyCode = KeyCode;
|
|
168810
168810
|
exports.KeyMod = KeyMod;
|
|
168811
168811
|
exports.MarkerSeverity = MarkerSeverity;
|
|
168812
|
-
exports.
|
|
168812
|
+
exports.P = P;
|
|
168813
168813
|
exports.Range = Range;
|
|
168814
168814
|
exports.Uri = Uri;
|
|
168815
168815
|
exports.V = V;
|
|
168816
168816
|
exports.W = W;
|
|
168817
|
-
exports._ = _;
|
|
168818
168817
|
exports.arcade = arcade;
|
|
168819
168818
|
exports.arcadeDefaults = arcadeDefaults;
|
|
168820
168819
|
exports.commonjsGlobal = commonjsGlobal;
|
|
@@ -168825,6 +168824,7 @@ exports.generateTokensCSSForColorMap = generateTokensCSSForColorMap;
|
|
|
168825
168824
|
exports.h = h;
|
|
168826
168825
|
exports.importArcade = importArcade;
|
|
168827
168826
|
exports.importRequest = importRequest;
|
|
168827
|
+
exports.k = k;
|
|
168828
168828
|
exports.languages = languages;
|
|
168829
168829
|
exports.main = main;
|
|
168830
168830
|
exports.monaco_editor_core_star = monaco_editor_core_star;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-66d482f5.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
var ge=(e=>(e.False="false",e.Null="null",e.True="true",e))(ge||{}),xe=(e=>(e.Break="break",e.Continue="continue",e.Else="else",e.For="for",e.From="from",e.Function="function",e.If="if",e.Import="import",e.Export="export",e.In="in",e.Return="return",e.Var="var",e.While="while",e))(xe||{}),c=(e=>(e.AssignmentExpression="AssignmentExpression",e.ArrayExpression="ArrayExpression",e.BlockComment="BlockComment",e.BlockStatement="BlockStatement",e.BinaryExpression="BinaryExpression",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.ContinueStatement="ContinueStatement",e.EmptyStatement="EmptyStatement",e.ExpressionStatement="ExpressionStatement",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ForStatement="ForStatement",e.ForInStatement="ForInStatement",e.FunctionDeclaration="FunctionDeclaration",e.Identifier="Identifier",e.IfStatement="IfStatement",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.LineComment="LineComment",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.ObjectExpression="ObjectExpression",e.Program="Program",e.Property="Property",e.ReturnStatement="ReturnStatement",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e))(c||{}),De=["++","--"],We=["-","+","!","~"],qe=["=","/=","*=","%=","+=","-="],He=["||","&&"],bt=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"],It=(e=>(e[e.Unknown=0]="Unknown",e[e.BooleanLiteral=1]="BooleanLiteral",e[e.EOF=2]="EOF",e[e.Identifier=3]="Identifier",e[e.Keyword=4]="Keyword",e[e.NullLiteral=5]="NullLiteral",e[e.NumericLiteral=6]="NumericLiteral",e[e.Punctuator=7]="Punctuator",e[e.StringLiteral=8]="StringLiteral",e[e.Template=10]="Template",e))(It||{}),kt=(e=>(e.InvalidModuleUri="InvalidModuleUri",e.ForInOfLoopInitializer="ForInOfLoopInitializer",e.IdentiferExpected="IdentiferExpected",e.InvalidEscapedReservedWord="InvalidEscapedReservedWord",e.InvalidExpression="InvalidExpression",e.InvalidFunctionIdentifier="InvalidFunctionIdentifier",e.InvalidHexEscapeSequence="InvalidHexEscapeSequence",e.InvalidLeftHandSideInAssignment="InvalidLeftHandSideInAssignment",e.InvalidLeftHandSideInForIn="InvalidLeftHandSideInForIn",e.InvalidTemplateHead="InvalidTemplateHead",e.InvalidVariableAssignment="InvalidVariableAssignment",e.KeyMustBeString="KeyMustBeString",e.NoFunctionInsideBlock="NoFunctionInsideBlock",e.NoFunctionInsideFunction="NoFunctionInsideFunction",e.ModuleExportRootOnly="ModuleExportRootOnly",e.ModuleImportRootOnly="ModuleImportRootOnly",e.PunctuatorExpected="PunctuatorExpected",e.TemplateOctalLiteral="TemplateOctalLiteral",e.UnexpectedBoolean="UnexpectedBoolean",e.UnexpectedEndOfScript="UnexpectedEndOfScript",e.UnexpectedIdentifier="UnexpectedIdentifier",e.UnexpectedKeyword="UnexpectedKeyword",e.UnexpectedNull="UnexpectedNull",e.UnexpectedNumber="UnexpectedNumber",e.UnexpectedPunctuator="UnexpectedPunctuator",e.UnexpectedString="UnexpectedString",e.UnexpectedTemplate="UnexpectedTemplate",e.UnexpectedToken="UnexpectedToken",e))(kt||{});var v=[[],[],[]];De.forEach(e=>v[e.length-1].push(e));We.forEach(e=>v[e.length-1].push(e));He.forEach(e=>v[e.length-1].push(e));qe.forEach(e=>v[e.length-1].push(e));bt.forEach(e=>v[e.length-1].push(e));var rt=(D=>(D.AlreadyDefined="AlreadyDefined",D.ApiConflict="ApiConflict",D.AssignedNeverUsed="AssignedNeverUsed",D.DefinedNeverAssigned="DefinedNeverAssigned",D.DefinedNeverUsed="DefinedNeverUsed",D.EmptyBlockStatement="EmptyBlockStatement",D.ExecutionError="ExecutionError",D.InvalidApiFunctionUsage="InvalidApiFunctionUsage",D.InvalidConstantIdentifier="InvalidConstantIdentifier",D.InvalidPropertyIdentifier="InvalidPropertyIdentifier",D.NoArgumentExpected="NoArgumentExpected",D.NotADictionary="NotADictionary",D.NotDefined="NotDefined",D.NotEnoughArguments="NotEnoughArguments",D.ProfileVariablesAreImmutable="ProfileVariablesAreImmutable",D.ProfileVariablesConflict="ProfileVariablesConflict",D.ReservedKeyword="ReservedKeyword",D.TooManyArguments="TooManyArguments",D.UnexpectedEmptyFunction="UnexpectedEmptyFunction",D.UnexpectedPropertyIdentifier="UnexpectedPropertyIdentifier",D.UnknownPropertyIdentifier="UnknownPropertyIdentifier",D))(rt||{});var st=Object.values(xe),at=Object.values(ge);at.map(e=>({label:e,kind:arcadeDefaults.main.CompletionItemKind.Constant}));st.map(e=>({label:e,kind:arcadeDefaults.main.CompletionItemKind.Keyword}));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f8a85eb8.js');
|
|
6
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
6
|
+
const arcadeDefaults = require('./arcade-defaults-66d482f5.js');
|
|
7
7
|
|
|
8
8
|
async function colorizeCode(code) {
|
|
9
9
|
return arcadeDefaults.editor.colorize(code, "arcade", { tabSize: 2 });
|
|
@@ -3019,7 +3019,7 @@ async function getArcadeWorker(uri) {
|
|
|
3019
3019
|
* @returns mode for arcade
|
|
3020
3020
|
*/
|
|
3021
3021
|
function getMode() {
|
|
3022
|
-
return Promise.resolve().then(function () { return require('./arcade-mode-
|
|
3022
|
+
return Promise.resolve().then(function () { return require('./arcade-mode-1005dec4.js'); });
|
|
3023
3023
|
}
|
|
3024
3024
|
// Register the language in Monaco
|
|
3025
3025
|
arcadeDefaults.languages.register({
|
|
@@ -3082,7 +3082,8 @@ const ArcgisArcadeApi = class {
|
|
|
3082
3082
|
};
|
|
3083
3083
|
// @ts-expect-error
|
|
3084
3084
|
this._updateFilterValue = (e) => (this._filterValue = e.target?.["value"] ?? "");
|
|
3085
|
-
this.
|
|
3085
|
+
this._lang = "";
|
|
3086
|
+
this._t9nLocale = "";
|
|
3086
3087
|
this._t9nStrings = undefined;
|
|
3087
3088
|
this._selectedApiItem = undefined;
|
|
3088
3089
|
this._filterValue = "";
|
|
@@ -3151,7 +3152,7 @@ const ArcgisArcadeApi = class {
|
|
|
3151
3152
|
// When switching between flow the same reference is reused
|
|
3152
3153
|
this._flowObserver = new MutationObserver(() => {
|
|
3153
3154
|
// Get the last panel and try to set focus on the input element
|
|
3154
|
-
arcadeDefaults.
|
|
3155
|
+
arcadeDefaults.C(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
3155
3156
|
});
|
|
3156
3157
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
3157
3158
|
}
|
|
@@ -3183,7 +3184,7 @@ const ArcgisArcadeApi = class {
|
|
|
3183
3184
|
return (index.h(index.Host, null, index.h("style", null, this._colorizeStyle), index.h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, index.h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, closable: true, onCalciteFlowItemClose: this._emitClose }, index.h(StickyFilterInput, { filterValue: this._filterValue, onCalciteInputInput: this._updateFilterValue }), this._preparingApi ? (index.h("calcite-loader", { scale: "s", type: "indeterminate", label: this._t9nStrings?.loading ?? "Loading" })) : (index.h("calcite-list", null, empty ? index.h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No items") : categories))), this.renderApiItemFlowItem())));
|
|
3184
3185
|
}
|
|
3185
3186
|
static get assetsDirs() { return ["assets"]; }
|
|
3186
|
-
get
|
|
3187
|
+
get _hostElement() { return index.getElement(this); }
|
|
3187
3188
|
};
|
|
3188
3189
|
ArcgisArcadeApi.style = arcadeApiCss;
|
|
3189
3190
|
|
|
@@ -3433,7 +3434,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3433
3434
|
this.scriptChange = index.createEvent(this, "scriptChange", 3);
|
|
3434
3435
|
this.diagnosticsChange = index.createEvent(this, "diagnosticsChange", 3);
|
|
3435
3436
|
this._componentReadyDefer = new arcadeDefaults.h();
|
|
3436
|
-
this._modelId = arcadeDefaults.
|
|
3437
|
+
this._modelId = arcadeDefaults.k();
|
|
3437
3438
|
this._editorProfilePromise = Promise.resolve(undefined);
|
|
3438
3439
|
this._disposables = [];
|
|
3439
3440
|
this._executeScript = async () => {
|
|
@@ -3478,7 +3479,8 @@ const ArcgisArcadeEditor = class {
|
|
|
3478
3479
|
this._insertAsText = (e) => this._codeEditorElt?.insertText(e.detail);
|
|
3479
3480
|
this._onResultPanelChange = (e) => (this._resultPanel = e.detail);
|
|
3480
3481
|
this._onExecutionPanelClose = () => (this._showExecutionPanel = false);
|
|
3481
|
-
this.
|
|
3482
|
+
this._lang = "";
|
|
3483
|
+
this._t9nLocale = "";
|
|
3482
3484
|
this._t9nStrings = undefined;
|
|
3483
3485
|
this._standaloneCodeEditor = undefined;
|
|
3484
3486
|
this._preparingProfile = false;
|
|
@@ -3573,11 +3575,11 @@ const ArcgisArcadeEditor = class {
|
|
|
3573
3575
|
* @internal
|
|
3574
3576
|
*/
|
|
3575
3577
|
async updateThemeColors(colorRules) {
|
|
3576
|
-
const theme = arcadeDefaults.
|
|
3578
|
+
const theme = arcadeDefaults.P(this._hostElement);
|
|
3577
3579
|
updateThemeColors(theme, colorRules);
|
|
3578
3580
|
if (colorRules === undefined) {
|
|
3579
3581
|
["comment", "keyword", "identifier", "string", "number", "constant", "date"].forEach((key) => {
|
|
3580
|
-
this.
|
|
3582
|
+
this._hostElement.style.removeProperty(`--arcgis-arcade-editor-${key}`);
|
|
3581
3583
|
});
|
|
3582
3584
|
return;
|
|
3583
3585
|
}
|
|
@@ -3587,7 +3589,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3587
3589
|
if (!foreground) {
|
|
3588
3590
|
return;
|
|
3589
3591
|
}
|
|
3590
|
-
this.
|
|
3592
|
+
this._hostElement.style.setProperty(`--arcgis-arcade-editor-${key}`, foreground);
|
|
3591
3593
|
});
|
|
3592
3594
|
}
|
|
3593
3595
|
// #endregion
|
|
@@ -3647,7 +3649,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3647
3649
|
try {
|
|
3648
3650
|
// Set a new profile for the model using the profile definition and the locale.
|
|
3649
3651
|
await arcadeDefaults.arcadeDefaults.setProfileForModel(this._modelId, this.profile, {
|
|
3650
|
-
locale: this.
|
|
3652
|
+
locale: this._t9nLocale,
|
|
3651
3653
|
snippets: this.snippets
|
|
3652
3654
|
});
|
|
3653
3655
|
// Get the corresponding editor profile for the model.
|
|
@@ -3685,7 +3687,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3685
3687
|
if (this.hideSideBar) {
|
|
3686
3688
|
return null;
|
|
3687
3689
|
}
|
|
3688
|
-
return (index.h("calcite-action-bar", { class: "side-action-bar border-inline-start", expanded: !!this.sideActionBarExpanded, position: "end", onCalciteActionBarToggle: this._toggleSideActionBarExpanded }, index.h("calcite-action-group", null, index.h("calcite-action", { id: "profile-variables-action", text: this._t9nStrings?.profilevariables ?? "Profile variables", icon: "profile-variables", active: this.openedSidePanel === "variables", onClick: this._toggleSidePanel, "data-panel-name": "variables" }), index.h("calcite-action", { id: "function-action", text: this._t9nStrings?.constantsandfunctions ?? "Constants and functions", icon: "function", active: this.openedSidePanel === "api", onClick: this._toggleSidePanel, "data-panel-name": "api" }), this.suggestions?.length ? (index.h(index.Fragment, null, index.h("calcite-action", { id: "suggestions-action", text: this._t9nStrings?.suggestions ?? "Suggestions", icon: "lightbulb", active: this.openedSidePanel === "suggestions", onClick: this._toggleSidePanel, "data-panel-name": "suggestions" }))) : null, this.hideDocumentationActions ? null : (index.h(index.Fragment, null, index.h("calcite-action", { id: "developer-website-action", text: this._t9nStrings?.help ?? "Help", icon: "question", iconFlipRtl: this.
|
|
3690
|
+
return (index.h("calcite-action-bar", { class: "side-action-bar border-inline-start", expanded: !!this.sideActionBarExpanded, position: "end", onCalciteActionBarToggle: this._toggleSideActionBarExpanded }, index.h("calcite-action-group", null, index.h("calcite-action", { id: "profile-variables-action", text: this._t9nStrings?.profilevariables ?? "Profile variables", icon: "profile-variables", active: this.openedSidePanel === "variables", onClick: this._toggleSidePanel, "data-panel-name": "variables" }), index.h("calcite-action", { id: "function-action", text: this._t9nStrings?.constantsandfunctions ?? "Constants and functions", icon: "function", active: this.openedSidePanel === "api", onClick: this._toggleSidePanel, "data-panel-name": "api" }), this.suggestions?.length ? (index.h(index.Fragment, null, index.h("calcite-action", { id: "suggestions-action", text: this._t9nStrings?.suggestions ?? "Suggestions", icon: "lightbulb", active: this.openedSidePanel === "suggestions", onClick: this._toggleSidePanel, "data-panel-name": "suggestions" }))) : null, this.hideDocumentationActions ? null : (index.h(index.Fragment, null, index.h("calcite-action", { id: "developer-website-action", text: this._t9nStrings?.help ?? "Help", icon: "question", iconFlipRtl: this._t9nLocale === "ar", onClick: this._openArcadeHelp }))))));
|
|
3689
3691
|
}
|
|
3690
3692
|
// private renderTooltip(id: string, label: string | undefined): VNode | null {
|
|
3691
3693
|
// if (this.sideActionBarExpanded || !label) {
|
|
@@ -3728,7 +3730,7 @@ const ArcgisArcadeEditor = class {
|
|
|
3728
3730
|
return (index.h(index.Host, null, this.renderMainActionBar(), index.h("div", { class: "flex-row flex-adjustable" }, index.h("div", { class: "flex-column flex-adjustable" }, this.renderMainPanel(), this.renderResultsPanel()), this.renderSidePanel(), this.renderSideActionBar())));
|
|
3729
3731
|
}
|
|
3730
3732
|
static get assetsDirs() { return ["assets"]; }
|
|
3731
|
-
get
|
|
3733
|
+
get _hostElement() { return index.getElement(this); }
|
|
3732
3734
|
static get watchers() { return {
|
|
3733
3735
|
"profile": ["_profileChanged"],
|
|
3734
3736
|
"testData": ["_testDataChanged"],
|
|
@@ -3823,7 +3825,8 @@ const ArcgisArcadeResults = class {
|
|
|
3823
3825
|
this.updateResultPanel(panelName);
|
|
3824
3826
|
};
|
|
3825
3827
|
this._emitClose = () => this.close.emit();
|
|
3826
|
-
this.
|
|
3828
|
+
this._lang = "";
|
|
3829
|
+
this._t9nLocale = "";
|
|
3827
3830
|
this._t9nStrings = undefined;
|
|
3828
3831
|
this.loading = true;
|
|
3829
3832
|
this.openedResultPanel = "output";
|
|
@@ -3866,15 +3869,15 @@ const ArcgisArcadeResults = class {
|
|
|
3866
3869
|
}
|
|
3867
3870
|
const iconClass = this.result?.type === "error" ? "color-error" : "color-success";
|
|
3868
3871
|
return (index.h("calcite-list", null, this.result ? (index.h(index.Fragment, null, index.h("calcite-list-item", { label: arcadeDefaults.B(this._t9nStrings?.lastexecutionformat, {
|
|
3869
|
-
timeStamp: new Intl.DateTimeFormat(this.
|
|
3872
|
+
timeStamp: new Intl.DateTimeFormat(this._t9nLocale, { dateStyle: "medium", timeStyle: "medium" }).format(this.result.timeStamp)
|
|
3870
3873
|
}) }, index.h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), index.h("calcite-list-item", { label: arcadeDefaults.B(this._t9nStrings?.compilationtimeformat, {
|
|
3871
|
-
time: new Intl.NumberFormat(this.
|
|
3874
|
+
time: new Intl.NumberFormat(this._t9nLocale, {
|
|
3872
3875
|
style: "unit",
|
|
3873
3876
|
unit: "millisecond",
|
|
3874
3877
|
maximumFractionDigits: 2
|
|
3875
3878
|
}).format(this.result.compilationTime ?? 0)
|
|
3876
3879
|
}) }, index.h("calcite-icon", { slot: "content-start", icon: "information", scale: "s", class: iconClass })), index.h("calcite-list-item", { label: arcadeDefaults.B(this._t9nStrings?.executiontimeformat, {
|
|
3877
|
-
time: new Intl.NumberFormat(this.
|
|
3880
|
+
time: new Intl.NumberFormat(this._t9nLocale, {
|
|
3878
3881
|
style: "unit",
|
|
3879
3882
|
unit: "millisecond",
|
|
3880
3883
|
maximumFractionDigits: 2
|
|
@@ -4023,7 +4026,7 @@ const ArcgisArcadeResults = class {
|
|
|
4023
4026
|
return (index.h(index.Host, null, index.h("header", { class: "flex-row" }, index.h("calcite-action-bar", { class: "flex-adjustable", layout: "horizontal", scale: "s", expanded: true, "expand-disabled": true }, index.h("calcite-action-group", { layout: "horizontal", scale: "s" }, index.h("calcite-action", { active: this.openedResultPanel === "output", text: this._t9nStrings?.output ?? "Output", "text-enabled": true, scale: "s", icon: "list-show-all", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "output" }), index.h("calcite-action", { active: this.openedResultPanel === "console", text: this._t9nStrings?.console ?? "Console", "text-enabled": true, scale: "s", icon: "console", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "console" }), index.h("calcite-action", { active: this.openedResultPanel === "log", text: this._t9nStrings?.log ?? "Log", "text-enabled": true, scale: "s", icon: "list", iconFlipRtl: true, onClick: this._switchResultPanel, "data-panel-name": "log" }))), index.h("calcite-action", { scale: "s", icon: "x", text: this._t9nStrings?.close ?? "", onClick: this._emitClose })), index.h("article", { class: "flex-adjustable" }, this.loading ? (index.h("calcite-loader", { scale: "s", type: "indeterminate", label: "" })) : (index.h("div", { class: "flex-column y-scrollable-container" }, this.renderOutputPanel(), this.renderConsolePanel(), this.renderLogPanel())))));
|
|
4024
4027
|
}
|
|
4025
4028
|
static get assetsDirs() { return ["assets"]; }
|
|
4026
|
-
get
|
|
4029
|
+
get _hostElement() { return index.getElement(this); }
|
|
4027
4030
|
};
|
|
4028
4031
|
ArcgisArcadeResults.style = arcadeResultsCss;
|
|
4029
4032
|
|
|
@@ -4069,7 +4072,8 @@ const ArcgisArcadeSuggestions = class {
|
|
|
4069
4072
|
};
|
|
4070
4073
|
this._emitClose = () => this.close.emit();
|
|
4071
4074
|
this._beforeBack = async () => (this._selectedSuggestion = undefined);
|
|
4072
|
-
this.
|
|
4075
|
+
this._lang = "";
|
|
4076
|
+
this._t9nLocale = "";
|
|
4073
4077
|
this._t9nStrings = undefined;
|
|
4074
4078
|
this._selectedSuggestion = undefined;
|
|
4075
4079
|
this._filterValue = "";
|
|
@@ -4107,7 +4111,7 @@ const ArcgisArcadeSuggestions = class {
|
|
|
4107
4111
|
// When switching between flow the same reference is reused
|
|
4108
4112
|
this._flowObserver = new MutationObserver(() => {
|
|
4109
4113
|
// Get the last panel and try to set focus on the input element
|
|
4110
|
-
arcadeDefaults.
|
|
4114
|
+
arcadeDefaults.C(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
4111
4115
|
});
|
|
4112
4116
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
4113
4117
|
}
|
|
@@ -4142,7 +4146,7 @@ const ArcgisArcadeSuggestions = class {
|
|
|
4142
4146
|
return (index.h(index.Host, null, index.h("style", null, this._colorizeStyle), index.h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, index.h("calcite-flow-item", { heading: this._t9nStrings?.suggestions, closable: true, onCalciteFlowItemClose: this._emitClose }, index.h(StickyFilterInput, { filterValue: this._filterValue, onCalciteInputInput: this._updateFilterValue }), index.h("calcite-list", null, this.renderSuggestionGroups())), this.renderSuggestionFlowItem())));
|
|
4143
4147
|
}
|
|
4144
4148
|
static get assetsDirs() { return ["assets"]; }
|
|
4145
|
-
get
|
|
4149
|
+
get _hostElement() { return index.getElement(this); }
|
|
4146
4150
|
static get watchers() { return {
|
|
4147
4151
|
"suggestions": ["suggestionsPropChanged"]
|
|
4148
4152
|
}; }
|
|
@@ -4190,7 +4194,8 @@ const ArcgisArcadeVariables = class {
|
|
|
4190
4194
|
e.stopPropagation();
|
|
4191
4195
|
this.addPanelRenderer(this.collectionBasedVariableRenderer(collectionVariable));
|
|
4192
4196
|
};
|
|
4193
|
-
this.
|
|
4197
|
+
this._lang = "";
|
|
4198
|
+
this._t9nLocale = "";
|
|
4194
4199
|
this._t9nStrings = undefined;
|
|
4195
4200
|
this._mutationCounter = 1;
|
|
4196
4201
|
this._flowItemRenderers = [];
|
|
@@ -4232,7 +4237,7 @@ const ArcgisArcadeVariables = class {
|
|
|
4232
4237
|
// When switching between flow the same reference is reused
|
|
4233
4238
|
this._flowObserver = new MutationObserver(() => {
|
|
4234
4239
|
// Get the last panel and try to set focus on the input element
|
|
4235
|
-
arcadeDefaults.
|
|
4240
|
+
arcadeDefaults.C(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
4236
4241
|
});
|
|
4237
4242
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
4238
4243
|
}
|
|
@@ -4282,7 +4287,7 @@ const ArcgisArcadeVariables = class {
|
|
|
4282
4287
|
return (index.h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, this.collectionBasedVariableRenderer(profile, true)(), this._flowItemRenderers.map((renderer) => renderer())));
|
|
4283
4288
|
}
|
|
4284
4289
|
static get assetsDirs() { return ["assets"]; }
|
|
4285
|
-
get
|
|
4290
|
+
get _hostElement() { return index.getElement(this); }
|
|
4286
4291
|
static get watchers() { return {
|
|
4287
4292
|
"modelId": ["modelIdPropChanged"]
|
|
4288
4293
|
}; }
|
|
@@ -4478,7 +4483,7 @@ const ArcgisCodeEditor = class {
|
|
|
4478
4483
|
// This is called the first time and subsequently by the Mutation Observer
|
|
4479
4484
|
// Figure out the theme by walking the ancestor path.
|
|
4480
4485
|
// If no theme is found then default to light.
|
|
4481
|
-
const theme = arcadeDefaults.
|
|
4486
|
+
const theme = arcadeDefaults.P(this._hostElt) === "light" ? "vs" : "vs-dark";
|
|
4482
4487
|
if (theme === this._currentTheme) {
|
|
4483
4488
|
return;
|
|
4484
4489
|
}
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["arcgis-arcade-api_6.cjs",[[0,"arcgis-arcade-editor",{"profile":[16],"script":[1],"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"],"
|
|
20
|
+
return index.bootstrapLazy([["arcgis-arcade-api_6.cjs",[[0,"arcgis-arcade-editor",{"profile":[16],"script":[1],"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"],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32],"_standaloneCodeEditor":[32],"_preparingProfile":[32],"_editorProfile":[32],"_showExecutionPanel":[32],"_resultPanel":[32],"_executingScript":[32],"_consoleLogs":[32],"_executionResult":[32],"getScript":[64],"setFocus":[64],"getEditorInstance":[64],"getTestResult":[64],"getOutputType":[64],"updateThemeColors":[64]}],[1,"arcgis-arcade-api",{"hideDocumentationActions":[4,"hide-documentation-actions"],"modelId":[1,"model-id"],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32],"_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],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32]}],[1,"arcgis-arcade-suggestions",{"suggestions":[16],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32],"_selectedSuggestion":[32],"_filterValue":[32],"_colorizeStyle":[32]}],[1,"arcgis-arcade-variables",{"loading":[4],"modelId":[1,"model-id"],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]}],[0,"arcgis-code-editor",{"value":[1],"language":[1],"modelId":[1,"model-id"],"getValue":[64],"setValue":[64],"insertText":[64],"insertSnippet":[64],"getEditorInstance":[64],"setFocus":[64]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-66d482f5.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-66d482f5.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-66d482f5.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const typescript = require('./typescript-
|
|
4
|
-
require('./arcade-defaults-
|
|
3
|
+
const typescript = require('./typescript-f0cfd4cb.js');
|
|
4
|
+
require('./arcade-defaults-66d482f5.js');
|
|
5
5
|
require('./index-f8a85eb8.js');
|
|
6
6
|
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-66d482f5.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["arcgis-arcade-api_6.cjs",[[0,"arcgis-arcade-editor",{"profile":[16],"script":[1],"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"],"
|
|
17
|
+
return index.bootstrapLazy([["arcgis-arcade-api_6.cjs",[[0,"arcgis-arcade-editor",{"profile":[16],"script":[1],"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"],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32],"_standaloneCodeEditor":[32],"_preparingProfile":[32],"_editorProfile":[32],"_showExecutionPanel":[32],"_resultPanel":[32],"_executingScript":[32],"_consoleLogs":[32],"_executionResult":[32],"getScript":[64],"setFocus":[64],"getEditorInstance":[64],"getTestResult":[64],"getOutputType":[64],"updateThemeColors":[64]}],[1,"arcgis-arcade-api",{"hideDocumentationActions":[4,"hide-documentation-actions"],"modelId":[1,"model-id"],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32],"_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],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32]}],[1,"arcgis-arcade-suggestions",{"suggestions":[16],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32],"_selectedSuggestion":[32],"_filterValue":[32],"_colorizeStyle":[32]}],[1,"arcgis-arcade-variables",{"loading":[4],"modelId":[1,"model-id"],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32],"_mutationCounter":[32],"_flowItemRenderers":[32],"_filterValue":[32]}],[0,"arcgis-code-editor",{"value":[1],"language":[1],"modelId":[1,"model-id"],"getValue":[64],"setValue":[64],"insertText":[64],"insertSnippet":[64],"getEditorInstance":[64],"setFocus":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-66d482f5.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const arcadeDefaults = require('./arcade-defaults-
|
|
3
|
+
const arcadeDefaults = require('./arcade-defaults-66d482f5.js');
|
|
4
4
|
require('./index-f8a85eb8.js');
|
|
5
5
|
|
|
6
6
|
/*!-----------------------------------------------------------------------------
|
|
@@ -3,7 +3,7 @@ import { g as generateColorizeStyles, o as onColorizeThemeChanged, c as convertM
|
|
|
3
3
|
import { S as StickyFilterInput } from './functional-components.js';
|
|
4
4
|
import { f as filterCollection } from './utilities.js';
|
|
5
5
|
import { Uri } from 'monaco-editor';
|
|
6
|
-
import { $, F,
|
|
6
|
+
import { $, F, C, q } from './index2.js';
|
|
7
7
|
import { b as arcadeDefaults } from './arcade-defaults.js';
|
|
8
8
|
import { a as getArcadeWorker } from './arcade-contribution.js';
|
|
9
9
|
import '@esri/calcite-components/dist/components/calcite-list-item-group.js';
|
|
@@ -62,7 +62,8 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
62
62
|
};
|
|
63
63
|
// @ts-expect-error
|
|
64
64
|
this._updateFilterValue = (e) => (this._filterValue = e.target?.["value"] ?? "");
|
|
65
|
-
this.
|
|
65
|
+
this._lang = "";
|
|
66
|
+
this._t9nLocale = "";
|
|
66
67
|
this._t9nStrings = undefined;
|
|
67
68
|
this._selectedApiItem = undefined;
|
|
68
69
|
this._filterValue = "";
|
|
@@ -131,7 +132,7 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
131
132
|
// When switching between flow the same reference is reused
|
|
132
133
|
this._flowObserver = new MutationObserver(() => {
|
|
133
134
|
// Get the last panel and try to set focus on the input element
|
|
134
|
-
|
|
135
|
+
C(ref.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
135
136
|
});
|
|
136
137
|
this._flowObserver.observe(ref, { attributes: true, attributeFilter: ["id"], childList: true });
|
|
137
138
|
}
|
|
@@ -163,12 +164,13 @@ const ArcgisArcadeApi = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
163
164
|
return (h(Host, null, h("style", null, this._colorizeStyle), h("calcite-flow", { ref: (ref) => this.flowFocusHandler(ref) }, h("calcite-flow-item", { heading: this._t9nStrings?.constantsandfunctions, closable: true, onCalciteFlowItemClose: this._emitClose }, h(StickyFilterInput, { filterValue: this._filterValue, onCalciteInputInput: this._updateFilterValue }), this._preparingApi ? (h("calcite-loader", { scale: "s", type: "indeterminate", label: this._t9nStrings?.loading ?? "Loading" })) : (h("calcite-list", null, empty ? h("div", { class: "notice-container" }, this._t9nStrings?.noitems ?? "No items") : categories))), this.renderApiItemFlowItem())));
|
|
164
165
|
}
|
|
165
166
|
static get assetsDirs() { return ["assets"]; }
|
|
166
|
-
get
|
|
167
|
+
get _hostElement() { return this; }
|
|
167
168
|
static get style() { return arcadeApiCss; }
|
|
168
169
|
}, [1, "arcgis-arcade-api", {
|
|
169
170
|
"hideDocumentationActions": [4, "hide-documentation-actions"],
|
|
170
171
|
"modelId": [1, "model-id"],
|
|
171
|
-
"
|
|
172
|
+
"_lang": [32],
|
|
173
|
+
"_t9nLocale": [32],
|
|
172
174
|
"_t9nStrings": [32],
|
|
173
175
|
"_selectedApiItem": [32],
|
|
174
176
|
"_filterValue": [32],
|