@arcgis/coding-components 4.34.0-next.28 → 4.34.0-next.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addons/arcade-coding-assistant/temporary-strings.d.ts +7 -0
- package/dist/addons/arcade-coding-assistant/useArcadeAssistant.d.ts +7 -7
- package/dist/addons.js +6 -6
- package/dist/cdn/{475IPMML.js → 27GAK4UA.js} +2 -2
- package/dist/cdn/{BEGL3FU7.js → 32K7GHV2.js} +2 -2
- package/dist/cdn/{2XDZB5UQ.js → 3AJQCXP5.js} +2 -2
- package/dist/cdn/{S3MY5WE5.js → 3TTOOYTP.js} +2 -2
- package/dist/cdn/{BESGGIO2.js → 4L2UN6XN.js} +2 -2
- package/dist/cdn/4WAWANVL.js +4 -0
- package/dist/cdn/{G73IWMPI.js → 4ZYQLPBS.js} +2 -2
- package/dist/cdn/{2RPPBG3Z.js → 5WJIHGZ5.js} +2 -2
- package/dist/cdn/{YGJF52HO.js → 7MFY7SVP.js} +1 -1
- package/dist/cdn/AGG36YCW.js +6 -0
- package/dist/cdn/{2MRF3P66.js → C7VT5PS7.js} +2 -2
- package/dist/cdn/{IWQ72COU.js → CKIDAKUH.js} +2 -2
- package/dist/cdn/{OID2MENS.js → D73FQPYU.js} +2 -2
- package/dist/cdn/{7OYCH4TQ.js → EOGVGYOI.js} +2 -2
- package/dist/cdn/{DVW2PHRK.js → FGGZ6ITK.js} +2 -2
- package/dist/cdn/{U67EU75G.js → FWPZ2HNP.js} +4 -4
- package/dist/cdn/{M5Z3T5DX.js → GEIN3UXC.js} +2 -2
- package/dist/cdn/{LCPAYQJH.js → GRHTPUFF.js} +2 -2
- package/dist/cdn/{NE5OHGXE.js → HE7YSJQA.js} +1 -1
- package/dist/cdn/{QZPLC65Q.js → HRCFDZ46.js} +2 -2
- package/dist/cdn/{2UGQ3C7G.js → I6DHVCQY.js} +2 -2
- package/dist/cdn/{JO42YVEQ.js → I6FI33WX.js} +2 -2
- package/dist/cdn/{P5LZEBRO.js → IFLZLMBW.js} +2 -2
- package/dist/cdn/{JMJU7ABX.js → IO3D7ZCK.js} +2 -2
- package/dist/cdn/{KEOVPOJO.js → LFCFEBJK.js} +2 -2
- package/dist/cdn/{6C7FMEHE.js → LMWKAIC2.js} +2 -2
- package/dist/cdn/{63N6PP7R.js → MYYKZ75Z.js} +2 -2
- package/dist/cdn/{YHB3E7ZD.js → MZOXERQS.js} +2 -2
- package/dist/cdn/{X7Y3VVYJ.js → PHDE4DM7.js} +1 -1
- package/dist/cdn/{RRH2REKM.js → RKKERKA3.js} +2 -2
- package/dist/cdn/{WOUFKDRM.js → RQVDIT3M.js} +2 -2
- package/dist/cdn/{R6Q7EZ6N.js → TI34SVE6.js} +2 -2
- package/dist/cdn/{F4MFO2LZ.js → TJMELLUB.js} +1 -1
- package/dist/cdn/{DRMPQJGQ.js → TM64TRP3.js} +2 -2
- package/dist/cdn/{QPJMKT5M.js → UGTGDJNO.js} +2 -2
- package/dist/cdn/{AN2QOF3Y.js → VCTTJHKC.js} +2 -2
- package/dist/cdn/{LUFE3TRU.js → W2ED67UR.js} +2 -2
- package/dist/cdn/{GDS7XWPX.js → W2HPJPLQ.js} +2 -2
- package/dist/cdn/{GYFWXEV4.js → XJYQ6UUX.js} +2 -2
- package/dist/cdn/{X5DEZZPE.js → Y4QDA25T.js} +3 -3
- package/dist/cdn/{IDMILG4V.js → Z7QKSUKG.js} +2 -2
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +29320 -29298
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/editor.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/setup-monaco.js +1 -1
- package/dist/chunks/sql-expr-contribution.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.d.ts +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +198 -168
- package/dist/components/arcgis-arcade-coding-assistant/functional.d.ts +4 -4
- package/dist/components/arcgis-arcade-coding-assistant/index.d.ts +0 -2
- package/dist/components/arcgis-arcade-coding-assistant/index.js +0 -2
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +2 -2
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +4 -4
- package/package.json +5 -5
- package/dist/cdn/UAAKRZ52.js +0 -6
- package/dist/cdn/WTROCBGZ.js +0 -4
|
@@ -7,7 +7,7 @@ import { u as f } from "../../chunks/useT9n.js";
|
|
|
7
7
|
import { css as u } from "@lit/reactive-element/css-tag.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
10
|
-
v4.34.0-next.
|
|
10
|
+
v4.34.0-next.29 */
|
|
11
11
|
const m = u`: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-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;
|
|
12
12
|
function g(l) {
|
|
13
13
|
l.key === "Enter" && l.stopPropagation();
|
|
@@ -10,7 +10,7 @@ import { css as v } from "@lit/reactive-element/css-tag.js";
|
|
|
10
10
|
import { s as d } from "../../chunks/sql-expr-contribution.js";
|
|
11
11
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
12
12
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
13
|
-
v4.34.0-next.
|
|
13
|
+
v4.34.0-next.29 */
|
|
14
14
|
const y = v`: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}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
15
15
|
class I extends f {
|
|
16
16
|
constructor() {
|
|
@@ -9,7 +9,7 @@ import { css as g } from "@lit/reactive-element/css-tag.js";
|
|
|
9
9
|
import { s as f } from "../../chunks/editor.js";
|
|
10
10
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
11
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
12
|
-
v4.34.0-next.
|
|
12
|
+
v4.34.0-next.29 */
|
|
13
13
|
const _ = g`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}}`;
|
|
14
14
|
class m extends r {
|
|
15
15
|
constructor() {
|
|
@@ -7,7 +7,7 @@ import { u as m } from "../../chunks/useT9n.js";
|
|
|
7
7
|
import { css as d } from "@lit/reactive-element/css-tag.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
10
|
-
v4.34.0-next.
|
|
10
|
+
v4.34.0-next.29 */
|
|
11
11
|
const h = d`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
12
12
|
class f extends r {
|
|
13
13
|
constructor() {
|
package/dist/docs/api.json
CHANGED
package/dist/docs/docs.json
CHANGED
package/dist/docs/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@arcgis/coding-components",
|
|
4
|
-
"version": "4.34.0-next.
|
|
4
|
+
"version": "4.34.0-next.29",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
|
|
|
3
3
|
import { s as p } from "./chunks/sql-expr-defaults.js";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
6
|
-
v4.34.0-next.
|
|
6
|
+
v4.34.0-next.29 */
|
|
7
7
|
const a = s, r = t;
|
|
8
8
|
export {
|
|
9
9
|
c as arcade,
|
package/dist/loader.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as e } from "./chunks/runtime.js";
|
|
2
|
-
import { makeDefineCustomElements as
|
|
2
|
+
import { makeDefineCustomElements as i } from "@arcgis/lumina";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
5
|
-
v4.34.0-next.
|
|
6
|
-
const o =
|
|
7
|
-
"arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,layer,
|
|
5
|
+
v4.34.0-next.29 */
|
|
6
|
+
const o = i(e, {
|
|
7
|
+
"arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js"), "appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,layer,portalUrl,serviceUrl;destroy"],
|
|
8
8
|
"arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
|
|
9
9
|
"arcgis-arcade-results": [() => import("./components/arcgis-arcade-results/customElement.js"), "consoleLogs:,loading,openedResultPanel,result:"],
|
|
10
10
|
"arcgis-arcade-suggestions": [() => import("./components/arcgis-arcade-suggestions/customElement.js"), "closed,suggestions:"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "4.34.0-next.
|
|
3
|
+
"version": "4.34.0-next.29",
|
|
4
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
],
|
|
40
40
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@arcgis/arcade-languageservice": "4.34.0-next.
|
|
43
|
-
"@arcgis/components-utils": "4.34.0-next.
|
|
44
|
-
"@arcgis/languages-api-utils": "4.34.0-next.
|
|
45
|
-
"@arcgis/lumina": "4.34.0-next.
|
|
42
|
+
"@arcgis/arcade-languageservice": "4.34.0-next.29",
|
|
43
|
+
"@arcgis/components-utils": "4.34.0-next.29",
|
|
44
|
+
"@arcgis/languages-api-utils": "4.34.0-next.29",
|
|
45
|
+
"@arcgis/lumina": "4.34.0-next.29",
|
|
46
46
|
"monaco-editor": "^0.52.0",
|
|
47
47
|
"tslib": "^2.8.1",
|
|
48
48
|
"vscode-languageserver-types": "^3.17.5"
|
package/dist/cdn/UAAKRZ52.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.28 */
|
|
4
|
-
import{a as R}from"./BESGGIO2.js";import b from"./JO42YVEQ.js";import{a as H,b as L}from"./IDMILG4V.js";import{a as D}from"./BEGL3FU7.js";import"./RRH2REKM.js";import a from"./KEOVPOJO.js";import"./X7Y3VVYJ.js";import{i as j,j as Q}from"./U67EU75G.js";import"./2XDZB5UQ.js";import{A as C,C as B,a as q,b as o,c as _,d as T,p as F,q as O,r as z,y as V}from"./LUFE3TRU.js";import"./WTROCBGZ.js";import"./OID2MENS.js";import"./YGJF52HO.js";export default $arcgis.t(([se,Y,ae,oe,{a:J},M])=>{var w=class extends z{constructor(e){if(super(e),this.it=T,e.type!==F.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===T||e==null)return this._t=void 0,this.it=e;if(e===_)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:[]}}};w.directiveName="unsafeHTML",w.resultType=1;var S=O(w);var re=q`:host(:not([closed])){--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-side-panel-max-w);width:var(--arcgis-coding-components-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}.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)}.prompt-list calcite-list-item{margin-block-end:.5rem;border-radius:var(--calcite-corner-radius-round);--calcite-color-border-3: transparent;overflow:hidden}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: auto;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-list-item:focus calcite-button{position:relative;top:-2px}.prompt-list calcite-list-item:last-of-type{margin-block-end:0}calcite-list{--calcite-color-foreground-1: transparent;background-color:transparent}calcite-list-item{--calcite-color-foreground-1: white}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}.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-chips{--calcite-chip-background-color: var(--calcite-color-foreground-current);--calcite-chip-text-color: var(--calcite-color-brand);calcite-chip{cursor:pointer}}.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-background-color: white;--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{margin:.25rem 0 .75rem;max-width:90%;overflow-y:hidden;overflow-x:auto;padding:0}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}.copy-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-danger) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);border:var(--calcite-color-status-danger) solid 1px}.response-error-container p{margin:0 0 0 1em}}:host([closed]){display:none}`,y=class extends Error{constructor({message:e,code:t,subCode:s,details:a,source:r}){super(e),this.name="ArcadeAssistantError",this.code=t,this.subCode=s,this.details=a,this.source=r}};function G(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 ce(i){let{baseUrl:e,skillId:t,message:s,authToken:a,previousConversationId:r,context:c}=i,l=t?`${e}/skills/${t}/chat`:`${e}/chat`,d=[],m={message:s,context:c};r&&(m.conversation_id=r);let g;try{g=await Y(l,{method:"post",headers:{"Content-Type":"application/json",token:a},body:JSON.stringify(m),responseType:"json"})}catch(f){let v=f,I=v.details?.rawResponse||v.message||String(f),x=G(I);throw x?new y(x):f}let b=g.data;d.push(b);let k=b.conversationId,n=b.inquiryId,u=b.sequenceNumber;async function A(){let f=0,v=25;for(;f<v;){await new Promise($=>setTimeout($,1e3));let I=ne(k,u,n),x;try{x=await Y(l,{method:"post",headers:{"Content-Type":"application/json",token:a},body:JSON.stringify(I),responseType:"json"})}catch($){let U=$,ie=U.details?.rawResponse||U.message||String($),P=G(ie);throw P?new y(P):$}let h=x.data;if(h.context&&h.context.kind==="ArcgisErrorAsContext"&&h.context.error)throw new y({message:h.context.error.message||"ArcGIS Assistant error",code:h.context.error.code,subCode:h.context.error.subCode,details:h.context.error.details,source:"polling-response"});if(d.push(h),u=h.sequenceNumber,f++,!h.hasMore)break}if(f===v)throw new y({message:"Request timed out",code:"TIMEOUT",source:"polling"})}let te=2*60*1e3;return await Promise.race([A(),new Promise((f,v)=>setTimeout(()=>v(new y({message:"Request timed out",code:"TIMEOUT",source:"hard-timeout"})),te))]),d}function ne(i,e,t){return{conversationId:i,inquiryId:t,ackSequenceNumber:e}}function le(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 de=i=>{let e=i.value.length,t=72,s=180,a=i.offsetWidth,r=Math.max(1,Math.floor(a/8)),c=Math.ceil(e/r),l=t+(c-2)*24;i.style.setProperty("--calcite-text-area-min-height",`${Math.min(l,s)}px`)};function pe({messages:i}){return o`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta??"Beta"}>${i.beta??"Beta"}</calcite-chip>`}function ue({popoverContent:i}){return o`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-popover reference-element=legal-disclaimer overlay-positioning=fixed label=legal-disclaimer placement=bottom auto-close>${i}</calcite-popover>`}function ee({errorMessage:i,slot:e}){return o`<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 me({active:i,setActive:e,messages:t}){return o`<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 he({context:i,messages:e}){return i?o`<div class="gaps">${i.profileName&&o`<calcite-popover auto-close placement=top .label=${e.profilecontextlabel.replace("{profileName}",i.profileName)} reference-element=profile-context-button class="context-popover"><p>${e.profilecontextlabel.replace("{profileName}",i.profileName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=map-information id=profile-context-button></calcite-button>`||""}${i.layerName&&o`<calcite-popover auto-close placement=top .label=${e.layercontextlabel.replace("{layerName}",i.layerName)} reference-element=layer-context-button class="context-popover"><p>${e.layercontextlabel.replace("{layerName}",i.layerName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=layers id=layer-context-button></calcite-button>`||""}</div>`:null}function ge({isDisabled:i,isReadOnly:e,setQuestion:t,setIsViewingResult:s,textAreaRef:a,question:r,errorMessage:c,setErrorMessage:l,submitQuestion:d,messages:m,mode:g,context:b}){return o`<div class="text-area-wrapper"><calcite-text-area resize=vertical .readOnly=${i||e} class="styled-text-area" .placeholder=${m.askaquestion??`Specify the calculation or logic you need in an Arcade expression. (e.g., 'Return "Yes" if value > 10')`} .value=${r} @calciteTextAreaInput=${k=>{de(k.target),t(k.target.value)}} ${L(a)}><div class="submission-actions-wrapper" slot=footer-start>${c&&ee({errorMessage:c,slot:"footer-start"})||""}<div class="submission-actions">${he({context:b,messages:m})}<div class="align-inline-end gaps"><calcite-button round kind=neutral .hidden=${g!=="refine"} icon-start=arrow-left appearance=solid .disabled=${i} @click=${async()=>{s(!1),t("")}}>${m.startover??"Start Over"}</calcite-button><calcite-button round icon-end=effects appearance=solid .loading=${i} .disabled=${i} @click=${async()=>{l(r?"":m.enteraprompt??"Please enter a prompt"),await d()}}>${g==="prompt"?m.ask??"Generate":m.refine??"Refine"}</calcite-button></div></div></div></calcite-text-area></div>`}var be="https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement",fe="https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";function ve({setOpen:i,messages:e,feedback:t,setFeedback:s,onSubmit:a}){return o`<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><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=${r=>s({...t,text:r.target.value})}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${r=>{s({...t,termsAccepted:r.target.checked})}}></calcite-checkbox><span>${S(e.agreement?.replace("{EsriPrivacyStatement}",`<calcite-link href=${be} target="_blank">${e.esriprivacystatement??"Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}",`<calcite-link href=${fe} target="_blank">${e.supplement??"Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${a} .disabled=${!t.termsAccepted||t.submitting} .loading=${t.submitting}>${e.submitfeedback??"Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>`}function W({assistantsEnabled:i,messages:e,slot:t,assistantHelpUrl:s,helpTopicUrl:a}){return o`<calcite-block .label=${e.assistantinformation??"Assistant information"} slot=${t??C} expanded class="info-block"><calcite-chip .label=${e.new??"new"} kind=brand>${e.new}</calcite-chip><h1 class="info-heading">${e.introducing}</h1><p>${e.capabilities}</p>${i?o`<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>${S((e.seedocumentation??"Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}",`<calcite-link href=${a} target="_blank">${e.documentation??"documentation"}</calcite-link>`))}</p>`:o`<p>${S(e.useofassistant?.replace("{aiassistants}",`<strong>${e.aiassistants??"Ai Assistants"}</strong>`))}<calcite-link .href=${s} target=_blank icon-end=launch-2>${e.opensettings??"Open Settings"}</calcite-link></p>`}</calcite-block>`}function ye({messages:i,onProceed:e,onExit:t,helpTopicUrl:s}){return o`<calcite-dialog close-disabled placement=top .heading=${i.welcome} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${i.beforeyougetstarted}</h3><ul><li>${i.maybeincorrect}</li><li>${S(i.pleasereadhelp.replace("{helpTopic}",`<calcite-link href=${s} target="_blank">${i.helptopic}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${i.proceed}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${t} kind=neutral>${i.exit}</calcite-button></calcite-dialog>`}function ke({messages:i,suggestions:e,onSuggestionClick:t}){return o`<calcite-block .heading=${i.promptsuggestions} expanded collapsible id=suggestion-block><calcite-chip-group .label=${i.promptsuggestions} class="suggestion-chips">${R(e,s=>s,s=>o`<calcite-chip .label=${i.promptsuggestion} .value=${s} icon=effects @click=${()=>t?.(s)}>${s}</calcite-chip>`)}</calcite-chip-group></calcite-block>`}function K({hidden:i=!1,expanded:e=!1,messages:t,cards:s,heading:a,collapsible:r=!1,showEffectsIcon:c=!1,editorInsertMode:l="add",setEditorInsertMode:d,copySuccessConversationId:m}){let g=l==="replace",b=g?t.replaceineditor??"Replace in editor":t.addtoeditor??"Add to editor",k=g?t.addtoeditor??"Add to editor":t.replaceineditor??"Replace in editor";return o`<calcite-block .hidden=${i} id=result-block .heading=${a??t.besteffort??"Here is the assistant's best effort"} .expanded=${e} .collapsible=${r}>${c&&o`<calcite-chip .label=${t.assistantresponses} slot=content-start icon=effects scale=m class="suggestion-chips"></calcite-chip>`||""}<calcite-card-group .label=${t.assistantresponses}>${R(s,n=>n.conversationId,n=>o`<calcite-card><div slot=heading><div class="prior-prompt">${n.priorPrompt}</div>${n.message&&o`<div class="collapsible-error response-error-container"><div class="error-display">${ee({errorMessage:o`<details open><summary>Error</summary><p>${n.message}</p></details>`})}</div></div>`||""}</div><div><div class="code-response-wrapper"><div class="positioned-code-content">${n.chips?.map((u,A)=>o`${u.tooltip&&o`<calcite-tooltip .referenceElement=${`response-chip-${u.conversationId}-${A}`} placement=top-start>${u.tooltip}</calcite-tooltip>`||""}<calcite-chip .label=${u.label} .scale=${u.scale??"s"} .appearance=${u.appearance??"outline"} .icon=${u.icon} .id=${`response-chip-${u.conversationId}-${A}`}>${u.label}</calcite-chip>`)}</div><details class="collapsible-code" open><summary>Code response</summary><code>${n.code}</code></details></div></div><div slot=footer-start><calcite-split-button primary-text=${b??C} appearance=outline-fill class="add-to-editor-button" @calciteSplitButtonPrimaryClick=${()=>n.onAddToEditor()} overlay-positioning=fixed><calcite-dropdown-item @calciteDropdownItemSelect=${()=>{d?.(g?"add":"replace")}}>${k}</calcite-dropdown-item></calcite-split-button><calcite-button round icon-start=copy-to-clipboard kind=neutral @click=${()=>n.onCopy(n.conversationId)} class="copy-button">${n.conversationId===m?t.copied??"copied":""}</calcite-button></div><div slot=footer-end class="feedback-actions"><calcite-action .text=${t.thumbsup} scale=s icon=thumbs-up @click=${n.onThumbsUp}></calcite-action><calcite-action .text=${t.thumbsdown} scale=s icon=thumbs-down @click=${n.onThumbsDown}></calcite-action></div></calcite-card>`)}</calcite-card-group></calcite-block>`}var p={welcome:"Welcome to the new assistant experience",beforeyougetstarted:"Before you get started be aware:",maybeincorrect:"AI generated code may occasionally be incorrect or biased. Review carefully.",pleasereadhelp:"Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.",proceed:"Proceed",exit:"Exit",promptsuggestions:"Prompt suggestions",promptsuggestion:"Prompt suggestion",assistantresponses:"Assistant responses",collapse:"Collapse",thumbsup:"Thumbs up",thumbsdown:"Thumbs down",refine:"Refine",startover:"Start over",helptopic:"help topic",agreement:"I agree to the {EsriPrivacyStatement} (and {Supplement}).",esriprivacystatement:"Esri Privacy Statement",supplement:"Supplement",disclaimerpt2:"AI-generated content may be inaccurate. Review before using.",replaceineditor:"Replace in editor",keepinmind:"Keep in mind the following:",beconsise:"Be concise, but also clear in your request",avoidambiguity:"Avoid ambiguity and vagueness",documentation:"documentation",useexamples:"Use examples to clarify your request",moredetails:"You do not need to use exact field names in your instructions, but more detail is generally better",seedocumentation:"Please see the {documentation} for more information, including limitations and additional resources.",assistantinformation:"Assistant information",profilecontextlabel:"Profile context: {profileName}",layercontextlabel:"Layer context: {layerName}",numlayers:"{numLayers} {layerOrLayers}",numlayersplural:"layers",numlayerssingular:"layer"},xe="arcade_generation",$e="ArcadeCodeRequest",E="visualization",we="ArcadeAssistant",Se=["your_comments","user_evaluation","question","answer","useragent","_source","version","context","extras"],X=[],Z=!0,N=class extends V{constructor(){super(...arguments),this.textAreaRef=H(),this.messages=D(),this._feedbackService=void 0,this.handleFeedbackButton=(e,t)=>{this.feedback={...this.feedback,active:!0,value:e,item:t}},this.handleFeedbackSheetClose=()=>{this.feedback={active:!1,value:void 0,text:"",item:void 0,submitting:!1,termsAccepted:!1}},this.handleFeedbackSubmit=async()=>{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,a={user_evaluation:this.feedback.value,your_comments:this.feedback.text||void 0,question:this.question,answer:this.feedback.item?.script??"",useragent:navigator.userAgent,_source:we,version:this.appVersion??"",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 oe({attributes:a})]})}catch(r){console.error("Error submitting feedback:",r)}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,value:void 0,text:"",item:void 0,termsAccepted:!1,submitting:!1},this.copySuccessConversationId=void 0,this.splashActive=!0,this.editorInsertMode="add",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,copySuccessConversationId:16,splashActive:16,editorInsertMode:16,context:16,historyCards:16,closePanel:0,insertText:0,helpBase:1,assistantsEnabled:5,layer:[1,{type:Object}],orgBaseUrl:1,serviceUrl:1,closed:7,editorRef:0,feedbackServiceUrl:1,appVersion:1}}static{this.styles=re}get disclaimerComment(){return`// ${this.messages.disclaimercomment}
|
|
5
|
-
// ${p.disclaimerpt2}`}get assistantHelpUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}administer/configure-assistants.htm`}get helpTopicUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/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=>{console.error("Error setting initial context in Arcade Assistant:",t)}),this.manager.onLifecycle(()=>({remove:M.onModelContextDidChange(async()=>{e().catch(t=>{console.error("Error setting context in Arcade Assistant:",t)})}).dispose}))}willUpdate(e){e.has("history")&&(this.historyCards=this.getHistoryCards())}connectedCallback(){super.connectedCallback(),this.history=X,this.splashActive=Z}disconnectedCallback(){super.disconnectedCallback(),X=this.history,Z=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??E,icon:"map-information",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:p.profilecontextlabel.replace("{profileName}",t.profile??E)},...t.layerName?[{label:p.numlayers.replace("{numLayers}","1").replace("{layerOrLayers}",p.numlayerssingular),icon:"layer",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:p.layercontextlabel.replace("{layerName}",t.layerName??"No layer")}]:[]],onAddToEditor:()=>{j(this.editorRef.editorInstance,t.formattedScript??"",this.editorInsertMode,this.disclaimerComment)},onCopy:s=>{let a=t.formattedScript?`${this.disclaimerComment}
|
|
6
|
-
${t.formattedScript}`:"";a&&navigator.clipboard.writeText(a).then(()=>{this.copySuccessConversationId=s,this.copySuccessTimer&&clearTimeout(this.copySuccessTimer),this.copySuccessTimer=window.setTimeout(()=>{this.copySuccessConversationId=void 0,this.copySuccessTimer=void 0},1500)})},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 ae({url:this.feedbackServiceUrl});await e.load();let t=Se.filter(s=>!e.fields.some(a=>a.name===s));if(t.length>0){console.error(`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:a,layerName:r}=await this.getProfileAndMetadata(t.uri),c=(await ce({baseUrl:this.serviceUrl,skillId:xe,message:this.question,authToken:e,context:{kind:$e,context:{profile_name:s,metadata:a}}})).find(l=>l.context?.kind==="ArcadeCodeResponse");if(!c)return;c.context?.kind==="ArcadeCodeResponse"&&(this.history=[{script:c?.context?.arcadeCode?.code,formattedScript:Q(c?.context?.arcadeCode?.code??""),error:void 0,question:this.question,profile:s,conversationId:c.conversationId,layerName:r??void 0,...c.message?{message:c.message}:{}},...this.history],this.isViewingResult=!0,this.errorMessage=void 0)}catch(e){e instanceof Error&&e.name==="ArcadeAssistantError"?this.errorMessage=le(e)||this.messages.erroroccurred||"An error occurred.":this.errorMessage=this.messages.erroroccurred||"An error occurred.",console.error("Error in Arcade Assistant:",e)}finally{this.isSubmitting=!1}}}async getToken(){let{token:e}=await se.getCredential(this.orgBaseUrl);return e}async getProfileAndMetadata(e){let t=E,s=M.getEditorProfileForModel(e);s?.loaded||await s?.loadSource();let a=this.editorRef.profile;a&&"id"in a&&(t=a.id);let r=s?.definition?.variables?.find(d=>d.type==="feature"),c=[],l;return r?.definition&&"fields"in r.definition&&(c=r.definition.fields.map(d=>({name:d.name,type:d.type,alias:d.alias})),J(r?.definition)&&(l=r.definition.title)),{profileName:t,metadata:c,layerName:l}}render(){return this.closed?null:this.assistantsEnabled?o`<calcite-flow><calcite-flow-item closable .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.splashActive&&o`<calcite-scrim></calcite-scrim>`||""}${pe({messages:this.messages})}${ue({popoverContent:W({assistantsEnabled:this.assistantsEnabled,messages:{...this.messages,...p},assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.helpTopicUrl})})}<calcite-shell class="unstyled-shell">${this.splashActive&&ye({messages:{...p,...this.messages},onProceed:()=>{this.splashActive=!1},helpTopicUrl:this.helpTopicUrl,onExit:e=>this.closePanel&&this.closePanel(e)})||""}${me({active:this.confirmationActive,setActive:e=>this.confirmationActive=e,messages:this.messages})}${ge({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:{...p,...this.messages},context:this.context})}<calcite-block-group label="interactive blocks">${!this.isViewingResult&&!this.isSubmitting&&ke({messages:{...this.messages,...p},suggestions:["Round value to one decimal place",'Return "Yes" if value > 10'],onSuggestionClick:this.onSuggestionClick})||""}<calcite-block .hidden=${!this.isSubmitting} .heading=${this.messages.generatingresponse??"Generating response..."}></calcite-block>${K({expanded:this.isViewingResult,messages:{...this.messages,...p},collapsible:!0,showEffectsIcon:!0,editorInsertMode:this.editorInsertMode,setEditorInsertMode:e=>this.editorInsertMode=e,cards:this.historyCards.length?[this.historyCards[0]]:[],heading:this.messages.besteffort??"Here's the assistant's best effort",hidden:this.isSubmitting||!this.isViewingResult,copySuccessConversationId:this.copySuccessConversationId})}${K({expanded:!this.isViewingResult,messages:{...this.messages,...p},collapsible:!0,editorInsertMode:this.editorInsertMode,setEditorInsertMode:e=>this.editorInsertMode=e,cards:this.isViewingResult?this.historyCards.slice(1):this.historyCards,heading:this.messages.recentprompts??"Recent prompts",hidden:this.isSubmitting||this.history.length===0,copySuccessConversationId:this.copySuccessConversationId})}</calcite-block-group>${this.feedback.active?ve({setOpen:this.handleFeedbackSheetClose,messages:{...this.messages,...p},onSubmit:this.handleFeedbackSubmit,feedback:this.feedback,setFeedback:this.setFeedbackState.bind(this)}):null}</calcite-shell></calcite-flow-item></calcite-flow>`:o`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${W({slot:"content-top",messages:{...this.messages,...p},assistantsEnabled:this.assistantsEnabled,assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.helpTopicUrl})}</calcite-flow-item></calcite-flow>`}};B("arcgis-arcade-coding-assistant",N);return N},"identity/IdentityManager","request","layers/FeatureLayer","Graphic",a,b)
|
package/dist/cdn/WTROCBGZ.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
3
|
-
v4.34.0-next.28 */
|
|
4
|
-
var g=class{constructor(){this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}},y=(e,t)=>{let n=e;for(;n;){if(n===t)return!0;if(!n.parentNode)return!1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode}return!1},$=(e,t,n)=>{let o=A(t).subscribe;return o(s=>{s.some(r=>y(e,r.target))&&n()})},p={},A=e=>{let t=e.join(","),n=p[t];if(n!==void 0)return n;let o=new Set,s=new MutationObserver(r=>o.forEach(i=>i(r)));globalThis.document&&s.observe(document.documentElement,{attributes:!0,attributeFilter:e,subtree:!0});let c={subscribe:r=>(o.add(r),()=>{o.delete(r),o.size===0&&(s.disconnect(),p[t]=void 0)})};return p[t]=c,c},E=(e,t)=>{let n=e;for(;n;){let o=n.closest?.(t);if(o)return o;let s=n.getRootNode?.();if(s===globalThis.document)return null;n=s.host}return null},U=e=>E(e,":is(.calcite-mode-light, .calcite-mode-dark)")?.classList.contains("calcite-mode-dark")?"dark":"light";var N=(e,t,n)=>E(e,`[${t}]`)?.getAttribute(t)??n,S=e=>e.nodeType===Node.ELEMENT_NODE,w=e=>typeof e.setFocus=="function",l=(e,t="")=>{if(!S(e))return!1;if(e.matches(t))return w(e)&&setTimeout(()=>void e.setFocus(),0),!0;for(let o of e.children)if(l(o,t))return!0;let n=e.shadowRoot;if(n){for(let o of n.children)if(l(o,t))return!0}return!1},M=async e=>{e!=null&&(w(e)?await e.setFocus():e.focus())},V=(e,t)=>{if(e?.shadowRoot){if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){l(e,t);return}Promise.resolve(e.componentOnReady?.()).then(()=>l(e,t))}};var q=(e,t,...n)=>{try{return e?.call(t,...n)}catch(o){console.error(o,e)}},_=async(e,t,...n)=>{try{return await e?.call(t,...n)}catch(o){console.error(o,e)}},a=e=>{let t="";for(let n=0;n<e;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t},B=()=>[a(2),a(1),a(1),a(1),a(3)].join("-"),j="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(","),C=new Set(j),u="en",R={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},z=async(e,t,n="")=>{let o=`${t}/${n}`,s=`${o}${e}.json`;return f[s]??(f[s]=L(e,o)),await f[s]},f={},L=async(e,t)=>{let n=`${t}${e}.json`;try{let o=await fetch(n);if(o.ok)return await o.json()}catch(o){return console.error(o),{}}return e===u?{}:await L(u,t)},O=e=>{let t=N(e,"lang",globalThis.navigator?.language||u);return{lang:t,t9nLocale:T(t)}},T=e=>{let[t,n]=e.split("-"),o=t.toLowerCase(),s=o;return n&&(s=`${o}-${n.toUpperCase()}`),s=R[s]??s,C.has(s)?s:n?T(o):u},Q=(e,t,n,o)=>{let s,c=()=>k(e,t(),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),$(e,["lang"],c)},k=async(e,t,n=e.localName.split("-").slice(1).join("-"))=>{let{lang:o,t9nLocale:s}=O(e),c=`${t}/${n}/t9n`,i=n===null?{}:await z(s,c,"messages.");return{lang:o,t9nLocale:s,t9nStrings:i}};var m='"',b="'",v=(e,t)=>new Array(t+1).join(e),D=e=>{let t=m,n=b;e.includes(t)&&!e.includes(n)&&(n=m,t=b);let s=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${n})+)`,"gu");e=e.replace(s,(r,i,d,h)=>i+d+v(n,h.length/2));let c=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return e=e.replace(c,(r,i,d,h)=>i+d+v(`\\${t}`,h.length)),t+e+t},H=e=>{let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")},K=(e,t={})=>(e??"").replace(/\{(?<valueName>.*?)\}/gu,(n,o)=>t[o]??n),Z=e=>`\u200E${e??""}\u200E`;var G=e=>e.replace(P,(t,n)=>`${n===0?"":"-"}${t.toLowerCase()}`),P=/[A-Z]+(?![a-z])|[A-Z]/gu;var J=(e,t)=>{let n=t>x?F:t/I,o=0,s=setInterval(()=>{o+=n,o>=t&&(clearInterval(s),e())},n);return s},x=4e3,F=2e3,I=4,W=e=>e!==null,X=e=>e!==void 0;var Y=(e,t=100)=>{let n;return(...o)=>{let s=()=>{clearTimeout(n),e(...o)};clearTimeout(n),n=setTimeout(s,t)}};export{g as a,$ as b,U as c,M as d,V as e,q as f,_ as g,B as h,C as i,z as j,O as k,T as l,Q as m,D as n,H as o,K as p,Z as q,G as r,J as s,W as t,X as u,Y as v};
|