@arcgis/coding-components 5.0.0-next.76 → 5.0.0-next.78
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.js +1 -1
- package/dist/cdn/{ETK53YIX.js → 232PKRVX.js} +2 -2
- package/dist/cdn/{KE3CPWDE.js → 2BRUTLD3.js} +2 -2
- package/dist/cdn/{IY362XQH.js → 2CQFOYXH.js} +2 -2
- package/dist/cdn/{R7SK5GPP.js → 2NQYNDRI.js} +2 -2
- package/dist/cdn/{6YHTSTQF.js → 2UQQZSZN.js} +1 -1
- package/dist/cdn/{7S5MGMHB.js → 53VOPU7G.js} +2 -2
- package/dist/cdn/{25JJW5BT.js → 7QMV2R4Z.js} +2 -2
- package/dist/cdn/{BEOTUOJI.js → BICGKMP2.js} +2 -2
- package/dist/cdn/{36VPDNSG.js → CSITFAVM.js} +2 -2
- package/dist/cdn/{GRG6F6DA.js → CSY42TLW.js} +2 -2
- package/dist/cdn/{KEFVHOTO.js → D3T4DZFO.js} +1 -1
- package/dist/cdn/{ERFUWKCY.js → DB2BLXZ3.js} +2 -2
- package/dist/cdn/{AIJ23UG5.js → DEQVQRCD.js} +2 -2
- package/dist/cdn/{5LBWZ2NU.js → DGS2BIG3.js} +2 -2
- package/dist/cdn/ED4O37BF.js +4 -0
- package/dist/cdn/{QDQGGJ2T.js → F22BYGEQ.js} +2 -2
- package/dist/cdn/{W6KFCTJW.js → FRN5LS22.js} +1 -1
- package/dist/cdn/{AWYDQU7O.js → GIL5UHAX.js} +2 -2
- package/dist/cdn/{YQLCZ7IR.js → GQHUBLPR.js} +2 -2
- package/dist/cdn/{PCWS4VVG.js → HAOYA2QH.js} +2 -2
- package/dist/cdn/{YYLHG3VE.js → HMACSI6V.js} +2 -2
- package/dist/cdn/{ATSKVXCU.js → HOBWEEOX.js} +2 -2
- package/dist/cdn/{HWIO2KSU.js → HP6JQWJ2.js} +2 -2
- package/dist/cdn/{SUU4KCDI.js → KTK37V55.js} +2 -2
- package/dist/cdn/{KY243XH7.js → KUJ4DJDF.js} +2 -2
- package/dist/cdn/{J44Q7D6P.js → L7CEJSXW.js} +2 -2
- package/dist/cdn/{UEBKIHJ2.js → LC3QFA5E.js} +2 -2
- package/dist/cdn/{SOROJJPY.js → LMXR7MKD.js} +3 -3
- package/dist/cdn/{WCRBXQU2.js → LTM7M74S.js} +2 -2
- package/dist/cdn/{FV43FNKH.js → LWEIUINB.js} +2 -2
- package/dist/cdn/{ZENKI77J.js → LWPMQOYB.js} +2 -2
- package/dist/cdn/{27PULLKM.js → MZ3O4LVO.js} +2 -2
- package/dist/cdn/{BMCPU7ZH.js → O2ZYQINS.js} +1 -1
- package/dist/cdn/{77C54T2E.js → PGTLUYJJ.js} +2 -2
- package/dist/cdn/{W5HKMSOV.js → R5JOPFWM.js} +2 -2
- package/dist/cdn/{VMZO5MCZ.js → SA7T4D5Z.js} +2 -2
- package/dist/cdn/{A3CFWPUG.js → SNH5DVYV.js} +1 -1
- package/dist/cdn/{76WBTUVY.js → T6MXCLSD.js} +1 -1
- package/dist/cdn/{KF44RRZQ.js → VGLYMLQK.js} +2 -2
- package/dist/cdn/{L47J66NY.js → VQIC4QZ7.js} +2 -2
- package/dist/cdn/{MOHV2V4S.js → WVLQQZ6X.js} +2 -2
- package/dist/cdn/{NYMMPEW3.js → XPLE72TI.js} +2 -2
- package/dist/cdn/{G4WH52CR.js → Y32MWD6X.js} +2 -2
- package/dist/cdn/{Q5MSSYJC.js → Y7YWDBHH.js} +1 -1
- package/dist/cdn/{ENS24DUA.js → YDCPSHHJ.js} +1 -1
- package/dist/cdn/{AVNP7EZM.js → YIM2W55S.js} +1 -1
- package/dist/cdn/{IXXMBSPM.js → YNU73K4V.js} +2 -2
- package/dist/cdn/{NXWETHNO.js → YNYZHXNS.js} +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-contribution.js +1 -1
- 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/colorize.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/monaco-theme.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/sql-expr-service-accessors.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utilities.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
- 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 +1 -1
- package/dist/components/arcgis-code-viewer/customElement.js +1 -1
- 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 +1 -1
- package/dist/monacoStyles.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/R4SNNMO4.js +0 -4
|
@@ -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.
|
|
4
|
-
import{a as c9,b as $,d as NK}from"./KEFVHOTO.js";function ws(n,e=0){return n[n.length-(1+e)]}function u9(n){if(n.length===0)throw new Error("Invalid tail call");return[n.slice(0,n.length-1),n[n.length-1]]}function xt(n,e,t=(i,o)=>i===o){if(n===e)return!0;if(!n||!e||n.length!==e.length)return!1;for(let i=0,o=n.length;i<o;i++)if(!t(n[i],e[i]))return!1;return!0}function f9(n,e){let t=n.length-1;e<t&&(n[e]=n[t]),n.pop()}function g9(n,e,t){return MK(n.length,i=>t(n[i],e))}function MK(n,e){let t=0,i=n-1;for(;t<=i;){let o=(t+i)/2|0,s=e(o);if(s<0)t=o+1;else if(s>0)i=o-1;else return o}return-(t+1)}function d9(n,e,t){if(n=n|0,n>=e.length)throw new TypeError("invalid index");let i=e[Math.floor(e.length*Math.random())],o=[],s=[],r=[];for(let a of e){let l=t(a,i);l<0?o.push(a):l>0?s.push(a):r.push(a)}return n<o.length?d9(n,o,t):n<o.length+r.length?r[0]:d9(n-(o.length+r.length),s,t)}function ioe(n,e){let t=[],i;for(let o of n.slice(0).sort(e))!i||e(i[0],o)!==0?(i=[o],t.push(i)):i.push(o);return t}function*Vf(n,e){let t,i;for(let o of n)i!==void 0&&e(i,o)?t.push(o):(t&&(yield t),t=[o]),i=o;t&&(yield t)}function w0(n,e){for(let t=0;t<=n.length;t++)e(t===0?void 0:n[t-1],t===n.length?void 0:n[t])}function m9(n,e){for(let t=0;t<n.length;t++)e(t===0?void 0:n[t-1],n[t],t+1===n.length?void 0:n[t+1])}function Hf(n){return n.filter(e=>!!e)}function U2(n){let e=0;for(let t=0;t<n.length;t++)n[t]&&(n[e]=n[t],e+=1);n.length=e}function p9(n){return!Array.isArray(n)||n.length===0}function Rh(n){return Array.isArray(n)&&n.length>0}function fr(n,e=t=>t){let t=new Set;return n.filter(i=>{let o=e(i);return t.has(o)?!1:(t.add(o),!0)})}function Uf(n,e){return n.length>0?n[0]:e}function Nn(n,e){let t=typeof e=="number"?n:0;typeof e=="number"?t=n:(t=0,e=n);let i=[];if(t<=e)for(let o=t;o<e;o++)i.push(o);else for(let o=t;o>e;o--)i.push(o);return i}function Xc(n,e,t){let i=n.slice(0,e),o=n.slice(e);return i.concat(t,o)}function C0(n,e){let t=n.indexOf(e);t>-1&&(n.splice(t,1),n.unshift(e))}function u_(n,e){let t=n.indexOf(e);t>-1&&(n.splice(t,1),n.push(e))}function f_(n,e){for(let t of e)n.push(t)}function _9(n){return Array.isArray(n)?n:[n]}function AK(n,e,t){let i=b9(n,e),o=n.length,s=t.length;n.length=o+s;for(let r=o-1;r>=i;r--)n[r+s]=n[r];for(let r=0;r<s;r++)n[r+i]=t[r]}function $2(n,e,t,i){let o=b9(n,e),s=n.splice(o,t);return s===void 0&&(s=[]),AK(n,o,i),s}function b9(n,e){return e<0?Math.max(e+n.length,0):Math.min(e,n.length)}function go(n,e){return(t,i)=>e(n(t),n(i))}function v9(...n){return(e,t)=>{for(let i of n){let o=i(e,t);if(!h_.isNeitherLessOrGreaterThan(o))return o}return h_.neitherLessOrGreaterThan}}function C9(n){return(e,t)=>-n(e,t)}var h_,Gr,w9,eo,Ql,h9,tt=$(()=>{(function(n){function e(s){return s<0}n.isLessThan=e;function t(s){return s<=0}n.isLessThanOrEqual=t;function i(s){return s>0}n.isGreaterThan=i;function o(s){return s===0}n.isNeitherLessOrGreaterThan=o,n.greaterThan=1,n.lessThan=-1,n.neitherLessOrGreaterThan=0})(h_||(h_={}));Gr=(n,e)=>n-e,w9=(n,e)=>Gr(n?1:0,e?1:0);eo=class{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;let i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;let i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},Ql=class n{static{this.empty=new n(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new n(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new n(t=>this.iterate(i=>t(e(i))))}findLast(e){let t;return this.iterate(i=>(e(i)&&(t=i),!0)),t}findLastMaxBy(e){let t,i=!0;return this.iterate(o=>((i||h_.isGreaterThan(e(o,t)))&&(i=!1,t=o),!0)),t}},h9=class n{constructor(e){this._indexMap=e}static createSortPermutation(e,t){let i=Array.from(e.keys()).sort((o,s)=>t(e[o],e[s]));return new n(i)}apply(e){return e.map((t,i)=>e[this._indexMap[i]])}inverse(){let e=this._indexMap.slice();for(let t=0;t<this._indexMap.length;t++)e[this._indexMap[t]]=t;return new n(e)}}});function fn(n){return typeof n=="string"}function Ci(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function y9(n){let e=Object.getPrototypeOf(Uint8Array);return typeof n=="object"&&n instanceof e}function Zr(n){return typeof n=="number"&&!isNaN(n)}function q2(n){return!!n&&typeof n[Symbol.iterator]=="function"}function y0(n){return n===!0||n===!1}function mo(n){return typeof n>"u"}function Xl(n){return!Vn(n)}function Vn(n){return mo(n)||n===null}function Cs(n,e){if(!n)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function S0(n){if(Vn(n))throw new Error("Assertion Failed: argument is undefined or null");return n}function $f(n){return typeof n=="function"}function S9(n,e){let t=Math.min(n.length,e.length);for(let i=0;i<t;i++)RK(n[i],e[i])}function RK(n,e){if(fn(e)){if(typeof n!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if($f(e)){try{if(n instanceof e)return}catch{}if(!Vn(n)&&n.constructor===e||e.length===1&&e.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}var pi=$(()=>{});function Ha(n){if(!n||typeof n!="object"||n instanceof RegExp)return n;let e=Array.isArray(n)?[]:{};return Object.entries(n).forEach(([t,i])=>{e[t]=i&&typeof i=="object"?Ha(i):i}),e}function x9(n){if(!n||typeof n!="object")return n;let e=[n];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let i in t)if(L9.call(t,i)){let o=t[i];typeof o=="object"&&!Object.isFrozen(o)&&!y9(o)&&e.push(o)}}return n}function x0(n,e){return K2(n,e,new Set)}function K2(n,e,t){if(Vn(n))return n;let i=e(n);if(typeof i<"u")return i;if(Array.isArray(n)){let o=[];for(let s of n)o.push(K2(s,e,t));return o}if(Ci(n)){if(t.has(n))throw new Error("Cannot clone recursive data-structure");t.add(n);let o={};for(let s in n)L9.call(n,s)&&(o[s]=K2(n[s],e,t));return t.delete(n),o}return n}function PK(n,e,t=!0){return Ci(n)?(Ci(e)&&Object.keys(e).forEach(i=>{i in n?t&&(Ci(n[i])&&Ci(e[i])?PK(n[i],e[i],t):n[i]=e[i]):n[i]=e[i]}),n):e}function Gi(n,e){if(n===e)return!0;if(n==null||e===null||e===void 0||typeof n!=typeof e||typeof n!="object"||Array.isArray(n)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(t=0;t<n.length;t++)if(!Gi(n[t],e[t]))return!1}else{let o=[];for(i in n)o.push(i);o.sort();let s=[];for(i in e)s.push(i);if(s.sort(),!Gi(o,s))return!1;for(t=0;t<o.length;t++)if(!Gi(n[o[t]],e[o[t]]))return!1}return!0}function OK(n){let e=[];for(;Object.prototype!==n;)e=e.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return e}function g_(n){let e=[];for(let t of OK(n))typeof n[t]=="function"&&e.push(t);return e}function k9(n,e){let t=o=>function(){let s=Array.prototype.slice.call(arguments,0);return e(o,s)},i={};for(let o of n)i[o]=t(o);return i}var L9,ys=$(()=>{pi();L9=Object.prototype.hasOwnProperty});function m_(){return globalThis._VSCODE_NLS_MESSAGES}function Ph(){return globalThis._VSCODE_NLS_LANGUAGE}var j2=$(()=>{});function k0(n,e){let t;return e.length===0?t=n:t=n.replace(/\{(\d+)\}/g,(i,o)=>{let s=o[0],r=e[s],a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),FK&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function p(n,e,...t){return k0(typeof n=="number"?D9(n,e):e,t)}function D9(n,e){let t=m_()?.[n];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${n} !!!`)}return t}function roe(n,e,...t){let i;typeof n=="number"?i=D9(n,e):i=e;let o=k0(i,t);return{value:o,original:e===i?o:k0(e,t)}}var FK,ke=$(()=>{j2();j2();FK=Ph()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0});function P9(){if(!T9){T9=!0;let n=new Uint8Array(2);n[0]=1,n[1]=2,I9=new Uint16Array(n.buffer)[0]===513}return I9}var qf,__,b_,p_,BK,N9,Z2,WK,Y2,zK,M9,D0,E0,E9,VK,Jl,ec,Vs,A9,HK,G2,_i,De,oi,ed,$a,UK,R9,Ss,I0,Ua,loe,$K,T0,to,I9,T9,Q2,O9,F9,B9,W9,dt=$(()=>{ke();qf="en",__=!1,b_=!1,p_=!1,BK=!1,N9=!1,Z2=!1,WK=!1,Y2=!1,zK=!1,M9=!1,E0=qf,E9=qf,ec=globalThis;typeof ec.vscode<"u"&&typeof ec.vscode.process<"u"?Vs=ec.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Vs=process);A9=typeof Vs?.versions?.electron=="string",HK=A9&&Vs?.type==="renderer";if(typeof Vs=="object"){__=Vs.platform==="win32",b_=Vs.platform==="darwin",p_=Vs.platform==="linux",BK=p_&&!!Vs.env.SNAP&&!!Vs.env.SNAP_REVISION,WK=A9,zK=!!Vs.env.CI||!!Vs.env.BUILD_ARTIFACTSTAGINGDIRECTORY,D0=qf,E0=qf;let n=Vs.env.VSCODE_NLS_CONFIG;if(n)try{let e=JSON.parse(n);D0=e.userLocale,E9=e.osLocale,E0=e.resolvedLanguage||qf,VK=e.languagePack?.translationsConfigFile}catch{}N9=!0}else typeof navigator=="object"&&!HK?(Jl=navigator.userAgent,__=Jl.indexOf("Windows")>=0,b_=Jl.indexOf("Macintosh")>=0,Y2=(Jl.indexOf("Macintosh")>=0||Jl.indexOf("iPad")>=0||Jl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,p_=Jl.indexOf("Linux")>=0,M9=Jl?.indexOf("Mobi")>=0,Z2=!0,E0=Ph()||qf,D0=navigator.language.toLowerCase(),E9=D0):console.error("Unable to resolve platform.");G2=0;b_?G2=1:__?G2=3:p_&&(G2=2);_i=__,De=b_,oi=p_,ed=N9,$a=Z2,UK=Z2&&typeof ec.importScripts=="function",R9=UK?ec.origin:void 0,Ss=Y2,I0=M9,Ua=Jl,loe=E0,$K=typeof ec.postMessage=="function"&&!ec.importScripts,T0=(()=>{if($K){let n=[];ec.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,o=n.length;i<o;i++){let s=n[i];if(s.id===t.data.vscodeScheduleAsyncWork){n.splice(i,1),s.callback();return}}});let e=0;return t=>{let i=++e;n.push({id:i,callback:t}),ec.postMessage({vscodeScheduleAsyncWork:i},"*")}}return n=>setTimeout(n)})(),to=b_||Y2?2:__?1:3,I9=!0,T9=!1;Q2=!!(Ua&&Ua.indexOf("Chrome")>=0),O9=!!(Ua&&Ua.indexOf("Firefox")>=0),F9=!!(!Q2&&Ua&&Ua.indexOf("Safari")>=0),B9=!!(Ua&&Ua.indexOf("Edg/")>=0),W9=!!(Ua&&Ua.indexOf("Android")>=0)});var Zi,v_=$(()=>{Zi={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}});var Qe,Hs=$(()=>{(function(n){function e(w){return w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}n.is=e;let t=Object.freeze([]);function i(){return t}n.empty=i;function*o(w){yield w}n.single=o;function s(w){return e(w)?w:o(w)}n.wrap=s;function r(w){return w||t}n.from=r;function*a(w){for(let S=w.length-1;S>=0;S--)yield w[S]}n.reverse=a;function l(w){return!w||w[Symbol.iterator]().next().done===!0}n.isEmpty=l;function c(w){return w[Symbol.iterator]().next().value}n.first=c;function d(w,S){let L=0;for(let x of w)if(S(x,L++))return!0;return!1}n.some=d;function h(w,S){for(let L of w)if(S(L))return L}n.find=h;function*u(w,S){for(let L of w)S(L)&&(yield L)}n.filter=u;function*f(w,S){let L=0;for(let x of w)yield S(x,L++)}n.map=f;function*g(w,S){let L=0;for(let x of w)yield*S(x,L++)}n.flatMap=g;function*m(...w){for(let S of w)yield*S}n.concat=m;function _(w,S,L){let x=L;for(let D of w)x=S(x,D);return x}n.reduce=_;function*b(w,S,L=w.length){for(S<0&&(S+=w.length),L<0?L+=w.length:L>w.length&&(L=w.length);S<L;S++)yield w[S]}n.slice=b;function v(w,S=Number.POSITIVE_INFINITY){let L=[];if(S===0)return[L,w];let x=w[Symbol.iterator]();for(let D=0;D<S;D++){let E=x.next();if(E.done)return[L,n.empty()];L.push(E.value)}return[L,{[Symbol.iterator](){return x}}]}n.consume=v;async function C(w){let S=[];for await(let L of w)S.push(L);return Promise.resolve(S)}n.asyncToArray=C})(Qe||(Qe={}))});var Fi,yi,mr=$(()=>{Fi=class n{static{this.Undefined=new n(void 0)}constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}},yi=class{constructor(){this._first=Fi.Undefined,this._last=Fi.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Fi.Undefined}clear(){let e=this._first;for(;e!==Fi.Undefined;){let t=e.next;e.prev=Fi.Undefined,e.next=Fi.Undefined,e=t}this._first=Fi.Undefined,this._last=Fi.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new Fi(e);if(this._first===Fi.Undefined)this._first=i,this._last=i;else if(t){let s=this._last;this._last=i,i.prev=s,s.next=i}else{let s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==Fi.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Fi.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Fi.Undefined&&e.next!==Fi.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Fi.Undefined&&e.next===Fi.Undefined?(this._first=Fi.Undefined,this._last=Fi.Undefined):e.next===Fi.Undefined?(this._last=this._last.prev,this._last.next=Fi.Undefined):e.prev===Fi.Undefined&&(this._first=this._first.next,this._first.prev=Fi.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Fi.Undefined;)yield e.element,e=e.next}}});function qK(n=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of X2)n.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}function C_(n){let e=w_;if(n&&n instanceof RegExp)if(n.global)e=n;else{let t="g";n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.unicode&&(t+="u"),e=new RegExp(n.source,t)}return e.lastIndex=0,e}function td(n,e,t,i,o){if(e=C_(e),o||(o=Qe.first(z9)),t.length>o.maxLen){let c=n-o.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,n+o.maxLen/2),td(n,e,t,i,o)}let s=Date.now(),r=n-1-i,a=-1,l=null;for(let c=1;!(Date.now()-s>=o.timeBudget);c++){let d=r-o.windowSize*c;e.lastIndex=Math.max(0,d);let h=KK(e,t,r,a);if(!h&&l||(l=h,d<=0))break;a=d}if(l){let c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function KK(n,e,t,i){let o;for(;o=n.exec(e);){let s=o.index||0;if(s<=t&&n.lastIndex>=t)return o;if(i>0&&s>i)return null}return null}var X2,w_,z9,Kf=$(()=>{Hs();mr();X2="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";w_=qK();z9=new yi;z9.unshift({maxLen:1e3,windowSize:15,timeBudget:150})});function Ue(n){rd(n)||U9.onUnexpectedError(n)}function R0(n){rd(n)||U9.onUnexpectedExternalError(n)}function BT(n){if(n instanceof Error){let{name:e,message:t}=n,i=n.stacktrace||n.stack;return{$isError:!0,name:e,message:t,stack:i,noTelemetry:x_.isErrorNoTelemetry(n)}}return n}function rd(n){return n instanceof pr?!0:n instanceof Error&&n.name===M0&&n.message===M0}function $9(){let n=new Error(M0);return n.name=n.message,n}function ad(n){return n?new Error(`Illegal argument: ${n}`):new Error("Illegal argument")}function Qf(n){return n?new Error(`Illegal state: ${n}`):new Error("Illegal state")}var FT,U9,M0,pr,A0,x_,Ge,ht=$(()=>{FT=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?x_.isErrorNoTelemetry(e)?new x_(e.message+`
|
|
3
|
+
v5.0.0-next.78 */
|
|
4
|
+
import{a as c9,b as $,d as NK}from"./D3T4DZFO.js";function ws(n,e=0){return n[n.length-(1+e)]}function u9(n){if(n.length===0)throw new Error("Invalid tail call");return[n.slice(0,n.length-1),n[n.length-1]]}function xt(n,e,t=(i,o)=>i===o){if(n===e)return!0;if(!n||!e||n.length!==e.length)return!1;for(let i=0,o=n.length;i<o;i++)if(!t(n[i],e[i]))return!1;return!0}function f9(n,e){let t=n.length-1;e<t&&(n[e]=n[t]),n.pop()}function g9(n,e,t){return MK(n.length,i=>t(n[i],e))}function MK(n,e){let t=0,i=n-1;for(;t<=i;){let o=(t+i)/2|0,s=e(o);if(s<0)t=o+1;else if(s>0)i=o-1;else return o}return-(t+1)}function d9(n,e,t){if(n=n|0,n>=e.length)throw new TypeError("invalid index");let i=e[Math.floor(e.length*Math.random())],o=[],s=[],r=[];for(let a of e){let l=t(a,i);l<0?o.push(a):l>0?s.push(a):r.push(a)}return n<o.length?d9(n,o,t):n<o.length+r.length?r[0]:d9(n-(o.length+r.length),s,t)}function ioe(n,e){let t=[],i;for(let o of n.slice(0).sort(e))!i||e(i[0],o)!==0?(i=[o],t.push(i)):i.push(o);return t}function*Vf(n,e){let t,i;for(let o of n)i!==void 0&&e(i,o)?t.push(o):(t&&(yield t),t=[o]),i=o;t&&(yield t)}function w0(n,e){for(let t=0;t<=n.length;t++)e(t===0?void 0:n[t-1],t===n.length?void 0:n[t])}function m9(n,e){for(let t=0;t<n.length;t++)e(t===0?void 0:n[t-1],n[t],t+1===n.length?void 0:n[t+1])}function Hf(n){return n.filter(e=>!!e)}function U2(n){let e=0;for(let t=0;t<n.length;t++)n[t]&&(n[e]=n[t],e+=1);n.length=e}function p9(n){return!Array.isArray(n)||n.length===0}function Rh(n){return Array.isArray(n)&&n.length>0}function fr(n,e=t=>t){let t=new Set;return n.filter(i=>{let o=e(i);return t.has(o)?!1:(t.add(o),!0)})}function Uf(n,e){return n.length>0?n[0]:e}function Nn(n,e){let t=typeof e=="number"?n:0;typeof e=="number"?t=n:(t=0,e=n);let i=[];if(t<=e)for(let o=t;o<e;o++)i.push(o);else for(let o=t;o>e;o--)i.push(o);return i}function Xc(n,e,t){let i=n.slice(0,e),o=n.slice(e);return i.concat(t,o)}function C0(n,e){let t=n.indexOf(e);t>-1&&(n.splice(t,1),n.unshift(e))}function u_(n,e){let t=n.indexOf(e);t>-1&&(n.splice(t,1),n.push(e))}function f_(n,e){for(let t of e)n.push(t)}function _9(n){return Array.isArray(n)?n:[n]}function AK(n,e,t){let i=b9(n,e),o=n.length,s=t.length;n.length=o+s;for(let r=o-1;r>=i;r--)n[r+s]=n[r];for(let r=0;r<s;r++)n[r+i]=t[r]}function $2(n,e,t,i){let o=b9(n,e),s=n.splice(o,t);return s===void 0&&(s=[]),AK(n,o,i),s}function b9(n,e){return e<0?Math.max(e+n.length,0):Math.min(e,n.length)}function go(n,e){return(t,i)=>e(n(t),n(i))}function v9(...n){return(e,t)=>{for(let i of n){let o=i(e,t);if(!h_.isNeitherLessOrGreaterThan(o))return o}return h_.neitherLessOrGreaterThan}}function C9(n){return(e,t)=>-n(e,t)}var h_,Gr,w9,eo,Ql,h9,tt=$(()=>{(function(n){function e(s){return s<0}n.isLessThan=e;function t(s){return s<=0}n.isLessThanOrEqual=t;function i(s){return s>0}n.isGreaterThan=i;function o(s){return s===0}n.isNeitherLessOrGreaterThan=o,n.greaterThan=1,n.lessThan=-1,n.neitherLessOrGreaterThan=0})(h_||(h_={}));Gr=(n,e)=>n-e,w9=(n,e)=>Gr(n?1:0,e?1:0);eo=class{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;let i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;let i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},Ql=class n{static{this.empty=new n(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new n(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new n(t=>this.iterate(i=>t(e(i))))}findLast(e){let t;return this.iterate(i=>(e(i)&&(t=i),!0)),t}findLastMaxBy(e){let t,i=!0;return this.iterate(o=>((i||h_.isGreaterThan(e(o,t)))&&(i=!1,t=o),!0)),t}},h9=class n{constructor(e){this._indexMap=e}static createSortPermutation(e,t){let i=Array.from(e.keys()).sort((o,s)=>t(e[o],e[s]));return new n(i)}apply(e){return e.map((t,i)=>e[this._indexMap[i]])}inverse(){let e=this._indexMap.slice();for(let t=0;t<this._indexMap.length;t++)e[this._indexMap[t]]=t;return new n(e)}}});function fn(n){return typeof n=="string"}function Ci(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function y9(n){let e=Object.getPrototypeOf(Uint8Array);return typeof n=="object"&&n instanceof e}function Zr(n){return typeof n=="number"&&!isNaN(n)}function q2(n){return!!n&&typeof n[Symbol.iterator]=="function"}function y0(n){return n===!0||n===!1}function mo(n){return typeof n>"u"}function Xl(n){return!Vn(n)}function Vn(n){return mo(n)||n===null}function Cs(n,e){if(!n)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function S0(n){if(Vn(n))throw new Error("Assertion Failed: argument is undefined or null");return n}function $f(n){return typeof n=="function"}function S9(n,e){let t=Math.min(n.length,e.length);for(let i=0;i<t;i++)RK(n[i],e[i])}function RK(n,e){if(fn(e)){if(typeof n!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if($f(e)){try{if(n instanceof e)return}catch{}if(!Vn(n)&&n.constructor===e||e.length===1&&e.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}var pi=$(()=>{});function Ha(n){if(!n||typeof n!="object"||n instanceof RegExp)return n;let e=Array.isArray(n)?[]:{};return Object.entries(n).forEach(([t,i])=>{e[t]=i&&typeof i=="object"?Ha(i):i}),e}function x9(n){if(!n||typeof n!="object")return n;let e=[n];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let i in t)if(L9.call(t,i)){let o=t[i];typeof o=="object"&&!Object.isFrozen(o)&&!y9(o)&&e.push(o)}}return n}function x0(n,e){return K2(n,e,new Set)}function K2(n,e,t){if(Vn(n))return n;let i=e(n);if(typeof i<"u")return i;if(Array.isArray(n)){let o=[];for(let s of n)o.push(K2(s,e,t));return o}if(Ci(n)){if(t.has(n))throw new Error("Cannot clone recursive data-structure");t.add(n);let o={};for(let s in n)L9.call(n,s)&&(o[s]=K2(n[s],e,t));return t.delete(n),o}return n}function PK(n,e,t=!0){return Ci(n)?(Ci(e)&&Object.keys(e).forEach(i=>{i in n?t&&(Ci(n[i])&&Ci(e[i])?PK(n[i],e[i],t):n[i]=e[i]):n[i]=e[i]}),n):e}function Gi(n,e){if(n===e)return!0;if(n==null||e===null||e===void 0||typeof n!=typeof e||typeof n!="object"||Array.isArray(n)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(t=0;t<n.length;t++)if(!Gi(n[t],e[t]))return!1}else{let o=[];for(i in n)o.push(i);o.sort();let s=[];for(i in e)s.push(i);if(s.sort(),!Gi(o,s))return!1;for(t=0;t<o.length;t++)if(!Gi(n[o[t]],e[o[t]]))return!1}return!0}function OK(n){let e=[];for(;Object.prototype!==n;)e=e.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return e}function g_(n){let e=[];for(let t of OK(n))typeof n[t]=="function"&&e.push(t);return e}function k9(n,e){let t=o=>function(){let s=Array.prototype.slice.call(arguments,0);return e(o,s)},i={};for(let o of n)i[o]=t(o);return i}var L9,ys=$(()=>{pi();L9=Object.prototype.hasOwnProperty});function m_(){return globalThis._VSCODE_NLS_MESSAGES}function Ph(){return globalThis._VSCODE_NLS_LANGUAGE}var j2=$(()=>{});function k0(n,e){let t;return e.length===0?t=n:t=n.replace(/\{(\d+)\}/g,(i,o)=>{let s=o[0],r=e[s],a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),FK&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function p(n,e,...t){return k0(typeof n=="number"?D9(n,e):e,t)}function D9(n,e){let t=m_()?.[n];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${n} !!!`)}return t}function roe(n,e,...t){let i;typeof n=="number"?i=D9(n,e):i=e;let o=k0(i,t);return{value:o,original:e===i?o:k0(e,t)}}var FK,ke=$(()=>{j2();j2();FK=Ph()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0});function P9(){if(!T9){T9=!0;let n=new Uint8Array(2);n[0]=1,n[1]=2,I9=new Uint16Array(n.buffer)[0]===513}return I9}var qf,__,b_,p_,BK,N9,Z2,WK,Y2,zK,M9,D0,E0,E9,VK,Jl,ec,Vs,A9,HK,G2,_i,De,oi,ed,$a,UK,R9,Ss,I0,Ua,loe,$K,T0,to,I9,T9,Q2,O9,F9,B9,W9,dt=$(()=>{ke();qf="en",__=!1,b_=!1,p_=!1,BK=!1,N9=!1,Z2=!1,WK=!1,Y2=!1,zK=!1,M9=!1,E0=qf,E9=qf,ec=globalThis;typeof ec.vscode<"u"&&typeof ec.vscode.process<"u"?Vs=ec.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Vs=process);A9=typeof Vs?.versions?.electron=="string",HK=A9&&Vs?.type==="renderer";if(typeof Vs=="object"){__=Vs.platform==="win32",b_=Vs.platform==="darwin",p_=Vs.platform==="linux",BK=p_&&!!Vs.env.SNAP&&!!Vs.env.SNAP_REVISION,WK=A9,zK=!!Vs.env.CI||!!Vs.env.BUILD_ARTIFACTSTAGINGDIRECTORY,D0=qf,E0=qf;let n=Vs.env.VSCODE_NLS_CONFIG;if(n)try{let e=JSON.parse(n);D0=e.userLocale,E9=e.osLocale,E0=e.resolvedLanguage||qf,VK=e.languagePack?.translationsConfigFile}catch{}N9=!0}else typeof navigator=="object"&&!HK?(Jl=navigator.userAgent,__=Jl.indexOf("Windows")>=0,b_=Jl.indexOf("Macintosh")>=0,Y2=(Jl.indexOf("Macintosh")>=0||Jl.indexOf("iPad")>=0||Jl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,p_=Jl.indexOf("Linux")>=0,M9=Jl?.indexOf("Mobi")>=0,Z2=!0,E0=Ph()||qf,D0=navigator.language.toLowerCase(),E9=D0):console.error("Unable to resolve platform.");G2=0;b_?G2=1:__?G2=3:p_&&(G2=2);_i=__,De=b_,oi=p_,ed=N9,$a=Z2,UK=Z2&&typeof ec.importScripts=="function",R9=UK?ec.origin:void 0,Ss=Y2,I0=M9,Ua=Jl,loe=E0,$K=typeof ec.postMessage=="function"&&!ec.importScripts,T0=(()=>{if($K){let n=[];ec.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,o=n.length;i<o;i++){let s=n[i];if(s.id===t.data.vscodeScheduleAsyncWork){n.splice(i,1),s.callback();return}}});let e=0;return t=>{let i=++e;n.push({id:i,callback:t}),ec.postMessage({vscodeScheduleAsyncWork:i},"*")}}return n=>setTimeout(n)})(),to=b_||Y2?2:__?1:3,I9=!0,T9=!1;Q2=!!(Ua&&Ua.indexOf("Chrome")>=0),O9=!!(Ua&&Ua.indexOf("Firefox")>=0),F9=!!(!Q2&&Ua&&Ua.indexOf("Safari")>=0),B9=!!(Ua&&Ua.indexOf("Edg/")>=0),W9=!!(Ua&&Ua.indexOf("Android")>=0)});var Zi,v_=$(()=>{Zi={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}});var Qe,Hs=$(()=>{(function(n){function e(w){return w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}n.is=e;let t=Object.freeze([]);function i(){return t}n.empty=i;function*o(w){yield w}n.single=o;function s(w){return e(w)?w:o(w)}n.wrap=s;function r(w){return w||t}n.from=r;function*a(w){for(let S=w.length-1;S>=0;S--)yield w[S]}n.reverse=a;function l(w){return!w||w[Symbol.iterator]().next().done===!0}n.isEmpty=l;function c(w){return w[Symbol.iterator]().next().value}n.first=c;function d(w,S){let L=0;for(let x of w)if(S(x,L++))return!0;return!1}n.some=d;function h(w,S){for(let L of w)if(S(L))return L}n.find=h;function*u(w,S){for(let L of w)S(L)&&(yield L)}n.filter=u;function*f(w,S){let L=0;for(let x of w)yield S(x,L++)}n.map=f;function*g(w,S){let L=0;for(let x of w)yield*S(x,L++)}n.flatMap=g;function*m(...w){for(let S of w)yield*S}n.concat=m;function _(w,S,L){let x=L;for(let D of w)x=S(x,D);return x}n.reduce=_;function*b(w,S,L=w.length){for(S<0&&(S+=w.length),L<0?L+=w.length:L>w.length&&(L=w.length);S<L;S++)yield w[S]}n.slice=b;function v(w,S=Number.POSITIVE_INFINITY){let L=[];if(S===0)return[L,w];let x=w[Symbol.iterator]();for(let D=0;D<S;D++){let E=x.next();if(E.done)return[L,n.empty()];L.push(E.value)}return[L,{[Symbol.iterator](){return x}}]}n.consume=v;async function C(w){let S=[];for await(let L of w)S.push(L);return Promise.resolve(S)}n.asyncToArray=C})(Qe||(Qe={}))});var Fi,yi,mr=$(()=>{Fi=class n{static{this.Undefined=new n(void 0)}constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}},yi=class{constructor(){this._first=Fi.Undefined,this._last=Fi.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Fi.Undefined}clear(){let e=this._first;for(;e!==Fi.Undefined;){let t=e.next;e.prev=Fi.Undefined,e.next=Fi.Undefined,e=t}this._first=Fi.Undefined,this._last=Fi.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new Fi(e);if(this._first===Fi.Undefined)this._first=i,this._last=i;else if(t){let s=this._last;this._last=i,i.prev=s,s.next=i}else{let s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==Fi.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Fi.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Fi.Undefined&&e.next!==Fi.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Fi.Undefined&&e.next===Fi.Undefined?(this._first=Fi.Undefined,this._last=Fi.Undefined):e.next===Fi.Undefined?(this._last=this._last.prev,this._last.next=Fi.Undefined):e.prev===Fi.Undefined&&(this._first=this._first.next,this._first.prev=Fi.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Fi.Undefined;)yield e.element,e=e.next}}});function qK(n=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of X2)n.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}function C_(n){let e=w_;if(n&&n instanceof RegExp)if(n.global)e=n;else{let t="g";n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.unicode&&(t+="u"),e=new RegExp(n.source,t)}return e.lastIndex=0,e}function td(n,e,t,i,o){if(e=C_(e),o||(o=Qe.first(z9)),t.length>o.maxLen){let c=n-o.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,n+o.maxLen/2),td(n,e,t,i,o)}let s=Date.now(),r=n-1-i,a=-1,l=null;for(let c=1;!(Date.now()-s>=o.timeBudget);c++){let d=r-o.windowSize*c;e.lastIndex=Math.max(0,d);let h=KK(e,t,r,a);if(!h&&l||(l=h,d<=0))break;a=d}if(l){let c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function KK(n,e,t,i){let o;for(;o=n.exec(e);){let s=o.index||0;if(s<=t&&n.lastIndex>=t)return o;if(i>0&&s>i)return null}return null}var X2,w_,z9,Kf=$(()=>{Hs();mr();X2="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";w_=qK();z9=new yi;z9.unshift({maxLen:1e3,windowSize:15,timeBudget:150})});function Ue(n){rd(n)||U9.onUnexpectedError(n)}function R0(n){rd(n)||U9.onUnexpectedExternalError(n)}function BT(n){if(n instanceof Error){let{name:e,message:t}=n,i=n.stacktrace||n.stack;return{$isError:!0,name:e,message:t,stack:i,noTelemetry:x_.isErrorNoTelemetry(n)}}return n}function rd(n){return n instanceof pr?!0:n instanceof Error&&n.name===M0&&n.message===M0}function $9(){let n=new Error(M0);return n.name=n.message,n}function ad(n){return n?new Error(`Illegal argument: ${n}`):new Error("Illegal argument")}function Qf(n){return n?new Error(`Illegal state: ${n}`):new Error("Illegal state")}var FT,U9,M0,pr,A0,x_,Ge,ht=$(()=>{FT=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?x_.isErrorNoTelemetry(e)?new x_(e.message+`
|
|
5
5
|
|
|
6
6
|
`+e.stack):new Error(e.message+`
|
|
7
7
|
|
|
@@ -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.
|
|
4
|
-
import{b,c as r,d as _}from"./
|
|
3
|
+
v5.0.0-next.78 */
|
|
4
|
+
import{b,c as r,d as _}from"./LWEIUINB.js";import{a as v}from"./2UQQZSZN.js";import{a as p}from"./LWPMQOYB.js";import"./SA7T4D5Z.js";import{a as f}from"./WVLQQZ6X.js";import"./LMXR7MKD.js";import"./YIM2W55S.js";import"./232PKRVX.js";import{d as h,e as m}from"./FRN5LS22.js";import{F as l,G as d,K as u,h as g,j as s,l as c,n as a}from"./HMACSI6V.js";import"./SNH5DVYV.js";import"./GIL5UHAX.js";import"./D3T4DZFO.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=g`: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)}}`,n=class extends d{constructor(){super(...arguments),this._beforeBack=async()=>{this._selectedSuggestion=void 0},this.messages=p(),this._colorizeStyle="",this._filterValue="",this.closed=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0,closed:5}}static{this.styles=$}load(){this._colorizeStyle=r(),this._themeChangedListener=_(()=>this._colorizeStyle=r())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{m(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget?.value??""}_emitItemSelected(e,t){let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisClose.emit()}_colorizeCode(e){e!==void 0&&b(e,this._selectedSuggestion.code,"arcade")}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=f(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??c}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??c}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??c} ${l(h)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${v(e.documentation)??""}></div><pre><code ${l(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return this.closed?null:s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};u("arcgis-arcade-suggestions",n);export{n as ArcgisArcadeSuggestions};
|
|
@@ -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.
|
|
4
|
-
import{a as S}from"./AIJ23UG5.js";import b from"./5LBWZ2NU.js";import{a as D}from"./ZENKI77J.js";import"./VMZO5MCZ.js";import a from"./BEOTUOJI.js";import"./Q5MSSYJC.js";import"./BMCPU7ZH.js";import{c as L,d as B}from"./MOHV2V4S.js";import"./SOROJJPY.js";import"./AVNP7EZM.js";import"./ETK53YIX.js";import"./W6KFCTJW.js";import{E as z,F as O,G as V,I as A,K as H,h as M,j as c,k as U,l as w,s as P,w as q,x as _,y as F}from"./YYLHG3VE.js";import"./A3CFWPUG.js";import"./AWYDQU7O.js";import"./KEFVHOTO.js";export default $arcgis.t(([ae,Q,oe,ce,re,{a:j},C])=>{var y=class extends F{constructor(e){if(super(e),this.it=w,e.type!==q.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===w||e==null)return this._t=void 0,this.it=e;if(e===U)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:[]}}};y.directiveName="unsafeHTML",y.resultType=1;var $=_(y);var ne=M`: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}`,b=class extends Error{constructor({message:e,code:t,subCode:s,details:r,source:n}){super(e),this.name="ArcadeAssistantError",this.code=t,this.subCode=s,this.details=r,this.source=n}};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 le(i){let{baseUrl:e,skillId:t,message:s,authToken:r,previousConversationId:n,context:l}=i,u=t?`${e}/skills/${t}/chat`:`${e}/chat`,o=[],a={message:s,context:l};n&&(a.conversation_id=n);let d;try{d=await Q(u,{method:"post",headers:{"Content-Type":"application/json",token:r},body:JSON.stringify(a),responseType:"json"})}catch(h){let g=h,x=g.details?.rawResponse||g.message||String(h),f=G(x);throw f?new b(f):h}let p=d.data;o.push(p);let k=p.conversationId,ee=p.inquiryId,E=p.sequenceNumber;async function te(){let h=0,g=25;for(;h<g;){await new Promise(v=>setTimeout(v,1e3));let x=de(k,E,ee),f;try{f=await Q(u,{method:"post",headers:{"Content-Type":"application/json",token:r},body:JSON.stringify(x),responseType:"json"})}catch(v){let R=v,se=R.details?.rawResponse||R.message||String(v),N=G(se);throw N?new b(N):v}let m=f.data;if(m.context&&m.context.kind==="ArcgisErrorAsContext"&&m.context.error)throw new b({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(o.push(m),E=m.sequenceNumber,h++,!m.hasMore)break}if(h===g)throw new b({message:"Request timed out",code:"TIMEOUT",source:"polling"})}let ie=120*1e3;return await Promise.race([te(),new Promise((h,g)=>setTimeout(()=>g(new b({message:"Request timed out",code:"TIMEOUT",source:"hard-timeout"})),ie))]),o}function de(i,e,t){return{conversationId:i,inquiryId:t,ackSequenceNumber:e}}function pe(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 ue=i=>{let e=i.value.length,t=72,s=180,r=i.offsetWidth,n=Math.max(1,Math.floor(r/8)),l=Math.ceil(e/n),u=t+(l-2)*24;i.style.setProperty("--calcite-text-area-min-height",`${Math.min(u,s)}px`)};function me({messages:i}){return c`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta??"Beta"}>${i.beta??"Beta"}</calcite-chip>`}function he({popoverContent:i}){return c`<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 Z({errorMessage:i,slot:e}){return c`<div class="error-display"><calcite-input-message id=error-message status=invalid icon=exclamation-mark-triangle scale=m slot=${e??A}>${i}</calcite-input-message></div>`}function ge({active:i,setActive:e,messages:t}){return c`<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 be({context:i,messages:e}){return i?c`<div class="gaps">${i.profileName&&c`<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&&c`<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 fe({isDisabled:i,isReadOnly:e,setQuestion:t,setIsViewingResult:s,textAreaRef:r,question:n,errorMessage:l,setErrorMessage:u,submitQuestion:o,messages:a,mode:d,context:p}){return c`<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=${n} @calciteTextAreaInput=${k=>{ue(k.target),t(k.target.value)}} ${O(r)}><div class="submission-actions-wrapper" slot=footer-start>${l&&Z({errorMessage:l,slot:"footer-start"})||""}<div class="submission-actions">${be({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(n?"":a.enteraprompt??"Please enter a prompt"),await o()}}>${d==="prompt"?a.ask??"Generate":a.refine??"Refine"}</calcite-button></div></div></div></calcite-text-area></div>`}var ve="https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement",ye="https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";function $e({setOpen:i,messages:e,feedback:t,setFeedback:s,onSubmit:r}){return t.active?c`<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=${n=>s({...t,text:n.target.value})} .disabled=${t.submitting}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${n=>{s({...t,termsAccepted:n.target.checked})}} .disabled=${t.submitting}></calcite-checkbox><span>${$((e.agreement??"I agree to the {EsriPrivacyStatement} (and {Supplement}).").replace("{EsriPrivacyStatement}",`<calcite-link href=${ve} target="_blank">${e.esriprivacystatement??"Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}",`<calcite-link href=${ye} target="_blank">${e.supplement??"Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${r} .disabled=${!t.termsAccepted||t.submitting} .loading=${t.submitting}>${e.submitfeedback??"Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>`:null}function J({assistantsEnabled:i,messages:e,slot:t,assistantHelpUrl:s,helpTopicUrl:r}){return c`<calcite-block .label=${e.assistantinformation??"Assistant information"} slot=${t??A} 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?c`<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>${$((e.seedocumentation??"Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}",`<calcite-link href=${r} target="_blank">${e.documentation??"documentation"}</calcite-link>`))}</p>`:c`<p>${$(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 ke({messages:i,onProceed:e,onExit:t,helpTopicUrl:s}){return c`<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>${$((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 xe({messages:i,suggestions:e,onSuggestionClick:t}){return c`<calcite-block .heading=${i.promptsuggestions} expanded collapsible id=suggestion-block><calcite-chip-group class="suggestions" .label=${i.promptsuggestions??"Prompt Suggestions"}>${S(e,s=>s,s=>c`<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 W=200;function Y({hidden:i=!1,expanded:e=!1,messages:t,cards:s,heading:r,collapsible:n=!1,showEffectsIcon:l=!1,onCopyCode:u,standalone:o}){return c`<calcite-block .hidden=${i} id=result-block .heading=${r??t.besteffort??"Here is the assistant's best effort"} .expanded=${e} .collapsible=${n}>${l&&c`<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"}>${S(s,a=>a.conversationId,a=>c`<calcite-card><div slot=heading><div class="prior-prompt"><span>${a.priorPrompt.length>W?`${a.priorPrompt.slice(0,W)}...`:a.priorPrompt}</span><calcite-action icon=duplicate scale=s slot=actions-end class="copy-prompt-button" text .id=${`copy-prompt-${a.conversationId}-${o?"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}-${o?"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}-${o?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copyprompttoclipboard??"Copy prompt to clipboard"}</calcite-tooltip></div>${a.message&&o&&c`<div class="response-error-container">${Z({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&&!o&&c`<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=P();return c`${d.tooltip&&c`<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}-${o?"standalone":"list"}`}></calcite-button><calcite-tooltip class="hidden-above-380" .referenceElement=${`add-to-editor-button-${a.conversationId}-${o?"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}-${o?"standalone":"list"}`}></calcite-button><calcite-tooltip .referenceElement=${`replace-${a.conversationId}-${o?"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}-${o?"standalone":"list"}`}></calcite-button><calcite-popover .referenceElement=${`copy-response-${a.conversationId}-${o?"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}-${o?"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}-${o?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-up-${a.conversationId}-${o?"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}-${o?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-down-${a.conversationId}-${o?"standalone":"list"}`} placement=top-start><span>${t.unhelpful??"Unhelpful"}</span></calcite-tooltip></div></calcite-card>`)}</calcite-card-group></calcite-block>`}var we="arcade_generation",Ae="ArcadeCodeRequest",T="visualization",Ce="ArcadeAssistant",Se=["your_comments","user_evaluation","question","answer","useragent","_source","version","context","extras"],K=[],X=!0,I=class extends V{constructor(){super(...arguments),this.textAreaRef=z(),this.messages=D(),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,r=ce.applicationName;!r&&!this.appVersion&&console.warn("Arcade Assistant: esriConfig.applicationName is not set. Consider setting it to help identify the application version in feedback.");let n={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:Ce,version:this.appVersion||r||"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 re({attributes:n})]})}catch(l){console.error("Error submitting feedback:",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=ne}get disclaimerComment(){return`// ${this.messages.disclaimercomment}
|
|
3
|
+
v5.0.0-next.78 */
|
|
4
|
+
import{a as S}from"./DEQVQRCD.js";import b from"./DGS2BIG3.js";import{a as D}from"./LWPMQOYB.js";import"./SA7T4D5Z.js";import a from"./BICGKMP2.js";import"./Y7YWDBHH.js";import"./O2ZYQINS.js";import{c as L,d as B}from"./WVLQQZ6X.js";import"./LMXR7MKD.js";import"./YIM2W55S.js";import"./232PKRVX.js";import"./FRN5LS22.js";import{E as z,F as O,G as V,I as A,K as H,h as M,j as c,k as U,l as w,s as P,w as q,x as _,y as F}from"./HMACSI6V.js";import"./SNH5DVYV.js";import"./GIL5UHAX.js";import"./D3T4DZFO.js";export default $arcgis.t(([ae,Q,oe,ce,re,{a:j},C])=>{var y=class extends F{constructor(e){if(super(e),this.it=w,e.type!==q.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===w||e==null)return this._t=void 0,this.it=e;if(e===U)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:[]}}};y.directiveName="unsafeHTML",y.resultType=1;var $=_(y);var ne=M`: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}`,b=class extends Error{constructor({message:e,code:t,subCode:s,details:r,source:n}){super(e),this.name="ArcadeAssistantError",this.code=t,this.subCode=s,this.details=r,this.source=n}};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 le(i){let{baseUrl:e,skillId:t,message:s,authToken:r,previousConversationId:n,context:l}=i,u=t?`${e}/skills/${t}/chat`:`${e}/chat`,o=[],a={message:s,context:l};n&&(a.conversation_id=n);let d;try{d=await Q(u,{method:"post",headers:{"Content-Type":"application/json",token:r},body:JSON.stringify(a),responseType:"json"})}catch(h){let g=h,x=g.details?.rawResponse||g.message||String(h),f=G(x);throw f?new b(f):h}let p=d.data;o.push(p);let k=p.conversationId,ee=p.inquiryId,E=p.sequenceNumber;async function te(){let h=0,g=25;for(;h<g;){await new Promise(v=>setTimeout(v,1e3));let x=de(k,E,ee),f;try{f=await Q(u,{method:"post",headers:{"Content-Type":"application/json",token:r},body:JSON.stringify(x),responseType:"json"})}catch(v){let R=v,se=R.details?.rawResponse||R.message||String(v),N=G(se);throw N?new b(N):v}let m=f.data;if(m.context&&m.context.kind==="ArcgisErrorAsContext"&&m.context.error)throw new b({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(o.push(m),E=m.sequenceNumber,h++,!m.hasMore)break}if(h===g)throw new b({message:"Request timed out",code:"TIMEOUT",source:"polling"})}let ie=120*1e3;return await Promise.race([te(),new Promise((h,g)=>setTimeout(()=>g(new b({message:"Request timed out",code:"TIMEOUT",source:"hard-timeout"})),ie))]),o}function de(i,e,t){return{conversationId:i,inquiryId:t,ackSequenceNumber:e}}function pe(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 ue=i=>{let e=i.value.length,t=72,s=180,r=i.offsetWidth,n=Math.max(1,Math.floor(r/8)),l=Math.ceil(e/n),u=t+(l-2)*24;i.style.setProperty("--calcite-text-area-min-height",`${Math.min(u,s)}px`)};function me({messages:i}){return c`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta??"Beta"}>${i.beta??"Beta"}</calcite-chip>`}function he({popoverContent:i}){return c`<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 Z({errorMessage:i,slot:e}){return c`<div class="error-display"><calcite-input-message id=error-message status=invalid icon=exclamation-mark-triangle scale=m slot=${e??A}>${i}</calcite-input-message></div>`}function ge({active:i,setActive:e,messages:t}){return c`<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 be({context:i,messages:e}){return i?c`<div class="gaps">${i.profileName&&c`<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&&c`<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 fe({isDisabled:i,isReadOnly:e,setQuestion:t,setIsViewingResult:s,textAreaRef:r,question:n,errorMessage:l,setErrorMessage:u,submitQuestion:o,messages:a,mode:d,context:p}){return c`<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=${n} @calciteTextAreaInput=${k=>{ue(k.target),t(k.target.value)}} ${O(r)}><div class="submission-actions-wrapper" slot=footer-start>${l&&Z({errorMessage:l,slot:"footer-start"})||""}<div class="submission-actions">${be({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(n?"":a.enteraprompt??"Please enter a prompt"),await o()}}>${d==="prompt"?a.ask??"Generate":a.refine??"Refine"}</calcite-button></div></div></div></calcite-text-area></div>`}var ve="https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement",ye="https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";function $e({setOpen:i,messages:e,feedback:t,setFeedback:s,onSubmit:r}){return t.active?c`<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=${n=>s({...t,text:n.target.value})} .disabled=${t.submitting}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${n=>{s({...t,termsAccepted:n.target.checked})}} .disabled=${t.submitting}></calcite-checkbox><span>${$((e.agreement??"I agree to the {EsriPrivacyStatement} (and {Supplement}).").replace("{EsriPrivacyStatement}",`<calcite-link href=${ve} target="_blank">${e.esriprivacystatement??"Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}",`<calcite-link href=${ye} target="_blank">${e.supplement??"Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${r} .disabled=${!t.termsAccepted||t.submitting} .loading=${t.submitting}>${e.submitfeedback??"Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>`:null}function J({assistantsEnabled:i,messages:e,slot:t,assistantHelpUrl:s,helpTopicUrl:r}){return c`<calcite-block .label=${e.assistantinformation??"Assistant information"} slot=${t??A} 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?c`<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>${$((e.seedocumentation??"Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}",`<calcite-link href=${r} target="_blank">${e.documentation??"documentation"}</calcite-link>`))}</p>`:c`<p>${$(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 ke({messages:i,onProceed:e,onExit:t,helpTopicUrl:s}){return c`<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>${$((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 xe({messages:i,suggestions:e,onSuggestionClick:t}){return c`<calcite-block .heading=${i.promptsuggestions} expanded collapsible id=suggestion-block><calcite-chip-group class="suggestions" .label=${i.promptsuggestions??"Prompt Suggestions"}>${S(e,s=>s,s=>c`<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 W=200;function Y({hidden:i=!1,expanded:e=!1,messages:t,cards:s,heading:r,collapsible:n=!1,showEffectsIcon:l=!1,onCopyCode:u,standalone:o}){return c`<calcite-block .hidden=${i} id=result-block .heading=${r??t.besteffort??"Here is the assistant's best effort"} .expanded=${e} .collapsible=${n}>${l&&c`<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"}>${S(s,a=>a.conversationId,a=>c`<calcite-card><div slot=heading><div class="prior-prompt"><span>${a.priorPrompt.length>W?`${a.priorPrompt.slice(0,W)}...`:a.priorPrompt}</span><calcite-action icon=duplicate scale=s slot=actions-end class="copy-prompt-button" text .id=${`copy-prompt-${a.conversationId}-${o?"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}-${o?"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}-${o?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copyprompttoclipboard??"Copy prompt to clipboard"}</calcite-tooltip></div>${a.message&&o&&c`<div class="response-error-container">${Z({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&&!o&&c`<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=P();return c`${d.tooltip&&c`<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}-${o?"standalone":"list"}`}></calcite-button><calcite-tooltip class="hidden-above-380" .referenceElement=${`add-to-editor-button-${a.conversationId}-${o?"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}-${o?"standalone":"list"}`}></calcite-button><calcite-tooltip .referenceElement=${`replace-${a.conversationId}-${o?"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}-${o?"standalone":"list"}`}></calcite-button><calcite-popover .referenceElement=${`copy-response-${a.conversationId}-${o?"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}-${o?"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}-${o?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-up-${a.conversationId}-${o?"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}-${o?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-down-${a.conversationId}-${o?"standalone":"list"}`} placement=top-start><span>${t.unhelpful??"Unhelpful"}</span></calcite-tooltip></div></calcite-card>`)}</calcite-card-group></calcite-block>`}var we="arcade_generation",Ae="ArcadeCodeRequest",T="visualization",Ce="ArcadeAssistant",Se=["your_comments","user_evaluation","question","answer","useragent","_source","version","context","extras"],K=[],X=!0,I=class extends V{constructor(){super(...arguments),this.textAreaRef=z(),this.messages=D(),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,r=ce.applicationName;!r&&!this.appVersion&&console.warn("Arcade Assistant: esriConfig.applicationName is not set. Consider setting it to help identify the application version in feedback.");let n={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:Ce,version:this.appVersion||r||"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 re({attributes:n})]})}catch(l){console.error("Error submitting feedback:",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=ne}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=>{console.error("Error setting initial context in Arcade Assistant:",t)}),this.manager.onLifecycle(()=>({remove:C.onModelContextDidChange(async()=>{e().catch(t=>{console.error("Error setting context in Arcade Assistant:",t)})}).dispose}))}willUpdate(e){(e.has("history")||e.has("messages"))&&(this.historyCards=this.getHistoryCards())}connectedCallback(){super.connectedCallback(),this.history=K,this.splashActive=X}disconnectedCallback(){super.disconnectedCallback(),K=this.history,X=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??T,icon:"map-information",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:(this.messages.profilecontextlabel??"Profile context: {profileName}").replace("{profileName}",t.profile??T)},...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=>{L(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 oe({url:this.feedbackServiceUrl});await e.load();let t=Se.filter(s=>!e.fields.some(r=>r.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:r,layerName:n}=await this.getProfileAndMetadata(t.uri),l=(await le({baseUrl:this.serviceUrl,skillId:we,message:this.question,authToken:e,context:{kind:Ae,context:{profile_name:s,metadata:r}}})).find(u=>u.context?.kind==="ArcadeCodeResponse");if(!l)return;l.context?.kind==="ArcadeCodeResponse"&&(this.history=[{script:l?.context?.arcadeCode?.code,formattedScript:B(l?.context?.arcadeCode?.code??""),error:void 0,question:this.question,profile:s,conversationId:l.conversationId,layerName:n??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=pe(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 ae.getCredential(this.portalUrl);return e}async getProfileAndMetadata(e){let t=T,s=C.getEditorProfileForModel(e);s?.loaded||await s?.loadSource();let r=this.editorRef.profile;r&&"id"in r&&(t=r.id);let n=s?.definition?.variables?.find(o=>o.type==="feature"),l=[],u;return n?.definition&&"fields"in n.definition&&(l=n.definition.fields.map(o=>({name:o.name,type:o.type,alias:o.alias})),j(n?.definition)&&(u=n.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?c`<calcite-flow><calcite-flow-item closable heading-level=2 .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.splashActive&&c`<calcite-scrim></calcite-scrim>`||""}${me({messages:this.messages})}${he({popoverContent:J({assistantsEnabled:this.assistantsEnabled,messages:this.messages,assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.usingTheAssitantDocUrl})})}<calcite-shell class="unstyled-shell">${this.splashActive&&ke({messages:this.messages,onProceed:()=>{this.splashActive=!1},helpTopicUrl:this.assistantOverviewDocUrl,onExit:e=>this.closePanel&&this.closePanel(e)})||""}${ge({active:this.confirmationActive,setActive:e=>this.confirmationActive=e,messages:this.messages})}${fe({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&&xe({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>${Y({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})}${Y({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?$e({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>`:c`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable heading-level=2 .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${J({slot:"content-top",messages:this.messages,assistantsEnabled:this.assistantsEnabled,assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.usingTheAssitantDocUrl})}</calcite-flow-item></calcite-flow>`}};H("arcgis-arcade-coding-assistant",I);return I},"identity/IdentityManager","request","layers/FeatureLayer","config","Graphic",a,b)
|
|
@@ -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.
|
|
4
|
-
import{a as A,b as Rt}from"./
|
|
3
|
+
v5.0.0-next.78 */
|
|
4
|
+
import{a as A,b as Rt}from"./SNH5DVYV.js";var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),Mt=new WeakMap,k=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==yt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Mt.set(e,t))}return t}toString(){return this.cssText}},It=o=>new k(typeof o=="string"?o:o+"",void 0,yt),me=(o,...t)=>{let e=o.length===1?o[0]:t.reduce(((s,r,i)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[i+1]),o[0]);return new k(e,o,yt)},kt=(o,t)=>{if(Z)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),r=Y.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,o.appendChild(s)}},gt=Z?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return It(e)})(o):o;var{is:ye,defineProperty:ge,getOwnPropertyDescriptor:ve,getOwnPropertyNames:Ee,getOwnPropertySymbols:$e,getPrototypeOf:be}=Object,tt=globalThis,jt=tt.trustedTypes,_e=jt?jt.emptyScript:"",Ae=tt.reactiveElementPolyfillSupport,j=(o,t)=>o,X={toAttribute(o,t){switch(t){case Boolean:o=o?_e:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},H=(o,t)=>!ye(o,t),Ht={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var b=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ht){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&ge(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:i}=ve(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:r,set(n){let a=r?.call(this);i?.call(this,n),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ht}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;let t=be(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){let e=this.properties,s=[...Ee(e),...$e(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(gt(r))}else t!==void 0&&e.push(gt(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return kt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:X).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=s.getPropertyOptions(r),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:X;this._$Em=r,this[r]=n.fromAttribute(e,i.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let r=this.constructor,i=this[t];if(s??=r.getPropertyOptions(t),!((s.hasChanged??H)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:i},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,i]of s){let{wrapped:n}=i,a=this[r];n!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,i,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[j("elementProperties")]=new Map,b[j("finalized")]=new Map,Ae?.({ReactiveElement:b}),(tt.reactiveElementVersions??=[]).push("2.1.0");var Et=globalThis,et=Et.trustedTypes,Vt=et?et.createPolicy("lit-html",{createHTML:o=>o}):void 0,$t="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,bt="?"+_,Ce=`<${bt}>`,S=document,z=()=>S.createComment(""),B=o=>o===null||typeof o!="object"&&typeof o!="function",_t=Array.isArray,Gt=o=>_t(o)||typeof o?.[Symbol.iterator]=="function",vt=`[
|
|
5
5
|
\f\r]`,V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zt=/-->/g,Bt=/>/g,w=RegExp(`>|${vt}(?:([^\\s"'>=/]+)(${vt}*=${vt}*(?:[^
|
|
6
6
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),Wt=/'/g,Ft=/"/g,Kt=/^(?:script|style|textarea|title)$/i,At=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),ns=At(1),as=At(2),cs=At(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),qt=new WeakMap,O=S.createTreeWalker(S,129);function Qt(o,t){if(!_t(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vt!==void 0?Vt.createHTML(t):t}var Jt=(o,t)=>{let e=o.length-1,s=[],r,i=t===2?"<svg>":t===3?"<math>":"",n=V;for(let a=0;a<e;a++){let c=o[a],l,u,h=-1,y=0;for(;y<c.length&&(n.lastIndex=y,u=n.exec(c),u!==null);)y=n.lastIndex,n===V?u[1]==="!--"?n=zt:u[1]!==void 0?n=Bt:u[2]!==void 0?(Kt.test(u[2])&&(r=RegExp("</"+u[2],"g")),n=w):u[3]!==void 0&&(n=w):n===w?u[0]===">"?(n=r??V,h=-1):u[1]===void 0?h=-2:(h=n.lastIndex-u[2].length,l=u[1],n=u[3]===void 0?w:u[3]==='"'?Ft:Wt):n===Ft||n===Wt?n=w:n===zt||n===Bt?n=V:(n=w,r=void 0);let g=n===w&&o[a+1].startsWith("/>")?" ":"";i+=n===V?c+Ce:h>=0?(s.push(l),c.slice(0,h)+$t+c.slice(h)+_+g):c+_+(h===-2?a:g)}return[Qt(o,i+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},W=class o{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,n=0,a=t.length-1,c=this.parts,[l,u]=Jt(t,e);if(this.el=o.createElement(l,s),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=O.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith($t)){let y=u[n++],g=r.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(y);c.push({type:1,index:i,name:C[2],strings:g,ctor:C[1]==="."?ot:C[1]==="?"?rt:C[1]==="@"?it:P}),r.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:i}),r.removeAttribute(h));if(Kt.test(r.tagName)){let h=r.textContent.split(_),y=h.length-1;if(y>0){r.textContent=et?et.emptyScript:"";for(let g=0;g<y;g++)r.append(h[g],z()),O.nextNode(),c.push({type:2,index:++i});r.append(h[y],z())}}}else if(r.nodeType===8)if(r.data===bt)c.push({type:2,index:i});else{let h=-1;for(;(h=r.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:i}),h+=_.length-1}i++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function T(o,t,e=o,s){if(t===f)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,i=B(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(o),r._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=T(o,r._$AS(o,t.values),r,s)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??S).importNode(e,!0);O.currentNode=r;let i=O.nextNode(),n=0,a=0,c=s[0];for(;c!==void 0;){if(n===c.index){let l;c.type===2?l=new U(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new nt(i,this,t)),this._$AV.push(l),c=s[++a]}n!==c?.index&&(i=O.nextNode(),n++)}return O.currentNode=S,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},U=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=T(this,t,e),B(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Gt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=W.createElement(Qt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new st(r,this),n=i.u(this.options);i.p(e),this.T(n),this._$AH=i}}_$AC(t){let e=qt.get(t.strings);return e===void 0&&qt.set(t.strings,e=new W(t)),e}k(t){_t(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let i of t)r===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[r],s._$AI(i),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){let i=this.strings,n=!1;if(i===void 0)t=T(this,t,e,0),n=!B(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{let a=t,c,l;for(t=i[0],c=0;c<i.length-1;c++)l=T(this,a[s+c],e,c),l===f&&(l=this._$AH[c]),n||=!B(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}n&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends P{constructor(t,e,s,r,i){super(t,e,s,r,i),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??d)===f)return;let s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},nt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}},Yt={M:$t,P:_,A:bt,C:1,L:Jt,R:st,D:Gt,V:T,I:U,H:P,N:rt,U:it,B:ot,F:nt},we=Et.litHtmlPolyfillSupport;we?.(W,U),(Et.litHtmlVersions??=[]).push("3.3.0");var Ct=(o,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let i=e?.renderBefore??null;s._$litPart$=r=new U(t.insertBefore(z(),i),i,void 0,e??{})}return r._$AI(o),r};var wt=globalThis,$=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ct(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};$._$litElement$=!0,$.finalized=!0,wt.litElementHydrateSupport?.({LitElement:$});var Oe=wt.litElementPolyfillSupport;Oe?.({LitElement:$});(wt.litElementVersions??=[]).push("4.2.0");var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},F=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var G=Symbol.for("controller"),Se=o=>typeof o=="object"&&o!==null&&(G in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),_s=o=>typeof o?.then=="function";var q,x=o=>{q!==o&&(q=o,queueMicrotask(()=>q===o?q=void 0:0))},K=o=>q,N=[],Zt=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},Xt=()=>N,R,As=o=>{R!==o&&(R=o,queueMicrotask(()=>R===o?R=void 0:0))},Te=()=>{let o=R;return R=void 0,o},te=async(o,t)=>{let e=ct(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(r=>t(r,s))}return e.exports},ee=async o=>{let t=ct(o);return await t.ready,t},ct=o=>{let e=K().manager.X(o);if(e!==void 0)return e;if(Se(o))return o;let s=Te();if(s!==void 0)return s},at=!1,Cs=o=>{at=!0;try{return o()}finally{at=!1}};var Pe=(o,t,e)=>{let s=Object.keys(o),r=s.length;M===void 0&&queueMicrotask(I),M??=new Map;let i=M.get(o);return i===void 0&&(i={callbacks:[],keyCount:r},M.set(o,i)),i.keyCount!==r&&(i.callbacks.forEach(n=>n(s)),i.callbacks=[],i.keyCount=r),i.callbacks.push(n=>{let a=l=>p(t,null,l),c=n[r];c===void 0?a(void 0):o[c]===e?a(c):a(void 0)}),e},M,I=()=>{M?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),M=void 0},Ne=(o,t,e)=>{let s=o.manager;return s.V!==d&&s.V!==e&&s.S(void 0,void 0),s.T.length===0&&queueMicrotask(()=>s.S(void 0,void 0)),s.V=e,s.T.push((r,i)=>p(t,void 0,e===i?r:void 0)),e},xe=(o=[K(),...Xt()],t,e)=>{let s=Array.isArray(o)?o:[o],r=s.length+1,i=n=>{r-=1,n!==void 0&&(r=Math.min(r,0)),r===0&&t(n)};s.forEach(n=>Pe(n,a=>i(a===void 0?void 0:{key:a,host:n,isReactive:!1}),e));for(let n of s)if("manager"in n&&n.manager.component===n){Ne(n,a=>i(a===void 0?void 0:{key:a,host:n,isReactive:!0}),e);break}return e},De=(o="",t={},e=K())=>{let s={emit:r=>{o===""&&I();let i=new CustomEvent(o,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(i),i}};return o===""&&xe(void 0,r=>o=r.key,s),s},Le=De.bind(null,""),re;re=G;var Ot=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#o=[],this.#r=[],this.#c=[],this.#l=[],this.#p=[],this.#h=[],this.#d=!1,this.P=new A,this.connectedCalled=!1,this.loadedCalled=!1,this[re]=!0,this.#a=[];let e=this,s=t??K(new.target.name);e.#i=s,e.ready=e.P.promise,e.#n=oe(e),e.component=s,e.#i.addController(e),e.#i.manager===void 0||(Zt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#o;#r;#c;#l;#p;#h;#d;#i;catchUpLifecycle(){let{manager:t}=this.#i;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#d&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(console.error)}#n;get exports(){return this.#n}set exports(t){let e=this.#n;e!==t&&(this.#n=t,this.#a.forEach(p),this.connectedCalled&&this.O!==!1&&this.#i.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#n=e?oe(t):t,this.#a.forEach(p)}#a;watchExports(t){let e=()=>t(this.#n);return this.#a.push(e),()=>void this.#a.splice(this.#a.indexOf(e),1)}get use(){return x(this.#i),te}get useRef(){return x(this.#i),ee}get useRefSync(){return x(this.#i),ct}controllerRemoved(){this.#i.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#o.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#p.push(t),this.connectedCalled&&this.#i.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#h.forEach(p),t.#h=[]}async triggerLoad(){if(this.#d)return;this.#d=!0;let t=this;t.hostLoad&&await F(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(F)),this.P.resolve(this.#n)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#o.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(se,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(se,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#p.forEach(this.#u,this)}#u(t){x(this.#i);let e=p(t);(Array.isArray(e)?e:[e]).forEach(r=>{typeof r=="function"?this.#h.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#h.push(r.remove)})}};function se(o){p(o,void 0,this)}var ie=Ot,oe=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,r,i){if(!((r==="exports"||r==="_exports")&&r in s&&s[r]===e)&&(r in s||r in Promise.prototype||typeof r=="symbol"))return typeof s=="function"?s[r]:Reflect.get(s,r,i)}},e=new Proxy(o,t);return e};var lt=o=>o.replace(Ue,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Ue=/[A-Z]+(?![a-z])|[A-Z]/gu;var ne=(o,t)=>new Array(t+1).join(o),Ds=o=>{let t='"',e="'";o.includes(t)&&!o.includes(e)&&(e='"',t="'");let r=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${e})+)`,"gu");o=o.replace(r,(n,a,c,l)=>a+c+ne(e,l.length/2));let i=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return o=o.replace(i,(n,a,c,l)=>a+c+ne(`\\${t}`,l.length)),t+o+t},Ls=o=>{let t=o?o.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")},Us=o=>`\u200E${o??""}\u200E`,Re="randomUUID"in crypto,Rs=()=>{if(Re)return crypto.randomUUID();let o=crypto.getRandomValues(new Uint16Array(8));o[3]=o[3]&4095|16384,o[4]=o[4]&16383|32768;let t=e=>o[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Ms=(o,t={})=>(o??"").replace(/\{(?<valueName>.*?)\}/gu,(e,s)=>t[s]??e);var Tt=o=>{let t=o;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(o),(e.I??e._postLoad).promise}return!1},Pt={};function Nt(){}var Me=(o,t)=>function(s,r){if(!globalThis.customElements)return;let n=(r??s??{}).resourcesUrl;n&&o.setAssetPath(n);for(let[a,[c,l=""]]of Object.entries(t)){if(customElements.get(a))continue;let[u,h,y]=l.split(";"),g=u?u?.split(",").map(Ie):void 0,C=g?.map(([L])=>L),D=class extends St{static{this.observedAttributes=g?.map(([,L])=>L).filter(L=>L!=="")}static{this.C=C}static{this.E=h?h?.split(","):void 0}static{this.D=y?.split(",")}static{this.L=a}static{this.K=o}constructor(){!D.B&&(D.B=c(),D.F()),super()}};customElements.define(a,D)}},ht=Object.defineProperty,Ie=o=>{let t=o.split(":");return t.length===1?[t[0],lt(t[0])]:t},ke=globalThis.HTMLElement??Nt,St=class extends ke{constructor(){super(),this.#e={},this.#s=[],this.I=new A,this.H=new A,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(s=>{Object.hasOwn(t,s)&&(t.#e[s]=t[s],delete t[s])}),e.A?t.#o({a:e.A}):e.B.then(async s=>{await e.K.p,t.#o(await(s.default?.then(r=>typeof r=="function"?{a:r}:r)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ht(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ht(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ht(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,s){this.#t?.attributeChangedCallback(t,e,s),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Tt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#o(t){let e=this.constructor,s=e.L,r=this.#e,i=Object.values(t).find(h=>h.L===s),n=`${s}--lazy`,a=i;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);He(a),!e.A&&(e.A=i,customElements.define(n,i)),i.N=this;let l=document.createElement(n);i.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(r).forEach(je,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function je([o,t]){this[o]=t}var He=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,i){e.setAttribute.call(this.el,r,i)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},ht(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var{I:Ve}=Yt;var dt=o=>o.strings===void 0,ce=()=>document.createComment(""),Fs=(o,t,e)=>{let s=o._$AA.parentNode,r=t===void 0?o._$AB:t._$AA;if(e===void 0){let i=s.insertBefore(ce(),r),n=s.insertBefore(ce(),r);e=new Ve(i,n,o,o.options)}else{let i=e._$AB.nextSibling,n=e._$AM,a=n!==o;if(a){let c;e._$AQ?.(o),e._$AM=o,e._$AP!==void 0&&(c=o._$AU)!==n._$AU&&e._$AP(c)}if(i!==r||a){let c=e._$AA;for(;c!==i;){let l=c.nextSibling;s.insertBefore(c,r),c=l}}}return e},qs=(o,t,e=o)=>(o._$AI(t,e),o),ze={},le=(o,t=ze)=>o._$AH=t,Gs=o=>o._$AH,Ks=o=>{o._$AP?.(!1,!0);let t=o._$AA,e=o._$AB.nextSibling;for(;t!==e;){let s=t.nextSibling;t.remove(),t=s}};var m={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},E=o=>(...t)=>({_$litDirective$:o,values:t}),v=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Q=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),Q(s,t);return!0},pt=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},he=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),Fe(t)}};function Be(o){this._$AN!==void 0?(pt(this),this._$AM=o,he(this)):this._$AM=o}function We(o,t=!1,e=0){let s=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(s))for(let i=e;i<s.length;i++)Q(s[i],!1),pt(s[i]);else s!=null&&(Q(s,!1),pt(s));else Q(this,o)}var Fe=o=>{o.type==m.CHILD&&(o._$AP??=We,o._$AQ??=Be)},ut=class extends v{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),he(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(Q(this,t),pt(this))}setValue(t){if(dt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var ro=()=>new Dt,Dt=class{},xt=new WeakMap,Lt=E(class extends ut{render(o){return d}update(o,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=o.options?.host,this.rt(this.ct=o.element)),d}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=xt.get(t);e===void 0&&(e=new WeakMap,xt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?xt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ft=class extends ie{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=mt in t&&typeof t.destroy=="function",$.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${mt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),x(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>void this.#e.destroy();this.#t=Rt(t,Ge)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(r=>r(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},Ge=1e3,mt="autoDestroyDisabled";var de=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter((t=>o[t])).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let r=!!t[s];r===this.st.has(s)||this.nt?.has(s)||(r?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var pe="important",Ke=" !"+pe,Qe=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce(((t,e)=>{let s=o[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let r=t[s];if(r!=null){this.ft.add(s);let i=typeof r=="string"&&r.endsWith(Ke);s.includes("-")||i?e.setProperty(s,i?r.slice(0,-11):r,i?pe:""):e[s]=r}}return f}});var Je=E(class extends v{constructor(o){if(super(o),o.type!==m.PROPERTY&&o.type!==m.ATTRIBUTE&&o.type!==m.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!dt(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===f||t===d)return t;let e=o.element,s=o.name;if(o.type===m.PROPERTY){if(t===e[s])return f}else if(o.type===m.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===m.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return le(o),t}});var ue=class o extends ${constructor(){super(),this.M=[],this.manager=new ft(this);let t=this,e=t.constructor,s=e.N,r=e.K.o,i=o.prototype.shouldUpdate;t.#o=s?.H??new A,t.I=s?.I??new A,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=Nt,t.shouldUpdate!==i&&(t.#e=t.shouldUpdate,t.shouldUpdate=i),r&&(t.#t=new Map,e.elementProperties.forEach((n,a)=>t.#t.set(a,r()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Pt;return this.K?.commonStyles===void 0||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){let s=typeof e=="number"?e:Array.isArray(e)?e[0]:0,r=Array.isArray(e)?e[1]:void 0,i=r?.hasChanged??H,n={attribute:s&1&&typeof t=="string"?lt(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),c:!1,...r,hasChanged(a,c){let l=i(a,c);return n.c=l,l}};super.createProperty(t,n)}static getPropertyDescriptor(t,e,s){let r=this.K,i=super.getPropertyDescriptor(t,e,s);return s.d=i,{...i,get(){return r.t?.(this.#t.get(t)),i.get?.call(this)},set(n){let a=this.manager;if(s.readOnly&&!at&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${n}"`);i.set.call(this,n??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,n))}}}static{this.lumina=!0}#t;#e;#s;#o;#r;connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=t;let e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#l().catch(s=>{this.#o.reject(s),setTimeout(()=>{throw s})})):t&&this.requestUpdate()}#c(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,i=t??(s===Pt?this.el:this.el.attachShadow(s));if(this.isConnected){let n=i.getRootNode();n.adoptedStyleSheets=[...n.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return i}async#l(){let t=this.el.G??Tt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(F(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(mt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();let s=this.J.filter(r=>!r.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#o.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#c(t):super.update(t)}listen(t,e,s){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,s),()=>this.el.removeEventListener(t,r,s)))}listenOn(t,e,s,r){let i=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,i,r),()=>t.removeEventListener(e,i,r)))}async componentOnReady(){return await this.#o.promise,this}addController(t){this.M.push(t),!(G in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var fe=o=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},s={...o,getAssetPath(r){let i=new URL(r,t);return i.origin!==globalThis.location?.origin?i.href:i.pathname},setAssetPath:e,customElement(r,i){i.K=s,i.L=r,customElements.get(r)||customElements.define(r,i)}};return e(o.defaultAssetPath),s};var Er=o=>typeof o=="object"&&o!=null?de(o):o;var Ut=class extends v{#t;#e;constructor(t){super(t);let e=this;this.#e=function(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Lt(this.#e)):Lt(t)}},$r=E(Ut);var br=d;var J=fe({defaultAssetPath:"https://jsdev.arcgis.com/next/coding-components/",hydratedAttribute:"hydrated"}),{customElement:Or,getAssetPath:Sr,setAssetPath:Tr}=J;J.t=void 0;J.o=void 0;J.c=void 0;J.r=void 0;export{_s as a,x as b,Zt as c,Xt as d,As as e,Cs as f,It as g,me as h,H as i,ns as j,f as k,d as l,xe as m,Le as n,Ot as o,Ds as p,Ls as q,Us as r,Rs as s,Ms as t,Pt as u,Me as v,m as w,E as x,v as y,Fs as z,qs as A,le as B,Gs as C,Ks as D,ro as E,Lt as F,ue as G,Er as H,br as I,J,Or as K,Sr as 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.
|
|
4
|
-
import{a as f}from"./
|
|
3
|
+
v5.0.0-next.78 */
|
|
4
|
+
import{a as f}from"./53VOPU7G.js";import{a as _}from"./LWPMQOYB.js";import"./SA7T4D5Z.js";import e from"./7QMV2R4Z.js";import"./VGLYMLQK.js";import b from"./LC3QFA5E.js";import a from"./BICGKMP2.js";import"./Y7YWDBHH.js";import"./O2ZYQINS.js";import"./WVLQQZ6X.js";import"./LMXR7MKD.js";import"./YIM2W55S.js";import"./232PKRVX.js";import"./FRN5LS22.js";import{E as l,F as p,G as h,H as o,K as g,h as n,j as t,n as s,s as c,u as d}from"./HMACSI6V.js";import"./SNH5DVYV.js";import"./GIL5UHAX.js";import"./D3T4DZFO.js";export default $arcgis.t(([,a,{b:u}])=>{var m=n`@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%}}`,r=class extends h{constructor(){super(...arguments),this._codeEditorElt=l(),this._disposables=[],this.messages=_(),this._modelId=c(),this._preparing=!1,this.sideActionBarExpanded=!1,this.script="",this.hideSideBar=!1,this.arcgisDiagnosticsChange=s({bubbles:!1}),this.arcgisScriptChange=s({bubbles:!1})}static{this.properties={_activeAction:16,_apiLibrary:16,_editorProfile:16,_preparing:16,sideActionBarExpanded:16,profile:0,script:1,hideSideBar:5}}static{this.shadowRootOptions=d}static{this.styles=[m,f]}async setFocus(){await this._codeEditorElt.value?.setFocus()}async load(){await this._updateEditorProfile().catch(console.error)}willUpdate(i){(i.has("messages")||i.has("profile"))&&this._updateDataModelDeps()}async loaded(){let i=await u();this._disposables.push(i.onDiagnosticsChange(e=>!this._preparing&&this.arcgisDiagnosticsChange.emit(e.diagnostics)))}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}async _updateEditorProfile(){this._preparing=!0;try{await a.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale}),this._editorProfile=a.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(i){if(this._activeAction===i){this._activeAction=void 0;return}this._activeAction=i}_handleActionClick(i){let e=i.target;this._setActiveAction(e.dataset.panelName)}_insertAsSnippet(i){this._codeEditorElt.value?.insertSnippet(i.detail).catch(console.error)}_insertAsText(i){this._codeEditorElt.value?.insertText(i.detail.replaceAll('"',"'")).catch(console.error)}async _updateApiLibrary(){this._apiLibrary=await a.getApiLibraryForModel(this._modelId)}_onCodeEditorValueChange(i){i.stopPropagation(),this.script=i.detail,this.arcgisScriptChange.emit(i.detail)}_getFeatureSetVariable(){let i,e=a.getEditorProfileForModel(this._modelId);return e?.variables?.length&&e?.variables?.[0]?.type!=="featureSet"?console.error("encountered unexpected editor profile"):i=e?.variables?.[0],i}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}render(){let i=this._getFeatureSetVariable();return t`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script??""} @arcgisValueChange=${this._onCodeEditorValueChange} ${p(this._codeEditorElt)}></arcgis-code-editor></div>${!this.hideSideBar&&t`<arcgis-editor-variables .variable=${i} .closed=${this._activeAction!=="fields"} class=${o(this._activeAction==="fields"&&"code-editor-side-panel flex-panel border-inline-start")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${()=>this._setActiveAction(void 0)} data-panel-name=none></arcgis-editor-variables>`||""}${!this.hideSideBar&&t`<arcgis-language-api-panel class=${o(this._activeAction==="functions"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${this._activeAction!=="functions"} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${()=>this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${a.languageId}></arcgis-language-api-panel>`||""}${!this.hideSideBar&&t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=fields-action .text=${this.messages.fields??"Fields"} icon=profile-variables .active=${this._activeAction==="fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields??"Fields"}</span></calcite-tooltip>`||""}<calcite-action id=functions-action .text=${this.messages.functions??"Functions"} icon=function .active=${this._activeAction==="functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions??"Functions"}</span></calcite-tooltip>`||""}</calcite-action-bar>`||""}</div>`}};g("arcgis-sql-expression-editor",r);return r},a,b,e)
|
|
@@ -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.
|
|
4
|
-
import{Tl as a}from"./
|
|
3
|
+
v5.0.0-next.78 */
|
|
4
|
+
import{Tl as a}from"./GIL5UHAX.js";import"./D3T4DZFO.js";var p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,s=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!c.call(t,r)&&r!==n&&p(t,r,{get:()=>e[r],enumerable:!(o=m(e,r))||o.enumerable});return t},u=(t,e,n)=>(s(t,e,"default"),n&&s(n,e,"default")),i={};u(i,a);var d=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],b={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${d.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:i.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${d.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:i.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},x={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{b as conf,x as language};
|