@arcgis/coding-components 5.0.0-next.84 → 5.0.0-next.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{3PSCA6KH.js → 25VXBBBZ.js} +2 -2
  3. package/dist/cdn/{44GQ5ENQ.js → 32NQLYR2.js} +2 -2
  4. package/dist/cdn/{GMJZSPF2.js → 35YD3PEM.js} +2 -2
  5. package/dist/cdn/{DB7JAMFD.js → 37AUX6BH.js} +2 -2
  6. package/dist/cdn/{MCREPNON.js → 3OOLHAJG.js} +2 -2
  7. package/dist/cdn/{WJI37X25.js → 4IBN3AWX.js} +2 -2
  8. package/dist/cdn/{HBCKUC46.js → 53I2FYLO.js} +2 -2
  9. package/dist/cdn/{G2JKJDVX.js → 6G4QUTPJ.js} +2 -2
  10. package/dist/cdn/{KJYFRF6Z.js → 74T7ILOU.js} +1 -1
  11. package/dist/cdn/{MTMFT4XD.js → 7M55S6BG.js} +2 -2
  12. package/dist/cdn/B5YE5PVQ.js +4 -0
  13. package/dist/cdn/{257CE7RC.js → CUGN7GXB.js} +2 -2
  14. package/dist/cdn/{3QR7YQXI.js → DABFREVT.js} +2 -2
  15. package/dist/cdn/{FERNZR6V.js → DE3RLYZ4.js} +1 -1
  16. package/dist/cdn/{OQUYSN7I.js → DYPHLMKE.js} +3 -3
  17. package/dist/cdn/{TYMP4EQA.js → EAANPCRC.js} +2 -2
  18. package/dist/cdn/{RFJMS2XV.js → EVBLYBC7.js} +2 -2
  19. package/dist/cdn/{WJ6J6EFT.js → FOXTUCKL.js} +2 -2
  20. package/dist/cdn/{KDSG4AQ2.js → FVQB3CEW.js} +1 -1
  21. package/dist/cdn/{TE762HZP.js → GRS6C55W.js} +1 -1
  22. package/dist/cdn/{6Y5QJLC2.js → GUDZ22ZD.js} +1 -1
  23. package/dist/cdn/{HB2ES4YL.js → HLIW7CDL.js} +2 -2
  24. package/dist/cdn/{YCRGKFVI.js → HPFQALY5.js} +2 -2
  25. package/dist/cdn/{5NR5BXSU.js → IGOB76XZ.js} +2 -2
  26. package/dist/cdn/{LNCKWEAE.js → IKTBURW4.js} +2 -2
  27. package/dist/cdn/{YJM4YZTR.js → IM4FYC35.js} +2 -2
  28. package/dist/cdn/{FMGFKQ7C.js → JU3LESVV.js} +2 -2
  29. package/dist/cdn/{YE3Q4QRS.js → LF4MJENP.js} +2 -2
  30. package/dist/cdn/{ARAAJHTT.js → MI66XE4U.js} +4 -4
  31. package/dist/cdn/{NYBDXWA5.js → NWITL3PQ.js} +2 -2
  32. package/dist/cdn/{SNIPKZ5D.js → ODR3ZR5F.js} +1 -1
  33. package/dist/cdn/{7JSSJVPI.js → ON2IF5BP.js} +2 -2
  34. package/dist/cdn/{BQLRNY6M.js → P5TRO73S.js} +2 -2
  35. package/dist/cdn/{JOZPVCEH.js → PEEHLO66.js} +1 -1
  36. package/dist/cdn/{5V3AU2MS.js → PVWJMXVJ.js} +2 -2
  37. package/dist/cdn/{PUM6S2YR.js → Q4RKFGO6.js} +2 -2
  38. package/dist/cdn/{U3UR7PMI.js → QHEHI5IV.js} +2 -2
  39. package/dist/cdn/{S25WEGDV.js → QV67PL6P.js} +2 -2
  40. package/dist/cdn/{VI5BXG53.js → QZIF6LAS.js} +2 -2
  41. package/dist/cdn/{5KWWFBRA.js → RGPBIODJ.js} +2 -2
  42. package/dist/cdn/{6VMHDHOO.js → SHTZ4O47.js} +2 -2
  43. package/dist/cdn/{I6JGARO3.js → SLHSPJOX.js} +2 -2
  44. package/dist/cdn/{W5KQ34S3.js → T2L462P3.js} +2 -2
  45. package/dist/cdn/{3LJIRG7F.js → TLFOFTHI.js} +2 -2
  46. package/dist/cdn/{JFCDQ5Y5.js → VPLREMBT.js} +2 -2
  47. package/dist/cdn/{NR6DB7IX.js → WJJKLFSO.js} +2 -2
  48. package/dist/cdn/{TJOEBZIJ.js → YRBXVOZH.js} +1 -1
  49. package/dist/cdn/{R64NEFA4.js → ZF3VYMGU.js} +1 -1
  50. package/dist/cdn/index.js +2 -2
  51. package/dist/chunks/arcade-contribution.js +1 -1
  52. package/dist/chunks/arcade-defaults.js +1 -1
  53. package/dist/chunks/arcade-executor.js +1 -1
  54. package/dist/chunks/arcade-mode.js +1 -1
  55. package/dist/chunks/arcade-service-accessors.js +1 -1
  56. package/dist/chunks/colorize.js +1 -1
  57. package/dist/chunks/editor.js +1 -1
  58. package/dist/chunks/fields.js +1 -1
  59. package/dist/chunks/language-defaults-base.js +20 -19
  60. package/dist/chunks/markdown.js +1 -1
  61. package/dist/chunks/monaco-importer.js +1 -1
  62. package/dist/chunks/monaco-theme.js +1 -1
  63. package/dist/chunks/runtime.js +1 -1
  64. package/dist/chunks/sql-expr-defaults.js +1 -1
  65. package/dist/chunks/sql-expr-mode.js +1 -1
  66. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  67. package/dist/chunks/useT9n.js +1 -1
  68. package/dist/chunks/utilities.js +1 -1
  69. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  70. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  71. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  72. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  73. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  74. package/dist/components/arcgis-code-viewer/customElement.js +1 -1
  75. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  76. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  77. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  78. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  79. package/dist/docs/api.json +2 -2
  80. package/dist/docs/docs.json +2 -2
  81. package/dist/docs/web-types.json +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/loader.js +1 -1
  84. package/dist/monacoStyles.js +1 -1
  85. package/dist/utils/language-defaults-base.d.ts +1 -1
  86. package/package.json +5 -5
  87. package/dist/cdn/ZNJU2F6X.js +0 -4
  88. package/dist/utils/typing.d.ts +0 -21
