@arcgis/core 5.2.0-next.157 → 5.2.0-next.159

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 (90) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{820c8aaf3632edb0150c.js → 0a5a9885ee6f5b5f99f0.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{7bcedf479b07a4b4a234.js → 1419bf346978b81b08cc.js} +1 -1
  4. package/assets/esri/core/workers/chunks/2cb209bc51a19487692d.js +2 -0
  5. package/assets/esri/core/workers/chunks/2e66c969bf4209c957b5.js +2 -0
  6. package/assets/esri/core/workers/chunks/31640b41e0ecdff892fa.js +2 -0
  7. package/assets/esri/core/workers/chunks/{2ef5237e4c876d6a4ee0.js → 340256866f524cb069f6.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{6079d27f4ab319fb8f0c.js → 377595b23379b0c8fe95.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{c5ed67fdf261cbb1624b.js → 4be559c53fe5ac0d0d2e.js} +1 -1
  10. package/assets/esri/core/workers/chunks/4e6656a5f29e31902fca.js +2 -0
  11. package/assets/esri/core/workers/chunks/{67ebc5a3d46b254b725c.js → 612345f17f5eeb99ea8f.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{44918ff37818a7d36d76.js → 6a0ec102962d2c7b4368.js} +1 -1
  13. package/assets/esri/core/workers/chunks/6a2562cc00727155fc01.js +1 -0
  14. package/assets/esri/core/workers/chunks/784d6c6949284ed6e10b.js +1 -0
  15. package/assets/esri/core/workers/chunks/{590e6c70206122e4cc3c.js → 844eedda8f749972f707.js} +2 -2
  16. package/assets/esri/core/workers/chunks/{d2347d6aa1c57fd57029.js → 8ff23ac0abeea0073b47.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{ec8b7476eac4718eb0ac.js → a504a5e06cb89a620799.js} +1 -1
  18. package/assets/esri/core/workers/chunks/a53823cf03dbdce1aecd.js +1 -0
  19. package/assets/esri/core/workers/chunks/{a556dd4e9e6d35e33a2c.js → a546ec82ba149e12f7bf.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{4a640548032355e57acd.js → ab6506a3c16f8717fc00.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{d65383f4058dc813f40d.js → ade5fdcd08dcbac74740.js} +1 -1
  22. package/assets/esri/core/workers/chunks/ba38231193919e093917.js +1 -0
  23. package/assets/esri/core/workers/chunks/{3f776d9fd2ab68b21fca.js → bbd44ac63d2a317d8ed9.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{35e5762642d1a3a2e375.js → be308db5b61a7246edfe.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{10445313d0d57b34511b.js → d53cc574a21031436c45.js} +1 -1
  26. package/assets/esri/core/workers/chunks/dc51dcaa4e2f9a90f5bd.js +2 -0
  27. package/assets/esri/core/workers/chunks/f63686735e4e52f5b54e.js +1 -0
  28. package/assets/esri/core/workers/chunks/{b573df59391ca41ee5a7.js → fc73737b41e086f0ce0b.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{3914d96147642a9d4b01.js → ffbcb816b611049a6276.js} +1 -1
  30. package/assets/esri/themes/base/widgets/_Weather.scss +1 -0
  31. package/assets/esri/themes/dark/main.css +1 -1
  32. package/assets/esri/themes/light/main.css +1 -1
  33. package/assets/esri/themes/light/view.css +1 -1
  34. package/config.js +1 -1
  35. package/form/elements.d.ts +46 -8
  36. package/form/elements.js +1 -1
  37. package/kernel.js +1 -1
  38. package/layers/GeoJSONLayer.d.ts +1 -1
  39. package/layers/support/layerOriginUtils.js +1 -1
  40. package/package.json +3 -3
  41. package/popup/FeaturesModel.js +1 -1
  42. package/time/TimeExtent.d.ts +1 -1
  43. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  44. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  45. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  46. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  47. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  48. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  49. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  50. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  51. package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
  52. package/views/View.js +1 -1
  53. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  54. package/views/interactive/snapping/SnappingManagerPool.js +1 -1
  55. package/views/interactive/snapping/allLayerSnapping.js +1 -1
  56. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +2 -1
  57. package/widgets/BasemapToggle/BasemapToggleViewModel.d.ts +2 -0
  58. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +2 -1
  59. package/widgets/Expand/ExpandViewModel.d.ts +2 -0
  60. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  61. package/widgets/Fullscreen/FullscreenViewModel.d.ts +3 -1
  62. package/widgets/Home/HomeViewModel.d.ts +2 -0
  63. package/widgets/ScaleRangeSlider/ScaleRanges.d.ts +3 -0
  64. package/widgets/ScaleRangeSlider/types.d.ts +3 -3
  65. package/widgets/Sketch/SketchViewModel.js +1 -1
  66. package/widgets/Swipe/SwipeViewModel.d.ts +2 -0
  67. package/widgets/Swipe/types.d.ts +9 -2
  68. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +9 -5
  69. package/widgets/TimeSlider/types.d.ts +7 -0
  70. package/widgets/TimeSlider.d.ts +2 -3
  71. package/widgets/TimeSlider.js +1 -1
  72. package/widgets/Track/TrackViewModel.d.ts +4 -0
  73. package/widgets/Track/types.d.ts +1 -0
  74. package/widgets/support/Selector3D/selectorUtils.js +1 -1
  75. package/assets/esri/core/workers/chunks/1b946714ca4a1a7359d4.js +0 -2
  76. package/assets/esri/core/workers/chunks/22b01fe31bbf0bdc48db.js +0 -1
  77. package/assets/esri/core/workers/chunks/27c2da2e779def2ee08b.js +0 -1
  78. package/assets/esri/core/workers/chunks/2a1ec30f9ad305763f81.js +0 -2
  79. package/assets/esri/core/workers/chunks/34570e6bbf559f18c1a5.js +0 -1
  80. package/assets/esri/core/workers/chunks/5566f14afb63065e438f.js +0 -1
  81. package/assets/esri/core/workers/chunks/68d8ae42ab71d01a70a5.js +0 -2
  82. package/assets/esri/core/workers/chunks/8cb716f110d164030309.js +0 -1
  83. package/assets/esri/core/workers/chunks/8dc1c3042267618fd710.js +0 -2
  84. package/assets/esri/core/workers/chunks/96c50a0dda0f1503ef92.js +0 -2
  85. /package/assets/esri/core/workers/chunks/{1b946714ca4a1a7359d4.js.LICENSE.txt → 2cb209bc51a19487692d.js.LICENSE.txt} +0 -0
  86. /package/assets/esri/core/workers/chunks/{8dc1c3042267618fd710.js.LICENSE.txt → 2e66c969bf4209c957b5.js.LICENSE.txt} +0 -0
  87. /package/assets/esri/core/workers/chunks/{96c50a0dda0f1503ef92.js.LICENSE.txt → 31640b41e0ecdff892fa.js.LICENSE.txt} +0 -0
  88. /package/assets/esri/core/workers/chunks/{2a1ec30f9ad305763f81.js.LICENSE.txt → 4e6656a5f29e31902fca.js.LICENSE.txt} +0 -0
  89. /package/assets/esri/core/workers/chunks/{590e6c70206122e4cc3c.js.LICENSE.txt → 844eedda8f749972f707.js.LICENSE.txt} +0 -0
  90. /package/assets/esri/core/workers/chunks/{68d8ae42ab71d01a70a5.js.LICENSE.txt → dc51dcaa4e2f9a90f5bd.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6475],{56512(e,t,i){function r(e){let t,i,r=[],n=!1;return function(...s){return n&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}(s,r)||(i=e.apply(this,s),t=this,r=s,n=!0),i}}i.d(t,{B:()=>r})},36475(e,t,i){i.r(t);var r=i(32198),n=i(56507),s=i(49186),l=i(53966),o=i(25728),a=i(17676),p=i(91429),u=i(5443),d=i(16930),h=i(4146),y=i(52136),c=i(18768),f=i(69208),g=i(34287),m=i(8303),v=i(25036),C=i(10873),S=i(88546),x=i(24212);let w=class extends((0,c.b)((0,g.q)((0,m.A)((0,v.j)((0,o.M)((0,f.d)((0,y.p)(h.A)))))))){constructor(e){super(e),this.operationalLayerType="GaussianSplatLayer",this.type="gaussian-splat",this.opacity=1,this.minScale=0,this.maxScale=0,this.url=null,this.rootTilesetJSON=null,this.fullExtent=S.zq,this.spatialReference=S.Zx,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[d.A.WGS84,this.esriCrsSpatialReference]:[d.A.WGS84]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[S.zq,this.esriCrsFullExtent]:[S.zq]}set elevationInfo(e){(null==e||"absolute-height"===e.mode)&&this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){let t=null==e?null:e.signal;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("GaussianSplat"))return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service"})}},e)}catch(e){(0,a.QP)(e)}this.url&&await(0,n.A)(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then(e=>{this.rootTilesetJSON=e.data,this.fullExtent=(0,S.uB)(this.rootTilesetJSON,!1),(0,S._8)(this.rootTilesetJSON)&&(this.esriCrsFullExtent=(0,S.uB)(this.rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference)},e=>{(0,a.QP)(e)})}_validateElevationInfo(e){let t="Gaussian Splat layers";(0,x.XF)(l.A.getLogger(this),(0,x.B)(t,"absolute-height",e)),(0,x.XF)(l.A.getLogger(this),(0,x.tW)(t,e))}};(0,r.Cg)([(0,p.MZ)({type:["GaussianSplatLayer"]})],w.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],w.prototype,"type",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],w.prototype,"opacity",void 0),(0,r.Cg)([(0,p.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],w.prototype,"minScale",void 0),(0,r.Cg)([(0,p.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],w.prototype,"maxScale",void 0),(0,r.Cg)([(0,p.MZ)(C.OZ)],w.prototype,"url",void 0),(0,r.Cg)([(0,p.MZ)({type:u.A})],w.prototype,"fullExtent",void 0),(0,r.Cg)([(0,p.MZ)({type:d.A})],w.prototype,"spatialReference",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],w.prototype,"supportedSpatialReferences",null),(0,r.Cg)([(0,p.MZ)({type:[u.A]})],w.prototype,"fullExtents",null),(0,r.Cg)([(0,p.MZ)({type:["show","hide"]})],w.prototype,"listMode",void 0),(0,r.Cg)([(0,p.MZ)(C.Yj)],w.prototype,"elevationInfo",null),w=(0,r.Cg)([(0,p.$K)("esri.layers.GaussianSplatLayer")],w);const M=w;i.d(t,["default",0,M])},52136(e,t,i){var r=i(32198),n=i(91429);i.d(t,["p",0,e=>{let t=e,i=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.APIKeyMixin")],i),i}])},24212(e,t,i){i.d(t,{$7:()=>a,B:()=>o,M7:()=>d,XF:()=>u,tW:()=>p,w7:()=>l});var r=i(56512),n=i(86211),s=i(16271);function l(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?h:y}(e).mode}(null==e||(e.hasZ??!1),t)}function o(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function a(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function p(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function u(e,t){t&&e.warn(".elevationInfo=",t)}function d(e){return(e?.offset??0)*(0,s.Ao)(e?.unit)}(0,r.B)((e,t,i)=>{if(!e||"decimal-degrees"===t)return 0;let r="unknown"!==t&&t?t:"meters",s=(0,n.mq)(i);return s?(0,n.oU)(e,r,s):0});const h={mode:"absolute-height",offset:0},y={mode:"on-the-ground",offset:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8856],{56512(e,t,i){function r(e){let t,i,r=[],n=!1;return function(...s){return n&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}(s,r)||(i=e.apply(this,s),t=this,r=s,n=!0),i}}i.d(t,{B:()=>r})},36475(e,t,i){i.r(t);var r=i(32198),n=i(56507),s=i(49186),l=i(53966),o=i(25728),a=i(17676),p=i(91429),u=i(5443),d=i(16930),h=i(4146),y=i(52136),c=i(18768),f=i(69208),g=i(34287),m=i(8303),v=i(25036),C=i(10873),S=i(88546),x=i(24212);let w=class extends((0,c.b)((0,g.q)((0,m.A)((0,v.j)((0,o.M)((0,f.d)((0,y.p)(h.A)))))))){constructor(e){super(e),this.operationalLayerType="GaussianSplatLayer",this.type="gaussian-splat",this.opacity=1,this.minScale=0,this.maxScale=0,this.url=null,this.rootTilesetJSON=null,this.fullExtent=S.zq,this.spatialReference=S.Zx,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[d.A.WGS84,this.esriCrsSpatialReference]:[d.A.WGS84]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[S.zq,this.esriCrsFullExtent]:[S.zq]}set elevationInfo(e){(null==e||"absolute-height"===e.mode)&&this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){let t=null==e?null:e.signal;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("GaussianSplat"))return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service"})}},e)}catch(e){(0,a.QP)(e)}this.url&&await(0,n.A)(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then(e=>{this.rootTilesetJSON=e.data,this.fullExtent=(0,S.uB)(this.rootTilesetJSON,!1),(0,S._8)(this.rootTilesetJSON)&&(this.esriCrsFullExtent=(0,S.uB)(this.rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference)},e=>{(0,a.QP)(e)})}_validateElevationInfo(e){let t="Gaussian Splat layers";(0,x.XF)(l.A.getLogger(this),(0,x.B)(t,"absolute-height",e)),(0,x.XF)(l.A.getLogger(this),(0,x.tW)(t,e))}};(0,r.Cg)([(0,p.MZ)({type:["GaussianSplatLayer"]})],w.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],w.prototype,"type",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],w.prototype,"opacity",void 0),(0,r.Cg)([(0,p.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],w.prototype,"minScale",void 0),(0,r.Cg)([(0,p.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],w.prototype,"maxScale",void 0),(0,r.Cg)([(0,p.MZ)(C.OZ)],w.prototype,"url",void 0),(0,r.Cg)([(0,p.MZ)({type:u.A})],w.prototype,"fullExtent",void 0),(0,r.Cg)([(0,p.MZ)({type:d.A})],w.prototype,"spatialReference",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],w.prototype,"supportedSpatialReferences",null),(0,r.Cg)([(0,p.MZ)({type:[u.A]})],w.prototype,"fullExtents",null),(0,r.Cg)([(0,p.MZ)({type:["show","hide"]})],w.prototype,"listMode",void 0),(0,r.Cg)([(0,p.MZ)(C.Yj)],w.prototype,"elevationInfo",null),w=(0,r.Cg)([(0,p.$K)("esri.layers.GaussianSplatLayer")],w);const M=w;i.d(t,["default",0,M])},52136(e,t,i){var r=i(32198),n=i(91429);i.d(t,["p",0,e=>{let t=e,i=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.APIKeyMixin")],i),i}])},24212(e,t,i){i.d(t,{$7:()=>a,B:()=>o,M7:()=>d,XF:()=>u,tW:()=>p,w7:()=>l});var r=i(56512),n=i(86211),s=i(16271);function l(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?h:y}(e).mode}(null==e||(e.hasZ??!1),t)}function o(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function a(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function p(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function u(e,t){t&&e.warn(".elevationInfo=",t)}function d(e){return(e?.offset??0)*(0,s.Ao)(e?.unit)}(0,r.B)((e,t,i)=>{if(!e||"decimal-degrees"===t)return 0;let r="unknown"!==t&&t?t:"meters",s=(0,n.mq)(i);return s?(0,n.oU)(e,r,s):0});const h={mode:"absolute-height",offset:0},y={mode:"on-the-ground",offset:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7715],{59231(e,t,r){r.d(t,{h:()=>h});const s=Symbol.for("controller");let i;const o=e=>i;let n,a=[];const l=e=>{const t=o().manager.X(e);if(void 0!==t)return t;if((e=>"object"==typeof e&&null!==e&&(s in e||"hostConnected"in e||"hostDisconnected"in e||"hostUpdate"in e||"hostUpdated"in e))(e))return e;const r=(()=>{const e=n;return n=void 0,e})();return void 0!==r?r:void 0};let h=!1;r.d(t,["a",0,e=>{if(void 0===e)return void(a=[]);const t=a.indexOf(e);a=-1===t?[...a,e]:a.slice(0,t+1),queueMicrotask(()=>a=[])},"b",0,()=>a,"c",0,e=>{h=!0;try{return e()}finally{h=!1}},"d",0,s,"f",0,e=>{n!==e&&(n=e,queueMicrotask(()=>n===e?n=void 0:0))},"i",0,e=>"function"==typeof e?.then,"j",0,async e=>{const t=l(e);return await t.ready,t},"k",0,l,"r",0,o,"s",0,e=>{i!==e&&(i=e,queueMicrotask(()=>i===e?i=void 0:0))},"u",0,async(e,t)=>{const r=l(e);if(void 0===r)return e;if(await r.ready,"function"==typeof t){const e=r.watchExports(r=>t(r,e))}return r.exports}])},64336(e,t,r){r.d(t,{C:()=>f});var s=r(71785),i=r(59231),o=r(58933),n=r(53666),a=r(44613);let l;const h=()=>{l?.forEach(({callbacks:e},t)=>{const r=Object.keys(t);e.forEach(e=>e(r))}),l=void 0},d=(e,t,r)=>{const i=e.manager;return i.V!==o.s6&&i.V!==r&&i.S(void 0,void 0),0===i.T.length&&queueMicrotask(()=>i.S(void 0,void 0)),i.V=r,i.T.push((e,i)=>(0,s.UF)(t,void 0,r===i?e:void 0)),r},c=(e=[(0,i.r)(),...(0,i.b)()],t,r)=>{const o=Array.isArray(e)?e:[e];let n=o.length+1;const a=e=>{n-=1,void 0!==e&&(n=Math.min(n,0)),0===n&&t(e)};o.forEach(e=>((e,t,r)=>{const i=Object.keys(e),o=i.length;void 0===l&&queueMicrotask(h),l??=new Map;let n=l.get(e);return void 0===n&&(n={callbacks:[],keyCount:o},l.set(e,n)),n.keyCount!==o&&(n.callbacks.forEach(e=>e(i)),n.callbacks=[],n.keyCount=o),n.callbacks.push(i=>{const n=e=>(0,s.UF)(t,null,e),a=i[o];void 0===a?n(void 0):e[a]===r?n(a):n(void 0)}),r})(e,t=>a(void 0===t?void 0:{key:t,host:e,isReactive:!1}),r));for(const e of o)if("manager"in e&&e.manager.component===e){d(e,t=>a(void 0===t?void 0:{key:t,host:e,isReactive:!0}),r);break}return r},u=((e="",t={},r=(0,i.r)())=>{const s={emit:s=>{""===e&&h();const i=new CustomEvent(e,{detail:s,cancelable:!0,bubbles:!0,composed:!0,...t});return r.el.dispatchEvent(i),i}};return""===e&&c(void 0,t=>e=t.key,s),s}).bind(null,"");var p;p=i.d;class f{constructor(e){this.#e=[],this.#t=[],this.#r=[],this.#s=[],this.#i=[],this.#o=[],this.#n=[],this.#a=[],this.#l=[],this.#h=!1,this.P=new n.cY,this.connectedCalled=!1,this.loadedCalled=!1,this[p]=!0,this.#d=[];const t=this,r=e??(0,i.r)(new.target.name);t.#c=r,t.ready=t.P.promise,t.#u=m(t),t.component=r,t.#c.addController(t),void 0===t.#c.manager||((0,i.a)(t),queueMicrotask(()=>t.catchUpLifecycle()))}#e;#t;#r;#s;#i;#o;#n;#a;#l;#h;#c;catchUpLifecycle(){const{manager:e}=this.#c;!e.connectedCalled||this.connectedCalled||this.triggerConnected(),!e.#h||this.triggerLoad().then(()=>e.loadedCalled&&this.triggerLoaded()).catch((0,a.G3)(this.#c))}#u;get exports(){return this.#u}set exports(e){const t=this.#u;t!==e&&(this.#u=e,this.#d.forEach(s.UF),this.connectedCalled&&!1!==this.O&&this.#c.requestUpdate(this.O,t)),this.P.resolve(e)}setProvisionalExports(e,t=!0){this.#u=t?m(e):e,this.#d.forEach(s.UF)}#d;watchExports(e){const t=()=>e(this.#u);return this.#d.push(t),()=>{this.#d.splice(this.#d.indexOf(t),1)}}get use(){return(0,i.s)(this.#c),i.u}get useRef(){return(0,i.s)(this.#c),i.j}get useRefSync(){return(0,i.s)(this.#c),i.k}controllerRemoved(){this.#c.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(e){this.#e.push(e)}onDisconnected(e){this.#t.push(e)}onLoad(e){this.#r.push(e)}onLoaded(e){this.#s.push(e)}onUpdate(e){this.#i.push(e)}onUpdated(e){this.#o.push(e)}onDestroy(e){this.#n.push(e)}onLifecycle(e){this.#a.push(e),this.connectedCalled&&this.#c.el.isConnected&&this.#p(e)}triggerConnected(){const e=this;e.hostConnected&&(0,s.UF)(e.hostConnected,e),e.#e.forEach(s.UF),e.triggerLifecycle(),e.connectedCalled=!0}triggerDisconnected(){const e=this;e.hostDisconnected&&(0,s.UF)(e.hostDisconnected,e),e.#t.forEach(s.UF),e.#l.forEach(s.UF),e.#l=[]}async triggerLoad(){if(this.#h)return;this.#h=!0;const e=this;e.hostLoad&&await(0,s.ao)(e.hostLoad,e),this.#r.length>0&&await Promise.allSettled(this.#r.map(s.ao)),this.P.resolve(this.#u)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&(0,s.UF)(this.hostLoaded,this),this.#s.forEach(s.UF),this.loadedCalled=!0)}triggerUpdate(e){this.hostUpdate&&(0,s.UF)(this.hostUpdate,this,e),this.#i.forEach(g,e)}triggerUpdated(e){this.hostUpdated&&(0,s.UF)(this.hostUpdated,this,e),this.#o.forEach(g,e)}triggerDestroy(){this.hostDestroy&&(0,s.UF)(this.hostDestroy,this),this.#n.forEach(s.UF)}triggerLifecycle(){this.hostLifecycle&&this.#p(()=>this.hostLifecycle()),this.#a.forEach(this.#p,this)}#p(e){(0,i.s)(this.#c);const t=(0,s.UF)(e);(Array.isArray(t)?t:[t]).forEach(e=>{"function"==typeof e?this.#l.push(e):"object"==typeof e&&"function"==typeof e.remove&&this.#l.push(e.remove)})}}function g(e){(0,s.UF)(e,void 0,this)}const m=e=>{if("object"!=typeof e&&"function"!=typeof e||null===e)return e;const t=new Proxy(e,{get(e,r,s){if("exports"!==r&&"_exports"!==r||!(r in e)||e[r]!==t)return r in e||r in Promise.prototype||"symbol"==typeof r?"function"==typeof e?e[r]:Reflect.get(e,r,s):void 0}});return t},v=f;r.d(t,["G",0,v,"a",0,c,"b",0,u,"p",0,h])},32012(e,t,r){r.d(t,{WF:()=>b,le:()=>U,s6:()=>P,CP:()=>C,zl:()=>T,Bq:()=>R,pf:()=>O});var s=r(64336),i=(r(25856),r(66047),r(53666));const o=e=>{let t=e;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){const r=t;return r.manager?.loadedCalled||(r.J??r._offspring).push(e),(r.I??r._postLoad).promise}return!1},n={};function a(){}function l(e){for(const t of["Associated","Disabled","Reset","StateRestore"]){const r=`orm${t}Callback`;e.prototype["f"+r]=async function(...e){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${r}`,{detail:e}))}}}const h=Object.defineProperty,d=globalThis.HTMLElement??a;class c extends d{constructor(){super(),this.#f={},this.#g=[],this.I=new i.cY,this.H=new i.cY,this.J=[];const e=this,t=e.constructor;e._offspring=e.J,e._postLoad=e.I,t.C?.forEach(t=>{Object.hasOwn(e,t)&&(e.#f[t]=e[t],delete e[t])}),t.A?e.#m({a:t.A}):t.B.then(async r=>{await t.K.p,e.#m(await(r.default?.then(e=>"function"==typeof e?{a:e}:e)??r))}).catch(t=>{e.H.reject(t),setTimeout(()=>{throw t})})}static{this.lumina=!0}static F(){for(const e of this.C??[])h(this.prototype,e,{configurable:!0,enumerable:!0,get(){return this.#f[e]},set(t){this.#f[e]=t}});for(const e of this.E??[])h(this.prototype,e,{async value(...t){this.#v||await this.H.promise;const r=this.#v;return await r[e](...t)},configurable:!0});for(const e of this.D??[])h(this.prototype,e,{value(...t){return this.#v[e](...t)},configurable:!0})}static{l(this)}#v;#f;#g;get manager(){return this.#v?.manager}attributeChangedCallback(e,t,r){this.#v?.attributeChangedCallback(e,t,r),this.#v||this.#g.push(e)}connectedCallback(){this.#v?this.#v.connectedCallback?.():queueMicrotask(()=>this.G=o(this))}disconnectedCallback(){this.#v?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#m(e){const t=this.constructor,r=t.L,s=this.#f,i=Object.values(e).find(e=>e.L===r),o=`${r}--lazy`;let n=i;for(;n&&!Object.hasOwn(n,"lumina");)n=Object.getPrototypeOf(n);p(n),!t.A&&(t.A=i,customElements.define(o,i)),i.N=this;const a=document.createElement(o);i.N=void 0,this.#v=a,this.#f=a,this.#g.forEach(e=>a.attributeChangedCallback(e,null,this.getAttribute(e))),Object.entries(s).forEach(u,a);const l=this.isConnected;(l||this.G)&&(a.connectedCallback?.(),l||a.disconnectedCallback())}addController(){}requestUpdate(){this.#v?.requestUpdate()}}function u([e,t]){this[e]=t}const p=e=>{const t=e.prototype,r=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(e,t){r.setAttribute.call(this.el,e,t)},t.removeAttribute=function(e){r.removeAttribute.call(this.el,e)},t.hasAttribute=function(e){return r.hasAttribute.call(this.el,e)},h(t,"isConnected",{get(){return Reflect.get(r,"isConnected",this.el)}}))};var f=r(71785),g=r(60026),m=r(58933),v=r(59231);class y extends s.G{constructor(e){super(e),this.destroyed=!1,this.R=!1,this.V=m.s6,this.T=[],this.#y=new WeakMap,this.#c=e,this.exports=void 0,this.hasDestroy=w in e&&"function"==typeof e.destroy,m.WF.prototype.addController.call(e,{hostConnected:()=>{if(this.destroyed){const t=e.el.localName;throw e.el.remove(),new Error(`The ${t} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${w} prop.`)}void 0!==this.#_&&clearTimeout(this.#_),(0,s.p)();for(const t of e.M)"triggerConnected"in t?t.triggerConnected():(0,f.UF)(t.hostConnected,t)},hostDisconnected:()=>{for(const t of e.M)"triggerDisconnected"in t?t.triggerDisconnected():(0,f.UF)(t.hostDisconnected,t);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(const t of e.M)"triggerUpdate"in t?t.triggerUpdate(this.Q):(0,f.UF)(t.hostUpdate,t,this.Q)},hostUpdated:()=>{for(const t of e.M)"triggerUpdated"in t?t.triggerUpdated(this.Q):(0,f.UF)(t.hostUpdated,t,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),(0,v.a)(void 0),(0,v.s)(e)}#_;#c;async destroy(){if(!this.destroyed){this.#c.el.isConnected&&(this.hasDestroy=!1,this.#c.el.remove()),this.#_=void 0,this.destroyed=!0;for(const e of this.#c.M)"triggerDestroy"in e?e.triggerDestroy():(0,f.UF)(e.hostDestroy,e);this.#c.M.splice(0)}}U(){if(void 0!==this.#_&&clearTimeout(this.#_),!this.#c.el.isConnected&&!this.#c.autoDestroyDisabled){const e=()=>{this.#c.destroy()};this.#_=(0,i.oK)(e,_)}}S(e,t){const r=this.T;this.V=m.s6,this.T=[],r.forEach(r=>r(e,t))}#y;W(e,t){("object"==typeof t&&null!==t||"function"==typeof t)&&this.#y.set(t,e)}X(e){return"object"==typeof e&&null!==e||"function"==typeof e?this.#y.get(e):void 0}}let _=1e3;const w="autoDestroyDisabled";var S=r(10845),k=r(84),A=r(66567),I=(r(98171),r(83435));class b extends m.WF{constructor(){super(),this.M=[],this.manager=new y(this);const e=this,t=e.constructor,r=t.N,s=t.K.o,o=b.prototype.shouldUpdate;e.#w=r?.H??new i.cY,e.I=r?.I??new i.cY,e.J=r?.J??[],e._offspring=e.J,e._postLoad=e.I,e.el=r??e,e.#S=e.enableUpdating,e.enableUpdating=a,e.shouldUpdate!==o&&(e.#k=e.shouldUpdate,e.shouldUpdate=o),s&&(e.#A=new Map,t.elementProperties.forEach((t,r)=>e.#A.set(r,s()))),m.S$&&e.el.setAttribute(t.K.hydratedAttribute,"")}static finalizeStyles(e){const t=super.finalizeStyles(e),r=this.shadowRootOptions===n;return void 0===this.K?.commonStyles||r?t:[this.K.commonStyles,...t]}static createProperty(e,t){const r="number"==typeof t?t:Array.isArray(t)?t[0]:0,s=Array.isArray(t)?t[1]:void 0,i=s?.hasChanged??m.Ec,o={attribute:!!(1&r&&"string"==typeof e)&&(0,g.j1)(e),reflect:!!(2&r),type:4&r?Boolean:8&r?Number:void 0,state:!!(16&r),readOnly:!!(32&r),noAccessor:!!(64&r),useDefault:!!(128&r),c:!1,...s,hasChanged(e,t){const r=i(e,t);return o.c=r,r}};super.createProperty(e,o)}static getPropertyDescriptor(e,t,r){const i=this.K,o=super.getPropertyDescriptor(e,t,r);return r.d=o,{...o,get(){return i.t?.(this.#A.get(e)),o.get?.call(this)},set(t){const i=this.manager;if(r.readOnly&&!v.h&&(i.R||i.connectedCalled))throw Error(`Cannot assign to read-only property "${e}" of ${this.el.localName}. Trying to assign "${t}"`);o.set.call(this,t??void 0),r.c&&this.#A?.get(e)?.notify(),i.T.length>0&&((0,s.p)(),i?.S(e,t))}}}static{this.lumina=!0}static{l(this)}#A;#k;#S;#w;#I;#b;get elementInternals(){return this.#b??=this.el.attachInternals(),this.#b}connectedCallback(){this.hasAttribute("defer-hydration")||this.#U(!0)}#U(e){const t=this.constructor.K.c?.(()=>this.requestUpdate());this.#I=t;const r=!this.manager.connectedCalled;e&&super.connectedCallback(),r?queueMicrotask(()=>this.#C().catch(e=>{this.#w.reject(e),setTimeout(()=>{throw e})})):t&&this.requestUpdate()}#T(e){try{this.#I.clear(),this.constructor.K.r(this.#I,()=>super.update(e))}catch(e){throw this.#I.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#I?.destroy(),this.#I=void 0}createRenderRoot(){const e=this.el.shadowRoot,t=this.constructor,r=t.shadowRootOptions,s=e??(r===n?this.el:this.el.attachShadow(r));if(e)return this.manager.connectedCalled||this.#U(!1),m.WF.prototype.createRenderRoot.call(this),e;if(this.isConnected){const e=s.getRootNode();e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t.elementStyles.map(e=>"styleSheet"in e?e.styleSheet:e)]}return s}async#C(){const e=this.el.G??o(this.el);e&&await e;const t=[];for(const e of this.M)"triggerLoad"in e?t.push(e.triggerLoad()):t.push((0,f.ao)(e.hostLoad,e));await Promise.all(t),await(this.load?.()),this.manager.hasDestroy&&this.manager.onUpdate(e=>e.has(w)&&this.manager.U()),this.#S(!0),this.performUpdate(),this.I.resolve(),await 0;const r=this.J.filter(e=>!e.manager?.loadedCalled);r.length&&await Promise.allSettled(r.map(async e=>await e.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(const e of this.M)"triggerLoaded"in e?e.triggerLoaded():(0,f.UF)(e.hostLoaded,e);this.loaded?.(),this.#w.resolve()}shouldUpdate(e){return this.manager.Q=e,this.#k?.(e)??!0}update(e){this.#I?this.#T(e):super.update(e)}listen(e,t,r){const s=t?.bind(this)??t;this.manager.onLifecycle(()=>(this.el.addEventListener(e,s,r),()=>this.el.removeEventListener(e,s,r)))}listenOn(e,t,r,s){const i=r?.bind(this)??r;this.manager.onLifecycle(()=>(e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)))}async componentOnReady(){return await this.#w.promise,this}addController(e){this.M.push(e),!(v.d in e)&&this.renderRoot&&this.el.isConnected&&e.hostConnected?.()}removeController(e){this.M.splice(this.M.indexOf(e),1),e.controllerRemoved?.()}}const U=e=>{let t;const r=e=>{t=new URL(e,globalThis.location?.href||void 0).href},s={...e,getAssetPath(e){const r=new URL(e,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:r,customElement(e,t){t.K=s,t.L=e,m.S$?function(){try{customElements.define(e,t)}catch{}}():customElements.get(e)||customElements.define(e,t)}};return r(e.defaultAssetPath),s},C=e=>"object"==typeof e&&null!=e?(0,S.H)(e):e,T=e=>"object"==typeof e&&null!=e?(0,k.W)(e):e;class x extends A.WL{#x;#P;constructor(e){super(e);const t=this;this.#P=function(e){return t.#x.call(this,e)}}render(e){return"function"==typeof e?(this.#x=e,(0,I.K)(this.#P)):(0,I.K)(e)}}(0,A.u$)(x);const P=m.s6;function R(e,t,r){null==r?e.removeAttribute(t):e.setAttribute(t,r)}const O={toAttribute:e=>!0===e?"":!1===e?null:e}},14246(e,t,r){r.d(t,{u:()=>o});const s={},i=(e,t)=>{let r=e;for(;r;){const e=r.closest?.(t);if(e)return e;const s=r.getRootNode?.();if(s===globalThis.document)return;r=s?.host}};function o(e){const t=i(e,".calcite-mode-dark, .calcite-mode-light, .calcite-mode-auto");return t?.classList.contains("calcite-mode-dark")||t?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}r.d(t,["a",0,(e,t,r)=>{const s=i(e,`[${t}]`);return s?.getAttribute(t)??r},"o",0,(e,t,r)=>(0,(e=>{const t=e.join(","),r=s[t];if(void 0!==r)return r;const i=new Set,o=new MutationObserver(e=>i.forEach(t=>t(e)));globalThis.document&&o.observe(document.documentElement,{attributes:!0,attributeFilter:e,subtree:!0});const n={subscribe:e=>(i.add(e),()=>{i.delete(e),0===i.size&&(o.disconnect(),s[t]=void 0)})};return s[t]=n,n})(t).subscribe)(t=>{const s=t.some(t=>((e,t)=>{let r=e;for(;r;){if(r===t)return!0;if(!r.parentNode)return!1;r=r.parentNode instanceof ShadowRoot?r.parentNode.host:r.parentNode}return!1})(e,t.target));s&&r()})])},71785(e,t,r){r.d(t,["UF",0,(e,t,...r)=>{try{return e?.call(t,...r)}catch(t){console.error(t,e)}},"ao",0,async(e,t,...r)=>{try{const s=e?.call(t,...r);return await s}catch(t){console.error(t,e)}}])},44613(e,t,r){const s=new Set;const i=e=>"string"==typeof e?e:"el"in e?e.el.localName:"localName"in e?e.localName:e.declaredClass;r.d(t,["G3",0,e=>{const t=`[${i(e)}] `;return e=>{const r=e instanceof Error&&e.message?e:new Error(String(e));r.message=`${t}${r.message}`,setTimeout(()=>{throw e})}},"Rm",0,(e,t,r,o)=>{const n=i(t);if(o?.once){const t=`${e}${n}${r}`;if(s.has(t))return;s.add(t)}let a;if(o?.detail){a={};for(const[e,t]of Object.entries(o.detail))if("object"!=typeof t&&"function"!=typeof t||null===t)a[e]=t;else{const r=new WeakRef(t);Object.defineProperty(a,e,{enumerable:!0,get:()=>r.deref()})}console[e](`[${n}]: ${r}`,a)}else console[e](`[${n}]: ${r}`)}])},53666(e,t,r){r.d(t,{cY:()=>s});class s{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}r.d(t,["oK",0,(e,t)=>{const r=t>4e3?2e3:t/4;let s=0;const i=setInterval(()=>{s+=r,s>=t&&(clearInterval(i),e())},r);return i}])},60026(e,t,r){const s=/[A-Z]+(?![a-z])|[A-Z]/gu,i=e=>e.charAt(0).toUpperCase()+e.slice(1);crypto,r.d(t,["TK",0,e=>e.split("-").map(i).join(""),"YF",0,e=>e.charAt(0).toLowerCase()+e.slice(1),"j1",0,e=>e.replace(s,(e,t)=>`${0===t?"":"-"}${e.toLowerCase()}`)])},36708(e,t,r){r.d(t,{C_:()=>u,on:()=>c,wB:()=>l,z7:()=>h});var s=r(37955),i=r(36563),o=r(97768),n=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,n=r.once?(e,r)=>{s(e)&&((0,o.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,n,r.sync,r.equals),r.initial){let t=e();n(t,t)}return i}function c(e,t,r,n={}){let a=null,h=null,d=null;function c(){a&&h&&(h.remove(),n.onListenerRemove?.(a),a=null,h=null)}function u(e){n.once&&n.once&&(0,o.xt)(d),r(e)}let p=l(e,(e,r)=>{c(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),n.onListenerAdd?.(e))},{sync:n.sync,initial:!0});return d=(0,i.hA)(()=>{p.remove(),c()}),d}function u(e,t){return function(e,t,r){if((0,n.G4)(r))return Promise.reject((0,n.NK)());let s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,o.xt)(a)}return new Promise((s,o)=>{a=(0,i.vE)([(0,n.u7)(r,()=>{l(),o((0,n.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),r.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},16494(e,t,r){var s=r(76361);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".split(".")].reduce((e,t)=>(e[t]=[],e),{}),o="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".split("."),n=new s.I({whiteList:i,onTagAttr:(e,t,r)=>{let s=`${t}="${r}"`;if(o.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new s.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1);r.d(t,["Nd",0,a,"W5",0,n])},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>i,vD:()=>n,yS:()=>o});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let 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 o(){return`{${i().toUpperCase()}}`}function n(){return`{${i()}}`}function a(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},50148(e,t,r){r.r(t),r.d(t,{default:()=>lt});var s=r(70333),i=r(92602),o=r(56507),n=r(49186),a=r(65529),l=r(37955),h=r(4718),d=r(93637),c=r(17676),u=r(84952),p=r(32198),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||[],this.creationTime??=Date.now()}refreshToken(){return s.id.refreshToken(this)}refreshServerTokens(){return s.id.refreshServerTokens(this)}emitTokenChange(e){clearTimeout(this._refreshTimer);let t=s.id,r=(this.server?t.findServerInfo(this.server):null)?.owningSystemUrl,i=r?t.findServerInfo(r):null;!1!==e&&(!r||"portal"===this.scope||i?.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(),null);let e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){let 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);let e=6e4*this.tokenRefreshBuffer,t=2**31-1,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 y=r(79783),_=r(14246);function w(e){return function(){let e=getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\W/g,"").toLowerCase();return"dark"===e||"light"===e?e:void 0}()??(0,_.u)(e??document.body)}function S(e){return function(e){return`calcite-mode-${e}`}(w(e))}r(44208);var k=r(53966),A=r(97768),I=r(61893),b=r(36708),U=r(13069),C=r(62788),T=r(71429),x=r(16494);const P="http://www.w3.org/",R=`${P}2000/svg`,O=`${P}1999/xlink`;let D=[],L=(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},M=(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),E=e=>{if("string"!=typeof e)throw Error("Style values must be strings")},N=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(M(e[s],t))return s;return-1},j=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let o=i.properties;if(!o||!(void 0===o.key?o.bind:o.key))for(let o=0;o<e.length;o++)if(o!==t){let t=e[o];if(M(t,i))throw 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)}},F=[],q=!1,Z=e=>{(e.children||[]).forEach(Z),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},V=()=>{q=!1,F.forEach(Z),F.length=0},z=e=>{F.push(e),q||(q=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(V,{timeout:16}):setTimeout(V,16))},B=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r)return t.style.pointerEvents="none",void r(t,()=>{t.parentNode&&(t.parentNode.removeChild(t),z(e))},e.properties)}t.parentNode&&(t.parentNode.removeChild(t),z(e))},H=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),o=i.length;for(let n=0;n<o;n++){let o=i[n],a=t[o];if("className"===o)throw Error('Property "className" is not supported, use "class".');if("class"===o)Y(e,a,!0);else if("classes"===o){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"===o){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],o=a[s];o&&(E(o),r.styleApplyer(e,s,o))}}else if("key"!==o&&null!=a){let i=typeof a;"function"===i?(0===o.lastIndexOf("on",0)&&(s&&(a=s(o,a,e,t)),"oninput"===o&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[o]=a):r.namespace===R?"href"===o?e.setAttributeNS(O,o,a):e.setAttribute(o,a):"string"===i&&"value"!==o?"innerHTML"===o?e[o]=x.W5.sanitize(a):W(e)&&o in e?e[o]=a:e.setAttribute(o,a):e[o]=a}}};function W(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;let 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,o=0,n=e.vnodeSelector,a=t.ownerDocument;if(""===n)i=e.domNode=a.createTextNode(e.text),void 0===r?t.appendChild(i):t.insertBefore(i,r);else{for(let l=0;l<=n.length;++l){let h=n.charAt(l);if(l===n.length||"."===h||"#"===h){let h=n.charAt(o-1),d=n.slice(o,l);"."===h?i.classList.add(d):"#"===h?i.id=d:("svg"===d&&(s=L(s,{namespace:R})),void 0===s.namespace?(i=e.domNode=e.domNode||a.createElement(d),"input"===d&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)):i=e.domNode=a.createElementNS(s.namespace,d),void 0===r?i.parentNode!==t&&t.appendChild(i):t.insertBefore(i,r)),o=l+1}}G(i,e,s)}},Y=(e,t,r)=>{t&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,r)})},Q=(e,t,r,s)=>{if(!r)return;let i=!1,o=Object.keys(r),n=o.length;for(let a=0;a<n;a++){let n=o[a],l=r[n],h=t[n];if("class"===n)h!==l&&(Y(e,h,!1),Y(e,l,!0));else if("classes"===n){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],o=!!l[s];o!==!!h[s]&&(i=!0,o?t.add(s):t.remove(s))}}else if("styles"===n){let t=Object.keys(l),r=t.length;for(let o=0;o<r;o++){let r=t[o],n=l[r];n!==h[r]&&(i=!0,n?(E(n),s.styleApplyer(e,r,n)):s.styleApplyer(e,r,""))}}else if(!l&&"string"==typeof h&&(l=""),"value"!==n||W(e)){if(l!==h){let t=typeof l;("function"!==t||!s.eventHandlerInterceptor)&&(s.namespace===R?"href"===n?e.setAttributeNS(O,n,l):e.setAttribute(n,l):"string"===t?"innerHTML"===n?e[n]=x.W5.sanitize(l):"role"===n&&""===l?e.removeAttribute(n):W(e)&&n in e?e[n]=l:e.setAttribute(n,l):e[n]!==l&&(e[n]=l),i=!0)}}else{let t=e[n];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[n]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}}return i};J=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let o=!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=L(r,{namespace:R})),e.text!==t.text&&(o=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,o=((e,t,r,s,i)=>{if(r===s)return!1;r||=D,s||=D;let o,n=r.length,a=s.length,l=0,h=0,d=!1;for(;h<a;){let a=l<n?r[l]:void 0,c=s[h];if(void 0!==a&&M(a,c))d=J(a,c,i)||d,l++;else{let a=N(r,c,l+1);if(a>=0){for(o=l;o<a;o++)B(r[o]),j(r,o,e,"removed");d=J(r[a],c,i)||d,l=a+1}else K(c,t,l<n?r[l].domNode:void 0,i),$(c),j(s,h,e,"added")}h++}if(n>l)for(o=l;o<n;o++)B(r[o]),j(r,o,e,"removed");return d})(t,s,e.children,t.children,r)||o,o=Q(s,e.properties,t.properties,r)||o,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return o&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let X=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw 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=>L(ee,e),se=(e,t,r)=>(r=re(r),K(t,e,void 0,r),X(t,r)),ie=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),X(t,r)),oe=(e,t,r)=>(r=re(r),t.domNode=e,G(e,t,r),X(t,r)),ne=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),e.parentNode.removeChild(e),X(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)=>{let o=s?.children?((e,t)=>e.find(t))(s.children,t=>t.domNode===e):void 0;(!r||o||i===t.length-1)&&(s=o)}),s};var de=r(34819),ce=r(2741),ue=r(36563);const pe=Symbol("widget"),fe=Symbol("widget-test-data"),ge=[],me={},ve=new Map;function ye(e,t){let r=t.vnodeSelector;if(ke(r)){let s=t.properties||me,i=s.key||r,o=t.children?.length?t.children:ge,n={key:i,afterCreate:_e,afterUpdate:we,afterRemoved:Se,parentWidget:e,widgetConstructor:r,widgetProperties:{...s,key:i,children:o}};return{vnodeSelector:r.vnodeSelector,properties:n,children:void 0,text:void 0,domNode:null}}let s=t.children;if(s?.length)for(let t=0;t<s.length;++t)s[t]=ye(e,s[t]);return t}function _e(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:o}){let n=new i(o);n.container=e,ve.set(e,n),n.afterCreate?.(n,e),s.addHandles((0,ue.hA)(()=>Se(e))),queueMicrotask(()=>{n[fe].projector?.renderNow()})}function we(e,t,r,{widgetProperties:s}){let i=ve.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Se(e){let t=ve.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),ve.delete(e))}function ke(e){return"function"==typeof e&&e[pe]}const Ae=new Set;new Map;const Ie=new Map;function be(){Ie.clear()}function Ue(e){Ie.delete(e)}var Ce=r(98291),Te=r(76030);function xe(e){return e.matches(":focus-within")||document.activeElement===e}(()=>{let e=new Map;new ResizeObserver(t=>{be();for(let r of t)e.get(r.target)?.(r)})})();var Pe=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Re=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Re(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=Pe(i)),t.push(i))}};const Oe=function(...e){let t=Ce.A.acquire();for(let r=0;r<e.length;r++){let 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(let e in s)s[e]&&t.push(e)}let r=t.join(" ");return Ce.A.release(t),r},De=function(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}};function Le(e,t,...r){return"function"!=typeof e||ke(e)?function(e,t){var r=[...arguments].slice(2);if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var s=[];return Re(r,s),{vnodeSelector:e,properties:t||void 0,children:s,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}var Me,Ee;let Ne=0;function je(e,t){let r=Object.prototype.hasOwnProperty;for(let 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]?je(e[s],t[s]):e[s]=t[s]);return e}const $e=(e=>{let t,r,s={...ae,...e},i=(u=s,{...le,...u}),o=i.performanceLogger,n=!0,a=!1,l=[],h=[],d=(e,r,n)=>{let a;i.eventHandlerInterceptor=(e,r,i,n)=>function(e){o("domEvent",e);let r,i,n=((e,t)=>{let r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),l=n.some(e=>customElements.get(e?.tagName?.toLowerCase()));if(e.eventPhase!==Event.CAPTURING_PHASE&&l){let t=e.composedPath(),s=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();r=he(a.getLastRender(),s,!0)}else n.reverse(),r=he(a.getLastRender(),n);return r&&(i=s.handleInterceptedEvent(t,r,this,e)),o("domEventProcessed",e),i},s.postProcessProjectionOptions?.(i);let d=n();a=e(r,d,i),i.eventHandlerInterceptor=void 0,l.push(a),h.push(n),s.afterFirstVNodeRendered&&s.afterFirstVNodeRendered(a,d)},c=()=>{if(r=void 0,n){n=!1,o("renderStart",void 0);for(let e=0;e<l.length;e++){let t=h[e]();o("rendered",void 0);try{l[e].update(t)}catch(e){console.error(e)}o("patched",void 0)}o("renderDone",void 0),n=!0}};var u;return s.modifyDoRenderImplementation&&(c=s.modifyDoRenderImplementation(c,l,h)),t={renderNow:c,scheduleRender:()=>{!r&&!a&&(r=requestAnimationFrame(c))},stop:()=>{r&&=void cancelAnimationFrame(r),a=!0},resume:()=>{a=!1,n=!0,t.scheduleRender()},append:(e,t)=>{d(se,e,t)},insertBefore:(e,t)=>{d(ie,e,t)},merge:(e,t)=>{d(oe,e,t)},replace:(e,t)=>{d(ne,e,t)},detach:e=>{for(let t=0;t<h.length;t++)if(h[t]===e)return h.splice(t,1),l.splice(t,1)[0];throw Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){let t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,o)=>{let n=t?.(e,s,i,o),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){let t=e[2].toLowerCase()+e.slice(3),r=e=>n?.call(i,e);i.addEventListener(t,r,a);let s=()=>i.removeEventListener(t,r,a),l=o.afterRemoved;o.afterRemoved=e=>{l?.(e),s()}}return n}},handleInterceptedEvent(e,t,r,s){let{eventPhase:i,type:o}=s,n=i===Event.CAPTURING_PHASE,a=`on${o}${n?"capture":""}`,l=t.properties;(!l||!(a in l))&&(a=`on${o[0].toUpperCase()}${o.slice(1)}${n?"Capture":""}`,!l||!(a in l))||(be(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let Fe=!1,qe=class extends((0,I.g)(a.nJ)){static{this[Me]=!0}constructor(e,t){super(e,t),this[Ee]=!0,this._attached=!1,this._projector=$e,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this.topLayerDisabled=!1,this._loadLocale=(0,c.sg)(async()=>{if(this._messageBundleProps?.length){let e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,y.ud)(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=je((0,h.o8)(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(let t of e)"rejected"===t.status&&k.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles((0,ue.hA)()),de.qu||(0,de.Qu)((0,u.s2)((0,ce.s)("components/assets")));let r="esri-widget-uid-"+(0,U.lk)(),s=this.render.bind(this);this._trackingTarget=new T.r(()=>{this.autoRenderingEnabled&&this.scheduleRender()});let i=()=>{if(!this._readyForTrueRender||this.destroyed)return null;let e=s()??{vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0},t=e.properties??={};t.key??=r,ke(e.vnodeSelector)?t.visible=this.visible&&!1!==t.visible:(this.visible?t.styles||={}:(t.class="",t.styles={display:"none"}),t.styles.display??="");let i=0;return e.children?.forEach(e=>{ke(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${i++}`)}),ye(this,e)};this.render=()=>{if(Fe)return i();let e=(t=this,Ie.get(t)??null);var t;if(e)return e;this._trackingTarget.clear(),Fe=!0;try{e=(0,C.a)(this._trackingTarget,i)}catch(e){throw k.A.getLogger(this).error(e),e}finally{Fe=!1}return e&&function(e,t){Ie.set(e,t)}(this,e),e};let 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){Ae.add(e),e.finally(()=>Ae.delete(e)).catch(()=>{})}(this._resourcesFetch)}normalizeCtorArgs(e,t){let r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){let 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),!this.viewModel?.destroyed&&!this.viewModel?.destroying&&(0,A.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this.render=()=>null,this._projector=null,Ue(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-"+Ne++}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[(Me=pe,Ee=pe,fe)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw Error("not implemented")}removeContainer(){this._set("container",null)}scheduleRender(){this.destroyed||(Ue(this),this._projector.scheduleRender())}classes(...e){return Oe.apply(this,e)}renderNow(){this.destroyed||(Ue(this),this._projector.renderNow())}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,b.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")},b.pc)),this.postInitialize();let e=async()=>{await this._loadLocale().catch(c.jH),this.scheduleRender()};this.addHandles([(0,y.oQ)(e),(0,b.wB)(()=>this.uiStrings,e)]),this.addHandles((0,b.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),!1),e?.parentNode?.removeChild(e)}};(0,p.Cg)([(0,f.MZ)()],qe.prototype,"_readyForTrueRender",void 0),(0,p.Cg)([(0,f.MZ)({value:null})],qe.prototype,"container",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"icon",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"id",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"label",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"renderable",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"uiStrings",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"viewModel",void 0),(0,p.Cg)([(0,f.MZ)({value:!0})],qe.prototype,"visible",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"key",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"children",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"afterCreate",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"afterUpdate",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"afterRemoved",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"topLayerDisabled",void 0),qe=(0,p.Cg)([(0,f.$K)("esri.widgets.Widget")],qe);const Ze=qe,Ve="esri-identity-modal",ze={base:Ve,info:`${Ve}__info`,notice:`${Ve}__notice`};let Be=class extends Ze{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){let t=[];for(let 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(6198),r.e(4565),r.e(3278)]).then(()=>r(43278)),dialog:()=>Promise.all([r.e(6198),r.e(4565),r.e(5508),r.e(4059)]).then(()=>r(25508)),input:()=>Promise.all([r.e(6198),r.e(4565),r.e(3796),r.e(6440)]).then(()=>r(73796)),label:()=>Promise.all([r.e(6198),r.e(7790)]).then(()=>r(57790)),notice:()=>Promise.all([r.e(6198),r.e(4565),r.e(9754)]).then(()=>r(39422))})}get title(){return this.commonMessages?.auth.signIn}render(){let{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:i,server:o,resource:n,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 Le("div",{class:this.classes(ze.base,S(this.container))},Le("form",{bind:this,onsubmit:this._submit},Le("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",width:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},Le("div",{class:ze.info},(0,y.V2)(i?h:l,{server:o&&/\.arcgis\.com/i.test(o)?"ArcGIS Online":o,resource:`(${n||d})`})),a?Le("calcite-notice",{class:ze.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Le("div",{slot:"message"},a.details?.httpStatus?c:u)):null,i?null:[Le("calcite-label",null,p,Le("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Le("calcite-label",null,f,Le("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],Le("calcite-button",{appearance:"outline",bind:this,slot:"footer-end",type:"button",onclick:this._cancel},g),Le("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?m:v))))}_focusUsernameInput(){return async function(e,t){let r=(0,c.YL)(t,1e4),s=(0,c.Mq)(r);await(0,Te.$m)(s);let i=e();if(!i)return;let o=async()=>{"setFocus"in i&&"function"==typeof i.setFocus?await i.setFocus():i instanceof HTMLElement&&i.focus()};for(true;!xe(i)&&!(0,c.G4)(r);)await(0,Te.$m)(s),await o()}(()=>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);let t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,p.Cg)([(0,f.MZ)({readOnly:!0})],Be.prototype,"container",void 0),(0,p.Cg)([(0,f.MZ)(),De("esri/t9n/common")],Be.prototype,"commonMessages",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"error",void 0),(0,p.Cg)([(0,f.MZ)(),De("esri/identity/t9n/identity")],Be.prototype,"messages",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"oAuthPrompt",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"open",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"signingIn",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({readOnly:!0})],Be.prototype,"title",null),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"resource",void 0),Be=(0,p.Cg)([(0,f.$K)("esri.identity.IdentityModal")],Be);const He=Be,We="esriJSAPIOAuth";class Je{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){let t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;let e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||=e[t.authNamespace]={},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(We,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){let e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){let e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken";(0,o.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"}}).catch(()=>{})}if(t?.authNamespace&&t.portalUrl&&this.storage){let r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(We,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){let 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){let t=this.storage.getItem(We);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}Je.prototype.declaredClass="esri.identity.OAuthCredential";var Ge,Ke=r(25482);let Ye=class extends Ke.o{static{Ge=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 Ge.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=Ge=(0,p.Cg)([(0,f.$K)("esri.identity.OAuthInfo")],Ye);const Qe=Ye;let Xe=class extends Ke.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}})],Xe.prototype,"adminTokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"currentVersion",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"hasPortal",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"hasServer",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"owningSystemUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"owningTenant",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"shortLivedTokenValidity",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"tokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"webTierAuth",void 0),Xe=(0,p.Cg)([(0,f.$K)("esri.identity.ServerInfo")],Xe);const et=Xe;var tt=r(39131);const rt={},st=e=>{let 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)},it=(e,t)=>!!(st(e)&&t&&t.some(t=>t.test(e.server)));let ot=null,nt=null;try{ot=window.localStorage,nt=window.sessionStorage}catch{}class at 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.location.origin:window.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){let 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){let t=this.oAuthInfos;if(t){for(let r of e){let 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};let t,r=this._sanitizeUrl(e.server),s=this._isServerRsrc(r),i=this.findServerInfo(r),o=!0;i||(i=new et,i.server=this._getServerInstanceRoot(r),s?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(r),i.hasPortal=!0),this.registerServers([i])),t=this._findCredential(r),t?(delete e.server,Object.assign(t,e),o=!1):(t=new v({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:s?"server":"portal"}),t.resources=[r],this.credentials.push(t)),t.emitTokenChange(!1),o||t.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));let t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){let e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new et(t))}),e.length&&this.registerServers(e)}if(r){let 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(let r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(let 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);let s=this._isServerRsrc(e)?"server":"portal";if(t){for(let i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(let 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);let o=new AbortController,a=Promise.withResolvers();if(t.signal&&(0,c.u7)(t.signal,()=>{o.abort()}),(0,c.u7)(o,()=>{a.reject(new n.A("identity-manager:user-aborted","ABORTED"))}),(0,c.G4)(o))return a.promise;t.signal=o.signal;let l,h=this._isAdminResource(e),d=s?this.findCredential(e):null;if(d&&498===r?.details?.httpStatus)d.destroy();else if(d)return l=new n.A("identity-manager:not-authorized","You are currently signed in as: '"+d.userId+"'. You do not have access to this resource: "+e,{error:r}),a.reject(l),a.promise;let 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{let t=this._getTokenSvcUrl(e);if(!t)return l=new n.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(l),a.promise;f=new et,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,h)}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){let s,i,a,l,h,d,c,p,f=this._rePortalTokenSvc.test(e.tokenServiceUrl),g=new u.s0(this._appOrigin),m=e.shortLivedTokenValidity;t&&(p=this.tokenValidity||m||this._defaultTokenValidity,p>m&&m>0&&(p=m)),r&&(s=r.isAdmin,i=r.serverUrl,a=r.token,d=r.signal,c=r.ssl,e.customParameters=r.customParameters),s?l=e.adminTokenServiceUrl:(l=e.tokenServiceUrl,h=new u.s0(l.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!c&&"http"===g.scheme&&((0,u.FX)(g.uri,l,!0)||"https"===h.scheme&&g.host===h.host&&"7080"===g.port&&"7443"===h.port)&&(l=l.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));let v={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:i,token:a,expiration:p,referer:s||f?this._appOrigin:null,client:s?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:d};return f||(v.withCredentials=!1),(0,o.A)(l,v).then(r=>{let s=r.data;if(!s?.token)return new n.A("identity-manager:authentication-failed","Unable to generate token");let i=e.server;return rt[i]||(rt[i]={}),t&&(rt[i][t.username]=t.password),s.validity=p,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,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,o.A)(a,{query:l,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new n.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;let t=e.details?.httpStatus;if(498===t)throw i.destroy(),new n.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new n.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={}){let s=Promise.withResolvers(),i=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},o=()=>{i(),this._oAuthDfd=null,s.reject(new n.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,c.u7)(r.signal,()=>{o()});let a=new He({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=a,this.emit("dialog-create");let l=a.on("cancel",o),h=a.on("submit",e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then(o=>{i();let n=new v({userId:e.username,server:t.server??void 0,token:o.token,expires:null==o.expires?null:Number(o.expires),ssl:!!o.ssl,isAdmin:r.isAdmin,validity:o.validity});s.resolve(n)}).catch(e=>{a.error=e,a.signingIn=!1})});return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=Promise.withResolvers();let i=this._oAuthDfd;s?.signal&&(0,c.u7)(s.signal,()=>{let e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&d()}),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;let o,a=r._oAuthCred;if(a.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));o=(0,u.$1)(e),a.codeVerifier=o,e=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=(0,u.$1)(e),a.save()||(a.codeVerifier=o=null)}else a.codeVerifier=null;this._getCodeChallenge(o).then(i=>{let o=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!o)return void this._doOAuthSignIn(e,t,r,i);let n=new He({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=n,this.emit("dialog-create"),l=n.on("cancel",d),h=n.on("submit",()=>{p(),this._doOAuthSignIn(e,t,r,i)})});let l,h,d=()=>{p(),this._oAuthDfd=null,i.reject(new n.A("identity-manager:user-aborted","ABORTED"))},p=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return i.promise}async refreshToken(e){let t,r=this.findServerInfo(e.server),s=r?.owningSystemUrl,i=!!s&&"server"===e.scope,o=i&&it(r,this._legacyFed),n=r.webTierAuth,a=n&&this.normalizeWebTierAuth,l=rt[e.server]?.[e.userId],h=e.resources&&e.resources[0],d=i?this.findServerInfo(s):null,c={username:e.userId,password:l};if(n&&!a)return;i&&!d&&this.serverInfos.some(e=>(this._isIdProvider(s,e.server)&&(d=e),!!d));let u=d?this.findCredential(d.server,e.userId):null;if(!i||u){if(o)return void u?.refreshToken();if(i)t={serverUrl:h,token:u?.token,ssl:u?.ssl};else if(a)c=null,t={ssl:e.ssl};else{if(!l){let t;return h&&(h=this._sanitizeUrl(h),e._enqueued=1,t=this._enqueue(h,r,null,null,e.isAdmin,e),t.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),t}e.isAdmin&&(t={isAdmin:!0})}return this.generateToken(i?d:r,i?null:c,t).then(t=>{e.token=t.token,e.expires=null==t.expires?null:Number(t.expires),e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{let 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))&&(it(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){let 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(),null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));let t=(0,u.zf)(e),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));let e=(0,u.zf)(t),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){let t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});let 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,o.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){let 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){let e=new n.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,o,n=-1,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,o=s?this.findCredential(s,r.userId):void 0,n=this._getIdenticalSvcIdx(e,r),!a)return-1===n&&r.resources.push(e),this._addResource(e,o),r;-1!==n&&(r.resources.splice(n,1),this._removeResource(e,o))}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,o=s?this.findCredential(s,t.userId):void 0,n=r,!0))),a)t&&(t.resources.splice(n,1),this._removeResource(e,o));else if(t)return this._addResource(e,o),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(let 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){let t=new u.s0(e);return t.scheme+"://"+t.host+(null==t.port?"":":"+t.port)}_getServerInstanceRoot(e){let t=e.toLowerCase(),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,tt.$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,tt.qG)(e),t=(0,tt.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){let 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)){let s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){let e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else(this._isAdminResource(e)&&this._isAdminResource(t)||!this._isServerRsrc(e)&&!this._isServerRsrc(t)&&this._isPortalDomain(e))&&(r=!0);return r}_isPortalDomain(e){let t=new u.s0(e.toLowerCase()),r=this._portalConfig,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||=this._portals.some(e=>this._hasSameServerInstance(e,t.uri)),s||=this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((i,o)=>{-1===r&&i.regex.test(e)&&(r=o),-1===s&&i.regex.test(t)&&(s=o)});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){let r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&st(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++){let 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)){let s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",e=s+"/rest/info",r=(0,o.A)(e,{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||=this._getOrigin(e)+this._gwTokenUrl,t){let 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){let s=t._oAuthCred;if(e.code){let 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=>{let o=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=o.userId,s.storage=i.persist?ot:nt,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=o.userId,s.ssl=o.ssl,s.save(),o})}let 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:nt,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){let t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){let r="access_denied"===e.error,s=new n.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,o.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{let r=await(0,o.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,o.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data))}_doPortalSignIn(e){let 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,o=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return o.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,u.zs)(o)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),i||r(new n.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection."))),i}_enqueue(e,t,r,s,i,o){return s||=Promise.withResolvers(),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=o,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;let t=(t,r=!1)=>{let s=e.options_?.resource,i=e.resUrl_,o=e.refresh_,n=r;this.credentials.includes(t)||(o&&this.credentials.includes(o)?(o.userId=t.userId,o.token=t.token,o.expires=t.expires,o.validity=t.validity,o.ssl=t.ssl,o.creationTime=t.creationTime,n=!0,t=o):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(i)||t.resources.push(i),s&&!t.resources.includes(s)&&t.resources.push(s),t.scope=this._isServerRsrc(i)?"server":"portal",r||t.emitTokenChange();let a=this._soReqs,l={};this._soReqs=[],a.forEach(e=>{if(!this._isIdenticalService(i,e.resUrl_)){let r=this._getSuffix(e.resUrl_);l[r]||(l[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),a.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(i),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,o,a,h)=>{let d,p,f=e.sinfo_,g=!e.options_||!1!==e.options_.prompt,m=f.hasPortal&&this._findOAuthInfo(e.resUrl_);if(i)t(new v({userId:i,server:f.server??void 0,token:a??void 0,expires:null==h?null:Number(h),ssl:!!o}));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"]);let 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 n.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 n.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(n.A.fromJSON(e.data.error))))});(0,c.u7)(e.options_?.signal,()=>{s.remove()})}else if(m){let i=m._oAuthCred;if(!i){let e=new Je(m,ot),t=new Je(m,nt);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,m._oAuthCred=i}if(i.isValid()){d=new v({userId:i.userId??void 0,server:f.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});let o=m.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);o||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(f.server,i.refreshToken,i.appId).then(e=>(d.expires=Date.now()+1e3*e.expires_in,d.token=e.access_token,d)):Promise.resolve(d),e._pendingDfd.then(e=>o?this._exchangeToken(e.server,m.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{let t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),s()):r(e)})):t(d)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(m.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){let s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,m,f).then(e=>{t(e)}).catch(r)}else{let s=()=>{g?e._pendingDfd=this.oAuthSignIn(e.resUrl_,f,m,e.options_).then(t,r):(p=new n.A("identity-manager:not-authenticated","User is not signed in."),r(p))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(f.server,m.appId).then(e=>{(0,u.FX)(e.portalUrl,this._appOrigin,!0)?(d=new v({userId:e.username,server:f.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(d)):s()}).catch(s):s()}}else if(g){if(this._checkProtocol(e.resUrl_,f,r,e.admin_)){let s=e.options_;e.admin_&&(s||={},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,f,s).then(t,r)}}else p=new n.A("identity-manager:not-authenticated","User is not signed in."),r(p)},i=()=>{let s,i,o,n=e.sinfo_,a=n.owningSystemUrl,l=e.options_;if(l&&(s=l.token,i=l.prompt),o=this._findCredential(a,{resource:e.resUrl_}),!o)for(let e of this.credentials)if(this._isIdProvider(a,e.server)){o=e;break}if(o){let s=this.findCredential(e.resUrl_,o.userId);if(s)t(s);else if(it(n,this._legacyFed)){let e=o.toJSON();e.server=n.server,e.resources=null,t(new v(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(o.server),null,{serverUrl:e.resUrl_,token:o.token,signal:e.options_.signal,ssl:o.ssl})).then(r=>{t(new v({userId:o?.userId,server:n.server??void 0,token:r.token,expires:null==r.expires?null:Number(r.expires),ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))},r)}else this._busy=null,s&&(e.options_.token=null),(e._pendingDfd=this.getCredential(a.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:n.owningTenant,signal:e.options_.signal,prompt:i})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})};if(this._errbackFunc=r,e.options_?.signal?.aborted)return void r(new n.A("identity-manager:user-aborted","ABORTED"));if(!e.refresh_&&!e.options_?.token&&!e.options_?.credential){let r=this._findCredential(e.resUrl_,e.options_);if(r)return void t(r,!0)}let o=e.sinfo_.owningSystemUrl,a=this._isServerRsrc(e.resUrl_),h=e.sinfo_._restInfoPms;h?h.promise.then(t=>{let 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;let e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}a&&r.owningSystemUrl?i():s()},()=>{e.sinfo_._restInfoPms=null;let t=new n.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)}):a&&o?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{let r,s,i,o,n={};return t&&(r=t.user?.username,n.username=r,n.allSSL=t.allSSL,s=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(i=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!r,r&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:n.allSSL}).catch(()=>null).then(e=>(n.portalToken=e?.token,n.tokenExpiration=e?.expires,n)):!r&&s&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:i,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>n):n}).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,i=e.customBaseUrl,n=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=this._appUrlObj.path;let e=r.search(/\/(apps|home)\//);r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,o.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,o.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:n,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,u.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){let t=this._defaultOAuthInfo.clone();t.portalUrl=e.data.urlKey&&i?"https://"+e.data.urlKey.toLowerCase()+"."+i: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){let i=r._oAuthCred,o={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(o.hash=window.location.hash),i.stateUID&&(o.uid=i.stateUID);let a={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(o),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");let h=this._getAuthorizeUrl(r.portalUrl),d=h+"?"+(0,u.x0)(a);if(r.popup){let 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();let e=this._oAuthDfd;if(e){let t=new n.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{let e=new n.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",r=(0,tt.py)(t);if(r?.portalHostname){let{customBaseUrl:e,portalHostname:t,urlKey:s}=r}return t}_getRedirectURI(e,t){let r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,u.s2)(e.popupCallbackUrl);if(t){let 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}}at.prototype.declaredClass="esri.identity.IdentityManagerBase";const lt=new at;(0,s.Aq)(lt)},79783(e,t,r){r.d(t,{ud:()=>S,JK:()=>k,oQ:()=>A,V2:()=>b});var s=r(2741),i=r(97770),o=r(73444),n=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(56507),m=r(49186);const v={"esri/t9n/basemaps":"esri/support/basemaps/t9n/basemaps","esri/t9n/common":"esri/common/t9n/common","esri/widgets/support/t9n/ColorPicker":"esri/widgets/support/ColorPicker/t9n/ColorPicker","esri/widgets/support/t9n/timezone":"esri/widgets/support/TimezonePicker/t9n/timezone","esri/widgets/support/t9n/uriUtils":"esri/widgets/support/uriUtils/t9n/uriUtils"};async function y(e){if(null!=w.fetchBundleAsset)return w.fetchBundleAsset(e);let 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?RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){let i=v[r]??r,o=t.exec(i);if(!o)throw new m.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);let a=o[1]?`${o[1]}/`:"",l=o[2],h=(0,n.xO)(s),d=i.startsWith("esri/"),c=`${a}${l}.json`,u=h?`${a}${l}_${h}.json`:c,p=d?`${a}messages.en.json`:c,f=d?`${a}messages.${h??"en"}.json`:u,g=[...new Set(d?[f,u,p,c]:[f,p])];for(let[t,s]of g.entries())try{return await y(e(s))}catch(e){if(t===g.length-1)throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`)}(this.getAssetUrl,this.matcher,e,t)}}const w={},S=n.ud,k=o.JK,A=o.oQ,I=n.ao,b=function(e,t,r={}){let{format:s={}}=r;return(0,d.HC)(e,e=>function(e,t,r){let s,i,o=e.indexOf(":");if(-1===o?s=e.trim():(s=e.slice(0,o).trim(),i=e.slice(o+1).trim()),!s)return"";let n=(0,h.wc)(s,t);if(null==n)return"";let a=(i?r?.[i]:null)??r?.[s];return a?u(n,a):i?p(n,i):f(n)}(e,t,s))};var U;I((U={pattern:"esri/",location:s.s},new _(U)))},97770(e,t,r){r.d(t,{Ey:()=>P,F8:()=>x,J2:()=>b,Yq:()=>C,_m:()=>U,iS:()=>T,wj:()=>R});var s=r(66552),i=r(73444),o=r(98623),n=r(34747);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},h={timeZone:"UTC"},d={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},p={year:"numeric",month:"long",weekday:"long",day:"numeric"},f={hour:"numeric",minute:"numeric"},g={...f,second:"numeric"},m={hourCycle:"h23"},v={...f,...m},y={...g,...m},_={"short-date":d,"short-date-short-time":{...d,...f},"short-date-short-time-24":{...d,...v},"short-date-long-time":{...d,...g},"short-date-long-time-24":{...d,...y},"short-date-le":d,"short-date-le-short-time":{...d,...f},"short-date-le-short-time-24":{...d,...v},"short-date-le-long-time":{...d,...g},"short-date-le-long-time-24":{...d,...y},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...f},"long-month-day-year-short-time-24":{...c,...v},"long-month-day-year-long-time":{...c,...g},"long-month-day-year-long-time-24":{...c,...y},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...f},"day-short-month-year-short-time-24":{...u,...v},"day-short-month-year-long-time":{...u,...g},"day-short-month-year-long-time-24":{...u,...y},"long-date":p,"long-date-short-time":{...p,...f},"long-date-short-time-24":{...p,...v},"long-date-long-time":{...p,...g},"long-date-long-time-24":{...p,...y},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":f,"long-time":g},w=(0,s.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),S={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function k(){let e=(0,i.lR)();return(e&&S[e])??(0,i.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(S.bs="sr-Latn-CS");let A=new WeakMap;const I=_["short-date-short-time"];function b(e){return _[e]}function U(e){let{dateStyle:t,timeStyle:r,hour12:s,year:i,month:o}=e,n={};return t?n.dateStyle=t:i&&(n.year=i,n.month=o||void 0),r&&!n.year&&(n.timeStyle=r,n.hour12="auto"===s?void 0:"always"===s),n}function C(e,t=I){return function(e){let t=A.get(e);if(!t){let r=k(),s=R(e.timeZone??"system"),i={...e,timeZone:s};t=new Intl.DateTimeFormat(r,i),A.set(e,t)}return t}(t).format(e)}function T(e,t=I){return C(new Date(e),{...t,...h,...l})}function x(e,t=I){return C(new Date(`1970-01-01T${e}Z`),{...t,...h,...a})}function P(e,t=I){let r=n.c9.fromISO(e,{setZone:!0});if(!r.isValid)return e;if(t.timeZone)return C(r.toJSDate(),t);let s=0===r.offset?"UTC":t.timeZone,i={...t,timeZone:s};return r.toLocaleString(i,{locale:k()})}function R(e){switch(e){case"system":return o.N;case o.L:return"UTC";default:return e}}(0,i.Ml)(()=>{A=new WeakMap}),r.d(t,["_v",0,w])},10838(e,t,r){r.d(t,{ao:()=>c,ud:()=>u,xO:()=>p});var s=r(49186),i=r(36563),o=r(73444);const n={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 n}(e)){let t=n[e];return!0===t?e:t}return null}const l=[],h=new Map;function d(e){for(let 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)(()=>{let t=l.indexOf(e);t>-1&&(l.splice(t,1),d(e))})}async function u(e){let t=(0,o.JK)();h.has(e)||h.set(e,async function(e,t){let r=[];for(let s of l)if(f(s.pattern,e))try{return await s.fetchMessageBundle(e,t)}catch(e){r.push(e)}throw r.length?new s.A("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r}):new s.A("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));let r=h.get(e);return r&&await g.add(r),r}function p(e){let t=(0,o.lR)(e);return t?a(e)??a(t):null}function f(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,o.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||=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 o=new WeakMap,n={};function a(e={}){let t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e){let{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){let t=e||n;if(!o.has(t)){let r=(0,s.lR)(),n=r&&i[r]||(0,s.QC)();o.set(t,new Intl.NumberFormat(n,e))}return o.get(t)}(t).format(e)}(0,s.Ml)(()=>{o=new WeakMap,n={}}),new Map}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6811],{52106(e,t,i){i.d(t,{A:()=>x});var r,l,n=i(32198),s=i(37838),o=i(69540),a=i(51447),u=i(25482),h=i(53966),p=i(36708),c=i(24326),f=i(91429),g=i(12195),y=i(65864),d=i(50498),m=i(55156),v=i(60950),w=i(54339),b=i(94128),_=i(33910);const A=Symbol("meshGeometryHandles");function M(e){if(null==e)return null;let t={};for(let i in e){let r=e[i];r&&(t[i]=r.toJSON())}return 0===Object.keys(t).length?null:t}let x=class extends((0,o.OU)(u.o)){static{r=b.Z}static{l=this}constructor(e){super(e),this[r]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(h.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new l({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,v.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let i=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[i,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,m.I)(this.origin);if(e)return(0,w.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,w.r)(this,t):null}getGlobalId(){let e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:M(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,g.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let l={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(l.action=r),"attributes"===e&&(l.attributeName=r),this.layer.graphicChanged(l)}_watchMeshGeometryChanges(){this.removeHandles(A);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,p.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,p.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],A)}};(0,n.Cg)([(0,f.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let i in e){let r=(0,y.rS)(e[i]);r&&(t[i]=r)}return 0===Object.keys(t).length?null:t}}})],x.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,f.MZ)({value:null})],x.prototype,"attributes",null),(0,n.Cg)([(0,f.MZ)({value:null,types:d.yR,json:{read:y.rS}})],x.prototype,"geometry",null),(0,n.Cg)([(0,f.MZ)()],x.prototype,"distance",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean})],x.prototype,"isAggregate",void 0),(0,n.Cg)([(0,f.MZ)({clonable:!1})],x.prototype,"layer",void 0),(0,n.Cg)([(0,f.MZ)({clonable:"reference"})],x.prototype,"origin",void 0),(0,n.Cg)([(0,f.MZ)({type:s.A,value:null})],x.prototype,"popupTemplate",null),(0,n.Cg)([(0,f.MZ)({clonable:"reference"})],x.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,f.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],x.prototype,"statisticsAggregatedIds",void 0),(0,n.Cg)([(0,f.MZ)({value:null,types:_.Es})],x.prototype,"symbol",null),(0,n.Cg)([(0,f.MZ)({clonable:!1,json:{read:!1,write:!1}})],x.prototype,"_version",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,value:!0})],x.prototype,"visible",null),x=l=(0,n.Cg)([(0,f.$K)("esri.Graphic")],x)},19334(e,t,i){i.d(t,{e:()=>s});var r=i(54639),l=i(14112);class n{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function s(e){if(null==e)return null;switch(e.type){case"point":if((0,l.e6)(e))return null;break;case"polygon":if((0,l.Wq)(e))return null;break;case"polyline":if((0,l.IY)(e))return null;break;case"multipoint":if((0,l.DG)(e))return null;break;case"extent":if((0,l.As)(e))return null;break;default:return null}let t=r.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new n(e));return t.asAccessorGeometry(),t}},36983(e,t,i){i.d(t,{R:()=>u,p:()=>h});var r=i(54639),l=i(14112),n=i(16930),s=i(60408),o=i(65864);class a{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){let t=(0,o.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function u(e,t){if("object"!=typeof e||!e)return null;let i=t;if("spatialReference"in e&&(e.spatialReference instanceof n.A?i=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(i=new n.A,i.read(e.spatialReference))),null==i)throw Error("Spatial reference required");return(0,s.fT)(e)?h("point",e,i):(0,s.Rg)(e)?h("polyline",e,i):(0,s.Bi)(e)?h("polygon",e,i):(0,s.U9)(e)?h("multipoint",e,i):(0,s.ZC)(e)?h("extent",e,i):null}function h(e,t,i){if(null==t)return null;let n=!1,s=!1;switch(e){case"point":if((0,l.e6)(t))return null;n=void 0!==t.z,s=void 0!==t.m;break;case"polygon":if((0,l.Wq)(t))return null;n=!0===t.hasZ,s=!0===t.hasM;break;case"polyline":if((0,l.IY)(t))return null;n=!0===t.hasZ,s=!0===t.hasM;break;case"multipoint":if((0,l.DG)(t))return null;n=!0===t.hasZ,s=!0===t.hasM;break;case"extent":if((0,l.As)(t))return null;n=null!=t.zmin&&null!=t.zmax,s=null!=t.mmin&&null!=t.mmax;break;default:throw Error("Unsupported geometry type: "+t.type)}return r.R.of(e,i,n,s,new a(t))}},14112(e,t,i){function r(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function l(e){if(0===(e.curveRings??e.rings).length)return!0;for(let t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function n(e){if(0===(e.curvePaths??e.paths).length)return!0;for(let t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function s(e){return 0===e.points.length}function o(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}i.d(t,{As:()=>o,DG:()=>s,IY:()=>n,Wq:()=>l,e6:()=>r})},69052(e,t,i){i.d(t,{hr:()=>l});var r=i(34727);class l{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return n(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+s(this.range,e-t,i)}minimalMonotonic(e,t,i){return n(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);let i=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(r)?i:r}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function n(e,t,i,r,l=0,n=!1){return(r-=l)<t?r+=s(e,t-r):r>i&&(r-=s(e,r-i)),n&&r===i&&(r=t),r+l}function s(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const o=new l(0,2*Math.PI),a=(new l(-Math.PI,Math.PI),new l(0,360));i.d(t,["ie",0,a,"uC",0,o])},18370(e,t,i){i.d(t,{z:()=>l});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function l(e){return new r(e)}},13069(e,t,i){i.d(t,{AG:()=>o,lk:()=>l,vD:()=>s,yS:()=>n});const r="randomUUID"in crypto;function l(){if(r)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let 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`{${l().toUpperCase()}}`}function s(){return`{${l()}}`}function o(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},52039(e,t,i){i.d(t,{O7:()=>c,el:()=>u});var r=i(69052),l=(i(49186),i(18370)),n=i(17676),s=(i(5443),i(39829)),o=(i(82799),i(16930)),a=(i(80754),i(21325));async function u(e,t,i){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(i=t);let r=null;for(let t of e)r??=t?.spatialReference;if(!r)return e;let l=(0,a.Vp)(r);if(!l)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(l);return["xmin"in t?t:new s.A(t)]}let[o,u]=l.valid,c=!1;for(let t of e){if(!t)continue;if("point"===t.type){c||=t.x>=u,c||=t.x<=o;continue}let{extent:e}=t;if(null==e){c=!0;break}c||=e.xmin>=u,c||=e.xmin<=o,c||=e.xmax>=u,c||=e.xmax<=o}if(!c)return e;let[{foldInto360Range:f},g]=await(0,n.qr)(Promise.all([h.getImportPromise(),p.getImportPromise()]),i),y=g.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=g.fromGeometry(e),i=g.toGeometry(f(t,y),r);return"extent"===e.type&&1===i?.rings.length?i.extent:i})}const h=(0,l.z)(()=>i.e(4144).then(()=>i(4144)).then(e=>e.load().then(()=>e))),p=(0,l.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(1550)]).then(()=>i(78125)));function c(e,t,i){let r=(0,a.Vp)(i);if(null==r)return e;let[l,n]=r.valid,s=2*n,o=0,u=0;t>n?o=Math.ceil(Math.abs(t-n)/s):t<l&&(o=-Math.ceil(Math.abs(t-l)/s)),e>n?u=Math.ceil(Math.abs(e-n)/s):e<l&&(u=-Math.ceil(Math.abs(e-l)/s));let h=e+(o-u)*s,p=h-t;return p>n?h-=s:p<l&&(h+=s),h}function f(e){let t=(0,a.Vp)(e);if(null==t)return null;let[i,l]=t.valid;return new r.hr(i,l)}const g=f(o.A.WGS84);f(o.A.WebMercator),i.d(t,["Y_",0,g])},80754(e,t,i){i.d(t,{kS:()=>u,kd:()=>a});var r=i(82799),l=i(16930),n=i(60408),s=i(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:l.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:l.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:l.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:l.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,s.Ed)(e))for(let i of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of i){if((0,s.aO)(e)){let[i,r]=e.c;i[0]+=t,r[0]+=t;continue}if((0,s.FG)(e)){let[i,r]=e.a;i[0]+=t,r[0]+=t;continue}if((0,s.n1)(e)){let[i,r,l]=e.b;i[0]+=t,r[0]+=t,l[0]+=t;continue}e[0]+=t}for(let i of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of i)e[0]+=t;return e}i.d(t,["j7",0,o])},55156(e,t,i){i.d(t,{I:()=>l});const r=Symbol("idFieldsProviderSymbol");function l(e){return(t=e)&&r in t?e[r]:void 0;var t}i.d(t,["e",0,r])},71756(e,t,i){i.r(t);var r,l=i(32198),n=i(56507),s=i(49186),o=i(81583),a=i(25728),u=i(17676),h=i(84952),p=i(91429),c=i(16930),f=i(4146),g=i(52136),y=i(89186),d=i(98534),m=i(18768),v=i(63074),w=i(69208),b=i(34287),_=i(8303),A=i(54310),M=i(25036),x=i(91921),C=i(60694),S=i(10873),T=i(33446),O=i(15775),R=i(88625),I=i(36005),L=i(43937);const Z=["Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Elevation/World_Hillshade","Elevation/World_Hillshade_Dark","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Ocean_Basemap","Reference/World_Boundaries_and_Places","Reference/World_Boundaries_and_Places_Alternate","Reference/World_Transportation","World_Imagery","World_Street_Map","World_Topo_Map"];let z=r=class extends((0,v.dM)((0,M.j)((0,x.I)((0,y.f)((0,d.V)((0,b.q)((0,_.A)((0,m.b)((0,a.M)((0,A.J)((0,g.p)((0,w.d)(f.A))))))))))))){constructor(...e){super(...e),this.listMode="show",this.elevationInfo=new R.A({mode:"on-the-ground"}),this.isReference=null,this.operationalLayerType="ArcGISTiledMapServiceLayer",this.resampling=!0,this.sourceJSON=null,this.spatialReference=null,this.path=null,this.sublayers=null,this.type="tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(u.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}get attributionDataUrl(){let e=this.parsedUrl?.path.toLowerCase();return e?this._getDefaultAttribution(this._getMapName(e)):null}get hasAttributionData(){return super.hasAttributionData}readSpatialReference(e,t){return e||=t.tileInfo?.spatialReference,e&&c.A.fromJSON(e)}writeSublayers(e,t,i,r){if(!this.loaded||!e)return;let l=e.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).toArray(),n=[],s={writeSublayerStructure:!1,...r};l.forEach(e=>{let t=e.write({},s);n.push(t)}),n.some(e=>Object.keys(e).length>1)&&(t.layers=n)}get tileServers(){return this._getDefaultTileServers(this.parsedUrl?.path)}castTileServers(e){return Array.isArray(e)?e.map(e=>(0,h.An)(e).path):null}fetchTile(e,t,i,r={}){let{signal:l}=r,s=this.getTileUrl(e,t,i),o={responseType:"image",signal:l,query:{...this.refreshParameters}};return(0,n.A)(s,o).then(e=>e.data)}async fetchImageBitmapTile(e,t,i,l={}){let{signal:s}=l;if(this.fetchTile!==r.prototype.fetchTile){let r=await this.fetchTile(e,t,i,l);return(0,T.Cp)(r,e,t,i,l)}let o=this.getTileUrl(e,t,i),a={responseType:"blob",signal:s,query:{...this.refreshParameters}},{data:u}=await(0,n.A)(o,a);return(0,T.Cp)(u,e,t,i,l)}getTileUrl(e,t,i){let r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,l=(0,h.x0)({...this.parsedUrl?.query,blankTile:!r&&null,...this.customParameters,token:this.apiKey}),n=this.tileServers;return`${n&&n.length?n[t%n.length]:this.parsedUrl?.path}/tile/${e}/${t}/${i}${l?"?"+l:""}`}loadAll(){return(0,o.g)(this,e=>{e(this.allSublayers)})}_fetchService(e){return new Promise((t,i)=>{if(this.sourceJSON){if(null!=this.sourceJSON.bandCount&&null!=this.sourceJSON.pixelSizeX)throw new s.A("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");return void t({data:this.sourceJSON})}if(!this.parsedUrl)throw new s.A("tile-layer:undefined-url","layer's url is not defined");let r=(0,C.qg)(this.parsedUrl.path);if(null!=r&&"ImageServer"===r.serverType)throw new s.A("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");(0,n.A)(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(t,i)}).then(t=>{let i=this.url;if(t.ssl&&(i=this.url=i.replace(/^http:/i,"https:")),this.sourceJSON=t.data,this.read(t.data,{origin:"service",url:this.parsedUrl}),10.1===this.version&&!(0,C.Wo)(i))return this._fetchServerVersion(i,e).then(e=>{this.read({currentVersion:e})}).catch(()=>{})})}_fetchServerVersion(e,t){if(!(0,C.Fi)(e))return Promise.reject();let i=e.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return(0,n.A)(i,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then(e=>{if(e.data?.currentVersion)return e.data.currentVersion;throw new s.A("tile-layer:version-not-available","Server did not provide a version")})}_getMapName(e){let t=e.match(/^(?:https?:)?\/\/(server\.arcgisonline\.com|services\.arcgisonline\.com|ibasemaps-api\.arcgis\.com)\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/mapserver/i);return t?t[2]:void 0}_getDefaultAttribution(e){if(null==e)return null;let t;e=e.toLowerCase();for(let i=0,r=Z.length;i<r;i++)if(t=Z[i],t.toLowerCase().includes(e))return(0,h.s2)("//static.arcgis.com/attribution/"+t);return null}_getDefaultTileServers(e){if(null==e)return[];let t=-1!==e.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),i=-1!==e.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return t||i?[e,e.replace(t?/server\.arcgisonline/i:/services\.arcgisonline/i,t?"services.arcgisonline":"server.arcgisonline")]:[]}get hasOverriddenFetchTile(){return!this.fetchTile[G]}};(0,l.Cg)([(0,p.MZ)({readOnly:!0})],z.prototype,"attributionDataUrl",null),(0,l.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],z.prototype,"listMode",void 0),(0,l.Cg)([(0,p.MZ)({json:{read:!0,write:!0}})],z.prototype,"blendMode",void 0),(0,l.Cg)([(0,p.MZ)()],z.prototype,"elevationInfo",void 0),(0,l.Cg)([(0,p.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],z.prototype,"isReference",void 0),(0,l.Cg)([(0,p.MZ)({readOnly:!0,type:["ArcGISTiledMapServiceLayer"]})],z.prototype,"operationalLayerType",void 0),(0,l.Cg)([(0,p.MZ)({type:Boolean})],z.prototype,"resampling",void 0),(0,l.Cg)([(0,p.MZ)()],z.prototype,"sourceJSON",void 0),(0,l.Cg)([(0,p.MZ)({type:c.A})],z.prototype,"spatialReference",void 0),(0,l.Cg)([(0,I.w)("spatialReference",["spatialReference","tileInfo"])],z.prototype,"readSpatialReference",null),(0,l.Cg)([(0,p.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],z.prototype,"path",void 0),(0,l.Cg)([(0,p.MZ)({readOnly:!0})],z.prototype,"sublayers",void 0),(0,l.Cg)([(0,L.K)("sublayers",{layers:{type:[O.A]}})],z.prototype,"writeSublayers",null),(0,l.Cg)([(0,p.MZ)({json:{read:!1,write:!1}})],z.prototype,"popupEnabled",void 0),(0,l.Cg)([(0,p.MZ)()],z.prototype,"tileServers",null),(0,l.Cg)([(0,p.wg)("tileServers")],z.prototype,"castTileServers",null),(0,l.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],z.prototype,"type",void 0),(0,l.Cg)([(0,p.MZ)(S.OZ)],z.prototype,"url",void 0),z=r=(0,l.Cg)([(0,p.$K)("esri.layers.TileLayer")],z);const G=Symbol("default-fetch-tile");z.prototype.fetchTile[G]=!0;const D=z;i.d(t,["default",0,D])},54339(e,t,i){function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let i=[];for(let r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function l(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>l})},89186(e,t,i){var r=i(32198),l=i(91429),n=i(16930),s=i(87045),o=i(65509),a=i(25943),u=i(36005);i.d(t,["f",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){let r=t.capabilities?.toLowerCase().includes("tilemap"),{minLOD:l,maxLOD:n,minScale:u,maxScale:h}=t;if(null==l&&null==n&&(0!==u||0!==h)){let e=e=>Math.round(1e4*e)/1e4;u=e(u||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(let i of t.tileInfo.lods){let t=e(i.scale);l=t>=u?i.level:l,n=t>=h?i.level:n}}if(r)return new a.d({layer:this,minLOD:l,maxLOD:n});if(t.tileInfo){let e=new s.A;return e.read(t.tileInfo,i),new o.A(e,l,n)}return null}};return(0,r.Cg)([(0,l.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,l.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,u.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,l.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,u.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,l.MZ)({type:n.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,l.MZ)({type:s.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,l.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,u.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,l.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}])},91806(e,t,i){i.d(t,{A:()=>a});var r,l=i(32198),n=i(25482),s=i(91429),o=i(78888);let a=class extends n.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,l.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"cols",void 0),(0,l.Cg)([(0,s.MZ)({type:o.jz,json:{write:!0}})],a.prototype,"level",void 0),(0,l.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"levelValue",void 0),(0,l.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"origin",void 0),(0,l.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],a.prototype,"resolution",void 0),(0,l.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"rows",void 0),(0,l.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],a.prototype,"scale",void 0),a=r=(0,l.Cg)([(0,s.$K)("esri.layers.support.LOD")],a)},87045(e,t,i){i.d(t,{A:()=>w});var r,l=i(32198),n=i(66552),s=i(25482),o=i(86211),a=i(91429),u=i(78888),h=i(86738),p=i(16930),c=i(21325),f=i(28735),g=i(91806),y=i(72802),d=i(36005),m=i(43937);const v=new n.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=class extends s.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:l=256,spatialReference:n=p.A.WebMercator,numLODs:s=24}=e;if(!(0,c.fn)(n)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new g.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=s-1;i>=0;i--)e.unshift(new g.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new h.A(0,0,n),size:[l,l],spatialReference:n})}let a=(0,c.Vp)(n),u=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:n}):a?new h.A({x:a.origin[0],y:a.origin[1],spatialReference:n}):new h.A({x:0,y:0,spatialReference:n}),f=1/(39.37*(0,o.GA)(n)*96),y=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*f;y.push(new g.A({level:e,scale:t,resolution:r}))}else{let e=(0,c.EA)(n)?512/l*591657527.5917094:256/l*591657527.591555,i=Math.ceil(s/t);y.push(new g.A({level:0,scale:e,resolution:e*f}));for(let r=1;r<i;r++){let i=e/2**t,l=i*f;y.push(new g.A({level:r,scale:i,resolution:l})),e=i}}return new r({dpi:96,lods:y,origin:u,size:[l,l],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){let{spatialReference:e,origin:t}=this;if(e&&t){let i=(0,c.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0,r=[],l=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,l[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){let t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];let i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){let t=this.scales,i=t.length-1,r=0;for(;r<i;r++){let i=t[r],l=t[r+1];if(i<=e)return r;if(l===e)return r+1;if(i>e&&l<e)return r+Math.log(i/e)/Math.log(i/l)}return r}tileAt(e,t,i,r){let l,n,s=this.lodAt(e);if(!s)return null;if("number"==typeof t)l=t,n=i;else if((0,c.aI)(t.spatialReference,this.spatialReference))l=t.x,n=t.y,r=i;else{let e=(0,f.Cv)(t,this.spatialReference);if(null==e)return null;l=e.x,n=e.y,r=i}let o=s.resolution*this.size[0],a=s.resolution*this.size[1];return r??=new y.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-n)/a+.001),r.col=Math.floor((l-this.origin.x)/o+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){let t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;let r=e.level-i.level,l=i.resolution*this.size[0]/2**r,n=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*l,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+l,e.extent[3]=e.extent[1]+n,!0}upsampleTile(e){let t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){let i=this.lodAt(t.level);if(null==i)return null;let{resolution:r}=i,l=r*this.size[0],n=r*this.size[1];return e[0]=this.origin.x+t.col*l,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+l,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;let t=(512===this.size[0]&&256===e?-1:0)+ +!!this.spatialReference.isGeographic;if(this.size[0]===e&&0===t)return this;let i=[],l=this.lods.length-t;for(let e=0;e<l;e++){let r=e+t,{scale:l,resolution:n}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new g.A({level:e,scale:l,resolution:n}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){let e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){let r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,l.Cg)([(0,a.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,l.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,l.Cg)([(0,a.MZ)({type:h.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,l.Cg)([(0,d.w)("origin")],w.prototype,"readOrigin",null),(0,l.Cg)([(0,a.MZ)({type:[g.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,l.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,l.Cg)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,l.Cg)([(0,d.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,l.Cg)([(0,m.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],w.prototype,"writeSize",null),(0,l.Cg)([(0,a.MZ)({type:p.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=r=(0,l.Cg)([(0,a.$K)("esri.layers.support.TileInfo")],w)},65509(e,t,i){i.d(t,{A:()=>n});var r=i(49186),l=i(17676);class n{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){let r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?i>=r.cols[0]&&i<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,n){await(0,l.NO)(n);let s=this.getAvailability(e,t,i);if("unavailable"===s)throw new r.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return s}async fetchAvailabilityUpsample(e,t,i,r,n){await(0,l.NO)(n),r.level=e,r.row=t,r.col=i;let s=this.tileInfo;return s.updateTileInfo(r),this.fetchAvailability(e,t,i,n).catch(e=>{if((0,l.zf)(e))throw e;if(s.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,n);throw e})}}},72802(e,t,i){i.d(t,{U:()=>l});var r=i(19419);class l{constructor(e,t,i,l=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=l}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new l(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>A});var r,l=i(32198),n=i(56507),s=i(69622),o=i(49186),a=i(36563),u=(i(44208),i(66344)),h=i(15142),p=i(17676),c=i(36708),f=i(76030),g=i(84952),y=i(91429),d=i(72802),m=i(4718),v=i(69397);class w{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);let{location:t,data:i}=e;this.location=Object.freeze((0,m.o8)(t));let r=this.location.width,l=this.location.height,n=!0,s=!0,a=function(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Uint32Array(e)}(Math.ceil(r*l/32)),u=0;for(let e=0;e<i.length;e++){let t=e%32;i[e]?(s=!1,a[u]|=1<<t):n=!1,31===t&&++u}s?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=a,this.byteSize=40+(0,v.Qf)(a))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;let i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,l=i>>5,n=this._availability;return l<0||l>n.length?"unknown":n[l]&1<<r?"available":"unavailable"}static fromDefinition(e,t){let i=e.service.request||n.A,{row:r,col:l,width:s,height:a}=e,u={query:{f:"json"}};return t=t?{...u,...t}:u,i(function(e){let t;if(e.service.tileServers?.length){let i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;let i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:l,width:s,height:a},valid:!0,data:Array(s*a).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==l||e.location.width!==s||e.location.height!==a))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:l,width:s,height:a}});return w.fromJSON(e)})}static fromJSON(e){return Object.freeze(new w(e))}}function b(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function _(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let A=class extends s.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2097152),this.addHandles((0,c.wB)(()=>{let{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),c.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";let r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(_(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof w){let l=r.getAvailability(t,i);if("unavailable"===l)throw _(e,t,i);return l}if((0,p.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,l){r.level=e,r.row=t,r.col=i;let n=this.layer.tileInfo;n.updateTileInfo(r);let s=this.fetchAvailability(e,t,i,l).catch(e=>{if((0,p.zf)(e))throw e;if(n.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,l,s),s}async _fetchAvailabilityUpsamplePrefetch(e,t,i,l,n){if(!this._prefetchingEnabled)return;let s=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(s))return;let o=new AbortController;n.then(()=>o.abort(),()=>o.abort());let u=!1,h=(0,a.hA)(()=>{u||(u=!0,o.abort())});if(this.addHandles(h,s),await(0,f.md)(10,o.signal).catch(()=>{}),u||(u=!0,this.removeHandles(s)),(0,p.G4)(o))return;let c=new d.U(e,t,i),g={...l,signal:o.signal},y=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&y.upsampleTile(c);++e){let e=this.fetchAvailability(c.level,c.row,c.col,g);r._prefetches.push(e);let t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new h.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));let l=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,l);if(n)return Promise.resolve(n);let s=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,p.u7)(s,()=>t((0,p.NK)()));let i=b(l),n=this._pendingTilemapRequests[i];if(!n){n=w.fromDefinition(l,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));let e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;let{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,g.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;let l=b(r);return this._tilemapCache.get(l)}get test(){}};(0,l.Cg)([(0,y.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,l.Cg)([(0,y.MZ)({constructOnly:!0})],A.prototype,"minLOD",void 0),(0,l.Cg)([(0,y.MZ)({constructOnly:!0})],A.prototype,"maxLOD",void 0),(0,l.Cg)([(0,y.MZ)({constructOnly:!0})],A.prototype,"request",void 0),(0,l.Cg)([(0,y.MZ)({constructOnly:!0})],A.prototype,"size",void 0),A=r=(0,l.Cg)([(0,y.$K)("esri.layers.support.TilemapCache")],A)},32730(e,t,i){i.d(t,{BI:()=>p,D3:()=>u,XJ:()=>h,lc:()=>a,mX:()=>f,rU:()=>c,tH:()=>v,zA:()=>b});var r=i(799);const l=RegExp("__begin__","ig"),n=RegExp("__end__","ig"),s=RegExp("^__begin__","i"),o=RegExp("__end__$","i");function a(e){return e.replaceAll(RegExp("\\[","g"),"{").replaceAll(RegExp("\\]","g"),"}")}function u(e){return e.replaceAll(RegExp("\\{","g"),"[").replaceAll(RegExp("\\}","g"),"]")}function h(e){let t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=a(e.labelExpression),t.type="conventional"),t}function p(e){let t=h(e);if(!t)return null;switch(t.type){case"conventional":return f(t.expression);case"arcade":return t.expression}return null}function c(e){let t=h(e);if(!t)return null;switch(t.type){case"conventional":return function(e){return(e?.match(g))?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function f(e){let t;return e?(t=(0,r.HC)(e,e=>'__begin__$feature["'+e+'"]__end__'),t=s.test(t)?t.replace(s,""):'"'+t,t=o.test(t)?t.replace(o,""):t+'"',t=t.replaceAll(l,'" + ').replaceAll(n,' + "')):t='""',t}const g=/^\s*\{([^}]+)\}\s*$/i,y=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,d=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,m=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=y.exec(e)||d.exec(e);return t?t[1]||t[3]:(t=m.exec(e),t?t[2]:null)}const w=Symbol("LabelClassInstance");function b(e){return"object"==typeof e&&!!e&&w in e}i.d(t,["vK",0,w])},22671(e,t,i){i.d(t,{A:()=>v});var r,l=i(32198),n=i(52106),s=i(66552),o=i(25482),a=i(4718),u=i(91429),h=i(16930),p=i(60408),c=i(65864),f=i(50498),g=i(20437),y=i(36005),d=i(43937);const m=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends o.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,i,r){if(e)return void m.write(e,t,i,r);let{features:l}=this;if(l)for(let e of l)if(null!=e?.geometry)return void m.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;let i=!!e.spatialReference,r=(0,c.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=h.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:i}=this;if(i)for(let e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){let r=t.features[i];r.geometry&&=(e?.[i])?.toJSON()||r.geometry}return t}quantize(e){let{scale:[t,i],translate:[r,l]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((l-e)/i));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:i}=this;if(!i)return this;let{translate:[r,l],scale:[n,s]}=i,o=null,a=null;if(this.hasZ&&null!=i?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=i;o=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=i;a=i=>null==i?i:i*t+e}let u=this._getHydrationFunction(e,e=>e*n+r,e=>l-e*s,o,a);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){let r=h.A.fromJSON(t.spatialReference),l=[];for(let t=0;t<e.length;t++){let n=e[t],s=i.fromJSON(n),o=n.geometry?.spatialReference;null!=s.geometry&&!o&&(s.geometry.spatialReference=r);let a=n.aggregateGeometries,u=s.aggregateGeometries;if(a&&null!=u)for(let e in u){let t=u[e],i=a[e]?.spatialReference;null!=t&&!i&&(t.spatialReference=r)}l.push(s)}return l}_quantizePoints(e,t,i){let r,l,n=[];for(let s=0,o=e.length;s<o;s++){let o=e[s];if(s>0){let e=t(o[0]),s=i(o[1]);(e!==r||s!==l)&&(n.push([e-r,s-l]),r=e,l=s)}else r=t(o[0]),l=i(o[1]),n.push([r,l])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{let r=(0,p.Bi)(e)?e.rings:e.paths,l=[];for(let e=0,n=r.length;e<n;e++){let n=r[e],s=this._quantizePoints(n,t,i);s&&l.push(s)}return l.length>0?((0,p.Bi)(e)?e.rings=l:e.paths=l,e):null}:"multipoint"===e?e=>{let r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,l){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{let n,s,o=(0,p.Bi)(e)?e.rings:e.paths;for(let e=0,r=o.length;e<r;e++){let r=o[e];for(let e=0,l=r.length;e<l;e++){let l=r[e];e>0?(n+=l[0],s+=l[1]):(n=l[0],s=l[1]),l[0]=t(n),l[1]=i(s)}}if(r&&l)for(let e=0,t=o.length;e<t;e++){let t=o[e];for(let e=0,i=t.length;e<i;e++){let i=t[e];i[2]=r(i[2]),i[3]=l(i[3])}}else if(r)for(let e=0,t=o.length;e<t;e++){let t=o[e];for(let e=0,i=t.length;e<i;e++){let i=t[e];i[2]=r(i[2])}}else if(l)for(let e=0,t=o.length;e<t;e++){let t=o[e];for(let e=0,i=t.length;e<i;e++){let i=t[e];i[2]=l(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),l&&null!=e.mmax&&null!=e.mmin&&(e.mmax=l(e.mmax),e.mmin=l(e.mmin))}:"multipoint"===e?e=>{let n,s,o=e.points;for(let e=0,r=o.length;e<r;e++){let r=o[e];e>0?(n+=r[0],s+=r[1]):(n=r[0],s=r[1]),r[0]=t(n),r[1]=i(s)}if(r&&l)for(let e=0,t=o.length;e<t;e++){let t=o[e];t[2]=r(t[2]),t[3]=l(t[3])}else if(r)for(let e=0,t=o.length;e<t;e++){let t=o[e];t[2]=r(t[2])}else if(l)for(let e=0,t=o.length;e<t;e++){let t=o[e];t[2]=l(t[2])}}:null}};(0,l.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,l.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,l.Cg)([(0,u.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,l.Cg)([(0,y.w)("features")],v.prototype,"readFeatures",null),(0,l.Cg)([(0,u.MZ)({type:[g.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,l.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,l.Cg)([(0,d.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,l.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,l.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,l.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,l.Cg)([(0,y.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,l.Cg)([(0,u.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,l.Cg)([(0,d.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,l.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,l.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>p,jV:()=>a,lF:()=>h});var r=i(92602),l=i(70333),n=i(4718),s=i(84952),o=i(926);function a(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,s.An)(e):(0,n.o8)(e)}function h(e,t,i){let r={};for(let l in e){if("declaredClass"===l)continue;let n=e[l];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))r[l]=n.map(e=>h(e));else if("object"==typeof n)if(n.toJSON){let e=n.toJSON(i?.[l]);r[l]=t?e:JSON.stringify(e)}else r[l]=t?n:JSON.stringify(n);else r[l]=n}return r}async function p(e,t,n){return function(e,t){return e?t&&(0,o.Qc)(e)?t:(0,o.getApiKey)(e)??l.id?.findCredential(e)?.token:null}(e,t)||(!l.id&&r.A.request.useIdentity&&await Promise.all([i.e(6361),i.e(7644),i.e(7715)]).then(()=>i(50148)),(await l.id.getCredential(e,n))?.token)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6811],{52106(e,t,i){i.d(t,{A:()=>x});var r,l,n=i(32198),s=i(37838),o=i(69540),a=i(51447),u=i(25482),h=i(53966),p=i(36708),c=i(24326),f=i(91429),g=i(12195),y=i(65864),d=i(50498),m=i(55156),v=i(60950),w=i(54339),b=i(94128),_=i(33910);const A=Symbol("meshGeometryHandles");function M(e){if(null==e)return null;let t={};for(let i in e){let r=e[i];r&&(t[i]=r.toJSON())}return 0===Object.keys(t).length?null:t}let x=class extends((0,o.OU)(u.o)){static{r=b.Z}static{l=this}constructor(e){super(e),this[r]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(h.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new l({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,v.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let i=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[i,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,m.I)(this.origin);if(e)return(0,w.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,w.r)(this,t):null}getGlobalId(){let e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:M(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,g.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let l={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(l.action=r),"attributes"===e&&(l.attributeName=r),this.layer.graphicChanged(l)}_watchMeshGeometryChanges(){this.removeHandles(A);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,p.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,p.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],A)}};(0,n.Cg)([(0,f.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let i in e){let r=(0,y.rS)(e[i]);r&&(t[i]=r)}return 0===Object.keys(t).length?null:t}}})],x.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,f.MZ)({value:null})],x.prototype,"attributes",null),(0,n.Cg)([(0,f.MZ)({value:null,types:d.yR,json:{read:y.rS}})],x.prototype,"geometry",null),(0,n.Cg)([(0,f.MZ)()],x.prototype,"distance",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean})],x.prototype,"isAggregate",void 0),(0,n.Cg)([(0,f.MZ)({clonable:!1})],x.prototype,"layer",void 0),(0,n.Cg)([(0,f.MZ)({clonable:"reference"})],x.prototype,"origin",void 0),(0,n.Cg)([(0,f.MZ)({type:s.A,value:null})],x.prototype,"popupTemplate",null),(0,n.Cg)([(0,f.MZ)({clonable:"reference"})],x.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,f.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],x.prototype,"statisticsAggregatedIds",void 0),(0,n.Cg)([(0,f.MZ)({value:null,types:_.Es})],x.prototype,"symbol",null),(0,n.Cg)([(0,f.MZ)({clonable:!1,json:{read:!1,write:!1}})],x.prototype,"_version",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,value:!0})],x.prototype,"visible",null),x=l=(0,n.Cg)([(0,f.$K)("esri.Graphic")],x)},19334(e,t,i){i.d(t,{e:()=>s});var r=i(54639),l=i(14112);class n{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function s(e){if(null==e)return null;switch(e.type){case"point":if((0,l.e6)(e))return null;break;case"polygon":if((0,l.Wq)(e))return null;break;case"polyline":if((0,l.IY)(e))return null;break;case"multipoint":if((0,l.DG)(e))return null;break;case"extent":if((0,l.As)(e))return null;break;default:return null}let t=r.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new n(e));return t.asAccessorGeometry(),t}},36983(e,t,i){i.d(t,{R:()=>u,p:()=>h});var r=i(54639),l=i(14112),n=i(16930),s=i(60408),o=i(65864);class a{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){let t=(0,o.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function u(e,t){if("object"!=typeof e||!e)return null;let i=t;if("spatialReference"in e&&(e.spatialReference instanceof n.A?i=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(i=new n.A,i.read(e.spatialReference))),null==i)throw Error("Spatial reference required");return(0,s.fT)(e)?h("point",e,i):(0,s.Rg)(e)?h("polyline",e,i):(0,s.Bi)(e)?h("polygon",e,i):(0,s.U9)(e)?h("multipoint",e,i):(0,s.ZC)(e)?h("extent",e,i):null}function h(e,t,i){if(null==t)return null;let n=!1,s=!1;switch(e){case"point":if((0,l.e6)(t))return null;n=void 0!==t.z,s=void 0!==t.m;break;case"polygon":if((0,l.Wq)(t))return null;n=!0===t.hasZ,s=!0===t.hasM;break;case"polyline":if((0,l.IY)(t))return null;n=!0===t.hasZ,s=!0===t.hasM;break;case"multipoint":if((0,l.DG)(t))return null;n=!0===t.hasZ,s=!0===t.hasM;break;case"extent":if((0,l.As)(t))return null;n=null!=t.zmin&&null!=t.zmax,s=null!=t.mmin&&null!=t.mmax;break;default:throw Error("Unsupported geometry type: "+t.type)}return r.R.of(e,i,n,s,new a(t))}},14112(e,t,i){function r(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function l(e){if(0===(e.curveRings??e.rings).length)return!0;for(let t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function n(e){if(0===(e.curvePaths??e.paths).length)return!0;for(let t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function s(e){return 0===e.points.length}function o(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}i.d(t,{As:()=>o,DG:()=>s,IY:()=>n,Wq:()=>l,e6:()=>r})},69052(e,t,i){i.d(t,{hr:()=>l});var r=i(34727);class l{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return n(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+s(this.range,e-t,i)}minimalMonotonic(e,t,i){return n(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);let i=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(r)?i:r}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function n(e,t,i,r,l=0,n=!1){return(r-=l)<t?r+=s(e,t-r):r>i&&(r-=s(e,r-i)),n&&r===i&&(r=t),r+l}function s(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const o=new l(0,2*Math.PI),a=(new l(-Math.PI,Math.PI),new l(0,360));i.d(t,["ie",0,a,"uC",0,o])},18370(e,t,i){i.d(t,{z:()=>l});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function l(e){return new r(e)}},13069(e,t,i){i.d(t,{AG:()=>o,lk:()=>l,vD:()=>s,yS:()=>n});const r="randomUUID"in crypto;function l(){if(r)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let 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`{${l().toUpperCase()}}`}function s(){return`{${l()}}`}function o(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},52039(e,t,i){i.d(t,{O7:()=>c,el:()=>u});var r=i(69052),l=(i(49186),i(18370)),n=i(17676),s=(i(5443),i(39829)),o=(i(82799),i(16930)),a=(i(80754),i(21325));async function u(e,t,i){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(i=t);let r=null;for(let t of e)r??=t?.spatialReference;if(!r)return e;let l=(0,a.Vp)(r);if(!l)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(l);return["xmin"in t?t:new s.A(t)]}let[o,u]=l.valid,c=!1;for(let t of e){if(!t)continue;if("point"===t.type){c||=t.x>=u,c||=t.x<=o;continue}let{extent:e}=t;if(null==e){c=!0;break}c||=e.xmin>=u,c||=e.xmin<=o,c||=e.xmax>=u,c||=e.xmax<=o}if(!c)return e;let[{foldInto360Range:f},g]=await(0,n.qr)(Promise.all([h.getImportPromise(),p.getImportPromise()]),i),y=g.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=g.fromGeometry(e),i=g.toGeometry(f(t,y),r);return"extent"===e.type&&1===i?.rings.length?i.extent:i})}const h=(0,l.z)(()=>i.e(4144).then(()=>i(4144)).then(e=>e.load().then(()=>e))),p=(0,l.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(1550)]).then(()=>i(78125)));function c(e,t,i){let r=(0,a.Vp)(i);if(null==r)return e;let[l,n]=r.valid,s=2*n,o=0,u=0;t>n?o=Math.ceil(Math.abs(t-n)/s):t<l&&(o=-Math.ceil(Math.abs(t-l)/s)),e>n?u=Math.ceil(Math.abs(e-n)/s):e<l&&(u=-Math.ceil(Math.abs(e-l)/s));let h=e+(o-u)*s,p=h-t;return p>n?h-=s:p<l&&(h+=s),h}function f(e){let t=(0,a.Vp)(e);if(null==t)return null;let[i,l]=t.valid;return new r.hr(i,l)}const g=f(o.A.WGS84);f(o.A.WebMercator),i.d(t,["Y_",0,g])},80754(e,t,i){i.d(t,{kS:()=>u,kd:()=>a});var r=i(82799),l=i(16930),n=i(60408),s=i(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:l.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:l.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:l.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:l.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,s.Ed)(e))for(let i of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of i){if((0,s.aO)(e)){let[i,r]=e.c;i[0]+=t,r[0]+=t;continue}if((0,s.FG)(e)){let[i,r]=e.a;i[0]+=t,r[0]+=t;continue}if((0,s.n1)(e)){let[i,r,l]=e.b;i[0]+=t,r[0]+=t,l[0]+=t;continue}e[0]+=t}for(let i of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of i)e[0]+=t;return e}i.d(t,["j7",0,o])},55156(e,t,i){i.d(t,{I:()=>l});const r=Symbol("idFieldsProviderSymbol");function l(e){return(t=e)&&r in t?e[r]:void 0;var t}i.d(t,["e",0,r])},71756(e,t,i){i.r(t);var r,l=i(32198),n=i(56507),s=i(49186),o=i(81583),a=i(25728),u=i(17676),h=i(84952),p=i(91429),c=i(16930),f=i(4146),g=i(52136),y=i(89186),d=i(98534),m=i(18768),v=i(63074),w=i(69208),b=i(34287),_=i(8303),A=i(54310),M=i(25036),x=i(91921),C=i(60694),S=i(10873),T=i(33446),O=i(15775),R=i(88625),I=i(36005),L=i(43937);const Z=["Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Elevation/World_Hillshade","Elevation/World_Hillshade_Dark","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Ocean_Basemap","Reference/World_Boundaries_and_Places","Reference/World_Boundaries_and_Places_Alternate","Reference/World_Transportation","World_Imagery","World_Street_Map","World_Topo_Map"];let z=r=class extends((0,v.dM)((0,M.j)((0,x.I)((0,y.f)((0,d.V)((0,b.q)((0,_.A)((0,m.b)((0,a.M)((0,A.J)((0,g.p)((0,w.d)(f.A))))))))))))){constructor(...e){super(...e),this.listMode="show",this.elevationInfo=new R.A({mode:"on-the-ground"}),this.isReference=null,this.operationalLayerType="ArcGISTiledMapServiceLayer",this.resampling=!0,this.sourceJSON=null,this.spatialReference=null,this.path=null,this.sublayers=null,this.type="tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(u.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}get attributionDataUrl(){let e=this.parsedUrl?.path.toLowerCase();return e?this._getDefaultAttribution(this._getMapName(e)):null}get hasAttributionData(){return super.hasAttributionData}readSpatialReference(e,t){return e||=t.tileInfo?.spatialReference,e&&c.A.fromJSON(e)}writeSublayers(e,t,i,r){if(!this.loaded||!e)return;let l=e.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).toArray(),n=[],s={writeSublayerStructure:!1,...r};l.forEach(e=>{let t=e.write({},s);n.push(t)}),n.some(e=>Object.keys(e).length>1)&&(t.layers=n)}get tileServers(){return this._getDefaultTileServers(this.parsedUrl?.path)}castTileServers(e){return Array.isArray(e)?e.map(e=>(0,h.An)(e).path):null}fetchTile(e,t,i,r={}){let{signal:l}=r,s=this.getTileUrl(e,t,i),o={responseType:"image",signal:l,query:{...this.refreshParameters}};return(0,n.A)(s,o).then(e=>e.data)}async fetchImageBitmapTile(e,t,i,l={}){let{signal:s}=l;if(this.fetchTile!==r.prototype.fetchTile){let r=await this.fetchTile(e,t,i,l);return(0,T.Cp)(r,e,t,i,l)}let o=this.getTileUrl(e,t,i),a={responseType:"blob",signal:s,query:{...this.refreshParameters}},{data:u}=await(0,n.A)(o,a);return(0,T.Cp)(u,e,t,i,l)}getTileUrl(e,t,i){let r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,l=(0,h.x0)({...this.parsedUrl?.query,blankTile:!r&&null,...this.customParameters,token:this.apiKey}),n=this.tileServers;return`${n&&n.length?n[t%n.length]:this.parsedUrl?.path}/tile/${e}/${t}/${i}${l?"?"+l:""}`}loadAll(){return(0,o.g)(this,e=>{e(this.allSublayers)})}_fetchService(e){return new Promise((t,i)=>{if(this.sourceJSON){if(null!=this.sourceJSON.bandCount&&null!=this.sourceJSON.pixelSizeX)throw new s.A("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");return void t({data:this.sourceJSON})}if(!this.parsedUrl)throw new s.A("tile-layer:undefined-url","layer's url is not defined");let r=(0,C.qg)(this.parsedUrl.path);if(null!=r&&"ImageServer"===r.serverType)throw new s.A("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");(0,n.A)(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(t,i)}).then(t=>{let i=this.url;if(t.ssl&&(i=this.url=i.replace(/^http:/i,"https:")),this.sourceJSON=t.data,this.read(t.data,{origin:"service",url:this.parsedUrl}),10.1===this.version&&!(0,C.Wo)(i))return this._fetchServerVersion(i,e).then(e=>{this.read({currentVersion:e})}).catch(()=>{})})}_fetchServerVersion(e,t){if(!(0,C.Fi)(e))return Promise.reject();let i=e.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return(0,n.A)(i,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then(e=>{if(e.data?.currentVersion)return e.data.currentVersion;throw new s.A("tile-layer:version-not-available","Server did not provide a version")})}_getMapName(e){let t=e.match(/^(?:https?:)?\/\/(server\.arcgisonline\.com|services\.arcgisonline\.com|ibasemaps-api\.arcgis\.com)\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/mapserver/i);return t?t[2]:void 0}_getDefaultAttribution(e){if(null==e)return null;let t;e=e.toLowerCase();for(let i=0,r=Z.length;i<r;i++)if(t=Z[i],t.toLowerCase().includes(e))return(0,h.s2)("//static.arcgis.com/attribution/"+t);return null}_getDefaultTileServers(e){if(null==e)return[];let t=-1!==e.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),i=-1!==e.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return t||i?[e,e.replace(t?/server\.arcgisonline/i:/services\.arcgisonline/i,t?"services.arcgisonline":"server.arcgisonline")]:[]}get hasOverriddenFetchTile(){return!this.fetchTile[G]}};(0,l.Cg)([(0,p.MZ)({readOnly:!0})],z.prototype,"attributionDataUrl",null),(0,l.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],z.prototype,"listMode",void 0),(0,l.Cg)([(0,p.MZ)({json:{read:!0,write:!0}})],z.prototype,"blendMode",void 0),(0,l.Cg)([(0,p.MZ)()],z.prototype,"elevationInfo",void 0),(0,l.Cg)([(0,p.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],z.prototype,"isReference",void 0),(0,l.Cg)([(0,p.MZ)({readOnly:!0,type:["ArcGISTiledMapServiceLayer"]})],z.prototype,"operationalLayerType",void 0),(0,l.Cg)([(0,p.MZ)({type:Boolean})],z.prototype,"resampling",void 0),(0,l.Cg)([(0,p.MZ)()],z.prototype,"sourceJSON",void 0),(0,l.Cg)([(0,p.MZ)({type:c.A})],z.prototype,"spatialReference",void 0),(0,l.Cg)([(0,I.w)("spatialReference",["spatialReference","tileInfo"])],z.prototype,"readSpatialReference",null),(0,l.Cg)([(0,p.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],z.prototype,"path",void 0),(0,l.Cg)([(0,p.MZ)({readOnly:!0})],z.prototype,"sublayers",void 0),(0,l.Cg)([(0,L.K)("sublayers",{layers:{type:[O.A]}})],z.prototype,"writeSublayers",null),(0,l.Cg)([(0,p.MZ)({json:{read:!1,write:!1}})],z.prototype,"popupEnabled",void 0),(0,l.Cg)([(0,p.MZ)()],z.prototype,"tileServers",null),(0,l.Cg)([(0,p.wg)("tileServers")],z.prototype,"castTileServers",null),(0,l.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],z.prototype,"type",void 0),(0,l.Cg)([(0,p.MZ)(S.OZ)],z.prototype,"url",void 0),z=r=(0,l.Cg)([(0,p.$K)("esri.layers.TileLayer")],z);const G=Symbol("default-fetch-tile");z.prototype.fetchTile[G]=!0;const D=z;i.d(t,["default",0,D])},54339(e,t,i){function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let i=[];for(let r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function l(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>l})},89186(e,t,i){var r=i(32198),l=i(91429),n=i(16930),s=i(87045),o=i(65509),a=i(25943),u=i(36005);i.d(t,["f",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){let r=t.capabilities?.toLowerCase().includes("tilemap"),{minLOD:l,maxLOD:n,minScale:u,maxScale:h}=t;if(null==l&&null==n&&(0!==u||0!==h)){let e=e=>Math.round(1e4*e)/1e4;u=e(u||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(let i of t.tileInfo.lods){let t=e(i.scale);l=t>=u?i.level:l,n=t>=h?i.level:n}}if(r)return new a.d({layer:this,minLOD:l,maxLOD:n});if(t.tileInfo){let e=new s.A;return e.read(t.tileInfo,i),new o.A(e,l,n)}return null}};return(0,r.Cg)([(0,l.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,l.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,u.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,l.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,u.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,l.MZ)({type:n.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,l.MZ)({type:s.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,l.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,u.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,l.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}])},91806(e,t,i){i.d(t,{A:()=>a});var r,l=i(32198),n=i(25482),s=i(91429),o=i(78888);let a=class extends n.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,l.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"cols",void 0),(0,l.Cg)([(0,s.MZ)({type:o.jz,json:{write:!0}})],a.prototype,"level",void 0),(0,l.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"levelValue",void 0),(0,l.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"origin",void 0),(0,l.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],a.prototype,"resolution",void 0),(0,l.Cg)([(0,s.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"rows",void 0),(0,l.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],a.prototype,"scale",void 0),a=r=(0,l.Cg)([(0,s.$K)("esri.layers.support.LOD")],a)},87045(e,t,i){i.d(t,{A:()=>w});var r,l=i(32198),n=i(66552),s=i(25482),o=i(86211),a=i(91429),u=i(78888),h=i(86738),p=i(16930),c=i(21325),f=i(28735),g=i(91806),y=i(72802),d=i(36005),m=i(43937);const v=new n.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=class extends s.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:l=256,spatialReference:n=p.A.WebMercator,numLODs:s=24}=e;if(!(0,c.fn)(n)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new g.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=s-1;i>=0;i--)e.unshift(new g.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new h.A(0,0,n),size:[l,l],spatialReference:n})}let a=(0,c.Vp)(n),u=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:n}):a?new h.A({x:a.origin[0],y:a.origin[1],spatialReference:n}):new h.A({x:0,y:0,spatialReference:n}),f=1/(39.37*(0,o.GA)(n)*96),y=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*f;y.push(new g.A({level:e,scale:t,resolution:r}))}else{let e=(0,c.EA)(n)?512/l*591657527.5917094:256/l*591657527.591555,i=Math.ceil(s/t);y.push(new g.A({level:0,scale:e,resolution:e*f}));for(let r=1;r<i;r++){let i=e/2**t,l=i*f;y.push(new g.A({level:r,scale:i,resolution:l})),e=i}}return new r({dpi:96,lods:y,origin:u,size:[l,l],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){let{spatialReference:e,origin:t}=this;if(e&&t){let i=(0,c.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0,r=[],l=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,l[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){let t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];let i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){let t=this.scales,i=t.length-1,r=0;for(;r<i;r++){let i=t[r],l=t[r+1];if(i<=e)return r;if(l===e)return r+1;if(i>e&&l<e)return r+Math.log(i/e)/Math.log(i/l)}return r}tileAt(e,t,i,r){let l,n,s=this.lodAt(e);if(!s)return null;if("number"==typeof t)l=t,n=i;else if((0,c.aI)(t.spatialReference,this.spatialReference))l=t.x,n=t.y,r=i;else{let e=(0,f.Cv)(t,this.spatialReference);if(null==e)return null;l=e.x,n=e.y,r=i}let o=s.resolution*this.size[0],a=s.resolution*this.size[1];return r??=new y.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-n)/a+.001),r.col=Math.floor((l-this.origin.x)/o+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){let t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;let r=e.level-i.level,l=i.resolution*this.size[0]/2**r,n=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*l,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+l,e.extent[3]=e.extent[1]+n,!0}upsampleTile(e){let t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){let i=this.lodAt(t.level);if(null==i)return null;let{resolution:r}=i,l=r*this.size[0],n=r*this.size[1];return e[0]=this.origin.x+t.col*l,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+l,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;let t=(512===this.size[0]&&256===e?-1:0)+ +!!this.spatialReference.isGeographic;if(this.size[0]===e&&0===t)return this;let i=[],l=this.lods.length-t;for(let e=0;e<l;e++){let r=e+t,{scale:l,resolution:n}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new g.A({level:e,scale:l,resolution:n}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){let e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){let r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,l.Cg)([(0,a.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,l.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,l.Cg)([(0,a.MZ)({type:h.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,l.Cg)([(0,d.w)("origin")],w.prototype,"readOrigin",null),(0,l.Cg)([(0,a.MZ)({type:[g.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,l.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,l.Cg)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,l.Cg)([(0,d.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,l.Cg)([(0,m.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],w.prototype,"writeSize",null),(0,l.Cg)([(0,a.MZ)({type:p.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=r=(0,l.Cg)([(0,a.$K)("esri.layers.support.TileInfo")],w)},65509(e,t,i){i.d(t,{A:()=>n});var r=i(49186),l=i(17676);class n{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){let r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?i>=r.cols[0]&&i<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,n){await(0,l.NO)(n);let s=this.getAvailability(e,t,i);if("unavailable"===s)throw new r.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return s}async fetchAvailabilityUpsample(e,t,i,r,n){await(0,l.NO)(n),r.level=e,r.row=t,r.col=i;let s=this.tileInfo;return s.updateTileInfo(r),this.fetchAvailability(e,t,i,n).catch(e=>{if((0,l.zf)(e))throw e;if(s.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,n);throw e})}}},72802(e,t,i){i.d(t,{U:()=>l});var r=i(19419);class l{constructor(e,t,i,l=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=l}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new l(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>A});var r,l=i(32198),n=i(56507),s=i(69622),o=i(49186),a=i(36563),u=(i(44208),i(66344)),h=i(15142),p=i(17676),c=i(36708),f=i(76030),g=i(84952),y=i(91429),d=i(72802),m=i(4718),v=i(69397);class w{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);let{location:t,data:i}=e;this.location=Object.freeze((0,m.o8)(t));let r=this.location.width,l=this.location.height,n=!0,s=!0,a=function(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Uint32Array(e)}(Math.ceil(r*l/32)),u=0;for(let e=0;e<i.length;e++){let t=e%32;i[e]?(s=!1,a[u]|=1<<t):n=!1,31===t&&++u}s?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=a,this.byteSize=40+(0,v.Qf)(a))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;let i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,l=i>>5,n=this._availability;return l<0||l>n.length?"unknown":n[l]&1<<r?"available":"unavailable"}static fromDefinition(e,t){let i=e.service.request||n.A,{row:r,col:l,width:s,height:a}=e,u={query:{f:"json"}};return t=t?{...u,...t}:u,i(function(e){let t;if(e.service.tileServers?.length){let i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;let i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:l,width:s,height:a},valid:!0,data:Array(s*a).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==l||e.location.width!==s||e.location.height!==a))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:l,width:s,height:a}});return w.fromJSON(e)})}static fromJSON(e){return Object.freeze(new w(e))}}function b(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function _(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let A=class extends s.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2097152),this.addHandles((0,c.wB)(()=>{let{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),c.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";let r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(_(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof w){let l=r.getAvailability(t,i);if("unavailable"===l)throw _(e,t,i);return l}if((0,p.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,l){r.level=e,r.row=t,r.col=i;let n=this.layer.tileInfo;n.updateTileInfo(r);let s=this.fetchAvailability(e,t,i,l).catch(e=>{if((0,p.zf)(e))throw e;if(n.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,l,s),s}async _fetchAvailabilityUpsamplePrefetch(e,t,i,l,n){if(!this._prefetchingEnabled)return;let s=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(s))return;let o=new AbortController;n.then(()=>o.abort(),()=>o.abort());let u=!1,h=(0,a.hA)(()=>{u||(u=!0,o.abort())});if(this.addHandles(h,s),await(0,f.md)(10,o.signal).catch(()=>{}),u||(u=!0,this.removeHandles(s)),(0,p.G4)(o))return;let c=new d.U(e,t,i),g={...l,signal:o.signal},y=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&y.upsampleTile(c);++e){let e=this.fetchAvailability(c.level,c.row,c.col,g);r._prefetches.push(e);let t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new h.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));let l=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,l);if(n)return Promise.resolve(n);let s=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,p.u7)(s,()=>t((0,p.NK)()));let i=b(l),n=this._pendingTilemapRequests[i];if(!n){n=w.fromDefinition(l,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));let e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;let{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,g.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;let l=b(r);return this._tilemapCache.get(l)}get test(){}};(0,l.Cg)([(0,y.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,l.Cg)([(0,y.MZ)({constructOnly:!0})],A.prototype,"minLOD",void 0),(0,l.Cg)([(0,y.MZ)({constructOnly:!0})],A.prototype,"maxLOD",void 0),(0,l.Cg)([(0,y.MZ)({constructOnly:!0})],A.prototype,"request",void 0),(0,l.Cg)([(0,y.MZ)({constructOnly:!0})],A.prototype,"size",void 0),A=r=(0,l.Cg)([(0,y.$K)("esri.layers.support.TilemapCache")],A)},32730(e,t,i){i.d(t,{BI:()=>p,D3:()=>u,XJ:()=>h,lc:()=>a,mX:()=>f,rU:()=>c,tH:()=>v,zA:()=>b});var r=i(799);const l=RegExp("__begin__","ig"),n=RegExp("__end__","ig"),s=RegExp("^__begin__","i"),o=RegExp("__end__$","i");function a(e){return e.replaceAll(RegExp("\\[","g"),"{").replaceAll(RegExp("\\]","g"),"}")}function u(e){return e.replaceAll(RegExp("\\{","g"),"[").replaceAll(RegExp("\\}","g"),"]")}function h(e){let t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=a(e.labelExpression),t.type="conventional"),t}function p(e){let t=h(e);if(!t)return null;switch(t.type){case"conventional":return f(t.expression);case"arcade":return t.expression}return null}function c(e){let t=h(e);if(!t)return null;switch(t.type){case"conventional":return function(e){return(e?.match(g))?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function f(e){let t;return e?(t=(0,r.HC)(e,e=>'__begin__$feature["'+e+'"]__end__'),t=s.test(t)?t.replace(s,""):'"'+t,t=o.test(t)?t.replace(o,""):t+'"',t=t.replaceAll(l,'" + ').replaceAll(n,' + "')):t='""',t}const g=/^\s*\{([^}]+)\}\s*$/i,y=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,d=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,m=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=y.exec(e)||d.exec(e);return t?t[1]||t[3]:(t=m.exec(e),t?t[2]:null)}const w=Symbol("LabelClassInstance");function b(e){return"object"==typeof e&&!!e&&w in e}i.d(t,["vK",0,w])},22671(e,t,i){i.d(t,{A:()=>v});var r,l=i(32198),n=i(52106),s=i(66552),o=i(25482),a=i(4718),u=i(91429),h=i(16930),p=i(60408),c=i(65864),f=i(50498),g=i(20437),y=i(36005),d=i(43937);const m=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends o.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,i,r){if(e)return void m.write(e,t,i,r);let{features:l}=this;if(l)for(let e of l)if(null!=e?.geometry)return void m.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;let i=!!e.spatialReference,r=(0,c.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=h.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:i}=this;if(i)for(let e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){let r=t.features[i];r.geometry&&=(e?.[i])?.toJSON()||r.geometry}return t}quantize(e){let{scale:[t,i],translate:[r,l]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((l-e)/i));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:i}=this;if(!i)return this;let{translate:[r,l],scale:[n,s]}=i,o=null,a=null;if(this.hasZ&&null!=i?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=i;o=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=i;a=i=>null==i?i:i*t+e}let u=this._getHydrationFunction(e,e=>e*n+r,e=>l-e*s,o,a);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){let r=h.A.fromJSON(t.spatialReference),l=[];for(let t=0;t<e.length;t++){let n=e[t],s=i.fromJSON(n),o=n.geometry?.spatialReference;null!=s.geometry&&!o&&(s.geometry.spatialReference=r);let a=n.aggregateGeometries,u=s.aggregateGeometries;if(a&&null!=u)for(let e in u){let t=u[e],i=a[e]?.spatialReference;null!=t&&!i&&(t.spatialReference=r)}l.push(s)}return l}_quantizePoints(e,t,i){let r,l,n=[];for(let s=0,o=e.length;s<o;s++){let o=e[s];if(s>0){let e=t(o[0]),s=i(o[1]);(e!==r||s!==l)&&(n.push([e-r,s-l]),r=e,l=s)}else r=t(o[0]),l=i(o[1]),n.push([r,l])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{let r=(0,p.Bi)(e)?e.rings:e.paths,l=[];for(let e=0,n=r.length;e<n;e++){let n=r[e],s=this._quantizePoints(n,t,i);s&&l.push(s)}return l.length>0?((0,p.Bi)(e)?e.rings=l:e.paths=l,e):null}:"multipoint"===e?e=>{let r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,l){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{let n,s,o=(0,p.Bi)(e)?e.rings:e.paths;for(let e=0,r=o.length;e<r;e++){let r=o[e];for(let e=0,l=r.length;e<l;e++){let l=r[e];e>0?(n+=l[0],s+=l[1]):(n=l[0],s=l[1]),l[0]=t(n),l[1]=i(s)}}if(r&&l)for(let e=0,t=o.length;e<t;e++){let t=o[e];for(let e=0,i=t.length;e<i;e++){let i=t[e];i[2]=r(i[2]),i[3]=l(i[3])}}else if(r)for(let e=0,t=o.length;e<t;e++){let t=o[e];for(let e=0,i=t.length;e<i;e++){let i=t[e];i[2]=r(i[2])}}else if(l)for(let e=0,t=o.length;e<t;e++){let t=o[e];for(let e=0,i=t.length;e<i;e++){let i=t[e];i[2]=l(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),l&&null!=e.mmax&&null!=e.mmin&&(e.mmax=l(e.mmax),e.mmin=l(e.mmin))}:"multipoint"===e?e=>{let n,s,o=e.points;for(let e=0,r=o.length;e<r;e++){let r=o[e];e>0?(n+=r[0],s+=r[1]):(n=r[0],s=r[1]),r[0]=t(n),r[1]=i(s)}if(r&&l)for(let e=0,t=o.length;e<t;e++){let t=o[e];t[2]=r(t[2]),t[3]=l(t[3])}else if(r)for(let e=0,t=o.length;e<t;e++){let t=o[e];t[2]=r(t[2])}else if(l)for(let e=0,t=o.length;e<t;e++){let t=o[e];t[2]=l(t[2])}}:null}};(0,l.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,l.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,l.Cg)([(0,u.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,l.Cg)([(0,y.w)("features")],v.prototype,"readFeatures",null),(0,l.Cg)([(0,u.MZ)({type:[g.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,l.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,l.Cg)([(0,d.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,l.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,l.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,l.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,l.Cg)([(0,y.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,l.Cg)([(0,u.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,l.Cg)([(0,d.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,l.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,l.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>p,jV:()=>a,lF:()=>h});var r=i(92602),l=i(70333),n=i(4718),s=i(84952),o=i(926);function a(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,s.An)(e):(0,n.o8)(e)}function h(e,t,i){let r={};for(let l in e){if("declaredClass"===l)continue;let n=e[l];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))r[l]=n.map(e=>h(e));else if("object"==typeof n)if(n.toJSON){let e=n.toJSON(i?.[l]);r[l]=t?e:JSON.stringify(e)}else r[l]=t?n:JSON.stringify(n);else r[l]=n}return r}async function p(e,t,n){return function(e,t){return e?t&&(0,o.Qc)(e)?t:(0,o.getApiKey)(e)??l.id?.findCredential(e)?.token:null}(e,t)||(!l.id&&r.A.request.useIdentity&&await Promise.all([i.e(6361),i.e(6475),i.e(7715)]).then(()=>i(50148)),(await l.id.getCredential(e,n))?.token)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4019,4059,6440],{51470(e,t,n){n.d(t,{a:()=>k});var a=n(74059),s=n(64209);const o=(0,a.aK)((e,t)=>{t.onConnected(()=>{m(e)}),t.onDisconnected(()=>{!function(e){if(!e)return;if(p.delete(e),document.removeEventListener(i,u.get(e)),document.removeEventListener(c,b.get(e)),u.delete(e),b.delete(e),!e.labelEl)return;const t=d.get(e.labelEl);1===t.length&&(e.labelEl.removeEventListener(l,h.get(e.labelEl)),h.delete(e.labelEl)),d.set(e.labelEl,t.filter(t=>t!==e).sort(g)),e.labelEl=void 0}(e)})}),l="calciteInternalLabelClick",i="calciteInternalLabelConnected",c="calciteInternalLabelDisconnected",r="calcite-label",d=new WeakMap,h=new WeakMap,u=new WeakMap,b=new WeakMap,p=new Set;function m(e){if(!e)return;const t=(e=>{const{id:t}=e,n=t&&(0,s.q)(e,{selector:`${r}[for="${t}"]`});if(n)return n;const a=(0,s.c)(e,r);return!a||function(e,t){let n;const a="custom-element-ancestor-check",s=a=>{a.stopImmediatePropagation();const s=a.composedPath();n=s.slice(s.indexOf(t),s.indexOf(e))};return e.addEventListener(a,s,{once:!0}),t.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),e.removeEventListener(a,s),n.filter(n=>n!==t&&n!==e).filter(e=>e.tagName?.includes("-")).length>0}(a,e)?null:a})(e.el);if(t&&h.has(t)&&t===e.labelEl||!t&&p.has(e))return;const n=y.bind(e);if(t){e.labelEl=t;const a=d.get(t)||[];a.push(e),d.set(t,a.sort(g)),h.has(e.labelEl)||(h.set(e.labelEl,v),e.labelEl.addEventListener(l,v)),p.delete(e),document.removeEventListener(i,u.get(e)),b.set(e,n),document.addEventListener(c,n)}else p.has(e)||(n(),document.removeEventListener(c,b.get(e)))}function g(e,t){return(0,s.i)(e.el,t.el)?-1:1}function v(e){const t=e.detail.sourceEvent.target,n=d.get(this),a=n.find(e=>e.el===t);if(a&&n.includes(a))return;const s=n[0];s.disabled||s.onLabelClick(e)}function f(){p.has(this)&&m(this)}function y(){p.add(this);const e=u.get(this)||f.bind(this);u.set(this,e),document.addEventListener(i,e)}async function k(e){if(await e.componentOnReady(),d.has(e))return;const t=e.for&&e.ownerDocument?.getElementById(e.for);t&&requestAnimationFrame(()=>{for(const e of p)if(e.el===t){m(e);break}})}n.d(t,["b",0,c,"l",0,i,"u",0,o])},34019(e,t,n){n.r(t),n.d(t,{Label:()=>r});var a=n(89301),s=n(58933),o=n(32012),l=n(64336),i=n(51470);const c=s.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 o.WF{constructor(){super(),this.alignment="start",this.layout="block",this.scale="m",this.calciteInternalLabelClick=(0,l.b)({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=c}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(i.l))}willUpdate(e){e.has("for")&&(0,i.a)(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(i.b))}labelClickHandler(e){"Range"===window.getSelection()?.type||e.defaultPrevented||this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return s.qy`<div class=${(0,o.CP)("container")}><slot></slot></div>`}}(0,a.c)("calcite-label",r)},74059(e,t,n){n.d(t,{Dk:()=>f,aK:()=>y,yr:()=>$,jH:()=>C,oW:()=>w});var a=n(64336),s=n(59231);var o=n(58933),l=n(14246),i=n(44613);const c=e=>{const t=(0,l.a)(e,"lang",globalThis.navigator?.language||u);return{lang:t,t9nLocale:v(t)}},r=async(e,t,n=e.localName.split("-").slice(1).join("-"))=>{const{lang:a,t9nLocale:s}=c(e),o=`${t}/${n}/t9n`;return{lang:a,t9nLocale:s,t9nStrings:null===n?{}:await p(s,o,"messages.")}},d="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),h=new Set(d),u="en",b={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},p=async(e,t,n="")=>{const a=`${t}/${n}`,s=`${a}${e}.json`;return m[s]??=g(e,a),await m[s]},m={},g=async(e,t)=>{const n=`${t}${e}.json`;try{const e=await fetch(n);if(e.ok)return await e.json()}catch(e){return(0,i.Rm)("error","intl",`An unknown error occurred while fetching localization strings at ${n}`,{detail:{error:e}}),{}}return e===u?{}:await g(u,t)},v=e=>{const[t,n]=e.split("-"),a=t.toLowerCase();let s=a;return n&&(s=`${a}-${n.toUpperCase()}`),s=b[s]??s,h.has(s)?s:n?v(a):u},f=e=>x(void 0,e),y=e=>t=>x(t,e);class k extends a.C{constructor(e,t){super(e);const n=this.exports;try{(0,s.s)(this.component);const e=t(this.component,this),a=this.exports!==n;if((0,s.i)(e)){a||this.setProvisionalExports(e);const t=e.then(e=>{this.exports=e,super.catchUpLifecycle()}).catch(e=>{this.P.reject(e)});this.onLoad(async()=>await t)}else a&&void 0===e||(this.exports=e),queueMicrotask(()=>super.catchUpLifecycle())}catch(e){this.P.reject(e)}}catchUpLifecycle(){}}const x=(E=k,(...e)=>{const t=(0,s.b)(),n=new E(...e),o=n.exports;(0,s.a)(t.at(-1));const l=n.component.manager;l.W(n,o),n.watchExports(l.W.bind(l,n)),(0,s.f)(n);const i=[n.component,...t].reverse();return(0,a.a)(i,e=>void 0===e?void 0:((e,{host:t,key:n,isReactive:a},o)=>{const l=t,i=l[n]!==e.exports,c=l[n]!==o,r=o!==e.exports;if(i&&!c&&r&&(l[n]=e.exports),t===e.component){if(a){const t=e.component.manager;c&&t.W(e,l[n]),e.onUpdate(a=>{if(a.has(n)){const a=l[n];a!==e.exports&&t.W(e,a)}})}e.O=a?void 0:n}const d=e.component.constructor.elementProperties.get(n)?.readOnly;e.watchExports(()=>{l[n]!==e.exports&&(d?(0,s.c)(()=>{l[n]=e.exports}):l[n]=e.exports)})})(n,e,o),o)});var E;const w=(e,t)=>new L(e,t);class L extends a.C{#e;#t;#n;constructor(e,t){super(),o.S$||(this.#t=e,this.#n=t,this.#e=new MutationObserver(n=>{n.forEach(n=>{e.includes(n.attributeName)&&t.call(this.component,this.component.el.getAttribute(n.attributeName),n.oldValue,n.attributeName)})}))}hostConnected(){this.#t.forEach(e=>{this.component.el.hasAttribute(e)&&this.#n.call(this.component,this.component.el.getAttribute(e),null,e)}),this.#e.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#t})}hostDisconnected(){this.#e.disconnect()}}const C=()=>f((e,t)=>{t.exports="ltr",t.onLifecycle(()=>{const n=()=>{const n=(0,l.a)(e.el,"dir","ltr");t.exports="rtl"===n?"rtl":"ltr"};return n(),(0,l.o)(e.el,["dir"],n)})}),$=e=>(t={})=>f((n,a)=>{const s=c(n.el),o={_lang:s.lang,_t9nLocale:s.t9nLocale,_loading:!0},d=n;a.onLifecycle(()=>((e,t,n,a)=>{let s;const o=()=>r(e,t(),a).then(e=>{s?.lang===e.lang&&s.t9nLocale===e.t9nLocale&&s.t9nStrings===e.t9nStrings||n(e),s=e}).catch(e=>{(0,i.Rm)("error","intl","Error updating component locale state",{detail:{error:e}})});return queueMicrotask(o),(0,l.o)(e,["lang"],o)})(n.el,()=>e("./assets"),({t9nLocale:e,t9nStrings:t,lang:s})=>{const o={...t,_lang:s,_t9nLocale:e,_loading:!1};a.exports=o;const l=t.componentLabel;"string"==typeof l&&"label"in n&&null==n.label&&(n.label??=l),h(d.messageOverrides)},t.name));const h=e=>{const t=a.exports,n=t._original??t,s=z(n,e);e&&(s._original=n),a.exports=s};return"messageOverrides"in d&&a.onUpdate(e=>{e.has("messageOverrides")&&h(d.messageOverrides)}),t.blocking?(a.setProvisionalExports(o,!1),a.ready):o}),z=(e,t)=>{if(!t)return e;const n={...e};return Object.entries(t).forEach(([t,a])=>{void 0!==e[t]&&(n[t]="object"==typeof a?z(e[t],a):a??e[t])}),n}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4059,6440,7790],{60331(e,t,n){n.d(t,{a:()=>k});var a=n(74059),s=n(56198);const o=(0,a.aK)((e,t)=>{t.onConnected(()=>{m(e)}),t.onDisconnected(()=>{!function(e){if(!e)return;if(p.delete(e),document.removeEventListener(i,u.get(e)),document.removeEventListener(c,b.get(e)),u.delete(e),b.delete(e),!e.labelEl)return;const t=d.get(e.labelEl);1===t.length&&(e.labelEl.removeEventListener(l,h.get(e.labelEl)),h.delete(e.labelEl)),d.set(e.labelEl,t.filter(t=>t!==e).sort(g)),e.labelEl=void 0}(e)})}),l="calciteInternalLabelClick",i="calciteInternalLabelConnected",c="calciteInternalLabelDisconnected",r="calcite-label",d=new WeakMap,h=new WeakMap,u=new WeakMap,b=new WeakMap,p=new Set;function m(e){if(!e)return;const t=(e=>{const{id:t}=e,n=t&&(0,s.q)(e,{selector:`${r}[for="${t}"]`});if(n)return n;const a=(0,s.c)(e,r);return!a||function(e,t){let n;const a="custom-element-ancestor-check",s=a=>{a.stopImmediatePropagation();const s=a.composedPath();n=s.slice(s.indexOf(t),s.indexOf(e))};return e.addEventListener(a,s,{once:!0}),t.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),e.removeEventListener(a,s),n.filter(n=>n!==t&&n!==e).filter(e=>e.tagName?.includes("-")).length>0}(a,e)?null:a})(e.el);if(t&&h.has(t)&&t===e.labelEl||!t&&p.has(e))return;const n=y.bind(e);if(t){e.labelEl=t;const a=d.get(t)||[];a.push(e),d.set(t,a.sort(g)),h.has(e.labelEl)||(h.set(e.labelEl,v),e.labelEl.addEventListener(l,v)),p.delete(e),document.removeEventListener(i,u.get(e)),b.set(e,n),document.addEventListener(c,n)}else p.has(e)||(n(),document.removeEventListener(c,b.get(e)))}function g(e,t){return(0,s.i)(e.el,t.el)?-1:1}function v(e){const t=e.detail.sourceEvent.target,n=d.get(this),a=n.find(e=>e.el===t);if(a&&n.includes(a))return;const s=n[0];s.disabled||s.onLabelClick(e)}function f(){p.has(this)&&m(this)}function y(){p.add(this);const e=u.get(this)||f.bind(this);u.set(this,e),document.addEventListener(i,e)}async function k(e){if(await e.componentOnReady(),d.has(e))return;const t=e.for&&e.ownerDocument?.getElementById(e.for);t&&requestAnimationFrame(()=>{for(const e of p)if(e.el===t){m(e);break}})}n.d(t,["b",0,c,"l",0,i,"u",0,o])},57790(e,t,n){n.r(t),n.d(t,{Label:()=>r});var a=n(27994),s=n(58933),o=n(32012),l=n(64336),i=n(60331);const c=s.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 o.WF{constructor(){super(),this.alignment="start",this.layout="block",this.scale="m",this.calciteInternalLabelClick=(0,l.b)({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=c}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(i.l))}willUpdate(e){e.has("for")&&(0,i.a)(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(i.b))}labelClickHandler(e){"Range"===window.getSelection()?.type||e.defaultPrevented||this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return s.qy`<div class=${(0,o.CP)("container")}><slot></slot></div>`}}(0,a.c)("calcite-label",r)},74059(e,t,n){n.d(t,{Dk:()=>f,aK:()=>y,yr:()=>$,jH:()=>C,oW:()=>w});var a=n(64336),s=n(59231);var o=n(58933),l=n(14246),i=n(44613);const c=e=>{const t=(0,l.a)(e,"lang",globalThis.navigator?.language||u);return{lang:t,t9nLocale:v(t)}},r=async(e,t,n=e.localName.split("-").slice(1).join("-"))=>{const{lang:a,t9nLocale:s}=c(e),o=`${t}/${n}/t9n`;return{lang:a,t9nLocale:s,t9nStrings:null===n?{}:await p(s,o,"messages.")}},d="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),h=new Set(d),u="en",b={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},p=async(e,t,n="")=>{const a=`${t}/${n}`,s=`${a}${e}.json`;return m[s]??=g(e,a),await m[s]},m={},g=async(e,t)=>{const n=`${t}${e}.json`;try{const e=await fetch(n);if(e.ok)return await e.json()}catch(e){return(0,i.Rm)("error","intl",`An unknown error occurred while fetching localization strings at ${n}`,{detail:{error:e}}),{}}return e===u?{}:await g(u,t)},v=e=>{const[t,n]=e.split("-"),a=t.toLowerCase();let s=a;return n&&(s=`${a}-${n.toUpperCase()}`),s=b[s]??s,h.has(s)?s:n?v(a):u},f=e=>x(void 0,e),y=e=>t=>x(t,e);class k extends a.C{constructor(e,t){super(e);const n=this.exports;try{(0,s.s)(this.component);const e=t(this.component,this),a=this.exports!==n;if((0,s.i)(e)){a||this.setProvisionalExports(e);const t=e.then(e=>{this.exports=e,super.catchUpLifecycle()}).catch(e=>{this.P.reject(e)});this.onLoad(async()=>await t)}else a&&void 0===e||(this.exports=e),queueMicrotask(()=>super.catchUpLifecycle())}catch(e){this.P.reject(e)}}catchUpLifecycle(){}}const x=(E=k,(...e)=>{const t=(0,s.b)(),n=new E(...e),o=n.exports;(0,s.a)(t.at(-1));const l=n.component.manager;l.W(n,o),n.watchExports(l.W.bind(l,n)),(0,s.f)(n);const i=[n.component,...t].reverse();return(0,a.a)(i,e=>void 0===e?void 0:((e,{host:t,key:n,isReactive:a},o)=>{const l=t,i=l[n]!==e.exports,c=l[n]!==o,r=o!==e.exports;if(i&&!c&&r&&(l[n]=e.exports),t===e.component){if(a){const t=e.component.manager;c&&t.W(e,l[n]),e.onUpdate(a=>{if(a.has(n)){const a=l[n];a!==e.exports&&t.W(e,a)}})}e.O=a?void 0:n}const d=e.component.constructor.elementProperties.get(n)?.readOnly;e.watchExports(()=>{l[n]!==e.exports&&(d?(0,s.c)(()=>{l[n]=e.exports}):l[n]=e.exports)})})(n,e,o),o)});var E;const w=(e,t)=>new L(e,t);class L extends a.C{#e;#t;#n;constructor(e,t){super(),o.S$||(this.#t=e,this.#n=t,this.#e=new MutationObserver(n=>{n.forEach(n=>{e.includes(n.attributeName)&&t.call(this.component,this.component.el.getAttribute(n.attributeName),n.oldValue,n.attributeName)})}))}hostConnected(){this.#t.forEach(e=>{this.component.el.hasAttribute(e)&&this.#n.call(this.component,this.component.el.getAttribute(e),null,e)}),this.#e.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#t})}hostDisconnected(){this.#e.disconnect()}}const C=()=>f((e,t)=>{t.exports="ltr",t.onLifecycle(()=>{const n=()=>{const n=(0,l.a)(e.el,"dir","ltr");t.exports="rtl"===n?"rtl":"ltr"};return n(),(0,l.o)(e.el,["dir"],n)})}),$=e=>(t={})=>f((n,a)=>{const s=c(n.el),o={_lang:s.lang,_t9nLocale:s.t9nLocale,_loading:!0},d=n;a.onLifecycle(()=>((e,t,n,a)=>{let s;const o=()=>r(e,t(),a).then(e=>{s?.lang===e.lang&&s.t9nLocale===e.t9nLocale&&s.t9nStrings===e.t9nStrings||n(e),s=e}).catch(e=>{(0,i.Rm)("error","intl","Error updating component locale state",{detail:{error:e}})});return queueMicrotask(o),(0,l.o)(e,["lang"],o)})(n.el,()=>e("./assets"),({t9nLocale:e,t9nStrings:t,lang:s})=>{const o={...t,_lang:s,_t9nLocale:e,_loading:!1};a.exports=o;const l=t.componentLabel;"string"==typeof l&&"label"in n&&null==n.label&&(n.label??=l),h(d.messageOverrides)},t.name));const h=e=>{const t=a.exports,n=t._original??t,s=z(n,e);e&&(s._original=n),a.exports=s};return"messageOverrides"in d&&a.onUpdate(e=>{e.has("messageOverrides")&&h(d.messageOverrides)}),t.blocking?(a.setProvisionalExports(o,!1),a.ready):o}),z=(e,t)=>{if(!t)return e;const n={...e};return Object.entries(t).forEach(([t,a])=>{void 0!==e[t]&&(n[t]="object"==typeof a?z(e[t],a):a??e[t])}),n}}}]);