@arcgis/core 5.0.0-next.17 → 5.0.0-next.19

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 (192) hide show
  1. package/AttributeBinsGraphic.js +1 -1
  2. package/analysis/ElevationProfile/ElevationProfileLineGround.js +1 -1
  3. package/analysis/ElevationProfile/ElevationProfileLineInput.js +1 -1
  4. package/analysis/ElevationProfile/ElevationProfileLineQuery.js +1 -1
  5. package/analysis/ElevationProfile/ElevationProfileLineScene.js +1 -1
  6. package/arcade/featureSetUtils.js +1 -1
  7. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  8. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  9. package/arcade/featureset/sources/FeatureLayerOGC.js +5 -0
  10. package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
  11. package/arcade/featureset/support/FeatureSet.js +1 -1
  12. package/arcade/featureset/support/shared.js +1 -1
  13. package/assets/esri/core/workers/RemoteClient.js +1 -1
  14. package/assets/esri/core/workers/chunks/057d59ee6144e5890780.js +1 -0
  15. package/assets/esri/core/workers/chunks/{adf7ccf4ef629211c7ee.js → 08aacbfb651cc2e1c054.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{31b5900119dd7cd9e7d3.js → 0a6ad58ca4ca0cba2fa0.js} +1 -1
  17. package/assets/esri/core/workers/chunks/0d8d3d0de49064971874.js +1 -0
  18. package/assets/esri/core/workers/chunks/{b87bc987983b31c13f64.js → 0f1b9d69961dad0b922f.js} +1 -1
  19. package/assets/esri/core/workers/chunks/110cc01dd6af7ee125d4.js +1 -0
  20. package/assets/esri/core/workers/chunks/11687718c8635eb7bf37.js +1 -0
  21. package/assets/esri/core/workers/chunks/{5f6df4a3376b52ead53f.js → 14f994b1dd682bf2d61a.js} +1 -1
  22. package/assets/esri/core/workers/chunks/3538eb39ebb58acedd67.js +1 -0
  23. package/assets/esri/core/workers/chunks/{658cd45b5fb304fd840a.js → 3aa77696c5ea54a238da.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{49571d6875de1f2e7e25.js → 4b9dfdc23ba3d6ebcc1b.js} +2 -2
  25. package/assets/esri/core/workers/chunks/{02a22dd6d208a925cc5a.js → 52cf643621662712dc85.js} +1 -1
  26. package/assets/esri/core/workers/chunks/5755b11272b777507612.js +1 -0
  27. package/assets/esri/core/workers/chunks/{d69265ceabfa92b40bb7.js → 58969dde8c3d0b2a9829.js} +1 -1
  28. package/assets/esri/core/workers/chunks/6e4829b52ade3e41ccc4.js +1 -0
  29. package/assets/esri/core/workers/chunks/{4a89e120be142ab58a27.js → 7224b321606116fd691c.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{888f188541f8bd68e33e.js → 72f1c3d97e7b9546c113.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{a4518f25b9f8fe704286.js → 76e945da8f30d8641c3d.js} +4 -4
  32. package/assets/esri/core/workers/chunks/{257f17b3836a623a9dbe.js → 795b09ff7a8f4e91f4dc.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{3ac7562ea90f91a9f30c.js → 82b2741e75c2e9b88252.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{5d2e5774768d8f290343.js → b656e8fd374113523404.js} +1 -1
  35. package/assets/esri/core/workers/chunks/bccb9ac572bc093fb177.js +1 -0
  36. package/assets/esri/core/workers/chunks/{79dbfa2b9b332ca0002f.js → c52161b94c0fb071747e.js} +1 -1
  37. package/assets/esri/core/workers/chunks/db76958fd9f54b6bd324.js +1 -0
  38. package/assets/esri/core/workers/chunks/e61d7762b56e36dc7e8a.js +1 -0
  39. package/assets/esri/core/workers/chunks/{b30897952494a3e5b9fe.js → e69c2b613bd0210e25ba.js} +1 -1
  40. package/assets/esri/core/workers/chunks/f43e1e1a1b2eb737e00c.js +1 -0
  41. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  42. package/chunks/GlowComposition.glsl.js +46 -46
  43. package/chunks/ImageMaterial.glsl.js +1 -1
  44. package/chunks/ShadedColorMaterial.glsl.js +10 -10
  45. package/config.js +1 -1
  46. package/editing/templateUtils.js +1 -1
  47. package/interfaces.d.ts +167 -51
  48. package/intl/locale.js +1 -1
  49. package/kernel.js +1 -1
  50. package/layers/BingMapsLayer.js +1 -1
  51. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  52. package/layers/PointCloudLayer.js +1 -1
  53. package/layers/SceneLayer.js +1 -1
  54. package/layers/VideoLayer.js +1 -1
  55. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  56. package/layers/mixins/SceneService.js +1 -1
  57. package/layers/ogc/ogcFeatureUtils.js +1 -1
  58. package/libs/parquet/parquet.js +1 -1
  59. package/package.json +1 -1
  60. package/renderers/support/RasterSymbolizer.js +1 -1
  61. package/rest/support/QueryMixin.js +1 -1
  62. package/support/revision.js +1 -1
  63. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  64. package/symbols/cim/cimAnalyzer.js +1 -1
  65. package/undoredo/support/ServiceVersionInfo.js +1 -1
  66. package/undoredo/support/Services.js +1 -1
  67. package/views/2d/LabelManager.js +1 -1
  68. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  69. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  70. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  71. package/views/2d/engine/webgl/animations/store/AnimationStore.js +1 -1
  72. package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +1 -1
  73. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
  74. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  75. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
  76. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  77. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  78. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
  79. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterHighlightShader.js +5 -0
  80. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterRangeHighlightShader.js +1 -1
  81. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterXYBandHighlightShader.js +5 -0
  82. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
  83. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
  84. package/views/2d/engine/webgl/textureUtils.js +1 -1
  85. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  86. package/views/2d/layers/features/FeatureContainer.js +1 -1
  87. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  88. package/views/3d/GroundView3D.js +1 -1
  89. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  90. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  91. package/views/3d/analysis/images/Factory.js +1 -1
  92. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  93. package/views/3d/environment/EnvironmentManager.js +1 -1
  94. package/views/3d/environment/SceneViewEnvironment.js +1 -1
  95. package/views/3d/environment/SunLighting.js +1 -1
  96. package/views/3d/environment/VirtualLighting.js +1 -1
  97. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  98. package/views/3d/layers/DrapedSubView3D.js +1 -1
  99. package/views/3d/layers/FlowSubView3D.js +1 -1
  100. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  101. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  102. package/views/3d/layers/MediaLayerView3D.js +1 -1
  103. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  104. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  105. package/views/3d/layers/SceneLayerView3D.js +1 -1
  106. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  107. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  108. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  109. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  110. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  111. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  112. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  113. package/views/3d/support/QualityProfile.js +5 -0
  114. package/views/3d/support/QualitySettings.js +1 -1
  115. package/views/3d/support/StreamTextureCollection.js +1 -1
  116. package/views/3d/support/TextureCollection.js +1 -1
  117. package/views/3d/support/engineContent/marker.js +1 -1
  118. package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
  119. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  120. package/views/3d/terrain/OverlayRenderer.js +1 -1
  121. package/views/3d/terrain/TerrainSurface.js +1 -1
  122. package/views/3d/terrain/TileCompositor.js +1 -1
  123. package/views/3d/webgl-engine/Stage.js +1 -1
  124. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  125. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  126. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  127. package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
  128. package/views/3d/webgl-engine/core/material/RenderTexture.js +1 -1
  129. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  130. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  131. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  132. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  133. package/views/3d/webgl-engine/lib/AnimationTimeStep.js +1 -1
  134. package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
  135. package/views/3d/webgl-engine/lib/DDSUtil.js +1 -1
  136. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  137. package/views/3d/webgl-engine/lib/ManagedTexture.js +5 -0
  138. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  139. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  140. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  141. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  142. package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
  143. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  144. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  145. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  146. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  147. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  148. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  149. package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
  150. package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
  151. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  152. package/views/GroundView.js +1 -1
  153. package/views/SceneView.js +1 -1
  154. package/views/support/layerViewUtils.js +1 -1
  155. package/views/webgl/Texture.js +1 -1
  156. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  157. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  158. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  159. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  160. package/widgets/Editor/VisibleElements.js +1 -1
  161. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  162. package/widgets/Editor/workflowUtils.js +1 -1
  163. package/widgets/Editor.js +1 -1
  164. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  165. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
  166. package/widgets/FeatureTable/FieldColumn.js +1 -1
  167. package/widgets/FeatureTable/Grid/Column.js +1 -1
  168. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  169. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  170. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  171. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  172. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  173. package/widgets/OrientedImageryViewer.js +1 -1
  174. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  175. package/widgets/smartMapping/SizeSlider.js +1 -1
  176. package/widgets/support/SelectionList/VisibleElements.js +1 -1
  177. package/widgets/support/SelectionList.js +1 -1
  178. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  179. package/assets/esri/core/workers/chunks/080268f78436a2f0d996.js +0 -1
  180. package/assets/esri/core/workers/chunks/18474c017ddacd1d3d2c.js +0 -1
  181. package/assets/esri/core/workers/chunks/27e6a6c5610007ac6a54.js +0 -1
  182. package/assets/esri/core/workers/chunks/5415fbcc7ed203fc5575.js +0 -1
  183. package/assets/esri/core/workers/chunks/631fb2e62e48f8be4051.js +0 -1
  184. package/assets/esri/core/workers/chunks/722da7a39a0ad9300752.js +0 -1
  185. package/assets/esri/core/workers/chunks/9595aabbaf411eceea1e.js +0 -1
  186. package/assets/esri/core/workers/chunks/a470f662d73aa8d5d90f.js +0 -1
  187. package/assets/esri/core/workers/chunks/a57751f3d78524c876cd.js +0 -1
  188. package/assets/esri/core/workers/chunks/ac366221e8636b60aee5.js +0 -1
  189. package/assets/esri/core/workers/chunks/dec336700cfb83abbbeb.js +0 -1
  190. package/views/3d/support/DisplayQualityProfile.js +0 -5
  191. package/views/3d/webgl-engine/lib/Texture.js +0 -5
  192. /package/views/3d/webgl-engine/lib/{ITexture.js → IManagedTexture.js} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../Color.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{cast as i}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{authoringInfoFirstVariableSliderMinMax as a}from"../../renderers/support/authoringInfoUtils.js";import o from"../../renderers/visualVariables/SizeVariable.js";import l from"../../renderers/visualVariables/support/SizeStop.js";import n from"./SmartMappingSliderBase.js";import d from"./SizeSlider/SizeSliderViewModel.js";import{getSizesFromVariable as p,getFillFromColor as m,getDynamicPathForSizeStops as u,getPathForSizeStops as h}from"./support/utils.js";import{globalCss as c}from"../support/globalCss.js";import{messageBundle as v,tsx as g}from"../support/widget.js";import{storeNode as b}from"../support/widgetUtils.js";var f;const y="esri-size-slider",S={base:y,rampElement:`${y}__ramp`,sliderContainer:`${y}__slider-container`,histogramContainer:`${y}__histogram-container`,primaryHandle:`${y}--primary-handle`,track:`${y}--interactive-track`},z={trackFillColor:new t([149,149,149]),trackBackgroundColor:new t([224,224,224])};let w=f=class extends n{constructor(e,t){super(e,t),this._maxRampFillWidth=1,this._minRampFillWidth=.2,this._rampNode=null,this.messages=null,this.style={...z},this.viewModel=new d}get handlesSyncedToPrimary(){return this.viewModel.handlesSyncedToPrimary}set handlesSyncedToPrimary(e){this.viewModel.handlesSyncedToPrimary=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get persistSizeRangeEnabled(){return this.viewModel.persistSizeRangeEnabled}set persistSizeRangeEnabled(e){this.viewModel.persistSizeRangeEnabled=e}get primaryHandleEnabled(){return this.viewModel.primaryHandleEnabled}set primaryHandleEnabled(e){this.viewModel.primaryHandleEnabled=e}get stops(){return this.viewModel.stops}set stops(e){this.viewModel.stops=e}castStyle(e){return{...z,...e}}static fromRendererResult(e,t){const{visualVariables:s,statistics:i}=e,{avg:r,stddev:o}=i,n=s[0],[d,m]=p(n),[u,h]=a(e.renderer.authoringInfo);return new f({max:h,min:u,stops:[new l({value:n.minDataValue??void 0,size:m}),new l({value:n.maxDataValue??void 0,size:d})],histogramConfig:{average:r??void 0,standardDeviation:o??void 0,bins:t?t.bins:[]}})}updateFromRendererResult(e,t){const{visualVariables:s,statistics:i}=e,{avg:r,stddev:o}=i,l=s[0],[n,d]=p(l),[m,u]=a(e.renderer.authoringInfo);this.set({max:u,min:m,stops:[{value:l.minDataValue,size:d},{value:l.maxDataValue,size:n}],histogramConfig:{average:r,standardDeviation:o,bins:t?t.bins:[]}})}updateVisualVariable(e){const t=e.clone(),{stops:s}=this;if(!e||!s)return null;if(t.stops)return t.stops=s,t;const i=s[0],r=s[s.length-1];let a=t.maxSize,l=t.minSize;if(a instanceof o){const e=a.stops,t=r.size/e[0].size,s=e.map(e=>(e.size*=t,e));a.stops=s}else a=r.size;if(l instanceof o){const e=l.stops,t=i.size/e[0].size,s=e.map(e=>(e.size*=t,e));l.stops=s}else l=i.size;return t.set({maxDataValue:r.value,minDataValue:i.value,maxSize:a,minSize:l}),t}updateFromVisualVariable(e){if(!e)return;const{maxDataValue:t,minDataValue:s,stops:i}=e;if(i)this.stops=i;else{const[i,r]=p(e);this.stops=[new l({value:s??void 0,size:r}),new l({value:t??void 0,size:i})]}}render(){const{label:e,primaryHandleEnabled:t,state:s,visibleElements:i}=this,r="disabled"===s,a=this.classes(S.base,c.widget,c.panel,{[c.disabled]:r,[S.primaryHandle]:t,[S.track]:!!i.interactiveTrack});return g("div",{"aria-label":e,class:a},r?null:this.renderContent(this._renderRamp(),S.sliderContainer,S.histogramContainer))}_renderRamp(){const{style:{trackBackgroundColor:e},zoomOptions:t}=this;return g("div",{afterCreate:b,bind:this,class:S.rampElement,"data-node-ref":"_rampNode"},g("svg",{key:"ramp-svg",xmlns:"http://www.w3.org/2000/svg"},g("rect",{fill:m(e),height:"100%",width:"100%",x:"0",y:"0"}),this._renderPath()),t?this.renderZoomCaps():null)}_renderPath(){if(!this._rampNode)return;const{offsetHeight:e=0,offsetWidth:t=0}=this._rampNode;if(null==e||null==t)return;const{primaryHandleEnabled:s,stops:i,style:{trackFillColor:r},values:a,viewModel:{max:o,min:l},_maxRampFillWidth:n,_minRampFillWidth:d}=this,p=[n,d];i[0].size<i[i.length-1].size&&p.reverse();const c=a.slice().sort((e,t)=>e>t?1:-1),[v,b]=p,[f,y]=c,S=s?u({max:o,min:l,pathHeight:e,pathWidth:t,stops:i,padding:b}):h({bottomValue:f,bottomWidth:v,max:o,min:l,pathHeight:e,pathWidth:t,topValue:y,topWidth:b});return g("path",{d:S,fill:m(r)})}};e([s()],w.prototype,"handlesSyncedToPrimary",null),e([s()],w.prototype,"label",null),e([s(),v("esri/widgets/smartMapping/SizeSlider/t9n/SizeSlider")],w.prototype,"messages",void 0),e([s()],w.prototype,"persistSizeRangeEnabled",null),e([s()],w.prototype,"primaryHandleEnabled",null),e([s()],w.prototype,"stops",null),e([s()],w.prototype,"style",void 0),e([i("style")],w.prototype,"castStyle",null),e([s({type:d})],w.prototype,"viewModel",void 0),w=f=e([r("esri.widgets.smartMapping.SizeSlider")],w);const V=w;export{V as default};
5
+ import{__decorate as e}from"tslib";import t from"../../Color.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{cast as i}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{authoringInfoFirstVariableSliderMinMax as a}from"../../renderers/support/authoringInfoUtils.js";import o from"../../renderers/visualVariables/SizeVariable.js";import l from"../../renderers/visualVariables/support/SizeStop.js";import n from"./SmartMappingSliderBase.js";import d from"./SizeSlider/SizeSliderViewModel.js";import{getSizesFromVariable as p,getFillFromColor as m,getDynamicPathForSizeStops as u,getPathForSizeStops as h}from"./support/utils.js";import{globalCss as c}from"../support/globalCss.js";import{messageBundle as v,tsx as g}from"../support/widget.js";import{storeNode as b}from"../support/widgetUtils.js";var f;const y="esri-size-slider",S={base:y,rampElement:`${y}__ramp`,sliderContainer:`${y}__slider-container`,histogramContainer:`${y}__histogram-container`,primaryHandle:`${y}--primary-handle`,track:`${y}--interactive-track`},z={trackFillColor:new t([149,149,149]),trackBackgroundColor:new t([224,224,224])};let w=f=class extends n{constructor(e,t){super(e,t),this._maxRampFillWidth=1,this._minRampFillWidth=.2,this._rampNode=null,this.messages=null,this.style={...z},this.viewModel=new d,this.viewModel=new d}get handlesSyncedToPrimary(){return this.viewModel.handlesSyncedToPrimary}set handlesSyncedToPrimary(e){this.viewModel.handlesSyncedToPrimary=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get persistSizeRangeEnabled(){return this.viewModel.persistSizeRangeEnabled}set persistSizeRangeEnabled(e){this.viewModel.persistSizeRangeEnabled=e}get primaryHandleEnabled(){return this.viewModel.primaryHandleEnabled}set primaryHandleEnabled(e){this.viewModel.primaryHandleEnabled=e}get stops(){return this.viewModel.stops}set stops(e){this.viewModel.stops=e}castStyle(e){return{...z,...e}}static fromRendererResult(e,t){const{visualVariables:s,statistics:i}=e,{avg:r,stddev:o}=i,n=s[0],[d,m]=p(n),[u,h]=a(e.renderer.authoringInfo);return new f({max:h,min:u,stops:[new l({value:n.minDataValue??void 0,size:m}),new l({value:n.maxDataValue??void 0,size:d})],histogramConfig:{average:r??void 0,standardDeviation:o??void 0,bins:t?t.bins:[]}})}updateFromRendererResult(e,t){const{visualVariables:s,statistics:i}=e,{avg:r,stddev:o}=i,l=s[0],[n,d]=p(l),[m,u]=a(e.renderer.authoringInfo);this.set({max:u,min:m,stops:[{value:l.minDataValue,size:d},{value:l.maxDataValue,size:n}],histogramConfig:{average:r,standardDeviation:o,bins:t?t.bins:[]}})}updateVisualVariable(e){const t=e.clone(),{stops:s}=this;if(!e||!s)return null;if(t.stops)return t.stops=s,t;const i=s[0],r=s[s.length-1];let a=t.maxSize,l=t.minSize;if(a instanceof o){const e=a.stops,t=r.size/e[0].size,s=e.map(e=>(e.size*=t,e));a.stops=s}else a=r.size;if(l instanceof o){const e=l.stops,t=i.size/e[0].size,s=e.map(e=>(e.size*=t,e));l.stops=s}else l=i.size;return t.set({maxDataValue:r.value,minDataValue:i.value,maxSize:a,minSize:l}),t}updateFromVisualVariable(e){if(!e)return;const{maxDataValue:t,minDataValue:s,stops:i}=e;if(i)this.stops=i;else{const[i,r]=p(e);this.stops=[new l({value:s??void 0,size:r}),new l({value:t??void 0,size:i})]}}render(){const{label:e,primaryHandleEnabled:t,state:s,visibleElements:i}=this,r="disabled"===s,a=this.classes(S.base,c.widget,c.panel,{[c.disabled]:r,[S.primaryHandle]:t,[S.track]:!!i.interactiveTrack});return g("div",{"aria-label":e,class:a},r?null:this.renderContent(this._renderRamp(),S.sliderContainer,S.histogramContainer))}_renderRamp(){const{style:{trackBackgroundColor:e},zoomOptions:t}=this;return g("div",{afterCreate:b,bind:this,class:S.rampElement,"data-node-ref":"_rampNode"},g("svg",{key:"ramp-svg",xmlns:"http://www.w3.org/2000/svg"},g("rect",{fill:m(e),height:"100%",width:"100%",x:"0",y:"0"}),this._renderPath()),t?this.renderZoomCaps():null)}_renderPath(){if(!this._rampNode)return;const{offsetHeight:e=0,offsetWidth:t=0}=this._rampNode;if(null==e||null==t)return;const{primaryHandleEnabled:s,stops:i,style:{trackFillColor:r},values:a,viewModel:{max:o,min:l},_maxRampFillWidth:n,_minRampFillWidth:d}=this,p=[n,d];i[0].size<i[i.length-1].size&&p.reverse();const c=a.slice().sort((e,t)=>e>t?1:-1),[v,b]=p,[f,y]=c,S=s?u({max:o,min:l,pathHeight:e,pathWidth:t,stops:i,padding:b}):h({bottomValue:f,bottomWidth:v,max:o,min:l,pathHeight:e,pathWidth:t,topValue:y,topWidth:b});return g("path",{d:S,fill:m(r)})}};e([s()],w.prototype,"handlesSyncedToPrimary",null),e([s()],w.prototype,"label",null),e([s(),v("esri/widgets/smartMapping/SizeSlider/t9n/SizeSlider")],w.prototype,"messages",void 0),e([s()],w.prototype,"persistSizeRangeEnabled",null),e([s()],w.prototype,"primaryHandleEnabled",null),e([s()],w.prototype,"stops",null),e([s()],w.prototype,"style",void 0),e([i("style")],w.prototype,"castStyle",null),e([s({type:d})],w.prototype,"viewModel",void 0),w=f=e([r("esri.widgets.smartMapping.SizeSlider")],w);const V=w;export{V as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import e from"../../../core/Accessor.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";let r=class extends e{constructor(o){super(o),this.filter=!0,this.filterNotice=!0,this.itemCloseActions=!0,this.itemCount=!0,this.itemIcons=!0,this.itemMenus=!0,this.header=!0,this.layerFilter=!0,this.menu=!0,this.totalCount=!0}};o([t({type:Boolean,nonNullable:!0})],r.prototype,"filter",void 0),o([t({type:Boolean,nonNullable:!0})],r.prototype,"filterNotice",void 0),o([t({type:Boolean,nonNullable:!0})],r.prototype,"itemCloseActions",void 0),o([t({type:Boolean,nonNullable:!0})],r.prototype,"itemCount",void 0),o([t({type:Boolean,nonNullable:!0})],r.prototype,"itemIcons",void 0),o([t({type:Boolean,nonNullable:!0})],r.prototype,"itemMenus",void 0),o([t({type:Boolean,nonNullable:!0})],r.prototype,"header",void 0),o([t({type:Boolean,nonNullable:!0})],r.prototype,"layerFilter",void 0),o([t({type:Boolean,nonNullable:!0})],r.prototype,"menu",void 0),o([t({type:Boolean,nonNullable:!0})],r.prototype,"totalCount",void 0),r=o([l("esri.widgets.support.SelectionList.VisibleElements")],r);const i=r;export{i as default};
5
+ import{__decorate as o}from"tslib";import t from"../../../core/Accessor.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";let r=class extends t{constructor(o){super(o),this.filter=!0,this.filterNotice=!0,this.itemCloseActions=!0,this.itemCount=!0,this.itemIcons=!0,this.itemMenus=!0,this.header=!0,this.layerFilter=!0,this.menu=!0,this.totalCount=!0,this.zoomToButton=!0}};o([e({type:Boolean,nonNullable:!0})],r.prototype,"filter",void 0),o([e({type:Boolean,nonNullable:!0})],r.prototype,"filterNotice",void 0),o([e({type:Boolean,nonNullable:!0})],r.prototype,"itemCloseActions",void 0),o([e({type:Boolean,nonNullable:!0})],r.prototype,"itemCount",void 0),o([e({type:Boolean,nonNullable:!0})],r.prototype,"itemIcons",void 0),o([e({type:Boolean,nonNullable:!0})],r.prototype,"itemMenus",void 0),o([e({type:Boolean,nonNullable:!0})],r.prototype,"header",void 0),o([e({type:Boolean,nonNullable:!0})],r.prototype,"layerFilter",void 0),o([e({type:Boolean,nonNullable:!0})],r.prototype,"menu",void 0),o([e({type:Boolean,nonNullable:!0})],r.prototype,"totalCount",void 0),o([e({type:Boolean,nonNullable:!0})],r.prototype,"zoomToButton",void 0),r=o([l("esri.widgets.support.SelectionList.VisibleElements")],r);const i=r;export{i as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{substitute as t,formatNumber as i}from"../../intl.js";import{isSome as s}from"../../core/arrayUtils.js";import{on as o,watch as l}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import a from"../Widget.js";import{loadCalciteComponents as c}from"./componentsUtils.js";import{globalCss as m}from"./globalCss.js";import{messageBundle as d,tsx as p}from"./widget.js";import{storeNode as h}from"./widgetUtils.js";import{isGroupLayerItem as u,isLayerItem as v,isFeatureItem as g}from"./SelectionList/selectionListUtils.js";import y from"./SelectionList/SelectionListViewModel.js";import I from"./SelectionList/VisibleElements.js";const b="esri-selection-list",f=`${b}__list-item`,w={base:b,container:`${b}__container`,flowItem:`${b}__flow-item`,layerDropdown:`${b}__layer-dropdown`,listItemFeature:`${f}__feature`,listItemFeatureIcon:`${f}__feature-icon`,listItemIcon:`${f}__icon`,itemCount:`${b}__item-count`,notice:`${b}__notice`,panel:`${b}__panel`,totalCount:`${b}__total-count`};let _=class extends a{constructor(e,i){super(e,i),this._iconIntersectionObserver=new IntersectionObserver((e,i)=>{e.forEach(async e=>{if(e.isIntersecting){const s=e.target;if(this._hasIcon(s))return void i.unobserve(s);const o=this._getListItem(s);if(!o)return;this._setHasIcon(s,!0);const l=o.title?t(this.messagesLegend.previewTemplateAriaLabel,{label:o.title}):this.messagesCommon.preview,n=o.thumbnail??await o.fetchThumbnail({ariaLabel:l}).catch(()=>(this._setHasIcon(s,!1),null));if(null==n)return;s.appendChild(n)}})}),this._itemWithOpenMenu=null,this._list=null,this.displayMode="group",this.highlightOnHoverEnabled=!1,this.itemActionConfigs=null,this.menuScale="m",this.messages=null,this.messagesCommon=null,this.messagesLegend=null,this.onListItemSelect=null,this.scale="s",this.viewModel=new y,this.visibleElements=new I,this._afterItemCreate=e=>{this._iconIntersectionObserver?.observe(e)},this._afterItemRemoved=e=>{this._iconIntersectionObserver?.unobserve(e)},this.clear=this.clear.bind(this),this.collapseItems=this.collapseItems.bind(this),this.removeTemporaryHighlight=this.removeTemporaryHighlight.bind(this)}initialize(){this.addHandles([o(()=>this.effectiveSelectionManager,"selection-change",()=>this._closeItemMenu()),l(()=>this.highlightOnHoverEnabled,e=>{e||this.removeTemporaryHighlight()})])}destroy(){this._iconIntersectionObserver?.disconnect(),this._iconIntersectionObserver=null}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel")})}get _hasFilterText(){const{filterText:e}=this;return null!=e&&""!==e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get effectiveCount(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get filterText(){return this.viewModel.filterText}set filterText(e){this.viewModel.filterText=e}get icon(){return"selection"}set icon(e){this._overrideIfSome("icon",e)}get isUpdating(){return this.viewModel.isUpdating}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layerItems(){return this.viewModel.layerItems}get layerViewMap(){return this.viewModel.layerViewMap}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get maxVisibleFeatureCountPerLayer(){return this.viewModel.maxVisibleFeatureCountPerLayer}set maxVisibleFeatureCountPerLayer(e){this.viewModel.maxVisibleFeatureCountPerLayer=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get state(){return this.viewModel.state}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get viewLayersAndTables(){return this.viewModel.viewLayersAndTables}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}addTemporaryHighlight(e){this.viewModel.addTemporaryHighlight(e)}clear(){this.viewModel.clear()}deselectFeatureItem(e){this.viewModel.deselectFeatureItem(e)}deselectGroupItem(e){this.viewModel.deselectGroupItem(e)}deselectLayerItem(e){this.viewModel.deselectLayerItem(e)}deselectItem(e){this.viewModel.deselectItem(e)}collapseItems(){this._list?.filteredItems.forEach(e=>e.expanded=!1)}goToItem(e){this.viewModel.goToItem(e)}removeFromSelection(e){this.viewModel.removeFromSelection(e)}removeTemporaryHighlight(){this.viewModel.removeTemporaryHighlight()}selectSingleFeatureItem(e){this.viewModel.selectSingleFeatureItem(e)}selectSingleGroupItem(e){this.viewModel.selectSingleGroupItem(e)}selectSingleItem(e){this.viewModel.selectSingleItem(e)}selectSingleLayerItem(e){this.viewModel.selectSingleLayerItem(e)}setSelection(e){this.viewModel.setSelection(e)}render(){return p("div",{class:this.classes(w.base,m.widget,m.panel)},p("calcite-flow",null,p("calcite-flow-item",{class:w.flowItem,heading:this.visibleElements.header?this.messages.selection:void 0,loading:"loading"===this.state,overlayPositioning:"fixed",scale:this.scale,selected:!0},p("calcite-panel",{class:w.panel,overlayPositioning:"fixed",scale:this.scale},p("div",{class:w.container},this._renderActiveLayerDropdown(),this._renderFilterInput(),this._renderList(),this._renderFilterNotice())),this._renderTotalChip(),this._renderMenuActions())))}_renderTotalChip(){const{visibleElements:e}=this;if(!e.totalCount||!e.header)return;const{effectiveCount:s}=this,o=i(s),l=t(this.messages.selectionCount,{count:o});return p("calcite-chip",{appearance:"outline",class:w.totalCount,closable:s>0,closed:0===s,icon:this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0,label:o,scale:this.scale,slot:"header-actions-end",title:l,onCalciteChipClose:this.clear},o)}_renderMenuActions(){const{visibleElements:e}=this;if(!e.header||!e.menu)return;const{menuScale:t}=this,i=0===this.effectiveCount;return[p("calcite-action",{disabled:i,icon:"reset",key:"clear-action",onclick:this.clear,scale:t,slot:"header-menu-actions",text:this.messagesCommon.clear,textEnabled:!0}),p("calcite-action",{disabled:i,icon:"folders",key:"collapse-action",onclick:this.collapseItems,scale:t,slot:"header-menu-actions",text:this.messages.collapseAll,textEnabled:!0})]}_renderActiveLayerDropdown(){const{layerItems:e,messages:i}=this;if(!(0===this.effectiveCount||e.length<2)&&this.visibleElements.layerFilter)return p("calcite-combobox",{class:w.layerDropdown,clearDisabled:!0,label:i.filterByLayer,overlayPositioning:"fixed",placeholder:i.filterByLayer,scale:this.scale,selectionMode:"single-persist",onCalciteComboboxChange:({currentTarget:e})=>{this.filterText=void 0;const t=e.selectedItems[0]?.value??void 0;this.layer="all-layers"===t?void 0:t}},p("calcite-combobox-item",{heading:t(i.allLayersCount,{count:e.length}),icon:"layers",key:"all-layers",selected:null==this.layer,value:"all-layers"}),this.layerItems.map(e=>this._renderActiveLayerDropdownItem(e)))}_renderFilterInput(){if(this.visibleElements.filter&&0!==this.effectiveCount)return p("calcite-input",{clearable:!0,icon:"search",placeholder:this.messages.filter,scale:this.scale,value:this.filterText,onCalciteInputInput:({target:{value:e}})=>{this.filterText=e}})}_renderActiveLayerDropdownItem(e){const t=e.title||this.messages.untitledLayer;return p("calcite-combobox-item",{heading:t,icon:e.iconName,key:e.key,selected:e.layer===this.layer,value:e.layer})}_renderList(){const{messages:e}=this;if(0!==this.visibleFeatureCount)return p("calcite-list",{afterCreate:h,bind:this,"data-node-ref":"_list",displayMode:"nested",interactionMode:"interactive",label:e.widgetLabel,loading:this.isUpdating,scale:this.scale,selectionMode:"none"},this._renderListContent(this.allLayerItems))}_renderListContent(e){return this.activeLayerItem?this._renderLayerItem(this.activeLayerItem):e.map(e=>u(e)?this._renderGroupItem(e):v(e)?this._renderLayerItem(e):null).filter(s)}_renderFilterNotice(){const{visibleElements:e}=this;if(!("disabled"===this.state||this.visibleFeatureCount>0)&&e.filter&&e.filterNotice)return p("calcite-notice",{class:w.notice,icon:"exclamation-mark-triangle",kind:"info",open:!0,scale:this.scale,width:"full"},p("div",{slot:"message"},this.messages.noMatchingFeatures))}_renderItemCount(e){if(!this.visibleElements.itemCount)return;const{messages:s}=this,o=i(e.total),l=i(e.visibleTotal),n=t(s.selectionCount,{count:o});return!this._hasFilterText&&e.maxVisibleFeatureCountExceeded?p("span",{class:w.itemCount,slot:"content-end",title:n},p("calcite-icon",{icon:"exclamation-mark-triangle",scale:"s",title:s.tooManyFeatures}),`${i(this.maxVisibleFeatureCountPerLayer)}+`):p("span",{class:w.itemCount,slot:"content-end",title:n},l)}_renderItemActions(e){if(!this.visibleElements.itemMenus)return;const{messages:t,messagesCommon:i}=this,s=this._itemWithOpenMenu===e,o=g(e),l=v(e),n=u(e),r=o?t.deselectFeature:l?t.deselectLayer:t.deselectGroup;return[p("calcite-dropdown",{open:s,overlayPositioning:"fixed",scale:this.menuScale,slot:"actions-end",width:"m",onCalciteDropdownClose:()=>this._closeItemMenu(e),onCalciteDropdownOpen:()=>{this._itemWithOpenMenu=e}},p("calcite-action",{appearance:"transparent",icon:"ellipsis",scale:this.scale,slot:"trigger",text:i.menu,textEnabled:!1}),s?p("calcite-dropdown-group",{selectionMode:"none"},p("calcite-dropdown-item",{iconStart:"layer-zoom-to",onCalciteDropdownItemSelect:()=>this.goToItem(e)},t.zoomTo),p("calcite-dropdown-item",{iconStart:"selection-filter",onCalciteDropdownItemSelect:()=>this.selectSingleItem(e)},o?t.onlySelectFeature:t.onlySelectThis),p("calcite-dropdown-item",{iconStart:"selection-x",onCalciteDropdownItemSelect:()=>this.deselectItem(e)},r),this.itemActionConfigs?.map(t=>{const{disabled:i,hidden:s,type:r}=t;if(!("function"==typeof s?s({item:e}):!!s)&&(!r||"feature"===r&&o||"layer"===r&&l||"group"===r&&n))return p("calcite-dropdown-item",{disabled:"function"==typeof i?i({item:e}):!!i,iconStart:t.icon??void 0,onCalciteDropdownItemSelect:()=>t.callback({item:e})},t.label)})):void 0)]}_renderGroupItem(e){const t=e.title||this.messages.untitledLayer;if(0===e.visibleTotal)return;const{displayMode:i}=this;if("layer"===i||"feature"===i)return this._renderListContent(e.items);const{visibleElements:s}=this;return p("calcite-list-item",{bind:this,closable:!!s.itemCloseActions,"data-type":"group",expanded:!0,iconStart:s.itemIcons?e.iconName:void 0,key:e.key,label:t,value:e.title,onCalciteListItemClose:t=>{t.stopPropagation(),this.deselectItem(e)},onCalciteListItemSelect:t=>this._onListItemSelect(e,t)},this._renderItemActions(e),this._renderListContent(e.items))}_renderLayerItem(e){if(0===e.visibleTotal||!e.visible)return;if("feature"===this.displayMode)return this._renderItems(e.featureItems);const{messages:t,visibleElements:i}=this,s=e.title||t.untitledLayer;return p("calcite-list-item",{bind:this,closable:!!i.itemCloseActions,"data-type":"layer",expanded:!0,iconStart:i.itemIcons?e.iconName:void 0,key:e.key,label:s,scale:this.scale,value:e.title,onCalciteListItemClose:t=>{t.stopPropagation(),this.deselectItem(e)},onCalciteListItemSelect:t=>this._onListItemSelect(e,t)},this._renderItemCount(e),this._renderItemActions(e),this._renderItems(e.featureItems),e.maxVisibleFeatureCountExceeded?p("calcite-notice",{class:w.notice,icon:"exclamation-mark-triangle",kind:"info",open:!0,scale:this.scale},p("div",{slot:"message"},t.tooManyFeatures)):void 0)}_renderItems(e){return e.map(e=>this._renderItem(e))}_renderItem(e){if(!e.visible)return;const{highlightOnHoverEnabled:t,messages:i,visibleElements:s}=this,o=e.title||i.untitledFeature,l=s.itemIcons&&"feature"!==this.displayMode;return p("calcite-list-item",{bind:this,class:l?w.listItemFeatureIcon:w.listItemFeature,closable:!!s.itemCloseActions,"data-item":e,"data-type":"feature",key:e.key,label:o,name:o,onblur:t?()=>this.removeTemporaryHighlight():void 0,onfocus:t?()=>this.addTemporaryHighlight(e):void 0,onpointerenter:t?()=>this.addTemporaryHighlight(e):void 0,onpointerleave:t?()=>this.removeTemporaryHighlight():void 0,scale:this.scale,value:o,onCalciteListItemClose:t=>{t.stopPropagation(),this.deselectItem(e)},onCalciteListItemSelect:t=>this._onListItemSelect(e,t)},this._renderItemIcon(e),this._renderItemActions(e))}_renderItemIcon(e){if(this.visibleElements.itemIcons)return p("div",{class:w.listItemIcon,key:"content-start",slot:"content-start"},p("span",{afterCreate:this._afterItemCreate,afterRemoved:this._afterItemRemoved,"data-has-icon":!1,"data-item":e,key:e.thumbnailKey}))}_getListItem(e){return e?.["data-item"]}_hasIcon(e){return!!e?.["data-has-icon"]}_setHasIcon(e,t){e&&(e["data-has-icon"]=t)}_onListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.onListItemSelect?.({item:e})}_closeItemMenu(e){e&&e!==this._itemWithOpenMenu||(this._itemWithOpenMenu=null)}};e([n()],_.prototype,"_hasFilterText",null),e([n()],_.prototype,"_itemWithOpenMenu",void 0),e([n()],_.prototype,"_list",void 0),e([n()],_.prototype,"activeLayerItem",null),e([n()],_.prototype,"allLayerItems",null),e([n()],_.prototype,"displayMode",void 0),e([n()],_.prototype,"effectiveCount",null),e([n()],_.prototype,"effectiveSelectionManager",null),e([n()],_.prototype,"filterText",null),e([n()],_.prototype,"highlightOnHoverEnabled",void 0),e([n()],_.prototype,"icon",null),e([n()],_.prototype,"itemActionConfigs",void 0),e([n()],_.prototype,"isUpdating",null),e([n()],_.prototype,"label",null),e([n()],_.prototype,"layer",null),e([n()],_.prototype,"layerItems",null),e([n()],_.prototype,"layerViewMap",null),e([n()],_.prototype,"maxVisibleFeatureCountExceeded",null),e([n()],_.prototype,"maxVisibleFeatureCountPerLayer",null),e([n()],_.prototype,"menuScale",void 0),e([n(),d("esri/widgets/support/SelectionList/t9n/SelectionList")],_.prototype,"messages",void 0),e([n(),d("esri/t9n/common")],_.prototype,"messagesCommon",void 0),e([n(),d("esri/widgets/Legend/t9n/Legend")],_.prototype,"messagesLegend",void 0),e([n()],_.prototype,"onListItemSelect",void 0),e([n()],_.prototype,"scale",void 0),e([n()],_.prototype,"selectionManager",null),e([n()],_.prototype,"state",null),e([n()],_.prototype,"view",null),e([n()],_.prototype,"viewLayersAndTables",null),e([n()],_.prototype,"viewModel",void 0),e([n({type:I,nonNullable:!0})],_.prototype,"visibleElements",void 0),e([n()],_.prototype,"visibleFeatureCount",null),e([n()],_.prototype,"visibleFeatureItems",null),e([n()],_.prototype,"visibleLayerCount",null),_=e([r("esri.widgets.support.SelectionList")],_);const C=_;export{C as default};
5
+ import{__decorate as e}from"tslib";import{substitute as t,formatNumber as i}from"../../intl.js";import{isSome as s}from"../../core/arrayUtils.js";import{on as o,watch as l}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import a from"../Widget.js";import{loadCalciteComponents as c}from"./componentsUtils.js";import{globalCss as m}from"./globalCss.js";import{messageBundle as d,tsx as p}from"./widget.js";import{storeNode as h}from"./widgetUtils.js";import{isGroupLayerItem as u,isLayerItem as v,isFeatureItem as g}from"./SelectionList/selectionListUtils.js";import y from"./SelectionList/SelectionListViewModel.js";import I from"./SelectionList/VisibleElements.js";const b="esri-selection-list",f=`${b}__list-item`,w={base:b,container:`${b}__container`,flowItem:`${b}__flow-item`,layerDropdown:`${b}__layer-dropdown`,listItemFeature:`${f}__feature`,listItemFeatureIcon:`${f}__feature-icon`,listItemIcon:`${f}__icon`,itemCount:`${b}__item-count`,notice:`${b}__notice`,panel:`${b}__panel`,totalCount:`${b}__total-count`};let _=class extends a{constructor(e,i){super(e,i),this._iconIntersectionObserver=new IntersectionObserver((e,i)=>{e.forEach(async e=>{if(e.isIntersecting){const s=e.target;if(this._hasIcon(s))return void i.unobserve(s);const o=this._getListItem(s);if(!o)return;this._setHasIcon(s,!0);const l=o.title?t(this.messagesLegend.previewTemplateAriaLabel,{label:o.title}):this.messagesCommon.preview,n=o.thumbnail??await o.fetchThumbnail({ariaLabel:l}).catch(()=>(this._setHasIcon(s,!1),null));if(null==n)return;s.appendChild(n)}})}),this._itemWithOpenMenu=null,this._list=null,this.displayMode="group",this.highlightOnHoverEnabled=!1,this.itemActionConfigs=null,this.menuScale="m",this.messages=null,this.messagesCommon=null,this.messagesLegend=null,this.onListItemSelect=null,this.scale="s",this.viewModel=new y,this.visibleElements=new I,this._afterItemCreate=e=>{this._iconIntersectionObserver?.observe(e)},this._afterItemRemoved=e=>{this._iconIntersectionObserver?.unobserve(e)},this.clear=this.clear.bind(this),this.collapseItems=this.collapseItems.bind(this),this.removeTemporaryHighlight=this.removeTemporaryHighlight.bind(this)}initialize(){this.addHandles([o(()=>this.effectiveSelectionManager,"selection-change",()=>this._closeItemMenu()),l(()=>this.highlightOnHoverEnabled,e=>{e||this.removeTemporaryHighlight()})])}destroy(){this._iconIntersectionObserver?.disconnect(),this._iconIntersectionObserver=null}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel")})}get _hasFilterText(){const{filterText:e}=this;return null!=e&&""!==e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get effectiveCount(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get filterText(){return this.viewModel.filterText}set filterText(e){this.viewModel.filterText=e}get icon(){return"selection"}set icon(e){this._overrideIfSome("icon",e)}get isUpdating(){return this.viewModel.isUpdating}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layerItems(){return this.viewModel.layerItems}get layerViewMap(){return this.viewModel.layerViewMap}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get maxVisibleFeatureCountPerLayer(){return this.viewModel.maxVisibleFeatureCountPerLayer}set maxVisibleFeatureCountPerLayer(e){this.viewModel.maxVisibleFeatureCountPerLayer=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get state(){return this.viewModel.state}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get viewLayersAndTables(){return this.viewModel.viewLayersAndTables}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}addTemporaryHighlight(e){this.viewModel.addTemporaryHighlight(e)}clear(){this.viewModel.clear()}deselectFeatureItem(e){this.viewModel.deselectFeatureItem(e)}deselectGroupItem(e){this.viewModel.deselectGroupItem(e)}deselectLayerItem(e){this.viewModel.deselectLayerItem(e)}deselectItem(e){this.viewModel.deselectItem(e)}collapseItems(){this._list?.filteredItems.forEach(e=>e.expanded=!1)}goToItem(e){this.viewModel.goToItem(e)}removeFromSelection(e){this.viewModel.removeFromSelection(e)}removeTemporaryHighlight(){this.viewModel.removeTemporaryHighlight()}selectSingleFeatureItem(e){this.viewModel.selectSingleFeatureItem(e)}selectSingleGroupItem(e){this.viewModel.selectSingleGroupItem(e)}selectSingleItem(e){this.viewModel.selectSingleItem(e)}selectSingleLayerItem(e){this.viewModel.selectSingleLayerItem(e)}setSelection(e){this.viewModel.setSelection(e)}render(){return p("div",{class:this.classes(w.base,m.widget,m.panel)},p("calcite-flow",null,p("calcite-flow-item",{class:w.flowItem,heading:this.visibleElements.header?this.messages.selection:void 0,loading:"loading"===this.state,overlayPositioning:"fixed",scale:this.scale,selected:!0},p("calcite-panel",{class:w.panel,overlayPositioning:"fixed",scale:this.scale},p("div",{class:w.container},this._renderActiveLayerDropdown(),this._renderFilterInput(),this._renderList(),this._renderFilterNotice())),this._renderTotalChip(),this._renderMenuActions())))}_renderTotalChip(){const{visibleElements:e}=this;if(!e.totalCount||!e.header)return;const{effectiveCount:s}=this,o=i(s),l=t(this.messages.selectionCount,{count:o});return p("calcite-chip",{appearance:"outline",class:w.totalCount,closable:s>0,closed:0===s,icon:this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0,label:o,scale:this.scale,slot:"header-actions-end",title:l,onCalciteChipClose:this.clear},o)}_renderMenuActions(){const{visibleElements:e}=this;if(!e.header||!e.menu)return;const{menuScale:t}=this,i=0===this.effectiveCount;return[p("calcite-action",{disabled:i,icon:"reset",key:"clear-action",onclick:this.clear,scale:t,slot:"header-menu-actions",text:this.messagesCommon.clear,textEnabled:!0}),p("calcite-action",{disabled:i,icon:"folders",key:"collapse-action",onclick:this.collapseItems,scale:t,slot:"header-menu-actions",text:this.messages.collapseAll,textEnabled:!0})]}_renderActiveLayerDropdown(){const{layerItems:e,messages:i}=this;if(!(0===this.effectiveCount||e.length<2)&&this.visibleElements.layerFilter)return p("calcite-combobox",{class:w.layerDropdown,clearDisabled:!0,label:i.filterByLayer,overlayPositioning:"fixed",placeholder:i.filterByLayer,scale:this.scale,selectionMode:"single-persist",onCalciteComboboxChange:({currentTarget:e})=>{this.filterText=void 0;const t=e.selectedItems[0]?.value??void 0;this.layer="all-layers"===t?void 0:t}},p("calcite-combobox-item",{heading:t(i.allLayersCount,{count:e.length}),icon:"layers",key:"all-layers",selected:null==this.layer,value:"all-layers"}),this.layerItems.map(e=>this._renderActiveLayerDropdownItem(e)))}_renderFilterInput(){if(this.visibleElements.filter&&0!==this.effectiveCount)return p("calcite-input",{clearable:!0,icon:"search",placeholder:this.messages.filter,scale:this.scale,value:this.filterText,onCalciteInputInput:({target:{value:e}})=>{this.filterText=e}})}_renderActiveLayerDropdownItem(e){const t=e.title||this.messages.untitledLayer;return p("calcite-combobox-item",{heading:t,icon:e.iconName,key:e.key,selected:e.layer===this.layer,value:e.layer})}_renderList(){const{messages:e}=this;if(0!==this.visibleFeatureCount)return p("calcite-list",{afterCreate:h,bind:this,"data-node-ref":"_list",displayMode:"nested",interactionMode:"interactive",label:e.widgetLabel,loading:this.isUpdating,scale:this.scale,selectionMode:"none"},this._renderListContent(this.allLayerItems))}_renderListContent(e){return this.activeLayerItem?this._renderLayerItem(this.activeLayerItem):e.map(e=>u(e)?this._renderGroupItem(e):v(e)?this._renderLayerItem(e):null).filter(s)}_renderFilterNotice(){const{visibleElements:e}=this;if(!("disabled"===this.state||this.visibleFeatureCount>0)&&e.filter&&e.filterNotice)return p("calcite-notice",{class:w.notice,icon:"exclamation-mark-triangle",kind:"info",open:!0,scale:this.scale,width:"full"},p("div",{slot:"message"},this.messages.noMatchingFeatures))}_renderItemCount(e){if(!this.visibleElements.itemCount)return;const{messages:s}=this,o=i(e.total),l=i(e.visibleTotal),n=t(s.selectionCount,{count:o});return!this._hasFilterText&&e.maxVisibleFeatureCountExceeded?p("span",{class:w.itemCount,slot:"content-end",title:n},p("calcite-icon",{icon:"exclamation-mark-triangle",scale:"s",title:s.tooManyFeatures}),`${i(this.maxVisibleFeatureCountPerLayer)}+`):p("span",{class:w.itemCount,slot:"content-end",title:n},l)}_renderItemActions(e){if(!this.visibleElements.itemMenus)return;const{messages:t,messagesCommon:i}=this,s=this._itemWithOpenMenu===e,o=g(e),l=v(e),n=u(e),r=o?t.deselectFeature:l?t.deselectLayer:t.deselectGroup;return[p("calcite-dropdown",{"data-testid":"selection-list-dropdown",open:s,overlayPositioning:"fixed",scale:this.menuScale,slot:"actions-end",width:"m",onCalciteDropdownClose:()=>this._closeItemMenu(e),onCalciteDropdownOpen:()=>{this._itemWithOpenMenu=e}},p("calcite-action",{appearance:"transparent","data-testid":"selection-list-dropdown-trigger",icon:"ellipsis",scale:this.scale,slot:"trigger",text:i.menu,textEnabled:!1}),s?p("calcite-dropdown-group",{selectionMode:"none"},this.visibleElements.zoomToButton?p("calcite-dropdown-item",{iconStart:"layer-zoom-to",onCalciteDropdownItemSelect:()=>this.goToItem(e)},t.zoomTo):void 0,p("calcite-dropdown-item",{iconStart:"selection-filter",onCalciteDropdownItemSelect:()=>this.selectSingleItem(e)},o?t.onlySelectFeature:t.onlySelectThis),p("calcite-dropdown-item",{iconStart:"selection-x",onCalciteDropdownItemSelect:()=>this.deselectItem(e)},r),this.itemActionConfigs?.map(t=>{const{disabled:i,hidden:s,type:r}=t;if(!("function"==typeof s?s({item:e}):!!s)&&(!r||"feature"===r&&o||"layer"===r&&l||"group"===r&&n))return p("calcite-dropdown-item",{disabled:"function"==typeof i?i({item:e}):!!i,iconStart:t.icon??void 0,onCalciteDropdownItemSelect:()=>t.callback({item:e})},t.label)})):void 0)]}_renderGroupItem(e){const t=e.title||this.messages.untitledLayer;if(0===e.visibleTotal)return;const{displayMode:i}=this;if("layer"===i||"feature"===i)return this._renderListContent(e.items);const{visibleElements:s}=this;return p("calcite-list-item",{bind:this,closable:!!s.itemCloseActions,"data-type":"group",expanded:!0,iconStart:s.itemIcons?e.iconName:void 0,key:e.key,label:t,value:e.title,onCalciteListItemClose:t=>{t.stopPropagation(),this.deselectItem(e)},onCalciteListItemSelect:t=>this._onListItemSelect(e,t)},this._renderItemActions(e),this._renderListContent(e.items))}_renderLayerItem(e){if(0===e.visibleTotal||!e.visible)return;if("feature"===this.displayMode)return this._renderItems(e.featureItems);const{messages:t,visibleElements:i}=this,s=e.title||t.untitledLayer;return p("calcite-list-item",{bind:this,closable:!!i.itemCloseActions,"data-type":"layer",expanded:!0,iconStart:i.itemIcons?e.iconName:void 0,key:e.key,label:s,scale:this.scale,value:e.title,onCalciteListItemClose:t=>{t.stopPropagation(),this.deselectItem(e)},onCalciteListItemSelect:t=>this._onListItemSelect(e,t)},this._renderItemCount(e),this._renderItemActions(e),this._renderItems(e.featureItems),e.maxVisibleFeatureCountExceeded?p("calcite-notice",{class:w.notice,icon:"exclamation-mark-triangle",kind:"info",open:!0,scale:this.scale},p("div",{slot:"message"},t.tooManyFeatures)):void 0)}_renderItems(e){return e.map(e=>this._renderItem(e))}_renderItem(e){if(!e.visible)return;const{highlightOnHoverEnabled:t,messages:i,visibleElements:s}=this,o=e.title||i.untitledFeature,l=s.itemIcons&&"feature"!==this.displayMode;return p("calcite-list-item",{bind:this,class:l?w.listItemFeatureIcon:w.listItemFeature,closable:!!s.itemCloseActions,"data-item":e,"data-type":"feature",key:e.key,label:o,name:o,onblur:t?()=>this.removeTemporaryHighlight():void 0,onfocus:t?()=>this.addTemporaryHighlight(e):void 0,onpointerenter:t?()=>this.addTemporaryHighlight(e):void 0,onpointerleave:t?()=>this.removeTemporaryHighlight():void 0,scale:this.scale,value:o,onCalciteListItemClose:t=>{t.stopPropagation(),this.deselectItem(e)},onCalciteListItemSelect:t=>this._onListItemSelect(e,t)},this._renderItemIcon(e),this._renderItemActions(e))}_renderItemIcon(e){if(this.visibleElements.itemIcons)return p("div",{class:w.listItemIcon,key:"content-start",slot:"content-start"},p("span",{afterCreate:this._afterItemCreate,afterRemoved:this._afterItemRemoved,"data-has-icon":!1,"data-item":e,key:e.thumbnailKey}))}_getListItem(e){return e?.["data-item"]}_hasIcon(e){return!!e?.["data-has-icon"]}_setHasIcon(e,t){e&&(e["data-has-icon"]=t)}_onListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.onListItemSelect?.({item:e})}_closeItemMenu(e){e&&e!==this._itemWithOpenMenu||(this._itemWithOpenMenu=null)}};e([n()],_.prototype,"_hasFilterText",null),e([n()],_.prototype,"_itemWithOpenMenu",void 0),e([n()],_.prototype,"_list",void 0),e([n()],_.prototype,"activeLayerItem",null),e([n()],_.prototype,"allLayerItems",null),e([n()],_.prototype,"displayMode",void 0),e([n()],_.prototype,"effectiveCount",null),e([n()],_.prototype,"effectiveSelectionManager",null),e([n()],_.prototype,"filterText",null),e([n()],_.prototype,"highlightOnHoverEnabled",void 0),e([n()],_.prototype,"icon",null),e([n()],_.prototype,"itemActionConfigs",void 0),e([n()],_.prototype,"isUpdating",null),e([n()],_.prototype,"label",null),e([n()],_.prototype,"layer",null),e([n()],_.prototype,"layerItems",null),e([n()],_.prototype,"layerViewMap",null),e([n()],_.prototype,"maxVisibleFeatureCountExceeded",null),e([n()],_.prototype,"maxVisibleFeatureCountPerLayer",null),e([n()],_.prototype,"menuScale",void 0),e([n(),d("esri/widgets/support/SelectionList/t9n/SelectionList")],_.prototype,"messages",void 0),e([n(),d("esri/t9n/common")],_.prototype,"messagesCommon",void 0),e([n(),d("esri/widgets/Legend/t9n/Legend")],_.prototype,"messagesLegend",void 0),e([n()],_.prototype,"onListItemSelect",void 0),e([n()],_.prototype,"scale",void 0),e([n()],_.prototype,"selectionManager",null),e([n()],_.prototype,"state",null),e([n()],_.prototype,"view",null),e([n()],_.prototype,"viewLayersAndTables",null),e([n()],_.prototype,"viewModel",void 0),e([n({type:I,nonNullable:!0})],_.prototype,"visibleElements",void 0),e([n()],_.prototype,"visibleFeatureCount",null),e([n()],_.prototype,"visibleFeatureItems",null),e([n()],_.prototype,"visibleLayerCount",null),_=e([r("esri.widgets.support.SelectionList")],_);const C=_;export{C as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../Graphic.js";import o from"../../../core/Accessor.js";import{ClonableMixin as r}from"../../../core/Clonable.js";import s from"../../../core/Collection.js";import{IdentifiableMixin as i}from"../../../core/Identifiable.js";import{getOrCreateMapValue as a}from"../../../core/MapUtils.js";import{ignoreAbortErrors as n,debounce as c}from"../../../core/promiseUtils.js";import l from"../../../core/ReactiveMap.js";import{watch as u,initial as y}from"../../../core/reactiveUtils.js";import{sqlIn as d}from"../../../core/sql.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{queryAllJSON as m}from"../../../layers/support/featureQueryAll.js";import{isSubtypeSublayer as g,isSubtypeGroupLayer as _}from"../../../layers/support/layerUtils.js";import w from"../../../rest/networks/support/NetworkElement.js";import b from"../../../rest/support/FeatureSet.js";import A from"../../../rest/support/Query.js";import{featureUtilityNetworkFields as F}from"../../Feature/FeatureUtilityNetworkAssociations/resources.js";import{findUtilityNetwork as f}from"../../Feature/support/featureUtils.js";import{getFeatureTitle as C}from"./utils/getFeatureTitle.js";const I=100;let v=class extends(r(i(o))){constructor(t){super(t),this._loaded=!1,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.networkSourceIdsInUse=new Set,this.source="popup",this.description=null,this.graphic=null,this.layer=null,this.map=null,this.featureCount=0,this.associationTypes=null,this.showAllEnabled=!1,this.title=null,this.attachmentsFeatureCount=0,this.structureFeatureCount=0,this.contentFeatureCount=0,this.containerFeatureCount=0,this.connectivityFeatureCount=0,this._queryOpenAssociationType=async()=>{this.activeAssociationType&&await this._queryDebounced(this.activeAssociationType)},this._cancelQuery=()=>{const{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._queryController=async t=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await n(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();const t=new AbortController;this._queryFeatureCountAbortController=t,await n(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=c(this._queryController,I),this._queryFeatureCountDebounced=c(this._queryFeatureCountController,I)}initialize(){this.addHandles([u(()=>[this.graphic,this.layer,this.map,this.associationTypes,this.objectId,this.globalId,this.canQuery],()=>{this.refresh()},y),u(()=>this.activeAssociationType,t=>{this._queryDebounced(t)},y)])}destroy(){this._cancelQuery(),this._cancelQueryFeatureCount(),this._destroyAssociatedFeatureViewModels()}get supportsCacheHint(){return!!this.layer?.capabilities?.query?.supportsCacheHint}get canLoad(){return!!this.map&&!!this.associationTypes&&"string"==typeof this.globalId}get canQuery(){const t=this.layer?.capabilities?.query;return!!this.associationTypes&&"string"==typeof this.globalId&&!!t?.supportsPagination}set displayCount(t){const e=0,o=3;this._set("displayCount",Math.max(t??o,e))}get displayCount(){return this._get("displayCount")}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get globalId(){return(this.globalIdField&&this.graphic?.attributes?.[this.globalIdField])??null}get globalIdField(){const{layer:t}=this;return t?.globalIdField}get activeAssociationType(){return this._get("activeAssociationType")}set activeAssociationType(t){t&&!this.associationTypes.includes(t)||this._set("activeAssociationType",t)}get state(){const{_queryAbortController:t,_queryFeatureCountAbortController:e,_queryPageAbortController:o,canQuery:r,_loaded:s,canLoad:i,source:a}=this;return e||i&&!s?"loading":t||o?"querying":!r||"popup"===a&&0===this.featureCount?"disabled":"ready"}get utilityNetwork(){const{layer:t,map:e}=this;if(!t?.loaded||!e)return null;const o=g(t)?t.parent:t;return f(e,o)}get attachmentsAssociations(){return this._get("attachmentsAssociations")||new s}get structureAssociations(){return this._get("structureAssociations")||new s}get contentAssociations(){return this._get("contentAssociations")||new s}get containerAssociations(){return this._get("containerAssociations")||new s}get connectivityAssociations(){return this._get("connectivityAssociations")||new s}get associationFeatures(){return this._get("associationFeatures")||new l}get associationViewModels(){return this._get("associationViewModels")||new Map}async refresh(){await this._queryFeatureCountDebounced(),await this._queryOpenAssociationType()}getFeatureCountForAssociationType(t){switch(t){case"attachment":return this.attachmentsFeatureCount;case"structure":return this.structureFeatureCount;case"content":return this.contentFeatureCount;case"container":return this.containerFeatureCount;case"connectivity":return this.connectivityFeatureCount}}_destroyAssociatedFeatureViewModels(){this.associationViewModels.forEach(t=>t.destroyAll())}async _loadUtiltyNetworks(){const t=this.map;if(!t)return;await Promise.allSettled(t.utilityNetworks?.map(async t=>{await t.load()})??[]);const e=this.utilityNetwork;if(e){const o=t=>{if("layerId"in t&&e.isUtilityLayer(t)){const o=null!=t.layerId?e.getSourceIdByLayerId(t.layerId):null;null!=o&&this.networkSourceIdsInUse.add(o)}};this._set("networkSourceIdsInUse",new Set),t.allLayers.forEach(o),t.allTables.forEach(o)}}async _findLayersBySourceId(t){const{utilityNetwork:e,map:o}=this,r=t=>{const o=t;if(!t.url)return!1;if(o.layerId===s){return t.url.replace(/\/\d+$/,"")===e?.featureServiceUrl}return!1};await(e?.load());const s=e.getLayerIdBySourceId(t),i=o.allLayers.filter(r),a=o.allTables.filter(r),n=i.concat(a).toArray();return await Promise.allSettled(n.map(t=>t.load())),n}_clearAssociations(){this.attachmentsAssociations.removeAll(),this.structureAssociations.removeAll(),this.contentAssociations.removeAll(),this.containerAssociations.removeAll(),this.connectivityAssociations.removeAll()}_clearFeatures(){this.associationFeatures.forEach(t=>t.removeAll()),this.associationFeatures.clear()}_getAssociationsByType(t){switch(t){case"attachment":return this.attachmentsAssociations;case"structure":return this.structureAssociations;case"connectivity":return this.connectivityAssociations;case"container":return this.containerAssociations;case"content":return this.contentAssociations}}async _queryLayer(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r),a=new A({where:i,outFields:["*"],cacheHint:this.supportsCacheHint}),n=b.fromJSON(await m(t,a,s));return n.features.forEach(e=>{e.layer=e.sourceLayer=_(t)?t.findSublayerForFeature(e):t}),n.features}async _createAssociationFeatureObjects(t,e,o,r,s,i){if(0===t.length)return[];const a=new Map;for(const[c,l]of e){const t=await this._findLayersBySourceId(c);for(const e of t){(await this._queryLayer(e,l,r,s,i)).forEach(t=>{if("popup"===this.source?t.sourceLayer&&t.getEffectivePopupTemplate():!!t.sourceLayer){const o=a.get(t.attributes[e.globalIdField])??[];o.push(t),a.set(t.attributes[e.globalIdField],o)}})}}const n=[];return await Promise.all(t.toArray().map(async t=>{const{fromNetworkElement:e,toNetworkElement:r}=t,s=e.globalId===o?r:e,i=a.get(s.globalId)??[];await Promise.all(i.map(async e=>{const o=this.utilityNetwork?.getTerminalById(s?.terminalId)?.name,r=e.sourceLayer&&"getFeatureTitle"in e.sourceLayer?await e.sourceLayer.getFeatureTitle(e):C(e);n.push({title:r,feature:e,association:t,terminalName:o})}))})),n}_parseFeatureObjects(t,e){const o=new Map;t.forEach(t=>{const e=t?.feature,r=e.sourceLayer;a(o,r,()=>new s).add(t)});for(const[r,s]of o)this._sortFeatureObjectsByTitle(s),e.set(r,s)}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _queryAssociations(t){const{layer:e,globalId:o,associationTypes:r,utilityNetwork:s,canQuery:i}=this;if(await Promise.allSettled([e?.load(),s?.load()]),this._clearAssociations(),!(i&&e&&r&&s&&o))return;const a=g(e)?e.parent:e,n=new w({globalId:o,networkSourceId:s.getSourceIdByLayerId(a.layerId)}),c=new Set;r.forEach(t=>{switch(t.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity")}});const l=await(s?.queryAssociations({elements:[n],types:Array.from(c)},{signal:t?.signal})),u=new Map,y=new Map;r.forEach(t=>{y.set(t.type,t),u.set(t.type,[])}),l.forEach(t=>{const{toNetworkElement:e,fromNetworkElement:r}=t;switch(t.associationType){case"connectivity":case"junction-junction-connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"connectivity",y))break;u.get("connectivity")?.push(e.globalId)}else{if(this._shouldDiscardNetworkElement(r,"connectivity",y))break;u.get("connectivity")?.push(r.globalId)}this.connectivityAssociations.add(t);break;case"containment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"content",y))break;u.get("content")?.push(e.globalId),this.contentAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"container",y))break;u.get("container")?.push(r.globalId),this.containerAssociations.add(t)}break;case"attachment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"attachment",y))break;u.get("attachment")?.push(e.globalId),this.attachmentsAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"structure",y))break;u.get("structure")?.push(r.globalId),this.structureAssociations.add(t)}}});const d=r.map(async e=>{const{associatedNetworkSourceId:o,associatedAssetGroup:r,associatedAssetType:s}=e,i=u.get(e.type),a=null!=r?await this._countAssociatedFeatures(o,i,r,s,t):i.length;switch(e.type){case"attachment":this._set("attachmentsFeatureCount",a);break;case"structure":this._set("structureFeatureCount",a);break;case"content":this._set("contentFeatureCount",a);break;case"container":this._set("containerFeatureCount",a);break;case"connectivity":this._set("connectivityFeatureCount",a)}});await Promise.allSettled(d)}async _countAssociatedFeatureCount(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r);return t.queryFeatureCount({where:i,outFields:["*"],returnGeometry:!1},{signal:s?.signal})}async _countAssociatedFeatures(t,e,o,r,s){if(0===e.length)return 0;const i=(await this._findLayersBySourceId(t)).map(async t=>this._countAssociatedFeatureCount(t,e,o,r,s));return(await Promise.all(i)).reduce((t,e)=>t+e,0)}async _queryAssociatedFeatures(t,e){const{layer:o,globalId:r,associationTypes:s,utilityNetwork:i,canQuery:a,associationFeatures:n}=this;if(await Promise.allSettled([o?.load(),i?.load()]),!(a&&o&&s&&i))return;const c=this._getAssociationsByType(t.type),{associatedAssetGroup:l,associatedAssetType:u}=t,y=new Map;c.forEach(t=>{const{fromNetworkElement:e,toNetworkElement:o}=t,{networkSourceId:s,elementGlobalId:i}=e.globalId===r?{networkSourceId:o.networkSourceId,elementGlobalId:o.globalId}:{networkSourceId:e.networkSourceId,elementGlobalId:e.globalId},a=y.get(s)||[];a.push(i),y.set(s,a)});const d=await this._createAssociationFeatureObjects(c,y,r,l,u,e);this._parseFeatureObjects(d,n)}async _queryFeatureCount(){await this._loadUtiltyNetworks();const{_queryFeatureCountAbortController:t,canQuery:e}=this;e?(await this._queryAssociations(t),this._set("featureCount",this.attachmentsFeatureCount+this.structureFeatureCount+this.contentFeatureCount+this.containerFeatureCount+this.connectivityFeatureCount)):this._set("featureCount",0)}async _query(t){if(!t)return;await this._loadUtiltyNetworks();const{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),0!==this.featureCount&&(this.destroyed||await this._queryAssociatedFeatures(t,{signal:e?.signal}))}_shouldDiscardNetworkElement(t,e,o){if(!t)return!1;const{networkSourceIdsInUse:r}=this,{networkSourceId:s}=t,i=o.get(e)?.associatedNetworkSourceId,a=r.has(s);return null!=i&&i!==s||!a}_getFeatureQueryWhereClause(t,e,o,r){const s=t.globalIdField,i=t.fieldsIndex.get(F.assetGroup),a=t.fieldsIndex.get(F.assetType),n=null!=o,c=null!=r;return[s?d(s,e):null,n?`(${i?.name} = ${o})`:null,n&&c?`(${a?.name} = ${r})`:null].filter(Boolean).join(" AND ")}};t([h()],v.prototype,"_loaded",void 0),t([h()],v.prototype,"_queryAbortController",void 0),t([h()],v.prototype,"_queryPageAbortController",void 0),t([h()],v.prototype,"_queryFeatureCountAbortController",void 0),t([h({readOnly:!0})],v.prototype,"supportsCacheHint",null),t([h({readOnly:!0})],v.prototype,"canLoad",null),t([h({readOnly:!0})],v.prototype,"canQuery",null),t([h()],v.prototype,"networkSourceIdsInUse",void 0),t([h({constructOnly:!0})],v.prototype,"source",void 0),t([h()],v.prototype,"description",void 0),t([h({value:3})],v.prototype,"displayCount",null),t([h({type:e})],v.prototype,"graphic",void 0),t([h()],v.prototype,"layer",void 0),t([h()],v.prototype,"map",void 0),t([h({readOnly:!0})],v.prototype,"objectId",null),t([h({readOnly:!0})],v.prototype,"objectIdField",null),t([h({readOnly:!0})],v.prototype,"globalId",null),t([h({readOnly:!0})],v.prototype,"globalIdField",null),t([h()],v.prototype,"featureCount",void 0),t([h()],v.prototype,"associationTypes",void 0),t([h()],v.prototype,"activeAssociationType",null),t([h()],v.prototype,"showAllEnabled",void 0),t([h()],v.prototype,"state",null),t([h()],v.prototype,"title",void 0),t([h({readOnly:!0})],v.prototype,"utilityNetwork",null),t([h({readOnly:!0})],v.prototype,"attachmentsFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"structureFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"attachmentsAssociations",null),t([h({readOnly:!0})],v.prototype,"structureAssociations",null),t([h({readOnly:!0})],v.prototype,"contentFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"containerFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"contentAssociations",null),t([h({readOnly:!0})],v.prototype,"containerAssociations",null),t([h({readOnly:!0})],v.prototype,"connectivityFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"connectivityAssociations",null),t([h({readOnly:!0})],v.prototype,"associationFeatures",null),t([h({readOnly:!0})],v.prototype,"associationViewModels",null),v=t([p("esri.widgets.support.UtilityNetworkAssociations.FeatureUtilityNetworkAssociationsViewModel")],v);export{v as default};
5
+ import{__decorate as t}from"tslib";import e from"../../../Graphic.js";import o from"../../../core/Accessor.js";import{ClonableMixin as r}from"../../../core/Clonable.js";import s from"../../../core/Collection.js";import{IdentifiableMixin as i}from"../../../core/Identifiable.js";import{getOrCreateMapValue as a}from"../../../core/MapUtils.js";import{ignoreAbortErrors as n,debounce as c}from"../../../core/promiseUtils.js";import l from"../../../core/ReactiveMap.js";import{watch as u,initial as y}from"../../../core/reactiveUtils.js";import{sqlIn as d}from"../../../core/sql.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{queryAllJSON as m}from"../../../layers/support/featureQueryAll.js";import{isSubtypeSublayer as g,isSubtypeGroupLayer as _}from"../../../layers/support/layerUtils.js";import w from"../../../rest/networks/support/NetworkElement.js";import b from"../../../rest/support/FeatureSet.js";import A from"../../../rest/support/Query.js";import{featureUtilityNetworkFields as F}from"../../Feature/FeatureUtilityNetworkAssociations/resources.js";import{findUtilityNetwork as f}from"../../Feature/support/featureUtils.js";import{getFeatureTitle as C}from"./utils/getFeatureTitle.js";const I=100;let v=class extends(r(i(o))){constructor(t){super(t),this._loaded=!1,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.networkSourceIdsInUse=new Set,this.source="popup",this.description=null,this.graphic=null,this.layer=null,this.map=null,this.featureCount=0,this.associationTypes=null,this.showAllEnabled=!1,this.title=null,this.attachmentsFeatureCount=0,this.structureFeatureCount=0,this.contentFeatureCount=0,this.containerFeatureCount=0,this.connectivityFeatureCount=0,this._queryOpenAssociationType=async()=>{this.activeAssociationType&&await this._queryDebounced(this.activeAssociationType)},this._cancelQuery=()=>{const{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._queryController=async t=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await n(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();const t=new AbortController;this._queryFeatureCountAbortController=t,await n(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=c(this._queryController,I),this._queryFeatureCountDebounced=c(this._queryFeatureCountController,I)}initialize(){this.addHandles([u(()=>[this.graphic,this.layer,this.map,this.associationTypes,this.objectId,this.globalId,this.canQuery],()=>{this.refresh()},y),u(()=>this.activeAssociationType,t=>{this._queryDebounced(t)},y)])}destroy(){this._cancelQuery(),this._cancelQueryFeatureCount(),this._destroyAssociatedFeatureViewModels()}get supportsCacheHint(){return!!this.layer?.capabilities?.query?.supportsCacheHint}get canLoad(){return!!this.map&&!!this.associationTypes&&"string"==typeof this.globalId}get canQuery(){const t=this.layer?.capabilities?.query;return!!this.associationTypes&&"string"==typeof this.globalId&&!!t?.supportsPagination}set displayCount(t){const e=0,o=3;this._set("displayCount",Math.max(t??o,e))}get displayCount(){return this._get("displayCount")}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get globalId(){return(this.globalIdField&&this.graphic?.attributes?.[this.globalIdField])??null}get globalIdField(){const{layer:t}=this;return t?.globalIdField}get activeAssociationType(){return this._get("activeAssociationType")}set activeAssociationType(t){t&&!this.associationTypes.includes(t)||this._set("activeAssociationType",t)}get state(){const{_queryAbortController:t,_queryFeatureCountAbortController:e,_queryPageAbortController:o,canQuery:r,_loaded:s,canLoad:i,source:a}=this;return e||i&&!s?"loading":t||o?"querying":!r||"popup"===a&&0===this.featureCount?"disabled":"ready"}get utilityNetwork(){const{layer:t,map:e}=this;if(!t?.loaded||!e)return null;const o=g(t)?t.parent:t;return f(e,o)}get attachmentsAssociations(){return this._get("attachmentsAssociations")||new s}get structureAssociations(){return this._get("structureAssociations")||new s}get contentAssociations(){return this._get("contentAssociations")||new s}get containerAssociations(){return this._get("containerAssociations")||new s}get connectivityAssociations(){return this._get("connectivityAssociations")||new s}get associationFeatures(){return this._get("associationFeatures")||new l}get associationViewModels(){return this._get("associationViewModels")||new Map}async refresh(){await this._queryFeatureCountDebounced(),await this._queryOpenAssociationType()}getFeatureCountForAssociationType(t){switch(t){case"attachment":return this.attachmentsFeatureCount;case"structure":return this.structureFeatureCount;case"content":return this.contentFeatureCount;case"container":return this.containerFeatureCount;case"connectivity":return this.connectivityFeatureCount}}_destroyAssociatedFeatureViewModels(){this.associationViewModels.forEach(t=>t.destroyAll())}async _loadUtiltyNetworks(){const t=this.map;if(!t)return;await Promise.allSettled(t.utilityNetworks?.map(async t=>{await t.load()})??[]);const e=this.utilityNetwork;if(e){const o=t=>{if("layerId"in t&&e.isUtilityLayer(t)){const o=null!=t.layerId?e.getSourceIdByLayerId(t.layerId):null;null!=o&&this.networkSourceIdsInUse.add(o)}};this._set("networkSourceIdsInUse",new Set),t.allLayers.forEach(o),t.allTables.forEach(o)}}async _findLayersBySourceId(t){const{utilityNetwork:e,map:o}=this,r=t=>{const o=t;if(!t.url)return!1;if(o.layerId===s){return t.url.replace(/\/\d+$/,"")===e?.featureServiceUrl}return!1};await(e?.load());const s=e.getLayerIdBySourceId(t),i=o.allLayers.filter(r),a=o.allTables.filter(r),n=i.concat(a).toArray();return await Promise.allSettled(n.map(t=>t.load())),n}_clearAssociations(){this.attachmentsAssociations.removeAll(),this.structureAssociations.removeAll(),this.contentAssociations.removeAll(),this.containerAssociations.removeAll(),this.connectivityAssociations.removeAll()}_clearFeatures(){this.associationFeatures.forEach(t=>t.removeAll()),this.associationFeatures.clear()}_getAssociationsByType(t){switch(t){case"attachment":return this.attachmentsAssociations;case"structure":return this.structureAssociations;case"connectivity":return this.connectivityAssociations;case"container":return this.containerAssociations;case"content":return this.contentAssociations}}async _queryLayer(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r),a=new A({where:i,outFields:["*"],cacheHint:this.supportsCacheHint}),n=b.fromJSON(await m(t,a,s));return n.features.forEach(e=>{e.layer=e.sourceLayer=_(t)?t.findSublayerForFeature(e):t}),n.features}async _createAssociationFeatureObjects(t,e,o,r,s,i){if(0===t.length)return[];const a=new Map;for(const[c,l]of e){const t=await this._findLayersBySourceId(c);for(const e of t){(await this._queryLayer(e,l,r,s,i)).forEach(t=>{if("popup"===this.source?t.sourceLayer&&t.getEffectivePopupTemplate():!!t.sourceLayer){const o=a.get(t.attributes[e.globalIdField])??[];o.push(t),a.set(t.attributes[e.globalIdField],o)}})}}const n=[];return await Promise.all(t.toArray().map(async t=>{const{fromNetworkElement:e,toNetworkElement:r}=t,s=e.globalId===o?r:e,i=a.get(s.globalId)??[];await Promise.all(i.map(async e=>{const o=this.utilityNetwork?.getTerminalById(s?.terminalId)?.name,r=e.sourceLayer&&"getFeatureTitle"in e.sourceLayer&&await e.sourceLayer.getFeatureTitle(e)||C(e);n.push({title:r,feature:e,association:t,terminalName:o})}))})),n}_parseFeatureObjects(t,e){const o=new Map;t.forEach(t=>{const e=t?.feature,r=e.sourceLayer;a(o,r,()=>new s).add(t)});for(const[r,s]of o)this._sortFeatureObjectsByTitle(s),e.set(r,s)}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _queryAssociations(t){const{layer:e,globalId:o,associationTypes:r,utilityNetwork:s,canQuery:i}=this;if(await Promise.allSettled([e?.load(),s?.load()]),this._clearAssociations(),!(i&&e&&r&&s&&o))return;const a=g(e)?e.parent:e,n=new w({globalId:o,networkSourceId:s.getSourceIdByLayerId(a.layerId)}),c=new Set;r.forEach(t=>{switch(t.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity")}});const l=await(s?.queryAssociations({elements:[n],types:Array.from(c)},{signal:t?.signal})),u=new Map,y=new Map;r.forEach(t=>{y.set(t.type,t),u.set(t.type,[])}),l.forEach(t=>{const{toNetworkElement:e,fromNetworkElement:r}=t;switch(t.associationType){case"connectivity":case"junction-junction-connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"connectivity",y))break;u.get("connectivity")?.push(e.globalId)}else{if(this._shouldDiscardNetworkElement(r,"connectivity",y))break;u.get("connectivity")?.push(r.globalId)}this.connectivityAssociations.add(t);break;case"containment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"content",y))break;u.get("content")?.push(e.globalId),this.contentAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"container",y))break;u.get("container")?.push(r.globalId),this.containerAssociations.add(t)}break;case"attachment":if(r?.globalId===o){if(this._shouldDiscardNetworkElement(e,"attachment",y))break;u.get("attachment")?.push(e.globalId),this.attachmentsAssociations.add(t)}else{if(this._shouldDiscardNetworkElement(r,"structure",y))break;u.get("structure")?.push(r.globalId),this.structureAssociations.add(t)}}});const d=r.map(async e=>{const{associatedNetworkSourceId:o,associatedAssetGroup:r,associatedAssetType:s}=e,i=u.get(e.type),a=null!=r?await this._countAssociatedFeatures(o,i,r,s,t):i.length;switch(e.type){case"attachment":this._set("attachmentsFeatureCount",a);break;case"structure":this._set("structureFeatureCount",a);break;case"content":this._set("contentFeatureCount",a);break;case"container":this._set("containerFeatureCount",a);break;case"connectivity":this._set("connectivityFeatureCount",a)}});await Promise.allSettled(d)}async _countAssociatedFeatureCount(t,e,o,r,s){const i=this._getFeatureQueryWhereClause(t,e,o,r);return t.queryFeatureCount({where:i,outFields:["*"],returnGeometry:!1},{signal:s?.signal})}async _countAssociatedFeatures(t,e,o,r,s){if(0===e.length)return 0;const i=(await this._findLayersBySourceId(t)).map(async t=>this._countAssociatedFeatureCount(t,e,o,r,s));return(await Promise.all(i)).reduce((t,e)=>t+e,0)}async _queryAssociatedFeatures(t,e){const{layer:o,globalId:r,associationTypes:s,utilityNetwork:i,canQuery:a,associationFeatures:n}=this;if(await Promise.allSettled([o?.load(),i?.load()]),!(a&&o&&s&&i))return;const c=this._getAssociationsByType(t.type),{associatedAssetGroup:l,associatedAssetType:u}=t,y=new Map;c.forEach(t=>{const{fromNetworkElement:e,toNetworkElement:o}=t,{networkSourceId:s,elementGlobalId:i}=e.globalId===r?{networkSourceId:o.networkSourceId,elementGlobalId:o.globalId}:{networkSourceId:e.networkSourceId,elementGlobalId:e.globalId},a=y.get(s)||[];a.push(i),y.set(s,a)});const d=await this._createAssociationFeatureObjects(c,y,r,l,u,e);this._parseFeatureObjects(d,n)}async _queryFeatureCount(){await this._loadUtiltyNetworks();const{_queryFeatureCountAbortController:t,canQuery:e}=this;e?(await this._queryAssociations(t),this._set("featureCount",this.attachmentsFeatureCount+this.structureFeatureCount+this.contentFeatureCount+this.containerFeatureCount+this.connectivityFeatureCount)):this._set("featureCount",0)}async _query(t){if(!t)return;await this._loadUtiltyNetworks();const{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),0!==this.featureCount&&(this.destroyed||await this._queryAssociatedFeatures(t,{signal:e?.signal}))}_shouldDiscardNetworkElement(t,e,o){if(!t)return!1;const{networkSourceIdsInUse:r}=this,{networkSourceId:s}=t,i=o.get(e)?.associatedNetworkSourceId,a=r.has(s);return null!=i&&i!==s||!a}_getFeatureQueryWhereClause(t,e,o,r){const s=t.globalIdField,i=t.fieldsIndex.get(F.assetGroup),a=t.fieldsIndex.get(F.assetType),n=null!=o,c=null!=r;return[s?d(s,e):null,n?`(${i?.name} = ${o})`:null,n&&c?`(${a?.name} = ${r})`:null].filter(Boolean).join(" AND ")}};t([h()],v.prototype,"_loaded",void 0),t([h()],v.prototype,"_queryAbortController",void 0),t([h()],v.prototype,"_queryPageAbortController",void 0),t([h()],v.prototype,"_queryFeatureCountAbortController",void 0),t([h({readOnly:!0})],v.prototype,"supportsCacheHint",null),t([h({readOnly:!0})],v.prototype,"canLoad",null),t([h({readOnly:!0})],v.prototype,"canQuery",null),t([h()],v.prototype,"networkSourceIdsInUse",void 0),t([h({constructOnly:!0})],v.prototype,"source",void 0),t([h()],v.prototype,"description",void 0),t([h({value:3})],v.prototype,"displayCount",null),t([h({type:e})],v.prototype,"graphic",void 0),t([h()],v.prototype,"layer",void 0),t([h()],v.prototype,"map",void 0),t([h({readOnly:!0})],v.prototype,"objectId",null),t([h({readOnly:!0})],v.prototype,"objectIdField",null),t([h({readOnly:!0})],v.prototype,"globalId",null),t([h({readOnly:!0})],v.prototype,"globalIdField",null),t([h()],v.prototype,"featureCount",void 0),t([h()],v.prototype,"associationTypes",void 0),t([h()],v.prototype,"activeAssociationType",null),t([h()],v.prototype,"showAllEnabled",void 0),t([h()],v.prototype,"state",null),t([h()],v.prototype,"title",void 0),t([h({readOnly:!0})],v.prototype,"utilityNetwork",null),t([h({readOnly:!0})],v.prototype,"attachmentsFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"structureFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"attachmentsAssociations",null),t([h({readOnly:!0})],v.prototype,"structureAssociations",null),t([h({readOnly:!0})],v.prototype,"contentFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"containerFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"contentAssociations",null),t([h({readOnly:!0})],v.prototype,"containerAssociations",null),t([h({readOnly:!0})],v.prototype,"connectivityFeatureCount",void 0),t([h({readOnly:!0})],v.prototype,"connectivityAssociations",null),t([h({readOnly:!0})],v.prototype,"associationFeatures",null),t([h({readOnly:!0})],v.prototype,"associationViewModels",null),v=t([p("esri.widgets.support.UtilityNetworkAssociations.FeatureUtilityNetworkAssociationsViewModel")],v);export{v as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3367],{2272:(e,t,n)=>{n.d(t,{Dl:()=>u,gf:()=>f,jV:()=>a,lF:()=>c});var r=n(92602),i=n(70333),s=n(4718),o=n(84952),l=n(926);function a(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,s.o8)(e)}function c(e,t,n){const r={};for(const i in e){if("declaredClass"===i)continue;const s=e[i];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))r[i]=s.map(e=>c(e));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[i]);r[i]=t?e:JSON.stringify(e)}else r[i]=t?s:JSON.stringify(s);else r[i]=s}return r}async function f(e,t,s){const o=function(e,t){return e?t&&(0,l.Qc)(e)?t:(0,l.CG)(e)??i.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!i.id&&r.A.request.useIdentity&&await Promise.all([n.e(7330),n.e(168),n.e(5125)]).then(n.bind(n,55125));const a=await i.id.getCredential(e,s);return a?.token}},3367:(e,t,n)=>{n.d(t,{A:()=>v,B:()=>T,P:()=>g,g:()=>b,r:()=>w});var r=n(48938),i=n(66395),s=n(85935),o=n(78878),l=n(49186),a=n(53966),u=n(91869),c=n(20655),f=n(45475),d=n(67090),p=n(62791),y=n(14942),h=n(54218);class g{constructor(e,t){this.portal=e,this._debugLog=t}async translate(e){this.portal.loaded||await this.portal.load();const t=this.portal.helperServices?.aiUtilityServices;if(null==t)return{success:!1};const n=t.url+t.translateUtility;try{return e.requestSource??="arcade",{success:!0,results:(await(0,f.T)(n,e,{authMode:"no-prompt"})).map(e=>e.toJSON())}}catch(e){return null!=this._debugLog&&(e instanceof Error||e instanceof l.A)&&this._debugLog(`TranslateText error: ${e.message}`),a.A.getLogger("esri.arcade.functions.aiServices").error(e),{success:!1}}}}class m{constructor(e,t,n){this._parameters=e,this._maxTotalContentSize=t,this._maxContentsLength=n,this._requests=[],this._normalizedContents=new Map,this._contentsTotalSize=0}tryAdd(e){const t=new Set(e.filter(e=>!this._normalizedContents.has(e.text)).map(e=>e.text));if(this._requests.length+t.size>this._maxContentsLength)return null;let n=0;for(const e of t)n+=e.length;if((n+this._contentsTotalSize)*(this._parameters.to.length??1)>this._maxTotalContentSize)return null;const r=this._requests.length;for(const{key:t,text:n}of e)(0,u.tE)(this._normalizedContents,n,()=>[]).push({batchIdx:r,key:t});return this._requests.push(e),this._contentsTotalSize+=n,r}async send(e){const t=[],n=[];let r=0;for(const[e,i]of this._normalizedContents)t.push(new d.A({key:String(r++),text:e})),n.push(i);const i=new p.A(this._parameters);i.contents=t;const s=await e.translate(i);if(!s.success)return Array.from(this._requests,()=>s);const o=Array.from(this._requests,()=>({success:!0,results:[]}));for(const e of s.results){const t=Number(e.key);for(const r of n[t])o[r.batchIdx].results.push({...e,key:r.key})}return o}}function b(e){const t=[...new Set(e.to)].sort(),n=e.from??null,r=e.portalUrl,i=e.translator,s=e.apiKey??null;return JSON.stringify([t,n,r,i,s])}async function S(e,t,n){try{return(await e.yieldFor(n))[t]}catch{return{success:!1}}}class T{constructor(e,t,{maxTotalContentSize:n=5e4,maxContentsLength:r=1e3}={}){this._executor=e,this._service=t,this._openBatches=new Map,this._maxTotalContentSize=n,this._maxContentsLength=r}create(e){return{translate:async t=>{const n=b(t),{contents:r,to:i,from:s,translator:o,portalUrl:l,apiKey:a}=t;if(null==i)return{success:!1};if(null==r||r.every(e=>0===e.text.length))return{success:!1};const u=this._openBatches.get(n);if(null!=u){const t=u.data.tryAdd(r);if(null!=t)return await S(e,t,u);u.send()}const c=new m({to:i,from:s,translator:o,portalUrl:l,apiKey:a},this._maxTotalContentSize,this._maxContentsLength),f=c.tryAdd(r);if(null!=f){const t=this._executor.openBatch(c,{open:e=>{this._openBatches.set(n,e)},execute:e=>e.send(this._service),close:e=>{this._openBatches.get(n)===e&&this._openBatches.delete(n)}});return await S(e,f,t)}return await this._service.translate(t)}}}}function w(e){"async"===e.mode&&(e.functions[(0,r.X)("TranslateText")]=function(t,n){return e.standardFunctionAsync(t,n,async(e,t,n)=>{if((0,o.B)(n,2,3,e,t),!(0,h.Kg)(n[0])&&!(0,h.cy)(n[0])&&!(0,o.j)(n[0]))throw new s.D$(e,"InvalidParameter",t);const r=(0,o.M)(n[0]);if(!(0,h.Kg)(n[1])&&!(0,h.cy)(n[1])&&!(0,o.j)(n[1]))throw new s.D$(e,"InvalidParameter",t);const l=(0,o.M)(n[1]);let a=null;if(n.length>=3){if(!(0,h.Kg)(n[2]))throw new s.D$(e,"InvalidParameter",t);a=n[2]}const u=r.map((e,t)=>new d.A({key:String(t),text:e})),f=e.services?.portal??c.A.getDefault(),m=new p.A({to:l,contents:u,from:a,portalUrl:f.restUrl.replace(/\/sharing\/rest$/,"")}),S=new Map;let T=null;if(null!=e.lrucache){const t=e.lrucache;T??=b(m),m.contents=m.contents?.filter(e=>{const n=t.getCachedTranslation(T,e.text);return null==n||(S.set(e.key,{...n,key:e.key,text:e.text}),!1)})}if(m.contents?.length){const t=e.services?.translation??new g(f,e.console),n=await t.translate(m);if(!n.success)return new i.A({__proto__:null,success:!1});for(const t of n.results){const n=m.contents?.find(e=>e.key===t.key)?.text;if(null==n)throw new s.D$(null,"NeverReach",null);S.set(t.key,t),null!=e.lrucache&&(T??=b(m),e.lrucache.setCachedTranslation(T,n,{detectedLanguage:t.detectedLanguage,translation:t.translation}))}}const w=Array.from(u,t=>{const n=y.A.fromJSON(S.get(t.key));if(null==n)throw new s.D$(null,"NeverReach",null);return n.text=t.text,i.A.convertJsonToArcade(n.toJSON(),e.timeZone??"system",!0)});return new i.A({__proto__:null,success:!0,results:w})})})}const v=Object.freeze(Object.defineProperty({__proto__:null,BatchTranslationServiceFactory:T,PortalTranslationService:g,getTranslateParametersKey:b,registerFunctions:w},Symbol.toStringTag,{value:"Module"}))},6800:(e,t,n)=>{n.d(t,{G:()=>a,y:()=>o});var r=n(99719),i=n(78878),s=n(54218);function o(e){l=e}let l;function a(e){return null===e?null:(0,i.e)(e)?e.clone():(0,i.d)(e)?e:(0,i.h)(e)?e.clone():(0,i.j)(e)?e.toArray().map(e=>a(e)):(0,s.cy)(e)?e.map(e=>a(e)):(0,i.k)(e)?l.createFromArcadeFeature(e):(0,i.l)(e)||(0,i.m)(e)?e:(0,i.n)(e)||"esri.arcade.Attachment"===e?.declaredClass?e.deepClone():("esri.arcade.Portal"===e?.declaredClass||(0,i.o)(e)||e instanceof r.x||(0,i.i)(e),e)}},7335:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(93818),i=n(84939);class s extends r.A{constructor(e,t,n,r,i){super(e),this._lazyPath=[],this._hasZ=!1,this._hasM=!1,this._hasZ=n,this._hasM=r,this._spRef=t,this._cacheId=i}get(e){if(void 0===this._lazyPath[e]){const t=this._elements[e];if(void 0===t)return;this._lazyPath[e]=new i.A(t,this._spRef,this._hasZ,this._hasM,this._cacheId,e)}return this._lazyPath[e]}equalityTest(e){return e===this||null!==e&&e instanceof s!=0&&e.getUniqueHash()===this.getUniqueHash()}getUniqueHash(){return this._cacheId.toString()}}},14607:(e,t,n)=>{n.d(t,{B:()=>u,GP:()=>l,qg:()=>c});var r=n(799),i=n(73444);const s={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,i.JK)()){let t=(e=e.toLowerCase())in s;if(!t){const n=e.split("-");n.length>1&&n[0]in s&&(e=n[0],t=!0),t||(e="en")}const[n,r,o="#,##0.###"]=s[e];return{decimal:n,group:r,pattern:o}}function l(e,t){const n=o((t={...t}).locale);t.customs=n;const r=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,n){const r=(n=n||{}).customs.group,i=n.customs.decimal,s=t.split(";"),o=s[0];if((t=s[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const l=a,u=o.match(l);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===n.fractional&&(n.places=0),t.replace(l,function(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const r=t.split("."),i="string"==typeof n.places&&n.places.indexOf(",");let s=n.places;i?s=n.places.slice(i+1):+s>=0||(s=(r[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(s))));const o=String(Math.abs(e)).split("."),l=o[1]||"";if(r[1]||n.places){i&&(n.places=n.places.slice(0,Math.max(0,i)));const e=void 0!==n.places?n.places:r[1]&&r[1].lastIndexOf("0")+1;+e>l.length&&(o[1]=l.padEnd(Number(e),"0")),+s<l.length&&(o[1]=l.slice(0,Math.max(0,Number(s))))}else o[1]&&o.pop();const a=r[0].replace(",","");let u=a.indexOf("0");-1!==u&&(u=a.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),a.includes("#")||(o[0]=o[0].slice(-u)));let c,f,d=r[0].lastIndexOf(",");if(-1!==d){c=r[0].length-d-1;const e=r[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(f=e.length-d-1)}const p=[];for(let e=o[0];e;){const t=e.length-c;p.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",f&&(c=f,f=void 0)}return o[0]=p.reverse().join(n.group||","),o.join(n.decimal||".")}(e,u[0],{decimal:i,group:r,places:n.places,round:n.round}))}(e,r,t)}const a=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),n=e.pattern||t.pattern,i=t.group,s=t.decimal;let l=1;if(n.includes("%"))l/=100;else if(n.includes("‰"))l/=1e3;else if(n.includes("¤"))throw new Error("currency notation not supported");const u=n.split(";");1===u.length&&u.push("-"+u[0]);const c=d(u,t=>(t="(?:"+(0,r.Cj)(t,".")+")").replace(a,t=>{const n={signed:!1,separator:e.strict?i:[i,""],fractional:e.fractional,decimal:s,exponent:!1},r=t.split(".");let o=e.places;1===r.length&&1!==l&&(r[1]="###"),1===r.length||0===o?n.fractional=!1:(void 0===o&&(o=e.pattern?r[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(n.fractional=!0),!e.places&&+o<r[1].length&&(o+=","+r[1].length),n.places=o);const a=r[0].split(",");return a.length>1&&(n.groupSize=a.pop().length,a.length>1&&(n.groupSize2=a.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=f(e),n=d(e.fractional,t=>{let n="";return t&&0!==e.places&&(n="\\"+e.decimal,e.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+e.places+"}"),n},!0);let r=t+n;return n&&(r="(?:(?:"+r+")|(?:"+n+"))"),r+d(e.exponent,t=>t?"([eE]"+f({signed:e.eSigned})+")":"")}(n)+")"}),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:i,decimal:s,factor:l}}function c(e,t){const n=u(t),r=new RegExp("^"+n.regexp+"$").exec(e);if(!r)return NaN;let i=r[1];if(!r[1]){if(!r[2])return NaN;i=r[2],n.factor*=-1}return i=i.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(i)*n.factor}function f(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,e=>e?"[-+]":"",!0)+d(e.separator,t=>{if(!t)return"(?:\\d+)";" "===(t=(0,r.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const n=e.groupSize,i=e.groupSize2;if(i){const e="(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+t+"]\\d{"+i+"})*["+t+"]\\d{"+n+"})";return n-i>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(n-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*)"},!0)}const d=(e,t,n)=>{if(!Array.isArray(e))return t(e);const r=[];for(let n=0;n<e.length;n++)r.push(t(e[n]));return p(r.join("|"),Boolean(n))},p=(e,t)=>"("+(t?"?:":"")+e+")"},14942:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(31635),i=n(25482),s=n(10107),o=n(64108);let l=class extends i.o{constructor(e){super(e),this.text=null,this.detectedLanguage="en",this.detectedLanguageScore=-1}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"key",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"text",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{read:{source:"detectedLanguage.language"},write:{target:"detectedLanguage.language"}}})],l.prototype,"detectedLanguage",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{read:{source:"detectedLanguage.score"},write:{target:"detectedLanguage.score"}}})],l.prototype,"detectedLanguageScore",void 0),(0,r.Cg)([(0,s.MZ)({type:Object,json:{write:!0}})],l.prototype,"translation",void 0),l=(0,r.Cg)([(0,o.$)("esri.rest.support.TranslateResult")],l)},20437:(e,t,n)=>{n.d(t,{A:()=>h});var r,i=n(31635),s=n(66552),o=n(25482),l=n(10107),a=n(56507),u=(n(44208),n(87811),n(93223)),c=n(36005),f=n(64108),d=n(80451),p=n(98453);const y=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=class extends o.o{static{r=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?y.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,i.Cg)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,i.Cg)([(0,l.MZ)()],h.prototype,"description",void 0),(0,i.Cg)([(0,c.w)("description")],h.prototype,"readDescription",null),(0,i.Cg)([(0,l.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],h.prototype,"domain",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,i.Cg)([(0,l.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,i.Cg)([(0,u.e)(p.m)],h.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)()],h.prototype,"valueType",void 0),(0,i.Cg)([(0,c.w)("valueType",["description"])],h.prototype,"readValueType",null),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=r=(0,i.Cg)([(0,f.$)("esri.layers.support.Field")],h)},24097:(e,t,n)=>{n.d(t,{K:()=>r});const r={type:String,json:{read:{source:"token"},write:{target:"token"}}}},33325:(e,t,n)=>{n.d(t,{$P:()=>c,At:()=>b,JB:()=>T,Lk:()=>f,NI:()=>w,Qi:()=>S,eB:()=>v,eg:()=>y,f0:()=>p,gO:()=>h,ik:()=>g,ke:()=>a,nE:()=>u,rX:()=>d,yT:()=>m});var r=n(66131),i=n(44729),s=n(15032),o=n(20437),l=n(28097);function a(e){return o.A.fromJSON(e.toJSON())}function u(e){return e.toJSON?e.toJSON():e}function c(e){return e instanceof Date}function f(e){return e instanceof l.c9}function d(e){return e instanceof r.lY}function p(e){return e instanceof i.n}function y(e){return e instanceof s.k}const h=1e3,g={point:"point",polygon:"polygon",polyline:"polyline",multipoint:"multipoint",extent:"extent",esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint",esriGeometryEnvelope:"extent",envelope:"extent"},m={point:"esriGeometryPoint",polygon:"esriGeometryPolygon",polyline:"esriGeometryPolyline",multipoint:"esriGeometryMultipoint",extent:"esriGeometryEnvelope",esriGeometryPoint:"esriGeometryPoint",esriGeometryPolygon:"esriGeometryPolygon",esriGeometryPolyline:"esriGeometryPolyline",esriGeometryMultipoint:"esriGeometryMultipoint",esriGeometryEnvelope:"esriGeometryEnvelope",envelope:"esriGeometryEnvelope"},b={"small-integer":"esriFieldTypeSmallInteger",integer:"esriFieldTypeInteger",long:"esriFieldTypeLong",single:"esriFieldTypeSingle",double:"esriFieldTypeDouble",string:"esriFieldTypeString",date:"esriFieldTypeDate","date-only":"esriFieldTypeDateOnly","time-only":"esriFieldTypeTimeOnly","timestamp-offset":"esriFieldTypeTimestampOffset",oid:"esriFieldTypeOID",geometry:"esriFieldTypeGeometry",blob:"esriFieldTypeBlob",raster:"esriFieldTypeRaster",guid:"esriFieldTypeGUID","global-id":"esriFieldTypeGlobalID",xml:"esriFieldTypeXML","big-integer":"esriFieldTypeBigInteger",esriFieldTypeSmallInteger:"esriFieldTypeSmallInteger",esriFieldTypeInteger:"esriFieldTypeInteger",esriFieldTypeLong:"esriFieldTypeLong",esriFieldTypeSingle:"esriFieldTypeSingle",esriFieldTypeDouble:"esriFieldTypeDouble",esriFieldTypeString:"esriFieldTypeString",esriFieldTypeDate:"esriFieldTypeDate",esriFieldTypeDateOnly:"esriFieldTypeDateOnly",esriFieldTypeTimeOnly:"esriFieldTypeTimeOnly",esriFieldTypeTimestampOffset:"esriFieldTypeTimestampOffset",esriFieldTypeOID:"esriFieldTypeOID",esriFieldTypeGeometry:"esriFieldTypeGeometry",esriFieldTypeBlob:"esriFieldTypeBlob",esriFieldTypeRaster:"esriFieldTypeRaster",esriFieldTypeGUID:"esriFieldTypeGUID",esriFieldTypeGlobalID:"esriFieldTypeGlobalID",esriFieldTypeXML:"esriFieldTypeXML",esriFieldTypeBigInteger:"esriFieldTypeBigInteger"};function S(e){return void 0===e?"":e=(e=(e=e.replace(/\/featureserver\/[0-9]*/i,"/FeatureServer")).replace(/\/mapserver\/[0-9]*/i,"/MapServer")).split("?")[0]}function T(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},s={key:n,value:e[n]};return i(r,s)}});var i;const s=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,o;if(Array.isArray(t)){for(o="[",i=0;i<t.length;i++)i&&(o+=","),o+=e(t[i])||"null";return o+"]"}if(null===t)return"null";if(s.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const l=s.push(t)-1,a=Object.keys(t).sort(r?.(t));for(o="",i=0;i<a.length;i++){const n=a[i],r=e(t[n]);r&&(o&&(o+=","),o+=JSON.stringify(n)+":"+r)}return s.splice(l,1),"{"+o+"}"}(e)}function w(e){switch(e.type){case"catalog":case"csv":case"feature":case"geojson":case"knowledge-graph-sublayer":case"oriented-imagery":case"subtype-group":case"wfs":return!0;default:return!1}}function v(e){switch(e.type){case"catalog-footprint":case"subtype-sublayer":return!0;default:return w(e)}}},39357:(e,t,n)=>{n.d(t,{H:()=>a});var r,i=n(31635),s=n(25482),o=n(10107),l=(n(44208),n(53966),n(87811),n(64108));let a=r=class extends s.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=r=(0,i.Cg)([(0,l.$)("esri.layers.support.CodedValue")],a)},45475:(e,t,n)=>{n.d(t,{T:()=>o});var r=n(11254),i=n(2272),s=n(14942);async function o(e,t,n){const o=t.toJSON();o.contents=JSON.stringify(o.contents),o.token=await(0,i.gf)(t.portalUrl,t.apiKey,{signal:n?.signal,prompt:"no-prompt"!==n?.authMode});const l=(0,i.Dl)(e),a=(0,i.jV)(l.query,{...n,query:o,method:"post",authMode:"anonymous"});return(await(0,r.A)(l.path,a)).data.results.map(e=>s.A.fromJSON(e))}},48938:(e,t,n)=>{n.d(t,{X:()=>i,_:()=>s});var r=n(85935);function i(e){if("string"==typeof e)return e.toLowerCase();if("name"in e)return e.name.toLowerCase();if("string"!=typeof e.value)throw new r.D$(null,"InvalidIdentifier",null);return e.value.toLowerCase()}const s=Object.freeze({aborted:!1})},53177:(e,t,n)=>{n.d(t,{A:()=>f});var r,i=n(31635),s=n(4718),o=n(10107),l=(n(44208),n(53966),n(93223)),a=n(64108),u=n(39357),c=n(76357);let f=class extends c.A{static{r=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some(e=>(String(e.code)===n&&(t=e.name),!!t))}return t}clone(){return new r({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,i.Cg)([(0,o.MZ)({type:[u.H],json:{write:{isRequired:!0}}})],f.prototype,"codedValues",void 0),(0,i.Cg)([(0,l.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=r=(0,i.Cg)([(0,a.$)("esri.layers.support.CodedValueDomain")],f)},62791:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(31635),i=n(25482),s=n(10107),o=n(64108),l=n(24097),a=n(67090);let u=class extends i.o{constructor(e){super(e),this.to=null,this.contents=null,this.portalUrl="https://www.arcgis.com",this.translator="esri",this.from=null,this.apiKey=null,this.requestSource=null}};(0,r.Cg)([(0,s.MZ)({type:[String],json:{write:!0}})],u.prototype,"to",void 0),(0,r.Cg)([(0,s.MZ)({type:[a.A],json:{write:!0}})],u.prototype,"contents",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"portalUrl",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0,default:"esri"}})],u.prototype,"translator",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"from",void 0),(0,r.Cg)([(0,s.MZ)(l.K)],u.prototype,"apiKey",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"x-esri-request-source"}})],u.prototype,"requestSource",void 0),u=(0,r.Cg)([(0,o.$)("esri.rest.support.TranslateParameters")],u)},66395:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(66131),i=n(6800),s=n(85935),o=n(78878),l=n(91075),a=n(54218);function u(e,t,n=!1,r=!1){if(null==e)return null;if((0,a.Et)(e)||(0,a.Lm)(e)||(0,a.Kg)(e)||(0,o.e)(e)||(0,o.f)(e)||(0,o.g)(e))return e;if((0,a.cy)(e)){const i=[];for(const s of e)i.push(u(s,t,n,r));return i}if(r&&(0,o.h)(e))return e;const i=new c;i.immutable=!1;for(const[s,o]of Object.entries(e))void 0!==o&&i.setField(s,u(o,t,n,r));return i.immutable=n,i}class c{constructor(e){this.declaredClass="esri.arcade.Dictionary",this.plain=!1,this.immutable=!0,e instanceof c?this.attributes=e.attributes:null==e?this.attributes=Object.create(null):null!=Object.getPrototypeOf(e)?this.attributes={__proto__:null,...e}:this.attributes=e}static containerEntry(e,t){return new c({__proto__:null,key:e,value:t})}static textFormatting(){const e=new c({__proto__:null,newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});return e.immutable=!1,e}field(e){const t=e.toLowerCase(),n=this.attributes[e];if(void 0!==n)return n;for(const e in this.attributes)if(e.toLowerCase()===t)return this.attributes[e];throw new s.D$(null,"FieldNotFound",null,{key:e})}setField(e,t){if(this.immutable)throw new s.D$(null,"Immutable",null);if((0,o.i)(t))throw new s.D$(null,"NoFunctionInDictionary",null);const n=e.toLowerCase();if(t instanceof Date&&(t=r.lY.dateJSToArcadeDate(t)),void 0===this.attributes[e]){for(const e in this.attributes)if(e.toLowerCase()===n)return void(this.attributes[e]=t);this.attributes[e]=t}else this.attributes[e]=t}eraseField(e){if(this.immutable)throw new s.D$(null,"Immutable",null);if(e in this.attributes)return void delete this.attributes[e];const t=e.toLowerCase();for(const e in this.attributes)if(e.toLowerCase()===t)return void delete this.attributes[e]}hasField(e){const t=e.toLowerCase();if(void 0!==this.attributes[e])return!0;for(const e in this.attributes)if(e.toLowerCase()===t)return!0;return!1}keys(){let e=[];for(const t in this.attributes)e.push(t);return e=e.sort(),e}values(){return this.keys().map(e=>this.attributes[e])}entryCount(){return Object.keys(this.attributes).length}isEmpty(){return this.entryCount()<=0}castToText(e=!1){return(0,o.c)(this.attributes,{useNumbersForDates:e})}static convertObjectToArcadeDictionary(e,t,n=!0,r=!1){const i=new c;i.immutable=!1;for(const s in e){const o=e[s];void 0!==o&&i.setField(s.toString(),u(o,t,n,r))}return i.immutable=n,i}static convertJsonToArcade(e,t,n=!1,r=!1){return u(e,t,n,r)}castAsJson(e=null){const t=Object.create(null);for(let n in this.attributes){const r=this.attributes[n];void 0!==r&&(e?.keyTranslate&&(n=e.keyTranslate(n)),t[n]=(0,o.a)(r,e))}return t}async castDictionaryValueAsJsonAsync(e,t,n,r=null,i){const s=await(0,o.b)(n,r,i);return e[t]=s,s}async castAsJsonAsync(e=null,t=null){const n=Object.create(null),i=[];for(let s in this.attributes){const a=this.attributes[s];t?.keyTranslate&&(s=t.keyTranslate(s)),void 0!==a&&((0,o.d)(a)||a instanceof l.A||a instanceof r.lY?n[s]=(0,o.a)(a,t):i.push(this.castDictionaryValueAsJsonAsync(n,s,a,e,t)))}return i.length>0&&await Promise.all(i),n}deepClone(){const e=new c;e.immutable=!1;for(const t of this.keys())e.setField(t,(0,i.G)(this.field(t)));return e}}},67090:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(31635),i=n(25482),s=n(10107),o=n(64108);let l=class extends i.o{constructor(e){super(e)}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"key",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"text",void 0),l=(0,r.Cg)([(0,o.$)("esri.rest.support.TranslateContent")],l)},76357:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(31635),i=n(66552),s=n(25482),o=n(10107),l=(n(44208),n(53966),n(87811),n(93223)),a=n(64108);const u=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends s.o{constructor(e){super(e),this.name=null,this.type=null}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,r.Cg)([(0,l.e)(u),(0,o.MZ)({json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,a.$)("esri.layers.support.Domain")],c)},78878:(e,t,n)=>{n.d(t,{$:()=>ze,A:()=>k,B:()=>ee,C:()=>Ne,D:()=>me,E:()=>Fe,F:()=>xe,G:()=>_e,H:()=>ge,I:()=>O,J:()=>I,K:()=>Ve,L:()=>te,M:()=>Oe,N:()=>P,O:()=>he,P:()=>se,Q:()=>ne,R:()=>_,S:()=>Pe,T:()=>Ee,U:()=>Ge,V:()=>qe,W:()=>Re,X:()=>be,Y:()=>V,Z:()=>q,_:()=>M,a:()=>Me,a0:()=>fe,a1:()=>Ie,a2:()=>Ze,a3:()=>we,a4:()=>Se,a5:()=>Te,b:()=>Je,c:()=>ue,d:()=>j,e:()=>H,f:()=>X,g:()=>W,h:()=>G,i:()=>L,j:()=>U,k:()=>E,l:()=>Y,m:()=>z,n:()=>$,o:()=>B,p:()=>Ke,q:()=>R,r:()=>K,s:()=>ye,t:()=>de,u:()=>ce,v:()=>D,w:()=>le,x:()=>ae,y:()=>ke,z:()=>Z});var r=n(92602),i=n(70333),s=n(66131),o=n(99719),l=n(85935),a=n(92400),u=n(93818),c=n(7335),f=n(84939),d=n(33325),p=n(14607),y=n(44729),h=n(15032),g=n(5443),m=n(91075),b=n(48526),S=n(86738),T=n(39829),w=n(82799),v=n(16930),A=n(95108),N=n(65864),C=n(73444),F=n(54218),x=n(28097);class _{constructor(e){this.value=e}}class O{constructor(e){this.value=e}}const D={type:"VOID"},Z=Symbol("BREAK"),k=Symbol("CONTINUE");function M(e,t,n){return""===t||null==t||t===n||t===n?e:e=e.split(t).join(n)}function L(e){return e instanceof a.fF}function J(e){return e instanceof o.x}function j(e){return!!((0,F.Kg)(e)||(0,F.Et)(e)||H(e)||X(e)||W(e)||(0,F.Lm)(e)||null===e||e===D)}function I(e,t){return void 0===e?t:e}function P(e){return null==e?"":(0,F.cy)(e)||U(e)?"Array":H(e)?"Date":W(e)?"Time":X(e)?"DateOnly":(0,F.Kg)(e)?"String":(0,F.Lm)(e)?"Boolean":(0,F.Et)(e)?"Number":"esri.arcade.Attachment"===e?.declaredClass?"Attachment":"esri.arcade.Portal"===e?.declaredClass?"Portal":"esri.arcade.Dictionary"===e?.declaredClass?"Dictionary":B(e)?"KnowledgeGraph":e instanceof o.x?"Module":E(e)?"Feature":e instanceof S.A?"Point":e instanceof T.A?"Polygon":e instanceof w.A?"Polyline":e instanceof b.A?"Multipoint":e instanceof g.A?"Extent":L(e)?"Function":z(e)?"FeatureSet":Y(e)?"FeatureSetCollection":V(e)?"Voxel":q(e)?"Pixel":e===D?"":"number"==typeof e&&isNaN(e)?"Number":"Unrecognized Type"}function R(e){return e===D}function G(e){return e instanceof m.A}function E(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function V(e){return"esri.arcade.Voxel"===e?.arcadeDeclaredClass}function q(e){return"esri.arcade.Pixel"===e?.arcadeDeclaredClass}function z(e){return"esri.arcade.featureset.support.FeatureSet"===e?.declaredRootClass}function $(e){return"esri.arcade.Dictionary"===e?.declaredClass}function K(e){return $(e)||E(e)||V(e)||q(e)}function Y(e){return"esri.arcade.featureSetCollection"===e?.declaredRootClass}function B(e){return"esri.rest.knowledgeGraph.KnowledgeGraph"===e?.declaredClass}function U(e){return e instanceof u.A}function H(e){return e instanceof s.lY}function X(e){return e instanceof y.n}function W(e){return e instanceof h.k}function Q(e){return null!=e&&"object"==typeof e}function ee(e,t,n,r,i){if(e.length<t||e.length>n)throw new l.D$(r,"WrongNumberOfParameters",i)}function te(e){return null==e||R(e)||""===e}function ne(e){return e<0?-Math.round(-e):Math.round(e)}function re(e,t){return isNaN(e)||null==t||""===t?e.toString():(t=M(t,"‰",""),t=M(t,"¤",""),(0,p.GP)(e,{pattern:t}))}function ie(e,t){return null==t||""===t?e.toISOString(!0):e.toFormat(se(t),{locale:(0,C.JK)(),numberingSystem:"latn"})}function se(e,t=!1){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let n="";const r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|Z{1,5}|.)/g;for(const i of e.match(r)||[])switch(i){case"D":n+="d";break;case"DD":n+="dd";break;case"DDD":n+="o";break;case"d":n+="c";break;case"ddd":n+="ccc";break;case"dddd":n+="cccc";break;case"M":n+="L";break;case"MM":n+="LL";break;case"MMM":n+="LLL";break;case"MMMM":n+="LLLL";break;case"YY":n+="yy";break;case"Y":case"YYYY":n+="yyyy";break;case"Q":n+="q";break;case"Z":n+="Z";break;case"ZZ":n+="ZZ";break;case"ZZZ":n+="ZZZ";break;case"ZZZZ":n+=t?"[ZZZZ]":"ZZZZ";break;case"ZZZZZ":n+=t?"[ZZZZZ]":"ZZZZZ";break;case"S":n+="'S'";break;case"SS":n+="'SS'";break;case"SSS":n+="u";break;case"A":case"a":n+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":n+=i;break;default:i.length>=2&&i.startsWith("[")&&i.endsWith("]")?n+=`'${i.slice(1,-1)}'`:n+=`'${i}'`}return n}function oe(e,t,n){switch(n){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function le(e,t,n){if(null===e){if(null===t||t===D)return oe(null,null,n);if((0,F.Et)(t))return oe(0,t,n);if((0,F.Kg)(t))return oe(0,ye(t),n);if((0,F.Lm)(t))return oe(0,ye(t),n);if(H(t))return oe(0,t.toNumber(),n);if(W(t))return oe(e,t.toNumber(),n);if(X(t))return oe(e,t.toNumber(),n)}if(e===D){if(null===t||t===D)return oe(null,null,n);if((0,F.Et)(t))return oe(0,t,n);if((0,F.Kg)(t))return oe(0,ye(t),n);if((0,F.Lm)(t))return oe(0,ye(t),n);if(H(t))return oe(0,t.toNumber(),n);if(W(t))return oe(e,t.toNumber(),n);if(X(t))return oe(e,t.toNumber(),n)}else if((0,F.Et)(e)){if((0,F.Et)(t))return oe(e,t,n);if((0,F.Lm)(t))return oe(e,ye(t),n);if(null===t||t===D)return oe(e,0,n);if((0,F.Kg)(t))return oe(e,ye(t),n);if(H(t))return oe(e,t.toNumber(),n);if(W(t))return oe(e,t.toNumber(),n);if(X(t))return oe(e,t.toNumber(),n)}else if((0,F.Kg)(e)){if((0,F.Kg)(t))return oe(ce(e),ce(t),n);if(H(t))return oe(ye(e),t.toNumber(),n);if(W(t))return oe(ye(e),t.toNumber(),n);if(X(t))return oe(ye(e),t.toNumber(),n);if((0,F.Et)(t))return oe(ye(e),t,n);if(null===t||t===D)return oe(ye(e),0,n);if((0,F.Lm)(t))return oe(ye(e),ye(t),n)}else if(H(e)){if(H(t))return e.timeZone!==t.timeZone&&(e.isUnknownTimeZone?e=s.lY.arcadeDateAndZoneToArcadeDate(e,t.timeZone):t.isUnknownTimeZone&&(t=s.lY.arcadeDateAndZoneToArcadeDate(t,e.timeZone))),oe(e.toNumber(),t.toNumber(),n);if(null===t||t===D)return oe(e.toNumber(),0,n);if((0,F.Et)(t))return oe(e.toNumber(),t,n);if((0,F.Lm)(t))return oe(e.toNumber(),ye(t),n);if((0,F.Kg)(t))return oe(e.toNumber(),ye(t),n);if(W(t))throw new l.D$(null,"CannotCompareDateAndTime",null);if(X(t))return oe(e.toNumber(),t.toNumber(),n)}else if((0,F.Lm)(e)){if((0,F.Lm)(t))return oe(e,t,n);if((0,F.Et)(t))return oe(ye(e),ye(t),n);if(H(t))return oe(ye(e),t.toNumber(),n);if(W(t))return oe(ye(e),t.toNumber(),n);if(X(t))return oe(ye(e),t.toNumber(),n);if(null===t||t===D)return oe(ye(e),0,n);if((0,F.Kg)(t))return oe(ye(e),ye(t),n)}else if(X(e)){if(H(t))return oe(e.toNumber(),t.toNumber(),n);if(null===t||t===D)return oe(e.toNumber(),0,n);if((0,F.Et)(t))return oe(e.toNumber(),t,n);if((0,F.Lm)(t))return oe(e.toNumber(),ye(t),n);if((0,F.Kg)(t))return oe(e.toNumber(),ye(t),n);if(W(t))throw new l.D$(null,"CannotCompareDateAndTime",null);if(X(t))return oe(e.toNumber(),t.toNumber(),n)}else if(W(e)){if(H(t))throw new l.D$(null,"CannotCompareDateAndTime",null);if(null===t||t===D)return oe(e.toNumber(),0,n);if((0,F.Et)(t))return oe(e.toNumber(),t,n);if((0,F.Lm)(t))return oe(e.toNumber(),ye(t),n);if((0,F.Kg)(t))return oe(e.toNumber(),ye(t),n);if(W(t))return oe(e.toNumber(),t.toNumber(),n);if(X(t))throw new l.D$(null,"CannotCompareDateAndTime",null)}return!!ae(e,t)&&("<="===n||">="===n)}function ae(e,t){if(e===t)return!0;if(null===e&&t===D||null===t&&e===D)return!0;if(H(e)&&H(t))return e.equals(t);if(W(e)&&W(t))return e.equals(t);if(X(e)&&X(t))return e.equals(t);if(e instanceof c.A)return e.equalityTest(t);if(e instanceof f.A)return e.equalityTest(t);if(e instanceof S.A&&t instanceof S.A){const n=e.cache._arcadeCacheId,r=t.cache._arcadeCacheId;if(null!=n)return n===r}if(Q(e)&&Q(t)){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function ue(e,{useNumbersForDates:t}){let n="";for(const r in e){""!==n&&(n+=",");const i=e[r];null==i?n+=JSON.stringify(r)+":null":(0,F.Lm)(i)||(0,F.Et)(i)||(0,F.Kg)(i)?n+=JSON.stringify(r)+":"+JSON.stringify(i):G(i)?n+=JSON.stringify(r)+":"+de(i):W(i)||X(i)?n+=`${JSON.stringify(r)}:${JSON.stringify(i.toString())}`:U(i)||Array.isArray(i)?n+=JSON.stringify(r)+":"+de(i,null,t):H(i)?n+=t?JSON.stringify(r)+":"+JSON.stringify(i.getTime()):JSON.stringify(r)+":"+i.stringify():null!==i&&"object"==typeof i&&"castToText"in i&&(n+=JSON.stringify(r)+":"+i.castToText(t))}return"{"+n+"}"}function ce(e,t){if((0,F.Kg)(e))return e;if(null===e)return"";if((0,F.Et)(e))return re(e,t);if((0,F.Lm)(e))return e.toString();if(H(e))return ie(e,t);if(W(e))return e.toFormat(t);if(X(e))return e.toFormat(t);if(e instanceof m.A)return JSON.stringify(e.toJSON());if((0,F.cy)(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=pe(e[n]);return"["+t.join(",")+"]"}if(e instanceof u.A){const t=[];for(let n=0;n<e.length();n++)t[n]=pe(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText():L(e)?"object, Function":e===D?"":J(e)?"object, Module":""}function fe(e){const t=[];if(e instanceof u.A){for(let n=0;n<e.length();n++)t[n]=ye(e.get(n));return t}if(!(0,F.cy)(e))return null;for(let n=0;n<e.length;n++)t[n]=ye(e[n]);return t}function de(e,t,n=!1){if((0,F.Kg)(e))return e;if(null===e)return"";if((0,F.Et)(e))return re(e,t);if((0,F.Lm)(e))return e.toString();if(H(e))return ie(e,t);if(W(e))return e.toFormat(t);if(X(e))return e.toFormat(t);if(e instanceof m.A)return e instanceof g.A?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+Ae(e.spatialReference)+"}":Ae(e.toJSON(),(e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0);if((0,F.cy)(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=pe(e[r],n);return"["+t.join(",")+"]"}if(e instanceof u.A){const t=[];for(let r=0;r<e.length();r++)t[r]=pe(e.get(r),n);return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&"castToText"in e?e.castToText(n):L(e)?"object, Function":e===D?"":J(e)?"object, Module":""}function pe(e,t=!1){if(null===e)return"null";if((0,F.Lm)(e)||(0,F.Kg)(e))return JSON.stringify(e);if((0,F.Et)(e))return e.toString();if(e instanceof m.A)return de(e,null,t);if(e instanceof u.A)return de(e,null,t);if(Array.isArray(e))return de(e,null,t);if(H(e))return t?JSON.stringify(e.getTime()):JSON.stringify(ie(e,""));if(W(e))return JSON.stringify(e.toString());if(X(e))return JSON.stringify(e.toString());if(null!==e&&"object"==typeof e){if("castToText"in e)return e.castToText(t)}else if(e===D)return"null";return"null"}function ye(e,t){return(0,F.Et)(e)?e:null===e||""===e?0:H(e)||X(e)||W(e)?NaN:(0,F.Lm)(e)?e?1:0:(0,F.cy)(e)||""===e||void 0===e?NaN:void 0!==t&&(0,F.Kg)(e)?(t=M(t,"‰",""),t=M(t,"¤",""),(0,p.qg)(e,{pattern:t})):e===D?0:Number(e)}function he(e,t){if(H(e))return e;if((0,F.Kg)(e)){const n=function(e,t){const n=/ (\d\d)/,r=(0,s.mT)(t);let i=x.c9.fromISO(e,{zone:r});return i.isValid||n.test(e)&&(e=e.replace(n,"T$1"),i=x.c9.fromISO(e,{zone:t}),i.isValid)?i:null}(e,t);if(n)return s.lY.dateTimeToArcadeDate(n)}return null}function ge(e){return(0,F.Lm)(e)?e:(0,F.Kg)(e)?"true"===(e=e.toLowerCase()):!!(0,F.Et)(e)&&0!==e&&!isNaN(e)}function me(e,t){return null==e?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function be(e){if(null===e)return null;if(e instanceof S.A)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof T.A){if(0===(e.curveRings??e.rings).length)return null;for(const t of e.curveRings??e.rings)if(t.length>0)return e;return null}if(e instanceof w.A){if(0===(e.curvePaths??e.paths).length)return null;for(const t of e.curvePaths??e.paths)if(t.length>0)return e;return null}return e instanceof b.A?0===e.points.length?null:e:e instanceof g.A?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function Se(e,t){if(!e)return t;if(!e.domain)return t;let n=null,r=null;if(H(t))n=t.toNumber();else if(X(t))n=t.toString();else if(W(t))n=t.toStorageString();else if("string"===e.field.type||"esriFieldTypeString"===e.field.type)n=ce(t);else{if(null==t)return null;if(""===t)return t;n=ye(t)}for(let t=0;t<e.domain.codedValues.length;t++){const i=e.domain.codedValues[t];i.code===n&&(r=i)}return null===r?ce(t):r.name}function Te(e,t){if(!e)return t;if(!e.domain)return t;let n=null;const r=ce(t);for(let t=0;t<e.domain.codedValues.length;t++){const i=e.domain.codedValues[t];i.name===r&&(n=i)}return null===n?t:n.code}function we(e,t,n=null,r=null){if(!t)return null;if(!t.fields)return null;let i,s,o=null;for(let n=0;n<t.fields.length;n++){const r=t.fields[n];r.name.toLowerCase()===e.toString().toLowerCase()&&(o=r)}if(null===o)throw new l.D$(null,"FieldNotFound",null,{key:e});let a=t.typeIdField,u="id",c=t.types;if(t.subtypeField&&(a=t.subtypeField,u="code",c=t.subtypes??[]),null===r&&n&&a)r=n.hasField(a)?n.field(a):null;else if(a&&null!==r){let e=!1;for(const t of c||[])if(r===t[u]){e=!0;break}if(!e)for(const t of c||[])if(r===t.name){r=t[u],e=!0;break}e||(r=null,n&&a&&(r=n.hasField(a)?n.field(a):null))}return null!=r&&c.some(e=>e[u]===r&&(i=e.domains?.[o.name],i&&"inherited"===i.type&&(i=ve(o.name,t),s=!0),!0)),s||i||(i=ve(e,t)),{field:o,domain:i}}function ve(e,t){let n;return t.fields.some(t=>(t.name.toLowerCase()===e.toLowerCase()&&(n=t.domain),!!n)),n}function Ae(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},s={key:n,value:e[n]};return i(r,s)}});var i;const s=[];return function e(t){if(t?.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,o;if(Array.isArray(t)){for(o="[",i=0;i<t.length;i++)i&&(o+=","),o+=e(t[i])||"null";return o+"]"}if(null===t)return"null";if(s.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const l=s.push(t)-1,a=Object.keys(t).sort(r?.(t));for(o="",i=0;i<a.length;i++){const n=a[i],r=e(t[n]);r&&(o&&(o+=","),o+=JSON.stringify(n)+":"+r)}return s.splice(l,1),"{"+o+"}"}(e)}function Ne(e){if(null===e)return null;const t=[];for(const n of e)E(n)?t.push(n.geometry()):t.push(n);return t}function Ce(e,t){if(!(t instanceof S.A))throw new l.D$(null,"InvalidParameter",null);e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function Fe(e,t){if((0,F.cy)(e)||U(e)){let n=!1,r=!1,i=[],s=t;if((0,F.cy)(e)){for(const t of e)Ce(i,t);i.length>0&&(s=e[0].spatialReference,n=e[0].hasZ,r=e[0].hasM)}else if(e instanceof f.A)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,s=e.get(0).spatialReference);else{if(!U(e))throw new l.D$(null,"InvalidParameter",null);for(const t of e.toArray())Ce(i,t);i.length>0&&(s=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:((0,A.$3)(i)||(i=i.slice().reverse()),new T.A({rings:[i],spatialReference:s,hasZ:n,hasM:r}))}return e}function xe(e,t){if((0,F.cy)(e)||U(e)){let n=!1,r=!1,i=[],s=t;if((0,F.cy)(e)){for(const t of e)Ce(i,t);i.length>0&&(s=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof f.A)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,s=e.get(0).spatialReference);else if(U(e)){for(const t of e.toArray())Ce(i,t);i.length>0&&(s=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new w.A({paths:[i],spatialReference:s,hasZ:n,hasM:r})}return e}function _e(e,t){if((0,F.cy)(e)||U(e)){let n=!1,r=!1,i=[],s=t;if((0,F.cy)(e)){for(const t of e)Ce(i,t);i.length>0&&(s=e[0].spatialReference,n=!0===e[0].hasZ,r=!0===e[0].hasM)}else if(e instanceof f.A)i=e._elements,i.length>0&&(n=e._hasZ,r=e._hasM,s=e.get(0).spatialReference);else if(U(e)){for(const t of e.toArray())Ce(i,t);i.length>0&&(s=e.get(0).spatialReference,n=!0===e.get(0).hasZ,r=!0===e.get(0).hasM)}return 0===i.length?null:new b.A({points:i,spatialReference:s,hasZ:n,hasM:r})}return e}function Oe(e,t=!0){if(null==e)return[];if((0,F.cy)(e)){const n=[];for(const r of e){const e=ce(r);(t||""!==e)&&n.push(e)}return n}if(U(e)){const n=[];for(let r=0;r<e.length();r++){const i=ce(e.get(r));(t||""!==i)&&n.push(i)}return n}if(j(e)){const n=ce(e);if(t||""!==n)return[n]}return[]}let De=0;function Ze(){return De++,De%100==0?(De=0,new Promise(e=>{setTimeout(()=>{e()},0)})):Promise.resolve()}function ke(e,t,n){switch(n){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Me(e,t=null){return null==e?null:(0,F.Lm)(e)||(0,F.Et)(e)||(0,F.Kg)(e)?e:e instanceof m.A?!0===t?.keepGeometryType?e:e.toJSON():e instanceof u.A?e.toArray().map(e=>Me(e,t)):Array.isArray(e)?e.map(e=>Me(e,t)):(0,F.$P)(e)?e:H(e)?e.toJSDate():W(e)?e.toString():X(e)?e.toJSDate():null!==e&&"object"==typeof e&&void 0!==e.castAsJson?e.castAsJson(t):null}async function Le(e,t,n,r,i){const s=await Je(e,t,n);i[r]=s}async function Je(e,t=null,n=null){if(e instanceof u.A&&(e=e.toArray()),null==e)return null;if(j(e)||e instanceof m.A||(0,F.$P)(e)||H(e))return Me(e,n);if(Array.isArray(e)){const r=[],i=[];for(const s of e)null===s||j(s)||s instanceof m.A||(0,F.$P)(s)||H(s)?i.push(Me(s,n)):(i.push(null),r.push(Le(s,t,n,i.length-1,i)));return r.length>0&&await Promise.all(r),i}return null!==e&&"object"==typeof e&&void 0!==e.castAsJsonAsync?e.castAsJsonAsync(t,n):null}function je(e){return Ie(e)?e.parent:e}function Ie(e){return e&&"declaredClass"in e&&"esri.layers.support.SubtypeSublayer"===e.declaredClass}function Pe(e,t,n){const r=je(e.fullSchema());return null===r?null:r.fields?we(t,r,e,n):null}function Re(e){const t=je(e.fullSchema());return null===t?null:t.fields?t.subtypeField?{subtypeField:t.subtypeField,subtypes:t.subtypes?t.subtypes.map(e=>({name:e.name,code:e.code})):[]}:t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map(e=>({name:e.name,code:e.id})):[]}:null:null}function Ge(e,t,n,r){const i=je(e.fullSchema());if(null===i)return null;if(!i.fields)return null;const s=we(t,i,e,r);if(void 0===n)try{n=e.field(t)}catch(e){return null}return Se(s,n)}function Ee(e,t,n,r){const i=je(e.fullSchema());if(null===i)return null;if(!i.fields)return null;if(void 0===n){try{n=e.field(t)}catch(e){return null}return n}return Te(we(t,i,e,r),n)}function Ve(e){return e?.timeZone??"system"}function qe(e){const t=je(e.fullSchema());if(null===t)return null;if(!t.fields)return null;const n=[];for(const e of t.fields)n.push((0,d.nE)(e));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField??"",geometryType:void 0===d.yT[t.geometryType]?"":d.yT[t.geometryType],fields:n}}function ze(e,t){const n=s.lY.systemTimeZoneCanonicalName;return"system"===e&&(e=n),{version:$e,engineVersion:i.rE,timeZone:e,userTimeZone:n,spatialReference:t instanceof v.A?t.toJSON():t,application:r.A.applicationName??"",engine:"web",locale:(0,C.JK)()}}const $e="1.34",Ke=Object.freeze(Object.defineProperty({__proto__:null,ImplicitResult:O,ReturnResult:_,absRound:ne,arcadeVersion:$e,autoCastArrayOfPointsToMultiPoint:_e,autoCastArrayOfPointsToPolygon:Fe,autoCastArrayOfPointsToPolyline:xe,autoCastFeatureToGeometry:Ne,binaryOperator:ke,breakResult:Z,castAsJson:Me,castAsJsonAsync:Je,castRecordToText:ue,continueResult:k,defaultExecutingContext:ze,defaultTimeZone:Ve,defaultUndefined:I,equalityTest:ae,featureDomainCodeLookup:Ee,featureDomainValueLookup:Ge,featureFullDomain:Pe,featureSchema:qe,featureSubtypes:Re,fixNullGeometry:be,fixSpatialReference:me,formatDate:ie,formatNumber:re,getDomain:we,getDomainCode:Te,getDomainValue:Se,getType:P,greaterThanLessThan:le,isArray:F.cy,isBoolean:F.Lm,isDate:H,isDateOnly:X,isDictionary:$,isDictionaryLike:K,isEmpty:te,isFeature:E,isFeatureSet:z,isFeatureSetCollection:Y,isFunctionParameter:L,isGeometry:G,isGraphic:F.DU,isImmutableArray:U,isInteger:F.Fq,isJsDate:F.$P,isKnowledgeGraph:B,isModule:J,isNumber:F.Et,isObject:Q,isPixel:q,isSimpleType:j,isString:F.Kg,isSubtypeGrouplayer:function(e){return e&&"declaredClass"in e&&"esri.layers.SubtypeGroupLayer"===e.declaredClass},isSubtypeSublayer:Ie,isTime:W,isVoid:R,isVoxel:V,multiReplace:M,parseGeometryFromJson:function(e,t){const n=JSON.parse(e);return n&&!n.spatialReference&&(n.spatialReference=t),(0,N.rS)(n)},pcCheck:ee,stableStringify:Ae,standardiseDateFormat:se,tick:Ze,toBoolean:ge,toDate:he,toNumber:ye,toNumberArray:fe,toString:ce,toStringArray:Oe,toStringExplicit:de,voidOperation:D},Symbol.toStringTag,{value:"Module"}))},80451:(e,t,n)=>{n.d(t,{rS:()=>y,gK:()=>p}),n(44208);var r,i=n(53177),s=n(76357),o=n(31635),l=(n(53966),n(87811),n(49186),n(93223)),a=n(64108);let u=class extends s.A{static{r=this}constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=r=(0,o.Cg)([(0,a.$)("esri.layers.support.InheritedDomain")],u);var c,f=n(10107);let d=class extends s.A{static{c=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o.Cg)([(0,f.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]},isRequired:!0}}})],d.prototype,"maxValue",void 0),(0,o.Cg)([(0,f.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]},isRequired:!0}}})],d.prototype,"minValue",void 0),(0,o.Cg)([(0,l.e)({range:"range"})],d.prototype,"type",void 0),d=c=(0,o.Cg)([(0,a.$)("esri.layers.support.RangeDomain")],d);const p={key:"type",base:s.A,typeMap:{range:d,"coded-value":i.A,inherited:u}};function y(e){if(!e?.type)return null;switch(e.type){case"range":return d.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},84939:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(93818),i=n(86738);class s extends r.A{constructor(e,t,n,r,i,s){super(e),this._lazyPt=[],this._hasZ=!1,this._hasM=!1,this._spRef=t,this._hasZ=n,this._hasM=r,this._cacheId=i,this._partId=s}get(e){if(void 0===this._lazyPt[e]){const t=this._elements[e];if(void 0===t)return;const n=new i.A(t[0],t[1],this._spRef);this._hasZ&&(n.z=t[2]),this._hasM&&(n.m=this._hasZ?t[3]:t[2]),n.cache._arcadeCacheId=this._cacheId.toString()+"-"+this._partId.toString()+"-"+e.toString(),this._lazyPt[e]=n}return this._lazyPt[e]}equalityTest(e){return e===this||null!==e&&e instanceof s!=0&&e.getUniqueHash()===this.getUniqueHash()}getUniqueHash(){return this._cacheId.toString()+"-"+this._partId.toString()}}},92400:(e,t,n)=>{n.d(t,{CU:()=>l,UQ:()=>o,fF:()=>i,o6:()=>s});var r=n(74887);class i{constructor(){}}function s(e,t,n){if(e instanceof i&&!(e instanceof l)){const r=new l;return r.fn=e,r.parameterEvaluator=n,r.context=t,r}return e}class o extends i{constructor(e){super(),this.fn=e}createFunction(e){return(...t)=>this.fn(e,{preparsed:!0,arguments:t})}call(e,t){return this.fn(e,t)}marshalledCall(e,t,n,o){return o(e,t,(t,a,u)=>{u=u.map(t=>t instanceof i&&!(t instanceof l)?s(t,e,o):t);const c=this.call(n,{args:u});return(0,r.$X)(c)?c.then(e=>s(e,n,o)):c})}}class l extends i{constructor(){super(...arguments),this.fn=null,this.context=null}createFunction(e){return this.fn.createFunction(this.context)}call(e,t){return this.fn.marshalledCall(e,t,this.context,this.parameterEvaluator)}marshalledCall(e,t,n){return this.fn.marshalledCall(e,t,this.context,this.parameterEvaluator)}}},93818:(e,t,n)=>{n.d(t,{A:()=>r});class r{constructor(e=[]){this._elements=e}length(){return this._elements.length}get(e){return this._elements[e]}toArray(){return this.slice()}slice(e=0,t=this.length()){const n=[];for(let r=e;r<t;r++)n.push(this.get(r));return n}}},98453:(e,t,n)=>{n.d(t,{m:()=>r});const r=new(n(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},99719:(e,t,n)=>{n.d(t,{x:()=>r});class r{}}}]);