package/dist/addons.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { html as b } from "lit";
2
2
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
- v5.0.0-next.84 */
4
+ v5.0.0-next.85 */
5
5
  const m = [
6
6
  "popup",
7
7
  "popup-element",
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.84 */
4
- import h from"./YCRGKFVI.js";import e from"./44GQ5ENQ.js";import d from"./5KWWFBRA.js";import"./R64NEFA4.js";import{a as O,c as u,d as k}from"./G2JKJDVX.js";import{a as b}from"./LNCKWEAE.js";import"./MTMFT4XD.js";import c from"./I6JGARO3.js";import a from"./ARAAJHTT.js";import{a as N}from"./TE762HZP.js";import"./SNIPKZ5D.js";import"./U3UR7PMI.js";import{a as C}from"./OQUYSN7I.js";import"./KDSG4AQ2.js";import"./HB2ES4YL.js";import{a as T,b as y,c as E}from"./KJYFRF6Z.js";import{G as f,K as v,L as S,h as g,i as _,j as l}from"./YJM4YZTR.js";import"./FERNZR6V.js";import"./3LJIRG7F.js";import"./JOZPVCEH.js";export default $arcgis.t(([,,,{a:w},{a:c,b:p}])=>{var L=Symbol(),h=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,e)=>{this.o=t,this.h=e})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,e,s){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof e=="object"?e:{task:e,args:s};this.v=i.task,this.j=i.args,this.m=i.argsEqual??M,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),e=this.O;this.O=t,t===e||t===void 0||e!==void 0&&this.m(e,t)||await this.run(t)}async run(t){let e,s;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let o=!1;try{e=await this.v(t,{signal:this.q.signal})}catch(d){o=!0,s=d}if(this.p===i){if(e===L)this.i=0;else{if(o===!1){try{this.k?.(e)}catch{}this.i=2,this.o?.(e)}else{try{this.A?.(s)}catch{}this.i=3,this.h?.(s)}this.u=e,this.l=s}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},M=(n,t)=>n===t||n.length===t.length&&n.every(((e,s)=>!_(e,t[s])));var A=g`pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);white-space:pre-line;code{font-size:var(--calcite-font-size--2);font-family:var(--calcite-font-family-code)}}:host([round]){pre{border-radius:var(--calcite-corner-radius-round)}}`,m=class extends f{constructor(){super(...arguments),this._monacoEditor=b(C),this.#e=Promise.withResolvers(),this.#t="",this._slotContentObservers=[],this._onDefaultSlotChange=async t=>{T(t)||(this._codeFromSlot="");let e=t.target instanceof HTMLSlotElement?t.target:null,s=e?this._computeSlotText(e):"";e&&this._observeAssignedSlotNodes(e),s!==this._codeFromSlot&&(this._codeFromSlot=s),this.#e.resolve()},this._colorizeTask=new h(this,{task:async([t,e],{signal:s})=>{if(await this.#e.promise,s.aborted)return this.#t;if(await c(e),s.aborted)return this.#t;let i=await O(t,e);return s.aborted?this.#t:(this.#t=i,i)},args:()=>[this._codeFromSlot,this.language]}),this._codeFromSlot="",this.language="arcade",this.round=!1}static{this.properties={_codeFromSlot:16,language:1,round:7}}static{this.styles=A}#e;#t;async load(){w(S("./assets")),await p(this.language),await c(this.language),this._applyColorizeStyles(u()),this.manager.onLifecycle(()=>(this._themeObserver=y(this.el,["class"],()=>this.updateTheme()),this._themeChangedListener=k(()=>{this._applyColorizeStyles(u())}),this.updateTheme(),()=>{this._themeObserver?.(),this._themeObserver=void 0,this._themeChangedListener?.dispose(),this._themeChangedListener=void 0}))}loaded(){this.el.hasChildNodes()||this.#e.resolve()}willUpdate(t){t.has("language")&&p(this.language).then(()=>c(this.language)).catch(e=>console.error(e))}disconnectedCallback(){super.disconnectedCallback(),this._disposeSlotObservers()}_disposeSlotObservers(){this._slotContentObservers.length&&(this._slotContentObservers.forEach(t=>t.disconnect()),this._slotContentObservers=[])}_observeAssignedSlotNodes(t){this._disposeSlotObservers();let e=t.assignedNodes({flatten:!0});if(!e.length)return;let s=new Set;for(let r of e)r.nodeType===Node.ELEMENT_NODE?s.add(r):r.nodeType===Node.TEXT_NODE&&r.parentElement&&s.add(r.parentElement);let i={characterData:!0,childList:!0,subtree:!0},o=N(()=>{let r=this._computeSlotText(t);r!==this._codeFromSlot&&(this._codeFromSlot=r)},100),d=r=>{if(r.some(a=>a.type==="childList")){let a=this._computeSlotText(t);a!==this._codeFromSlot&&(this._codeFromSlot=a);return}o()};s.forEach(r=>{let a=new MutationObserver(d);a.observe(r,i),this._slotContentObservers.push(a)})}_computeSlotText(t){let e=t.assignedNodes({flatten:!0}).filter(s=>s.nodeType!==Node.COMMENT_NODE);if(this.language==="html"&&e.length){let s=e.find(o=>o.nodeType===Node.ELEMENT_NODE&&o.tagName==="TEMPLATE");if(s)return(s.innerHTML??"").trim();let i=e.map(o=>o.nodeType===Node.ELEMENT_NODE?o.outerHTML:o.nodeType===Node.TEXT_NODE?o.textContent??"":"").join("").trim();return i}return e.map(s=>s.textContent??"").join("").trim()}updateTheme(){let t=E(this.el)==="light"?"vs":"vs-dark";t!==this._currentTheme&&(this._currentTheme=t,this._monacoEditor.setTheme(t))}_applyColorizeStyles(t){if(!this._colorizeSheet){this._colorizeSheet=new CSSStyleSheet;let e=this.renderRoot;e.adoptedStyleSheets=[...e.adoptedStyleSheets,this._colorizeSheet]}this._colorizeSheet.replaceSync(t)}render(){return l`<div><slot @slotchange=${this._onDefaultSlotChange} style="display:none" aria-hidden=true></slot><pre class="arcgis-code-viewer" aria-label=${`${this.language} code snippet`}>${this._colorizeTask.render({error:()=>null,pending:()=>l`<code class=${`language-${this.language}`}></code>`,complete:t=>l`<code class=${`language-${this.language}`} .innerHTML=${t??""}></code>`})}</pre></div>`}};v("arcgis-code-viewer",m);return m},a,c,d,e,h)
3
+ v5.0.0-next.85 */
4
+ import h from"./HPFQALY5.js";import e from"./32NQLYR2.js";import d from"./RGPBIODJ.js";import"./ZF3VYMGU.js";import{a as O,c as u,d as k}from"./6G4QUTPJ.js";import{a as b}from"./IKTBURW4.js";import"./7M55S6BG.js";import c from"./SLHSPJOX.js";import a from"./MI66XE4U.js";import{a as N}from"./GRS6C55W.js";import"./ODR3ZR5F.js";import"./QHEHI5IV.js";import{a as C}from"./DYPHLMKE.js";import"./FVQB3CEW.js";import"./HLIW7CDL.js";import{a as T,b as y,c as E}from"./74T7ILOU.js";import{G as f,K as v,L as S,h as g,i as _,j as l}from"./IM4FYC35.js";import"./DE3RLYZ4.js";import"./TLFOFTHI.js";import"./PEEHLO66.js";export default $arcgis.t(([,,,{a:w},{a:c,b:p}])=>{var L=Symbol(),h=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,e)=>{this.o=t,this.h=e})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,e,s){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof e=="object"?e:{task:e,args:s};this.v=i.task,this.j=i.args,this.m=i.argsEqual??M,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),e=this.O;this.O=t,t===e||t===void 0||e!==void 0&&this.m(e,t)||await this.run(t)}async run(t){let e,s;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let o=!1;try{e=await this.v(t,{signal:this.q.signal})}catch(d){o=!0,s=d}if(this.p===i){if(e===L)this.i=0;else{if(o===!1){try{this.k?.(e)}catch{}this.i=2,this.o?.(e)}else{try{this.A?.(s)}catch{}this.i=3,this.h?.(s)}this.u=e,this.l=s}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},M=(n,t)=>n===t||n.length===t.length&&n.every(((e,s)=>!_(e,t[s])));var A=g`pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);white-space:pre-line;code{font-size:var(--calcite-font-size--2);font-family:var(--calcite-font-family-code)}}:host([round]){pre{border-radius:var(--calcite-corner-radius-round)}}`,m=class extends f{constructor(){super(...arguments),this._monacoEditor=b(C),this.#e=Promise.withResolvers(),this.#t="",this._slotContentObservers=[],this._onDefaultSlotChange=async t=>{T(t)||(this._codeFromSlot="");let e=t.target instanceof HTMLSlotElement?t.target:null,s=e?this._computeSlotText(e):"";e&&this._observeAssignedSlotNodes(e),s!==this._codeFromSlot&&(this._codeFromSlot=s),this.#e.resolve()},this._colorizeTask=new h(this,{task:async([t,e],{signal:s})=>{if(await this.#e.promise,s.aborted)return this.#t;if(await c(e),s.aborted)return this.#t;let i=await O(t,e);return s.aborted?this.#t:(this.#t=i,i)},args:()=>[this._codeFromSlot,this.language]}),this._codeFromSlot="",this.language="arcade",this.round=!1}static{this.properties={_codeFromSlot:16,language:1,round:7}}static{this.styles=A}#e;#t;async load(){w(S("./assets")),await p(this.language),await c(this.language),this._applyColorizeStyles(u()),this.manager.onLifecycle(()=>(this._themeObserver=y(this.el,["class"],()=>this.updateTheme()),this._themeChangedListener=k(()=>{this._applyColorizeStyles(u())}),this.updateTheme(),()=>{this._themeObserver?.(),this._themeObserver=void 0,this._themeChangedListener?.dispose(),this._themeChangedListener=void 0}))}loaded(){this.el.hasChildNodes()||this.#e.resolve()}willUpdate(t){t.has("language")&&p(this.language).then(()=>c(this.language)).catch(e=>console.error(e))}disconnectedCallback(){super.disconnectedCallback(),this._disposeSlotObservers()}_disposeSlotObservers(){this._slotContentObservers.length&&(this._slotContentObservers.forEach(t=>t.disconnect()),this._slotContentObservers=[])}_observeAssignedSlotNodes(t){this._disposeSlotObservers();let e=t.assignedNodes({flatten:!0});if(!e.length)return;let s=new Set;for(let r of e)r.nodeType===Node.ELEMENT_NODE?s.add(r):r.nodeType===Node.TEXT_NODE&&r.parentElement&&s.add(r.parentElement);let i={characterData:!0,childList:!0,subtree:!0},o=N(()=>{let r=this._computeSlotText(t);r!==this._codeFromSlot&&(this._codeFromSlot=r)},100),d=r=>{if(r.some(a=>a.type==="childList")){let a=this._computeSlotText(t);a!==this._codeFromSlot&&(this._codeFromSlot=a);return}o()};s.forEach(r=>{let a=new MutationObserver(d);a.observe(r,i),this._slotContentObservers.push(a)})}_computeSlotText(t){let e=t.assignedNodes({flatten:!0}).filter(s=>s.nodeType!==Node.COMMENT_NODE);if(this.language==="html"&&e.length){let s=e.find(o=>o.nodeType===Node.ELEMENT_NODE&&o.tagName==="TEMPLATE");if(s)return(s.innerHTML??"").trim();let i=e.map(o=>o.nodeType===Node.ELEMENT_NODE?o.outerHTML:o.nodeType===Node.TEXT_NODE?o.textContent??"":"").join("").trim();return i}return e.map(s=>s.textContent??"").join("").trim()}updateTheme(){let t=E(this.el)==="light"?"vs":"vs-dark";t!==this._currentTheme&&(this._currentTheme=t,this._monacoEditor.setTheme(t))}_applyColorizeStyles(t){if(!this._colorizeSheet){this._colorizeSheet=new CSSStyleSheet;let e=this.renderRoot;e.adoptedStyleSheets=[...e.adoptedStyleSheets,this._colorizeSheet]}this._colorizeSheet.replaceSync(t)}render(){return l`<div><slot @slotchange=${this._onDefaultSlotChange} style="display:none" aria-hidden=true></slot><pre class="arcgis-code-viewer" aria-label=${`${this.language} code snippet`}>${this._colorizeTask.render({error:()=>null,pending:()=>l`<code class=${`language-${this.language}`}></code>`,complete:t=>l`<code class=${`language-${this.language}`} .innerHTML=${t??""}></code>`})}</pre></div>`}};v("arcgis-code-viewer",m);return m},a,c,d,e,h)
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.84 */
4
- import{kk as m,pk as c,vg as a}from"./3LJIRG7F.js";export default $arcgis.t(([j])=>{m();function k(){return!!window.MonacoEnvironment?.getWorker}var l="",g=new Map,u=!1;async function p(t,r,e){if(e)return r?r():new Worker(t);let o=window.location.origin;if(new URL(t,window.location.href).origin!==o){let n=await j(t,{responseType:"text"});return new Worker(URL.createObjectURL(new Blob([n.data],{type:"text/javascript"})),{type:"module"})}return new Worker(t,{type:"module"})}function L(t){if(k())return;y(),l=t;let r=`${l}/code-editor`,e={arcade:`${r}/arcade.worker.js`,"arcgis-sql-expression":`${r}/sql-expr.worker.js`,html:`${r}/html.worker.js`,css:`${r}/css.worker.js`,typescript:`${r}/ts.worker.js`,json:`${r}/json.worker.js`,default:`${r}/editor.worker.js`},o={arcade:{url:e.arcade},"arcgis-sql-expression":{url:e["arcgis-sql-expression"]},html:{url:e.html},css:{url:e.css},typescript:{url:e.typescript},javascript:{url:e.typescript},json:{url:e.json},default:{url:e.default}};window.MonacoEnvironment={getWorker:async(n,s)=>{let i=g.get(s);if(i)return await p(i,void 0,u);let{url:d,localWorker:f}=o[s]||o.default;return await p(d,f,u)}}}var w=!1;function y(){w||(c.get(a),w=!0)}async function M(){return(await v()).getArcadeDiagnosticService()}async function v(){return await import("./DB7JAMFD.js")}return{a:L,b:M,c:v}},"request")
3
+ v5.0.0-next.85 */
4
+ import{kk as m,pk as c,vg as a}from"./TLFOFTHI.js";export default $arcgis.t(([j])=>{m();function k(){return!!window.MonacoEnvironment?.getWorker}var l="",g=new Map,u=!1;async function p(t,r,e){if(e)return r?r():new Worker(t);let o=window.location.origin;if(new URL(t,window.location.href).origin!==o){let n=await j(t,{responseType:"text"});return new Worker(URL.createObjectURL(new Blob([n.data],{type:"text/javascript"})),{type:"module"})}return new Worker(t,{type:"module"})}function L(t){if(k())return;y(),l=t;let r=`${l}/code-editor`,e={arcade:`${r}/arcade.worker.js`,"arcgis-sql-expression":`${r}/sql-expr.worker.js`,html:`${r}/html.worker.js`,css:`${r}/css.worker.js`,typescript:`${r}/ts.worker.js`,json:`${r}/json.worker.js`,default:`${r}/editor.worker.js`},o={arcade:{url:e.arcade},"arcgis-sql-expression":{url:e["arcgis-sql-expression"]},html:{url:e.html},css:{url:e.css},typescript:{url:e.typescript},javascript:{url:e.typescript},json:{url:e.json},default:{url:e.default}};window.MonacoEnvironment={getWorker:async(n,s)=>{let i=g.get(s);if(i)return await p(i,void 0,u);let{url:d,localWorker:f}=o[s]||o.default;return await p(d,f,u)}}}var w=!1;function y(){w||(c.get(a),w=!0)}async function M(){return(await v()).getArcadeDiagnosticService()}async function v(){return await import("./37AUX6BH.js")}return{a:L,b:M,c:v}},"request")
@@ -1,6 +1,6 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.84 */
4
- import{a as T}from"./3QR7YQXI.js";import b from"./5KWWFBRA.js";import{a as L}from"./6VMHDHOO.js";import"./LNCKWEAE.js";import a from"./ARAAJHTT.js";import"./TE762HZP.js";import"./SNIPKZ5D.js";import{c as B,d as j}from"./U3UR7PMI.js";import"./OQUYSN7I.js";import"./KDSG4AQ2.js";import"./HB2ES4YL.js";import"./KJYFRF6Z.js";import{E as O,F as V,G as H,I as C,K as D,h as U,j as n,k as P,l as A,s as q,w as _,x as F,y as z}from"./YJM4YZTR.js";import"./FERNZR6V.js";import"./3LJIRG7F.js";import"./JOZPVCEH.js";export default $arcgis.t(([ne,J,le,de,pe,{a:Q},S])=>{var $=class extends z{constructor(e){if(super(e),this.it=A,e.type!==_.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===A||e==null)return this._t=void 0,this.it=e;if(e===P)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};$.directiveName="unsafeHTML",$.resultType=1;var k=F($);var G=new Set,ce;var re=i=>typeof i=="string"?i:"el"in i?i.el.localName:"localName"in i?i.localName:i.declaredClass,b=(i,e,t,s)=>{let c=re(e);if(s?.once){let o=`${i}${c}${t}`;if(G.has(o))return;G.add(o)}ce?.log.interceptors?.forEach(o=>o(i,c,t)),console[i](`[${c}]`,t)};var ue=U`:host(:not([closed])){container-type:size;--calcite-block-border-color: var(--calcite-color-transparent);flex:1 0 auto;border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box;max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w);.submission-actions-wrapper{display:flex;flex-direction:column;width:100%;gap:.75rem}.submission-actions{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}@container (max-width: 380px){.hidden-below-380{display:none}}@container (min-width: 380px){.hidden-above-380{display:none}}.gaps{display:flex;gap:.25rem}.align-inline-end{margin-inline-start:auto}.action .error-display{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem;max-height:30vh;overflow-y:auto}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-flow-item calcite-shell{background:transparent}calcite-block{width:100%;max-width:100%;align-self:flex-end;background-color:transparent;margin-block:0}calcite-sheet{--calcite-sheet-scrim-background: rgba(200, 200, 200, .5)}.type-suggestion{--calcite-color-foreground-1: var(--calcite-color-foreground-current);--calcite-color-text-3: var(--calcite-color-text-2);--calcite-icon-color: var(--calcite-color-brand)}.type-history{--calcite-icon-color: var(--calcite-color-text-2)}.type-response{--calcite-icon-color: var(--calcite-color-brand);--calcite-font-family: monospace}.block-response{align-self:flex-start;margin-block-end:4rem;border-block-end:0;--calcite-block-text-color: var(--calcite-color-brand)}calcite-list-item calcite-button{margin-inline-end:.25rem}.type-docs{--calcite-color-foreground-1: var(--calcite-color-foreground-3);--calcite-icon-color: var(--calcite-color-text-1)}.type-error{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-font-family: monospace;border:1px solid var(--calcite-color-status-danger)}#thumbs-up{margin-inline-start:auto;--calcite-icon-color: var(--calcite-color-border-input)}#thumbs-down{--calcite-icon-color: var(--calcite-color-border-input)}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}.no-space-block,.no-space-block[open]{margin:0}calcite-block[open]:last-of-type{border-block-end:0}.text-area-wrapper{display:flex;border-radius:var(--calcite-corner-radius-round);margin:.75rem;overflow:hidden;--calcite-color-border-input: transparent;position:sticky;box-shadow:var(--calcite-shadow-sm);flex:none}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}calcite-tooltip{--calcite-tooltip-z-index: 1000}.standalone-list{margin:1rem;width:calc(100% - 2rem)}.result-disclaimer{display:block;width:24rem;max-width:90%;margin:1rem auto;text-align:center;line-height:1.125rem;font-size:.875rem;font-style:italic}calcite-flow{height:100%}calcite-popover calcite-list{--calcite-list-background-color: transparent;--calcite-input-border-color: transparent}calcite-popover calcite-list calcite-filter{--calcite-spacing-sm: 0}.contained-popover-or-tooltip{--calcite-popover-max-size-x: 100%;--calcite-tooltip-max-size-x: 100%}.break-spaces{white-space:break-spaces}.feedback-button-container{margin-inline-start:auto;gap:0}.info-heading{font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-1)}.unstyled-h3{margin:unset;font-size:var(--calcite-font-size-md)}.unstyled-shell{position:unset;inset:unset;display:unset;block-size:unset;inline-size:unset}.suggestion-button{font-weight:var(--calcite-font-weight-medium)}.info-block{max-width:450px}#result-block{calcite-card-group{--calcite-card-group-gap: 1.25rem}calcite-card{--calcite-card-corner-radius: var(--calcite-corner-radius-round);--calcite-card-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=title] calcite-chip{margin-block-start:.25rem}.code-response-wrapper{position:relative;background:var(--calcite-color-foreground-2);border-radius:var(--calcite-corner-radius-round);margin-top:-1.5rem}.prior-prompt{display:flex;flex-direction:row;padding:0;overflow-y:hidden;overflow-x:auto;margin:.25rem 0 .75rem;align-items:center;max-width:100%;span{overflow-x:auto;overflow-y:hidden}}.copy-feedback{display:none}.copy-prompt-button{align-self:flex-start;margin-inline-start:auto}.response-secondary-action-button[data-copied]+.copy-feedback,.copy-prompt-button[data-copied]+.copy-feedback{display:block;span{padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text--2);font-weight:var(--calcite-font-weight-medium)}}.copy-prompt-button[data-copied]~.copy-tooltip,.response-secondary-action-button[data-copied]~.copy-tooltip{display:none}code{white-space:pre;font-size:12px;margin:0;overflow-x:auto;font-family:Fira Mono,Consolas,Menlo,monospace;display:block;max-height:12rem;position:relative;padding:.5rem}.code-collapse{margin-inline-start:auto}.response-secondary-action-button{margin-left:.5rem}.add-to-editor-button{--calcite-internal-button-border-color: unset}}.collapsible-code{padding:.5rem}.collapsible-code summary{cursor:pointer;font-weight:500;color:var(--calcite-color-brand);outline:none;padding:.25rem 0}.collapsible-code[open] summary{color:var(--calcite-color-text-2)}.collapsible-error{padding:.5rem}.collapsible-error summary{cursor:pointer;font-weight:500;color:var(--calcite-color-status-danger);outline:none;padding:.25rem 0}.collapsible-error[open] summary{color:var(--calcite-color-text-2)}.response-error-container{padding:.5rem;background:color-mix(in srgb,var(--calcite-color-status-warning) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);--calcite-input-message-icon-color: var(--calcite-color-status-warning)}.response-error-chip{--calcite-internal-chip-background-color: var(--calcite-color-status-warning);--calcite-chip-icon-color: var(--calcite-color-foreground-1);--calcite-chip-border-color: var(--calcite-color-transparent)}.feedback-actions{gap:unset}.contained{max-width:100%;max-height:100%;max-width:100cqi;max-height:75cqb;overflow-y:auto}}:host([closed]){display:none}`,f=class extends Error{constructor({message:e,code:t,subCode:s,details:c,source:o}){super(e),this.name="ArcadeAssistantError",this.code=t,this.subCode=s,this.details=c,this.source=o}};function W(i){if(!i)return;let e=i.indexOf('{"error":');if(e!==-1)try{let t=i.slice(e),s=JSON.parse(t);if(s&&typeof s=="object"&&s.error)return s.error}catch{return}}async function me(i){let{baseUrl:e,skillId:t,message:s,authToken:c,previousConversationId:o,context:l}=i,u=t?`${e}/skills/${t}/chat`:`${e}/chat`,r=[],a={message:s,context:l};o&&(a.conversation_id=o);let d;try{d=await J(u,{method:"post",headers:{"Content-Type":"application/json",token:c},body:JSON.stringify(a),responseType:"json"})}catch(h){let g=h,w=g.details?.rawResponse||g.message||String(h),v=W(w);throw v?new f(v):h}let p=d.data;r.push(p);let x=p.conversationId,ie=p.inquiryId,N=p.sequenceNumber;async function se(){let h=0,g=25;for(;h<g;){await new Promise(y=>setTimeout(y,1e3));let w=he(x,N,ie),v;try{v=await J(u,{method:"post",headers:{"Content-Type":"application/json",token:c},body:JSON.stringify(w),responseType:"json"})}catch(y){let M=y,oe=M.details?.rawResponse||M.message||String(y),R=W(oe);throw R?new f(R):y}let m=v.data;if(m.context&&m.context.kind==="ArcgisErrorAsContext"&&m.context.error)throw new f({message:m.context.error.message||"ArcGIS Assistant error",code:m.context.error.code,subCode:m.context.error.subCode,details:m.context.error.details,source:"polling-response"});if(r.push(m),N=m.sequenceNumber,h++,!m.hasMore)break}if(h===g)throw new f({message:"Request timed out",code:"TIMEOUT",source:"polling"})}let ae=120*1e3;return await Promise.race([se(),new Promise((h,g)=>setTimeout(()=>g(new f({message:"Request timed out",code:"TIMEOUT",source:"hard-timeout"})),ae))]),r}function he(i,e,t){return{conversationId:i,inquiryId:t,ackSequenceNumber:e}}function ge(i){return i.message.match(/Error in prompt shield/u)?"I'm having trouble with this request. Try again by rephrasing the question.":i.code==="TIMEOUT"?"I'm having trouble with this request. Try again by re-asking the same question or rephrasing it.":i.message}var be=i=>{let e=i.value.length,t=72,s=180,c=i.offsetWidth,o=Math.max(1,Math.floor(c/8)),l=Math.ceil(e/o),u=t+(l-2)*24;i.style.setProperty("--calcite-text-area-min-height",`${Math.min(u,s)}px`)};function fe({messages:i}){return n`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta??"Beta"}>${i.beta??"Beta"}</calcite-chip>`}function ve({popoverContent:i}){return n`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-popover reference-element=legal-disclaimer label=legal-disclaimer placement=bottom auto-close focus-trap-disabled><div class="contained">${i}</div></calcite-popover>`}function te({errorMessage:i,slot:e}){return n`<div class="error-display"><calcite-input-message id=error-message status=invalid icon=exclamation-mark-triangle scale=m slot=${e??C}>${i}</calcite-input-message></div>`}function ye({active:i,setActive:e,messages:t}){return n`<calcite-alert slot=alerts .open=${i} placement=bottom kind=success icon=check-circle-f auto-close @calciteAlertClose=${()=>e(!1)} .label=${t.expressionapplied??"Expression applied"}><div slot=message>${t.expressionapplied??"Expression applied to editor."}</div></calcite-alert>`}function $e({context:i,messages:e}){return i?n`<div class="gaps">${i.profileName&&n`<calcite-popover auto-close placement=top .label=${(e.profilecontextlabel??"Profile context: {profileName}").replace("{profileName}",i.profileName)} reference-element=profile-context-button class="context-popover contained-popover-or-tooltip"><p>${(e.profilecontextlabel??"Profile context: {profileName}").replace("{profileName}",i.profileName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=map-information id=profile-context-button></calcite-button>`||""}${i.layerName&&n`<calcite-popover auto-close placement=top .label=${(e.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",i.layerName)} reference-element=layer-context-button class="context-popover contained-popover-or-tooltip"><p>${(e.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",i.layerName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=layers id=layer-context-button></calcite-button>`||""}</div>`:null}function ke({isDisabled:i,isReadOnly:e,setQuestion:t,setIsViewingResult:s,textAreaRef:c,question:o,errorMessage:l,setErrorMessage:u,submitQuestion:r,messages:a,mode:d,context:p}){return n`<div class="text-area-wrapper"><calcite-text-area resize=vertical .readOnly=${i||e} class="styled-text-area" .placeholder=${a.askaquestion??`Specify the calculation or logic you need in an Arcade expression. (e.g., 'Return "Yes" if value > 10')`} .value=${o} @calciteTextAreaInput=${x=>{be(x.target),t(x.target.value)}} ${V(c)}><div class="submission-actions-wrapper" slot=footer-start>${l&&te({errorMessage:l,slot:"footer-start"})||""}<div class="submission-actions">${$e({context:p,messages:a})}<div class="align-inline-end gaps"><calcite-button round kind=neutral .hidden=${d!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async()=>{s(!1),t("")}} .label=${a.startover??"Start Over"} class="hidden-above-380" id=small-start-over-button></calcite-button><calcite-tooltip reference-element=small-start-over-button placement=top-start class="hidden-above-380">${a.startover??"Start Over"}</calcite-tooltip><calcite-button round kind=neutral .hidden=${d!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async()=>{s(!1),t("")}} class="hidden-below-380">${a.startover??"Start Over"}</calcite-button><calcite-button round icon-end=effects appearance=solid .loading=${i} .disabled=${i} @click=${async()=>{u(o?"":a.enteraprompt??"Please enter a prompt"),await r()}}>${d==="prompt"?a.ask??"Generate":a.refine??"Refine"}</calcite-button></div></div></div></calcite-text-area></div>`}var xe="https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement",we="https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";function Ae({setOpen:i,messages:e,feedback:t,setFeedback:s,onSubmit:c}){return t.active?n`<calcite-sheet class="feedback-sheet" .label=${e.feedback??"Feedback"} slot=sheets display-mode=float position=block-end .open=${t.active} @calciteSheetClose=${()=>i(!1)}><calcite-panel .heading=${e.providefeedback??"Provide feedback"} .description=${e.experiencehelps??"Your experience helps guide future improvements"}><div class="feedback-content"><calcite-label>${e.experiencehelpful??"Was the assistant helpful?"}<calcite-segmented-control scale=l .disabled=${t.submitting}><calcite-segmented-control-item icon-start=thumbs-up .checked=${t.value==="good"} @click=${()=>s({...t,value:"good"})}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${t.value==="bad"} @click=${()=>s({...t,value:"bad"})}></calcite-segmented-control-item></calcite-segmented-control></calcite-label><calcite-label>${e.describeexperience??"Describe your experience"}<calcite-text-area resize=vertical .value=${t.text} @calciteTextAreaInput=${o=>s({...t,text:o.target.value})} .disabled=${t.submitting}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${o=>{s({...t,termsAccepted:o.target.checked})}} .disabled=${t.submitting}></calcite-checkbox><span>${k((e.agreement??"I agree to the {EsriPrivacyStatement} (and {Supplement}).").replace("{EsriPrivacyStatement}",`<calcite-link href=${xe} target="_blank">${e.esriprivacystatement??"Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}",`<calcite-link href=${we} target="_blank">${e.supplement??"Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${c} .disabled=${!t.termsAccepted||t.submitting} .loading=${t.submitting}>${e.submitfeedback??"Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>`:null}function Y({assistantsEnabled:i,messages:e,slot:t,assistantHelpUrl:s,helpTopicUrl:c}){return n`<calcite-block .label=${e.assistantinformation??"Assistant information"} slot=${t??C} expanded class="info-block"><calcite-chip .label=${e.new??"New"} kind=brand>${e.new??"New"}</calcite-chip><h1 class="info-heading">${e.introducing??"Introducing Arcade Assistant (beta)"}</h1><p>${e.capabilities??"The assistant uses artificial intelligence to generate Arcade expressions."}</p>${i?n`<p>${e.keepinmind??"Keep in mind the following:"}<ul><li>${e.beconsise??"Be concise, but also clear in your request"}</li><li>${e.avoidambiguity??"Avoid ambiguity and vagueness"}</li><li>${e.moredetails??"you do not need to use exact field names in your instructions, but more detail is generally better"}</li></ul>${k((e.seedocumentation??"Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}",`<calcite-link href=${c} target="_blank">${e.documentation??"documentation"}</calcite-link>`))}</p>`:n`<p>${k(e.useofassistant?.replace("{aiassistants}",`<strong>${e.aiassistants??"Ai Assistants"}</strong>`))}<calcite-link .href=${s} target=_blank icon-end=launch-2>${e.configureassistants??"Configure Assistants"}</calcite-link></p>`}</calcite-block>`}function Ce({messages:i,onProceed:e,onExit:t,helpTopicUrl:s}){return n`<calcite-dialog close-disabled placement=top .heading=${i.welcome??"Welcome to the new assistant experience"} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${i.beforeyougetstarted??"Before you get started be aware:"}</h3><ul><li>${i.maybeincorrect??"AI generated code may occasionally be incorrect or biased. Review carefully."}</li><li>${k((i.pleasereadhelp??"Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.").replace("{helpTopic}",`<calcite-link href=${s} target="_blank">${i.helptopic??"help topic"}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${i.proceed??"Proceed"}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${t} kind=neutral>${i.exit??"Exit"}</calcite-button></calcite-dialog>`}function Se({messages:i,suggestions:e,onSuggestionClick:t}){return n`<calcite-block .heading=${i.promptsuggestions} expanded collapsible id=suggestion-block><calcite-chip-group class="suggestions" .label=${i.promptsuggestions??"Prompt Suggestions"}>${T(e,s=>s,s=>n`<calcite-button round appearance=outline-fill kind=neutral .label=${i.promptsuggestion} class="suggestion-button" @click=${()=>t?.(s)}>${s}</calcite-button>`)}</calcite-chip-group></calcite-block>`}var K=200;function X({hidden:i=!1,expanded:e=!1,messages:t,cards:s,heading:c,collapsible:o=!1,showEffectsIcon:l=!1,onCopyCode:u,standalone:r}){return n`<calcite-block .hidden=${i} id=result-block .heading=${c??t.besteffort??"Here is the assistant's best effort"} .expanded=${e} .collapsible=${o}>${l&&n`<calcite-chip .label=${t.assistantresponses??"Assistant responses"} slot=content-start icon=effects scale=m class="suggestion-chips"></calcite-chip>`||""}<calcite-card-group .label=${t.assistantresponses??"Assistant responses"}>${T(s,a=>a.conversationId,a=>n`<calcite-card><div slot=heading><div class="prior-prompt"><span>${a.priorPrompt.length>K?`${a.priorPrompt.slice(0,K)}...`:a.priorPrompt}</span><calcite-action icon=duplicate scale=s slot=actions-end class="copy-prompt-button" text .id=${`copy-prompt-${a.conversationId}-${r?"standalone":"list"}`} @click=${d=>{let p=d.currentTarget;navigator.clipboard.writeText(a.priorPrompt).then(()=>{p.setAttribute("data-copied","true"),setTimeout(()=>p.removeAttribute("data-copied"),1500)})}}></calcite-action><calcite-popover .referenceElement=${`copy-prompt-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-prompt-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copyprompttoclipboard??"Copy prompt to clipboard"}</calcite-tooltip></div>${a.message&&r&&n`<div class="response-error-container">${te({errorMessage:a.message})}</div>`||""}</div><div><div class="code-response-wrapper"><div class="positioned-code-content"><calcite-chip-group .label=${t.responsecontext??"Response Context"} scale=s>${a.message&&!r&&n`<calcite-tooltip .referenceElement=${`response-chip-${a.conversationId}-error`} placement=top-start>${a.message}</calcite-tooltip><calcite-chip .id=${`response-chip-${a.conversationId}-error`} .label=${t.error??"Error"} scale=s appearance=outline icon=exclamation-mark-triangle-f class="response-error-chip"></calcite-chip>`||""}${a.chips?.map(d=>{let p=q();return n`${d.tooltip&&n`<calcite-tooltip .referenceElement=${`response-chip-${d.conversationId}-${p}`} placement=top-start class="contained-popover-or-tooltip">${d.tooltip}</calcite-tooltip>`||""}<calcite-chip .label=${d.label} .scale=${d.scale??"s"} .appearance=${d.appearance??"outline"} .icon=${d.icon} .id=${`response-chip-${d.conversationId}-${p}`}>${d.label}</calcite-chip>`})}</calcite-chip-group></div><details class="collapsible-code" open><summary>Code response</summary><arcgis-code-viewer language=arcade round>${a.code}</arcgis-code-viewer></details></div></div><div slot=footer-start class="feedback-actions"><calcite-button class="add-to-editor-button hidden-above-380" @click=${()=>a.onAddToEditor("add")} scale=s icon-start=plus round .label=${t.addtoeditor??"Add to editor"} .id=${`add-to-editor-button-${a.conversationId}-${r?"standalone":"list"}`}></calcite-button><calcite-tooltip class="hidden-above-380" .referenceElement=${`add-to-editor-button-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start>${t.addtoeditor??"Add to editor"}</calcite-tooltip><calcite-button class="add-to-editor-button hidden-below-380" @click=${()=>a.onAddToEditor("add")} scale=s icon-start=plus round>${t.addtoeditor??"Add to editor"}</calcite-button><calcite-button round icon-start=file-code kind=neutral scale=s @click=${()=>a.onAddToEditor("replace")} class="response-secondary-action-button" .id=${`replace-${a.conversationId}-${r?"standalone":"list"}`}></calcite-button><calcite-tooltip .referenceElement=${`replace-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start><span>${t.replaceineditor??"Replace all code in editor"}</span></calcite-tooltip><calcite-button round icon-start=copy-to-clipboard kind=neutral scale=s @click=${d=>{let p=d.currentTarget;u(a.code).then(()=>{p.setAttribute("data-copied","true"),setTimeout(()=>p.removeAttribute("data-copied"),1500)})}} class="response-secondary-action-button" .id=${`copy-response-${a.conversationId}-${r?"standalone":"list"}`}></calcite-button><calcite-popover .referenceElement=${`copy-response-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-response-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copytoclipboard??"Copy code to clipboard"}</calcite-tooltip></div><div slot=footer-end class="feedback-actions"><calcite-action .text=${t.thumbsup??"Thumbs up"} scale=s icon=thumbs-up @click=${a.onThumbsUp} .id=${`thumbs-up-${a.conversationId}-${r?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-up-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start><span>${t.helpful??"Helpful"}</span></calcite-tooltip><calcite-action .text=${t.thumbsdown??"Thumbs down"} scale=s icon=thumbs-down @click=${a.onThumbsDown} .id=${`thumbs-down-${a.conversationId}-${r?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-down-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start><span>${t.unhelpful??"Unhelpful"}</span></calcite-tooltip></div></calcite-card>`)}</calcite-card-group></calcite-block>`}var Te="arcade_generation",Ie="ArcadeCodeRequest",I="visualization",Ee="ArcadeAssistant",Ne=["your_comments","user_evaluation","question","answer","useragent","_source","version","context","extras"],Z=[],ee=!0,E=class extends H{constructor(){super(...arguments),this.textAreaRef=O(),this.messages=L(),this._feedbackService=void 0,this.handleFeedbackButton=(e,t)=>{this.feedback={active:!0,value:e,item:t,termsAccepted:!1,text:"",submitting:!1}},this.handleFeedbackSheetClose=()=>{this.feedback={active:!1}},this.handleFeedbackSubmit=async()=>{if(!this.feedback.active)return;this.feedback={...this.feedback,submitting:!0};let e=await this.ensureFeedbackService();if(!e){this.handleFeedbackSheetClose();return}let t=this.getModel(),s=t?await this.getProfileAndMetadata(t.uri):void 0,c=de.applicationName;!c&&!this.appVersion&&b("warn",this,"esriConfig.applicationName is not set. Consider setting it to help identify the application version in feedback.");let o={user_evaluation:this.feedback.value,your_comments:this.feedback.text||void 0,question:this.feedback.item?.question??"",answer:encodeURIComponent(this.feedback.item?.formattedScript??""),useragent:navigator.userAgent,_source:Ee,version:this.appVersion||c||"NOT_SET",context:s?JSON.stringify(s):"",extras:s?.profileName??"",conversation_id:this.feedback.item?.conversationId??"",privacy_statement:this.feedback.termsAccepted?"I_agree":""};try{await e.applyEdits({addFeatures:[new pe({attributes:o})]})}catch(l){b("error",this,`Error submitting feedback. ${String(l)}`)}this.handleFeedbackSheetClose()},this.handleClose=e=>{this.closed=!0,this.closePanel?.(e)},this.setQuestion=e=>{this.question=e},this.onSuggestionClick=e=>{this.textAreaRef.value&&(this.textAreaRef.value.value=e,this.textAreaRef.value.setFocus(),this.setQuestion(e))},this.isViewingResult=!1,this.confirmationActive=!1,this.isSubmitting=!1,this.errorMessage=void 0,this.question="",this.history=[],this.feedback={active:!1},this.splashActive=!0,this.context=void 0,this.historyCards=[],this.helpBase="",this.assistantsEnabled=!1,this.closed=!1}static{this.properties={isViewingResult:16,confirmationActive:16,isSubmitting:16,errorMessage:16,question:16,history:16,feedback:16,splashActive:16,context:16,historyCards:16,closePanel:0,insertText:0,helpBase:1,assistantsEnabled:5,layer:[1,{type:Object}],portalUrl:1,serviceUrl:1,closed:7,editorRef:0,feedbackServiceUrl:1,appVersion:1}}static{this.styles=ue}get disclaimerComment(){return`// ${this.messages.disclaimercomment}
3
+ v5.0.0-next.85 */
4
+ import{a as T}from"./DABFREVT.js";import b from"./RGPBIODJ.js";import{a as L}from"./SHTZ4O47.js";import"./IKTBURW4.js";import a from"./MI66XE4U.js";import"./GRS6C55W.js";import"./ODR3ZR5F.js";import{c as B,d as j}from"./QHEHI5IV.js";import"./DYPHLMKE.js";import"./FVQB3CEW.js";import"./HLIW7CDL.js";import"./74T7ILOU.js";import{E as O,F as V,G as H,I as C,K as D,h as U,j as n,k as P,l as A,s as q,w as _,x as F,y as z}from"./IM4FYC35.js";import"./DE3RLYZ4.js";import"./TLFOFTHI.js";import"./PEEHLO66.js";export default $arcgis.t(([ne,J,le,de,pe,{a:Q},S])=>{var $=class extends z{constructor(e){if(super(e),this.it=A,e.type!==_.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===A||e==null)return this._t=void 0,this.it=e;if(e===P)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};$.directiveName="unsafeHTML",$.resultType=1;var k=F($);var G=new Set,ce;var re=i=>typeof i=="string"?i:"el"in i?i.el.localName:"localName"in i?i.localName:i.declaredClass,b=(i,e,t,s)=>{let c=re(e);if(s?.once){let o=`${i}${c}${t}`;if(G.has(o))return;G.add(o)}ce?.log.interceptors?.forEach(o=>o(i,c,t)),console[i](`[${c}]`,t)};var ue=U`:host(:not([closed])){container-type:size;--calcite-block-border-color: var(--calcite-color-transparent);flex:1 0 auto;border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box;max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w);.submission-actions-wrapper{display:flex;flex-direction:column;width:100%;gap:.75rem}.submission-actions{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}@container (max-width: 380px){.hidden-below-380{display:none}}@container (min-width: 380px){.hidden-above-380{display:none}}.gaps{display:flex;gap:.25rem}.align-inline-end{margin-inline-start:auto}.action .error-display{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem;max-height:30vh;overflow-y:auto}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-flow-item calcite-shell{background:transparent}calcite-block{width:100%;max-width:100%;align-self:flex-end;background-color:transparent;margin-block:0}calcite-sheet{--calcite-sheet-scrim-background: rgba(200, 200, 200, .5)}.type-suggestion{--calcite-color-foreground-1: var(--calcite-color-foreground-current);--calcite-color-text-3: var(--calcite-color-text-2);--calcite-icon-color: var(--calcite-color-brand)}.type-history{--calcite-icon-color: var(--calcite-color-text-2)}.type-response{--calcite-icon-color: var(--calcite-color-brand);--calcite-font-family: monospace}.block-response{align-self:flex-start;margin-block-end:4rem;border-block-end:0;--calcite-block-text-color: var(--calcite-color-brand)}calcite-list-item calcite-button{margin-inline-end:.25rem}.type-docs{--calcite-color-foreground-1: var(--calcite-color-foreground-3);--calcite-icon-color: var(--calcite-color-text-1)}.type-error{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-font-family: monospace;border:1px solid var(--calcite-color-status-danger)}#thumbs-up{margin-inline-start:auto;--calcite-icon-color: var(--calcite-color-border-input)}#thumbs-down{--calcite-icon-color: var(--calcite-color-border-input)}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}.no-space-block,.no-space-block[open]{margin:0}calcite-block[open]:last-of-type{border-block-end:0}.text-area-wrapper{display:flex;border-radius:var(--calcite-corner-radius-round);margin:.75rem;overflow:hidden;--calcite-color-border-input: transparent;position:sticky;box-shadow:var(--calcite-shadow-sm);flex:none}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}calcite-tooltip{--calcite-tooltip-z-index: 1000}.standalone-list{margin:1rem;width:calc(100% - 2rem)}.result-disclaimer{display:block;width:24rem;max-width:90%;margin:1rem auto;text-align:center;line-height:1.125rem;font-size:.875rem;font-style:italic}calcite-flow{height:100%}calcite-popover calcite-list{--calcite-list-background-color: transparent;--calcite-input-border-color: transparent}calcite-popover calcite-list calcite-filter{--calcite-spacing-sm: 0}.contained-popover-or-tooltip{--calcite-popover-max-size-x: 100%;--calcite-tooltip-max-size-x: 100%}.break-spaces{white-space:break-spaces}.feedback-button-container{margin-inline-start:auto;gap:0}.info-heading{font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-1)}.unstyled-h3{margin:unset;font-size:var(--calcite-font-size-md)}.unstyled-shell{position:unset;inset:unset;display:unset;block-size:unset;inline-size:unset}.suggestion-button{font-weight:var(--calcite-font-weight-medium)}.info-block{max-width:450px}#result-block{calcite-card-group{--calcite-card-group-gap: 1.25rem}calcite-card{--calcite-card-corner-radius: var(--calcite-corner-radius-round);--calcite-card-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=title] calcite-chip{margin-block-start:.25rem}.code-response-wrapper{position:relative;background:var(--calcite-color-foreground-2);border-radius:var(--calcite-corner-radius-round);margin-top:-1.5rem}.prior-prompt{display:flex;flex-direction:row;padding:0;overflow-y:hidden;overflow-x:auto;margin:.25rem 0 .75rem;align-items:center;max-width:100%;span{overflow-x:auto;overflow-y:hidden}}.copy-feedback{display:none}.copy-prompt-button{align-self:flex-start;margin-inline-start:auto}.response-secondary-action-button[data-copied]+.copy-feedback,.copy-prompt-button[data-copied]+.copy-feedback{display:block;span{padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text--2);font-weight:var(--calcite-font-weight-medium)}}.copy-prompt-button[data-copied]~.copy-tooltip,.response-secondary-action-button[data-copied]~.copy-tooltip{display:none}code{white-space:pre;font-size:12px;margin:0;overflow-x:auto;font-family:Fira Mono,Consolas,Menlo,monospace;display:block;max-height:12rem;position:relative;padding:.5rem}.code-collapse{margin-inline-start:auto}.response-secondary-action-button{margin-left:.5rem}.add-to-editor-button{--calcite-internal-button-border-color: unset}}.collapsible-code{padding:.5rem}.collapsible-code summary{cursor:pointer;font-weight:500;color:var(--calcite-color-brand);outline:none;padding:.25rem 0}.collapsible-code[open] summary{color:var(--calcite-color-text-2)}.collapsible-error{padding:.5rem}.collapsible-error summary{cursor:pointer;font-weight:500;color:var(--calcite-color-status-danger);outline:none;padding:.25rem 0}.collapsible-error[open] summary{color:var(--calcite-color-text-2)}.response-error-container{padding:.5rem;background:color-mix(in srgb,var(--calcite-color-status-warning) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);--calcite-input-message-icon-color: var(--calcite-color-status-warning)}.response-error-chip{--calcite-internal-chip-background-color: var(--calcite-color-status-warning);--calcite-chip-icon-color: var(--calcite-color-foreground-1);--calcite-chip-border-color: var(--calcite-color-transparent)}.feedback-actions{gap:unset}.contained{max-width:100%;max-height:100%;max-width:100cqi;max-height:75cqb;overflow-y:auto}}:host([closed]){display:none}`,f=class extends Error{constructor({message:e,code:t,subCode:s,details:c,source:o}){super(e),this.name="ArcadeAssistantError",this.code=t,this.subCode=s,this.details=c,this.source=o}};function W(i){if(!i)return;let e=i.indexOf('{"error":');if(e!==-1)try{let t=i.slice(e),s=JSON.parse(t);if(s&&typeof s=="object"&&s.error)return s.error}catch{return}}async function me(i){let{baseUrl:e,skillId:t,message:s,authToken:c,previousConversationId:o,context:l}=i,u=t?`${e}/skills/${t}/chat`:`${e}/chat`,r=[],a={message:s,context:l};o&&(a.conversation_id=o);let d;try{d=await J(u,{method:"post",headers:{"Content-Type":"application/json",token:c},body:JSON.stringify(a),responseType:"json"})}catch(h){let g=h,w=g.details?.rawResponse||g.message||String(h),v=W(w);throw v?new f(v):h}let p=d.data;r.push(p);let x=p.conversationId,ie=p.inquiryId,N=p.sequenceNumber;async function se(){let h=0,g=25;for(;h<g;){await new Promise(y=>setTimeout(y,1e3));let w=he(x,N,ie),v;try{v=await J(u,{method:"post",headers:{"Content-Type":"application/json",token:c},body:JSON.stringify(w),responseType:"json"})}catch(y){let M=y,oe=M.details?.rawResponse||M.message||String(y),R=W(oe);throw R?new f(R):y}let m=v.data;if(m.context&&m.context.kind==="ArcgisErrorAsContext"&&m.context.error)throw new f({message:m.context.error.message||"ArcGIS Assistant error",code:m.context.error.code,subCode:m.context.error.subCode,details:m.context.error.details,source:"polling-response"});if(r.push(m),N=m.sequenceNumber,h++,!m.hasMore)break}if(h===g)throw new f({message:"Request timed out",code:"TIMEOUT",source:"polling"})}let ae=120*1e3;return await Promise.race([se(),new Promise((h,g)=>setTimeout(()=>g(new f({message:"Request timed out",code:"TIMEOUT",source:"hard-timeout"})),ae))]),r}function he(i,e,t){return{conversationId:i,inquiryId:t,ackSequenceNumber:e}}function ge(i){return i.message.match(/Error in prompt shield/u)?"I'm having trouble with this request. Try again by rephrasing the question.":i.code==="TIMEOUT"?"I'm having trouble with this request. Try again by re-asking the same question or rephrasing it.":i.message}var be=i=>{let e=i.value.length,t=72,s=180,c=i.offsetWidth,o=Math.max(1,Math.floor(c/8)),l=Math.ceil(e/o),u=t+(l-2)*24;i.style.setProperty("--calcite-text-area-min-height",`${Math.min(u,s)}px`)};function fe({messages:i}){return n`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta??"Beta"}>${i.beta??"Beta"}</calcite-chip>`}function ve({popoverContent:i}){return n`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-popover reference-element=legal-disclaimer label=legal-disclaimer placement=bottom auto-close focus-trap-disabled><div class="contained">${i}</div></calcite-popover>`}function te({errorMessage:i,slot:e}){return n`<div class="error-display"><calcite-input-message id=error-message status=invalid icon=exclamation-mark-triangle scale=m slot=${e??C}>${i}</calcite-input-message></div>`}function ye({active:i,setActive:e,messages:t}){return n`<calcite-alert slot=alerts .open=${i} placement=bottom kind=success icon=check-circle-f auto-close @calciteAlertClose=${()=>e(!1)} .label=${t.expressionapplied??"Expression applied"}><div slot=message>${t.expressionapplied??"Expression applied to editor."}</div></calcite-alert>`}function $e({context:i,messages:e}){return i?n`<div class="gaps">${i.profileName&&n`<calcite-popover auto-close placement=top .label=${(e.profilecontextlabel??"Profile context: {profileName}").replace("{profileName}",i.profileName)} reference-element=profile-context-button class="context-popover contained-popover-or-tooltip"><p>${(e.profilecontextlabel??"Profile context: {profileName}").replace("{profileName}",i.profileName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=map-information id=profile-context-button></calcite-button>`||""}${i.layerName&&n`<calcite-popover auto-close placement=top .label=${(e.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",i.layerName)} reference-element=layer-context-button class="context-popover contained-popover-or-tooltip"><p>${(e.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",i.layerName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=layers id=layer-context-button></calcite-button>`||""}</div>`:null}function ke({isDisabled:i,isReadOnly:e,setQuestion:t,setIsViewingResult:s,textAreaRef:c,question:o,errorMessage:l,setErrorMessage:u,submitQuestion:r,messages:a,mode:d,context:p}){return n`<div class="text-area-wrapper"><calcite-text-area resize=vertical .readOnly=${i||e} class="styled-text-area" .placeholder=${a.askaquestion??`Specify the calculation or logic you need in an Arcade expression. (e.g., 'Return "Yes" if value > 10')`} .value=${o} @calciteTextAreaInput=${x=>{be(x.target),t(x.target.value)}} ${V(c)}><div class="submission-actions-wrapper" slot=footer-start>${l&&te({errorMessage:l,slot:"footer-start"})||""}<div class="submission-actions">${$e({context:p,messages:a})}<div class="align-inline-end gaps"><calcite-button round kind=neutral .hidden=${d!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async()=>{s(!1),t("")}} .label=${a.startover??"Start Over"} class="hidden-above-380" id=small-start-over-button></calcite-button><calcite-tooltip reference-element=small-start-over-button placement=top-start class="hidden-above-380">${a.startover??"Start Over"}</calcite-tooltip><calcite-button round kind=neutral .hidden=${d!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async()=>{s(!1),t("")}} class="hidden-below-380">${a.startover??"Start Over"}</calcite-button><calcite-button round icon-end=effects appearance=solid .loading=${i} .disabled=${i} @click=${async()=>{u(o?"":a.enteraprompt??"Please enter a prompt"),await r()}}>${d==="prompt"?a.ask??"Generate":a.refine??"Refine"}</calcite-button></div></div></div></calcite-text-area></div>`}var xe="https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement",we="https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";function Ae({setOpen:i,messages:e,feedback:t,setFeedback:s,onSubmit:c}){return t.active?n`<calcite-sheet class="feedback-sheet" .label=${e.feedback??"Feedback"} slot=sheets display-mode=float position=block-end .open=${t.active} @calciteSheetClose=${()=>i(!1)}><calcite-panel .heading=${e.providefeedback??"Provide feedback"} .description=${e.experiencehelps??"Your experience helps guide future improvements"}><div class="feedback-content"><calcite-label>${e.experiencehelpful??"Was the assistant helpful?"}<calcite-segmented-control scale=l .disabled=${t.submitting}><calcite-segmented-control-item icon-start=thumbs-up .checked=${t.value==="good"} @click=${()=>s({...t,value:"good"})}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${t.value==="bad"} @click=${()=>s({...t,value:"bad"})}></calcite-segmented-control-item></calcite-segmented-control></calcite-label><calcite-label>${e.describeexperience??"Describe your experience"}<calcite-text-area resize=vertical .value=${t.text} @calciteTextAreaInput=${o=>s({...t,text:o.target.value})} .disabled=${t.submitting}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${o=>{s({...t,termsAccepted:o.target.checked})}} .disabled=${t.submitting}></calcite-checkbox><span>${k((e.agreement??"I agree to the {EsriPrivacyStatement} (and {Supplement}).").replace("{EsriPrivacyStatement}",`<calcite-link href=${xe} target="_blank">${e.esriprivacystatement??"Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}",`<calcite-link href=${we} target="_blank">${e.supplement??"Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${c} .disabled=${!t.termsAccepted||t.submitting} .loading=${t.submitting}>${e.submitfeedback??"Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>`:null}function Y({assistantsEnabled:i,messages:e,slot:t,assistantHelpUrl:s,helpTopicUrl:c}){return n`<calcite-block .label=${e.assistantinformation??"Assistant information"} slot=${t??C} expanded class="info-block"><calcite-chip .label=${e.new??"New"} kind=brand>${e.new??"New"}</calcite-chip><h1 class="info-heading">${e.introducing??"Introducing Arcade Assistant (beta)"}</h1><p>${e.capabilities??"The assistant uses artificial intelligence to generate Arcade expressions."}</p>${i?n`<p>${e.keepinmind??"Keep in mind the following:"}<ul><li>${e.beconsise??"Be concise, but also clear in your request"}</li><li>${e.avoidambiguity??"Avoid ambiguity and vagueness"}</li><li>${e.moredetails??"you do not need to use exact field names in your instructions, but more detail is generally better"}</li></ul>${k((e.seedocumentation??"Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}",`<calcite-link href=${c} target="_blank">${e.documentation??"documentation"}</calcite-link>`))}</p>`:n`<p>${k(e.useofassistant?.replace("{aiassistants}",`<strong>${e.aiassistants??"Ai Assistants"}</strong>`))}<calcite-link .href=${s} target=_blank icon-end=launch-2>${e.configureassistants??"Configure Assistants"}</calcite-link></p>`}</calcite-block>`}function Ce({messages:i,onProceed:e,onExit:t,helpTopicUrl:s}){return n`<calcite-dialog close-disabled placement=top .heading=${i.welcome??"Welcome to the new assistant experience"} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${i.beforeyougetstarted??"Before you get started be aware:"}</h3><ul><li>${i.maybeincorrect??"AI generated code may occasionally be incorrect or biased. Review carefully."}</li><li>${k((i.pleasereadhelp??"Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.").replace("{helpTopic}",`<calcite-link href=${s} target="_blank">${i.helptopic??"help topic"}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${i.proceed??"Proceed"}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${t} kind=neutral>${i.exit??"Exit"}</calcite-button></calcite-dialog>`}function Se({messages:i,suggestions:e,onSuggestionClick:t}){return n`<calcite-block .heading=${i.promptsuggestions} expanded collapsible id=suggestion-block><calcite-chip-group class="suggestions" .label=${i.promptsuggestions??"Prompt Suggestions"}>${T(e,s=>s,s=>n`<calcite-button round appearance=outline-fill kind=neutral .label=${i.promptsuggestion} class="suggestion-button" @click=${()=>t?.(s)}>${s}</calcite-button>`)}</calcite-chip-group></calcite-block>`}var K=200;function X({hidden:i=!1,expanded:e=!1,messages:t,cards:s,heading:c,collapsible:o=!1,showEffectsIcon:l=!1,onCopyCode:u,standalone:r}){return n`<calcite-block .hidden=${i} id=result-block .heading=${c??t.besteffort??"Here is the assistant's best effort"} .expanded=${e} .collapsible=${o}>${l&&n`<calcite-chip .label=${t.assistantresponses??"Assistant responses"} slot=content-start icon=effects scale=m class="suggestion-chips"></calcite-chip>`||""}<calcite-card-group .label=${t.assistantresponses??"Assistant responses"}>${T(s,a=>a.conversationId,a=>n`<calcite-card><div slot=heading><div class="prior-prompt"><span>${a.priorPrompt.length>K?`${a.priorPrompt.slice(0,K)}...`:a.priorPrompt}</span><calcite-action icon=duplicate scale=s slot=actions-end class="copy-prompt-button" text .id=${`copy-prompt-${a.conversationId}-${r?"standalone":"list"}`} @click=${d=>{let p=d.currentTarget;navigator.clipboard.writeText(a.priorPrompt).then(()=>{p.setAttribute("data-copied","true"),setTimeout(()=>p.removeAttribute("data-copied"),1500)})}}></calcite-action><calcite-popover .referenceElement=${`copy-prompt-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-prompt-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copyprompttoclipboard??"Copy prompt to clipboard"}</calcite-tooltip></div>${a.message&&r&&n`<div class="response-error-container">${te({errorMessage:a.message})}</div>`||""}</div><div><div class="code-response-wrapper"><div class="positioned-code-content"><calcite-chip-group .label=${t.responsecontext??"Response Context"} scale=s>${a.message&&!r&&n`<calcite-tooltip .referenceElement=${`response-chip-${a.conversationId}-error`} placement=top-start>${a.message}</calcite-tooltip><calcite-chip .id=${`response-chip-${a.conversationId}-error`} .label=${t.error??"Error"} scale=s appearance=outline icon=exclamation-mark-triangle-f class="response-error-chip"></calcite-chip>`||""}${a.chips?.map(d=>{let p=q();return n`${d.tooltip&&n`<calcite-tooltip .referenceElement=${`response-chip-${d.conversationId}-${p}`} placement=top-start class="contained-popover-or-tooltip">${d.tooltip}</calcite-tooltip>`||""}<calcite-chip .label=${d.label} .scale=${d.scale??"s"} .appearance=${d.appearance??"outline"} .icon=${d.icon} .id=${`response-chip-${d.conversationId}-${p}`}>${d.label}</calcite-chip>`})}</calcite-chip-group></div><details class="collapsible-code" open><summary>Code response</summary><arcgis-code-viewer language=arcade round>${a.code}</arcgis-code-viewer></details></div></div><div slot=footer-start class="feedback-actions"><calcite-button class="add-to-editor-button hidden-above-380" @click=${()=>a.onAddToEditor("add")} scale=s icon-start=plus round .label=${t.addtoeditor??"Add to editor"} .id=${`add-to-editor-button-${a.conversationId}-${r?"standalone":"list"}`}></calcite-button><calcite-tooltip class="hidden-above-380" .referenceElement=${`add-to-editor-button-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start>${t.addtoeditor??"Add to editor"}</calcite-tooltip><calcite-button class="add-to-editor-button hidden-below-380" @click=${()=>a.onAddToEditor("add")} scale=s icon-start=plus round>${t.addtoeditor??"Add to editor"}</calcite-button><calcite-button round icon-start=file-code kind=neutral scale=s @click=${()=>a.onAddToEditor("replace")} class="response-secondary-action-button" .id=${`replace-${a.conversationId}-${r?"standalone":"list"}`}></calcite-button><calcite-tooltip .referenceElement=${`replace-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start><span>${t.replaceineditor??"Replace all code in editor"}</span></calcite-tooltip><calcite-button round icon-start=copy-to-clipboard kind=neutral scale=s @click=${d=>{let p=d.currentTarget;u(a.code).then(()=>{p.setAttribute("data-copied","true"),setTimeout(()=>p.removeAttribute("data-copied"),1500)})}} class="response-secondary-action-button" .id=${`copy-response-${a.conversationId}-${r?"standalone":"list"}`}></calcite-button><calcite-popover .referenceElement=${`copy-response-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-response-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copytoclipboard??"Copy code to clipboard"}</calcite-tooltip></div><div slot=footer-end class="feedback-actions"><calcite-action .text=${t.thumbsup??"Thumbs up"} scale=s icon=thumbs-up @click=${a.onThumbsUp} .id=${`thumbs-up-${a.conversationId}-${r?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-up-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start><span>${t.helpful??"Helpful"}</span></calcite-tooltip><calcite-action .text=${t.thumbsdown??"Thumbs down"} scale=s icon=thumbs-down @click=${a.onThumbsDown} .id=${`thumbs-down-${a.conversationId}-${r?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-down-${a.conversationId}-${r?"standalone":"list"}`} placement=top-start><span>${t.unhelpful??"Unhelpful"}</span></calcite-tooltip></div></calcite-card>`)}</calcite-card-group></calcite-block>`}var Te="arcade_generation",Ie="ArcadeCodeRequest",I="visualization",Ee="ArcadeAssistant",Ne=["your_comments","user_evaluation","question","answer","useragent","_source","version","context","extras"],Z=[],ee=!0,E=class extends H{constructor(){super(...arguments),this.textAreaRef=O(),this.messages=L(),this._feedbackService=void 0,this.handleFeedbackButton=(e,t)=>{this.feedback={active:!0,value:e,item:t,termsAccepted:!1,text:"",submitting:!1}},this.handleFeedbackSheetClose=()=>{this.feedback={active:!1}},this.handleFeedbackSubmit=async()=>{if(!this.feedback.active)return;this.feedback={...this.feedback,submitting:!0};let e=await this.ensureFeedbackService();if(!e){this.handleFeedbackSheetClose();return}let t=this.getModel(),s=t?await this.getProfileAndMetadata(t.uri):void 0,c=de.applicationName;!c&&!this.appVersion&&b("warn",this,"esriConfig.applicationName is not set. Consider setting it to help identify the application version in feedback.");let o={user_evaluation:this.feedback.value,your_comments:this.feedback.text||void 0,question:this.feedback.item?.question??"",answer:encodeURIComponent(this.feedback.item?.formattedScript??""),useragent:navigator.userAgent,_source:Ee,version:this.appVersion||c||"NOT_SET",context:s?JSON.stringify(s):"",extras:s?.profileName??"",conversation_id:this.feedback.item?.conversationId??"",privacy_statement:this.feedback.termsAccepted?"I_agree":""};try{await e.applyEdits({addFeatures:[new pe({attributes:o})]})}catch(l){b("error",this,`Error submitting feedback. ${String(l)}`)}this.handleFeedbackSheetClose()},this.handleClose=e=>{this.closed=!0,this.closePanel?.(e)},this.setQuestion=e=>{this.question=e},this.onSuggestionClick=e=>{this.textAreaRef.value&&(this.textAreaRef.value.value=e,this.textAreaRef.value.setFocus(),this.setQuestion(e))},this.isViewingResult=!1,this.confirmationActive=!1,this.isSubmitting=!1,this.errorMessage=void 0,this.question="",this.history=[],this.feedback={active:!1},this.splashActive=!0,this.context=void 0,this.historyCards=[],this.helpBase="",this.assistantsEnabled=!1,this.closed=!1}static{this.properties={isViewingResult:16,confirmationActive:16,isSubmitting:16,errorMessage:16,question:16,history:16,feedback:16,splashActive:16,context:16,historyCards:16,closePanel:0,insertText:0,helpBase:1,assistantsEnabled:5,layer:[1,{type:Object}],portalUrl:1,serviceUrl:1,closed:7,editorRef:0,feedbackServiceUrl:1,appVersion:1}}static{this.styles=ue}get disclaimerComment(){return`// ${this.messages.disclaimercomment}
5
5
  // ${this.messages.disclaimerpt2??"AI-generated content may be inaccurate. Review before using."}`}get assistantHelpUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}administer/configure-assistants.htm`}get assistantOverviewDocUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/understand-arcade-assistant.htm`}get usingTheAssitantDocUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/use-arcade-assistant.htm`}async destroy(){}load(){let e=async()=>{let t=this.getModel();if(!t){this.context=void 0;return}let s=await this.getProfileAndMetadata(t.uri);this.context=s};e().catch(t=>{b("error",this,`Error setting initial context. ${String(t)}`)}),this.manager.onLifecycle(()=>({remove:S.onModelContextDidChange(async()=>{e().catch(t=>{b("error",this,`Error setting context. ${String(t)}`)})}).dispose}))}willUpdate(e){(e.has("history")||e.has("messages"))&&(this.historyCards=this.getHistoryCards())}connectedCallback(){super.connectedCallback(),this.history=Z,this.splashActive=ee}disconnectedCallback(){super.disconnectedCallback(),Z=this.history,ee=this.splashActive,this.copySuccessTimer&&(clearTimeout(this.copySuccessTimer),this.copySuccessTimer=void 0)}getHistoryCards(){return this.history.reduce((e,t)=>(!t.script||(e.push({priorPrompt:t.question,code:t.formattedScript||t.error||"",chips:[{label:t.profile??I,icon:"map-information",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:(this.messages.profilecontextlabel??"Profile context: {profileName}").replace("{profileName}",t.profile??I)},...t.layerName?[{label:(this.messages.numlayers??"{numLayers} {layerOrLayers}").replace("{numLayers}","1").replace("{layerOrLayers}",this.messages.numlayerssingular??"layer"),icon:"layer",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:(this.messages.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",t.layerName??"No layer")}]:[]],onAddToEditor:s=>{B(this.editorRef.editorInstance,t.formattedScript??"",s,this.disclaimerComment)},onThumbsUp:()=>this.handleFeedbackButton("good",t),onThumbsDown:()=>this.handleFeedbackButton("bad",t),conversationId:t.conversationId??"",message:t.message}),this.isViewingResult),e),[])}setFeedbackState(e){this.feedback=e}async ensureFeedbackService(){if(this._feedbackService)return this._feedbackService;if(!this.feedbackServiceUrl)return;let e=new le({url:this.feedbackServiceUrl});await e.load();let t=Ne.filter(s=>!e.fields.some(c=>c.name===s));if(t.length>0){b("error",this,`Missing the following fields in feedback service: ${t.join(", ")}. Feedback will not be logged.`);return}return this._feedbackService=e,e}getModel(){return this.editorRef.editorInstance?.getModel()}async submitQuestion(){if(this.question){this.isSubmitting=!0;try{let e=await this.getToken(),t=this.getModel();if(!t)return;let{profileName:s,metadata:c,layerName:o}=await this.getProfileAndMetadata(t.uri),l=(await me({baseUrl:this.serviceUrl,skillId:Te,message:this.question,authToken:e,context:{kind:Ie,context:{profile_name:s,metadata:c}}})).find(u=>u.context?.kind==="ArcadeCodeResponse");if(!l)return;l.context?.kind==="ArcadeCodeResponse"&&(this.history=[{script:l?.context?.arcadeCode?.code,formattedScript:j(l?.context?.arcadeCode?.code??""),error:void 0,question:this.question,profile:s,conversationId:l.conversationId,layerName:o??void 0,...l.message?{message:l.message}:{}},...this.history],this.isViewingResult=!0,this.errorMessage=void 0)}catch(e){e instanceof Error&&e.name==="ArcadeAssistantError"?this.errorMessage=ge(e)||this.messages.erroroccurred||"An error occurred.":this.errorMessage=this.messages.erroroccurred||"An error occurred.",b("error",this,e)}finally{this.isSubmitting=!1}}}async getToken(){let{token:e}=await ne.getCredential(this.portalUrl);return e}async getProfileAndMetadata(e){let t=I,s=S.getEditorProfileForModel(e);s?.loaded||await s?.loadSource();let c=this.editorRef.profile;c&&"id"in c&&(t=c.id);let o=s?.definition?.variables?.find(r=>r.type==="feature"),l=[],u;return o?.definition&&"fields"in o.definition&&(l=o.definition.fields.map(r=>({name:r.name,type:r.type,alias:r.alias})),Q(o?.definition)&&(u=o.definition.title)),{profileName:t,metadata:l,layerName:u}}onCopyCode(e){let t=e?`${this.disclaimerComment}
6
6
  ${e}`:"";return navigator.clipboard.writeText(t)}render(){return this.closed?null:this.assistantsEnabled?n`<calcite-flow><calcite-flow-item closable heading-level=2 .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.splashActive&&n`<calcite-scrim></calcite-scrim>`||""}${fe({messages:this.messages})}${ve({popoverContent:Y({assistantsEnabled:this.assistantsEnabled,messages:this.messages,assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.usingTheAssitantDocUrl})})}<calcite-shell class="unstyled-shell">${this.splashActive&&Ce({messages:this.messages,onProceed:()=>{this.splashActive=!1},helpTopicUrl:this.assistantOverviewDocUrl,onExit:e=>this.closePanel?.(e)})||""}${ye({active:this.confirmationActive,setActive:e=>this.confirmationActive=e,messages:this.messages})}${ke({isDisabled:this.isSubmitting,isReadOnly:!1,setQuestion:this.setQuestion,setIsViewingResult:e=>this.isViewingResult=e,mode:this.isViewingResult?"refine":"prompt",textAreaRef:this.textAreaRef,question:this.question,errorMessage:this.errorMessage,setErrorMessage:e=>this.errorMessage=e,submitQuestion:this.submitQuestion.bind(this),messages:this.messages,context:this.context})}<calcite-block-group label="interactive blocks">${!this.isViewingResult&&!this.isSubmitting&&Se({messages:this.messages,suggestions:[this.messages.prompsuggestion1??"",this.messages.prompsuggestion2??""],onSuggestionClick:this.onSuggestionClick})||""}<calcite-block .hidden=${!this.isSubmitting} .heading=${this.messages.generatingresponse??"Generating response..."}></calcite-block>${X({expanded:this.isViewingResult,messages:this.messages,collapsible:!0,showEffectsIcon:!0,cards:this.historyCards.length?[this.historyCards[0]]:[],heading:this.messages.besteffort??"Here's the assistant's best effort",hidden:this.isSubmitting||!this.isViewingResult,onCopyCode:this.onCopyCode.bind(this),standalone:!0})}${X({expanded:!this.isViewingResult,messages:this.messages,collapsible:!0,cards:this.isViewingResult?this.historyCards.slice(1):this.historyCards,heading:this.messages.recentprompts??"Recent prompts",hidden:this.isSubmitting||this.history.length===0,onCopyCode:this.onCopyCode.bind(this)})}</calcite-block-group>${this.feedback.active?Ae({setOpen:this.handleFeedbackSheetClose,messages:this.messages,onSubmit:this.handleFeedbackSubmit,feedback:this.feedback,setFeedback:this.setFeedbackState.bind(this)}):null}</calcite-shell></calcite-flow-item></calcite-flow>`:n`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable heading-level=2 .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${Y({slot:"content-top",messages:this.messages,assistantsEnabled:this.assistantsEnabled,assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.usingTheAssitantDocUrl})}</calcite-flow-item></calcite-flow>`}};D("arcgis-arcade-coding-assistant",E);return E},"identity/IdentityManager","request","layers/FeatureLayer","config","Graphic",a,b)
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.84 */
4
- import{a as T}from"./TE762HZP.js";import{a as f}from"./OQUYSN7I.js";import{a as m,b as o,c as E,g as L}from"./KDSG4AQ2.js";import"./HB2ES4YL.js";import{a as w}from"./FERNZR6V.js";import{Gl as F,Kl as x,Nl as p,Sl as g,kk as $}from"./3LJIRG7F.js";import"./JOZPVCEH.js";$();var P=["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],W={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 ",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},V={defaultToken:"invalid",tokenPostfix:".arcgis",ignoreCase:!0,keywords:L,operators:P,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"}],[/for(?=\s)/u,{token:"keyword",next:"@forLoopInit"}],[/[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"}]],forLoopInit:[{include:"@whitespace"},[/\(/u,{token:"@brackets",next:"@forLoopVar"}],[/.*/u,"","@pop"]],forLoopVar:[{include:"@whitespace"},[/var(?=\s)/u,"keyword","@forLoopVarName"],[/[a-z_$][\w$]*/u,"identifier","@forLoopCheckInOf"],[/\)/u,{token:"@brackets",next:"@popall"}]],forLoopVarName:[{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier","@forLoopCheckInOf"],[/\)/u,{token:"@brackets",next:"@popall"}]],forLoopCheckInOf:[{include:"@whitespace"},[/in(?=\s)/u,"keyword","@popall"],[/of(?=\s)/u,"keyword","@popall"],[/[a-z_$][\w$]*/u,"identifier"],[/\)/u,{token:"@brackets",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"}]}},b=class{constructor(e,n,{defaults:a,diagnosticsService:d}){this._languageId=e,this._worker=n,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=d,this._defaults=a,f().then(c=>{let u=s=>{let r=s.getLanguageId();if(r!==this._languageId)return;let i=T(()=>{this._doValidate(s,r).catch(A=>{throw A})}),S=s.onDidChangeContent(i),D=s.onDidChangeAttached(i);this._modelListeners.set(s.uri.toString(),[S,D]),this._doValidate(s,r).catch(console.error)},l=s=>{let r=s.uri.toString();c.setModelMarkers(s,this._languageId,[]);let i=this._modelListeners.get(r);if(i){for(;i.length;)i.pop()?.dispose();this._modelListeners.delete(r)}};this._disposables.push(c.onDidCreateModel(u)),this._disposables.push(c.onWillDisposeModel(s=>{l(s)})),this._disposables.push(c.onDidChangeModelLanguage(s=>{l(s.model),u(s.model)})),this._disposables.push(a.onDidChange(()=>{c.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(l(s),u(s))})})),this._disposables.push(a.onModelContextDidChange(s=>{c.getModels().forEach(r=>{r.getLanguageId()===this._languageId&&r.uri.toString()===s&&this._doValidate(r,this._languageId).catch(console.error)})})),this._disposables.push({dispose:()=>{this._modelListeners.forEach(s=>s.forEach(r=>r.dispose())),this._modelListeners.clear()}}),c.getModels().forEach(u)})}dispose(){this._disposables.forEach(e=>e.dispose()),this._disposables=[]}async _doValidate(e,n){if(e.isAttachedToEditor())try{let a=await f(),d=await this._worker(e.uri),c=this._defaults.getApiContextForModel(e.uri),u=await d.doValidation(e.uri.toString(),c),l=u.map(s=>K(e.uri,s));this._diagnosticsService.fireDiagnosticsChange(e.uri,u),a.setModelMarkers(e,n,l)}catch(a){console.error(a)}}};function R(t){switch(t){case m.Error:return p.Error;case m.Warning:return p.Warning;case m.Information:return p.Info;case m.Hint:return p.Hint;default:return p.Info}}function K(t,e){return{severity:R(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message}}function N(t){return{character:t.column-1,line:t.lineNumber-1}}function h(t){return new x(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function z(t){return{range:h(t.range),text:t.newText}}function O(t){return typeof t.insert<"u"&&typeof t.replace<"u"}function H(t){let e=g.CompletionItemKind;switch(t){case o.Text:return e.Text;case o.Method:return e.Method;case o.Function:return e.Function;case o.Constructor:return e.Constructor;case o.Field:return e.Field;case o.Variable:return e.Variable;case o.Class:return e.Class;case o.Interface:return e.Interface;case o.Module:return e.Module;case o.Property:return e.Property;case o.Unit:return e.Unit;case o.Value:return e.Value;case o.Enum:return e.Enum;case o.Keyword:return e.Keyword;case o.Snippet:return e.Snippet;case o.Color:return e.Color;case o.File:return e.File;case o.Reference:return e.Reference;case o.Folder:return e.Folder;case o.EnumMember:return e.EnumMember;case o.Constant:return e.Constant;case o.Struct:return e.Struct;case o.Event:return e.Event;case o.Operator:return e.Operator;case o.TypeParameter:return e.TypeParameter;default:return e.Property}}var C=class{constructor(e,n){this._worker=e,this._defaults=n,this.triggerCharacters=[".","("]}async provideCompletionItems(e,n){let a=await this._worker(e.uri),d=this._defaults.getApiContextForModel(e.uri),c=await a.doComplete(e.uri.toString(),N(n),d),u=e.getWordUntilPosition(n),l=new x(n.lineNumber,u.startColumn,n.lineNumber,u.endColumn),s=c.items.map(r=>{let i={label:r.label,insertText:r.insertText||r.label,sortText:r.sortText,filterText:r.filterText,detail:r.detail,range:l,kind:H(r.kind)};return r.textEdit&&(O(r.textEdit)?i.range={insert:h(r.textEdit.insert),replace:h(r.textEdit.replace)}:i.range=h(r.textEdit.range),i.insertText=r.textEdit.newText),r.additionalTextEdits&&(i.additionalTextEdits=r.additionalTextEdits.map(z)),r.insertTextFormat===E.Snippet&&(i.insertTextRules=g.CompletionItemInsertTextRule.InsertAsSnippet),r.documentation&&(typeof r.documentation=="string"?i.documentation=r.documentation:i.documentation={supportThemeIcons:!1,value:r.documentation.value,supportHtml:!0}),i});return{incomplete:c.isIncomplete,suggestions:s}}},y=class{constructor(e,n){this._worker=e,this._defaults=n}async provideDocumentFormattingEdits(e){let n=await this._worker(e.uri),a=this._defaults.getApiContextForModel(e.uri.toString());return(await n.doFormat(e.uri.toString(),a)).map(d=>({range:h(d.range),text:d.newText}))}},_=new w,k=class{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,_=new w),this._client=null}static async waitForWorker(){return await _.promise}async _getClientProxy(){let e=await f();if(!this._client){let{languageId:n}=this._defaults;this._worker=e.createWebWorker({moduleId:"ArcadeWorker",label:n,createData:{languageId:n},host:this._defaults.workerHost}),_.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){let n=await this._getClientProxy();return await this._worker?.withSyncedResources(e),n}},I;async function ee(...t){return await k.waitForWorker(),await new Promise((e,n)=>{if(!I){n(new Error("Arcade not registered!"));return}e(I(...t))})}var v=class{constructor(){this._onDiagnosticsChange=new F}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,n){this._onDiagnosticsChange.fire({uri:e,diagnostics:n})}},M=new v;function te(){return M}function re(t){let e=new k(t),n=async(...a)=>await e.getLanguageServiceWorker(...a);I=n,g.setMonarchTokensProvider(t.languageId,V),g.setLanguageConfiguration(t.languageId,W),g.registerCompletionItemProvider(t.languageId,new C(n,t)),g.registerDocumentFormattingEditProvider(t.languageId,new y(n,t)),new b(t.languageId,n,{defaults:t,diagnosticsService:M})}export{te as getArcadeDiagnosticService,ee as getArcadeWorker,re as setupMode};
3
+ v5.0.0-next.85 */
4
+ import{a as T}from"./GRS6C55W.js";import{a as f}from"./DYPHLMKE.js";import{a as m,b as o,c as E,g as L}from"./FVQB3CEW.js";import"./HLIW7CDL.js";import{a as w}from"./DE3RLYZ4.js";import{Gl as F,Kl as x,Nl as p,Sl as g,kk as $}from"./TLFOFTHI.js";import"./PEEHLO66.js";$();var P=["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],W={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 ",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},V={defaultToken:"invalid",tokenPostfix:".arcgis",ignoreCase:!0,keywords:L,operators:P,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"}],[/for(?=\s)/u,{token:"keyword",next:"@forLoopInit"}],[/[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"}]],forLoopInit:[{include:"@whitespace"},[/\(/u,{token:"@brackets",next:"@forLoopVar"}],[/.*/u,"","@pop"]],forLoopVar:[{include:"@whitespace"},[/var(?=\s)/u,"keyword","@forLoopVarName"],[/[a-z_$][\w$]*/u,"identifier","@forLoopCheckInOf"],[/\)/u,{token:"@brackets",next:"@popall"}]],forLoopVarName:[{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier","@forLoopCheckInOf"],[/\)/u,{token:"@brackets",next:"@popall"}]],forLoopCheckInOf:[{include:"@whitespace"},[/in(?=\s)/u,"keyword","@popall"],[/of(?=\s)/u,"keyword","@popall"],[/[a-z_$][\w$]*/u,"identifier"],[/\)/u,{token:"@brackets",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"}]}},b=class{constructor(e,n,{defaults:a,diagnosticsService:d}){this._languageId=e,this._worker=n,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=d,this._defaults=a,f().then(c=>{let u=s=>{let r=s.getLanguageId();if(r!==this._languageId)return;let i=T(()=>{this._doValidate(s,r).catch(A=>{throw A})}),S=s.onDidChangeContent(i),D=s.onDidChangeAttached(i);this._modelListeners.set(s.uri.toString(),[S,D]),this._doValidate(s,r).catch(console.error)},l=s=>{let r=s.uri.toString();c.setModelMarkers(s,this._languageId,[]);let i=this._modelListeners.get(r);if(i){for(;i.length;)i.pop()?.dispose();this._modelListeners.delete(r)}};this._disposables.push(c.onDidCreateModel(u)),this._disposables.push(c.onWillDisposeModel(s=>{l(s)})),this._disposables.push(c.onDidChangeModelLanguage(s=>{l(s.model),u(s.model)})),this._disposables.push(a.onDidChange(()=>{c.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(l(s),u(s))})})),this._disposables.push(a.onModelContextDidChange(s=>{c.getModels().forEach(r=>{r.getLanguageId()===this._languageId&&r.uri.toString()===s&&this._doValidate(r,this._languageId).catch(console.error)})})),this._disposables.push({dispose:()=>{this._modelListeners.forEach(s=>s.forEach(r=>r.dispose())),this._modelListeners.clear()}}),c.getModels().forEach(u)})}dispose(){this._disposables.forEach(e=>e.dispose()),this._disposables=[]}async _doValidate(e,n){if(e.isAttachedToEditor())try{let a=await f(),d=await this._worker(e.uri),c=this._defaults.getApiContextForModel(e.uri),u=await d.doValidation(e.uri.toString(),c),l=u.map(s=>K(e.uri,s));this._diagnosticsService.fireDiagnosticsChange(e.uri,u),a.setModelMarkers(e,n,l)}catch(a){console.error(a)}}};function R(t){switch(t){case m.Error:return p.Error;case m.Warning:return p.Warning;case m.Information:return p.Info;case m.Hint:return p.Hint;default:return p.Info}}function K(t,e){return{severity:R(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message}}function N(t){return{character:t.column-1,line:t.lineNumber-1}}function h(t){return new x(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function z(t){return{range:h(t.range),text:t.newText}}function O(t){return typeof t.insert<"u"&&typeof t.replace<"u"}function H(t){let e=g.CompletionItemKind;switch(t){case o.Text:return e.Text;case o.Method:return e.Method;case o.Function:return e.Function;case o.Constructor:return e.Constructor;case o.Field:return e.Field;case o.Variable:return e.Variable;case o.Class:return e.Class;case o.Interface:return e.Interface;case o.Module:return e.Module;case o.Property:return e.Property;case o.Unit:return e.Unit;case o.Value:return e.Value;case o.Enum:return e.Enum;case o.Keyword:return e.Keyword;case o.Snippet:return e.Snippet;case o.Color:return e.Color;case o.File:return e.File;case o.Reference:return e.Reference;case o.Folder:return e.Folder;case o.EnumMember:return e.EnumMember;case o.Constant:return e.Constant;case o.Struct:return e.Struct;case o.Event:return e.Event;case o.Operator:return e.Operator;case o.TypeParameter:return e.TypeParameter;default:return e.Property}}var C=class{constructor(e,n){this._worker=e,this._defaults=n,this.triggerCharacters=[".","("]}async provideCompletionItems(e,n){let a=await this._worker(e.uri),d=this._defaults.getApiContextForModel(e.uri),c=await a.doComplete(e.uri.toString(),N(n),d),u=e.getWordUntilPosition(n),l=new x(n.lineNumber,u.startColumn,n.lineNumber,u.endColumn),s=c.items.map(r=>{let i={label:r.label,insertText:r.insertText||r.label,sortText:r.sortText,filterText:r.filterText,detail:r.detail,range:l,kind:H(r.kind)};return r.textEdit&&(O(r.textEdit)?i.range={insert:h(r.textEdit.insert),replace:h(r.textEdit.replace)}:i.range=h(r.textEdit.range),i.insertText=r.textEdit.newText),r.additionalTextEdits&&(i.additionalTextEdits=r.additionalTextEdits.map(z)),r.insertTextFormat===E.Snippet&&(i.insertTextRules=g.CompletionItemInsertTextRule.InsertAsSnippet),r.documentation&&(typeof r.documentation=="string"?i.documentation=r.documentation:i.documentation={supportThemeIcons:!1,value:r.documentation.value,supportHtml:!0}),i});return{incomplete:c.isIncomplete,suggestions:s}}},y=class{constructor(e,n){this._worker=e,this._defaults=n}async provideDocumentFormattingEdits(e){let n=await this._worker(e.uri),a=this._defaults.getApiContextForModel(e.uri.toString());return(await n.doFormat(e.uri.toString(),a)).map(d=>({range:h(d.range),text:d.newText}))}},_=new w,k=class{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,_=new w),this._client=null}static async waitForWorker(){return await _.promise}async _getClientProxy(){let e=await f();if(!this._client){let{languageId:n}=this._defaults;this._worker=e.createWebWorker({moduleId:"ArcadeWorker",label:n,createData:{languageId:n},host:this._defaults.workerHost}),_.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){let n=await this._getClientProxy();return await this._worker?.withSyncedResources(e),n}},I;async function ee(...t){return await k.waitForWorker(),await new Promise((e,n)=>{if(!I){n(new Error("Arcade not registered!"));return}e(I(...t))})}var v=class{constructor(){this._onDiagnosticsChange=new F}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,n){this._onDiagnosticsChange.fire({uri:e,diagnostics:n})}},M=new v;function te(){return M}function re(t){let e=new k(t),n=async(...a)=>await e.getLanguageServiceWorker(...a);I=n,g.setMonarchTokensProvider(t.languageId,V),g.setLanguageConfiguration(t.languageId,W),g.registerCompletionItemProvider(t.languageId,new C(n,t)),g.registerDocumentFormattingEditProvider(t.languageId,new y(n,t)),new b(t.languageId,n,{defaults:t,diagnosticsService:M})}export{te as getArcadeDiagnosticService,ee as getArcadeWorker,re as setupMode};
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.84 */
4
- import{Tl as le}from"./3LJIRG7F.js";import"./JOZPVCEH.js";var Ot=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Rt=Object.getOwnPropertyNames,Mt=Object.prototype.hasOwnProperty,fe=(e,r,i,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Rt(r))!Mt.call(e,t)&&t!==i&&Ot(e,t,{get:()=>r[t],enumerable:!(n=Nt(r,t))||n.enumerable});return e},Dt=(e,r,i)=>(fe(e,r,"default"),i&&fe(i,r,"default")),f={};Dt(f,le);var Ft=120*1e3,Ut=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>Ft&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=f.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let r;return this._getClient().then(i=>{r=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(i=>r)}},de;(function(e){function r(i){return typeof i=="string"}e.is=r})(de||(de={}));var Q;(function(e){function r(i){return typeof i=="string"}e.is=r})(Q||(Q={}));var ge;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(ge||(ge={}));var W;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(W||(W={}));var O;(function(e){function r(n,t){return n===Number.MAX_VALUE&&(n=W.MAX_VALUE),t===Number.MAX_VALUE&&(t=W.MAX_VALUE),{line:n,character:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.line)&&a.uinteger(t.character)}e.is=i})(O||(O={}));var m;(function(e){function r(n,t,o,s){if(a.uinteger(n)&&a.uinteger(t)&&a.uinteger(o)&&a.uinteger(s))return{start:O.create(n,t),end:O.create(o,s)};if(O.is(n)&&O.is(t))return{start:n,end:t};throw new Error(`Range#create called with invalid arguments[${n}, ${t}, ${o}, ${s}]`)}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.start)&&O.is(t.end)}e.is=i})(m||(m={}));var H;(function(e){function r(n,t){return{uri:n,range:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(a.string(t.uri)||a.undefined(t.uri))}e.is=i})(H||(H={}));var pe;(function(e){function r(n,t,o,s){return{targetUri:n,targetRange:t,targetSelectionRange:o,originSelectionRange:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.targetRange)&&a.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||a.undefined(t.originSelectionRange))}e.is=i})(pe||(pe={}));var Y;(function(e){function r(n,t,o,s){return{red:n,green:t,blue:o,alpha:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.numberRange(t.red,0,1)&&a.numberRange(t.green,0,1)&&a.numberRange(t.blue,0,1)&&a.numberRange(t.alpha,0,1)}e.is=i})(Y||(Y={}));var ve;(function(e){function r(n,t){return{range:n,color:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&Y.is(t.color)}e.is=i})(ve||(ve={}));var me;(function(e){function r(n,t,o){return{label:n,textEdit:t,additionalTextEdits:o}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.undefined(t.textEdit)||T.is(t))&&(a.undefined(t.additionalTextEdits)||a.typedArray(t.additionalTextEdits,T.is))}e.is=i})(me||(me={}));var P;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(P||(P={}));var he;(function(e){function r(n,t,o,s,u,g){let c={startLine:n,endLine:t};return a.defined(o)&&(c.startCharacter=o),a.defined(s)&&(c.endCharacter=s),a.defined(u)&&(c.kind=u),a.defined(g)&&(c.collapsedText=g),c}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.startLine)&&a.uinteger(t.startLine)&&(a.undefined(t.startCharacter)||a.uinteger(t.startCharacter))&&(a.undefined(t.endCharacter)||a.uinteger(t.endCharacter))&&(a.undefined(t.kind)||a.string(t.kind))}e.is=i})(he||(he={}));var G;(function(e){function r(n,t){return{location:n,message:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&H.is(t.location)&&a.string(t.message)}e.is=i})(G||(G={}));var F;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(F||(F={}));var _e;(function(e){e.Unnecessary=1,e.Deprecated=2})(_e||(_e={}));var ke;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&a.string(n.href)}e.is=r})(ke||(ke={}));var z;(function(e){function r(n,t,o,s,u,g){let c={range:n,message:t};return a.defined(o)&&(c.severity=o),a.defined(s)&&(c.code=s),a.defined(u)&&(c.source=u),a.defined(g)&&(c.relatedInformation=g),c}e.create=r;function i(n){var t;let o=n;return a.defined(o)&&m.is(o.range)&&a.string(o.message)&&(a.number(o.severity)||a.undefined(o.severity))&&(a.integer(o.code)||a.string(o.code)||a.undefined(o.code))&&(a.undefined(o.codeDescription)||a.string((t=o.codeDescription)===null||t===void 0?void 0:t.href))&&(a.string(o.source)||a.undefined(o.source))&&(a.undefined(o.relatedInformation)||a.typedArray(o.relatedInformation,G.is))}e.is=i})(z||(z={}));var U;(function(e){function r(n,t,...o){let s={title:n,command:t};return a.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.title)&&a.string(t.command)}e.is=i})(U||(U={}));var T;(function(e){function r(o,s){return{range:o,newText:s}}e.replace=r;function i(o,s){return{range:{start:o,end:o},newText:s}}e.insert=i;function n(o){return{range:o,newText:""}}e.del=n;function t(o){let s=o;return a.objectLiteral(s)&&a.string(s.newText)&&m.is(s.range)}e.is=t})(T||(T={}));var Z;(function(e){function r(n,t,o){let s={label:n};return t!==void 0&&(s.needsConfirmation=t),o!==void 0&&(s.description=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(a.string(t.description)||t.description===void 0)}e.is=i})(Z||(Z={}));var j;(function(e){function r(i){let n=i;return a.string(n)}e.is=r})(j||(j={}));var be;(function(e){function r(o,s,u){return{range:o,newText:s,annotationId:u}}e.replace=r;function i(o,s,u){return{range:{start:o,end:o},newText:s,annotationId:u}}e.insert=i;function n(o,s){return{range:o,newText:"",annotationId:s}}e.del=n;function t(o){let s=o;return T.is(s)&&(Z.is(s.annotationId)||j.is(s.annotationId))}e.is=t})(be||(be={}));var K;(function(e){function r(n,t){return{textDocument:n,edits:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&re.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(K||(K={}));var C;(function(e){function r(n,t,o){let s={kind:"create",uri:n};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="create"&&a.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(C||(C={}));var ee;(function(e){function r(n,t,o,s){let u={kind:"rename",oldUri:n,newUri:t};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(u.options=o),s!==void 0&&(u.annotationId=s),u}e.create=r;function i(n){let t=n;return t&&t.kind==="rename"&&a.string(t.oldUri)&&a.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(ee||(ee={}));var te;(function(e){function r(n,t,o){let s={kind:"delete",uri:n};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="delete"&&a.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||a.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||a.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(te||(te={}));var ne;(function(e){function r(i){let n=i;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(t=>a.string(t.kind)?C.is(t)||ee.is(t)||te.is(t):K.is(t)))}e.is=r})(ne||(ne={}));var we;(function(e){function r(n){return{uri:n}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)}e.is=i})(we||(we={}));var Ae;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.integer(t.version)}e.is=i})(Ae||(Ae={}));var re;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&(t.version===null||a.integer(t.version))}e.is=i})(re||(re={}));var Ie;(function(e){function r(n,t,o,s){return{uri:n,languageId:t,version:o,text:s}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.string(t.languageId)&&a.integer(t.version)&&a.string(t.text)}e.is=i})(Ie||(Ie={}));var ie;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){let n=i;return n===e.PlainText||n===e.Markdown}e.is=r})(ie||(ie={}));var V;(function(e){function r(i){let n=i;return a.objectLiteral(i)&&ie.is(n.kind)&&a.string(n.value)}e.is=r})(V||(V={}));var h;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(h||(h={}));var oe;(function(e){e.PlainText=1,e.Snippet=2})(oe||(oe={}));var Ee;(function(e){e.Deprecated=1})(Ee||(Ee={}));var Le;(function(e){function r(n,t,o){return{newText:n,insert:t,replace:o}}e.create=r;function i(n){let t=n;return t&&a.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.is=i})(Le||(Le={}));var Oe;(function(e){e.asIs=1,e.adjustIndentation=2})(Oe||(Oe={}));var Ne;(function(e){function r(i){let n=i;return n&&(a.string(n.detail)||n.detail===void 0)&&(a.string(n.description)||n.description===void 0)}e.is=r})(Ne||(Ne={}));var Re;(function(e){function r(i){return{label:i}}e.create=r})(Re||(Re={}));var Me;(function(e){function r(i,n){return{items:i||[],isIncomplete:!!n}}e.create=r})(Me||(Me={}));var X;(function(e){function r(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(n){let t=n;return a.string(t)||a.objectLiteral(t)&&a.string(t.language)&&a.string(t.value)}e.is=i})(X||(X={}));var De;(function(e){function r(i){let n=i;return!!n&&a.objectLiteral(n)&&(V.is(n.contents)||X.is(n.contents)||a.typedArray(n.contents,X.is))&&(i.range===void 0||m.is(i.range))}e.is=r})(De||(De={}));var Fe;(function(e){function r(i,n){return n?{label:i,documentation:n}:{label:i}}e.create=r})(Fe||(Fe={}));var Ue;(function(e){function r(i,n,...t){let o={label:i};return a.defined(n)&&(o.documentation=n),a.defined(t)?o.parameters=t:o.parameters=[],o}e.create=r})(Ue||(Ue={}));var S;(function(e){e.Text=1,e.Read=2,e.Write=3})(S||(S={}));var Te;(function(e){function r(i,n){let t={range:i};return a.number(n)&&(t.kind=n),t}e.create=r})(Te||(Te={}));var _;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(_||(_={}));var je;(function(e){e.Deprecated=1})(je||(je={}));var xe;(function(e){function r(i,n,t,o,s){let u={name:i,kind:n,location:{uri:o,range:t}};return s&&(u.containerName=s),u}e.create=r})(xe||(xe={}));var ye;(function(e){function r(i,n,t,o){return o!==void 0?{name:i,kind:n,location:{uri:t,range:o}}:{name:i,kind:n,location:{uri:t}}}e.create=r})(ye||(ye={}));var Pe;(function(e){function r(n,t,o,s,u,g){let c={name:n,detail:t,kind:o,range:s,selectionRange:u};return g!==void 0&&(c.children=g),c}e.create=r;function i(n){let t=n;return t&&a.string(t.name)&&a.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(t.detail===void 0||a.string(t.detail))&&(t.deprecated===void 0||a.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Pe||(Pe={}));var Se;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Se||(Se={}));var q;(function(e){e.Invoked=1,e.Automatic=2})(q||(q={}));var Ve;(function(e){function r(n,t,o){let s={diagnostics:n};return t!=null&&(s.only=t),o!=null&&(s.triggerKind=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.typedArray(t.diagnostics,z.is)&&(t.only===void 0||a.typedArray(t.only,a.string))&&(t.triggerKind===void 0||t.triggerKind===q.Invoked||t.triggerKind===q.Automatic)}e.is=i})(Ve||(Ve={}));var Be;(function(e){function r(n,t,o){let s={title:n},u=!0;return typeof t=="string"?(u=!1,s.kind=t):U.is(t)?s.command=t:s.edit=t,u&&o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return t&&a.string(t.title)&&(t.diagnostics===void 0||a.typedArray(t.diagnostics,z.is))&&(t.kind===void 0||a.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||U.is(t.command))&&(t.isPreferred===void 0||a.boolean(t.isPreferred))&&(t.edit===void 0||ne.is(t.edit))}e.is=i})(Be||(Be={}));var We;(function(e){function r(n,t){let o={range:n};return a.defined(t)&&(o.data=t),o}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.command)||U.is(t.command))}e.is=i})(We||(We={}));var He;(function(e){function r(n,t){return{tabSize:n,insertSpaces:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.uinteger(t.tabSize)&&a.boolean(t.insertSpaces)}e.is=i})(He||(He={}));var ze;(function(e){function r(n,t,o){return{range:n,target:t,data:o}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.target)||a.string(t.target))}e.is=i})(ze||(ze={}));var Xe;(function(e){function r(n,t){return{range:n,parent:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Xe||(Xe={}));var qe;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(qe||(qe={}));var Je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Je||(Je={}));var $e;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=r})($e||($e={}));var Qe;(function(e){function r(n,t){return{range:n,text:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.string(t.text)}e.is=i})(Qe||(Qe={}));var Ye;(function(e){function r(n,t,o){return{range:n,variableName:t,caseSensitiveLookup:o}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.boolean(t.caseSensitiveLookup)&&(a.string(t.variableName)||t.variableName===void 0)}e.is=i})(Ye||(Ye={}));var Ge;(function(e){function r(n,t){return{range:n,expression:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&(a.string(t.expression)||t.expression===void 0)}e.is=i})(Ge||(Ge={}));var Ze;(function(e){function r(n,t){return{frameId:n,stoppedLocation:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(n.stoppedLocation)}e.is=i})(Ze||(Ze={}));var se;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(se||(se={}));var ae;(function(e){function r(n){return{value:n}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.location===void 0||H.is(t.location))&&(t.command===void 0||U.is(t.command))}e.is=i})(ae||(ae={}));var Ke;(function(e){function r(n,t,o){let s={position:n,label:t};return o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.position)&&(a.string(t.label)||a.typedArray(t.label,ae.is))&&(t.kind===void 0||se.is(t.kind))&&t.textEdits===void 0||a.typedArray(t.textEdits,T.is)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.paddingLeft===void 0||a.boolean(t.paddingLeft))&&(t.paddingRight===void 0||a.boolean(t.paddingRight))}e.is=i})(Ke||(Ke={}));var Ce;(function(e){function r(i){return{kind:"snippet",value:i}}e.createSnippet=r})(Ce||(Ce={}));var et;(function(e){function r(i,n,t,o){return{insertText:i,filterText:n,range:t,command:o}}e.create=r})(et||(et={}));var tt;(function(e){function r(i){return{items:i}}e.create=r})(tt||(tt={}));var nt;(function(e){e.Invoked=0,e.Automatic=1})(nt||(nt={}));var rt;(function(e){function r(i,n){return{range:i,text:n}}e.create=r})(rt||(rt={}));var it;(function(e){function r(i,n){return{triggerKind:i,selectedCompletionInfo:n}}e.create=r})(it||(it={}));var ot;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&Q.is(n.uri)&&a.string(n.name)}e.is=r})(ot||(ot={}));var st;(function(e){function r(o,s,u,g){return new Tt(o,s,u,g)}e.create=r;function i(o){let s=o;return!!(a.defined(s)&&a.string(s.uri)&&(a.undefined(s.languageId)||a.string(s.languageId))&&a.uinteger(s.lineCount)&&a.func(s.getText)&&a.func(s.positionAt)&&a.func(s.offsetAt))}e.is=i;function n(o,s){let u=o.getText(),g=t(s,(v,d)=>{let k=v.range.start.line-d.range.start.line;return k===0?v.range.start.character-d.range.start.character:k}),c=u.length;for(let v=g.length-1;v>=0;v--){let d=g[v],k=o.offsetAt(d.range.start),p=o.offsetAt(d.range.end);if(p<=c)u=u.substring(0,k)+d.newText+u.substring(p,u.length);else throw new Error("Overlapping edit");c=k}return u}e.applyEdits=n;function t(o,s){if(o.length<=1)return o;let u=o.length/2|0,g=o.slice(0,u),c=o.slice(u);t(g,s),t(c,s);let v=0,d=0,k=0;for(;v<g.length&&d<c.length;)s(g[v],c[d])<=0?o[k++]=g[v++]:o[k++]=c[d++];for(;v<g.length;)o[k++]=g[v++];for(;d<c.length;)o[k++]=c[d++];return o}})(st||(st={}));var Tt=class{constructor(e,r,i,n){this._uri=e,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(r,i)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,i=!0;for(let n=0;n<r.length;n++){i&&(e.push(n),i=!1);let t=r.charAt(n);i=t==="\r"||t===`
3
+ v5.0.0-next.85 */
4
+ import{Tl as le}from"./TLFOFTHI.js";import"./PEEHLO66.js";var Ot=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Rt=Object.getOwnPropertyNames,Mt=Object.prototype.hasOwnProperty,fe=(e,r,i,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Rt(r))!Mt.call(e,t)&&t!==i&&Ot(e,t,{get:()=>r[t],enumerable:!(n=Nt(r,t))||n.enumerable});return e},Dt=(e,r,i)=>(fe(e,r,"default"),i&&fe(i,r,"default")),f={};Dt(f,le);var Ft=120*1e3,Ut=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>Ft&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=f.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let r;return this._getClient().then(i=>{r=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(i=>r)}},de;(function(e){function r(i){return typeof i=="string"}e.is=r})(de||(de={}));var Q;(function(e){function r(i){return typeof i=="string"}e.is=r})(Q||(Q={}));var ge;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(ge||(ge={}));var W;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(W||(W={}));var O;(function(e){function r(n,t){return n===Number.MAX_VALUE&&(n=W.MAX_VALUE),t===Number.MAX_VALUE&&(t=W.MAX_VALUE),{line:n,character:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.line)&&a.uinteger(t.character)}e.is=i})(O||(O={}));var m;(function(e){function r(n,t,o,s){if(a.uinteger(n)&&a.uinteger(t)&&a.uinteger(o)&&a.uinteger(s))return{start:O.create(n,t),end:O.create(o,s)};if(O.is(n)&&O.is(t))return{start:n,end:t};throw new Error(`Range#create called with invalid arguments[${n}, ${t}, ${o}, ${s}]`)}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.start)&&O.is(t.end)}e.is=i})(m||(m={}));var H;(function(e){function r(n,t){return{uri:n,range:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(a.string(t.uri)||a.undefined(t.uri))}e.is=i})(H||(H={}));var pe;(function(e){function r(n,t,o,s){return{targetUri:n,targetRange:t,targetSelectionRange:o,originSelectionRange:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.targetRange)&&a.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||a.undefined(t.originSelectionRange))}e.is=i})(pe||(pe={}));var Y;(function(e){function r(n,t,o,s){return{red:n,green:t,blue:o,alpha:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.numberRange(t.red,0,1)&&a.numberRange(t.green,0,1)&&a.numberRange(t.blue,0,1)&&a.numberRange(t.alpha,0,1)}e.is=i})(Y||(Y={}));var ve;(function(e){function r(n,t){return{range:n,color:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&Y.is(t.color)}e.is=i})(ve||(ve={}));var me;(function(e){function r(n,t,o){return{label:n,textEdit:t,additionalTextEdits:o}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.undefined(t.textEdit)||T.is(t))&&(a.undefined(t.additionalTextEdits)||a.typedArray(t.additionalTextEdits,T.is))}e.is=i})(me||(me={}));var P;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(P||(P={}));var he;(function(e){function r(n,t,o,s,u,g){let c={startLine:n,endLine:t};return a.defined(o)&&(c.startCharacter=o),a.defined(s)&&(c.endCharacter=s),a.defined(u)&&(c.kind=u),a.defined(g)&&(c.collapsedText=g),c}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.startLine)&&a.uinteger(t.startLine)&&(a.undefined(t.startCharacter)||a.uinteger(t.startCharacter))&&(a.undefined(t.endCharacter)||a.uinteger(t.endCharacter))&&(a.undefined(t.kind)||a.string(t.kind))}e.is=i})(he||(he={}));var G;(function(e){function r(n,t){return{location:n,message:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&H.is(t.location)&&a.string(t.message)}e.is=i})(G||(G={}));var F;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(F||(F={}));var _e;(function(e){e.Unnecessary=1,e.Deprecated=2})(_e||(_e={}));var ke;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&a.string(n.href)}e.is=r})(ke||(ke={}));var z;(function(e){function r(n,t,o,s,u,g){let c={range:n,message:t};return a.defined(o)&&(c.severity=o),a.defined(s)&&(c.code=s),a.defined(u)&&(c.source=u),a.defined(g)&&(c.relatedInformation=g),c}e.create=r;function i(n){var t;let o=n;return a.defined(o)&&m.is(o.range)&&a.string(o.message)&&(a.number(o.severity)||a.undefined(o.severity))&&(a.integer(o.code)||a.string(o.code)||a.undefined(o.code))&&(a.undefined(o.codeDescription)||a.string((t=o.codeDescription)===null||t===void 0?void 0:t.href))&&(a.string(o.source)||a.undefined(o.source))&&(a.undefined(o.relatedInformation)||a.typedArray(o.relatedInformation,G.is))}e.is=i})(z||(z={}));var U;(function(e){function r(n,t,...o){let s={title:n,command:t};return a.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.title)&&a.string(t.command)}e.is=i})(U||(U={}));var T;(function(e){function r(o,s){return{range:o,newText:s}}e.replace=r;function i(o,s){return{range:{start:o,end:o},newText:s}}e.insert=i;function n(o){return{range:o,newText:""}}e.del=n;function t(o){let s=o;return a.objectLiteral(s)&&a.string(s.newText)&&m.is(s.range)}e.is=t})(T||(T={}));var Z;(function(e){function r(n,t,o){let s={label:n};return t!==void 0&&(s.needsConfirmation=t),o!==void 0&&(s.description=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(a.string(t.description)||t.description===void 0)}e.is=i})(Z||(Z={}));var j;(function(e){function r(i){let n=i;return a.string(n)}e.is=r})(j||(j={}));var be;(function(e){function r(o,s,u){return{range:o,newText:s,annotationId:u}}e.replace=r;function i(o,s,u){return{range:{start:o,end:o},newText:s,annotationId:u}}e.insert=i;function n(o,s){return{range:o,newText:"",annotationId:s}}e.del=n;function t(o){let s=o;return T.is(s)&&(Z.is(s.annotationId)||j.is(s.annotationId))}e.is=t})(be||(be={}));var K;(function(e){function r(n,t){return{textDocument:n,edits:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&re.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(K||(K={}));var C;(function(e){function r(n,t,o){let s={kind:"create",uri:n};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="create"&&a.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(C||(C={}));var ee;(function(e){function r(n,t,o,s){let u={kind:"rename",oldUri:n,newUri:t};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(u.options=o),s!==void 0&&(u.annotationId=s),u}e.create=r;function i(n){let t=n;return t&&t.kind==="rename"&&a.string(t.oldUri)&&a.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(ee||(ee={}));var te;(function(e){function r(n,t,o){let s={kind:"delete",uri:n};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="delete"&&a.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||a.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||a.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(te||(te={}));var ne;(function(e){function r(i){let n=i;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(t=>a.string(t.kind)?C.is(t)||ee.is(t)||te.is(t):K.is(t)))}e.is=r})(ne||(ne={}));var we;(function(e){function r(n){return{uri:n}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)}e.is=i})(we||(we={}));var Ae;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.integer(t.version)}e.is=i})(Ae||(Ae={}));var re;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&(t.version===null||a.integer(t.version))}e.is=i})(re||(re={}));var Ie;(function(e){function r(n,t,o,s){return{uri:n,languageId:t,version:o,text:s}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.string(t.languageId)&&a.integer(t.version)&&a.string(t.text)}e.is=i})(Ie||(Ie={}));var ie;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){let n=i;return n===e.PlainText||n===e.Markdown}e.is=r})(ie||(ie={}));var V;(function(e){function r(i){let n=i;return a.objectLiteral(i)&&ie.is(n.kind)&&a.string(n.value)}e.is=r})(V||(V={}));var h;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(h||(h={}));var oe;(function(e){e.PlainText=1,e.Snippet=2})(oe||(oe={}));var Ee;(function(e){e.Deprecated=1})(Ee||(Ee={}));var Le;(function(e){function r(n,t,o){return{newText:n,insert:t,replace:o}}e.create=r;function i(n){let t=n;return t&&a.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.is=i})(Le||(Le={}));var Oe;(function(e){e.asIs=1,e.adjustIndentation=2})(Oe||(Oe={}));var Ne;(function(e){function r(i){let n=i;return n&&(a.string(n.detail)||n.detail===void 0)&&(a.string(n.description)||n.description===void 0)}e.is=r})(Ne||(Ne={}));var Re;(function(e){function r(i){return{label:i}}e.create=r})(Re||(Re={}));var Me;(function(e){function r(i,n){return{items:i||[],isIncomplete:!!n}}e.create=r})(Me||(Me={}));var X;(function(e){function r(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(n){let t=n;return a.string(t)||a.objectLiteral(t)&&a.string(t.language)&&a.string(t.value)}e.is=i})(X||(X={}));var De;(function(e){function r(i){let n=i;return!!n&&a.objectLiteral(n)&&(V.is(n.contents)||X.is(n.contents)||a.typedArray(n.contents,X.is))&&(i.range===void 0||m.is(i.range))}e.is=r})(De||(De={}));var Fe;(function(e){function r(i,n){return n?{label:i,documentation:n}:{label:i}}e.create=r})(Fe||(Fe={}));var Ue;(function(e){function r(i,n,...t){let o={label:i};return a.defined(n)&&(o.documentation=n),a.defined(t)?o.parameters=t:o.parameters=[],o}e.create=r})(Ue||(Ue={}));var S;(function(e){e.Text=1,e.Read=2,e.Write=3})(S||(S={}));var Te;(function(e){function r(i,n){let t={range:i};return a.number(n)&&(t.kind=n),t}e.create=r})(Te||(Te={}));var _;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(_||(_={}));var je;(function(e){e.Deprecated=1})(je||(je={}));var xe;(function(e){function r(i,n,t,o,s){let u={name:i,kind:n,location:{uri:o,range:t}};return s&&(u.containerName=s),u}e.create=r})(xe||(xe={}));var ye;(function(e){function r(i,n,t,o){return o!==void 0?{name:i,kind:n,location:{uri:t,range:o}}:{name:i,kind:n,location:{uri:t}}}e.create=r})(ye||(ye={}));var Pe;(function(e){function r(n,t,o,s,u,g){let c={name:n,detail:t,kind:o,range:s,selectionRange:u};return g!==void 0&&(c.children=g),c}e.create=r;function i(n){let t=n;return t&&a.string(t.name)&&a.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(t.detail===void 0||a.string(t.detail))&&(t.deprecated===void 0||a.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Pe||(Pe={}));var Se;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Se||(Se={}));var q;(function(e){e.Invoked=1,e.Automatic=2})(q||(q={}));var Ve;(function(e){function r(n,t,o){let s={diagnostics:n};return t!=null&&(s.only=t),o!=null&&(s.triggerKind=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.typedArray(t.diagnostics,z.is)&&(t.only===void 0||a.typedArray(t.only,a.string))&&(t.triggerKind===void 0||t.triggerKind===q.Invoked||t.triggerKind===q.Automatic)}e.is=i})(Ve||(Ve={}));var Be;(function(e){function r(n,t,o){let s={title:n},u=!0;return typeof t=="string"?(u=!1,s.kind=t):U.is(t)?s.command=t:s.edit=t,u&&o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return t&&a.string(t.title)&&(t.diagnostics===void 0||a.typedArray(t.diagnostics,z.is))&&(t.kind===void 0||a.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||U.is(t.command))&&(t.isPreferred===void 0||a.boolean(t.isPreferred))&&(t.edit===void 0||ne.is(t.edit))}e.is=i})(Be||(Be={}));var We;(function(e){function r(n,t){let o={range:n};return a.defined(t)&&(o.data=t),o}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.command)||U.is(t.command))}e.is=i})(We||(We={}));var He;(function(e){function r(n,t){return{tabSize:n,insertSpaces:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.uinteger(t.tabSize)&&a.boolean(t.insertSpaces)}e.is=i})(He||(He={}));var ze;(function(e){function r(n,t,o){return{range:n,target:t,data:o}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.target)||a.string(t.target))}e.is=i})(ze||(ze={}));var Xe;(function(e){function r(n,t){return{range:n,parent:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Xe||(Xe={}));var qe;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(qe||(qe={}));var Je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Je||(Je={}));var $e;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=r})($e||($e={}));var Qe;(function(e){function r(n,t){return{range:n,text:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.string(t.text)}e.is=i})(Qe||(Qe={}));var Ye;(function(e){function r(n,t,o){return{range:n,variableName:t,caseSensitiveLookup:o}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.boolean(t.caseSensitiveLookup)&&(a.string(t.variableName)||t.variableName===void 0)}e.is=i})(Ye||(Ye={}));var Ge;(function(e){function r(n,t){return{range:n,expression:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&(a.string(t.expression)||t.expression===void 0)}e.is=i})(Ge||(Ge={}));var Ze;(function(e){function r(n,t){return{frameId:n,stoppedLocation:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(n.stoppedLocation)}e.is=i})(Ze||(Ze={}));var se;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(se||(se={}));var ae;(function(e){function r(n){return{value:n}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.location===void 0||H.is(t.location))&&(t.command===void 0||U.is(t.command))}e.is=i})(ae||(ae={}));var Ke;(function(e){function r(n,t,o){let s={position:n,label:t};return o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.position)&&(a.string(t.label)||a.typedArray(t.label,ae.is))&&(t.kind===void 0||se.is(t.kind))&&t.textEdits===void 0||a.typedArray(t.textEdits,T.is)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.paddingLeft===void 0||a.boolean(t.paddingLeft))&&(t.paddingRight===void 0||a.boolean(t.paddingRight))}e.is=i})(Ke||(Ke={}));var Ce;(function(e){function r(i){return{kind:"snippet",value:i}}e.createSnippet=r})(Ce||(Ce={}));var et;(function(e){function r(i,n,t,o){return{insertText:i,filterText:n,range:t,command:o}}e.create=r})(et||(et={}));var tt;(function(e){function r(i){return{items:i}}e.create=r})(tt||(tt={}));var nt;(function(e){e.Invoked=0,e.Automatic=1})(nt||(nt={}));var rt;(function(e){function r(i,n){return{range:i,text:n}}e.create=r})(rt||(rt={}));var it;(function(e){function r(i,n){return{triggerKind:i,selectedCompletionInfo:n}}e.create=r})(it||(it={}));var ot;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&Q.is(n.uri)&&a.string(n.name)}e.is=r})(ot||(ot={}));var st;(function(e){function r(o,s,u,g){return new Tt(o,s,u,g)}e.create=r;function i(o){let s=o;return!!(a.defined(s)&&a.string(s.uri)&&(a.undefined(s.languageId)||a.string(s.languageId))&&a.uinteger(s.lineCount)&&a.func(s.getText)&&a.func(s.positionAt)&&a.func(s.offsetAt))}e.is=i;function n(o,s){let u=o.getText(),g=t(s,(v,d)=>{let k=v.range.start.line-d.range.start.line;return k===0?v.range.start.character-d.range.start.character:k}),c=u.length;for(let v=g.length-1;v>=0;v--){let d=g[v],k=o.offsetAt(d.range.start),p=o.offsetAt(d.range.end);if(p<=c)u=u.substring(0,k)+d.newText+u.substring(p,u.length);else throw new Error("Overlapping edit");c=k}return u}e.applyEdits=n;function t(o,s){if(o.length<=1)return o;let u=o.length/2|0,g=o.slice(0,u),c=o.slice(u);t(g,s),t(c,s);let v=0,d=0,k=0;for(;v<g.length&&d<c.length;)s(g[v],c[d])<=0?o[k++]=g[v++]:o[k++]=c[d++];for(;v<g.length;)o[k++]=g[v++];for(;d<c.length;)o[k++]=c[d++];return o}})(st||(st={}));var Tt=class{constructor(e,r,i,n){this._uri=e,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(r,i)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,i=!0;for(let n=0;n<r.length;n++){i&&(e.push(n),i=!1);let t=r.charAt(n);i=t==="\r"||t===`
5
5
  `,t==="\r"&&n+1<r.length&&r.charAt(n+1)===`
6
6
  `&&n++}i&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),i=0,n=r.length;if(n===0)return O.create(0,e);for(;i<n;){let o=Math.floor((i+n)/2);r[o]>e?n=o:i=o+1}let t=i-1;return O.create(t,e-r[t])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let i=r[e.line],n=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)}get lineCount(){return this.getLineOffsets().length}},a;(function(e){let r=Object.prototype.toString;function i(p){return typeof p<"u"}e.defined=i;function n(p){return typeof p>"u"}e.undefined=n;function t(p){return p===!0||p===!1}e.boolean=t;function o(p){return r.call(p)==="[object String]"}e.string=o;function s(p){return r.call(p)==="[object Number]"}e.number=s;function u(p,N,J){return r.call(p)==="[object Number]"&&N<=p&&p<=J}e.numberRange=u;function g(p){return r.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}e.integer=g;function c(p){return r.call(p)==="[object Number]"&&0<=p&&p<=2147483647}e.uinteger=c;function v(p){return r.call(p)==="[object Function]"}e.func=v;function d(p){return p!==null&&typeof p=="object"}e.objectLiteral=d;function k(p,N){return Array.isArray(p)&&p.every(N)}e.typedArray=k})(a||(a={}));var jt=class{constructor(e,r,i){this._languageId=e,this._worker=r,this._disposables=[],this._listener=Object.create(null);let n=o=>{let s=o.getLanguageId();if(s!==this._languageId)return;let u;this._listener[o.uri.toString()]=o.onDidChangeContent(()=>{window.clearTimeout(u),u=window.setTimeout(()=>this._doValidate(o.uri,s),500)}),this._doValidate(o.uri,s)},t=o=>{f.editor.setModelMarkers(o,this._languageId,[]);let s=o.uri.toString(),u=this._listener[s];u&&(u.dispose(),delete this._listener[s])};this._disposables.push(f.editor.onDidCreateModel(n)),this._disposables.push(f.editor.onWillDisposeModel(t)),this._disposables.push(f.editor.onDidChangeModelLanguage(o=>{t(o.model),n(o.model)})),this._disposables.push(i(o=>{f.editor.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(t(s),n(s))})})),this._disposables.push({dispose:()=>{f.editor.getModels().forEach(t);for(let o in this._listener)this._listener[o].dispose()}}),f.editor.getModels().forEach(n)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,r){this._worker(e).then(i=>i.doValidation(e.toString())).then(i=>{let n=i.map(o=>yt(e,o)),t=f.editor.getModel(e);t&&t.getLanguageId()===r&&f.editor.setModelMarkers(t,r,n)}).then(void 0,i=>{console.error(i)})}};function xt(e){switch(e){case F.Error:return f.MarkerSeverity.Error;case F.Warning:return f.MarkerSeverity.Warning;case F.Information:return f.MarkerSeverity.Info;case F.Hint:return f.MarkerSeverity.Hint;default:return f.MarkerSeverity.Info}}function yt(e,r){let i=typeof r.code=="number"?String(r.code):r.code;return{severity:xt(r.severity),startLineNumber:r.range.start.line+1,startColumn:r.range.start.character+1,endLineNumber:r.range.end.line+1,endColumn:r.range.end.character+1,message:r.message,code:i,source:r.source}}var Pt=class{constructor(e,r){this._worker=e,this._triggerCharacters=r}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.doComplete(t.toString(),R(r))).then(o=>{if(!o)return;let s=e.getWordUntilPosition(r),u=new f.Range(r.lineNumber,s.startColumn,r.lineNumber,s.endColumn),g=o.items.map(c=>{let v={label:c.label,insertText:c.insertText||c.label,sortText:c.sortText,filterText:c.filterText,documentation:c.documentation,detail:c.detail,command:Bt(c.command),range:u,kind:Vt(c.kind)};return c.textEdit&&(St(c.textEdit)?v.range={insert:w(c.textEdit.insert),replace:w(c.textEdit.replace)}:v.range=w(c.textEdit.range),v.insertText=c.textEdit.newText),c.additionalTextEdits&&(v.additionalTextEdits=c.additionalTextEdits.map(B)),c.insertTextFormat===oe.Snippet&&(v.insertTextRules=f.languages.CompletionItemInsertTextRule.InsertAsSnippet),v});return{isIncomplete:o.isIncomplete,suggestions:g}})}};function R(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function mt(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function w(e){if(e)return new f.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function St(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function Vt(e){let r=f.languages.CompletionItemKind;switch(e){case h.Text:return r.Text;case h.Method:return r.Method;case h.Function:return r.Function;case h.Constructor:return r.Constructor;case h.Field:return r.Field;case h.Variable:return r.Variable;case h.Class:return r.Class;case h.Interface:return r.Interface;case h.Module:return r.Module;case h.Property:return r.Property;case h.Unit:return r.Unit;case h.Value:return r.Value;case h.Enum:return r.Enum;case h.Keyword:return r.Keyword;case h.Snippet:return r.Snippet;case h.Color:return r.Color;case h.File:return r.File;case h.Reference:return r.Reference}return r.Property}function B(e){if(e)return{range:w(e.range),text:e.newText}}function Bt(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Wt=class{constructor(e){this._worker=e}provideHover(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.doHover(n.toString(),R(r))).then(t=>{if(t)return{range:w(t.range),contents:zt(t.contents)}})}};function Ht(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function at(e){return typeof e=="string"?{value:e}:Ht(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+`
7
7
  `+e.value+"\n```\n"}}function zt(e){if(e)return Array.isArray(e)?e.map(at):[at(e)]}var mn=class{constructor(e){this._worker=e}provideDocumentHighlights(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.findDocumentHighlights(n.toString(),R(r))).then(t=>{if(t)return t.map(o=>({range:w(o.range),kind:Xt(o.kind)}))})}};function Xt(e){switch(e){case S.Read:return f.languages.DocumentHighlightKind.Read;case S.Write:return f.languages.DocumentHighlightKind.Write;case S.Text:return f.languages.DocumentHighlightKind.Text}return f.languages.DocumentHighlightKind.Text}var hn=class{constructor(e){this._worker=e}provideDefinition(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.findDefinition(n.toString(),R(r))).then(t=>{if(t)return[ht(t)]})}};function ht(e){return{uri:f.Uri.parse(e.uri),range:w(e.range)}}var _n=class{constructor(e){this._worker=e}provideReferences(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.findReferences(t.toString(),R(r))).then(o=>{if(o)return o.map(ht)})}},kn=class{constructor(e){this._worker=e}provideRenameEdits(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.doRename(t.toString(),R(r),i)).then(o=>qt(o))}};function qt(e){if(!e||!e.changes)return;let r=[];for(let i in e.changes){let n=f.Uri.parse(i);for(let t of e.changes[i])r.push({resource:n,versionId:void 0,textEdit:{range:w(t.range),text:t.newText}})}return{edits:r}}var Jt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,r){let i=e.uri;return this._worker(i).then(n=>n.findDocumentSymbols(i.toString())).then(n=>{if(n)return n.map(t=>$t(t)?_t(t):{name:t.name,detail:"",containerName:t.containerName,kind:kt(t.kind),range:w(t.location.range),selectionRange:w(t.location.range),tags:[]})})}};function $t(e){return"children"in e}function _t(e){return{name:e.name,detail:e.detail??"",kind:kt(e.kind),range:w(e.range),selectionRange:w(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(r=>_t(r))}}function kt(e){let r=f.languages.SymbolKind;switch(e){case _.File:return r.File;case _.Module:return r.Module;case _.Namespace:return r.Namespace;case _.Package:return r.Package;case _.Class:return r.Class;case _.Method:return r.Method;case _.Property:return r.Property;case _.Field:return r.Field;case _.Constructor:return r.Constructor;case _.Enum:return r.Enum;case _.Interface:return r.Interface;case _.Function:return r.Function;case _.Variable:return r.Variable;case _.Constant:return r.Constant;case _.String:return r.String;case _.Number:return r.Number;case _.Boolean:return r.Boolean;case _.Array:return r.Array}return r.Function}var bn=class{constructor(e){this._worker=e}provideLinks(e,r){let i=e.uri;return this._worker(i).then(n=>n.findDocumentLinks(i.toString())).then(n=>{if(n)return{links:n.map(t=>({range:w(t.range),url:t.target}))}})}},Qt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.format(n.toString(),null,bt(r)).then(o=>{if(!(!o||o.length===0))return o.map(B)}))}},Yt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.format(t.toString(),mt(r),bt(i)).then(s=>{if(!(!s||s.length===0))return s.map(B)}))}};function bt(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var Gt=class{constructor(e){this._worker=e}provideDocumentColors(e,r){let i=e.uri;return this._worker(i).then(n=>n.findDocumentColors(i.toString())).then(n=>{if(n)return n.map(t=>({color:t.color,range:w(t.range)}))})}provideColorPresentations(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.getColorPresentations(n.toString(),r.color,mt(r.range))).then(t=>{if(t)return t.map(o=>{let s={label:o.label};return o.textEdit&&(s.textEdit=B(o.textEdit)),o.additionalTextEdits&&(s.additionalTextEdits=o.additionalTextEdits.map(B)),s})})}},Zt=class{constructor(e){this._worker=e}provideFoldingRanges(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.getFoldingRanges(n.toString(),r)).then(t=>{if(t)return t.map(o=>{let s={start:o.startLine+1,end:o.endLine+1};return typeof o.kind<"u"&&(s.kind=Kt(o.kind)),s})})}};function Kt(e){switch(e){case P.Comment:return f.languages.FoldingRangeKind.Comment;case P.Imports:return f.languages.FoldingRangeKind.Imports;case P.Region:return f.languages.FoldingRangeKind.Region}}var Ct=class{constructor(e){this._worker=e}provideSelectionRanges(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.getSelectionRanges(n.toString(),r.map(R))).then(t=>{if(t)return t.map(o=>{let s=[];for(;o;)s.push({range:w(o.range)}),o=o.parent;return s})})}};function en(e,r=!1){let i=e.length,n=0,t="",o=0,s=16,u=0,g=0,c=0,v=0,d=0;function k(l,A){let L=0,I=0;for(;L<l||!A;){let b=e.charCodeAt(n);if(b>=48&&b<=57)I=I*16+b-48;else if(b>=65&&b<=70)I=I*16+b-65+10;else if(b>=97&&b<=102)I=I*16+b-97+10;else break;n++,L++}return L<l&&(I=-1),I}function p(l){n=l,t="",o=0,s=16,d=0}function N(){let l=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&M(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&M(e.charCodeAt(n)))for(n++;n<e.length&&M(e.charCodeAt(n));)n++;else return d=3,e.substring(l,n);let A=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&M(e.charCodeAt(n))){for(n++;n<e.length&&M(e.charCodeAt(n));)n++;A=n}else d=3;return e.substring(l,A)}function J(){let l="",A=n;for(;;){if(n>=i){l+=e.substring(A,n),d=2;break}let L=e.charCodeAt(n);if(L===34){l+=e.substring(A,n),n++;break}if(L===92){if(l+=e.substring(A,n),n++,n>=i){d=2;break}switch(e.charCodeAt(n++)){case 34:l+='"';break;case 92:l+="\\";break;case 47:l+="/";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+=`
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.84 */
4
- import{a as n}from"./TJOEBZIJ.js";import{a as f}from"./6VMHDHOO.js";import"./LNCKWEAE.js";import{a as g}from"./U3UR7PMI.js";import"./KDSG4AQ2.js";import{d as p,e as u}from"./KJYFRF6Z.js";import{F as c,G as d,K as h,h as m,j as s,n as a,r as o}from"./YJM4YZTR.js";import"./FERNZR6V.js";import"./JOZPVCEH.js";var b=m`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,r=class extends d{constructor(){super(...arguments),this.messages=f(),this._unselectItem=async()=>{this._selectedApiItem=void 0},this._filterValue="",this.languageId="arcade",this.hideDocumentationActions=!1,this.loading=!1,this.closed=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_filterValue:16,_selectedApiItem:16,languageId:1,apiLibrary:0,hideDocumentationActions:5,loading:5,closed:5}}static{this.styles=b}willUpdate(e){if(e.has("apiLibrary")){if(!this._selectedApiItem)return;for(let i of this.apiLibrary??[])for(let t of i.items)if(t.name===this._selectedApiItem.name){this._selectedApiItem=t;return}this._selectedApiItem=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{u(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_emitItemSelected(e,i){if(!i)return;let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_emitClose(){this.arcgisClose.emit()}_emitItemSelectedAndClose(e,i){let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_selectItem(e,i){e.stopPropagation(),this._selectedApiItem=i}_updateFilterValue(e){this._filterValue=e.currentTarget.value??""}_elementToMarkdown(e){e!==void 0&&(e.innerHTML=n(this._selectedApiItem.examples))}renderApiCategory(e){let i=g(e.items,"name",this._filterValue);return i.length?s`<calcite-list-item-group .heading=${e.title}>${i.map(t=>s`<calcite-list-item .label=${o(t.completion.detail)} @calciteListItemSelect=${l=>this._emitItemSelected(l,t)} @keydown=${l=>this._emitItemSelected(l,t)}><calcite-action slot=actions-end .text=${this.messages.expand??""} icon=chevron-right icon-flip-rtl scale=s @click=${l=>this._selectItem(l,t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>`:null}renderApiItemFlowItem(){let e=this._selectedApiItem;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions?null:s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions?"full":"half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${i=>this._emitItemSelectedAndClose(i,e)} ${c(p)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${o(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation)??""}></div>${e.examples?s`<div ${c(this._elementToMarkdown)}></div>`:null}</calcite-block></calcite-flow-item>`:null}render(){if(this.closed)return null;let e=(this.apiLibrary??[]).map(t=>this.renderApiCategory(t)),i=e.every(t=>!t);return s`<calcite-flow ${c(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading?s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"}></calcite-loader>`:s`<calcite-list label="arcade api">${i?s`<div class="notice-container">${this.messages.noitems}</div>`:e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`}};h("arcgis-language-api-panel",r);export{r as ArcgisLanguageApiPanel};
3
+ v5.0.0-next.85 */
4
+ import{a as n}from"./YRBXVOZH.js";import{a as f}from"./SHTZ4O47.js";import"./IKTBURW4.js";import{a as g}from"./QHEHI5IV.js";import"./FVQB3CEW.js";import{d as p,e as u}from"./74T7ILOU.js";import{F as c,G as d,K as h,h as m,j as s,n as a,r as o}from"./IM4FYC35.js";import"./DE3RLYZ4.js";import"./PEEHLO66.js";var b=m`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,r=class extends d{constructor(){super(...arguments),this.messages=f(),this._unselectItem=async()=>{this._selectedApiItem=void 0},this._filterValue="",this.languageId="arcade",this.hideDocumentationActions=!1,this.loading=!1,this.closed=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_filterValue:16,_selectedApiItem:16,languageId:1,apiLibrary:0,hideDocumentationActions:5,loading:5,closed:5}}static{this.styles=b}willUpdate(e){if(e.has("apiLibrary")){if(!this._selectedApiItem)return;for(let i of this.apiLibrary??[])for(let t of i.items)if(t.name===this._selectedApiItem.name){this._selectedApiItem=t;return}this._selectedApiItem=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{u(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_emitItemSelected(e,i){if(!i)return;let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_emitClose(){this.arcgisClose.emit()}_emitItemSelectedAndClose(e,i){let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_selectItem(e,i){e.stopPropagation(),this._selectedApiItem=i}_updateFilterValue(e){this._filterValue=e.currentTarget.value??""}_elementToMarkdown(e){e!==void 0&&(e.innerHTML=n(this._selectedApiItem.examples))}renderApiCategory(e){let i=g(e.items,"name",this._filterValue);return i.length?s`<calcite-list-item-group .heading=${e.title}>${i.map(t=>s`<calcite-list-item .label=${o(t.completion.detail)} @calciteListItemSelect=${l=>this._emitItemSelected(l,t)} @keydown=${l=>this._emitItemSelected(l,t)}><calcite-action slot=actions-end .text=${this.messages.expand??""} icon=chevron-right icon-flip-rtl scale=s @click=${l=>this._selectItem(l,t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>`:null}renderApiItemFlowItem(){let e=this._selectedApiItem;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions?null:s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions?"full":"half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${i=>this._emitItemSelectedAndClose(i,e)} ${c(p)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${o(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation)??""}></div>${e.examples?s`<div ${c(this._elementToMarkdown)}></div>`:null}</calcite-block></calcite-flow-item>`:null}render(){if(this.closed)return null;let e=(this.apiLibrary??[]).map(t=>this.renderApiCategory(t)),i=e.every(t=>!t);return s`<calcite-flow ${c(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading?s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"}></calcite-loader>`:s`<calcite-list label="arcade api">${i?s`<div class="notice-container">${this.messages.noitems}</div>`:e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`}};h("arcgis-language-api-panel",r);export{r as ArcgisLanguageApiPanel};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.84 */
4
- import{a,b}from"./VI5BXG53.js";import"./3LJIRG7F.js";import"./JOZPVCEH.js";export{a as conf,b as language};
3
+ v5.0.0-next.85 */
4
+ import{a,b}from"./QZIF6LAS.js";import"./TLFOFTHI.js";import"./PEEHLO66.js";export{a as conf,b as language};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.84 */
4
- import{a as t}from"./OQUYSN7I.js";import{ck as r,jk as a,kk as m,pk as n}from"./3LJIRG7F.js";m();async function c(o,e){return await(await t()).colorize(o,e,{tabSize:2})}async function S(o,e,i){!o||o.tagName!=="CODE"||(o.innerHTML=await c(e??"",i))}function l(){let o=n.get(a).getColorTheme();return r(o.tokenTheme.getColorMap())}function p(o){return n.get(a).onDidColorThemeChange(()=>o())}export{c as a,S as b,l as c,p as d};
3
+ v5.0.0-next.85 */
4
+ import{a as t}from"./DYPHLMKE.js";import{ck as r,jk as a,kk as m,pk as n}from"./TLFOFTHI.js";m();async function c(o,e){return await(await t()).colorize(o,e,{tabSize:2})}async function S(o,e,i){!o||o.tagName!=="CODE"||(o.innerHTML=await c(e??"",i))}function l(){let o=n.get(a).getColorTheme();return r(o.tokenTheme.getColorMap())}function p(o){return n.get(a).onDidColorThemeChange(()=>o())}export{c as a,S as b,l as c,p as d};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.84 */
3
+ v5.0.0-next.85 */
4
4
  function x(t){return N(t)||v(t)}function E(t){return C(t).filter(e=>e.nodeType===Node.TEXT_NODE).map(e=>e.textContent).join("").trim()}function v(t){return E(t).length>0}function C(t){return t.currentTarget.assignedNodes({flatten:!0})}function N(t){return y(t).length>0}function y(t,e){return L(t.target,e)}function L(t,e){let n=t.assignedElements({flatten:!0});return e?n.filter(o=>o.matches(e)):n}var T=(t,e)=>{let n=t;for(;n;){if(n===e)return!0;if(!n.parentNode)return!1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode}return!1},f=(t,e,n)=>{let o=A(e).subscribe;return o(s=>{s.some(r=>T(t,r.target))&&n()})},u={},A=t=>{let e=t.join(","),n=u[e];if(n!==void 0)return n;let o=new Set,s=new MutationObserver(r=>o.forEach(l=>l(r)));globalThis.document&&s.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0});let c={subscribe:r=>(o.add(r),()=>{o.delete(r),o.size===0&&(s.disconnect(),u[e]=void 0)})};return u[e]=c,c},h=(t,e)=>{let n=t;for(;n;){let o=n.closest?.(e);if(o)return o;let s=n.getRootNode?.();if(s===globalThis.document)return;n=s.host}};function M(t){let e=h(t,".calcite-mode-dark, .calcite-mode-light, .calcite-mode-auto");return e?.classList.contains("calcite-mode-dark")||e?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var g=(t,e,n)=>h(t,`[${e}]`)?.getAttribute(e)??n,P=async t=>{t!=null&&(m(t)?await t.setFocus():t.focus())},m=t=>typeof t.setFocus=="function",F=(t,e)=>{if(t?.shadowRoot){if(t.hasAttribute("hydrated")||t.hasAttribute("calcite-hydrated")){i(t,e);return}Promise.resolve(t.componentOnReady?.()).then(()=>i(t,e))}},w=t=>t.nodeType===Node.ELEMENT_NODE,i=(t,e="")=>{if(!w(t))return!1;if(t.matches(e))return m(t)&&setTimeout(()=>void t.setFocus(),0),!0;for(let o of t.children)if(i(o,e))return!0;let n=t.shadowRoot;if(n){for(let o of n.children)if(i(o,e))return!0}return!1};var S="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),$=new Set(S),a="en",k={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},z=async(t,e,n="")=>{let o=`${e}/${n}`,s=`${o}${t}.json`;return d[s]??(d[s]=p(t,o)),await d[s]},d={},p=async(t,e)=>{let n=`${e}${t}.json`;try{let o=await fetch(n);if(o.ok)return await o.json()}catch(o){return console.error(o),{}}return t===a?{}:await p(a,e)},O=t=>{let e=g(t,"lang",globalThis.navigator?.language||a);return{lang:e,t9nLocale:b(e)}},b=t=>{let[e,n]=t.split("-"),o=e.toLowerCase(),s=o;return n&&(s=`${o}-${n.toUpperCase()}`),s=k[s]??s,$.has(s)?s:n?b(o):a},D=(t,e,n,o)=>{let s,c=()=>j(t,e(),o).then(r=>{(s?.lang!==r.lang||s.t9nLocale!==r.t9nLocale||s.t9nStrings!==r.t9nStrings)&&n(r),s=r}).catch(console.error);return queueMicrotask(c),f(t,["lang"],c)},j=async(t,e,n=t.localName.split("-").slice(1).join("-"))=>{let{lang:o,t9nLocale:s}=O(t),c=`${e}/${n}/t9n`,l=n===null?{}:await z(s,c,"messages.");return{lang:o,t9nLocale:s,t9nStrings:l}};export{x as a,f as b,M as c,P as d,F as e,$ as f,z as g,O as h,b as i,D as j};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.84 */
4
- async function t(){return await import("./ZNJU2F6X.js").then(m=>m.default)}export{t as a};
3
+ v5.0.0-next.85 */
4
+ async function t(){return await import("./B5YE5PVQ.js").then(m=>m.default)}export{t as a};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.85 */
4
+ import c from"./IGOB76XZ.js";import"./7M55S6BG.js";import b from"./SLHSPJOX.js";import a from"./MI66XE4U.js";import"./GRS6C55W.js";import"./ODR3ZR5F.js";import"./QHEHI5IV.js";import"./DYPHLMKE.js";import"./FVQB3CEW.js";import"./HLIW7CDL.js";import"./74T7ILOU.js";import"./IM4FYC35.js";import"./DE3RLYZ4.js";import"./TLFOFTHI.js";import"./PEEHLO66.js";export default $arcgis.t(([,,{a:a,b:b,c:c}])=>{return{getSqlExprDiagnosticService:b,getSqlExprWorker:a,setupMode:c}},a,b,c)