@arcgis/core 5.1.0-next.91 → 5.1.0-next.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/analysis/ShadowCast/DiscreteOptions.d.ts +12 -6
  2. package/analysis/ShadowCast/MinDurationOptions.d.ts +17 -9
  3. package/analysis/ShadowCast/TotalDurationOptions.d.ts +10 -6
  4. package/analysis/ShadowCastAnalysis.d.ts +23 -17
  5. package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{adfa5c136c72c1e65770.js → 12f41c1c66fb446b6286.js} +22 -16
  8. package/assets/esri/core/workers/chunks/1523883460874c352e36.js +1 -0
  9. package/assets/esri/core/workers/chunks/{5409369d0d637cb30257.js → 172228d1a392ca7a5b21.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{f2c11f54255fd506655e.js → 19a0cb2d335d97ad9488.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{577cbc131b21c351fae5.js → 2647c739cda29361a463.js} +2 -2
  12. package/assets/esri/core/workers/chunks/34f7450769826e8b7069.js +636 -0
  13. package/assets/esri/core/workers/chunks/{4b9b9e6136c11d5d7901.js → 412745bfacef23e3b702.js} +1 -1
  14. package/assets/esri/core/workers/chunks/4df19e670b6ed76c1dea.js +2 -0
  15. package/assets/esri/core/workers/chunks/{ceff78c9e31e3572a082.js → 5eff240a0e41a4f80e61.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{2dcfc4d7e76c922bcbf9.js → 6aed2e42e65ac80f1fab.js} +1 -1
  17. package/assets/esri/core/workers/chunks/77c2d8d0ce1c1ab469e9.js +1 -0
  18. package/assets/esri/core/workers/chunks/8a370cc1a99ddc7ce70b.js +1 -0
  19. package/assets/esri/core/workers/chunks/8a7a99533d02eb9cb058.js +2 -0
  20. package/assets/esri/core/workers/chunks/{90a8dfb03a437fe8a6e7.js → be47e42c6c8c0820efd8.js} +1 -1
  21. package/assets/esri/core/workers/chunks/c7ee05f46b26b17f9414.js +1 -0
  22. package/assets/esri/core/workers/chunks/{ee057c85cdf6beb5b012.js → d1ba118ddd0390c07f35.js} +2 -2
  23. package/assets/esri/core/workers/chunks/e6f1ed5e56f1d9862821.js +1 -0
  24. package/assets/esri/core/workers/chunks/{27f67a3828b78d4c1413.js → e81afc8a058a8ecc9b24.js} +1 -1
  25. package/assets/esri/core/workers/chunks/f49c7bb5d134bcb22155.js +1 -0
  26. package/assets/esri/core/workers/chunks/{aa6808146c76b2d49b64.js → f68c12e0c1eda7f73a17.js} +1 -1
  27. package/assets/esri/core/workers/chunks/f706bfea34d22539b46a.js +2 -0
  28. package/assets/esri/core/workers/chunks/{bb8d596f15fd3a0d783a.js → f8072a4cf1b25d8b93f9.js} +1 -1
  29. package/chunks/GlobalIllumination.glsl.js +24 -18
  30. package/chunks/GlowBlur.glsl.js +11 -11
  31. package/chunks/RibbonLine.glsl.js +91 -51
  32. package/chunks/ShadowCastVisualize.glsl.js +18 -15
  33. package/config.js +1 -1
  34. package/kernel.js +1 -1
  35. package/layers/graphics/sources/MemorySource.js +1 -1
  36. package/networks/support/UNTraceConfiguration.d.ts +19 -2
  37. package/networks/support/UNTraceConfiguration.js +1 -1
  38. package/networks/support/jsonTypes.d.ts +9 -1
  39. package/package.json +4 -4
  40. package/popup/Feature.d.ts +4 -4
  41. package/popup/Feature.js +1 -1
  42. package/rest/knowledgeGraph/GraphApplyEditsResult.d.ts +13 -1
  43. package/rest/knowledgeGraph/GraphApplyEditsResult.js +1 -1
  44. package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +9 -1
  45. package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +1 -1
  46. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
  47. package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
  48. package/rest/networks/support/NetworkElement.d.ts +13 -1
  49. package/rest/networks/support/NetworkElement.js +1 -1
  50. package/support/revision.js +1 -1
  51. package/views/2d/engine/webgl/shaderGraph/graph/GlslGraphWriter.js +1 -1
  52. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  53. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  54. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  55. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +6 -5
  56. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  57. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +1 -1
  58. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  59. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  60. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  61. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  62. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  63. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  64. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  65. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  66. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +1 -1
  67. package/assets/esri/core/workers/chunks/0840e7dd62643c56ae9e.js +0 -1
  68. package/assets/esri/core/workers/chunks/0cc4b3100a7a453bd058.js +0 -1
  69. package/assets/esri/core/workers/chunks/1e4e7111d43f01c149b3.js +0 -1
  70. package/assets/esri/core/workers/chunks/73af4c947e8151d411c1.js +0 -2
  71. package/assets/esri/core/workers/chunks/752f4e0e2961fc315dca.js +0 -1
  72. package/assets/esri/core/workers/chunks/a508104179e08f0f268c.js +0 -2
  73. package/assets/esri/core/workers/chunks/bb5f909a2f26fc6a21b0.js +0 -2
  74. package/assets/esri/core/workers/chunks/bea2fd831d7a864e5995.js +0 -596
  75. package/assets/esri/core/workers/chunks/c8ef80a7c46d7d2c5172.js +0 -1
  76. package/assets/esri/core/workers/chunks/f971dcfd04af1fd652b4.js +0 -1
  77. /package/assets/esri/core/workers/chunks/{577cbc131b21c351fae5.js.LICENSE.txt → 2647c739cda29361a463.js.LICENSE.txt} +0 -0
  78. /package/assets/esri/core/workers/chunks/{bb5f909a2f26fc6a21b0.js.LICENSE.txt → 4df19e670b6ed76c1dea.js.LICENSE.txt} +0 -0
  79. /package/assets/esri/core/workers/chunks/{a508104179e08f0f268c.js.LICENSE.txt → 8a7a99533d02eb9cb058.js.LICENSE.txt} +0 -0
  80. /package/assets/esri/core/workers/chunks/{73af4c947e8151d411c1.js.LICENSE.txt → d1ba118ddd0390c07f35.js.LICENSE.txt} +0 -0
  81. /package/assets/esri/core/workers/chunks/{ee057c85cdf6beb5b012.js.LICENSE.txt → f706bfea34d22539b46a.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[148],{61893(e,t,r){r.d(t,{Z:()=>d,g:()=>h});var s=r(5482),i=r(69622),n=r(36563),o=r(17676),a=r(64108);class l{constructor(){this._resolver=Promise.withResolvers(),this._status=0,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=1,this._cleanUp()},()=>{this._status=2,this._cleanUp()}),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return 1===this._status}isRejected(){return 2===this._status}isFulfilled(){return 0!==this._status}abort(){this._resolver.reject((0,o.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const e=Promise.withResolvers(),t=[...this._resolvingPromises,e.promise],r=this._allPromise=Promise.all(t);r.then(()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()},e=>{this.isFulfilled()||this._allPromise!==r||(0,o.zf)(e)||this._resolver.reject(e)}),e.resolve()}}const h=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this._promiseProps=new l,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return this._promiseProps.promise.then(()=>this).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}addResolvingTask(e){e&&!this._promiseProps.isFulfilled()&&(this.addHandles((0,n.rE)(e)),this._promiseProps.addResolvingPromise(e.promise))}};return r=(0,s.Cg)([(0,a.$)("esri.core.Promise")],r),r},d=h(i.A)},36708(e,t,r){r.d(t,{C_:()=>u,OH:()=>g,Vh:()=>m,on:()=>c,pc:()=>v,wB:()=>l,z7:()=>h});var s=r(37955),i=r(36563),n=r(97768),o=r(17676),a=r(14012);function l(e,t,r={}){return d(e,t,r,p)}function h(e,t,r={}){return d(e,t,r,f)}function d(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let a=null,h=null,d=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function u(e){o.once&&o.once&&(0,n.xt)(d),r(e)}const p=l(e,(e,r)=>{c(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return d=(0,i.hA)(()=>{p.remove(),c()}),d}function u(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,()=>{l(),n((0,o.NK)())}),d(e,e=>{l(),s(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(80559);const g={sync:!0},m={initial:!0},v={sync:!0,initial:!0}},16494(e,t,r){r.d(t,{Nd:()=>a,W5:()=>o});var s=r(17632);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),n=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],o=new s.I({whiteList:i,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(n.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new s.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>i,vD:()=>o,yS:()=>n});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},50148(e,t,r){r.r(t),r.d(t,{default:()=>ht});var s=r(70333),i=r(92602),n=r(11254),o=r(49186),a=r(65529),l=r(37955),h=r(4718),d=r(93637),c=r(17676),u=r(84952),p=r(5482),f=r(91429),g=r(64108);let m=class extends a.nJ{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){return s.id.refreshToken(this)}refreshServerTokens(){return s.id.refreshServerTokens(this)}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=s.id,r=this.server?t.findServerInfo(this.server):null,i=r?.owningSystemUrl,n=i?t.findServerInfo(i):null;!1===e||i&&"portal"!==this.scope&&(!n?.webTierAuth||t.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,h.oy)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,p.Cg)([(0,f.MZ)()],m.prototype,"creationTime",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"expires",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"isAdmin",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"oAuthState",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"resources",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"scope",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"ssl",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"token",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"tokenRefreshBuffer",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"userId",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"validity",void 0),m=(0,p.Cg)([(0,g.$)("esri.identity.Credential")],m);const v=m;var _=r(79783),w=r(92751);function y(e){return function(){const e=getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\W/g,"").toLowerCase();return"dark"===e||"light"===e?e:void 0}()??(0,w.eg)(e??document.body)}function S(e){return function(e){return`calcite-mode-${e}`}(y(e))}r(44208);var I=r(53966),A=r(97768),k=r(61893),U=r(36708),C=r(13069),b=r(62788),P=r(71429),x=r(16494);const T="http://www.w3.org/",R=`${T}2000/svg`,O=`${T}1999/xlink`;let N=[],M=(e,t)=>{let r={};return Object.keys(e).forEach(t=>{r[t]=e[t]}),t&&Object.keys(t).forEach(e=>{r[e]=t[e]}),r},D=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),j=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},E=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(D(e[s],t))return s;return-1},L=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let n=i.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if(D(t,i))throw new Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},$=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},q=[],Z=!1,F=e=>{(e.children||[]).forEach(F),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},V=()=>{Z=!1,q.forEach(F),q.length=0},B=e=>{q.push(e),Z||(Z=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(V,{timeout:16}):setTimeout(V,16))},z=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),B(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),B(e))},H=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),n=i.length;for(let o=0;o<n;o++){let n=i[o],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)X(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],n=a[s];n&&(j(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let i=typeof a;"function"===i?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===R?"href"===n?e.setAttributeNS(O,n,a):e.setAttribute(n,a):"string"===i&&"value"!==n?"innerHTML"===n?e[n]=x.W5.sanitize(a):W(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function W(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let J,G=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)K(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),H(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},K=(e,t,r,s)=>{let i,n=0,o=e.vnodeSelector,a=t.ownerDocument;if(""===o)i=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(i,r):t.appendChild(i);else{for(let l=0;l<=o.length;++l){let h=o.charAt(l);if(l===o.length||"."===h||"#"===h){let h=o.charAt(n-1),d=o.slice(n,l);"."===h?i.classList.add(d):"#"===h?i.id=d:("svg"===d&&(s=M(s,{namespace:R})),void 0!==s.namespace?i=e.domNode=a.createElementNS(s.namespace,d):(i=e.domNode=e.domNode||a.createElement(d),"input"===d&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(i,r):i.parentNode!==t&&t.appendChild(i)),n=l+1}}G(i,e,s)}},X=(e,t,r)=>{t&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,r)})},Y=(e,t,r,s,i)=>{if(r===s)return!1;s=s||N;let n,o=(r=r||N).length,a=s.length,l=0,h=0,d=!1;for(;h<a;){let a=l<o?r[l]:void 0,c=s[h];if(void 0!==a&&D(a,c))d=J(a,c,i)||d,l++;else{let a=E(r,c,l+1);if(a>=0){for(n=l;n<a;n++)z(r[n]),L(r,n,e,"removed");d=J(r[a],c,i)||d,l=a+1}else K(c,t,l<o?r[l].domNode:void 0,i),$(c),L(s,h,e,"added")}h++}if(o>l)for(n=l;n<o;n++)z(r[n]),L(r,n,e,"removed");return d};J=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=M(r,{namespace:R})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=Y(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let i=!1,n=Object.keys(r),o=n.length;for(let a=0;a<o;a++){let o=n[a],l=r[o],h=t[o];if("class"===o)h!==l&&(X(e,h,!1),X(e,l,!0));else if("classes"===o){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(i=!0,n?t.add(s):t.remove(s))}}else if("styles"===o){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],o=l[r];o!==h[r]&&(i=!0,o?(j(o),s.styleApplyer(e,r,o)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"!==o||W(e)){if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===R?"href"===o?e.setAttributeNS(O,o,l):e.setAttribute(o,l):"string"===t?"innerHTML"===o?e[o]=x.W5.sanitize(l):"role"===o&&""===l?e.removeAttribute(o):W(e)&&o in e?e[o]=l:e.setAttribute(o,l):e[o]!==l&&(e[o]=l),i=!0)}}else{let t=e[o];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[o]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}}return i})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let Q=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,J(s,r,t)},domNode:e.domNode});const ee={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let te,re=e=>M(ee,e),se=(e,t,r)=>(r=re(r),K(t,e,void 0,r),Q(t,r)),ie=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),Q(t,r)),ne=(e,t,r)=>(r=re(r),t.domNode=e,G(e,t,r),Q(t,r)),oe=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),e.parentNode.removeChild(e),Q(t,r));te=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const ae={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},le={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{t.startsWith("-")?e.style.setProperty(t,r):e.style[t]=r}},he=(e,t,r=!1)=>{let s=e;return t.forEach((e,i)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,t=>t.domNode===e):void 0;r&&!n&&i!==t.length-1||(s=n)}),s};var de=r(71320),ce=r(2741);let ue;ue="components/assets";var pe=r(36563);const fe=Symbol("widget"),ge=Symbol("widget-test-data"),me=[],ve={},_e=new Map;function we(e,t){let r=t.children;if(r?.length)for(let t=0;t<r.length;++t)r[t]=we(e,r[t]);else r=me;const s=t.vnodeSelector;if(Ae(s)){const i=t.properties||ve,n=i.key||s,o={key:n,afterCreate:ye,afterUpdate:Se,afterRemoved:Ie,parentWidget:e,widgetConstructor:s,widgetProperties:{...i,key:n,children:r}};return{vnodeSelector:s.vnodeSelector,properties:o,children:void 0,text:void 0,domNode:null}}return t}function ye(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:n}){const o=new i(n);o.container=e,_e.set(e,o),o.afterCreate?.(o,e),s.addHandles((0,pe.hA)(()=>Ie(e))),queueMicrotask(()=>{o[ge].projector?.renderNow()})}function Se(e,t,r,{widgetProperties:s}){const i=_e.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Ie(e){const t=_e.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),_e.delete(e))}function Ae(e){return"function"==typeof e&&e[fe]}const ke=new Set;new Map;const Ue=new Map;function Ce(){Ue.clear()}function be(e){Ue.delete(e)}var Pe=r(98291),xe=r(76030);function Te(e){return e.matches(":focus-within")||document.activeElement===e}(()=>{const e=new Map;new ResizeObserver(t=>{Ce();for(const r of t)e.get(r.target)?.(r)})})();var Re=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Oe=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Oe(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=Re(i)),t.push(i))}};const Ne=function(...e){const t=Pe.A.acquire();for(let r=0;r<e.length;r++){const s=e[r],i=typeof s;if("string"===i)t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if("object"===i)for(const e in s)s[e]&&t.push(e)}const r=t.join(" ");return Pe.A.release(t),r},Me=function(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}};function De(e,t,...r){return"function"!=typeof e||Ae(e)?function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var i=[];return Oe(r,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}var je,Ee;let Le=0;function $e(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?$e(e[s],t[s]):e[s]=t[s]);return e}const qe=(e=>{let t;const r={...ae,...e},s=(n=r,{...le,...n}),i=s.performanceLogger;var n;let o,a=!0,l=!1;const h=[],d=[],c=(e,n,o)=>{let a;s.eventHandlerInterceptor=(e,s,n,o)=>function(e){let s;i("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),o=n.some(e=>customElements.get(e?.tagName?.toLowerCase()));if(e.eventPhase!==Event.CAPTURING_PHASE&&o){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();s=he(a.getLastRender(),r,!0)}else n.reverse(),s=he(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),i("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=o();a=e(n,l,s),s.eventHandlerInterceptor=void 0,h.push(a),d.push(o),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(o=void 0,a){a=!1,i("renderStart",void 0);for(let e=0;e<h.length;e++){const t=d[e]();i("rendered",void 0);try{h[e].update(t)}catch(e){console.error(e)}i("patched",void 0)}i("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,d)),t={renderNow:u,scheduleRender:()=>{o||l||(o=requestAnimationFrame(u))},stop:()=>{o&&(cancelAnimationFrame(o),o=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{c(se,e,t)},insertBefore:(e,t)=>{c(ie,e,t)},merge:(e,t)=>{c(ne,e,t)},replace:(e,t)=>{c(oe,e,t)},detach:e=>{for(let t=0;t<d.length;t++)if(d[t]===e)return d.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,n)=>{const o=t?.(e,s,i,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>o?.call(i,e);i.addEventListener(t,r,a);const s=()=>i.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return o}},handleInterceptedEvent(e,t,r,s){const{eventPhase:i,type:n}=s,o=i===Event.CAPTURING_PHASE;let a=`on${n}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${o?"Capture":""}`,l&&a in l))&&(Ce(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let Ze=!1,Fe=class extends((0,k.g)(a.nJ)){static{this[je]=!0}constructor(e,t){super(e,t),this[Ee]=!0,this._attached=!1,this._projector=qe,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this.topLayerDisabled=!1,this._loadLocale=(0,c.sg)(async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,_.ud)(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=$e((0,h.o8)(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&I.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles((0,pe.hA)()),de.qu||(0,de.Qu)((0,u.s2)((0,ce.s)("components/assets")));const r="esri-widget-uid-"+(0,C.lk)(),s=this.render.bind(this);this._trackingTarget=new P.r(()=>{this.autoRenderingEnabled&&this.scheduleRender()});const i=()=>({vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),n=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??i(),t=e.properties??={};if(t.key??=r,Ae(e.vnodeSelector)){if(!this.visible)return i()}else this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="";let n=0;return e.children?.forEach(e=>{Ae(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${n++}`)}),we(this,e)};this.render=()=>{if(Ze)return n();let e=(t=this,Ue.get(t)??null);var t;if(e)return e;this._trackingTarget.clear(),Ze=!0;try{e=(0,b.a)(this._trackingTarget,n)}catch(t){throw I.A.getLogger(this).error(t),t}finally{Ze=!1}return e&&function(e,t){Ue.set(e,t)}(this,e),e};const o=this.beforeFirstRender();o?this._resourcesFetch=o.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),function(e){ke.add(e),e.finally(()=>ke.delete(e))}(this._resourcesFetch)}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(c.jH):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||((0,A.pR)(this._trackingTarget),(0,A.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this.render=()=>null,this._projector=null,be(this))}get container(){return this._get("container")}set container(e){this._get("container")||this._set("container",function(e){return"string"==typeof e?document.getElementById(e):e??null}(e))}get destroyed(){return super.destroyed}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+Le++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(je=fe,Ee=fe,ge)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw new Error("not implemented")}removeContainer(){this._set("container",null)}scheduleRender(){this.destroyed||(be(this),this._projector.scheduleRender())}classes(...e){return Ne.apply(this,e)}renderNow(){be(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,U.wB)(()=>this.viewModel,(e,t)=>{t&&this.removeHandles("delegated-events"),e&&(0,l.wb)(e)&&this.addHandles(this._delegatedEventNames.map(t=>(0,l.on)(e,t,e=>{this.emit(t,e)})),"delegated-events")},U.pc)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(c.jH),this.scheduleRender()};this.addHandles([(0,_.oQ)(e),(0,U.wB)(()=>this.uiStrings,e)]),this.addHandles((0,U.z7)(()=>this.container,e=>{this.destroyed||(e.closest("[arcgis-widget-wrapped]")||(this.topLayerDisabled=!0,this.announceDeprecation?.()),this._attach(e))},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"_readyForTrueRender",void 0),(0,p.Cg)([(0,f.MZ)({value:null})],Fe.prototype,"container",null),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"icon",null),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"id",null),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"label",null),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"renderable",null),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"uiStrings",void 0),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"viewModel",void 0),(0,p.Cg)([(0,f.MZ)({value:!0})],Fe.prototype,"visible",null),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"key",void 0),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"children",void 0),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"afterCreate",void 0),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"afterUpdate",void 0),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"afterRemoved",void 0),(0,p.Cg)([(0,f.MZ)()],Fe.prototype,"topLayerDisabled",void 0),Fe=(0,p.Cg)([(0,f.$K)("esri.widgets.Widget")],Fe);const Ve=Fe,Be="esri-identity-modal",ze={base:Be,info:`${Be}__info`,notice:`${Be}__notice`};let He=class extends Ve{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return function(e){const t=[];for(const r of Object.keys(e))customElements.get(`calcite-${r}`)||t.push(e[r]?.());return t.length>0?Promise.all(t):null}({button:()=>Promise.all([r.e(8023),r.e(8199),r.e(4691)]).then(r.bind(r,74691)),dialog:()=>Promise.all([r.e(8023),r.e(8199),r.e(1275)]).then(r.bind(r,51275)),input:()=>Promise.all([r.e(8023),r.e(8199),r.e(3049)]).then(r.bind(r,53049)),label:()=>Promise.all([r.e(8023),r.e(5030)]).then(r.bind(r,52649)),notice:()=>Promise.all([r.e(8023),r.e(8199),r.e(7789)]).then(r.bind(r,97789))})}get title(){return this.commonMessages?.auth.signIn}render(){const{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:i,server:n,resource:o,error:a}=this,{info:l,oAuthInfo:h,lblItem:d,invalidUser:c,noAuthService:u,lblUser:p,lblPwd:f,lblCancel:g,lblSigning:m,lblOk:v}=r;return De("div",{class:this.classes(ze.base,S(this.container))},De("form",{bind:this,onsubmit:this._submit},De("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",width:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},De("div",{class:ze.info},(0,_.V2)(i?h:l,{server:n&&/\.arcgis\.com/i.test(n)?"ArcGIS Online":n,resource:`(${o||d})`})),a?De("calcite-notice",{class:ze.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},De("div",{slot:"message"},a.details?.httpStatus?c:u)):null,i?null:[De("calcite-label",null,p,De("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),De("calcite-label",null,f,De("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],De("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"footer-end",type:"button"},g),De("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?m:v))))}_focusUsernameInput(){return async function(e,t){const r=(0,c.YL)(t,1e4),s=(0,c.Mq)(r);await(0,xe.$m)(s);const i=e();if(!i)return;const n=async()=>{"setFocus"in i&&"function"==typeof i.setFocus?await i.setFocus():i instanceof HTMLElement&&i.focus()};for(true;!Te(i)&&!(0,c.G4)(r);)await(0,xe.$m)(s),await n()}(()=>this._usernameInputNode)}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,p.Cg)([(0,f.MZ)({readOnly:!0})],He.prototype,"container",void 0),(0,p.Cg)([(0,f.MZ)(),Me("esri/t9n/common")],He.prototype,"commonMessages",void 0),(0,p.Cg)([(0,f.MZ)()],He.prototype,"error",void 0),(0,p.Cg)([(0,f.MZ)(),Me("esri/identity/t9n/identity")],He.prototype,"messages",void 0),(0,p.Cg)([(0,f.MZ)()],He.prototype,"oAuthPrompt",void 0),(0,p.Cg)([(0,f.MZ)()],He.prototype,"open",void 0),(0,p.Cg)([(0,f.MZ)()],He.prototype,"signingIn",void 0),(0,p.Cg)([(0,f.MZ)()],He.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({readOnly:!0})],He.prototype,"title",null),(0,p.Cg)([(0,f.MZ)()],He.prototype,"resource",void 0),He=(0,p.Cg)([(0,f.$K)("esri.identity.IdentityModal")],He);const We=He,Je="esriJSAPIOAuth";class Ge{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(Je,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken";(0,n.A)(e,{authMode:"anonymous",keepAlive:!0,method:"post",query:{f:"json",auth_token:this.refreshToken||this.token,client_id:t.appId,token_type_hint:this.refreshToken?"refresh_token":"access_token"}})}if(t?.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(Je,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(Je);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}Ge.prototype.declaredClass="esri.identity.OAuthCredential";var Ke,Xe=r(25482);let Ye=class extends Xe.o{static{Ke=this}constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return Ke.fromJSON(this.toJSON())}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"appId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"authNamespace",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"expiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"flowType",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"forceLogin",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"forceUserId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"locale",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"minTimeUntilExpiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"popup",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"popupCallbackUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"popupWindowFeatures",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"portalUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"preserveUrlHash",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"userId",void 0),Ye=Ke=(0,p.Cg)([(0,f.$K)("esri.identity.OAuthInfo")],Ye);const Qe=Ye;let et=class extends Xe.o{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"adminTokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"currentVersion",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"hasPortal",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"hasServer",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"owningSystemUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"owningTenant",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"shortLivedTokenValidity",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"tokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],et.prototype,"webTierAuth",void 0),et=(0,p.Cg)([(0,f.$K)("esri.identity.ServerInfo")],et);const tt=et;var rt=r(39131);const st={},it=e=>{const t=new u.s0(e.owningSystemUrl).host,r=new u.s0(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},nt=(e,t)=>!!(it(e)&&t&&t.some(t=>t.test(e.server)));let ot=null,at=null;try{ot=window.localStorage,at=window.sessionStorage}catch{}class lt extends a.a${constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,u.An)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer|3DTilesServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const t=this.serverInfos;t?(e=e.filter(e=>!this.findServerInfo(e.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)})}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new tt,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new v({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,h.oy)({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new tt(t))}),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach(t=>{t.appId&&e.push(t.declaredClass?t:new Qe(t))}),e.length&&this.registerOAuthInfos(e)}s&&s.forEach(e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new v(e)).emitTokenChange(),this.credentials.push(e))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s=!1,i=!0;t&&(s=!(!t.token&&!t.credential),r=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,a=Promise.withResolvers();if(t.signal&&(0,c.u7)(t.signal,()=>{n.abort()}),(0,c.u7)(n,()=>{a.reject(new o.A("identity-manager:user-aborted","ABORTED"))}),(0,c.G4)(n))return a.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=s?this.findCredential(e):null;let d;if(h&&498===r?.details?.httpStatus)h.destroy();else if(h)return d=new o.A("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:r}),a.reject(d),a.promise;const p=this._findCredential(e,t);if(p)return a.resolve(p),a.promise;let f=this.findServerInfo(e);if(f)!f.hasPortal&&f.server&&f.owningSystemUrl&&this._hasSameServerInstance(f.server,f.owningSystemUrl)&&(f.hasPortal=!0),!f.hasServer&&this._isServerRsrc(e)&&(f._restInfoPms=this._getTokenSvcUrl(e),f.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return d=new o.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(d),a.promise;f=new tt,f.server=this._getServerInstanceRoot(e),"string"==typeof t?(f.tokenServiceUrl=t,f.hasPortal=!0):(f._restInfoPms=t,f.hasServer=!0),this.registerServers([f])}return f.hasPortal&&void 0===f._selfReq&&(i||(0,u.FX)(f.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(e=>e.tokenServiceUrl===f.tokenServiceUrl))&&(f._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(f.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,f,t,a,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),i=new u.s0(this._appOrigin),a=e.shortLivedTokenValidity;let l,h,d,c,p,f,g,m;t&&(m=this.tokenValidity||a||this._defaultTokenValidity,m>a&&a>0&&(m=a)),r&&(l=r.isAdmin,h=r.serverUrl,d=r.token,f=r.signal,g=r.ssl,e.customParameters=r.customParameters),l?c=e.adminTokenServiceUrl:(c=e.tokenServiceUrl,p=new u.s0(c.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!g&&"http"===i.scheme&&((0,u.FX)(i.uri,c,!0)||"https"===p.scheme&&i.host===p.host&&"7080"===i.port&&"7443"===p.port)&&(c=c.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const v={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:d,expiration:m,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:f};return s||(v.withCredentials=!1),(0,n.A)(c,v).then(r=>{const s=r.data;if(!s?.token)return new o.A("identity-manager:authentication-failed","Unable to generate token");const i=e.server;return st[i]||(st[i]={}),t&&(st[i][t.username]=t.password),s.validity=m,s})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then(i=>{let a;const l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r?.force))a=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};a=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};a=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,n.A)(a,{query:l,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new o.A("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}}).catch(e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw i.destroy(),new o.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new o.A("identity-manager:invalid-request","Bad request");return{credential:i}})}).then(e=>({credential:e.credential,viewOnly:s}))}setOAuthResponseHash(e){e&&(e.startsWith("#")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=Promise.withResolvers(),i=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},n=()=>{i(),this._oAuthDfd=null,s.reject(new o.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,c.u7)(r.signal,()=>{n()});const a=new We({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=a,this.emit("dialog-create");let l=a.on("cancel",n),h=a.on("submit",e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then(n=>{i();const o=new v({userId:e.username,server:t.server??void 0,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(o)}).catch(e=>{a.error=e,a.signingIn=!1})});return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=Promise.withResolvers();const i=this._oAuthDfd;let n;s?.signal&&(0,c.u7)(s.signal,()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&d()}),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;const a=r._oAuthCred;if(a.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,u.$1)(e),a.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=(0,u.$1)(e),a.save()||(a.codeVerifier=n=null)}else a.codeVerifier=null;let l,h;this._getCodeChallenge(n).then(i=>{const n=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!n)return void this._doOAuthSignIn(e,t,r,i);const o=new We({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=o,this.emit("dialog-create"),l=o.on("cancel",d),h=o.on("submit",()=>{p(),this._doOAuthSignIn(e,t,r,i)})});const d=()=>{p(),this._oAuthDfd=null,i.reject(new o.A("identity-manager:user-aborted","ABORTED"))},p=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return i.promise}async refreshToken(e){const t=this.findServerInfo(e.server),r=t?.owningSystemUrl,s=!!r&&"server"===e.scope,i=s&&nt(t,this._legacyFed),n=t.webTierAuth,o=n&&this.normalizeWebTierAuth,a=st[e.server],l=a?.[e.userId];let h,d=e.resources&&e.resources[0],c=s?this.findServerInfo(r):null,u={username:e.userId,password:l};if(n&&!o)return;s&&!c&&this.serverInfos.some(e=>(this._isIdProvider(r,e.server)&&(c=e),!!c));const p=c?this.findCredential(c.server,e.userId):null;if(!s||p){if(!i){if(s)h={serverUrl:d,token:p?.token,ssl:p?.ssl};else if(o)u=null,h={ssl:e.ssl};else{if(!l){let r;return d&&(d=this._sanitizeUrl(d),e._enqueued=1,r=this._enqueue(d,t,null,null,e.isAdmin,e),r.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),r}e.isAdmin&&(h={isAdmin:!0})}return this.generateToken(s?c:t,s?null:u,h).then(t=>{e.token=t.token,e.expires=null!=t.expires?Number(t.expires):null,e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}p?.refreshToken()}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{const r=this.findServerInfo(t.server),s=r?.owningSystemUrl;t!==e&&t.userId===e.userId&&s&&"server"===t.scope&&(this._hasSameServerInstance(e.server,s)||this._isIdProvider(s,e.server))&&(nt(r,this._legacyFed)?(t.token=e.token,t.expires=e.expires,t.creationTime=e.creationTime,t.validity=e.validity,t.emitTokenChange()):t.refreshToken())})}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(e=>{e.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,l.on)(window,"message",t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then(e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)}).catch(e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));const t=(0,u.zf)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){t.startsWith("?")&&(t=t.slice(1));const e=(0,u.zf)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});const r=(0,u.x0)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,n.A)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then(e=>e.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return(0,u.$1)(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new o.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t?.token,l=t?.resource,h=this._isServerRsrc(e)?"server":"portal",d=this.credentials.filter(t=>this._hasSameServerInstance(t.server,e)&&t.scope===h);if(e=l||e,d.length)if(1===d.length){if(r=d[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(d.some(a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!(0,u.FX)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,u.FX)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new u.s0(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,rt.$E)(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=(0,rt.qG)(e),t=(0,rt.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){const t=(i.A.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.slice(r+t.length+1)),e=(0,u.S8)(e),(0,u.An)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new u.s0(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some(e=>e.regex.test(t.uri));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||i.A.portalUrl&&(s=(0,u.FX)(t,i.A.portalUrl,!0)),s||(s=this._portals.some(e=>this._hasSameServerInstance(e,t.uri))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)});let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&it(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,n.A)(e=s+"/rest/info",{query:{f:"json"}}).then(e=>e.data),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some(r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t)),t||this._portals.some(r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t)),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.slice(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new u.s0(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then(i=>{const n=new v({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?ot:at,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n})}const i=new v({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?ot:at,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new o.A(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(e=>{t.resolve(e)}).catch(e=>{t.reject(e)})}_setOAuthResponseQueryString(e){e&&(e.startsWith("?")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}async _exchangeToken(e,t,r){return(await(0,n.A)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}})).data.token}async _getPlatformSelf(e,t){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const r=await(0,n.A)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,r.data}catch(e){throw"OAUTH_0066"===e.details?.messageCode&&(this._getPlatformSelfError=[e,Date.now()]),e}}_getPortalSelf(e,t){let r;return this._gwDomains.some(t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r)),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,n.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,u.FX)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,u.zs)(n)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!i)&&r(new o.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),i}_enqueue(e,t,r,s,i,n){return s||(s=Promise.withResolvers()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach(e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),o.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,n,a,h)=>{const d=e.sinfo_,p=!e.options_||!1!==e.options_.prompt,f=d.hasPortal&&this._findOAuthInfo(e.resUrl_);let g,m;if(i)t(new v({userId:i,server:d.server??void 0,token:a??void 0,expires:null!=h?Number(h):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,l.on)(window,"message",e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new v(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(o.A.fromJSON(e.data.error))))});(0,c.u7)(e.options_?.signal,()=>{s.remove()})}else if(f){let i=f._oAuthCred;if(!i){const e=new Ge(f,ot),t=new Ge(f,at);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,f._oAuthCred=i}if(i.isValid()){g=new v({userId:i.userId??void 0,server:d.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});const n=f.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);n||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(d.server,i.refreshToken,i.appId).then(e=>(g.expires=Date.now()+1e3*e.expires_in,g.token=e.access_token,g)):Promise.resolve(g),e._pendingDfd.then(e=>n?this._exchangeToken(e.server,f.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{const t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),s()):r(e)})):t(g)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(f.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,f,d).then(e=>{t(e)}).catch(r)}else{const s=()=>{p?e._pendingDfd=this.oAuthSignIn(e.resUrl_,d,f,e.options_).then(t,r):(m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(d.server,f.appId).then(e=>{(0,u.FX)(e.portalUrl,this._appOrigin,!0)?(g=new v({userId:e.username,server:d.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(g)):s()}).catch(s):s()}}else if(p){if(this._checkProtocol(e.resUrl_,d,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,d,s).then(t,r)}}else m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m)},i=()=>{const s=e.sinfo_,i=s.owningSystemUrl,n=e.options_;let o,a,l,h;if(n&&(o=n.token,a=n.error,l=n.prompt),h=this._findCredential(i,{token:o,resource:e.resUrl_}),!h)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){h=e;break}if(h){const i=this.findCredential(e.resUrl_,h.userId);if(i)t(i);else if(nt(s,this._legacyFed)){const e=h.toJSON();e.server=s.server,e.resources=null,t(new v(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(h.server),null,{serverUrl:e.resUrl_,token:h.token,signal:e.options_.signal,ssl:h.ssl})).then(r=>{t(new v({userId:h?.userId,server:s.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))},r)}else this._busy=null,o&&(e.options_.token=null),(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,token:o,error:a,prompt:l})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,a=this._isServerRsrc(e.resUrl_),h=e.sinfo_._restInfoPms;h?h.promise.then(t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,d.wc)("authInfo.tokenServicesUrl",t)||(0,d.wc)("authInfo.tokenServiceUrl",t)||(0,d.wc)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,d.wc)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}a&&r.owningSystemUrl?i():s()},()=>{e.sinfo_._restInfoPms=null;const t=new o.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)}):a&&n?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{const r={};let s,i,n,o;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch(()=>null).then(e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r)):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>r):r}).catch(()=>null).then(t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()}):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const i=e.customBaseUrl,o=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=this._appUrlObj.path;const e=r.search(/\/(apps|home)\//);r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,n.A)(r+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new Qe({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})})):t=Promise.resolve(),t.then(()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,n.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:o,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,u.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&i?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+i:t.portalUrl=s,t.popup=window!==window.top||!((0,u.FX)(s,this._appOrigin)||this._gwDomains.some(e=>e.regex.test(s)&&e.regex.test(this._appOrigin))),this.oAuthInfos.push(t)}})})}_doOAuthSignIn(e,t,r,s){const i=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),i.stateUID&&(n.uid=i.stateUID);const a={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(a.force_login=!0),r.forceUserId&&r.userId&&(a.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(a.redirectToUserOrgUrl=!0),i.codeVerifier&&(a.code_challenge=s||i.codeVerifier,a.code_challenge_method=s?"S256":"plain");const h=this._getAuthorizeUrl(r.portalUrl),d=h+"?"+(0,u.x0)(a);if(r.popup){const e=window.open(d,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval(()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new o.A("identity-manager:user-aborted","ABORTED");e.reject(t)}}},500),this._oAuthOnPopupHandle=(0,l.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)});else{const e=new o.A("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:h,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=d}_getAuthorizeUrl(e){let t=e.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize";const r=(0,rt.py)(t);if(r?.portalHostname){const{customBaseUrl:e,portalHostname:s,urlKey:i}=r;let n=null;"www.arcgis.com"===s||"devext.arcgis.com"===s&&(n="logindevext.arcgis.com"),n&&(t=(0,u.T1)(t,i?`${i}.${e}`:s,i?`${i}.${n}`:n))}return t}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,u.s2)(e.popupCallbackUrl);if(t){const e=(0,u.An)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach(t=>{delete e.query[t]}),(0,u.a6)(e.path,e.query)}return r}}lt.prototype.declaredClass="esri.identity.IdentityManagerBase";const ht=new lt;(0,s.Aq)(ht)},79783(e,t,r){r.d(t,{ud:()=>y,JK:()=>S,oQ:()=>I,V2:()=>k});var s=r(2741),i=r(97770),n=r(73444),o=r(10838),a=r(18047),l=r(53966),h=r(93637),d=r(799);const c=()=>l.A.getLogger("esri.intl.substitute");function u(e,t){switch(t.type){case"date":return(0,i.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return c().warn("missing format descriptor for key {key}"),f(e)}}function p(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return c().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):f(e)}}function f(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.Yq)(e):""}}var g=r(11254),m=r(49186);async function v(e){if(null!=w.fetchBundleAsset)return w.fetchBundleAsset(e);const t=await(0,g.A)(e,{responseType:"text"});return JSON.parse(t.data)}class _{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const i=t.exec(r);if(!i)throw new m.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const n=i[1]?`${i[1]}/`:"",a=i[2],l=(0,o.xO)(s),h=`${n}${a}.json`,d=l?`${n}${a}_${l}.json`:h;let c;try{c=await v(e(d))}catch(t){if(d===h)throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{c=await v(e(h))}catch(e){throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return c}(this.getAssetUrl,this.matcher,e,t)}}const w={},y=o.ud,S=n.JK,I=n.oQ,A=o.ao,k=function(e,t,r={}){const{format:s={}}=r;return(0,d.HC)(e,e=>function(e,t,r){let s,i;const n=e.indexOf(":");if(-1===n?s=e.trim():(s=e.slice(0,n).trim(),i=e.slice(n+1).trim()),!s)return"";const o=(0,h.wc)(s,t);if(null==o)return"";const a=(i?r?.[i]:null)??r?.[s];return a?u(o,a):i?p(o,i):f(o)}(e,t,s))};var U;A((U={pattern:"esri/",location:s.s},new _(U)))},10838(e,t,r){r.d(t,{ao:()=>c,ud:()=>u,xO:()=>p});var s=r(49186),i=r(36563),n=r(73444);const o={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:"no",nl:!0,no:!0,nn:"no",pl:!0,pt:"pt-BR","pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,zh:"zh-CN","zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function a(e){if(function(e){return e in o}(e)){const t=o[e];return!0===t?e:t}return null}const l=[],h=new Map;function d(e){for(const t of h.keys())f(e.pattern,t)&&h.delete(t)}function c(e){return l.includes(e)||(d(e),l.unshift(e)),(0,i.hA)(()=>{const t=l.indexOf(e);t>-1&&(l.splice(t,1),d(e))})}async function u(e){const t=(0,n.JK)();h.has(e)||h.set(e,async function(e,t){const r=[];for(const s of l)if(f(s.pattern,e))try{return await s.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new s.A("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new s.A("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=h.get(e);return r&&await g.add(r),r}function p(e){const t=(0,n.lR)(e);return t?a(e)??a(t):null}function f(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,n.Ml)(()=>{h.clear()});const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then(()=>this._decrease(),()=>this._decrease()),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=Promise.withResolvers())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18047(e,t,r){r.d(t,{Up:()=>l,ZV:()=>h,yx:()=>a});var s=r(73444);const i={ar:"ar-u-nu-latn",bs:"sr-Latn-CS",nn:"no-NN"};let n=new WeakMap,o={};function a(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e){const{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:s}=e;return{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:"auto"===s?"auto":"always"===s}}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const r=(0,s.lR)(),o=r&&i[r]||(0,s.QC)();n.set(t,new Intl.NumberFormat(o,e))}return n.get(t)}(t).format(e)}(0,s.Ml)(()=>{n=new WeakMap,o={}}),new Map}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see ee057c85cdf6beb5b012.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5828],{42531(t,e,i){i.d(e,{t:()=>n});var o=i(57990);function a(t){return t[t.openProp||"open"]}async function n(t){await t.updateComplete,a(t)?t.onBeforeOpen():t.onBeforeClose(),await t.updateComplete;const e=function(t){return!!t.transitionRef}(t)?t.transitionRef.value:t.transitionEl;e&&await(0,o.o)(e,t.transitionProp),a(t)?t.onOpen():t.onClose()}},81551(t,e,i){i.d(e,{C:()=>o,I:()=>n,i:()=>c});const o={button:"button",buttonTextVisible:"button--text-visible",buttonCompact:"button--compact",indicatorText:"indicator-text",iconContainer:"icon-container",slotContainer:"slot-container",slotContainerHidden:"slot-container--hidden",textContainer:"text-container",textContainerVisible:"text-container--visible",indicatorWithIcon:"indicator-with-icon",indicatorWithoutIcon:"indicator-without-icon"},a="calcite-action",n={button:t=>`${a}-${t}-button`,indicator:t=>`${a}-${t}-indicator`};function c(t){return"CALCITE-ACTION"===t?.tagName}},82568(t,e,i){i(59187),i(77148);var o=i(64282),a=i(41276),n=i(25633),c=i(80966),r=i(19470),l=i(43525),s=i(84025),d=i(21149),h=i(35330),u=i(15989),p=i(7433),b=i(88891),g=i(81551);const v=a.AH`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-action-font-size: var(--calcite-font-size--2);--calcite-internal-action-min-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size--1);--calcite-internal-action-min-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-0);--calcite-internal-action-min-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm-plus)}:host{display:flex;cursor:pointer;background-color:transparent;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-action-corner-radius-start-start, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius-xs)))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs)}.button{position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;outline-color:transparent;box-sizing:border-box;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height, var(--calcite-internal-action-min-height));max-block-size:var(--calcite-internal-action-height, none);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}.button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0;transition-property:opacity;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:inline-size}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-3));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-3))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}:host([loading]) calcite-loader[inline]{margin-inline-end:0px}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([appearance=transparent]) .button{transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);background-color:var(--calcite-action-background-color, var(--calcite-color-transparent))}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-transparent-hover))}:host([appearance=transparent]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([selection-appearance=highlight]):host([active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{margin-inline:.25rem;inline-size:1rem;position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.125rem;inset-inline-end:-.125rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.175rem;inset-inline-end:-.175rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}.indicator-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;class f extends r.WF{constructor(){super(...arguments),this.guid=(0,l.g)(),this.buttonRef=(0,c._)(),this.buttonId=g.I.button(this.guid),this.mutationObserver=(0,s.c)("mutation",()=>this.requestUpdate()),this.messages=(0,h.u)({blocking:!0}),this.focusSetter=(0,u.u)()(this),this.indicatorRef=(0,c._)(),this.interactiveContainer=(0,p.u)(this),this.formTrigger=(0,b.u)()(this),this.active=!1,this.activeDescendant=!1,this.appearance="transparent",this.compact=!1,this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button"}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],compact:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=v}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}renderTextContainer(){const{text:t,textEnabled:e}=this,i={[g.C.textContainer]:!0,[g.C.textContainerVisible]:e};return t?(0,n.D)("text-container",a.qy`<div class=${(0,r.CP)(i)}>${t}</div>`):null}renderIndicatorText(){const{indicator:t,messages:e,buttonId:i}=this;return a.qy`<div aria-labelledby=${i??r.s6} aria-live=polite class=${(0,r.CP)(g.C.indicatorText)} role=region ${(0,c.K)(this.indicatorRef)}>${t?e.indicator:null}</div>`}renderIconContainer(){const{loading:t,icon:e,scale:i,el:o,iconFlipRtl:c,indicator:l}=this,s="l"===i?"l":"m",h=t?a.qy`<calcite-loader inline .label=${this.messages.loading} .scale=${s}></calcite-loader>`:null,u=e?a.qy`<calcite-icon class=${(0,r.CP)({[g.C.indicatorWithIcon]:l})} .flipRtl=${c} .icon=${e} .scale=${(0,d.g)(this.scale)}></calcite-icon>`:null,p=h||u,b=p||o.children?.length,v=a.qy`<div class=${(0,r.CP)({[g.C.slotContainer]:!0,[g.C.slotContainerHidden]:t})}><slot></slot></div>`;return b?(0,n.D)("icon-container",a.qy`<div aria-hidden=true class=${(0,r.CP)(g.C.iconContainer)}>${p}${v}</div>`):null}renderButton(){const{compact:t,disabled:e,icon:i,loading:o,textEnabled:l,label:s,text:d,indicator:h,indicatorRef:u,buttonId:p,messages:b}=this,v=s||d||"",f=h?b.indicatorLabel.replace("{label}",v):v,m={[g.C.button]:!0,[g.C.buttonTextVisible]:l,[g.C.buttonCompact]:t},k=a.qy`${this.renderIconContainer()}${this.renderTextContainer()}${!i&&h&&(0,n.D)("indicator-no-icon",a.qy`<div class=${(0,r.CP)(g.C.indicatorWithoutIcon)}></div>`)||""}`,x=h&&u.value?[u.value]:[],y=[...this.aria?.controlsElements??[],...x];return this.dragHandle?a.qy`<span .ariaBusy=${o} .ariaControlsElements=${y} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${f} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${(0,r.CP)(m)} id=${p??r.s6} role=button tabindex=${(this.disabled?void 0:0)??r.s6} ${(0,c.K)(this.buttonRef)}>${k}</span>`:a.qy`<button .ariaBusy=${o} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${y} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${f} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${(0,r.CP)(m)} .disabled=${e} id=${p??r.s6} .role=${this.aria?.role} ${(0,c.K)(this.buttonRef)}>${k}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:a.qy`${this.renderButton()}${this.renderIndicatorText()}`})}}(0,o.c)("calcite-action",f)},65828(t,e,i){i.r(e),i.d(e,{Notice:()=>g}),i(82568),i(77148);var o=i(64282),a=i(41276),n=i(80966),c=i(19470),r=i(64083),l=i(57990);const s={danger:"exclamationMarkTriangleF",info:"informationF",success:"checkCircleF",warning:"exclamationMarkTriangleF"};var d=i(42531),h=i(21149),u=i(35330),p=i(15989);const b=a.AH`:host([scale=s]){--calcite-notice-spacing-token-small: .5rem;--calcite-notice-spacing-token-large: .75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]){--calcite-notice-spacing-token-small: .75rem;--calcite-notice-spacing-token-large: 1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]){--calcite-notice-spacing-token-small: 1rem;--calcite-notice-spacing-token-large: 1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .notice-close{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=l]) .actions-end{margin-inline-end:var(--calcite-spacing-sm);gap:var(--calcite-spacing-sm)}:host([width=auto]){--calcite-notice-width: auto}:host([width=half]){--calcite-notice-width: 50%}:host([width=full]){--calcite-notice-width: 100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;opacity:0;overflow:hidden;max-block-size:0;transition-property:opacity,max-block-size;transition-duration:var(--calcite-animation-timing);text-align:start;border-radius:var(--calcite-notice-corner-radius, var(--calcite-corner-radius-sm));box-shadow:var(--calcite-notice-shadow, var(--calcite-shadow-none))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;overflow:visible}@starting-style{:host([open]) .container{opacity:0;max-block-size:0}}:host([open][appearance=outline-fill]) .container{border:var(--calcite-border-width-sm) solid}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-notice-title-text-color, var(--calcite-color-text-1))}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=title]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=title]){color:var(--calcite-notice-title-text-color, var(--calcite-color-text-inverse))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=message]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=message]){color:var(--calcite-notice-content-text-color, var(--calcite-color-text-inverse))}.notice-content{box-sizing:border-box;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-large)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;padding-inline:var(--calcite-notice-spacing-token-small)}.notice-close{box-sizing:border-box;display:flex;cursor:pointer;align-items:center;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;flex:0 0 auto;margin-inline-end:var(--calcite-spacing-xs);--calcite-action-background-color: var(--calcite-notice-close-background-color);--calcite-action-background-color-hover: var( --calcite-notice-close-background-color-hover, var(--calcite-notice-close-background-color-focus) );--calcite-action-background-color-press: var(--calcite-notice-close-background-color-press);--calcite-action-text-color: var(--calcite-notice-close-icon-color, var(--calcite-color-text-3));--calcite-action-text-color-press: var(--calcite-notice-close-icon-color-hover)}.actions-end{display:flex;align-items:center;flex:0 0 auto;margin-inline-end:var(--calcite-spacing-xs);gap:var(--calcite-spacing-xs)}:host([kind=brand][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-brand) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-brand) 5%, var(--calcite-color-foreground-1)))}:host([kind=brand][appearance=outline-fill]) .notice-icon,:host([kind=brand][appearance=transparent]) .notice-icon{color:var(--calcite-color-brand)}:host([kind=info][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-info) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-info) 5%, var(--calcite-color-foreground-1)))}:host([kind=info][appearance=outline-fill]) .notice-icon,:host([kind=info][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-danger) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-danger) 5%, var(--calcite-color-foreground-1)))}:host([kind=danger][appearance=outline-fill]) .notice-icon,:host([kind=danger][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-success) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-success) 5%, var(--calcite-color-foreground-1)))}:host([kind=success][appearance=outline-fill]) .notice-icon,:host([kind=success][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-warning) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-warning) 5%, var(--calcite-color-foreground-1)))}:host([kind=warning][appearance=outline-fill]) .notice-icon,:host([kind=warning][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-warning)}:host([kind=neutral][appearance=outline-fill]) .container{border-color:var(--calcite-color-border-2);background-color:var(--calcite-notice-background-color, var(--calcite-color-foreground-1))}:host([kind=neutral]) .notice-icon{color:var(--calcite-color-text-3)}:host([appearance=transparent]) .container{background-color:transparent}:host([hidden]){display:none}[hidden]{display:none}`;class g extends c.WF{constructor(){super(...arguments),this.closeButtonRef=(0,n._)(),this.transitionProp="opacity",this.transitionRef=(0,n._)(),this.messages=(0,u.u)(),this.focusSetter=(0,p.u)()(this),this.hasActionEnd=!1,this.appearance="outline-fill",this.closable=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.scale="m",this.width="auto",this.calciteNoticeBeforeClose=(0,r.c)({cancelable:!1}),this.calciteNoticeBeforeOpen=(0,r.c)({cancelable:!1}),this.calciteNoticeClose=(0,r.c)({cancelable:!1}),this.calciteNoticeOpen=(0,r.c)({cancelable:!1})}static{this.properties={hasActionEnd:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:c.pf,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=b}async setFocus(t){return this.focusSetter(()=>this.el.querySelector("calcite-link")||this.closeButtonRef.value,t)}async load(){this.kindIcons={...s,brand:"lightbulb"},this.requestedIcon=(0,l.b)(this.kindIcons,this.icon,this.kind)}willUpdate(t){t.has("open")&&(this.hasUpdated||!1!==this.open)&&(0,d.t)(this),(t.has("icon")||t.has("kind")&&(this.hasUpdated||"brand"!==this.kind))&&(this.requestedIcon=(0,l.b)(this.kindIcons,this.icon,this.kind))}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}close(){this.open=!1}handleActionsEndSlotChange(t){this.hasActionEnd=(0,l.s)(t)}render(){const t=a.qy`<calcite-action class=${(0,c.CP)("notice-close")} icon=x @click=${this.close} .scale=${this.scale} .text=${this.messages.close} ${(0,n.K)(this.closeButtonRef)}></calcite-action>`;return a.qy`<div class=${(0,c.CP)("container")} ${(0,n.K)(this.transitionRef)}>${this.requestedIcon?a.qy`<div class=${(0,c.CP)("notice-icon")}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${(0,h.g)(this.scale)}></calcite-icon></div>`:null}<div class=${(0,c.CP)("notice-content")}><slot name=${"title"}></slot><slot name=${"message"}></slot><slot name=${"link"}></slot></div><div class=${(0,c.CP)("actions-end")} .hidden=${!this.hasActionEnd}><slot name=${"actions-end"} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?t:null}</div>`}}(0,o.c)("calcite-notice",g)},25633(t,e,i){i.d(e,{D:()=>c});var o=i(33377),a=i(63179),n=i(40171);const c=(0,a.u$)(class extends a.WL{constructor(){super(...arguments),this.key=o.s6}render(t,e){return this.key=t,e}update(t,[e,i]){return e!==this.key&&((0,n.mY)(t),this.key=e),i}})}}]);
1
+ /*! For license information please see d1ba118ddd0390c07f35.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7789],{69124(t,e,i){i.d(e,{t:()=>n});var o=i(48023);function a(t){return t[t.openProp||"open"]}async function n(t){await t.updateComplete,a(t)?t.onBeforeOpen():t.onBeforeClose(),await t.updateComplete;const e=function(t){return!!t.transitionRef}(t)?t.transitionRef.value:t.transitionEl;e&&await(0,o.o)(e,t.transitionProp),a(t)?t.onOpen():t.onClose()}},54154(t,e,i){i.d(e,{C:()=>o,I:()=>n,i:()=>c});const o={button:"button",buttonTextVisible:"button--text-visible",buttonCompact:"button--compact",indicatorText:"indicator-text",iconContainer:"icon-container",slotContainer:"slot-container",slotContainerHidden:"slot-container--hidden",textContainer:"text-container",textContainerVisible:"text-container--visible",indicatorWithIcon:"indicator-with-icon",indicatorWithoutIcon:"indicator-without-icon"},a="calcite-action",n={button:t=>`${a}-${t}-button`,indicator:t=>`${a}-${t}-indicator`};function c(t){return"CALCITE-ACTION"===t?.tagName}},25277(t,e,i){i(12658),i(45509);var o=i(12159),a=i(41276),n=i(25633),c=i(80966),r=i(19470),l=i(11586),s=i(43876),d=i(87760),h=i(4333),u=i(79296),p=i(77386),b=i(26632),g=i(54154);const v=a.AH`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-action-font-size: var(--calcite-font-size--2);--calcite-internal-action-min-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size--1);--calcite-internal-action-min-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-0);--calcite-internal-action-min-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm-plus)}:host{display:flex;cursor:pointer;background-color:transparent;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-action-corner-radius-start-start, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius-xs)))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs)}.button{position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;outline-color:transparent;box-sizing:border-box;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height, var(--calcite-internal-action-min-height));max-block-size:var(--calcite-internal-action-height, none);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}.button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0;transition-property:opacity;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:inline-size}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-3));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-3))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}:host([loading]) calcite-loader[inline]{margin-inline-end:0px}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([appearance=transparent]) .button{transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);background-color:var(--calcite-action-background-color, var(--calcite-color-transparent))}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-transparent-hover))}:host([appearance=transparent]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([selection-appearance=highlight]):host([active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{margin-inline:.25rem;inline-size:1rem;position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.125rem;inset-inline-end:-.125rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.175rem;inset-inline-end:-.175rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}.indicator-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;class f extends r.WF{constructor(){super(...arguments),this.guid=(0,l.g)(),this.buttonRef=(0,c._)(),this.buttonId=g.I.button(this.guid),this.mutationObserver=(0,s.c)("mutation",()=>this.requestUpdate()),this.messages=(0,h.u)({blocking:!0}),this.focusSetter=(0,u.u)()(this),this.indicatorRef=(0,c._)(),this.interactiveContainer=(0,p.u)(this),this.formTrigger=(0,b.u)()(this),this.active=!1,this.activeDescendant=!1,this.appearance="transparent",this.compact=!1,this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button"}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],compact:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=v}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}renderTextContainer(){const{text:t,textEnabled:e}=this,i={[g.C.textContainer]:!0,[g.C.textContainerVisible]:e};return t?(0,n.D)("text-container",a.qy`<div class=${(0,r.CP)(i)}>${t}</div>`):null}renderIndicatorText(){const{indicator:t,messages:e,buttonId:i}=this;return a.qy`<div aria-labelledby=${i??r.s6} aria-live=polite class=${(0,r.CP)(g.C.indicatorText)} role=region ${(0,c.K)(this.indicatorRef)}>${t?e.indicator:null}</div>`}renderIconContainer(){const{loading:t,icon:e,scale:i,el:o,iconFlipRtl:c,indicator:l}=this,s="l"===i?"l":"m",h=t?a.qy`<calcite-loader inline .label=${this.messages.loading} .scale=${s}></calcite-loader>`:null,u=e?a.qy`<calcite-icon class=${(0,r.CP)({[g.C.indicatorWithIcon]:l})} .flipRtl=${c} .icon=${e} .scale=${(0,d.g)(this.scale)}></calcite-icon>`:null,p=h||u,b=p||o.children?.length,v=a.qy`<div class=${(0,r.CP)({[g.C.slotContainer]:!0,[g.C.slotContainerHidden]:t})}><slot></slot></div>`;return b?(0,n.D)("icon-container",a.qy`<div aria-hidden=true class=${(0,r.CP)(g.C.iconContainer)}>${p}${v}</div>`):null}renderButton(){const{compact:t,disabled:e,icon:i,loading:o,textEnabled:l,label:s,text:d,indicator:h,indicatorRef:u,buttonId:p,messages:b}=this,v=s||d||"",f=h?b.indicatorLabel.replace("{label}",v):v,m={[g.C.button]:!0,[g.C.buttonTextVisible]:l,[g.C.buttonCompact]:t},k=a.qy`${this.renderIconContainer()}${this.renderTextContainer()}${!i&&h&&(0,n.D)("indicator-no-icon",a.qy`<div class=${(0,r.CP)(g.C.indicatorWithoutIcon)}></div>`)||""}`,x=h&&u.value?[u.value]:[],y=[...this.aria?.controlsElements??[],...x];return this.dragHandle?a.qy`<span .ariaBusy=${o} .ariaControlsElements=${y} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${f} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${(0,r.CP)(m)} id=${p??r.s6} role=button tabindex=${(this.disabled?void 0:0)??r.s6} ${(0,c.K)(this.buttonRef)}>${k}</span>`:a.qy`<button .ariaBusy=${o} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${y} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${f} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${(0,r.CP)(m)} .disabled=${e} id=${p??r.s6} .role=${this.aria?.role} ${(0,c.K)(this.buttonRef)}>${k}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:a.qy`${this.renderButton()}${this.renderIndicatorText()}`})}}(0,o.c)("calcite-action",f)},97789(t,e,i){i.r(e),i.d(e,{Notice:()=>g}),i(25277),i(45509);var o=i(12159),a=i(41276),n=i(80966),c=i(19470),r=i(64083),l=i(48023);const s={danger:"exclamationMarkTriangleF",info:"informationF",success:"checkCircleF",warning:"exclamationMarkTriangleF"};var d=i(69124),h=i(87760),u=i(4333),p=i(79296);const b=a.AH`:host([scale=s]){--calcite-notice-spacing-token-small: .5rem;--calcite-notice-spacing-token-large: .75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]){--calcite-notice-spacing-token-small: .75rem;--calcite-notice-spacing-token-large: 1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]){--calcite-notice-spacing-token-small: 1rem;--calcite-notice-spacing-token-large: 1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .notice-close{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=l]) .actions-end{margin-inline-end:var(--calcite-spacing-sm);gap:var(--calcite-spacing-sm)}:host([width=auto]){--calcite-notice-width: auto}:host([width=half]){--calcite-notice-width: 50%}:host([width=full]){--calcite-notice-width: 100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;opacity:0;overflow:hidden;max-block-size:0;transition-property:opacity,max-block-size;transition-duration:var(--calcite-animation-timing);text-align:start;border-radius:var(--calcite-notice-corner-radius, var(--calcite-corner-radius-sm));box-shadow:var(--calcite-notice-shadow, var(--calcite-shadow-none))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;overflow:visible}@starting-style{:host([open]) .container{opacity:0;max-block-size:0}}:host([open][appearance=outline-fill]) .container{border:var(--calcite-border-width-sm) solid}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-notice-title-text-color, var(--calcite-color-text-1))}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=title]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=title]){color:var(--calcite-notice-title-text-color, var(--calcite-color-text-inverse))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=message]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=message]){color:var(--calcite-notice-content-text-color, var(--calcite-color-text-inverse))}.notice-content{box-sizing:border-box;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-large)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;padding-inline:var(--calcite-notice-spacing-token-small)}.notice-close{box-sizing:border-box;display:flex;cursor:pointer;align-items:center;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;flex:0 0 auto;margin-inline-end:var(--calcite-spacing-xs);--calcite-action-background-color: var(--calcite-notice-close-background-color);--calcite-action-background-color-hover: var( --calcite-notice-close-background-color-hover, var(--calcite-notice-close-background-color-focus) );--calcite-action-background-color-press: var(--calcite-notice-close-background-color-press);--calcite-action-text-color: var(--calcite-notice-close-icon-color, var(--calcite-color-text-3));--calcite-action-text-color-press: var(--calcite-notice-close-icon-color-hover)}.actions-end{display:flex;align-items:center;flex:0 0 auto;margin-inline-end:var(--calcite-spacing-xs);gap:var(--calcite-spacing-xs)}:host([kind=brand][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-brand) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-brand) 5%, var(--calcite-color-foreground-1)))}:host([kind=brand][appearance=outline-fill]) .notice-icon,:host([kind=brand][appearance=transparent]) .notice-icon{color:var(--calcite-color-brand)}:host([kind=info][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-info) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-info) 5%, var(--calcite-color-foreground-1)))}:host([kind=info][appearance=outline-fill]) .notice-icon,:host([kind=info][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-danger) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-danger) 5%, var(--calcite-color-foreground-1)))}:host([kind=danger][appearance=outline-fill]) .notice-icon,:host([kind=danger][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-success) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-success) 5%, var(--calcite-color-foreground-1)))}:host([kind=success][appearance=outline-fill]) .notice-icon,:host([kind=success][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-warning) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-warning) 5%, var(--calcite-color-foreground-1)))}:host([kind=warning][appearance=outline-fill]) .notice-icon,:host([kind=warning][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-warning)}:host([kind=neutral][appearance=outline-fill]) .container{border-color:var(--calcite-color-border-2);background-color:var(--calcite-notice-background-color, var(--calcite-color-foreground-1))}:host([kind=neutral]) .notice-icon{color:var(--calcite-color-text-3)}:host([appearance=transparent]) .container{background-color:transparent}:host([hidden]){display:none}[hidden]{display:none}`;class g extends c.WF{constructor(){super(...arguments),this.closeButtonRef=(0,n._)(),this.transitionProp="opacity",this.transitionRef=(0,n._)(),this.messages=(0,u.u)(),this.focusSetter=(0,p.u)()(this),this.hasActionEnd=!1,this.appearance="outline-fill",this.closable=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.scale="m",this.width="auto",this.calciteNoticeBeforeClose=(0,r.c)({cancelable:!1}),this.calciteNoticeBeforeOpen=(0,r.c)({cancelable:!1}),this.calciteNoticeClose=(0,r.c)({cancelable:!1}),this.calciteNoticeOpen=(0,r.c)({cancelable:!1})}static{this.properties={hasActionEnd:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:c.pf,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=b}async setFocus(t){return this.focusSetter(()=>this.el.querySelector("calcite-link")||this.closeButtonRef.value,t)}async load(){this.kindIcons={...s,brand:"lightbulb"},this.requestedIcon=(0,l.b)(this.kindIcons,this.icon,this.kind)}willUpdate(t){t.has("open")&&(this.hasUpdated||!1!==this.open)&&(0,d.t)(this),(t.has("icon")||t.has("kind")&&(this.hasUpdated||"brand"!==this.kind))&&(this.requestedIcon=(0,l.b)(this.kindIcons,this.icon,this.kind))}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}close(){this.open=!1}handleActionsEndSlotChange(t){this.hasActionEnd=(0,l.s)(t)}render(){const t=a.qy`<calcite-action class=${(0,c.CP)("notice-close")} icon=x @click=${this.close} .scale=${this.scale} .text=${this.messages.close} ${(0,n.K)(this.closeButtonRef)}></calcite-action>`;return a.qy`<div class=${(0,c.CP)("container")} ${(0,n.K)(this.transitionRef)}>${this.requestedIcon?a.qy`<div class=${(0,c.CP)("notice-icon")}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${(0,h.g)(this.scale)}></calcite-icon></div>`:null}<div class=${(0,c.CP)("notice-content")}><slot name=${"title"}></slot><slot name=${"message"}></slot><slot name=${"link"}></slot></div><div class=${(0,c.CP)("actions-end")} .hidden=${!this.hasActionEnd}><slot name=${"actions-end"} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?t:null}</div>`}}(0,o.c)("calcite-notice",g)},25633(t,e,i){i.d(e,{D:()=>c});var o=i(33377),a=i(63179),n=i(40171);const c=(0,a.u$)(class extends a.WL{constructor(){super(...arguments),this.key=o.s6}render(t,e){return this.key=t,e}update(t,[e,i]){return e!==this.key&&((0,n.mY)(t),this.key=e),i}})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3902],{49403(e,t,r){r.d(t,{Eq:()=>p,G3:()=>i,GH:()=>a,bV:()=>d,nP:()=>o,r5:()=>c,ti:()=>l,vy:()=>s,wr:()=>n});const n={esriMethodHintUNSPECIFIED:0,esriUUIDESRI:1,esriUUIDRFC4122:2},a={esriSplitPolicyType_UNSPECIFIED:0,esriSplitPolicyTypeGeometryRatio:1,esriSplitPolicyTypeDuplicate:2,esriSplitPolicyTypeDefaultValue:3},o={esriTypeUNSPECIFIED:0,esriTypeEntity:1,esriTypeRelationship:2,esriTypeBoth:4,esriTypeMetaEntityProvenance:8},i={esriMergePolicyType_UNSPECIFIED:0,esriMergePolicyTypeSumValues:1,esriMergePolicyTypeAreaWeighted:2,esriMergePolicyTypeDefaultValue:3},s={esriIdentifierInfoTypeUNSPECIFIED:0,esriIdentifierInfoTypeDatabaseNative:1,esriIdentifierInfoTypeUniformProperty:2},l={esriGraphPropertyUNSPECIFIED:0,esriGraphPropertyRegular:1,esriGraphPropertyDocumentName:2,esriGraphPropertyDocumentTitle:3,esriGraphPropertyDocumentUrl:4,esriGraphPropertyDocumentText:5,esriGraphPropertyDocumentKeywords:6,esriGraphPropertyDocumentContentType:7,esriGraphPropertyDocumentMetadata:8,esriGraphPropertyDocumentFileExtension:9,esriGraphPropertyProvenanceInstanceId:10,esriGraphPropertyProvenanceSourceType:11,esriGraphPropertyProvenanceSourceName:12,esriGraphPropertyProvenanceSource:13,esriGraphPropertyProvenanceComment:14,esriGraphPropertyProvenanceTypeName:15,esriGraphPropertyProvenancePropertyName:16},d={esriGeometryNull:0,esriGeometryPoint:1,esriGeometryMultipoint:2,esriGeometryPolyline:3,esriGeometryPolygon:4,esriGeometryEnvelope:5,esriGeometryAny:7,esriGeometryMultiPatch:9},c={esriFieldTypeSmallInteger:0,esriFieldTypeInteger:1,esriFieldTypeSingle:2,esriFieldTypeDouble:3,esriFieldTypeString:4,esriFieldTypeDate:5,esriFieldTypeOID:6,esriFieldTypeGeometry:7,esriFieldTypeBlob:8,esriFieldTypeRaster:9,esriFieldTypeGUID:10,esriFieldTypeGlobalID:11,esriFieldTypeXML:12,esriFieldTypeBigInteger:13,esriFieldTypeDateOnly:14,esriFieldTypeTimeOnly:15,esriFieldTypeTimestampOffset:16},p={Regular:0,Provenance:1,Document:2}},2645(e,t,r){r.d(t,{g:()=>n,q:()=>a});const n={upperLeft:0,lowerLeft:1},a={sqlTypeBigInt:0,sqlTypeBinary:1,sqlTypeBit:2,sqlTypeChar:3,sqlTypeDate:4,sqlTypeDecimal:5,sqlTypeDouble:6,sqlTypeFloat:7,sqlTypeGeometry:8,sqlTypeGUID:9,sqlTypeInteger:10,sqlTypeLongNVarchar:11,sqlTypeLongVarbinary:12,sqlTypeLongVarchar:13,sqlTypeNChar:14,sqlTypeNVarChar:15,sqlTypeOther:16,sqlTypeReal:17,sqlTypeSmallInt:18,sqlTypeSqlXml:19,sqlTypeTime:20,sqlTypeTimestamp:21,sqlTypeTimestamp2:22,sqlTypeTinyInt:23,sqlTypeVarbinary:24,sqlTypeVarchar:25}},45724(e,t,r){r.d(t,{I:()=>s});var n=r(2741),a=r(44208);const o="esri/rest/knowledgeGraph/wasmInterface/";let i;async function s(){if(i)return i;const e=!!(0,a.A)("wasm-simd");return i=l(e),i}async function l(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367));return e({locateFile:e=>(0,n.s)(o+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013));return t({locateFile:e=>(0,n.s)(o+e)})}},53902(e,t,r){r.r(t),r.d(t,{_checkAuthentication:()=>en,_esriRequestWrapper:()=>Xr,_fetchWrapper:()=>Wr,_getClientDataCacheCopy:()=>_r,_setMaxQueryParsingDurationForTesting:()=>on,_submitJobWrapper:()=>Yr,clearClientDataCache:()=>Hr,clientDataCache:()=>mr,executeAddDomain:()=>Ur,executeAddGraphFieldIndex:()=>Rr,executeAddGraphProperties:()=>xr,executeAddNamedTypes:()=>Cr,executeApplyEdits:()=>br,executeCreateReplica:()=>Vr,executeDeleteDomain:()=>zr,executeDeleteGraphFieldIndex:()=>Dr,executeDeleteGraphProperty:()=>Mr,executeDeleteNamedType:()=>Ar,executeFindPaths:()=>Or,executeFindPathsAsynchronous:()=>Lr,executeQuery:()=>Sr,executeQueryStreaming:()=>kr,executeSearch:()=>Ir,executeSearchStreaming:()=>jr,executeUnregisterReplica:()=>Qr,executeUpdateDomain:()=>Kr,executeUpdateGraphProperty:()=>Gr,executeUpdateNamedType:()=>Tr,executeUpdateSearchIndex:()=>Pr,fetchAllClientDataKeys:()=>Zr,fetchAsynchronousFindPathsResultData:()=>$r,fetchClientDataAtKeys:()=>qr,fetchKnowledgeGraph:()=>Er,fetchReplicaDefinition:()=>Jr,fetchReplicasInformation:()=>Br,kgRestServices:()=>vr,refreshDataModel:()=>Fr,refreshServiceDefinition:()=>Nr});var n,a=r(70333),o=r(11254),i=r(49186),s=r(53966),l=r(17676),d=r(91075),c=r(16930),p=r(5482),u=r(69622),y=r(91429),g=r(56507),h=r(5443);let f=n=class extends u.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,g.PZ)(n,e)}};(0,p.Cg)([(0,y.MZ)({type:c.A})],f.prototype,"outSpatialReference",void 0),(0,p.Cg)([(0,y.MZ)({type:h.A})],f.prototype,"processExtent",void 0),(0,p.Cg)([(0,y.MZ)({type:c.A})],f.prototype,"processSpatialReference",void 0),(0,p.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnColumnName",void 0),(0,p.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnFeatureCollection",void 0),(0,p.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnM",void 0),(0,p.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnZ",void 0),f=n=(0,p.Cg)([(0,y.$K)("esri.rest.geoprocessor.GPOptions")],f);var w=r(17136),m=r(20437),_=r(25482);let v=class extends _.o{constructor(e){super(e),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,p.Cg)([(0,y.MZ)({type:h.A})],v.prototype,"extent",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"height",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"href",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"opacity",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"rotation",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"scale",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"visible",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"width",void 0),v=(0,p.Cg)([(0,y.$K)("esri.layers.support.MapImage")],v);var b=r(2272),C=r(2073),A=r(93223);let T=class extends _.o{constructor(e){super(e),this.area=0,this.units=null}};(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],T.prototype,"area",void 0),(0,p.Cg)([(0,A.e)(C.UO)],T.prototype,"units",void 0),T=(0,p.Cg)([(0,y.$K)("esri.rest.support.ArealUnit")],T);let x=class extends _.o{constructor(e){super(e),this.itemId=null,this.url=null}};(0,p.Cg)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],x.prototype,"itemId",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],x.prototype,"url",void 0),x=(0,p.Cg)([(0,y.$K)("esri.rest.support.DataFile")],x);var M=r(22671);let G=class extends _.o{constructor(e){super(e),this.distance=0,this.units=null}};(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],G.prototype,"distance",void 0),(0,p.Cg)([(0,A.e)(C.Y8)],G.prototype,"units",void 0),G=(0,p.Cg)([(0,y.$K)("esri.rest.support.LinearUnit")],G);var R=r(66552);const D="multi-value-",P=new R.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPTimeUnit:"time-unit",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${D}areal-unit`,"GPMultiValue:GPBoolean":`${D}boolean`,"GPMultiValue:GPComposite":`${D}composite`,"GPMultiValue:GPDataFile":`${D}data-file`,"GPMultiValue:GPDate":`${D}date`,"GPMultiValue:GPDouble":`${D}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${D}feature-record-set-layer`,"GPMultiValue:Field":`${D}field`,"GPMultiValue:GPLinearUnit":`${D}linear-unit`,"GPMultiValue:GPLong":`${D}long`,"GPMultiValue:GPRasterData":`${D}raster-data`,"GPMultiValue:GPRasterDataLayer":`${D}raster-data-layer`,"GPMultiValue:GPRecordSet":`${D}record-set`,"GPMultiValue:GPString":`${D}string`,"GPMultiValue:GPTimeUnit":`${D}time-unit`});let S=class extends _.o{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,p.Cg)([(0,A.e)(P,{ignoreUnknown:!1})],S.prototype,"dataType",void 0),(0,p.Cg)([(0,y.MZ)()],S.prototype,"paramName",void 0),(0,p.Cg)([(0,y.MZ)()],S.prototype,"value",void 0),S=(0,p.Cg)([(0,y.$K)("esri.rest.support.ParameterValue")],S);var k=r(36005);let I=class extends _.o{constructor(e){super(e),this.format=null,this.itemId=null,this.type=null,this.url=null}readType(e){return"ImageService"===e?"image-service":null}};(0,p.Cg)([(0,y.MZ)()],I.prototype,"format",void 0),(0,p.Cg)([(0,y.MZ)({json:{name:"itemID",write:!0}})],I.prototype,"itemId",void 0),(0,p.Cg)([(0,y.MZ)()],I.prototype,"type",void 0),(0,p.Cg)([(0,k.w)("type")],I.prototype,"readType",null),(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],I.prototype,"url",void 0),I=(0,p.Cg)([(0,y.$K)("esri.rest.support.RasterData")],I);var j=r(73133);let Z=class extends _.o{constructor(e){super(e),this.time=0,this.units=null}};async function q(e,t){switch(e){case"time-unit":return Z.fromJSON(t);case"areal-unit":return T.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return x.fromJSON(t);case"linear-unit":return G.fromJSON(t);case"feature-record-set-layer":if("url"in t)return x.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(7632),r.e(8278),r.e(7865),r.e(6554),r.e(9953),r.e(8303),r.e(1733),r.e(1214),r.e(1956),r.e(8399),r.e(1017),r.e(4674),r.e(6606),r.e(8589),r.e(7609),r.e(5431)]).then(r.bind(r,18589))).default),{layerDefinition:n,featureSet:a}=t;return e.read({layerDefinition:n,featureSet:a},{origin:"portal-item"}),e.spatialReference=c.A.fromJSON(a.spatialReference??n.spatialReference??n.extent.spatialReference),e}return M.A.fromJSON(t);case"record-set":return"url"in t?x.fromJSON(t):M.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?v.fromJSON(t.mapImage):I.fromJSON(t);case"field":return m.A.fromJSON(t)}}function E(e){return e.startsWith(D)}function F(e){return e.replace(D,"")}async function N(e){const t=P.fromJSON(e.dataType),{paramName:r}=e,n=E(t)?await async function(e,t){const r=F(e),n="composite"===r?t.map(e=>q(P.fromJSON(e.dataType),e.value)):t.map(e=>q(r,e));return Promise.all(n)}(t,e.value):await q(t,e.value);return new S({dataType:t,paramName:r,value:n})}function L(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map(e=>L({item:e},!0).item)):r instanceof Date&&(e[t]=r.getTime())}return(0,b.lF)(e,t,r)}(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],Z.prototype,"time",void 0),(0,p.Cg)([(0,A.e)(j.j)],Z.prototype,"units",void 0),Z=(0,p.Cg)([(0,y.$K)("esri.rest.support.TimeUnit")],Z);var O,$=r(37807);const U=(0,R.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),K=1e3;let z=class extends _.o{static{O=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:n}=(0,b.Dl)(r),a={...this.requestOptions,...e,query:{f:"json"}},i=`${n}/jobs/${t}/cancel`,{data:s}=await(0,o.A)(i,a),{messages:d,jobStatus:c,progress:p}=O.fromJSON(s);return this.set({messages:d,jobStatus:c,progress:p}),"job-cancelled"===c?this:new Promise((t,r)=>{(0,l.u7)(a.signal,()=>{this.clearCancelJobTimer(),r((0,l.NK)())}),this.clearCancelJobTimer();const n=()=>{this._cancelJobTimer||r((0,l.NK)()),this.checkJobStatus(e).then(({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(n,K);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}).catch(e=>{r(e)})};this._cancelJobTimer=setTimeout(n,K)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,b.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{...e?.query,f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:a}=await(0,o.A)(n,r),{messages:i,jobStatus:s,progress:l}=O.fromJSON(a);return this.set({messages:i,jobStatus:s,progress:l}),this}async fetchResultData(e,t,r){t=f.from(t||{});const{returnColumnName:n,returnFeatureCollection:a,returnM:i,returnZ:s,outSpatialReference:l}=t,{path:d}=(0,b.Dl)(this.sourceUrl),c=L({returnColumnName:n||null,returnFeatureCollection:a||null,returnM:i||null,returnZ:s||null,outSR:l,returnType:"data",f:"json",...r?.query},null),p={...this.requestOptions,...r,query:c},u=`${d}/jobs/${this.jobId}/results/${e}`,{data:y}=await(0,o.A)(u,p);return N(y)}async fetchResultImage(e,t,r){const{path:n}=(0,b.Dl)(this.sourceUrl),a=L({...t.toJSON(),f:"json"}),i={...this.requestOptions,...r,query:a},s=`${n}/jobs/${this.jobId}/results/${e}`,{data:l}=await(0,o.A)(s,i);return N(l)}async fetchResultMapImageLayer(){const{path:e}=(0,b.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),n=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(8303),r.e(1733),r.e(1214),r.e(1956),r.e(8399),r.e(4674),r.e(893),r.e(2045),r.e(2733)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=K,signal:r,statusCallback:n,apiKey:a}=e;return new Promise((e,o)=>{(0,l.u7)(r,()=>{this.clearJobCompletionTimer(),o((0,l.NK)())}),this.clearJobCompletionTimer();const i=()=>{this._jobCompletionTimer||o((0,l.NK)()),this.checkJobStatus({query:{token:a}}).then(({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":n&&n(this),this._jobCompletionTimer=setTimeout(i,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":o(this);break;default:this._jobCompletionTimer=setTimeout(i,t)}}).catch(e=>{o(e)})};this._jobCompletionTimer=setTimeout(i,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,p.Cg)([(0,y.MZ)()],z.prototype,"jobId",void 0),(0,p.Cg)([(0,A.e)(U,{ignoreUnknown:!1})],z.prototype,"jobStatus",void 0),(0,p.Cg)([(0,y.MZ)({type:[$.A]})],z.prototype,"messages",void 0),(0,p.Cg)([(0,y.MZ)()],z.prototype,"progress",void 0),(0,p.Cg)([(0,y.MZ)()],z.prototype,"requestOptions",void 0),(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],z.prototype,"sourceUrl",void 0),z=O=(0,p.Cg)([(0,y.$K)("esri.rest.support.JobInfo")],z);let V=class extends u.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1,this.dataModelTimestamp=null}};(0,p.Cg)([(0,y.MZ)()],V.prototype,"headerKeys",void 0),(0,p.Cg)([(0,y.MZ)()],V.prototype,"outSpatialReference",void 0),(0,p.Cg)([(0,y.MZ)()],V.prototype,"exceededTransferLimit",void 0),(0,p.Cg)([(0,y.MZ)()],V.prototype,"dataModelTimestamp",void 0),V=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],V);let J=class extends u.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new V}};(0,p.Cg)([(0,y.MZ)()],J.prototype,"resultRows",void 0),(0,p.Cg)([(0,y.MZ)()],J.prototype,"resultHeader",void 0),J=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryResult")],J);let B=class extends u.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new V}};(0,p.Cg)([(0,y.MZ)()],B.prototype,"resultRowsStream",void 0),(0,p.Cg)([(0,y.MZ)()],B.prototype,"resultHeader",void 0),B=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],B);var Q=r(8631);let H=class extends _.o{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],H.prototype,"name",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],H.prototype,"unique",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],H.prototype,"ascending",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],H.prototype,"description",void 0),(0,p.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],H.prototype,"fieldNames",void 0),H=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.FieldIndex")],H);let W=class extends _.o{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.domain=null,this.defaultValue=null}};(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"name",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"alias",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"fieldType",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"geometryType",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"hasM",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"hasZ",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"nullable",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"editable",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"required",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"defaultVisibility",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"systemMaintained",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"role",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"domain",void 0),(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],W.prototype,"defaultValue",void 0),W=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphProperty")],W);let Y=class extends _.o{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"name",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"alias",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"role",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Y.prototype,"strict",void 0),(0,p.Cg)([(0,y.MZ)({type:[W],json:{write:!0}})],Y.prototype,"properties",void 0),(0,p.Cg)([(0,y.MZ)({type:[H],json:{write:!0}})],Y.prototype,"fieldIndexes",void 0),Y=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphObjectType")],Y);let X=class extends Y{constructor(e){super(e),this.type="entity"}};X=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.EntityType")],X);let ee=class extends Y{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],ee.prototype,"endPoints",void 0),ee=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.RelationshipType")],ee);let te=class extends _.o{constructor(e){super(e),this.value=null,this.behavior=null}};(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],te.prototype,"value",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],te.prototype,"behavior",void 0),te=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],te);let re=class extends _.o{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[],this.domains=[]}};(0,p.Cg)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],re.prototype,"timestamp",void 0),(0,p.Cg)([(0,y.MZ)({type:c.A,json:{write:!0}})],re.prototype,"spatialReference",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"strict",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"objectIdField",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"globalIdField",void 0),(0,p.Cg)([(0,y.MZ)()],re.prototype,"arcgisManaged",void 0),(0,p.Cg)([(0,y.MZ)()],re.prototype,"identifierInfo",void 0),(0,p.Cg)([(0,y.MZ)()],re.prototype,"searchIndexes",void 0),(0,p.Cg)([(0,y.MZ)({type:[X],json:{write:!0}})],re.prototype,"entityTypes",void 0),(0,p.Cg)([(0,y.MZ)({type:[ee],json:{write:!0}})],re.prototype,"relationshipTypes",void 0),(0,p.Cg)([(0,y.MZ)({type:[X],json:{write:!0}})],re.prototype,"metaEntityTypes",void 0),(0,p.Cg)([(0,y.MZ)({type:[te],json:{write:!0}})],re.prototype,"provenanceSourceTypeValues",void 0),(0,p.Cg)([(0,y.MZ)({types:[Q.g],json:{write:!0}})],re.prototype,"domains",void 0),re=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.DataModel")],re);let ne=class extends _.o{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,p.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ne.prototype,"capabilities",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"supportsSearch",void 0),(0,p.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ne.prototype,"supportedQueryFormats",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"allowGeometryUpdates",void 0),(0,p.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ne.prototype,"searchMaxRecordCount",void 0),(0,p.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ne.prototype,"serviceCapabilities",void 0),(0,p.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ne.prototype,"maxRecordCount",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"description",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"copyrightText",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"units",void 0),(0,p.Cg)([(0,y.MZ)({type:c.A,json:{write:!0}})],ne.prototype,"spatialReference",void 0),(0,p.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ne.prototype,"currentVersion",void 0),(0,p.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ne.prototype,"dateFieldsTimeReference",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"serviceItemId",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"supportsDocuments",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"dataEditingNotSupported",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"schemaEditingNotSupported",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"supportsProvenance",void 0),ne=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ServiceDefinition")],ne);let ae=class extends _.o{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function oe(e,t,r){if(0!==e.error_code)throw new i.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function ie(e){return e?.error_code?new i.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function se(e,t,r,n=!1){const a=new r.ClientDataFetchRequestEncoder;a.deleteLater();for(const o of e){const e=le(o,t,r,n);a.add_client_data_fetch_request_parameter(e)}a.encode();const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(o.get_byte_buffer())}function le(e,t,r,n){const a=new r.ClientDataKey;a.deleteLater(),a.key_string=e;const o=new r.ClientDataFetchRequestParameter;o.deleteLater(),o.set_key(a);const i=t.get(e);return i&&!n&&(o.v_tag={v_tag:i.version}),o}(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ae.prototype,"url",void 0),(0,p.Cg)([(0,y.MZ)({type:re,json:{write:!0}})],ae.prototype,"dataModel",void 0),(0,p.Cg)([(0,y.MZ)({type:ne,json:{write:!0}})],ae.prototype,"serviceDefinition",void 0),ae=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.KnowledgeGraph")],ae);var de=r(45724),ce=r(48526),pe=r(86738),ue=r(39829),ye=r(82799);const ge={exclude:0,include:1};function he(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(me(e,t))}),r}function fe(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,a]of Object.entries(e))r.set_key_value(n,me(a,t));return r}function we(e,t){if(e instanceof ce.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],a=[];a[0]=e.points.length;let o=0;return e.points.forEach(e=>{e.forEach(e=>{n[o]=e,o++})}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(a),r}(e,t);if(e instanceof pe.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],a=[];a[0]=1,n[0]=e.x,n[1]=e.y;let o=2;return e.hasZ&&(n[o]=e.z,o++),e.hasM&&(n[o]=e.m,o++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(a),r}(e,t);if(e instanceof ye.A||e instanceof ue.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],a=[];let o=[];e instanceof ye.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof ue.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let i=0,s=0;return o.forEach(e=>{let t=0;e.forEach(e=>{t++,e.forEach(e=>{n[s]=e,s++})}),a[i]=t,i++}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(a),r}(e,t);throw new i.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function me(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof d.A)return we(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(me(e,t))}),r}return fe(e,t)}var _e=r(2645);function ve(e){return"lower-left"===e?_e.g.lowerLeft:_e.g.upperLeft}function be(e,t){const r=new t.EntityTypeReplicaDefinition;return r.deleteLater(),Ae(e,t,r),e.documentOptions&&(r.document_options=function(e,t){const r=e.includeConnectedDocuments?function(e,t){const r=Te(e.includeDocumentProvenance?{includeProvenance:!0,includeSourceDocuments:e.includeDocumentSourceDocuments}:{includeProvenance:!1},t),n=new t.IncludeConnectedDocuments(r);return n.deleteLater(),n}(e,t):void 0,n=new t.DocumentOptions(r);return n.deleteLater(),n}(e.documentOptions,t)),r}function Ce(e,t){const r=new t.RelationshipTypeReplicaDefinition;return r.deleteLater(),Ae(e,t,r),r}function Ae(e,t,r){if(r.type_name=e.typeName,r.open_cypher_where_clause=e.openCypherWhereClause??"",e.provenanceOptions&&(r.provenance_options=Te(e.provenanceOptions,t)),e.parameters)for(const[n,a]of Object.entries(e.parameters))void 0!==a&&r.add_parameter(n,xe(a,t));return r}function Te(e,t){const r=function(e,t){const r=new t.IncludeProvenance("includeSourceDocuments"in e&&e.includeSourceDocuments);return r.deleteLater(),r}(e,t),n=new t.ProvenanceOptions(r);return n.deleteLater(),n}function xe(e,t){if(null==e)return null;if("boolean"==typeof e||"string"==typeof e||"number"==typeof e||"bigint"==typeof e)return e;if(e instanceof Date)return e;if(e instanceof d.A)return we(e,t);if(Array.isArray(e))return he(e,t);if("object"==typeof e)return fe(e,t);throw new i.A("knowledge-graph:replica-invalid-parameter-value","A replica parameter contains an unsupported value type",{value:e})}var Me=r(49403);function Ge(e,t){if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,a]of Object.entries(e.properties))r.set_key_value(n,Ie(a,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,a]of Object.entries(e.properties))r.set_key_value(n,Ie(a,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new i.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function Re(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:Me.r5[e.fieldType]},r.geometry_type={value:e.geometryType?Me.bV[e.geometryType]:Me.bV.esriGeometryNull},r.has_m=e.hasM??!1,r.has_z=e.hasZ??!1,r.nullable=e.nullable??!1,r.editable=e.editable,r.required=e.required,r.default_visibility=e.defaultVisibility,r.system_maintained=e.systemMaintained??!1,r.role={value:Me.ti[e.role]},r.default_value=Ie(e.defaultValue,t),r.domain=e.domain??"",r}function De(e,t){const r=new t.SearchIndexProperties;r.deleteLater();for(const t of e.propertyNames)r.add_search_property_name(t);return r}function Pe(e,t,r,n){const a=new t.Domain;a.deleteLater(),a.name=e.name;const o=Me.r5[r];a.field_type={value:o};let i=o;if(o!==Me.r5.esriFieldTypeTimeOnly&&o!==Me.r5.esriFieldTypeDateOnly&&o!==Me.r5.esriFieldTypeTimestampOffset||(i=Me.r5.esriFieldTypeString),n&&(a.merge_policy_type={value:Me.G3[n.mergePolicy]},a.split_policy_type={value:Me.GH[n.splitPolicy]}),"coded-value"===e.type){const r=e;a.type="codedValue";const n=new t.CodedValueDomain;n.deleteLater();for(const e of r.codedValues){const r=new t.CodedValue;r.deleteLater(),r.name=e.name,r.set_code(e.code,{value:i}),n.add_coded_value(r)}a.coded_value_domain=n}else if("range"===e.type){const r=e;a.type="range";const n=new t.RangeDomain;n.deleteLater(),n.add_value(r.minValue,{value:i}),n.add_value(r.maxValue,{value:i}),a.range_domain=n}else a.type=e.type??"unspecified";return a}function Se(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:Me.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=Re(n,t);r.add_property(e)}return r}function ke(e,t){return e.hasOwnProperty("alias")&&(t.alias=e.alias),t}function Ie(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof d.A?we(e,t):null}let je=class extends u.A{constructor(e){super(e),this.decoderError=null,this.resultsCount=0,this.results=[],this.updatedKnowledgeGraph=null}};(0,p.Cg)([(0,y.MZ)()],je.prototype,"decoderError",void 0),(0,p.Cg)([(0,y.MZ)()],je.prototype,"resultsCount",void 0),(0,p.Cg)([(0,y.MZ)()],je.prototype,"results",void 0),(0,p.Cg)([(0,y.MZ)()],je.prototype,"updatedKnowledgeGraph",void 0),je=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDataModelOperationResult")],je);const Ze=je;let qe=class extends Ze{constructor(e){super(e)}};qe=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddFieldIndexResult")],qe);const Ee=qe;let Fe=class extends Ze{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.entityAddResults=[],this.relationshipAddResults=[]}};(0,p.Cg)([(0,y.MZ)()],Fe.prototype,"entityAddResultsCount",void 0),(0,p.Cg)([(0,y.MZ)()],Fe.prototype,"relationshipAddResultsCount",void 0),(0,p.Cg)([(0,y.MZ)()],Fe.prototype,"entityAddResults",void 0),(0,p.Cg)([(0,y.MZ)()],Fe.prototype,"relationshipAddResults",void 0),Fe=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],Fe);const Ne=Fe;let Le=class extends Ze{constructor(e){super(e)}};Le=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddPropertyResult")],Le);const Oe=Le;let $e=class extends u.A{constructor(e){super(e),this.decoderError=null,this.updatedKnowledgeGraph=null}};(0,p.Cg)([(0,y.MZ)()],$e.prototype,"decoderError",void 0),(0,p.Cg)([(0,y.MZ)()],$e.prototype,"updatedKnowledgeGraph",void 0),$e=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDataModelSingletonOperationResult")],$e);const Ue=$e;let Ke=class extends Ze{constructor(e){super(e)}};Ke=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeleteFieldIndexResult")],Ke);const ze=Ke;let Ve=class extends Ze{constructor(e){super(e),this.warnings=[]}};(0,p.Cg)([(0,y.MZ)()],Ve.prototype,"warnings",void 0),Ve=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],Ve);const Je=Ve;let Be=class extends Ze{constructor(e){super(e)}};Be=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],Be);const Qe=Be;let He=class extends Ze{constructor(e){super(e)}};He=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],He);const We=He;let Ye=class extends Ze{constructor(e){super(e)}};Ye=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],Ye);const Xe=Ye;let et=class extends Ze{constructor(e){super(e)}};et=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdateSearchIndexResult")],et);const tt=et;function rt(e,t){const r=[];for(let n=0;n<t;n++){const t=e.get_result_at(n);r.push({name:t.get_name(),error:ie(t.get_error())})}return r}function nt(e){const t=e.get_results_count(),r=e.get_entity_type_add_results_count(),n=e.get_relationship_type_add_results_count(),a=new Ne({resultsCount:t,results:rt(e,t),decoderError:ie(e.error),entityAddResultsCount:r,relationshipAddResultsCount:n});for(let t=0;t<r;t++){const r=e.get_entity_type_add_results_at(t),n=r.get_name(),o=r.get_error();a.entityAddResults.push({name:n,error:ie(o)})}for(let t=0;t<n;t++){const r=e.get_relationship_type_add_results_at(t),n=r.get_name(),o=r.get_error();a.relationshipAddResults.push({name:n,error:ie(o)})}return a}function at(e){const t=e.get_results_count();return new We({resultsCount:t,results:rt(e,t),decoderError:ie(e.error)})}function ot(e){const t=e.get_results_count(),r=[];for(let t=0;t<e.get_warnings_count();t++){const n=ie(e.get_warning_at(t));null!=n&&r.push(n)}const n=rt(e,t);return new Je({resultsCount:t,results:n,warnings:r,decoderError:ie(e.error)})}function it(e){const t=e.get_results_count();return new Oe({resultsCount:t,results:rt(e,t),decoderError:ie(e.error)})}function st(e){const t=e.get_results_count();return new Qe({resultsCount:t,results:rt(e,t),decoderError:ie(e.error)})}function lt(e){const t=e.get_results_count();return new Xe({resultsCount:t,results:rt(e,t),decoderError:ie(e.error)})}function dt(e){const t=e.get_results_count();return new tt({resultsCount:t,results:rt(e,t),decoderError:ie(e.error)})}function ct(e){const t=e.get_results_count();return new Ee({resultsCount:t,results:rt(e,t),decoderError:ie(e.error)})}function pt(e){const t=e.get_results_count();return new ze({resultsCount:t,results:rt(e,t),decoderError:ie(e.error)})}function ut(e){return new Ue({decoderError:ie(e.error)})}var yt=r(93637),gt=r(64108),ht=r(39357),ft=r(53177),wt=r(76357),mt=r(41628);let _t=class extends u.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,p.Cg)([(0,y.MZ)()],_t.prototype,"name",void 0),(0,p.Cg)([(0,y.MZ)()],_t.prototype,"supportedCategory",void 0),(0,p.Cg)([(0,y.MZ)()],_t.prototype,"analyzers",void 0),(0,p.Cg)([(0,y.MZ)()],_t.prototype,"searchProperties",void 0),_t=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.SearchIndex")],_t);let vt=!1;function bt(e){return e.deleteLater(),new X(At(e))}function Ct(e){return e.deleteLater(),new H({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:Pt(e.fields)})}function At(e){return{name:e.name,alias:e.alias,role:(0,yt.i7)(Me.Eq,e.role.value),strict:e.strict,properties:St(e.properties),fieldIndexes:kt(e.field_indexes)}}function Tt(e){return e.deleteLater(),new W({alias:e.alias,name:e.name,fieldType:(0,yt.i7)(Me.r5,e.field_type.value)??void 0,geometryType:(0,yt.i7)(Me.bV,e.geometry_type.value)??null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:(0,yt.i7)(Me.ti,e.role.value),defaultValue:e.default_value,domain:e.domain})}let xt=class extends wt.A{};function Mt(e){return 2===e.get_domain_type().value?new mt.A({name:e.name,minValue:e.range_domain.value_at(0),maxValue:e.range_domain.value_at(1)}):1===e.get_domain_type().value?new ft.A({name:e.name,codedValues:Et(e)}):new xt({name:e.name})}function Gt(e){e.deleteLater();const t=At(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new ee(Object.assign({endPoints:r},t))}function Rt(e){return new te({behavior:e.behavior,value:e.value})}function Dt(e){const t=[];for(let r=0;r<e.size();r++)t.push(bt(e.get(r)));return e.delete(),t}function Pt(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function St(e){const t=[];for(let r=0;r<e.size();r++){const n=Tt(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(vt=!0),t.push(n)}return e.delete(),t}function kt(e){const t=[];for(let r=0;r<e.size();r++)t.push(Ct(e.get(r)));return e.delete(),t}function It(e){const t=[];for(let r=0;r<e.size();r++)t.push(Gt(e.get(r)));return e.delete(),t}function jt(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(Rt(n))}return e.delete(),t}function Zt(e){const t=[];for(let r=0;r<e.size();r++){const n=new _t,a=e.get(r);n.name=a.name,n.supportedCategory=(0,yt.i7)(Me.nP,a.supported_category.value);const o=a.analyzers.size();for(let e=0;e<o;e++)n.analyzers.push({name:a.analyzers.get(e).name});a.analyzers.delete();for(let e=0;e<a.search_properties.keys().size();e++){const t=a.search_properties.keys().get(e),r=a.search_properties.get(t),o=[];for(let e=0;e<r.property_names.size();e++)o.push(r.property_names.get(e));n.searchProperties.set(t,{propertyNames:o})}t.push(n)}return e.delete(),t}function qt(e){const t=[];for(let r=0;r<e.domains_count();r++){const n=e.domain_at(r);n.deleteLater(),t.push(Mt(n))}return t}function Et(e){const t=[];for(let r=0;r<e.coded_value_domain.coded_values_count();r++){const n=e.coded_value_domain.coded_value_at(r);n.deleteLater(),t.push(new ht.A({name:n.name,code:n.get_code()}))}return t}xt=(0,p.Cg)([(0,gt.$)("esri.rest.knowledgeGraph.wasmInterface.wasmToDataModelFactories")],xt);var Ft=r(25927),Nt=(r(77901),r(40662)),Lt=r(42095),Ot=r(23150);function $t(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=Ut(e,r),{coords:a,geometry_type:o,lengths:s}=e;if(o.value!==t)throw new i.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let l=0;return s.forEach(e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=a[l],l++;t.push(e)}r.paths.push(t)}),r}function Ut(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}const Kt=()=>s.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function zt(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case 1:return function(e,t){const r={spatialReference:t};let n=2;Ut(e,r);const a=e.coords;return r.x=a[0],r.y=a[1],e.has_z&&(r.z=a[n],n++),e.has_m&&(r.m=a[n]),new pe.A(r)}(e,r);case 2:return function(e,t){const r={spatialReference:t},n=Ut(e,r),a=e.lengths,o=e.coords,i=a[0];r.points=[];let s=0;for(let e=0;e<i;e++){const e=[];for(let t=0;t<n;t++)e[t]=o[s],s++;r.points.push(e)}return new ce.A(r)}(e,r);case 3:return function(e,t){const{paths:r,hasM:n,hasZ:a}=$t(e,3);return new ye.A({paths:r,hasM:n,hasZ:a,spatialReference:t})}(e,r);case 4:return function(e,t){const{paths:r,hasM:n,hasZ:a}=$t(e,4);return new ue.A({rings:r,hasM:n,hasZ:a,spatialReference:t})}(e,r);case 5:case 7:return Kt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;default:return Kt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return Kt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case 0:return function(e,t,r){return new Nt.A(Jt(e,t,r))}(e,t,r);case 1:return Vt(e,t,r);case 2:return Bt(e,t,r);case 3:return function(e,t,r){const n=e.entity_count(),a=e.relationship_count(),o=[];for(let i=0;i<n;i++)o.push(Vt(e.get_entity_at(i),t,r)),i<a&&o.push(Bt(e.get_relationship_at(i),t,r));return new Lt.A({path:o})}(e,t,r);case 4:return function(e,t,r){const n=[],a=e.count();for(let o=0;o<a;o++){const a=e.get_value_at(o);n.push(zt(a,t,r))}return n}(e,t,r);default:return Kt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function Vt(e,t,r){const n=e.type_name,a=Jt(e,t,r),o=e.get_id();return new Ft.A(Object.assign({typeName:n,id:o},a))}function Jt(e,t,r){const n={},a=e.key_count();for(let o=0;o<a;o++)n[e.get_key_at(o)]=zt(e.get_value_at(o),t,r);return{properties:n}}function Bt(e,t,r){const n=e.type_name,a=Jt(e,t,r);return new Ot.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},a))}function Qt(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new c.A(e.get_out_sr());return new V({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit(),dataModelTimestamp:e.data_model_timestamp?new Date(e.data_model_timestamp):null})}let Ht=class extends u.A{constructor(e){super(e),this.asyncStatusUrl=null,this.createReplicaResult=null}};(0,p.Cg)([(0,y.MZ)()],Ht.prototype,"asyncStatusUrl",void 0),(0,p.Cg)([(0,y.MZ)()],Ht.prototype,"createReplicaResult",void 0),Ht=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.CreateReplicaResponse")],Ht);let Wt=class extends u.A{constructor(e){super(e),this.replicaName=null,this.replicaId=null,this.replicaOwner=null,this.lastSyncDate=null,this.creationDate=null,this.syncDirection=null,this.replicaFilters=null}};(0,p.Cg)([(0,y.MZ)()],Wt.prototype,"replicaName",void 0),(0,p.Cg)([(0,y.MZ)()],Wt.prototype,"replicaId",void 0),(0,p.Cg)([(0,y.MZ)()],Wt.prototype,"replicaOwner",void 0),(0,p.Cg)([(0,y.MZ)()],Wt.prototype,"lastSyncDate",void 0),(0,p.Cg)([(0,y.MZ)()],Wt.prototype,"creationDate",void 0),(0,p.Cg)([(0,y.MZ)()],Wt.prototype,"syncDirection",void 0),(0,p.Cg)([(0,y.MZ)()],Wt.prototype,"replicaFilters",void 0),Wt=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ReplicaDefinition")],Wt);let Yt=class extends u.A{constructor(e){super(e),this.replicas=[]}};(0,p.Cg)([(0,y.MZ)()],Yt.prototype,"replicas",void 0),Yt=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ReplicasInformationResponse")],Yt);let Xt=class extends u.A{constructor(e){super(e),this.decoderError=null,this.unregisterReplicaResults=[]}};function er(e,t){const r=[];for(let n=0;n<e;n++)r.push(t(n));return r}function tr(e){return{replicaName:e.get_replica_name(),replicaId:e.get_replica_id(),lastSyncDate:gr(e.get_last_sync_date())}}function rr(e){return{replicaId:e.get_replica_id(),error:e.has_error()?ie(e.get_error()):void 0}}function nr(e){const t=e.get_static_definition();t.deleteLater();const r=function(e){const t=[],r=[];for(let r=0;r<e.get_entity_type_replica_definition_count();r++){const n=e.get_entity_type_replica_definition_at(r);n.deleteLater(),t.push(ir(n))}for(let t=0;t<e.get_relationship_type_replica_definition_count();t++){const n=e.get_relationship_type_replica_definition_at(t);n.deleteLater(),r.push(sr(n))}return{entityTypeReplicaDefinitions:t,relationshipTypeReplicaDefinitions:r}}(t);return{transform:ar(e.transform),inputSpatialReference:new c.A(e.input_spatial_reference),staticDefinition:r}}function ar(e){return{quantizeOriginPosition:or(e.quantizeOriginPosition.value),scale:{xScale:e.scale.xScale,yScale:e.scale.yScale,mScale:e.scale.mScale,zScale:e.scale.zScale},translate:{xTranslate:e.translate.xTranslate,yTranslate:e.translate.yTranslate,mTranslate:e.translate.mTranslate,zTranslate:e.translate.zTranslate}}}function or(e){switch(e){case _e.g.lowerLeft:return"lower-left";case _e.g.upperLeft:default:return"upper-left"}}function ir(e){const t=e.document_options.get_include_connected_documents();return t?.deleteLater(),{...lr(e),documentOptions:t?dr(t):{includeConnectedDocuments:!1}}}function sr(e){return lr(e)}function lr(e){const t=e.provenance_options;return t.deleteLater(),{typeName:e.type_name,openCypherWhereClause:e.open_cypher_where_clause,provenanceOptions:cr(t)}}function dr(e){const t=e.get_provenance_options();t.deleteLater();const r=cr(t);return r.includeProvenance?{includeConnectedDocuments:!0,includeDocumentProvenance:!0,includeDocumentSourceDocuments:r.includeSourceDocuments}:{includeConnectedDocuments:!0,includeDocumentProvenance:!1}}function cr(e){const t=e.get_include_provenance();return t?{includeProvenance:!0,includeSourceDocuments:pr(t)}:{includeProvenance:!1}}function pr(e){return e.get_include_source_documents()}function ur(e,t){const r=e.value,n=t.SyncDirection;if(r===n.BIDIRECTIONAL.value)return"bidirectional";if(r===n.UPLOAD.value)return"upload";if(r===n.DOWNLOAD.value)return"download";throw new i.A("knowledge-graph:replica-invalid-sync-direction",`Unsupported replica sync direction value: ${r}`)}function yr(e){switch(e.value){case 1:return"pbf";case 2:return"spbf";case 3:return"geoparquet";case 4:return"sqlite";default:throw new i.A("knowledge-graph:replica-invalid-sync-data-format",`Unsupported replica sync data format value: ${e.value}`)}}function gr(e){return e?new Date(e):null}(0,p.Cg)([(0,y.MZ)()],Xt.prototype,"decoderError",void 0),(0,p.Cg)([(0,y.MZ)()],Xt.prototype,"unregisterReplicaResults",void 0),Xt=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.UnregisterReplicaResponse")],Xt);let hr=class extends u.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.username=null,this.timestamp=null,this.editResults=[],this.cascadeRelationshipDeleteResults=[],this.cascadeProvenanceDeleteResults=[]}};(0,p.Cg)([(0,y.MZ)()],hr.prototype,"hasError",void 0),(0,p.Cg)([(0,y.MZ)()],hr.prototype,"error",void 0),(0,p.Cg)([(0,y.MZ)()],hr.prototype,"username",void 0),(0,p.Cg)([(0,y.MZ)()],hr.prototype,"timestamp",void 0),(0,p.Cg)([(0,y.MZ)()],hr.prototype,"editResults",void 0),(0,p.Cg)([(0,y.MZ)()],hr.prototype,"cascadeRelationshipDeleteResults",void 0),(0,p.Cg)([(0,y.MZ)()],hr.prototype,"cascadeProvenanceDeleteResults",void 0),hr=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],hr);const fr=hr;function wr(e){const t=e.has_error(),r=function(e){const t=e.get_apply_edits_metadata();t.deleteLater();const r=t.get_username(),n=t.get_timestamp();return{username:r,timestamp:null!=n?new Date(n):null}}(e),n=new fr({hasError:t,error:t?ie(e.error):null});n.username=r.username,n.timestamp=r.timestamp;const a=e.get_edit_results_count();for(let t=0;t<a;t++){const r=e.get_edit_results_at(t);r.deleteLater();const a=e.get_edit_results_type_name_at(t),o=[],i=[],s=[],l=r.get_add_results_count(),d=r.get_update_results_count(),c=r.get_delete_results_count();for(let e=0;e<l;e++){const t=r.get_add_result_at(e);t.deleteLater(),o.push({id:t.id,error:ie(t.error)})}for(let e=0;e<d;e++){const t=r.get_update_result_at(e);t.deleteLater(),i.push({id:t.id,error:ie(t.error)})}for(let e=0;e<c;e++){const t=r.get_delete_result_at(e);t.deleteLater(),s.push({id:t.id,error:ie(t.error)})}n.editResults.push({typeName:a,adds:o,updates:i,deletes:s})}const o=e.get_cascaded_rel_deletes_count();for(let t=0;t<o;t++){const r=e.get_cascaded_rel_deletes_at(t);r.deleteLater();const a=e.get_cascaded_rel_deletes_type_name_at(t),o=[];for(let e=0;e<r.get_count();e++){const t=r.get_result_at(e);t.deleteLater(),o.push({id:t.id,originId:t.origin_id,destinationId:t.dest_id,error:ie(t.error)})}n.cascadeRelationshipDeleteResults.push({typeName:a,cascadeRelationshipDeletes:o})}if(e.has_cascading_provenance_deletes()){const t=e.get_cascading_provenance_deletes();t.deleteLater();const r=t.get_count();for(let e=0;e<r;e++){const r=t.get_result_at(e);r.deleteLater(),n.cascadeProvenanceDeleteResults.push({id:r.id,error:ie(r.error)})}}return n}const mr=new Map,_r=()=>new Map(mr.entries()),vr={fetchKnowledgeGraph:async e=>{const t=new ae({url:e}),r=[];return r.push(Fr(t)),r.push(Nr(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await dn(e)},refreshServiceDefinition:async e=>{const t=(await(0,o.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new ne(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],a=(await Xr(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,o=`/rest/services/${a&&a<12?"System":"Utilities"}/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`;return await Yr(`${n}${o}`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],a=(await Xr(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,o=`/rest/services/${a&&a<12?"System":"Utilities"}/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,s=await Xr(`${n}${o}`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(s.data.results.length<1)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",s);let l;for(const e of s.data.results)if("out_results_string"===e.paramName){l=e.value;break}if(!l)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",s);return l},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await en(e);const a=await rn(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new i.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");a.data.body=await async function(e,t){const r=await(0,de.I)(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,a]of Object.entries(e.bindParameters))tn(t,a,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await Fr(t),4326!==t.dataModel?.spatialReference?.wkid)throw new i.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:ge[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const a=n.get_encoding_result();if(0!==a.error.error_code)throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:a.error.error_code,errorMessage:a.error.error_message});return structuredClone(a.get_byte_buffer())}(t,e);const o=await Wr(a.data.url,a.data);if(e.dataModel){const t=await ln(o,e.dataModel);return new B({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported||null!=e.dataModel.arcgisManaged&&!e.dataModel.arcgisManaged)throw new i.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await en(e);const a=await rn(n,r);return a.data.body=await async function(e,t){if(t.dataModel||await Fr(t),!t.dataModel)throw new i.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,de.I)(),n=!!e.options?.cascadeDelete,a=!!e.options?.cascadeProvenanceDelete,o=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());o.deleteLater(),o.cascade_delete=n,o.cascade_delete_provenance=a;try{let t;e.entityAdds?.forEach(e=>{t=o.add_entity(Ge(e,r)),oe(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipAdds?.forEach(e=>{if(!e.originId||!e.destinationId)throw new i.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=o.add_relationship(Ge(e,r)),oe(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_entity(Ge(e,r)),oe(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")}),e.relationshipUpdates?.forEach(e=>{if(!e.id)throw new i.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_relationship(Ge(e,r)),oe(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")}),e.entityDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach(e=>{t.delete_by_id(e)})}),e.relationshipDeletes?.forEach(e=>{if(!e.typeName)throw new i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!1);e.ids?.forEach(e=>{t.delete_by_id(e)})}),o.encode()}catch(e){throw new i.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=o.get_encoding_result();return oe(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(s.get_byte_buffer())}(t,e),async function(e){return nn(e,(await(0,de.I)()).GraphApplyEditsDecoder,wr)}(await Wr(a.data.url,a.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new i.A("knowledge-graph:no-arguments","The operation to add types to the data model contained no values");const n=`${e.url}/dataModel/edit/namedTypes/add`;await en(e);const a=await rn(n,r);a.data.body=await async function(e){const t=await(0,de.I)(),r=new t.GraphNamedObjectTypeAddsRequestEncoder;r.deleteLater(),e.newEntityTypes?.forEach(e=>{r.add_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),Se(e,t,r)}(e,t))}),e.newRelationshipTypes?.forEach(e=>{r.add_relationship_type(function(e,t){const r=new t.RelationshipType;r.deleteLater();for(const n of e.endPoints){const e=new t.EndPoint;e.deleteLater(),e.origin_entity_type=n.originEntityType,e.dest_entity_type=n.destinationEntityType,r.add_end_point(e)}return Se(e,t,r)}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed",{error:e})}const n=r.get_encoding_result();return oe(n.error,"knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed"),structuredClone(n.get_byte_buffer())}(t);const o=await Wr(a.data.url,a.data),s=await async function(e){return nn(e,(await(0,de.I)()).GraphNamedObjectTypeAddsResponseDecoder,nt)}(o);return s.updatedKnowledgeGraph=await Er(e.url),s},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to delete a named type from the data model contained no value");const n=`${e.url}/dataModel/edit/namedTypes/${t}/delete`;await en(e);const a=await rn(n,r);a.data.body="";const o=await Wr(a.data.url,a.data),s=await async function(e){return nn(e,(await(0,de.I)()).GraphNamedObjectTypeDeleteResponseDecoder,ot)}(o);return s.updatedKnowledgeGraph=await Er(e.url),s},executeUpdateNamedType:async(e,t,r,n)=>{if(!t&&!Object.keys(r).length)throw new i.A("knowledge-graph:no-arguments","The operation to update types in the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/update`;await en(e);const o=await rn(a,n);o.data.body=await async function(e,t,r){const n=await(0,de.I)(),a=new n.GraphNamedObjectTypeUpdateRequestEncoder;if(a.deleteLater(),r.entityTypes.some(e=>e.name===t))a.update_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),ke(e,r)}(e,n));else{if(!r.relationshipTypes.some(e=>e.name===t))throw new i.A("knowledge-graph:updateNamedType-encoding-failed","The named type you are trying to update does not exist in the data model");a.update_relationship_type(function(e,t){const r=new t.RelationshipType;return r.deleteLater(),ke(e,r)}(e,n))}a.update_alias=e.hasOwnProperty("alias");try{a.encode()}catch(e){throw new i.A("knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed",{error:e})}const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed"),structuredClone(o.get_byte_buffer())}(r,t,e.dataModel);const s=await Wr(o.data.url,o.data),l=await async function(e){return nn(e,(await(0,de.I)()).GraphNamedObjectTypeUpdateResponseDecoder,at)}(s);return l.updatedKnowledgeGraph=await Er(e.url),l},executeAddGraphProperties:async(e,t,r,n)=>{if(!t&&!r.length)throw new i.A("knowledge-graph:no-arguments","The operation to add properties to the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/add`;await en(e);const o=await rn(a,n);o.data.body=await async function(e){const t=await(0,de.I)(),r=new t.GraphPropertyAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_graph_property(Re(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed",{error:e})}const n=r.get_encoding_result();return oe(n.error,"knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed"),structuredClone(n.get_byte_buffer())}(r);const s=await Wr(o.data.url,o.data),l=await async function(e){return nn(e,(await(0,de.I)()).GraphPropertyAddsResponseDecoder,it)}(s);return l.updatedKnowledgeGraph=await Er(e.url),l},executeDeleteGraphProperty:async(e,t,r,n)=>{if(!t&&!r)throw new i.A("knowledge-graph:no-arguments","The operation to delete property contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/delete`;await en(e);const o=await rn(a,n);o.data.body=await async function(e){const t=new((await(0,de.I)()).GraphPropertyDeleteRequestEncoder);t.deleteLater(),t.field_name=e;try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed"),structuredClone(r.get_byte_buffer())}(r);const s=await Wr(o.data.url,o.data),l=await async function(e){return nn(e,(await(0,de.I)()).GraphPropertyDeleteResponseDecoder,st)}(s);return l.updatedKnowledgeGraph=await Er(e.url),l},executeUpdateGraphProperty:async(e,t,r,n,a)=>{if(!t&&!r&&!Object.keys(n).length)throw new i.A("knowledge-graph:no-arguments","The operation to update properties in the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/update`;await en(e);const s=await rn(o,a);s.data.body=await async function(e,t){const r=await(0,de.I)(),n=new r.GraphPropertyUpdateRequestEncoder;n.deleteLater(),n.update_graph_property(function(e,t){const r=new t.GraphProperty;return r.deleteLater(),e.hasOwnProperty("alias")&&(r.alias=e.alias),e.hasOwnProperty("editable")&&(r.editable=e.editable),e.hasOwnProperty("required")&&(r.required=e.required),e.hasOwnProperty("defaultVisibility")&&(r.default_visibility=e.defaultVisibility),e.hasOwnProperty("defaultValue")&&(r.default_value=Ie(e.defaultValue,t)),e.hasOwnProperty("domain")&&(r.domain=e.domain),r}(t,r)),n.set_property_name(e),n.update_alias=t.hasOwnProperty("alias"),n.update_editable=t.hasOwnProperty("editable"),n.update_required=t.hasOwnProperty("required"),n.update_visible=t.hasOwnProperty("defaultVisibility"),n.update_default_value=t.hasOwnProperty("defaultValue"),n.update_domain=t.hasOwnProperty("domain");try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed",{error:e})}const a=n.get_encoding_result();return oe(a.error,"knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed"),structuredClone(a.get_byte_buffer())}(r,n);const l=await Wr(s.data.url,s.data),d=await async function(e){return nn(e,(await(0,de.I)()).GraphPropertyUpdateResponseDecoder,lt)}(l);return d.updatedKnowledgeGraph=await Er(e.url),d},executeAddGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/add`;await en(e);const o=await rn(a,n);o.data.body=await async function(e){const t=await(0,de.I)(),r=new t.GraphIndexAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_field_index(function(e,t){const r=new t.FieldIndex;r.deleteLater(),r.name=e.name,r.unique=e.unique,r.ascending=e.ascending,r.description=e.description??"";for(const t of e.fieldNames)r.add_field(t);return r}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed",{error:e})}const n=r.get_encoding_result();return oe(n.error,"knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed"),structuredClone(n.get_byte_buffer())}(r);const s=await Wr(o.data.url,o.data),l=await async function(e){return nn(e,(await(0,de.I)()).GraphIndexAddsResponseDecoder,ct)}(s);return l.updatedKnowledgeGraph=await Er(e.url),l},executeDeleteGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/delete`;await en(e);const o=await rn(a,n);o.data.body=await async function(e){const t=new((await(0,de.I)()).GraphIndexDeleteRequestEncoder);t.deleteLater(),e.forEach(e=>{t.add_index_name(e)});try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed"),structuredClone(r.get_byte_buffer())}(r);const s=await Wr(o.data.url,o.data),l=await async function(e){return nn(e,(await(0,de.I)()).GraphIndexDeleteResponseDecoder,pt)}(s);return l.updatedKnowledgeGraph=await Er(e.url),l},executeUpdateSearchIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!Object.keys(r.addSearchProperties??{}).length&&!Object.keys(r.removeSearchProperties??{}).length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty properties values");const a=`${e.url}/dataModel/searchIndex/update`;await en(e);const o=await rn(a,n);o.data.body=await async function(e,t){const r=await(0,de.I)(),n=new r.GraphUpdateSearchIndexRequestEncoder;n.deleteLater(),t.hasOwnProperty("addSearchProperties")&&n.insert_add_search_property(e,De(t.addSearchProperties,r)),t.hasOwnProperty("removeSearchProperties")&&n.insert_delete_search_property(e,De(t.removeSearchProperties,r));try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed",{error:e})}const a=n.get_encoding_result();return oe(a.error,"knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed"),structuredClone(a.get_byte_buffer())}(t,r);const s=await Wr(o.data.url,o.data),l=await async function(e){return nn(e,(await(0,de.I)()).GraphUpdateSearchIndexResponseDecoder,dt)}(s);return l.updatedKnowledgeGraph=await Er(e.url),l},executeAddDomain:async(e,t,r,{mergePolicy:n="esriMergePolicyTypeDefaultValue",splitPolicy:a="esriSplitPolicyTypeDefaultValue"},o)=>{const s=`${e.url}/dataModel/domains/add`;await en(e);const l=await rn(s,o);l.data.body=await async function(e,t,r){const n=await(0,de.I)(),a=new n.GraphDomainAddRequestEncoder;a.deleteLater(),a.set_domain(Pe(e,n,t,r));try{a.encode()}catch(e){throw new i.A("knowledge-graph:addDomain-encoding-failed","Attempting to encode the domain failed",{error:e})}const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:addDomain-encoding-failed","Attempting to encode the domain failed"),structuredClone(o.get_byte_buffer())}(t,r,{mergePolicy:n,splitPolicy:a});const d=await Wr(l.data.url,l.data),c=await async function(e){return nn(e,(await(0,de.I)()).GraphDomainAddResponseDecoder,ut)}(d);return c.updatedKnowledgeGraph=await Er(e.url),c},executeUpdateDomain:async(e,t,r,n,a)=>{const o=`${e.url}/dataModel/domains/${t.name}/update`;await en(e);const s=await rn(o,a);s.data.body=await async function(e,t,r){const n=await(0,de.I)(),a=new n.GraphDomainUpdateRequestEncoder;a.deleteLater(),a.set_domain(Pe(e,n,t,r)),a.update_domain=!0,r?.mergePolicy&&(a.update_merge_policy=!0),r?.splitPolicy&&(a.update_split_policy=!0);try{a.encode()}catch(e){throw new i.A("knowledge-graph:updateDomain-encoding-failed","Attempting to encode the domain failed",{error:e})}const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:updateDomain-encoding-failed","Attempting to encode the domain failed"),structuredClone(o.get_byte_buffer())}(t,r,n);const l=await Wr(s.data.url,s.data),d=await async function(e){return nn(e,(await(0,de.I)()).GraphDomainUpdateResponseDecoder,ut)}(l);return d.updatedKnowledgeGraph=await Er(e.url),d},executeDeleteDomain:async(e,t,r)=>{const n=`${e.url}/dataModel/domains/${t}/delete`;if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to delete a domain from the data model contained missing or empty domain name");await en(e);const a=await rn(n,r);a.data.body="";const o=await Wr(a.data.url,a.data),s=await async function(e){return nn(e,(await(0,de.I)()).GraphDomainDeleteResponseDecoder,ut)}(o);return s.updatedKnowledgeGraph=await Er(e.url),s},executeCreateReplica:async(e,t,r)=>{const n=`${e.url}/replicas/create`;await en(e);const a=await rn(n,r);return a.data.body=await async function(e){const t=function(e,t){const r=new t.CreateReplicaRequestEncoder;return r.deleteLater(),e.requestedReplicaId&&(r.replica_id=e.requestedReplicaId),e.requestedReplicaName&&(r.requested_replica_name=e.requestedReplicaName),r.sync_direction=function(e,t){const r=t.SyncDirection,n=e.toUpperCase(),a=r?.[n];if(!a)throw new i.A("knowledge-graph:replica-invalid-sync-direction",`Unsupported replica sync direction: ${e}`);return a}(e.syncDirection,t),r.sync_data_format=function(e,t){const r=t.SyncDataFormat,n=e.toUpperCase(),a=r?.[n];if(!a)throw new i.A("knowledge-graph:replica-invalid-sync-data-format",`Unsupported replica sync data format: ${e}`);return a}(e.syncDataFormat,t),r.async=!1,"reference"===e.type&&(r.reference_replica=function(e,t){const r=new t.ReferenceReplica;return r.deleteLater(),r.replica_id=e.replicaId,r}(e.referenceReplica,t)),"filter"===e.type&&(r.replica_filters=function(e,t){const r=function(e,t){const r=new t.StaticDefinition;r.deleteLater();const n=e.entityTypeReplicaDefinitions??[],a=e.relationshipTypeReplicaDefinitions??[];if(n.length<1&&a.length<1)throw new i.A("knowledge-graph:replica-invalid-static-definition","A Filter Replica static definition must include at least one entity type or relationship type replica definition");for(const e of n)r.add_entity_type_replica_definition(be(e,t));for(const e of a)r.add_relationship_type_replica_definition(Ce(e,t));return r}(e.staticDefinition,t),n=new t.ReplicaFilters(r);return n.deleteLater(),e.transform&&(n.transform=function(e){return{quantizeOriginPosition:{value:ve(e?.quantizeOriginPosition)},scale:{xScale:e.scale.xScale,yScale:e.scale.yScale,mScale:e.scale.mScale,zScale:e.scale.zScale},translate:{xTranslate:e.translate.xTranslate,yTranslate:e.translate.yTranslate,mTranslate:e.translate.mTranslate,zTranslate:e.translate.zTranslate}}}(e.transform)),e.inputSpatialReference&&(n.input_spatial_reference=e.inputSpatialReference),n}(e.replicaFilters,t)),r}(e,await(0,de.I)());try{t.encode()}catch(e){throw new i.A("knowledge-graph:createReplica-encoding-failed","Attempting to encode createReplica failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:createReplica-encoding-failed","Attempting to encode createReplica failed"),structuredClone(r.get_byte_buffer())}(t),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,de.I)()).CreateReplicaResponseDecoder);try{return r.decode(new Uint8Array(t)),r.has_error()&&oe(r.error,"knowledge-graph:createReplica-decoding-error","An error occurred while decoding the createReplica response"),function(e){const t=new Ht;if(e.has_async_status_url()&&(t.asyncStatusUrl=e.get_async_status_url()),e.has_create_replica_result()){const r=e.get_create_replica_result();r.deleteLater(),t.createReplicaResult=function(e){return{errors:er(e.get_error_count(),e.get_error_at),warnings:er(e.get_warning_count(),e.get_warning_at),replicaName:e.get_replica_name(),requestedReplicaName:e.get_requested_replica_name(),replicaId:e.get_replica_id(),syncDate:gr(e.get_sync_date()),replicaDataFormat:yr(e.get_replica_data_format()),replicaDataUrl:e.get_replica_data_url()}}(r)}return t}(r)}finally{r.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response for createReplica",{responseType:t,data:await e.text()})}(await Wr(a.data.url,a.data))},fetchReplicaDefinition:async(e,t,r)=>{const n=`${e.url}/replicas/${t}`,a=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",...r?.query},signal:r?.signal,timeout:r?.timeout}),s=a.getHeader?.("content-type"),l=a.data;if(s?.includes("application/x-protobuf")){const e=await(0,de.I)(),t=new e.ReplicaDefinitionResponseDecoder;return t.deleteLater(),t.decode(new Uint8Array(l)),t.has_error()&&oe(t.error,"knowledge-graph:fetchReplica-decoding-error","An error occurred while decoding the replica definition response"),function(e,t){const r=e.get_replica_definition();r.deleteLater();const n=r.get_replica_filters();return n.deleteLater(),new Wt({replicaName:r.get_replica_name(),replicaId:r.get_replica_id(),replicaOwner:r.get_replica_owner(),lastSyncDate:gr(r.get_last_sync_date()),creationDate:gr(r.get_creation_date()),syncDirection:ur(r.get_sync_direction(),t),replicaFilters:nr(n)})}(t,e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching a replica",{responseType:s,data:a.data})},fetchReplicasInformation:async(e,t)=>{const r=`${e.url}/replicas`,n=await(0,o.A)(r,{responseType:"array-buffer",query:{f:"pbf",...t?.query},signal:t?.signal,timeout:t?.timeout}),a=n.getHeader?.("content-type"),s=n.data;if(a?.includes("application/x-protobuf")){const e=new((await(0,de.I)()).ReplicasResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&oe(e.error,"knowledge-graph:fetchReplicasInformation-decoding-error","An error occurred while decoding the replicas information response"),function(e){const t=[];for(let r=0;r<e.get_replicas_count();r++){const n=e.get_replica_info_at(r);n.deleteLater(),t.push(tr(n))}return new Yt({replicas:t})}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching replicas information",{responseType:a,data:n.data})},executeUnregisterReplica:async(e,t,r)=>{if(!0===t.unregisterAll&&"replicaIds"in t)throw new i.A("knowledge-graph:no-arguments","The operation to unregister replicas cannot include replica ids when unregisterAll is true");if(!0!==t.unregisterAll){const e="replicaIds"in t?t.replicaIds:void 0;if(!Array.isArray(e)||!e.some(e=>!!e))throw new i.A("knowledge-graph:no-arguments","The operation to unregister replicas requires at least one replica id")}const n=`${e.url}/replicas/unregister`;await en(e);const a=await rn(n,r);return a.data.body=await async function(e){const t=function(e,t){const r=new t.UnregisterReplicaRequestEncoder;if(r.deleteLater(),e.unregisterAll)r.set_unregister_all();else{const{replicaIds:t=[]}=e;t.forEach(e=>r.add_replica_id(e))}return r}(e,await(0,de.I)());try{t.encode()}catch(e){throw new i.A("knowledge-graph:unregisterReplica-encoding-failed","Attempting to encode unregisterReplica failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:unregisterReplica-encoding-failed","Attempting to encode unregisterReplica failed"),structuredClone(r.get_byte_buffer())}(t),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,de.I)()).UnregisterReplicaResponseDecoder);try{return r.decode(new Uint8Array(t)),r.has_error()&&oe(r.error,"knowledge-graph:unregisterReplica-decoding-error","An error occurred while decoding the unregisterReplica response"),function(e){const t=[];for(let r=0;r<e.get_unregister_replica_result_count();r++){const n=e.get_unregister_replica_result_at(r);n.deleteLater(),t.push(rr(n))}return new Xt({decoderError:ie(e.error)??null,unregisterReplicaResults:t})}(r)}finally{r.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response for unregisterReplica",{responseType:t,data:await e.text()})}(await Wr(a.data.url,a.data))},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,a=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=a.getHeader?.("content-type"),l=a.data;if(s?.includes("application/x-protobuf")){const t=new((await(0,de.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=sn({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new J({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:a.data})},executeSearch:async(e,t,r)=>{const n="provenance"===t.typeCategoryFilter?"metaEntityProvenance":t.typeCategoryFilter,a=`${e.url}/graph/search`,s=await(0,o.A)(a,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=s.getHeader?.("content-type"),d=s.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,de.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=sn({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new J({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await en(e);const a=await rn(n,r);a.data.body=await async function(e){const t=await(0,de.I)(),r=new t.GraphSearchRequestEncoder;r.deleteLater(),r.search_query=e.searchQuery;const n="provenance"===e.typeCategoryFilter?"meta_entity_provenance":e.typeCategoryFilter;if(r.type_category_filter=t.esriNamedTypeCategory[n],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(he(e.idsFilter,t))}catch(e){throw new i.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach(e=>{r.add_named_type_filter(e)});try{r.encode()}catch(e){throw new i.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const a=r.get_encoding_result();if(0!==a.error.error_code)throw new i.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:a.error.error_code,errorMessage:a.error.error_message});return structuredClone(a.get_byte_buffer())}(t);const o=await Wr(a.data.url,a.data);if(e.dataModel){const t=await ln(o,e.dataModel);return new B({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let n=mr.get(e.url||"");n||(n=new Map,mr.set(e.url||"",n));const a=new Map(n.entries()),o=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const s=await(0,de.I)(),l=se(t,n,s,r.ignoreCache),d=await rn(o,r.requestOptions);d.data.body=l;const c=await Wr(d.data.url,d.data),p=c.headers.get("content-type");if(p?.includes("application/x-protobuf")){const e=new s.ClientDataFetchResponseDecoder;e.deleteLater();const t=await c.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&oe(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const a=new Map;for(let o=0;o<e.get_results_count();o++){const i=e.get_result_at(o);if(2!==i.get_fetch_result_case().value||0!==i.error().error_code){const e=i.get_key().key_string;r.has(e)&&t.delete(e);continue}const s=i.get_value(),l=i.get_key().key_string,d=r.get(l);let c;if(2===s.get_data_case().value&&d)c=d.value;else{if(1!==s.get_data_case().value)continue;{c=s.get_data().client_data_string;const e=i.get_value().get_v_tag().v_tag;n||t.set(l,{key:l,version:e,value:c})}}a.set(l,c)}return a}(e,n,a,r.ignoreCache)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:p,data:c})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,n=await(0,o.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),a=n.getHeader?.("content-type"),s=n.data;if(a?.includes("application/x-protobuf")){const e=new((await(0,de.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&oe(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const n=t.get_key_at(e);1===n.get_client_data_key_type().value&&r.push(n.key_string)}return r}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:n.data})},clearClientDataCache:()=>mr.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=f.from(r||{}),async function(e,t,r,n,a){const i={},s={},l=[];return function(e,t,r){for(const n in e){const a=e[n];if(a&&"object"==typeof a&&a instanceof M.A){const{features:e}=a;r[n]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}}}(n,l,i),(0,w.el)(l).then(l=>{const{outSpatialReference:d,processExtent:c,processSpatialReference:p,returnColumnName:u,returnFeatureCollection:y,returnM:g,returnZ:h}=r,{path:f}=(0,b.Dl)(e);for(const e in i){const[t,r]=i[e];s[e]=l.slice(t,r)}const w=d?d.wkid||d:null,m=p?p.wkid||p:null,_="execute"===t?{returnColumnName:u||void 0,returnFeatureCollection:y||void 0,returnM:g||void 0,returnZ:h||void 0}:null,v=L({...c?{context:{extent:c,outSR:w,processSR:m}}:{"env:outSR":w,"env:processSR":m},...n,..._,f:"json"},null,s),C={...a,query:v};return(0,o.A)(`${f}/${t}`,C)})}(e,"submitJob",r,t??{},n).then(({data:t})=>{const r=z.fromJSON(t);return r.sourceUrl=e,r})}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,o.A)(e,t)};async function br(e,t,r){return vr.executeApplyEdits(e,t,r)}async function Cr(e,t,r){return vr.executeAddNamedTypes(e,t,r)}async function Ar(e,t,r){return vr.executeDeleteNamedType(e,t,r)}async function Tr(e,t,r,n){return vr.executeUpdateNamedType(e,t,r,n)}async function xr(e,t,r,n){return vr.executeAddGraphProperties(e,t,r,n)}async function Mr(e,t,r,n){return vr.executeDeleteGraphProperty(e,t,r,n)}async function Gr(e,t,r,n,a){return vr.executeUpdateGraphProperty(e,t,r,n,a)}async function Rr(e,t,r,n){return vr.executeAddGraphFieldIndex(e,t,r,n)}async function Dr(e,t,r,n){return vr.executeDeleteGraphFieldIndex(e,t,r,n)}async function Pr(e,t,r,n){return vr.executeUpdateSearchIndex(e,t,r,n)}async function Sr(e,t,r){return vr.executeQuery(e,t,r)}async function kr(e,t,r){return vr.executeQueryStreaming(e,t,r)}async function Ir(e,t,r){return vr.executeSearch(e,t,r)}async function jr(e,t,r){return vr.executeSearchStreaming(e,t,r)}function Zr(e,t){return vr.fetchAllClientDataKeys(e,t)}function qr(e,t,r){return vr.fetchClientDataAtKeys(e,t,r)}async function Er(e){return vr.fetchKnowledgeGraph(e)}async function Fr(e){return vr.refreshDataModel(e)}async function Nr(e){return vr.refreshServiceDefinition(e)}async function Lr(e,t){return vr.executeFindPathsAsynchronous(e,t)}async function Or(e,t){return vr.executeFindPaths(e,t)}async function $r(e,t){return vr.fetchAsynchronousFindPathsResultData(e,t)}async function Ur(e,t,r,n={mergePolicy:"esriMergePolicyTypeDefaultValue",splitPolicy:"esriSplitPolicyTypeDefaultValue"},a){return vr.executeAddDomain(e,t,r,n,a)}async function Kr(e,t,r,n,a){return vr.executeUpdateDomain(e,t,r,n,a)}async function zr(e,t,r){return vr.executeDeleteDomain(e,t,r)}async function Vr(e,t,r){return vr.executeCreateReplica(e,t,r)}async function Jr(e,t,r){return vr.fetchReplicaDefinition(e,t,r)}async function Br(e,t){return vr.fetchReplicasInformation(e,t)}async function Qr(e,t,r){return vr.executeUnregisterReplica(e,t,r)}function Hr(){return vr.clearClientDataCache()}async function Wr(e,t){return vr._fetchWrapper(e,t)}async function Yr(e,t,r,n){return vr._submitJobWrapper(e,t,r,n)}async function Xr(e,t){return vr._esriRequestWrapper(e,t)}async function en(e){const t=a.id?.findCredential(e.url);t||(e.dataModel?await dn(e):await Fr(e))}function tn(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof d.A?r.set_param_key_value(e,we(t,n)):Array.isArray(t)?r.set_param_key_value(e,he(t,n)):r.set_param_key_value(e,fe(t,n))}async function rn(e,t){return(0,o.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}async function nn(e,t,r){const n=e.headers.get("content-type");if(n?.includes("application/x-protobuf")){const n=await e.arrayBuffer(),a=new t;try{return a.decode(new Uint8Array(n)),r(a)}finally{a.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:await e.text()})}let an=50;function on(e){an=e}function sn({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:a=!1}){t&&e.push_buffer(new Uint8Array(t));const o=[];let s,l,d=0;const p=Date.now();let u=!0;for(;e.next_row();){s&&l||(s=n??Qt(e),l=s.outSpatialReference??new c.A({wkid:4326})),d||(d=e.get_header_keys().size());const t=new Array(d);for(let n=0;n<d;n++){const a=e.get_value(n);t[n]=zt(a,r,l)}if(o.push(t),a&&Date.now()-p>an){u=!1;break}}if(e.has_error())throw new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:s,resultRows:o,parsedAllResultsFromBuffer:u}}async function ln(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,de.I)()).GraphQueryDecoder);let a,o,d;n.deleteLater();const c=new Promise((e,t)=>{o=e,d=t});let p=!1,u=null;const y=new ReadableStream({pull:async function e(c){if(!r){const e=new i.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw d(e),e}const{done:y,value:g}=u?{done:!1,value:null}:await r.read().catch(e=>{throw d(e),r.releaseLock(),e});g&&(u=g);try{if(y){let e;if(n.has_error()?e=new i.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:n.error.error_code,errorMessage:n.error.error_message}):p||o(new V),r.releaseLock(),e)throw c.error(e),d(e),e;return void c.close()}const{resultHeader:s,resultRows:l,parsedAllResultsFromBuffer:h}=sn({wasmQueryDecoder:n,newArrayBufferToParse:g,dataModel:t,decodedHeader:a,limitMaxProcessingTime:!0});return h&&(u=null),!a&&s&&(a=s,o(s),p=!0),l.length>0?void c.enqueue(l):await e(c)}catch(e){throw s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),d(e),r.releaseLock(),(0,l.zf)(e)?e:new i.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:y,resultHeader:await c}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function dn(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,o.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),a=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,de.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(a));if(!e)throw new i.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),vt=!1;const t=new re({timestamp:e.timestamp,spatialReference:new c.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:(0,yt.i7)(Me.vy,e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value),databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:(0,yt.i7)(Me.wr,e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value)}},searchIndexes:Zt(e.search_indexes),entityTypes:Dt(e.entity_types),relationshipTypes:It(e.relationship_types),metaEntityTypes:Dt(e.meta_entity_types),provenanceSourceTypeValues:jt(e.provenance_source_type_values.value_behavior_array),domains:qt(e)});return vt&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type"),t}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1822],{53700(e,t,n){n.d(t,{a:()=>y,b:()=>c,c:()=>u,d:()=>m,g:()=>g,l:()=>i});var l=n(57990);const a="calciteInternalLabelClick",i="calciteInternalLabelConnected",c="calciteInternalLabelDisconnected",s="calcite-label",o=new WeakMap,r=new WeakMap,d=new WeakMap,b=new WeakMap,h=new Set;function u(e){if(!e)return;const t=(e=>{const{id:t}=e,n=t&&(0,l.q)(e,{selector:`${s}[for="${t}"]`});if(n)return n;const a=(0,l.c)(e,s);return!a||function(e,t){let n;const l="custom-element-ancestor-check",a=l=>{l.stopImmediatePropagation();const a=l.composedPath();n=a.slice(a.indexOf(t),a.indexOf(e))};return e.addEventListener(l,a,{once:!0}),t.dispatchEvent(new CustomEvent(l,{composed:!0,bubbles:!0})),e.removeEventListener(l,a),n.filter(n=>n!==t&&n!==e).filter(e=>e.tagName?.includes("-")).length>0}(a,e)?null:a})(e.el);if(r.has(t)&&t===e.labelEl||!t&&h.has(e))return;const n=E.bind(e);if(t){e.labelEl=t;const l=o.get(t)||[];l.push(e),o.set(t,l.sort(f)),r.has(e.labelEl)||(r.set(e.labelEl,p),e.labelEl.addEventListener(a,p)),h.delete(e),document.removeEventListener(i,d.get(e)),b.set(e,n),document.addEventListener(c,n)}else h.has(e)||(n(),document.removeEventListener(c,b.get(e)))}function m(e){if(!e)return;if(h.delete(e),document.removeEventListener(i,d.get(e)),document.removeEventListener(c,b.get(e)),d.delete(e),b.delete(e),!e.labelEl)return;const t=o.get(e.labelEl);1===t.length&&(e.labelEl.removeEventListener(a,r.get(e.labelEl)),r.delete(e.labelEl)),o.set(e.labelEl,t.filter(t=>t!==e).sort(f)),e.labelEl=null}function f(e,t){return(0,l.p)(e.el,t.el)?-1:1}function g(e){return e.label||e.labelEl?.textContent?.trim()||""}function p(e){const t=e.detail.sourceEvent.target,n=o.get(this),l=n.find(e=>e.el===t);if(n.includes(l))return;const a=n[0];a.disabled||a.onLabelClick(e)}function v(){h.has(this)&&u(this)}function E(){h.add(this);const e=d.get(this)||v.bind(this);d.set(this,e),document.addEventListener(i,e)}async function y(e){if(await e.componentOnReady(),o.has(e))return;const t=e.ownerDocument?.getElementById(e.for);t&&requestAnimationFrame(()=>{for(const e of h)if(e.el===t){u(e);break}})}},81822(e,t,n){n.r(t),n.d(t,{Label:()=>r});var l=n(64282),a=n(41276),i=n(19470),c=n(64083),s=n(53700);const o=a.AH`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=block]) .container,:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;class r extends i.WF{constructor(){super(),this.alignment="start",this.layout="default",this.scale="m",this.calciteInternalLabelClick=(0,c.c)({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],for:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=o}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(s.l))}willUpdate(e){e.has("for")&&(0,s.a)(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(s.b))}labelClickHandler(e){"Range"!==window.getSelection()?.type&&this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return a.qy`<div class=${(0,i.CP)("container")}><slot></slot></div>`}}(0,l.c)("calcite-label",r)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5030],{84989(e,t,n){n.d(t,{a:()=>y,b:()=>c,c:()=>u,d:()=>m,g:()=>g,l:()=>i});var l=n(48023);const a="calciteInternalLabelClick",i="calciteInternalLabelConnected",c="calciteInternalLabelDisconnected",s="calcite-label",o=new WeakMap,r=new WeakMap,d=new WeakMap,b=new WeakMap,h=new Set;function u(e){if(!e)return;const t=(e=>{const{id:t}=e,n=t&&(0,l.q)(e,{selector:`${s}[for="${t}"]`});if(n)return n;const a=(0,l.c)(e,s);return!a||function(e,t){let n;const l="custom-element-ancestor-check",a=l=>{l.stopImmediatePropagation();const a=l.composedPath();n=a.slice(a.indexOf(t),a.indexOf(e))};return e.addEventListener(l,a,{once:!0}),t.dispatchEvent(new CustomEvent(l,{composed:!0,bubbles:!0})),e.removeEventListener(l,a),n.filter(n=>n!==t&&n!==e).filter(e=>e.tagName?.includes("-")).length>0}(a,e)?null:a})(e.el);if(r.has(t)&&t===e.labelEl||!t&&h.has(e))return;const n=E.bind(e);if(t){e.labelEl=t;const l=o.get(t)||[];l.push(e),o.set(t,l.sort(f)),r.has(e.labelEl)||(r.set(e.labelEl,p),e.labelEl.addEventListener(a,p)),h.delete(e),document.removeEventListener(i,d.get(e)),b.set(e,n),document.addEventListener(c,n)}else h.has(e)||(n(),document.removeEventListener(c,b.get(e)))}function m(e){if(!e)return;if(h.delete(e),document.removeEventListener(i,d.get(e)),document.removeEventListener(c,b.get(e)),d.delete(e),b.delete(e),!e.labelEl)return;const t=o.get(e.labelEl);1===t.length&&(e.labelEl.removeEventListener(a,r.get(e.labelEl)),r.delete(e.labelEl)),o.set(e.labelEl,t.filter(t=>t!==e).sort(f)),e.labelEl=null}function f(e,t){return(0,l.p)(e.el,t.el)?-1:1}function g(e){return e.label||e.labelEl?.textContent?.trim()||""}function p(e){const t=e.detail.sourceEvent.target,n=o.get(this),l=n.find(e=>e.el===t);if(n.includes(l))return;const a=n[0];a.disabled||a.onLabelClick(e)}function v(){h.has(this)&&u(this)}function E(){h.add(this);const e=d.get(this)||v.bind(this);d.set(this,e),document.addEventListener(i,e)}async function y(e){if(await e.componentOnReady(),o.has(e))return;const t=e.ownerDocument?.getElementById(e.for);t&&requestAnimationFrame(()=>{for(const e of h)if(e.el===t){u(e);break}})}},52649(e,t,n){n.r(t),n.d(t,{Label:()=>r});var l=n(12159),a=n(41276),i=n(19470),c=n(64083),s=n(84989);const o=a.AH`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=block]) .container,:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;class r extends i.WF{constructor(){super(),this.alignment="start",this.layout="default",this.scale="m",this.calciteInternalLabelClick=(0,c.c)({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],for:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=o}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(s.l))}willUpdate(e){e.has("for")&&(0,s.a)(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(s.b))}labelClickHandler(e){"Range"!==window.getSelection()?.type&&this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return a.qy`<div class=${(0,i.CP)("container")}><slot></slot></div>`}}(0,l.c)("calcite-label",r)}}]);