@arcgis/core 5.2.0-next.16 → 5.2.0-next.18

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 (99) hide show
  1. package/arcgisGlobal.d.ts +3 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/00bcb04934972179b9ca.js +1 -0
  4. package/assets/esri/core/workers/chunks/073ee52705ea326fecfb.js +1 -0
  5. package/assets/esri/core/workers/chunks/{282930645ce525d5bc92.js → 0e81b6aa64d5491870b2.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{4162a2bb774e6ba2c0db.js → 0fb685f385e91d0f0601.js} +1 -1
  7. package/assets/esri/core/workers/chunks/11d1af758e2140095b10.js +1 -0
  8. package/assets/esri/core/workers/chunks/{a8ef7acb6d3d1f45e14c.js → 29e6f4b19c3da9129439.js} +1 -1
  9. package/assets/esri/core/workers/chunks/31c4128b23968575feca.js +1 -0
  10. package/assets/esri/core/workers/chunks/35a508a9311689d8df52.js +1 -0
  11. package/assets/esri/core/workers/chunks/3a35779cae6a11cde51b.js +1 -0
  12. package/assets/esri/core/workers/chunks/3a526e1d18490b99332f.js +1 -0
  13. package/assets/esri/core/workers/chunks/3e89f487c5851c954d8b.js +1 -0
  14. package/assets/esri/core/workers/chunks/{cf9a132c4c37e62de3d7.js → 50c88e2545380800381f.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{a892b3be70f482bef0ba.js → 57a6572d440d2c62432b.js} +1 -1
  16. package/assets/esri/core/workers/chunks/6849282c4a5cd733779d.js +1 -0
  17. package/assets/esri/core/workers/chunks/{2b781de7b467c61849b2.js → 6a21a22b08f968fa8d60.js} +1 -1
  18. package/assets/esri/core/workers/chunks/8104ac2eee69d79ada86.js +1 -0
  19. package/assets/esri/core/workers/chunks/{1c689bb502657b1f173b.js → 9d59cc5c0a63a4e41d99.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{91c0de3950991d81b7f2.js → 9de673a04c70bd47047e.js} +1 -1
  21. package/assets/esri/core/workers/chunks/a195f569eada3a8736be.js +1 -0
  22. package/assets/esri/core/workers/chunks/{9da1a514e042eb642d35.js → a32651777e4f07df5b6a.js} +1 -1
  23. package/assets/esri/core/workers/chunks/a3c5b754a6fa0f4250bf.js +1 -0
  24. package/assets/esri/core/workers/chunks/a59a1fdcd37a875f179b.js +1 -0
  25. package/assets/esri/core/workers/chunks/{ac7ecd90330090c90005.js → aeeee92b86554962711e.js} +1 -1
  26. package/assets/esri/core/workers/chunks/b0e4af49fc968b0a910f.js +1 -0
  27. package/assets/esri/core/workers/chunks/b466af9019f10420115e.js +1 -0
  28. package/assets/esri/core/workers/chunks/bb9232d9f63ec0c32447.js +1 -0
  29. package/assets/esri/core/workers/chunks/bf9eca7dd107bdb06614.js +1 -0
  30. package/assets/esri/core/workers/chunks/cbe8adc100582e746a8c.js +1 -0
  31. package/assets/esri/core/workers/chunks/{a1509e2e7809b6754b4f.js → d523af1db620b5381c99.js} +1 -1
  32. package/assets/esri/core/workers/chunks/d5a0e3a73df827dc7b06.js +1 -0
  33. package/assets/esri/core/workers/chunks/d670e134348954ce465d.js +1 -0
  34. package/assets/esri/core/workers/chunks/e3ea4b7217df16592def.js +1 -0
  35. package/assets/esri/core/workers/chunks/{c538435216d253f7702e.js → f23351a04643c464be84.js} +1 -1
  36. package/assets/esri/core/workers/chunks/f3d331da3c61af5c5a2f.js +1 -0
  37. package/assets/esri/core/workers/chunks/{68b77b36daae2b4b4237.js → f3fe865506fd7428eb6d.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{a4d918b47cd4ee0e1666.js → f8cfd0045d06aa24beec.js} +1 -1
  39. package/config.js +1 -1
  40. package/kernel.js +1 -1
  41. package/layers/graphics/sources/MemorySource.js +1 -1
  42. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  43. package/networks/CircuitManager.d.ts +247 -1
  44. package/networks/UnitIdentifierManager.d.ts +40 -3
  45. package/networks/UtilityNetwork.d.ts +0 -11
  46. package/networks/support/Circuit.d.ts +0 -1
  47. package/networks/support/CircuitLocation.d.ts +0 -1
  48. package/networks/support/CircuitPath.d.ts +0 -1
  49. package/networks/support/CircuitPathConnectivityElement.d.ts +0 -1
  50. package/networks/support/CircuitSection.d.ts +0 -1
  51. package/networks/support/NamedTraceConfiguration.d.ts +1 -7
  52. package/networks/support/Subcircuit.d.ts +0 -1
  53. package/networks/support/UNTraceConfiguration.d.ts +0 -4
  54. package/networks/support/jsonTypes.d.ts +1 -1
  55. package/networks/support/typeUtils.d.ts +10 -1
  56. package/networks/support/typeUtils.js +1 -1
  57. package/package.json +1 -1
  58. package/rest/networks/circuits/support/CircuitTraceResult.d.ts +0 -1
  59. package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +0 -1
  60. package/rest/networks/support/TelecomNetworkElement.d.ts +0 -1
  61. package/rest/networks/support/TraceLocation.d.ts +1 -11
  62. package/rest/networks/support/TraceParameters.d.ts +1 -7
  63. package/rest/networks/support/TraceResult.d.ts +0 -2
  64. package/rest/networks/support/TraverseAssociationsParameters.d.ts +69 -0
  65. package/rest/networks/support/TraverseAssociationsParameters.js +2 -0
  66. package/rest/networks/support/TraverseAssociationsResult.d.ts +39 -0
  67. package/rest/networks/support/TraverseAssociationsResult.js +2 -0
  68. package/rest/networks/traverseAssociations.d.ts +21 -0
  69. package/rest/networks/traverseAssociations.js +2 -0
  70. package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +0 -1
  71. package/support/revision.js +1 -1
  72. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  73. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  74. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  75. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  76. package/views/draw/DrawTool.js +1 -1
  77. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +3 -2
  78. package/assets/esri/core/workers/chunks/01ba5319cac3e0f14205.js +0 -1
  79. package/assets/esri/core/workers/chunks/05e1f1628a3726eca03d.js +0 -1
  80. package/assets/esri/core/workers/chunks/1d38b2fcd85ac9ebd7c6.js +0 -1
  81. package/assets/esri/core/workers/chunks/1effde6a39ef0d4af525.js +0 -1
  82. package/assets/esri/core/workers/chunks/1ff57bf19f021f5fd246.js +0 -1
  83. package/assets/esri/core/workers/chunks/3dc6e9494af16f7b8009.js +0 -1
  84. package/assets/esri/core/workers/chunks/3ecb906322a6a5c8c93b.js +0 -1
  85. package/assets/esri/core/workers/chunks/3f67162456a1f02190fa.js +0 -1
  86. package/assets/esri/core/workers/chunks/4e4419282c4bf7ee4678.js +0 -1
  87. package/assets/esri/core/workers/chunks/609edb4da427ec37bcf7.js +0 -1
  88. package/assets/esri/core/workers/chunks/6f5a82388a5eb5fcf1b7.js +0 -1
  89. package/assets/esri/core/workers/chunks/7c61b18e43c789aaecc6.js +0 -1
  90. package/assets/esri/core/workers/chunks/8dcb3e77f76d8396706b.js +0 -1
  91. package/assets/esri/core/workers/chunks/a3195521a83565c7c2d3.js +0 -1
  92. package/assets/esri/core/workers/chunks/b0212df1fe8d9448f3d6.js +0 -1
  93. package/assets/esri/core/workers/chunks/b590402170ae289290d7.js +0 -1
  94. package/assets/esri/core/workers/chunks/bfa6f4c08e7571bb1f37.js +0 -1
  95. package/assets/esri/core/workers/chunks/c5e172d3baf5414868f0.js +0 -1
  96. package/assets/esri/core/workers/chunks/cf41a66fb97c1076fb34.js +0 -1
  97. package/assets/esri/core/workers/chunks/f23e995320674b32e142.js +0 -1
  98. package/assets/esri/core/workers/chunks/f3fd40df92e59f7c687c.js +0 -1
  99. package/assets/esri/core/workers/chunks/fa1336b60278017d2525.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5391],{74379(e,t,i){i.d(t,{V:()=>r,t:()=>s});const r=Symbol("isImageryGraphicOrigin");function s(e){return!!e&&r in e}},87772(e,t,i){i.r(t),i.d(t,{default:()=>vi});var r,s=i(5482),n=i(37838),a=i(69540),o=i(53966),l=i(25728),u=i(17676),p=i(91429),c=i(55156),m=i(60950),d=i(89808),y=i(99959),h=i(74379);class g extends y.A{get[(r=h.V,m.ym)](){return this.layer}get[c.e](){return this.layer}get[d.Q](){return this.layer}constructor(e){super(),this[r]=!0,this.type="imagery",this.layer=e}get id(){return this.layer.id}}var f=i(4146),w=i(52106),v=i(11254),R=i(49186),C=i(4718),b=i(563),S=i(36708),x=i(84952),M=i(56507),I=i(62788),F=i(5443),A=i(39829),D=i(16930),P=i(21325),T=i(4366),j=i(5154),N=i(47520),O=i(34251),Z=i(10873),_=i(45617),V=i(25482),q=i(94778);const E={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var J=i(22796),G=i(67369),z=i(70274),L=i(48940);const $=new Set(["u1","u2","u4","u8","s8","u16","s16"]),U={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},B=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function K(e){return B.has(e.type)}function Q(e,t){if(!e||!t)return(0,C.o8)(e||t);const i=(0,C.o8)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),k(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(W(i.functionArguments).Raster=t);return i}function k(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&k(e[i].arguments,t))}function H(e){const t=(0,C.o8)(E[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=H(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=ie(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return e.outputPixelType&&t.function&&(t.function.pixelType=e.outputPixelType.toUpperCase()),t}function W(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?W(t.functionArguments):e}const X={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function Y(e,t){const i=$.has(t)?(0,q.hP)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function ee(e){if(null==e)return;const{fields:t}=e,i=t?.find(e=>e?.name&&"value"===e.name.toLowerCase());return i?.name}function te(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find(e=>"fill"===e.type)?.material?.color:e.symbol?.color}function ie(e){const t=[],i=[];return e.forEach(e=>{t.push(e[0]),i.push((0,G.vL)([...e.slice(1),255]))}),{type:"RasterColormap",values:t,colors:i}}var re=i(85675),se=i(13868),ne=i(43937);let ae=class extends V.o{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){const e=this.layer.renderer?.type;return this.requestRawData||"vector-field"===e||"flow"===e?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new re.A({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t,rasterInfo:i}=e;t&&"lerc"===this.format&&1===i?.bandCount&&i.colormap&&(t=function(e,t){const[i,r]=(0,q.hP)(t);return Q(new J.A({functionName:"Stretch",functionArguments:{StretchType:5,UseGamma:!1,Min:i,Max:r,Statistics:[[i,r,1,1]]}}),e)}(t,i.pixelType));const r=e.multidimensionalSubset?.areaOfInterest;return r&&(t=function(e,t){return Q(new J.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,r)),this.requestRawData||!e.isRenderedFormat||e.pixelFilter||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&K(r)?Q(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new J.A;r.functionName="Stretch";const s=X[z.u.toJSON(e.stretchType)],n="u8",a=e.customStatistics?.map(e=>[e.min,e.max,e.avg??0,e.stddev??1]),o={StretchType:s,Statistics:a,DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),s===X.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===X.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=n):s===X.minMax?r.outputPixelType=n:s===X.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new J.A;if(i)n.functionArguments={ColorRamp:(0,G.hf)(s)};else{const i=(0,G.hs)(s,!0);if(i)n.functionArguments={colorRampName:i};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach(e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm"),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,G.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new J.A({rasterFunctionDefinition:H(n)}):n}return i?new J.A({rasterFunctionDefinition:H(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],a=1e-4,{pixelType:o,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=ee(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach((t,i)=>{const r=t.symbol?.color;let s;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach(a=>{null!=t.minValue&&null!=t.maxValue&&(s=a.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([a.attributes[p],r.r,r.g,r.b]))})});const i=o?Y(n,o):n,r=new J.A;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new J.A({rasterFunctionDefinition:H(r)}):r}e.classBreakInfos.forEach((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const o=e.symbol&&e.symbol.color;o?.a?(0===t?i.push(e.minValue,e.maxValue+a):i.push(e.minValue+a,e.maxValue+a),r.push(t),n.push([t,o.r,o.g,o.b])):s.push(e.minValue,e.maxValue)});const c=o?Y(n,o):n,m=new J.A;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const d=new J.A;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new J.A({rasterFunctionDefinition:H(d)}):d}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,a=ee(s),o=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(a){const t=new Map;l.forEach(e=>{const i=e.value,r=te(e);null!=i&&r?.a&&t.set(String(i),r.toRgb())});const r=e.field;r&&n.forEach(({attributes:e})=>{const s=String(e[r]),n=e[a],l=t.get(s);l?i.push([n,...l]):o&&i.push([n,...o])})}}else for(let e=0;e<l.length;e++){const t=l[e],r=te(t),s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r?Y(i,r):i,p=new J.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new J.A({rasterFunctionDefinition:H(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,s=r?Y(i,r):i,n=new J.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new J.A({rasterFunctionDefinition:H(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new J.A;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:s}=t,n="vector-uv"===r;let a,o;if(2===s?.length){const e=s.map(e=>e.toLowerCase());a=e.indexOf("magnitude"),o=e.indexOf("direction")}-1!==a&&null!==a||(a=0,o=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find(e=>"Magnitude"===e.field):new L.A,c={magnitudeBandID:a,directionBandID:o,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:U[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const m=H(i);return t.convertToRFT?J.A.fromJSON({rasterFunctionDefinition:m}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new J.A;const r=new J.A;r.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,a={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(a.Azimuth=e.azimuth,a.Altitude=e.altitude),3===n&&(a.PSPower=e.pixelSizePower,a.PSZFactor=e.pixelSizeFactor),r.functionArguments=a,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?a.ColorRamp=(0,G.hf)(e.colorRamp):a.Colormap=(0,G.R8)(e.colorRamp)),i?new J.A({rasterFunctionDefinition:H(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map(({name:e})=>e),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}};(0,s.Cg)([(0,p.MZ)()],ae.prototype,"layer",void 0),(0,s.Cg)([(0,p.MZ)()],ae.prototype,"requestRawData",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ae.prototype,"adjustAspectRatio",null),(0,s.Cg)([(0,ne.K)("adjustAspectRatio")],ae.prototype,"writeAdjustAspectRatio",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ae.prototype,"bandIds",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ae.prototype,"compression",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ae.prototype,"compressionQuality",null),(0,s.Cg)([(0,ne.K)("compressionQuality")],ae.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ae.prototype,"compressionTolerance",null),(0,s.Cg)([(0,ne.K)("compressionTolerance")],ae.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ae.prototype,"format",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:{reader:se.SZ.read},write:{writer:se.SZ.write}}})],ae.prototype,"interpolation",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ae.prototype,"noData",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:{reader:se.hm.read},write:{writer:se.hm.write}}})],ae.prototype,"noDataInterpretation",null),(0,s.Cg)([(0,p.MZ)({type:se.e8.apiValues,json:{read:se.e8.read,write:se.e8.write}})],ae.prototype,"pixelType",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ae.prototype,"lercVersion",void 0),(0,s.Cg)([(0,ne.K)("lercVersion")],ae.prototype,"writeLercVersion",null),(0,s.Cg)([(0,p.MZ)({type:Number})],ae.prototype,"version",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ae.prototype,"mosaicRule",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0,name:"renderingRule"}})],ae.prototype,"rasterFunction",null),ae=(0,s.Cg)([(0,p.$K)("esri.layers.support.ExportImageServiceParameters")],ae);var oe=i(20437),le=i(95466),ue=i(33446),pe=i(43577),ce=i(14140),me=i(74797),de=i(87186),ye=i(12711),he=i(85676),ge=i(94359),fe=i(65864),we=i(17136),ve=i(2272),Re=i(86738);let Ce=class extends((0,a.OU)(V.o)){constructor(e){super(e),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{read:!0}})],Ce.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{read:!0,write:!0}})],Ce.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ce.prototype,"objectIds",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],Ce.prototype,"where",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],Ce.prototype,"maxCount",void 0),Ce=(0,s.Cg)([(0,p.$K)("esri.rest.support.FindImagesParameters")],Ce);const be=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"make",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"model",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"focalLength",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"rows",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"cols",void 0),i=(0,s.Cg)([(0,p.$K)("esri.rest.support.CameraInfoMixin")],i),i};let Se=class extends(be(V.o)){constructor(e){super(e),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Se.prototype,"id",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"uri",write:!0}})],Se.prototype,"referenceUri",void 0),(0,s.Cg)([(0,p.MZ)({type:Date,json:{write:!0}})],Se.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,ne.K)("acquisitionDate")],Se.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Se.prototype,"cameraID",void 0),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{write:!0}})],Se.prototype,"center",void 0),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{write:!0}})],Se.prototype,"perspectiveCenter",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Se.prototype,"orientation",void 0),Se=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageInspectionInfo")],Se);const xe=Se;let Me=class extends V.o{constructor(e){super(e),this.images=null}};var Ie;(0,s.Cg)([(0,p.MZ)({type:[xe],json:{write:!0}})],Me.prototype,"images",void 0),Me=(0,s.Cg)([(0,p.$K)("esri.rest.support.FindImagesResult")],Me);let Fe=Ie=class extends V.o{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Ie((0,C.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,s.Cg)([(0,p.MZ)({type:[String],json:{name:"angleName",write:!0}})],Fe.prototype,"angleNames",void 0),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{write:!0}})],Fe.prototype,"point",void 0),(0,s.Cg)([(0,p.MZ)({type:D.A,json:{write:!0}})],Fe.prototype,"spatialReference",void 0),(0,s.Cg)([(0,p.MZ)({type:M.jz,json:{write:!0}})],Fe.prototype,"rasterId",void 0),Fe=Ie=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAngleParameters")],Fe);let Ae=class extends V.o{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],Ae.prototype,"north",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],Ae.prototype,"up",void 0),(0,s.Cg)([(0,p.MZ)({type:D.A,json:{write:!0}})],Ae.prototype,"spatialReference",void 0),Ae=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAngleResult")],Ae);var De=i(86211),Pe=i(60408),Te=i(50498),je=i(66552);const Ne=new je.J({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let Oe=class extends V.o{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var Ze;(0,s.Cg)([(0,p.MZ)()],Oe.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)({type:Ne.apiValues,json:{read:Ne.read,write:Ne.write}})],Oe.prototype,"measureOperation",void 0),(0,s.Cg)([(0,p.MZ)({type:re.A,json:{write:!0}})],Oe.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{write:!0}})],Oe.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Oe.prototype,"raster",void 0),Oe=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureParameters")],Oe);let _e=Ze=class extends Oe{constructor(e){super(e),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Pe.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Ze((0,C.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({types:Te.yR,json:{name:"fromGeometry",read:!0,write:!0}})],_e.prototype,"geometry",void 0),(0,s.Cg)([(0,ne.K)("geometry")],_e.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:Ne.apiValues,json:{write:Ne.write}})],_e.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],_e.prototype,"is3D",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:De.Sk.read,write:De.Sk.write}})],_e.prototype,"linearUnit",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:De.dk.read,write:De.dk.write}})],_e.prototype,"areaUnit",void 0),_e=Ze=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAreaParameters")],_e);let Ve=class extends V.o{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ve.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ve.prototype,"sensorName",void 0),Ve=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureResult")],Ve);var qe=i(64108);let Ee=class extends V.o{constructor(e){super(e),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,s.Cg)([(0,p.MZ)({type:String})],Ee.prototype,"unit",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0}})],Ee.prototype,"value",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ee.prototype,"displayValue",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0}})],Ee.prototype,"uncertainty",void 0),Ee=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureResultValue")],Ee);const Je=Ee;let Ge=class extends Je{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:De.dk.read,write:De.dk.write}})],Ge.prototype,"unit",void 0),Ge=(0,s.Cg)([(0,qe.$)("esri.rest.support.ImageMeasureResultAreaValue")],Ge);const ze=Ge;let Le=class extends Je{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:De.Sk.read,write:De.Sk.write}})],Le.prototype,"unit",void 0),Le=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageMeasureResultLengthValue")],Le);const $e=Le;let Ue=class extends Ve{constructor(e){super(e),this.area=null,this.perimeter=null}};(0,s.Cg)([(0,p.MZ)({type:ze,json:{read:!0,write:!0}})],Ue.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({type:$e,json:{read:!0,write:!0}})],Ue.prototype,"perimeter",void 0),Ue=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAreaResult")],Ue);let Be=class extends((0,a.OU)(V.o)){constructor(e){super(e),this.outSpatialReference=null}};(0,s.Cg)([(0,p.MZ)({type:D.A,json:{name:"outSR",write:!0}})],Be.prototype,"outSpatialReference",void 0),Be=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageBoundaryParameters")],Be);var Ke=i(36005);let Qe=class extends V.o{constructor(e){super(e),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?A.A.fromJSON(e):F.A.fromJSON(e)}};var ke;(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],Qe.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({types:Te.yR,json:{name:"shape",write:!0}})],Qe.prototype,"geometry",void 0),(0,s.Cg)([(0,Ke.w)("geometry")],Qe.prototype,"readGeometry",null),Qe=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageBoundaryResult")],Qe);let He=ke=class extends Oe{constructor(e){super(e),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,Pe.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new ke((0,C.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{read:!0,write:!0}})],He.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,ne.K)("fromGeometry")],He.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{read:!0,write:!0}})],He.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:Ne.apiValues,json:{write:Ne.write}})],He.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],He.prototype,"is3D",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:De.Sk.read,write:De.Sk.write}})],He.prototype,"linearUnit",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:De.b$.read,write:De.b$.write}})],He.prototype,"angularUnit",void 0),He=ke=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageDistanceParameters")],He);let We=class extends Je{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:De.b$.read,write:De.b$.write}})],We.prototype,"unit",void 0),We=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageMeasureResultAngleValue")],We);const Xe=We;let Ye=class extends Ve{constructor(e){super(e),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,s.Cg)([(0,p.MZ)({type:$e,json:{read:!0,write:!0}})],Ye.prototype,"distance",void 0),(0,s.Cg)([(0,p.MZ)({type:Xe,json:{read:!0,write:!0}})],Ye.prototype,"azimuthAngle",void 0),(0,s.Cg)([(0,p.MZ)({type:Xe,json:{read:!0,write:!0}})],Ye.prototype,"elevationAngle",void 0),Ye=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageDistanceResult")],Ye);var et=i(58174),tt=i(79677),it=i(93223);let rt=class extends((0,a.OU)(V.o)){constructor(e){super(e),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Pe.$B)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,s.Cg)([(0,p.MZ)({types:Te.yR,json:{read:fe.rS,write:!0}})],rt.prototype,"geometry",void 0),(0,s.Cg)([(0,ne.K)("geometry")],rt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"objectIds",void 0),(0,s.Cg)([(0,it.e)(et.x,{ignoreUnknown:!1,name:"spatialRel"})],rt.prototype,"spatialRelationship",void 0),(0,s.Cg)([(0,p.MZ)({type:tt.A,json:{name:"time",write:!0}})],rt.prototype,"timeExtent",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],rt.prototype,"where",void 0),rt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfoParameters")],rt);let st=class extends(be(V.o)){constructor(e){super(e),this.id=null}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],st.prototype,"id",void 0),st=(0,s.Cg)([(0,p.$K)("esri.rest.support.CameraInfo")],st);const nt=st;let at=class extends V.o{constructor(e){super(e),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],at.prototype,"id",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],at.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:Date,json:{write:!0}})],at.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,ne.K)("acquisitionDate")],at.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],at.prototype,"cameraID",void 0),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{write:!0}})],at.prototype,"center",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],at.prototype,"gps",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],at.prototype,"orientation",void 0),at=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfo")],at);const ot=at;let lt=class extends V.o{constructor(e){super(e),this.images=null,this.cameras=null}};var ut;(0,s.Cg)([(0,p.MZ)({type:[ot],json:{write:!0}})],lt.prototype,"images",void 0),(0,s.Cg)([(0,p.MZ)({type:[nt],json:{write:!0}})],lt.prototype,"cameras",void 0),lt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfoResult")],lt);let pt=ut=class extends Oe{constructor(e){super(e),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,Pe.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new ut((0,C.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{read:!0}})],pt.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,ne.K)("fromGeometry")],pt.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{read:!0,write:!0}})],pt.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:Ne.apiValues,json:{write:Ne.write}})],pt.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],pt.prototype,"operationType",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:De.Sk.read,write:De.Sk.write}})],pt.prototype,"linearUnit",void 0),pt=ut=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageHeightParameters")],pt);let ct=class extends Ve{constructor(e){super(e),this.height=null}};(0,s.Cg)([(0,p.MZ)({type:$e,json:{read:!0,write:!0}})],ct.prototype,"height",void 0),ct=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageHeightResult")],ct);var mt,dt=i(22048);let yt=mt=class extends V.o{constructor(e){super(e),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Pe.$B)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=re.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=J.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map(e=>e.rasterFunctionDefinition||e.toJSON())))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new mt((0,C.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,s.Cg)([(0,p.MZ)({types:Te.yR,json:{write:!0}})],yt.prototype,"geometry",void 0),(0,s.Cg)([(0,ne.K)("geometry")],yt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:re.A,json:{write:!0}})],yt.prototype,"mosaicRule",null),(0,s.Cg)([(0,ne.K)("mosaicRule")],yt.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,p.MZ)({type:J.A,json:{write:!0,name:"renderingRule"}})],yt.prototype,"rasterFunction",null),(0,s.Cg)([(0,ne.K)("rasterFunction")],yt.prototype,"writeRasterFunction",null),(0,s.Cg)([(0,p.MZ)({type:[J.A],json:{write:!0,name:"renderingRules"}})],yt.prototype,"rasterFunctions",void 0),(0,s.Cg)([(0,ne.K)("rasterFunctions")],yt.prototype,"writeRasterFunctions",null),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{write:!0}})],yt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,ne.K)("pixelSize")],yt.prototype,"writePixelSize",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnCatalogItems",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnPixelValues",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],yt.prototype,"maxItemCount",void 0),(0,s.Cg)([(0,p.MZ)({type:tt.A,json:{write:{target:"time"}}})],yt.prototype,"timeExtent",void 0),(0,s.Cg)([(0,ne.K)("timeExtent")],yt.prototype,"writeTimeExtent",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],yt.prototype,"raster",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],yt.prototype,"viewId",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"processAsMultidimensional",void 0),yt=mt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageIdentifyParameters")],yt);var ht=i(22671);let gt=class extends V.o{constructor(e){super(e),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};var ft;(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],gt.prototype,"catalogItemVisibilities",void 0),(0,s.Cg)([(0,p.MZ)({type:ht.A,json:{write:!0}})],gt.prototype,"catalogItems",void 0),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{write:!0}})],gt.prototype,"location",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],gt.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],gt.prototype,"objectId",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],gt.prototype,"processedValues",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],gt.prototype,"properties",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],gt.prototype,"value",void 0),gt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageIdentifyResult")],gt);let wt=ft=class extends V.o{constructor(e){super(e),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map(e=>e.toJSON())}}clone(){return new ft({geometries:this.geometries?.map(e=>e.clone())??[],rasterId:this.rasterId})}};(0,s.Cg)([(0,p.MZ)({type:[Re.A],json:{write:!0}})],wt.prototype,"geometries",void 0),(0,s.Cg)([(0,ne.K)("geometries")],wt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:M.jz,json:{write:!0}})],wt.prototype,"rasterId",void 0),wt=ft=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePixelLocationParameters")],wt);let vt=class extends V.o{constructor(e){super(e),this.geometries=null}};var Rt;(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],vt.prototype,"geometries",void 0),vt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePixelLocationResult")],vt);let Ct=Rt=class extends Oe{constructor(e){super(e),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Pe.$B)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new Rt((0,C.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({types:Te.yR,json:{name:"fromGeometry",read:fe.rS}})],Ct.prototype,"geometry",void 0),(0,s.Cg)([(0,ne.K)("geometry")],Ct.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:Ne.apiValues,json:{read:Ne.read,write:Ne.write}})],Ct.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],Ct.prototype,"is3D",void 0),Ct=Rt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePointParameters")],Ct);let bt=class extends Ve{constructor(e){super(e),this.point=null}};(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{name:"point.value",read:!0,write:!0}})],bt.prototype,"point",void 0),bt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePointResult")],bt);var St=i(34606),xt=i(29127);let Mt=class extends((0,a.OU)(V.o)){constructor(e){super(e),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,Pe.$B)(e[0]),geometries:e.map(e=>({...e.toJSON(),spatialReference:void 0}))}:null}};(0,s.Cg)([(0,p.MZ)({types:[Te.yR]})],Mt.prototype,"geometries",void 0),(0,s.Cg)([(0,ne.K)("geometries")],Mt.prototype,"writeGeometries",null),(0,s.Cg)([(0,p.MZ)({type:[M.jz],json:{write:!0}})],Mt.prototype,"rasterIds",void 0),(0,s.Cg)([(0,p.MZ)({type:D.A,json:{name:"outSR",write:!0}})],Mt.prototype,"outSpatialReference",void 0),Mt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageToMapMultirayParameters")],Mt);let It=class extends((0,a.OU)(V.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Pe.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,s.Cg)([(0,p.MZ)({types:Te.yR,json:{read:fe.rS,write:!0}})],It.prototype,"geometry",void 0),(0,s.Cg)([(0,ne.K)("geometry")],It.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],It.prototype,"rasterId",void 0),(0,s.Cg)([(0,p.MZ)({type:D.A,json:{name:"outSR",write:!0}})],It.prototype,"outSpatialReference",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.DOff",write:!0}})],It.prototype,"depthOffset",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.Adjust",write:!0}})],It.prototype,"adjust",void 0),It=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageToMapParameters")],It);let Ft=class extends((0,a.OU)(V.o)){constructor(e){super(e),this.referenceUri=null,this.rasterId=null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{name:"uri",write:!0}})],Ft.prototype,"referenceUri",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],Ft.prototype,"rasterId",void 0),Ft=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageUrlParameters")],Ft);let At=class extends V.o{constructor(e){super(e),this.url=null}};(0,s.Cg)([(0,p.MZ)({json:{name:"imageURL",write:!0}})],At.prototype,"url",void 0),At=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageUrlResult")],At);const Dt=new je.J({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0});let Pt=class extends((0,a.OU)(V.o)){constructor(e){super(e),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,i){e?.length&&(t.geometryType=(0,Pe.$B)(e[0]),t.geometries=e.map(e=>e.toJSON()))}};(0,s.Cg)([(0,p.MZ)({types:[Te.yR]})],Pt.prototype,"geometries",void 0),(0,s.Cg)([(0,ne.K)("geometries")],Pt.prototype,"writeGeometries",null),(0,s.Cg)([(0,p.MZ)({type:re.A,json:{write:!0}})],Pt.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{write:!0}})],Pt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Pt.prototype,"constantZ",void 0),(0,s.Cg)([(0,p.MZ)({type:Dt.apiValues,json:{read:Dt.read,write:Dt.write}})],Pt.prototype,"baseType",void 0),Pt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolumeParameters")],Pt);let Tt=class extends V.o{constructor(e){super(e),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Tt.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Tt.prototype,"cut",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Tt.prototype,"fill",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"maxz",write:!0}})],Tt.prototype,"maxZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"minz",write:!0}})],Tt.prototype,"minZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"meanz",write:!0}})],Tt.prototype,"meanZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Tt.prototype,"cutCellCount",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Tt.prototype,"fillCellCount",void 0),Tt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolume")],Tt);const jt=Tt;let Nt=class extends V.o{constructor(e){super(e),this.volumes=[]}};(0,s.Cg)([(0,p.MZ)({type:[jt],json:{write:!0}})],Nt.prototype,"volumes",void 0),Nt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolumeResult")],Nt);let Ot=class extends((0,a.OU)(V.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Pe.$B)(e),t[i]=JSON.stringify(e))}};(0,s.Cg)([(0,p.MZ)({types:Te.yR,json:{read:fe.rS,write:!0}})],Ot.prototype,"geometry",void 0),(0,s.Cg)([(0,ne.K)("geometry")],Ot.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ot.prototype,"rasterId",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.VisibleOnly",write:!0}})],Ot.prototype,"visibleOnly",void 0),Ot=(0,s.Cg)([(0,p.$K)("esri.rest.support.MapToImageParameters")],Ot);let Zt=class extends V.o{constructor(e){super(e),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),Re.A.fromJSON(e)}};var _t;(0,s.Cg)([(0,p.MZ)({types:Te.yR,json:{name:"Shape",read:fe.rS,write:!0}})],Zt.prototype,"geometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Length",write:!0}})],Zt.prototype,"length",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Area",write:!0}})],Zt.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({type:Re.A,json:{name:"Center",write:!0}})],Zt.prototype,"center",void 0),(0,s.Cg)([(0,Ke.w)("center")],Zt.prototype,"readCenter",null),Zt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureAreaFromImageResult")],Zt);let Vt=_t=class extends V.o{constructor(e){super(e),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Pe.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,C.o8)({geometry:this.geometry,rasterId:this.rasterId});return new _t(e)}};(0,s.Cg)([(0,p.MZ)({types:Te.yR,json:{name:"fromGeometry",read:fe.rS,write:!0}})],Vt.prototype,"geometry",void 0),(0,s.Cg)([(0,ne.K)("geometry")],Vt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Vt.prototype,"rasterId",void 0),Vt=_t=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureFromImageParameters")],Vt);let qt=class extends V.o{constructor(e){super(e),this.geometry=null,this.length=null}};function Et(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function Jt(e,t,i){const r=(0,M.PZ)(dt.A,t),s=(0,ve.Dl)(e),n=r.geometry?[r.geometry]:[],a=await(0,we.el)(n),o=r.toJSON();Et(o);const l=a?.[0];null!=l&&(o.geometry=$t(l));const u=(0,ve.lF)({...s.query,f:"json",...o});return(0,ve.jV)(u,i)}async function Gt(e,t,i){const r=(0,M.PZ)(yt,t),s=(0,ve.Dl)(e),n=r.geometry?[r.geometry]:[];return(0,we.el)(n).then(e=>{const t=r.toJSON(),n=e?.[0];null!=n&&(t.geometry=JSON.stringify($t(n)));const a=(0,ve.lF)({...s.query,f:"json",...t}),o=(0,ve.jV)(a,i);return(0,v.A)(s.path+"/identify",o)}).then(e=>gt.fromJSON(e.data))}async function zt(e,t,i,r){const s=(0,ve.Dl)(e),n=await(0,we.el)(i),a=t.toJSON();null!=n[0]&&(a.fromGeometry=JSON.stringify($t(n[0]))),null!=n[1]&&(a.toGeometry=JSON.stringify($t(n[1])));const o=(0,ve.lF)({...s.query,f:"json",...a}),l=(0,ve.jV)(o,r),{data:u}=await(0,v.A)(s.path+"/measure",l);return u}async function Lt(e,t,i){t=(0,M.PZ)(Vt,t);const r=(0,ve.Dl)(e),s=t.toJSON(),n=(0,ve.lF)({...r.query,f:"json",...s}),a=(0,ve.jV)(n,i),{data:o}=await(0,v.A)(r.path+"/measureFromImage",a);return o}function $t(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=Ut(e.spatialReference)),t}function Ut(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function Bt(e,t){if(!e.imageCoordinateSystem)return(0,P.YX)(e);const i=Ut(e),{icsid:r,icsns:s}=i;return null==r||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}(0,s.Cg)([(0,p.MZ)({types:Te.yR,json:{name:"Shape",read:fe.rS,write:!0}})],qt.prototype,"geometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Length",write:!0}})],qt.prototype,"length",void 0),qt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureLengthFromImageResult")],qt);var Kt=i(82371),Qt=i(20223),kt=i(20615),Ht=i(74910),Wt=i(78286),Xt=i(99199),Yt=i(97552);const ei=512,ti=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),ii=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,this._exportTileQueue=new b.QueueProcessor({concurrency:4,process:(e,t)=>this._fetchPixels(e.extent,e.width,e.height,{...e.options,signal:t})}),this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new ae({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach(t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)}),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every(e=>"number"==typeof e))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?(0,I.F_)(()=>re.A.fromJSON(t)):null}get fieldsIndex(){return this.fields?new le.A(this.fields):null}set format(e){e&&ti.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}get isRenderedFormat(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=re.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?re.A.fromJSON(i):this._isMosaicRuleSupported(t)?re.A.fromJSON(t):null}writeMosaicRule(e,t,i){const{mosaicRule:r}=this;this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}readObjectIdField(e,t){if(!e){const i=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=i?.name}return e}get parsedUrl(){return(0,x.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,ge.LF)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),K(s)||o.A.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON()}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push((0,me.rZ)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,me.Nd)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push((0,me.dy)()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push((0,me.nq)(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=(0,me.DV)(i),s=(0,me.y6)();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const i=(0,me.AL)(t.multidimensionalInfo);e.push(...i)}const i=t?.attributeTable;if(null!=i){const t=(0,me.jC)(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=J.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?J.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):J.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?D.A.fromJSON(i):null}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=se.e8.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e,{renderer:r,symbolizer:s,pixelFilter:n}=this;const{isRawData:a}=e;if(a&&"lerc"!==this.format&&(r??=(0,ye.PD)(this.rasterInfo,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}),s||(this.symbolizer=new he.A({rendererJSON:r.toJSON(),rasterInfo:this.rasterInfo}),s=this.symbolizer)),(a||!this.isRenderedFormat)&&r&&s&&!n){await this._updateSymbolizer(s,r);const n=this.bandIds?.length?this.bandIds:(0,ye.ci)(this.rasterInfo);i=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return i}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new R.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,C.o8)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),async function(e,t,i){const r=(0,M.PZ)(Pt,t).toJSON();r.geometries=JSON.stringify(r.geometries);const s=(0,ve.Dl)(e),n=(0,ve.lF)({...s.query,f:"json",...r}),a=(0,ve.jV)(n,i),{data:o}=await(0,v.A)(`${s.path}/calculateVolume`,a);return Nt.fromJSON({volumes:o.results})}(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new R.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return async function(e,t,i){const r=(0,M.PZ)(Fe,t),s=r.toJSON();null!=s.angleName&&(s.angleName=s.angleName.join(",")),r?.point?.spatialReference?.imageCoordinateSystem&&(s.point.spatialReference=Ut(r.point.spatialReference)),r?.spatialReference?.imageCoordinateSystem&&(s.spatialReference=Bt(r.spatialReference));const n=(0,ve.Dl)(e),a=(0,ve.lF)({...n.query,f:"json",...s}),o=(0,ve.jV)(a,i),{data:l}=await(0,v.A)(`${n.path}/computeAngles`,o);return l.spatialReference=l.spatialReference?null!=l.spatialReference.geodataXform?new D.A({wkid:0,imageCoordinateSystem:l.spatialReference}):D.A.fromJSON(l.spatialReference):null,"NaN"===l.north&&(l.north=null),"NaN"===l.up&&(l.up=null),new Ae(l)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new R.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return async function(e,t,i){const r=(0,M.PZ)(wt,t),s=r.toJSON(),{geometries:n}=r;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(s.geometries.geometries[e].spatialReference=Ut(n[e].spatialReference));const a=(0,ve.Dl)(e),o=(0,ve.lF)({...a.query,f:"json",...s}),l=(0,ve.jV)(o,i),{data:u}=await(0,v.A)(`${a.path}/computePixelLocation`,l);return vt.fromJSON(u)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new R.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,C.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Jt(e,t,i),s=(0,ve.Dl)(e),{data:n}=await(0,v.A)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new R.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,C.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Jt(e,t,i),s=(0,ve.Dl)(e),{data:n}=await(0,v.A)(`${s.path}/computeStatisticsHistograms`,r),{statistics:a}=n;return a?.length&&a.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:a,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new R.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,C.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,M.PZ)(pt,t),s=await zt(e,r,[r.fromGeometry,r.toGeometry],i);return ct.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new R.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,C.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,M.PZ)(_e,t),s=await zt(e,r,[r.geometry],i);return Ue.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new R.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,C.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,M.PZ)(He,t),s=await zt(e,r,[r.fromGeometry,r.toGeometry],i);return Ye.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new R.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,C.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,M.PZ)(Ct,t),s=await zt(e,r,[r.geometry],i);return bt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new R.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new R.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return async function(e,t,i){const r=(0,M.PZ)(Vt,t),s=await Lt(e,r,i);return qt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new R.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new R.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return async function(e,t,i){const r=(0,M.PZ)(Vt,t),s=await Lt(e,r,i);return Zt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async internalFetchImage(e,t,i,r={}){await this._updateCurrentRasterInfo();const{exportImageServiceParameters:s}=this;let a=!1;r.requestRawData&&(await this._initJobHandler(),s.requestRawData||"lerc"===this.format||(a=!0,s.requestRawData=!0));const o=this.getExportImageServiceParameters(e,t,i,r.timeExtent);if(a&&(s.requestRawData=!1,o&&!this.bandIds?.length&&(null==o.bandIds||""===o.bandIds))){const e=(0,ye.ci)(this.rasterInfo);o.bandIds=e?.join(",")}if(null==o){if(r.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");if(e.width=t,e.height=i,r.returnImageBitmap){const{bitmap:t}=await(0,ue.mn)(e,`${n(this.parsedUrl)}/exportImage`,r);return{imageBitmap:t}}return{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:a}=this,o=(s?.length||a.bandCount)??0,l=t*i,u=a.pixelType,p=[];for(let e=0;e<o;e++)p.push(ce.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ce.A({width:t,height:i,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const l=!!r.requestAsImageElement&&!this.pixelFilter,u=l&&!!r.returnImageBitmap,p={imageServiceParameters:o,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:l,returnImageBitmap:u,signal:r.signal};return this._requestArrayBuffer(p)}async fetchPixels(e,t,r,s={}){await this._initJobHandler(),s.applyRendering&&await this._updateCurrentRasterInfo();const{imageMaxWidth:n,imageMaxHeight:a}=this;if(t<=n&&r<=a)return this._exportTileQueue.push({extent:e,width:t,height:r,options:s},{signal:s.signal});if(t>4096||r>4096||n<ei||a<ei)throw new R.A("imagery-layer:fetch-pixels",`The image service has a maximum export size of ${n}x${a}. The requested size of ${t}x${r} exceeds this limit.`);let{xmin:o,ymax:l,spatialReference:u}=this._projectedFullExtent??this.fullExtent;if(!u?.equals(e.spatialReference)){const t=await i.e(895).then(i.bind(i,83276));await t.load();const r=t.execute(this.fullExtent,e.spatialReference);o=r.xmin,l=r.ymax,this._projectedFullExtent=r}const p=e.width/t,c=e.height/r,m=Math.floor((e.xmin-o)/p),d=Math.floor((l-e.ymax)/c),y=m+t,h=d+r,g=Math.floor(m/ei),f=Math.floor(d/ei),w=Math.ceil(y/ei)-1,v=Math.ceil(h/ei)-1,C=ei*p,b=ei*c,S=[];for(let t=f;t<=v;t++){const i=l-t*b,r=i-b;for(let t=g;t<=w;t++){const n=o+t*C,a=new F.A({xmin:n,ymin:r,xmax:n+C,ymax:i,spatialReference:e.spatialReference});S.push(this._exportTileQueue.push({extent:a,width:ei,height:ei,options:s},{signal:s.signal}))}}const x=await Promise.all(S);return x.some(e=>null==e.pixelBlock)?{extent:e,pixelBlock:null}:{extent:e,pixelBlock:this._rasterJobHandler?await this._rasterJobHandler.mosaicPixelData({pixelBlocks:x,destExtent:e},{signal:s.signal,transferPixelsToWorker:!0}):(0,N.LY)(x,e)?.pixelBlock}}async _fetchPixels(e,t,i,r={}){const s=r.applyRendering?void 0:new ae({layer:this,requestRawData:!0,interpolation:r.interpolation??"nearest",bandIds:r.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,i,r.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,r.bandIds||delete n.bandIds,delete n.compressionQuality;const a={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:r.signal},{pixelData:o}=await this._requestArrayBuffer(a);return o??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return(0,v.A)(n(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new R.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,v.A)(n(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>ht.A.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ve.Dl)(e),s=(0,ve.lF)({...r?.query,f:"json"}),n=(0,ve.jV)(s,i),a=`${r?.path}/${t}/info`,o=(0,v.A)(`${a}`,n),l=(0,v.A)(`${a}/keyProperties`,n),u=await Promise.allSettled([o,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let m=null;p.statistics?.length&&(m=p.statistics.map(e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]})));const d=F.A.fromJSON(p.extent),y=Math.ceil(d.width/p.pixelSizeX-.1),h=Math.ceil(d.height/p.pixelSizeY-.1),g=d.spatialReference,f=new Re.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),w=p.histograms?.length?p.histograms:null,R=new Qt.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new de.A({width:y,height:h,bandCount:p.bandCount,extent:d,spatialReference:g,pixelSize:f,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:w,keyProperties:c,storageInfo:R})}(n(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,v.A)(n(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),r=i?.ics;if(!r)return;let s=null;try{s=(await(0,v.A)(n(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s?.spatialReference)return{ics:r,icsToPixelTransform:null,icsExtent:null,northDirection:null};const a=this.version>=10.7?(0,v.A)(n(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},o=s.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:(0,P.YX)(o),outSR:"0:"+e},u=(0,v.A)(n(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=(s.xmin+s.xmax)/2,c=(s.ymax-s.ymin)/6,m=s.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const y={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,P.YX)(o),outSR:"0:"+e},h=(0,v.A)(n(this.parsedUrl)+"/project",{query:this._getQueryParams(y),...t}).then(e=>e.data).catch(()=>({})),g=await Promise.all([a,u,h]);let f=g[0].ipxf;if(null==f){const e=r.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(f={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const w=F.A.fromJSON(g[1]?.geometries?.[0]);w&&(w.spatialReference=new D.A({wkid:0,imageCoordinateSystem:r}));const R=g[2].geometries?g[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],C=R.length;if(C<3)return{ics:r,icsToPixelTransform:f,icsExtent:w,northDirection:null};let b=0,S=0,x=0,M=0;for(let e=0;e<C;e++)b+=R[e].x,S+=R[e].y,x+=R[e].x*R[e].x,M+=R[e].x*R[e].y;const I=(C*M-b*S)/(C*x-b*b);let A=0;const T=R[4].x>R[0].x,j=R[4].y>R[0].y;return I===1/0?A=j?90:270:0===I?A=T?0:180:I>0?A=T?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(A=j?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:r,icsToPixelTransform:f,icsExtent:w,northDirection:A}}async generateRasterInfo(e,t){const i=(0,M.PZ)(J.A,e),r={...t,query:this._getQueryParams()};if(!i||"none"===i.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(i))return this.serviceRasterInfo??(0,Kt.Tw)(n(this.parsedUrl),this.sourceJSON,r);const s=function(e){const t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map(e=>i?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}(i);if(!s)throw new R.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[s])return this._functionRasterInfos[s];const a=(0,Kt.X6)(n(this.parsedUrl),i,r);this._functionRasterInfos[s]=a;try{const t=await a,{rasterFunction:i}=this;return(i===e||JSON.stringify(i)===JSON.stringify(e))&&JSON.stringify(this.rasterInfo)!==JSON.stringify(t)&&(this.rasterInfo=t),t}catch(e){throw this._functionRasterInfos[s]=null,e}}getExportImageServiceParameters(e,t,i,r,s){const a=Bt((e=e.clone().shiftCentralMeridian()).spatialReference,n(this.parsedUrl));s??=this.exportImageServiceParameters;const o=s.toJSON(),{bandIds:l,noData:u}=o;let{renderingRule:p}=o;const c=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,d=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(l?.length&&this._hasRasterFunction(this.rasterFunction)&&!c&&d){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFunctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){const t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;o.bandIds=void 0}else o.bandIds=l?.join(",");Array.isArray(u)&&u.length>0&&(o.noData=u.join(","));const y=this._processMultidimensionalIntersection(null,r,s.mosaicRule);if(y.isOutSide)return null;o.mosaicRule=null!=y.mosaicRule?JSON.stringify(y.mosaicRule):null,r=y.timeExtent,o.renderingRule=this._getRenderingRuleString(J.A.fromJSON(p));const h={};if(null!=r){const{start:e,end:t}=r.toJSON();e&&t&&e===t?h.time=""+e:null==e&&null==t||(h.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:a,imageSR:a,size:t+","+i,...o,...h}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new R.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,C.o8)(e);const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=(0,M.PZ)(St.A,t),s=r.toJSON();Et(s),s.outFields?.length&&(s.outFields=s.outFields.join(","));const n=await(0,we.el)(r.geometry),a=n?.[0];null!=a&&(s.geometry=$t(a));const o=(0,ve.Dl)(e),l=(0,ve.lF)({...o.query,f:"json",...s}),u=(0,ve.jV)(l,i),{data:p}=await(0,v.A)(`${o.path}/getSamples`,u),c=p.samples.map(e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map(e=>Number(e));return{...e,pixelValue:t}});return xt.A.fromJSON({samples:c})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new R.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,C.o8)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=A.A.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new R.A("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),r&&null==e.raster&&(e.raster=r),Gt(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new R.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return async function(e,t,i){const r=(0,M.PZ)(It,t),s=r.toJSON();r.geometry.spatialReference.imageCoordinateSystem&&(s.geometry=$t(r.geometry)),r.depthOffset&&r.adjust||delete s.options;const n=(0,ve.Dl)(e),a=(0,ve.lF)({...n.query,f:"json",...s}),o=(0,ve.jV)(a,i),{data:l}=await(0,v.A)(`${n.path}/imageToMap`,o);return(0,fe.rS)(l)}(n(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new R.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return async function(e,t,i){const r=(0,M.PZ)(Mt,t),s=r.toJSON();r.rasterIds?.length&&(s.rasterIds=r.rasterIds.join(","));const n=(0,ve.Dl)(e),a=(0,ve.lF)({...n.query,f:"json",...s}),o=(0,ve.jV)(a,i),{data:l}=await(0,v.A)(`${n.path}/imageToMapMultiray`,o);return(0,fe.rS)(l)}(n(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new R.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return async function(e,t,i){const r=(0,M.PZ)(Ot,t),s=r.toJSON(),n=await(0,we.el)(r.geometry),a=n?.[0];null!=a&&(s.geometry=$t(a)),r.visibleOnly||delete s.options;const o=a?.spatialReference??r.geometry?.spatialReference;o&&(s.inSR=Bt(o));const l=(0,ve.Dl)(e),u=(0,ve.lF)({...l.query,f:"json",...s}),p=(0,ve.jV)(u,i),{data:c}=await(0,v.A)(`${l.path}/mapToImage`,p);return(0,fe.rS)(c)}(n(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new R.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return async function(e,t,i){const r=(0,M.PZ)(Ce,t),s=r.toJSON(),n=await(0,we.el)([r.fromGeometry,r.toGeometry]);null!=n[0]&&(s.fromGeometry=$t(n[0]),n[0].spatialReference&&(s.inSR=Bt(n[0].spatialReference))),null!=n[1]&&(s.toGeometry=$t(n[1])),r.objectIds?.length&&(s.objectIds=s.objectIds.join(","));const a=(0,ve.Dl)(e),o=(0,ve.lF)({...a.query,f:"json",...s}),l=(0,ve.jV)(o,i),{data:u}=await(0,v.A)(`${a.path}/find`,l);return Me.fromJSON(u)}(n(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new R.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return async function(e,t,i){const r=(0,M.PZ)(Ft,t).toJSON(),s=(0,ve.Dl)(e),n=(0,ve.lF)({...s.query,f:"json",...r}),a=(0,ve.jV)(n,i),{data:o}=await(0,v.A)(`${s.path}/getImageUrl`,a);return At.fromJSON(o)}(n(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new Yt.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new R.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},async function(e,t,i){const r=(0,M.PZ)(Be,t),s=(0,ve.Dl)(e),n=r.toJSON();r.outSpatialReference&&(n.outSR=Bt(r.outSpatialReference));const a=(0,ve.lF)({...s.query,f:"json",...n}),o=(0,ve.jV)(a,i),{data:l}=await(0,v.A)(s.path+"/queryBoundary",o);return Qe.fromJSON(l)}(n(this.parsedUrl),e,this._getRequestOptions(t))}async queryExtent(e,t){({query:e,requestOptions:t}=await this._prepareForQuery(e,t));const{where:r,objectIds:s,geometry:n,timeExtent:a,start:o,num:l,pixelSize:u}=e,p=null!=r&&"1=1"!==r,c=null!=s&&s.length>0,m=null!=n&&("extent"!==n.type||!n.equals(this.fullExtent)),d=null!=u,y=null!=o||null!=l,{timeInfo:h}=this,g=null!=a&&null!=h&&!a.equals(h.fullTimeExtent);if(!(p||c||m||d||g||y)){const r=await(0,kt.I)(this.url,e,t),{outSpatialReference:s}=e;if(!s||s.equals(this.spatialReference))return{count:r,extent:this.fullExtent.clone()};const n=await i.e(895).then(i.bind(i,83276));return await n.load(),{count:r,extent:n.execute(this.fullExtent,s)}}return(0,Ht.L)(this.url,e,t)}async queryRasters(e,t){({query:e,requestOptions:t}=await this._prepareForQuery(e,t));const i=await(0,Xt.s)(this.url,e,t),r=this.graphicOrigin;return i.features.forEach(e=>{e.layer=this,e.origin=r}),i}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Wt.V)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new R.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},async function(e,t,i){const r=(0,M.PZ)(rt,t),s=r.toJSON();Et(s),s.objectIds?.length&&(s.objectIds=s.objectIds.join(",")),s.geometry||s.objectIds||s.time||s.where||(s.where="1=1");const n=await(0,we.el)(r.geometry),a=n?.[0];null!=a&&(s.geometry=$t(a));const o=a?.spatialReference??r.geometry?.spatialReference;o&&(s.inSR=Bt(o));const l=(0,ve.Dl)(e),u=(0,ve.lF)({...l.query,f:"json",...s}),p=(0,ve.jV)(u,i),{data:c}=await(0,v.A)(`${l.path}/queryGPSInfo`,p);return lt.fromJSON(c)}(n(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,kt.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new R.A("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,o=null,l=null;const u=me.F_.servicePixelValue.toLowerCase(),p=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some(e=>!e.toLowerCase().startsWith(u)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(u)&&e.length>u.length).map(e=>{const t=e.slice(u.length+1);return[this._updateRenderingRulesFunctionName(t,p),t]});o=t.map(e=>new J.A({functionName:e[0]})),l=t.map(e=>e[1]);const{rasterFunction:i}=this;0===o.length?i?.functionName?(o.push(i),l.push(i.functionName)):o=null:i?.functionName&&!o.some(e=>e.functionName===i.functionName)&&(o.push(i),l.push(i.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let d=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:i}=(0,T.Rp)(m,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new R.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(d=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d);let h=e.geometry;this.version<10.91&&"extent"===h?.type&&(h=A.A.fromExtent(h));const g=this._getQueryParams({geometry:h,timeExtent:d,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:o,pixelSize:i,returnCatalogItems:a,returnGeometry:c,raster:this.raster,maxItemCount:s?1:null});delete g.f;const f=new yt(g);try{await this._generateRasterInfo(this.rasterFunction);const i=await Gt(this.url,f,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,o=null!=i.value&&i.value.toLowerCase().includes("nodata"),u=a&&!c&&i?.catalogItems?.features.length&&(n||!o),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?(0,T.XU)({rasterInfo:this.rasterInfo,multidimensionalDefinition:y?.multidimensionalDefinition,timeExtent:d,multidimensionalSubset:this.multidimensionalSubset}):null;if(!u)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p});const m=this.objectIdField||"ObjectId",h=i.catalogItems?.features??[],g=h.map(e=>e.attributes?.[m]),w=new Yt.A({objectIds:g,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[m]}),v=await this.queryRasters(w);return v?.features?.length&&v.features.forEach(t=>{h.forEach(i=>{i.attributes[m]===t.attributes[m]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new R.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const i=(0,v.A)(n(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),r=(0,v.A)(n(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),s=await Promise.all([i,r]);return s[0]&&s[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:s[0]||null,histograms:s[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,T.z2)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Kt.Tw)(n(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,Kt.E9)(e,t),e)),r=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([i,r,s]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),o.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,S.wB)(()=>this.rasterFunction,e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then(e=>{e&&(this.rasterInfo=e)})})]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)})}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const a=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),o=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==o||null==l||o===l,p=u?[o||l]:[[o,l]],c=this.version>=10.8;if(a.length)a.forEach(e=>{e.dimensionName===n&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))});else if(!c){const t=e.multidimensionalDefinition.filter(e=>null!=e.variableName&&null==e.dimensionName);t.length?t.forEach(e=>{e.dimensionName=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new _.A({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter(e=>!(!e.variableName&&!e.dimensionName)),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new R.A("imagery-layer:query-rasters","query operation is not supported on the input image service");const i=null!=e?(0,M.PZ)(Yt.A,e):this.createQuery();return t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:i,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,ye.fp)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:i,ssl:r}=await(0,v.A)(n(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=i,this.sourceJSON=t,r&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new R.A("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_configRenderer(e){const{rasterInfo:t}=this;if(!this.isRenderedFormat&&!this.pixelFilter||this._isVectorDataSet()){const i=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=(0,ye.I8)({variableName:i,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>=3){const e=r?.bandIds??(0,ye.ci)(t);!e||3===t.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=r?.renderer??(0,ye.PD)(t,{bandIds:this.bandIds,variableName:this.rasterFunction?null:i}));const s=(0,ye.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=t):this.symbolizer=new he.A({rendererJSON:s,rasterInfo:t}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):(0,j.D)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const i=await(0,v.A)(n(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return i.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,returnImageBitmap:r,signal:s}=e;if(i&&this._canRequestImageElement(t.format)){const i=`${n(this.parsedUrl)}/exportImage`,{data:a}=await(0,v.A)(i,{responseType:r?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:s});if(a instanceof Blob){const{bitmap:e}=await(0,ue.mn)(a,i,{signal:s});return{imageBitmap:e,params:t}}return{imageOrCanvasElement:a,params:t}}const a=this._initJobHandler(),o=(0,v.A)(n(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s}),l=(await Promise.all([o,a]))[0].data,u=t.format||"jpgpng";let p=u;if("bsq"!==p&&"bip"!==p&&(p=(0,j.g)(l)),!p)throw new R.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:s},m=this._decodePixelBlock(l,{width:t.width,height:t.height,format:u,applyJpegMask:!0},c);return{pixelData:{pixelBlock:await m,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch(()=>null)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,T.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new re.A;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach(e=>e.variableName=""),t=t.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:s,returnDomainValues:n,templateFields:a}=t,o=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map(e=>e.replaceAll(/ /gi,", "))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!l&&(!c||s)){const e={};e[p]=0,u=[i],l=[new w.A({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,me.eS)(this.rasterFields,e,t.effectiveMultidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,a),c&&!s&&(l=[]);const{itemPixelValue:d,servicePixelValue:y}=me.F_,h=this.rasterFields.some(e=>e.name===d),g=this.graphicOrigin;for(let e=0;e<l.length;e++){const t=l[e];if(null!=i){const n=u[e],a=this.rasterFunction&&o&&o.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?o[r.indexOf(this.rasterFunction.functionName)]:i;if("nodata"===n.toLowerCase()&&!s)continue;h&&(t.attributes[d]=n),t.attributes[y]=a,this._updateFeatureWithMagDirValues(t,n);const l=this.fields&&this.fields.length>0;let p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:i:a;this.rasterFunction||(p=l?n:i),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,t.origin=g,n&&this._updateFeatureWithDomainValues(t),r&&o&&r.length===o.length)for(let e=0;e<r.length;e++){const i=`${me.F_.servicePixelValue}.${r[e]}`;t.attributes[i]=o[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=(0,T.Rp)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,T.Rp)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const a=r.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));a&&a[0]&&s.forEach(t=>{const i=me.ER+t.name;e.attributes[i]=a[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map(e=>parseFloat(e)),r=i.map(e=>[e]),s=i.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new ce.A({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new F.A(0,0,0,0,this.spatialReference)});const a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,O.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[me.F_.magnitude]=a[0],e.attributes[me.F_.direction]=a[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>"coded-value"===e.domain?.type);null!=t&&t.forEach(t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find(e=>e.code===i);r&&(e.attributes[t.name]=r.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach(e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}})}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:i,maxRecordCount:r}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),o=t.includes("edit"),l=t.includes("mensuration")&&a,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),c=this._isMosaicDataset(e)&&t.includes("catalog"),m=t.includes("download"),d=i>=10.7&&n||i>=11.4&&(n||l&&u.includes("3d")),y=c&&e.fields&&e.fields.length>0,h=y&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:i>=11.2&&c,supportsImageToMapMultiray:i>=11.2&&c,supportsMapToImage:i>=11.2&&c,supportsFindImages:i>=11.2&&c,supportsGetImageUrl:i>=11.3&&m,supportsMeasure:l,supportsMeasureFromImage:i>=11.2,supportsDownload:m,supportsQuery:y,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:d,supportsComputePixelLocation:i>=10.7&&c,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&c,supportsAdd:o,supportsDelete:o,supportsEditing:o,supportsUpdate:o,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:r,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,supportsStatisticsAggregatedIds:!!h?.supportsAggregateIds,supportsStatistics:!!h?.supportsStatistics,supportsOrderBy:!!h?.supportsOrderBy,supportsDistinct:!!h?.supportsDistinct,supportsPagination:!!h?.supportsPagination,supportsPaginationOnAggregatedQueries:!!h?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!h?.useStandardizedQueries,supportsPercentileStatistics:!!h?.supportsPercentileStatistics,supportsCentroid:!!h?.supportsReturningGeometryCentroid,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!!h?.supportsQueryWithDistance,supportsOutDistance:!!h?.supportsOutDistance,supportsExtent:!!h?.supportsReturningQueryExtent,supportsGeometryProperties:!!h?.supportsReturningGeometryProperties,supportsHavingClause:!!h?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:h?.supportsSqlExpression??!!h,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!h?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function n(e){return e?.path??""}return(0,s.Cg)([(0,p.MZ)({clonable:!1})],r.prototype,"_functionRasterInfos",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"_serviceSupportsMosaicRule",void 0),(0,s.Cg)([(0,Ke.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],r.prototype,"readServiceSupportsMosaicRule",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"_rasterFunctionNamesIndex",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"_projectedFullExtent",void 0),(0,s.Cg)([(0,p.MZ)({clonable:!1})],r.prototype,"_exportTileQueue",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"adjustAspectRatio",void 0),(0,s.Cg)([(0,p.MZ)({type:[M.jz],json:{write:!0}})],r.prototype,"bandIds",void 0),(0,s.Cg)([(0,Ke.w)("bandIds")],r.prototype,"readBandIds",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],r.prototype,"capabilities",void 0),(0,s.Cg)([(0,Ke.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],r.prototype,"readCapabilities",null),(0,s.Cg)([(0,p.MZ)({type:Number})],r.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,ne.K)("compressionQuality")],r.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,p.MZ)({type:Number})],r.prototype,"compressionTolerance",void 0),(0,s.Cg)([(0,ne.K)("compressionTolerance")],r.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"defaultMosaicRule",void 0),(0,s.Cg)([(0,Ke.w)("defaultMosaicRule",["defaultMosaicMethod"])],r.prototype,"readDefaultMosaicRule",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],r.prototype,"definitionExpression",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,constructOnly:!0})],r.prototype,"exportImageServiceParameters",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,type:[oe.A]})],r.prototype,"fields",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"fieldsIndex",null),(0,s.Cg)([(0,p.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],r.prototype,"format",null),(0,s.Cg)([(0,Ke.w)("service","format",["serviceDataType"])],r.prototype,"readFormat",null),(0,s.Cg)([(0,p.MZ)({type:F.A})],r.prototype,"fullExtent",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"hasMultidimensions",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"maxImageHeight"}}})],r.prototype,"imageMaxHeight",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"maxImageWidth"}}})],r.prototype,"imageMaxWidth",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{type:se.SZ.jsonValues,read:se.SZ.read,write:se.SZ.write}})],r.prototype,"interpolation",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"minScale",void 0),(0,s.Cg)([(0,Ke.w)("service","minScale")],r.prototype,"readMinScale",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"maxScale",void 0),(0,s.Cg)([(0,Ke.w)("service","maxScale")],r.prototype,"readMaxScale",null),(0,s.Cg)([(0,p.MZ)({type:re.A})],r.prototype,"mosaicRule",null),(0,s.Cg)([(0,Ke.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],r.prototype,"readMosaicRule",null),(0,s.Cg)([(0,ne.K)("mosaicRule")],r.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"multidimensionalInfo",void 0),(0,s.Cg)([(0,p.MZ)({type:pe.A,json:{write:!0}})],r.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,p.MZ)({json:{type:[Number,[Number]],write:!0}})],r.prototype,"noData",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{type:se.hm.jsonValues,read:se.hm.read,write:se.hm.write}})],r.prototype,"noDataInterpretation",void 0),(0,s.Cg)([(0,p.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],r.prototype,"objectIdField",void 0),(0,s.Cg)([(0,Ke.w)("objectIdField")],r.prototype,"readObjectIdField",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"geometryType",void 0),(0,s.Cg)([(0,p.MZ)({})],r.prototype,"typeIdField",void 0),(0,s.Cg)([(0,p.MZ)({})],r.prototype,"types",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,s.Cg)([(0,p.MZ)({type:Function})],r.prototype,"pixelFilter",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"raster",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"sourceType",void 0),(0,s.Cg)([(0,Ke.w)("sourceType",["serviceSourceType","fields"])],r.prototype,"readSourceType",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"viewId",void 0),(0,s.Cg)([(0,p.MZ)({types:ge.uy})],r.prototype,"renderer",null),(0,s.Cg)([(0,p.MZ)({types:ge.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:ge.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],r.prototype,"internalRenderer",null),(0,s.Cg)([(0,Ke.w)("internalRenderer")],r.prototype,"readRenderer",null),(0,s.Cg)([(0,ne.K)("internalRenderer")],r.prototype,"writeRenderer",null),(0,s.Cg)([(0,p.MZ)({clonable:!1})],r.prototype,"symbolizer",void 0),(0,s.Cg)([(0,p.MZ)(Z.ke)],r.prototype,"opacity",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"rasterFields",null),(0,s.Cg)([(0,p.MZ)({constructOnly:!0})],r.prototype,"rasterFunctionInfos",void 0),(0,s.Cg)([(0,p.MZ)({type:J.A,json:{name:"renderingRule"}})],r.prototype,"rasterFunction",null),(0,s.Cg)([(0,Ke.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],r.prototype,"readRasterFunction",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"serviceDataType",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,type:D.A})],r.prototype,"spatialReference",void 0),(0,s.Cg)([(0,Ke.w)("spatialReference",["spatialReference","extent"])],r.prototype,"readSpatialReference",null),(0,s.Cg)([(0,p.MZ)({type:se.e8.apiValues,json:{read:se.e8.read,type:se.e8.jsonValues}})],r.prototype,"pixelType",void 0),(0,s.Cg)([(0,ne.K)("pixelType")],r.prototype,"writePixelType",null),(0,s.Cg)([(0,p.MZ)({constructOnly:!0,type:de.A})],r.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,p.MZ)(Z.OZ)],r.prototype,"url",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,s.Cg)([(0,Ke.w)("version",["currentVersion","fields","timeInfo"])],r.prototype,"readVersion",null),r=(0,s.Cg)([(0,p.$K)("esri.layers.mixins.ArcGISImageService")],r),r};var ri=i(18768),si=i(63074),ni=i(69208),ai=i(34287),oi=i(8303),li=i(72545),ui=i(56551),pi=i(54310),ci=i(25036),mi=i(82935),di=i(91908),yi=i(24212),hi=i(30291),gi=i(88625),fi=i(59923);let wi=class extends((0,si.dM)((0,mi.e)((0,ci.j)((0,ai.q)((0,oi.A)((0,ui.H)(ii((0,li.G)((0,pi.J)((0,ni.d)((0,ri.b)((0,l.M)((0,a.OU)(f.A)))))))))))))){constructor(...e){super(...e),this.charts=null,this.graphicOrigin=new g(this),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.type="imagery",this._debouncedSaveOperations=(0,u.sg)(async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case 0:return s(this,t);case 1:return n(this,r,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(u.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:t}=this,i=new Set,r=me.F_.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=me.Oo.toLowerCase(),a=`${me.F_.servicePixelValue.toLowerCase()}.`;for(const e of t){const t=e.name.toLowerCase();t===r||t.startsWith(a)||s&&t.startsWith(n)||i.add(e.name)}const o=(0,hi.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:l}=this;return o?.fieldInfos&&l&&(0,me.h4)(o.fieldInfos,l),o}queryFeatures(e,t){return this.queryRasters(e,t).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}serviceSupportsSpatialReference(e){return(0,di.D)(this,e)}write(e,t){return this._isPreviewLayer?((0,fi.U4)(t,this,"preview layer cannot be saved"),null):super.write(e,t)}_validateElevationInfo(e){(0,yi.XF)(o.A.getLogger(this),(0,yi.$7)("Imagery layers","relative-to-scene",e)),(0,yi.XF)(o.A.getLogger(this),(0,yi.tW)("Imagery layers",e))}};(0,s.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],wi.prototype,"charts",void 0),(0,s.Cg)([(0,p.MZ)({type:gi.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],wi.prototype,"elevationInfo",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0,clonable:!1})],wi.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,p.MZ)(Z.fV)],wi.prototype,"legendEnabled",null),(0,s.Cg)([(0,p.MZ)({type:["show","hide"]})],wi.prototype,"listMode",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],wi.prototype,"isReference",void 0),(0,s.Cg)([(0,p.MZ)({type:["ArcGISImageServiceLayer"]})],wi.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,p.MZ)(Z.M6)],wi.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,p.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],wi.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],wi.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,p.MZ)(Z.PY)],wi.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],wi.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],wi.prototype,"_isPreviewLayer",null),wi=(0,s.Cg)([(0,p.$K)("esri.layers.ImageryLayer")],wi);const vi=wi},18768(e,t,i){i.d(t,{b:()=>o});var r=i(5482),s=i(53966),n=i(91429),a=i(60694);const o=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],i),i}},56551(e,t,i){i.d(t,{H:()=>c});var r=i(5482),s=i(91429),n=i(69540),a=i(25482),o=i(56507),l=i(94359),u=i(93223);let p=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],p.prototype,"method",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"value",void 0),(0,r.Cg)([(0,s.MZ)({type:[o.jz],json:{write:{isRequired:!0}}})],p.prototype,"bandIds",void 0),(0,r.Cg)([(0,s.MZ)({types:l.uy,json:{write:!0,origins:{"web-scene":{types:l.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],p.prototype,"renderer",void 0),p=(0,r.Cg)([(0,s.$K)("esri.renderers.support.RasterPresetRenderer")],p);const c=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,r.Cg)([(0,s.MZ)({type:[p],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},91908(e,t,i){i.d(t,{D:()=>n});var r=i(60694);const s=[];function n(e,t){if((0,r.Wo)(e.url??""))return!0;const{wkid:i}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},82371(e,t,i){i.d(t,{E9:()=>y,Tw:()=>m,X6:()=>d});var r=i(11254),s=i(5443),n=i(86738),a=i(16930),o=i(87186),l=i(20223),u=i(2272),p=i(22671);async function c(e,t,i){const c=(0,u.Dl)(e),{rasterFunction:m,sourceJSON:d}=t||{},y=m?JSON.stringify(m.rasterFunctionDefinition||m):null,h=(0,u.lF)({...c.query,renderingRule:y,f:"json"}),g=(0,u.jV)(h,i);e=c.path;const f=d||await(0,r.A)(e,g).then(e=>e.data),w=f.hasRasterAttributeTable?(0,r.A)(`${e}/rasterAttributeTable`,g):null,v=f.hasColormap?(0,r.A)(`${e}/colormap`,g):null,R=f.hasHistograms?(0,r.A)(`${e}/histograms`,g):null,C=f.currentVersion>=10.3?(0,r.A)(`${e}/keyProperties`,g):null,b=f.hasMultidimensions?(0,r.A)(`${e}/multidimensionalInfo`,g):null,S=f.currentVersion>=10.81?(0,r.A)(`${e}/statistics`,g):null,x=await Promise.allSettled([w,v,R,C,b,S]),M=s.A.fromJSON(f.extent),I=Math.ceil(M.width/f.pixelSizeX-.1),F=Math.ceil(M.height/f.pixelSizeY-.1),A=a.A.fromJSON(f.spatialReference||f.extent.spatialReference),D="fulfilled"===x[0].status?x[0].value?.data:null,P=D?.features?.length?p.A.fromJSON(D):null,T="fulfilled"===x[1].status?x[1].value?.data.colormap:null,j=T?.length?T:null,N="fulfilled"===x[2].status?x[2].value?.data.histograms:null,O=N?.[0]?.counts?.length?N:null,Z="fulfilled"===x[3].status?x[3].value?.data??{}:{},_="fulfilled"===x[4].status?x[4].value?.data.multidimensionalInfo:null,V=_?.variables?.length?_:null;V&&V.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});let q=null;const E="fulfilled"===x[5].status?x[5].value?.data.statistics:null;if(E&&E.length===f.bandCount)q=E.map(e=>({avg:e.mean,count:e.count,max:e.max,median:e.median,min:e.min,mode:e.mode,stddev:e.standardDeviation,sum:e.sum}));else if(f.minValues&&f.minValues.length===f.bandCount){q=[];for(let e=0;e<f.minValues.length;e++)q.push({min:f.minValues[e],max:f.maxValues[e],avg:f.meanValues[e],stddev:f.stdvValues[e]})}const{defaultVariable:J,serviceDataType:G}=f;J&&J!==Z.DefaultVariable&&(Z.DefaultVariable=J),G?.includes("esriImageServiceDataTypeVector")&&!G.includes(Z.DataType)&&(Z.DataType=G.replace("esriImageServiceDataType",""));let z=f.noDataValue;f.noDataValues?.length&&f.noDataValues.some(e=>e!==z)&&(z=f.noDataValues);const L=f.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:f.extent.xmin,y:f.extent.ymax,spatialReference:A}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(I,F))/Math.LN2-8)),transposeInfo:f.transposeInfo}):void 0;return new o.A({width:I,height:F,bandCount:f.bandCount,extent:s.A.fromJSON(f.extent),spatialReference:A,pixelSize:new n.A({x:f.pixelSizeX,y:f.pixelSizeY,spatialReference:A}),pixelType:f.pixelType.toLowerCase(),statistics:q,attributeTable:P,colormap:j,histograms:O,keyProperties:Z,noDataValue:z,multidimensionalInfo:V,storageInfo:L})}function m(e,t,i){return c(e,{sourceJSON:t},i)}function d(e,t,i){return c(e,{rasterFunction:t},i)}function y(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},20615(e,t,i){i.d(t,{I:()=>a});var r=i(2272),s=i(80893),n=i(97552);function a(e,t,i,a){return(0,s.gW)((0,r.Dl)(e),n.A.from(t),i,a)}},74910(e,t,i){i.d(t,{L:()=>o});var r=i(5443),s=i(2272),n=i(80893),a=i(97552);async function o(e,t,i){const o=(0,s.Dl)(e),l=await(0,n.Jf)(o,a.A.from(t),{...i}),u=l.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.count,extent:null}:{count:l.count,extent:r.A.fromJSON(u)}}},78286(e,t,i){i.d(t,{V:()=>a});var r=i(2272),s=i(80893),n=i(97552);async function a(e,t,i,a){const o=(0,r.Dl)(e),l=await(0,s.Pk)(o,n.A.from(t),i,a);return l.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(l.uniqueIds)??[]}},99199(e,t,i){i.d(t,{e:()=>l,s:()=>o});var r=i(2272),s=i(80893),n=i(22671),a=i(97552);async function o(e,t,i,r){const s=await l(e,t,i,r);return n.A.fromJSON(s)}function l(e,t,i,n){const o=(0,r.Dl)(e),l={...i},u=a.A.from(t);return(0,s.eW)(o,u,u.sourceSpatialReference,l,n)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8468],{38961(e,t,r){r.d(t,{A:()=>c});var i=r(5482),o=r(7762),n=r(36708),s=r(10107),a=r(64108),l=r(80559);let u=class extends o.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,l.fm)(()=>this._refresh(),n.OH))}destroy(){this.getCollections=null}_refresh(){const e=this.getCollections?.();if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new o.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i.Cg)([(0,s.MZ)()],u.prototype,"getCollections",void 0),(0,i.Cg)([(0,s.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i.Cg)([(0,s.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i.Cg)([(0,a.$)("esri.core.CollectionFlattener")],u);const c=u},46140(e,t,r){r.d(t,{A:()=>o});var i=r(49186);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new i.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!s.test(n))throw new i.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),l=parseInt(n,10);return new o(a,l,t)}}},6797(e,t,r){r.d(t,{Ui:()=>p});var i=r(69622),o=r(7762),n=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof o.A?Object.keys(e.items):a(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof o.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),o=l(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=o.filter(e=>!i.includes(e)),p=i.filter(e=>!o.includes(e)),y=i.filter(r=>o.includes(r)&&u(e,r)!==u(t,r)).concat(n,p).sort(),h=c(e);if(h&&s.has(h)&&y.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=a(e)&&a(t);for(const i of y){const o=u(e,i),n=u(t,i);let s;if((m||"function"!=typeof o&&"function"!=typeof n)&&o!==n&&(null!=o||null!=n)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(o,n);else if(o instanceof Date&&n instanceof Date){if(o.getTime()===n.getTime())continue;s={type:"complete",oldValue:o,newValue:n}}else s="object"==typeof o&&"object"==typeof n&&c(o)===c(n)?d(o,n):{type:"complete",oldValue:o,newValue:n};null!=s&&(null!=f?f.diff[i]=s:f={type:"partial",diff:{[i]:s}})}}return f}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},81583(e,t,r){r.d(t,{L:()=>a,g:()=>s});var i=r(60999),o=r(7762),n=r(92474);async function s(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],s=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?s(...t):o.A.isCollection(t)?t.forEach(e=>s(e)):(0,n.Zm)(t)&&r.push(t))};t(s);let a=null;if(await(0,i.Tj)(r,async e=>{const t=await(0,i.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)}),a)throw a.error;return e}},64314(e,t,r){r.d(t,{A:()=>_});var i=r(5482),o=r(69622),n=r(49186),s=r(44208),a=r(17676),l=r(84952),u=r(91429),c=r(21325),d=r(20557),p=r(2272),y=r(65615),h=r(20615),f=r(74910),m=r(78286),g=r(99199),b=r(62815),w=r(63746);class S{constructor(e){this._options=e,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=S._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e&&(this.featureSet.objectIdFieldName=e)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:e,features:t}=this.featureSet;if(e)for(const{geometry:r}of t)r&&(r.spatialReference=e)}feature(){this._attributesClass??=(0,w._7)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([e,t]){this.featureSet.features.at(-1).centroid={x:e,y:t}}geometry(e,t,r){this._previousX=this._previousY=0,this._lengths=r;let i,{hasZ:o,hasM:n}=this.featureSet;switch(o??=!1,n??=!1,this._i=0,this._vertex=[0,0],o&&this._vertex.push(0),n&&this._vertex.push(0),this._finishVertex=S._finishVertexNonPoint,t){case"esriGeometryPoint":this._point={x:0,y:0},i=this._point,this._finishVertex=o?n?S._finishVertexPointXYZM:S._finishVertexPointXYZ:n?S._finishVertexPointXYM:S._finishVertexPointXY;break;case"esriGeometryMultipoint":i={points:[],hasZ:o,hasM:n},this._part=i.points,this._parts=[];break;case"esriGeometryPolyline":i={paths:[],hasZ:o,hasM:n},this._parts=i.paths,this._part=[];break;case"esriGeometryPolygon":i={rings:[],hasZ:o,hasM:n},this._parts=i.rings,this._part=[]}1===e?(this.featureSet.queryGeometry=i,this.featureSet.queryGeometryType=t,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=i}coord(e){const t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,this._transformInPlace&&(t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._transformInPlace(t)),this._finishVertex(this))}curvedGeometry(e,t,r,i){let o,{hasZ:n,hasM:s}=this.featureSet;switch(n??=!1,s??=!1,e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`);case"esriGeometryPolyline":o={paths:[],curvePaths:[],hasZ:n,hasM:s},this._parts=o.curvePaths,this._part=[];break;case"esriGeometryPolygon":o={rings:[],curveRings:[],hasZ:n,hasM:s},this._parts=o.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=o}startCurvedPart(e){this._part.push(this._transform(e))}finishCurvedPart(e){this._parts.push(this._part),this._part=[]}lineSegment(e,t){this._part.push(this._transform(t))}bezierSegment(e,t,r,i){this._part.push({b:[this._transform(t),this._transformXY(r),this._transformXY(i)]})}circularArcSegment(e,t,r){this._part.push({c:[this._transform(t),this._transformXY(r)]})}ellipticArcSegment(e,t,r,i,o,n,s,a){this._part.push({a:[this._transform(t),this._transformXY(r),i,o,n,s,a]})}static _finishVertexPointXY({_point:e,_vertex:t}){[e.x,e.y]=t}static _finishVertexPointXYZ({_point:e,_vertex:t}){[e.x,e.y,e.z]=t}static _finishVertexPointXYM({_point:e,_vertex:t}){[e.x,e.y,e.m]=t}static _finishVertexPointXYZM({_point:e,_vertex:t}){[e.x,e.y,e.z,e.m]=t}static _finishVertexNonPoint(e){const{_part:t,_parts:r,_lengths:i,_vertex:o}=e;t.push([...o]),t.length<i[r.length]||(e._previousX=e._previousY=0,e._part=[],r.push(t))}_setVertexTransformer(){const{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:r,transform:i}=this.featureSet,o=r?(0,b.d)(e,t):1;this._transformInPlace??=(0,w.Mv)(this.featureSet,o),this._transformInPlaceXY??=(0,w.Mv)({transform:i})}_transform(e){const t=[...e];return this._transformInPlace?.(t),t}_transformXY(e){const t=[e[0],e[1]];return this._transformInPlaceXY?.(t),t}}var v=r(80893),I=r(22671),M=r(97552);async function C(e,t,r,i){const o=(0,p.Dl)(e),n={...r},s=M.A.from(t),a=!s.quantizationParameters;return await(0,v.IJ)(o,s,new S({sourceSpatialReference:s.sourceSpatialReference,applyTransform:a}),n,i)}let _=class extends o.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,l.An)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],o=(0,s.A)("featurelayer-pbf-statistics");let n;if(this.pbfSupported&&(!i||o)&&(!e.returnTrueCurves||this.pbfSupportedWithCurves))try{n=await C(this.url,r,t,{uniqueIdFields:this.uniqueIdFields})}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return n??=await(0,g.e)(this.url,r,t,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(n.fields),n}async featureSetFromJSON(e,t,i){if(!this._queryGet3DObjectFormat(e)||null==this.infoFor3D||!t.features)return I.A.fromJSON(t);const{meshFeatureSetFromJSON:o}=await(0,a.qr)(Promise.all([r.e(1843),r.e(7005),r.e(1653),r.e(118),r.e(6366)]).then(r.bind(r,40050)),i);return o(e,this.infoFor3D,t)}executeForCount(e,t){return(0,h.I)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(e,t){return(0,f.L)(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,m.V)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(e,t){const[{default:i},{executeRelationshipQuery:o}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),t);let n=i.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(n=n.clone(),n.gdbVersion=n.gdbVersion||this.gdbVersion,n.dynamicDataSource=n.dynamicDataSource||this.dynamicDataSource),o(this.url,n,t)}async executeRelationshipQueryForCount(e,t){const[{default:i},{executeRelationshipQueryForCount:o}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),t);let n=i.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(n=n.clone(),n.gdbVersion=n.gdbVersion||this.gdbVersion,n.dynamicDataSource=n.dynamicDataSource||this.dynamicDataSource),o(this.url,n,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:i,fetchAttachments:o,processAttachmentQueryResult:n}=await(0,a.qr)(r.e(9239).then(r.bind(r,9239)),t),s=(0,p.Dl)(this.url);return n(s,await(this.queryAttachmentsSupported?i(s,e,t):o(s,e,t)))}async executeAttributeBinsQuery(e,t){const{executeAttributeBinsQuery:i}=await(0,a.qr)(r.e(3103).then(r.bind(r,33103)),t);return i(this.parsedUrl,e,t)}async executePivotQuery(e,t){const{executePivotQuery:i}=await(0,a.qr)(r.e(566).then(r.bind(r,80566)),t);return i(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:i}=await(0,a.qr)(r.e(1273).then(r.bind(r,11273)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:i}=await(0,a.qr)(r.e(1277).then(r.bind(r,21277)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:i}=await(0,a.qr)(r.e(8018).then(r.bind(r,8018)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:i}=await(0,a.qr)(r.e(980).then(r.bind(r,10980)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=M.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?y.A.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this,i=this._queryGet3DObjectFormat(e);if(null!=r&&i){if(t=t===e?t.clone():t,t.formatOf3DObjects=i,t.outSpatialReference&&!(0,c.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new n.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:i,originY:o,originZ:n,translationX:s,translationY:a,translationZ:l,scaleX:u,scaleY:c,scaleZ:d,rotationX:p,rotationY:y,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,o,n,s,a,l,u,c,d,p,y,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryGet3DObjectFormat({returnGeometry:e,multipatchOption:t,outStatistics:r}){return!0!==e||"xyFootprint"===t||r?null:(0,d.Hz)(this.infoFor3D)}};(0,i.Cg)([(0,u.MZ)({type:y.A})],_.prototype,"dynamicDataSource",void 0),(0,i.Cg)([(0,u.MZ)()],_.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],_.prototype,"gdbVersion",void 0),(0,i.Cg)([(0,u.MZ)()],_.prototype,"infoFor3D",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i.Cg)([(0,u.MZ)()],_.prototype,"pbfSupported",void 0),(0,i.Cg)([(0,u.MZ)()],_.prototype,"pbfSupportedWithCurves",void 0),(0,i.Cg)([(0,u.MZ)()],_.prototype,"queryAttachmentsSupported",void 0),(0,i.Cg)([(0,u.MZ)()],_.prototype,"relativeTimeBinWindow",void 0),(0,i.Cg)([(0,u.MZ)()],_.prototype,"sourceSpatialReference",void 0),(0,i.Cg)([(0,u.MZ)()],_.prototype,"uniqueIdFields",void 0),(0,i.Cg)([(0,u.MZ)({type:String})],_.prototype,"url",void 0),_=(0,i.Cg)([(0,u.$K)("esri.layers.graphics.sources.support.QueryTask")],_)},52136(e,t,r){r.d(t,{p:()=>n});var i=r(5482),o=r(91429);const n=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,o.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.APIKeyMixin")],r),r}},98534(e,t,r){r.d(t,{V:()=>g});var i=r(5482),o=r(11254),n=r(5479),s=r(91869),a=r(17676),l=r(84952),u=r(46140),c=r(91429),d=r(5443),p=r(16930),y=r(60694),h=r(10873),f=r(10407),m=r(36005);const g=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,o="tile"!==i&&!!t.supportsDynamicLayers,n=r.includes("query"),s=r.includes("map"),a=!!t.exportTilesAllowed,l=r.includes("tilemap"),c=r.includes("data"),d="tile"!==i&&(!t.tileInfo||o),p="tile"!==i&&(!t.tileInfo||o),y="tile"!==i,h="tile"!==i&&o&&t.currentVersion>=11.1,f=t.cimVersion?u.A.parse(t.cimVersion):null,m=f?.greaterEqual(1,4)??!1,g=f?.greaterEqual(2,0)??!1;return{operations:{supportsExportMap:s,supportsExportTiles:a,supportsIdentify:n,supportsQuery:c,supportsTileMap:l},exportMap:s?{supportsArcadeExpressionForLabeling:m,supportsCIMSymbols:g,supportsDynamicLayers:o,supportsSublayerOrderBy:h,supportsSublayerDefinitionExpression:p,supportsSublayerVisibility:d,supportsSublayersChanges:y}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,f.bK)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then(e=>e.find(e=>"Feature Service"===e.type)??null,()=>null));const r=await this._relatedFeatureServicePromise;return(0,a.Te)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,f.bK)(this.portalItem)&&e.originIdOf("url")<2){const i=await this.fetchRelatedService(t);i&&(e.url=(0,l.fj)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let n;if("data-layer"===r.type)n=(await(0,o.A)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else{let o=e.id;"map-layer"===r?.type&&(o=r.mapLayerId);try{n=(await this.fetchAllLayersAndTables(t)).get(o)}catch{}if(i&&e.originIdOf("url")>2)try{const e=await this._fetchAllLayersAndTablesFromService(i),t=(0,y.qg)(i)?.sublayer??r.mapLayerId,o=structuredClone(e.get(t));if(null!=o){const e=["drawingInfo","maxScale","minScale","name"];for(const t of e)delete o[t];n={...n,...o}}}catch{}}return n}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,y.qg)(e),i=(0,s.tE)(this._allLayersAndTablesMap,r?.url.path,()=>(0,o.A)((0,l.fj)(r?.url.path,"/layers"),{query:{f:"json",...this.customParameters,token:this.apiKey}}).then(async e=>{const t=new Map,{layers:i,tables:s}=e.data,a=[...i??[],...s??[]];for(const e of a)t.set(e.id,e);if((0,n.zN)(t.values(),e=>null==e.capabilities||null==e.extent)){const{data:e}=await(0,o.A)(r?.url.path,{query:{f:"json",...this.customParameters,token:this.apiKey}}).catch(()=>({data:{capabilities:"",fullExtent:void 0}}));for(const r of t.values())r.capabilities??=e.capabilities??"",r.extent??=e.fullExtent}return{result:t}},e=>({error:e}))),u=await i;if((0,a.Te)(t),"result"in u)return u.result;throw u.error}};return(0,i.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"capabilities",void 0),(0,i.Cg)([(0,m.w)("service","capabilities",["capabilities","cimVersion","currentVersion","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],r.prototype,"readCapabilities",null),(0,i.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,c.MZ)({type:d.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)(h.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],r.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)(h.M6)],r.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:p.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,m.w)("service","version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],r.prototype,"readVersion",null),r=(0,i.Cg)([(0,c.$K)("esri.layers.mixins.ArcGISMapService")],r),r}},32756(e,t,r){r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>l});var i=r(5482),o=r(93637),n=r(91429),s=r(91880);function a(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const o=new s.A;return o.read(i,r),[o]}const l={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const n=e.find(e=>!!e.field);n&&(0,o.sM)(r,[n.toJSON()],t)}}}},u=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,n.MZ)(l)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.OrderedLayer")],r),r}},91921(e,t,r){r.d(t,{I:()=>m});var i=r(5482),o=r(7762),n=r(38961),s=r(49186),a=r(53966),l=r(36708),u=r(91429),c=r(35666),d=r(88620),p=r(15775),y=r(63389);const h=o.A.ofType(p.A);function f(e,t){e&&e.forEach(e=>{t(e),e.sublayers&&e.sublayers.length&&f(e.sublayers,t)})}const m=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this.allSublayers=new n.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={2:{},3:{},4:{},5:{},6:{}},this.subtables=null,this.addHandles([(0,l.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),l.OH),(0,l.wB)(()=>this.subtables,(e,t)=>this._handleSublayersChange(e,t),l.OH)])}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,c.aB)(t.origin);if(i<2)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>2)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:o,origin:n}=this.createSublayersForOrigin("web-document"),s=(0,d.oY)(this);s.setDefaultOrigin(n),this._set("sublayers",new h(o)),s.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find(t=>t.id===e)}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){let t;const r=(0,c.aB)("web-document"===e?"web-map":e);let i=2,o=this.sublayersSourceJSON[2].layers,n=this.sublayersSourceJSON[2].context,s=null;const a=[3,4,5].filter(e=>e<=r);for(const e of a){const t=this.sublayersSourceJSON[e];(0,y._X)(t.layers)&&(i=e,o=t.layers,n=t.context,t.visibleLayers&&(s={visibleLayers:t.visibleLayers,context:t.context}))}const l=[3,4,5].filter(e=>e>i&&e<=r);let u=null;for(const e of l){const{layers:r,visibleLayers:i,context:o}=this.sublayersSourceJSON[e];r&&(u={layers:r,context:o},t??=e),i&&(s={visibleLayers:i,context:o})}const d=function(e,t){const r=[],i={};return e?(e.forEach(e=>{const o=new p.A;if(o.read(e,t),i[o.id]=o,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(o)}else r.unshift(o)}),r):r}(o,n),m=new Map,g=new Set;if(u)for(const e of u.layers)m.set(e.id,e);if(s?.visibleLayers)for(const e of s.visibleLayers)g.add(e);return f(d,e=>{u&&e.read(m.get(e.id),u.context),s&&e.read({defaultVisibility:g.has(e.id)},s.context)}),{origin:(0,c.OL)(i),originWithPartialOverrides:t?(0,c.OL)(t):null,sublayers:new h({items:d})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this,e.layer=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null})],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",e=>{a.A.getLogger("esri.layers.TileLayer").error(new s.A("tilelayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()}),"sublayers-owner"))}};return(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"allSublayers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0,type:o.A.ofType(p.A)})],r.prototype,"serviceSublayers",void 0),(0,i.Cg)([(0,u.MZ)({value:null,type:h,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],r.prototype,"sublayers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"sublayersSourceJSON",void 0),(0,i.Cg)([(0,u.MZ)({type:h,json:{read:{source:"tables"}}})],r.prototype,"subtables",void 0),r=(0,i.Cg)([(0,u.$K)("esri.layers.mixins.SublayersOwner")],r),r}},28032(e,t,r){r.d(t,{A:()=>l});var i=r(5482),o=r(69540),n=r(25482),s=r(91429),a=r(56400);let l=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,i.Cg)([(0,s.MZ)()],l.prototype,"creatorField",void 0),(0,i.Cg)([(0,s.MZ)()],l.prototype,"creationDateField",void 0),(0,i.Cg)([(0,s.MZ)()],l.prototype,"editorField",void 0),(0,i.Cg)([(0,s.MZ)()],l.prototype,"editDateField",void 0),(0,i.Cg)([(0,s.MZ)()],l.prototype,"realm",void 0),(0,i.Cg)([(0,s.MZ)((0,a.P6)("dateFieldsTimeReference",!0))],l.prototype,"timeZone",void 0),l=(0,i.Cg)([(0,s.$K)("esri.layers.support.EditFieldsInfo")],l)},29005(e,t,r){r.d(t,{A:()=>u});var i=r(5482),o=r(69540),n=r(66552),s=r(25482),a=r(91429);const l=new n.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,a.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>d});var i=r(5482),o=r(69540),n=r(25482),s=r(91429),a=r(8631),l=r(29005),u=r(36005),c=r(43937);let d=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,a.r)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,c.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,s.MZ)({type:[l.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],d)},37352(e,t,r){r.d(t,{A:()=>l});var i,o=r(5482),n=r(7762),s=r(25482),a=r(91429);let l=i=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"floorField",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllMode",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllLevelIds",void 0),l=i=(0,o.Cg)([(0,a.$K)("esri.layers.support.LayerFloorInfo")],l)},91880(e,t,r){r.d(t,{A:()=>u});var i,o=r(5482),n=r(66552),s=r(25482),a=r(91429);const l=new n.J({asc:"ascending",desc:"descending"});let u=class extends s.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,o.Cg)([(0,a.MZ)({type:l.apiValues,json:{type:l.jsonValues,read:l.read,write:l.write}})],u.prototype,"order",void 0),u=i=(0,o.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],u)},45067(e,t,r){r.d(t,{A:()=>c});var i=r(5482),o=r(69540),n=r(66552),s=r(25482),a=r(91429);const l=new n.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new n.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let c=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],c.prototype,"cardinality",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"catalogID"}})],c.prototype,"catalogId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"composite",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"role",void 0),c=(0,i.Cg)([(0,a.$K)("esri.layers.support.Relationship")],c)},15775(e,t,r){r.d(t,{A:()=>pe});var i=r(5482),o=r(37838),n=r(11254),s=r(7762),a=r(49186),l=r(44208),u=r(4902),c=r(4718),d=r(92474),p=r(53966),y=r(25728),h=r(39516),f=r(84952),m=r(91429),g=r(56507),b=r(35666),w=r(88620),S=r(5443),v=r(16930),I=r(50498),M=r(89808),C=r(99959);const _=Symbol("isMapImageGraphicOriginSymbol");var x;class A extends C.A{get[(x=_,M.Q)](){return this.layer}constructor(e,t){super(),this[x]=!0,this.type="map-image",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}const F=Symbol("isTileGraphicOriginSymbol");var T;class O extends C.A{get[(T=F,M.Q)](){return this.layer}constructor(e,t){super(),this[T]=!0,this.type="tile",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var P,D=r(64314),L=r(32756),k=r(28032),Z=r(15426),E=r(33143),j=r(20437),q=r(95466),R=r(30524),V=r(46499),N=r(39383),z=r(37352),G=r(91880),B=r(45067),$=r(6666),J=r(41214),Q=r(2272),Y=r(65615),K=r(93849),U=r(54546),X=r(97552),W=r(30291),H=r(33910),ee=r(43440),te=r(36005),re=r(43937);function ie(e){return"esriSMS"===e?.type}function oe(e,t,r){const i=r.minimumWritableOrigin||r.origin;return!!i&&e.originIdOf(t)>=(0,b.aB)(i)}function ne(e,t,r){const i=oe(this,t,r);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function se(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(oe(this,t,r)||this._isOverridden(t))}}function ae(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function le(e,t,r){return{ignoreOrigin:!0,enabled:!!r?.writeSublayerStructure&&this.originIdOf(t)>2}}function ue(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||oe(this,t,r))}}let ce=0;const de=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let pe=class extends((0,y.M)((0,u.s)(d.x_))){static{P=this}constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=void 0,this.editFieldsInfo=null,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this.uniqueIdFields=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise(this.reload(e)),this}readCapabilities(e,t){t=t.layerDefinition||t;const{attachment:r,operations:{supportsQuery:i,supportsQueryAttachments:o},query:{supportsFormatPBF:n,supportsOrderBy:s,supportsPagination:a,relativeTimeBinWindow:l},data:{supportsAttachment:u},queryRelated:c}=(0,$.S$)(t,this.url);return{attachment:{supportsOrderByFields:r?.supportsOrderByFields??!1,supportsResize:r?.supportsResize??!1,supportsTypeWildcard:r?.supportsTypeWildcard??!1},exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:i,supportsQueryAttachments:o},data:{supportsAttachment:u},query:{relativeTimeBinWindow:l,supportsFormatPBF:n,supportsOrderBy:s,supportsPagination:a},queryRelated:c}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get effectiveUniqueIdFields(){return this.uniqueIdFields?[...this.uniqueIdFields]:this.objectIdField?[this.objectIdField]:[]}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new q.A(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get graphicOrigin(){if(!this.layer)return null;switch(this.layer.type){case"tile":return new O(this.layer,this);case"map-image":return new A(this.layer,this)}}get id(){return this._get("id")??ce++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,t){return"Table"===t.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map(e=>e.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach(t=>t.layer=e)}set listMode(e){this._set("listMode",e)}get loaded(){return super.loaded}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;const r=t.fields?.find(e=>"esriFieldTypeOID"===e.type);return r?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const{layerDefinition:r}=t;return 1-.01*(r?.transparency??r?.drawingInfo?.transparency??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,g.Vr)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:t,layer:r,uniqueIdFields:i,url:o}=this,{spatialReference:n}=r,s="gdbVersion"in r?r.gdbVersion:void 0,a=(0,l.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new D.A({fieldsIndex:t,gdbVersion:s,pbfSupported:a,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,relativeTimeBinWindow:e?.query?.relativeTimeBinWindow??0,sourceSpatialReference:n,uniqueIdFields:i,url:o})}set renderer(e){if((0,R.yp)(e,this.fieldsIndex),e)for(const t of e.symbols)if((0,H.wk)(t)){p.A.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new K.A({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}get sublayers(){return this._get("sublayers")}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,g.dp)(s.A.ofType(P),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map(e=>e.id).toArray().reverse())}readTitle(e,t){return t.layerDefinition?.name??t.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}readUniqueIdFields(e,t){return t.layerDefinition?.uniqueIdInfo?.OIDFieldContainsHashValue?t.layerDefinition.uniqueIdInfo.fields:null}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,f.x0)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,w.oY)(this),t=new P;return(0,w.oY)(t).store=e.clone(de),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,W.tn)(this,e)}createQuery(){return new X.A({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.sublayers)return null;const e=(await Promise.all([r.e(7632),r.e(9953),r.e(1017),r.e(993),r.e(4333),r.e(3781),r.e(3202)]).then(r.bind(r,53781))).default,{layer:t,url:i}=this;let o;if(i&&this.originIdOf("url")>2)o=new e({url:i});else{if(!t?.parsedUrl)throw new a.A("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const r=t.parsedUrl;o=new e({url:r.path}),r&&this.source&&("map-layer"===this.source.type?o.layerId=this.source.mapLayerId:o.dynamicDataSource=this.source)}}return null!=t?.refreshInterval&&(o.refreshInterval=t.refreshInterval),this.definitionExpression&&(o.definitionExpression=this.definitionExpression),this.floorInfo&&(o.floorInfo=(0,c.o8)(this.floorInfo)),this.originIdOf("labelingInfo")>2&&(o.labelingInfo=(0,c.o8)(this.labelingInfo)),this.originIdOf("labelsVisible")>0&&(o.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>0&&(o.legendEnabled=this.legendEnabled),this.originIdOf("visible")>0&&(o.visible=this.visible),this.originIdOf("minScale")>0&&(o.minScale=this.minScale),this.originIdOf("maxScale")>0&&(o.maxScale=this.maxScale),this.originIdOf("opacity")>0&&(o.opacity=this.opacity),this.originIdOf("popupTemplate")>0&&(o.popupTemplate=(0,c.o8)(this.popupTemplate)),this.originIdOf("renderer")>2&&(o.renderer=(0,c.o8)(this.renderer)),"data-layer"===this.source?.type&&(o.dynamicDataSource=this.source.clone()),this.originIdOf("title")>0&&(o.title=this.title),"map-image"===t?.type&&t.originIdOf("customParameters")>0&&(o.customParameters=t.customParameters),"tile"===t?.type&&t.originIdOf("customParameters")>0&&(o.customParameters=t.customParameters),o}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return(0,Z.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load();let r=U.A.from(e);const i=this.capabilities;if(!i?.data?.supportsAttachment)throw new a.A("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:o,objectIds:n,globalIds:s,num:l,size:u,start:c,where:d}=r;if(!i?.operations?.supportsQueryAttachments&&(o?.length>0||s?.length>0||u?.length>0||l||c||d))throw new a.A("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",r);if(!(n?.length||s?.length||d))throw new a.A("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",r);return!i?.attachment?.supportsOrderByFields&&r.orderByFields?.length&&(r=r.clone(),r.orderByFields=null),this.queryTask.executeAttachmentQuery(r,t)}async queryFeatureCount(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryFeatureCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features){const e=this.graphicOrigin;for(const t of r.features)t.sourceLayer=this,t.origin=e}return r}async queryObjectIds(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryObjectIds:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeatures(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryRelatedFeatures:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async reload(e){if("not-loaded"===this.loadStatus)return this.load(e).then(()=>{});const{layer:t,url:r}=this;if(!t&&!r)throw new a.A("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,n.A)(r,{query:{f:"json"},...e})).data;i&&(this.sourceJSON={...this.sourceJSON,...i},this.read({layerDefinition:i},{origin:"service",layer:t,url:(0,Q.Dl)(r)}))}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,h.mA)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((e,t)=>(e[t]=this.originIdOf(t),e),{}),o=Object.keys(i).some(e=>i[e]>2);if(o){const e=t.drawingInfo={};if(i.renderer>2&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>2&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>2)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some(e=>!e.labelPlacement)&&p.A.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,N.z)(this.labelingInfo,I.gy.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter(e=>e.labelPlacement).map(e=>e.toJSON({origin:"service",layer:this.layer}))}else e.showLabels=!1;i.opacity>2&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>2&&(t.orderBy=this.orderBy?.map(e=>e.toJSON())??null),t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)ie(e.symbol)&&t(e.symbol);"symbol"in e&&ie(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&ie(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let o,n;switch(e){case"definitionExpression":case"floorInfo":o="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":o="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":o="supportsDynamicLayers",n="supportsModification";break;case"orderBy":o="supportsSublayerOrderBy",n="supportsModification"}const s=(0,w.oY)(this).getDefaultOrigin();if("service"!==s){if(o&&!1===this.layer?.capabilities?.exportMap?.[o])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${o}'`);if(n&&!1===this.capabilities?.exportMap[n])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${n}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==s&&i!==t&&r?.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.removeAllHandles()),e&&(e.forEach(e=>{e.parent=this,e.layer=this.layer}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this.layer}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null}),e.on("before-changes",e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(p.A.getLogger(this).error(new a.A("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())})]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;p.A.getLogger(i).error(new a.A("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}static{this.test={isMapImageLayerOverridePolicy:e=>e===le||e===ae||e===ne,isTileImageLayerOverridePolicy:e=>e===se}}};(0,i.Cg)([(0,m.MZ)({type:ee.A,json:{name:"attributeTableInfo",write:{overridePolicy:ne},origins:{"web-scene":{write:!1}}}})],pe.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],pe.prototype,"capabilities",void 0),(0,i.Cg)([(0,te.w)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],pe.prototype,"readCapabilities",null),(0,i.Cg)([(0,m.MZ)()],pe.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,m.MZ)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:ne}}})],pe.prototype,"definitionExpression",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0,type:k.A,json:{origins:{service:{read:{source:"layerDefinition.editFieldsInfo"}}}}})],pe.prototype,"editFieldsInfo",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],pe.prototype,"effectiveScaleRange",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0,type:[String]})],pe.prototype,"effectiveUniqueIdFields",null),(0,i.Cg)([(0,te.w)("service","maxScaleRange",["minScale","maxScale"])],pe.prototype,"readMaxScaleRange",null),(0,i.Cg)([(0,m.MZ)({type:[j.A],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],pe.prototype,"fields",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],pe.prototype,"fieldsIndex",null),(0,i.Cg)([(0,m.MZ)({type:z.A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:ne},origins:{"web-scene":{read:!1,write:!1}}}})],pe.prototype,"floorInfo",null),(0,i.Cg)([(0,m.MZ)({type:S.A,json:{read:{source:"layerDefinition.extent"}}})],pe.prototype,"fullExtent",void 0),(0,i.Cg)([(0,m.MZ)({type:I.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:I.gy.read}}}}})],pe.prototype,"geometryType",void 0),(0,i.Cg)([(0,m.MZ)({type:String})],pe.prototype,"globalIdField",void 0),(0,i.Cg)([(0,te.w)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],pe.prototype,"readGlobalIdFieldFromService",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],pe.prototype,"graphicOrigin",null),(0,i.Cg)([(0,m.MZ)({type:g.jz,json:{write:{ignoreOrigin:!0}}})],pe.prototype,"id",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],pe.prototype,"isTable",void 0),(0,i.Cg)([(0,te.w)("service","isTable",["type"])],pe.prototype,"readIsTable",null),(0,i.Cg)([(0,m.MZ)({value:null,type:[V.A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:le}}})],pe.prototype,"labelingInfo",null),(0,i.Cg)([(0,re.K)("labelingInfo")],pe.prototype,"writeLabelingInfo",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:ae}}})],pe.prototype,"labelsVisible",null),(0,i.Cg)([(0,m.MZ)({value:null})],pe.prototype,"layer",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{write:{overridePolicy:se}}})],pe.prototype,"layerItemId",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:ue}}})],pe.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,m.MZ)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],pe.prototype,"listMode",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:0,json:{write:{overridePolicy:ae}}})],pe.prototype,"minScale",null),(0,i.Cg)([(0,te.w)("minScale",["minScale","layerDefinition.minScale"])],pe.prototype,"readMinScale",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:0,json:{write:{overridePolicy:ae}}})],pe.prototype,"maxScale",null),(0,i.Cg)([(0,te.w)("maxScale",["maxScale","layerDefinition.maxScale"])],pe.prototype,"readMaxScale",null),(0,i.Cg)([(0,m.MZ)()],pe.prototype,"objectIdField",void 0),(0,i.Cg)([(0,te.w)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],pe.prototype,"readObjectIdFieldFromService",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:ae}}})],pe.prototype,"opacity",null),(0,i.Cg)([(0,te.w)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],pe.prototype,"readOpacity",null),(0,i.Cg)([(0,re.K)("opacity")],pe.prototype,"writeOpacity",null),(0,i.Cg)([(0,m.MZ)({value:null,type:[G.A],json:{name:"layerDefinition.orderBy",read:{reader:L.Rr},write:{overridePolicy:ne},origins:{"web-scene":{read:!1,write:!1}}}})],pe.prototype,"orderBy",null),(0,i.Cg)([(0,m.MZ)({json:{type:g.jz,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:ae}}})],pe.prototype,"parent",void 0),(0,i.Cg)([(0,re.K)("parent")],pe.prototype,"writeParent",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:ue,writer(e,t,r){t[r]=!e}}}})],pe.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,m.MZ)({type:o.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:ue}}})],pe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],pe.prototype,"queryTask",null),(0,i.Cg)([(0,m.MZ)({type:[B.A],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],pe.prototype,"relationships",void 0),(0,i.Cg)([(0,m.MZ)({types:J.Hg,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:le},origins:{"web-scene":{types:J.XJ,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:le}}}}})],pe.prototype,"renderer",null),(0,i.Cg)([(0,m.MZ)({types:{key:"type",base:null,typeMap:{"data-layer":Y.A,"map-layer":K.A}},cast(e){if(e){if("mapLayerId"in e)return(0,g.PZ)(K.A,e);if("dataSource"in e)return(0,g.PZ)(Y.A,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:ae}}})],pe.prototype,"source",null),(0,i.Cg)([(0,m.MZ)()],pe.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,m.MZ)({type:v.A,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],pe.prototype,"spatialReference",void 0),(0,i.Cg)([(0,m.MZ)({value:null,json:{type:[g.jz],write:{target:"subLayerIds",allowNull:!0,overridePolicy:ae}}})],pe.prototype,"sublayers",null),(0,i.Cg)([(0,m.wg)("sublayers")],pe.prototype,"castSublayers",null),(0,i.Cg)([(0,re.K)("sublayers")],pe.prototype,"writeSublayers",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{name:"name",write:{overridePolicy:ue}}})],pe.prototype,"title",void 0),(0,i.Cg)([(0,te.w)("service","title",["name","layerDefinition.name"])],pe.prototype,"readTitle",null),(0,i.Cg)([(0,m.MZ)({type:String})],pe.prototype,"typeIdField",void 0),(0,i.Cg)([(0,m.MZ)({json:{read:!1},readOnly:!0,value:"sublayer"})],pe.prototype,"type",void 0),(0,i.Cg)([(0,te.w)("typeIdField",["layerDefinition.typeIdField"])],pe.prototype,"readTypeIdField",null),(0,i.Cg)([(0,m.MZ)({type:[E.A],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],pe.prototype,"types",void 0),(0,i.Cg)([(0,m.MZ)({type:[String],readOnly:!0})],pe.prototype,"uniqueIdFields",void 0),(0,i.Cg)([(0,te.w)("service","uniqueIdFields",["layerDefinition.uniqueIdInfo.OIDFieldContainsHashValue","layerDefinition.uniqueIdInfo.fields"])],pe.prototype,"readUniqueIdFields",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{name:"layerUrl",write:{overridePolicy:se}}})],pe.prototype,"url",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:ae}}})],pe.prototype,"visible",null),(0,i.Cg)([(0,re.K)("visible")],pe.prototype,"writeVisible",null),pe=P=(0,i.Cg)([(0,m.$K)("esri.layers.support.Sublayer")],pe)},33446(e,t,r){r.d(t,{Cp:()=>s,mn:()=>n});var i=r(49186),o=r(17676);async function n(e,t,r){let n;try{n=await a(e,r)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,o.Te)(r),n}async function s(e,t,r,n,s){let l;try{l=await a(e,s)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,o.Te)(s),l}async function a(e,t){const r=await createImageBitmap(e,{imageOrientation:t?.imageOrientation??"none"}),i=t?.type??(e instanceof Blob?e.type.startsWith("image/")?e.type:t?.allowDeriveTypeFromData?await async function(e){return e.byteLength<2?"unknown":137===e[0]&&80===e[1]?"image/png":71===e[0]&&73===e[1]?"image/gif":66===e[0]&&77===e[1]?"image/bmp":255===e[0]&&216===e[1]?"image/jpeg":"unknown"}(await e.bytes()):void 0:void 0);return new l(r,i)}class l{constructor(e,t){this.bitmap=e,this.type=t}get isOpaque(){return"image/jpeg"===this.type}}},63389(e,t,r){function i(e,t,r){const i=t.flatten(({sublayers:e})=>e).length;return i!==e.length||!!e.some(e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r)||!n(e,t)}function o(e,t,r){return!!e.some(e=>{const t=e.source,i=!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r);e.commitProperty("renderer"),e.commitProperty("labelingInfo"),e.commitProperty("opacity"),e.commitProperty("labelsVisible"),e.commitProperty("orderBy");const o=e.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1;return!i||e.originIdOf("renderer")>2||e.originIdOf("labelingInfo")>2||e.originIdOf("opacity")>2||e.originIdOf("labelsVisible")>2||o&&e.originIdOf("orderBy")>2})||!n(e,t)}function n(e,t){if(!e?.length||null==t)return!0;const r=t.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).map(e=>e.id).toArray();if(e.length>r.length)return!1;let i=0;const o=r.length;for(const{id:t}of e){for(;i<o&&r[i]!==t;)i++;if(i>=o)return!1}return!0}function s(e){return!!e&&e.some(e=>null!=e.minScale||null!=e.layerDefinition?.minScale)}r.d(t,{Sk:()=>o,Zx:()=>i,_X:()=>s})},73681(e,t,r){r.d(t,{n:()=>l});var i=r(49186),o=r(53966),n=r(46140),s=r(95466),a=r(55674);class l{static async from(e,t,r){const s=e.dictionary_version?n.A.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const y=await(0,a.xR)(e.expression,null,d);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!s||!s.greaterEqual(4,0);h&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:s});const f=new u(r,h);return new l(h,c,y,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new s.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new s.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},20615(e,t,r){r.d(t,{I:()=>s});var i=r(2272),o=r(80893),n=r(97552);function s(e,t,r,s){return(0,o.gW)((0,i.Dl)(e),n.A.from(t),r,s)}},74910(e,t,r){r.d(t,{L:()=>a});var i=r(5443),o=r(2272),n=r(80893),s=r(97552);async function a(e,t,r){const a=(0,o.Dl)(e),l=await(0,n.Jf)(a,s.A.from(t),{...r}),u=l.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.count,extent:null}:{count:l.count,extent:i.A.fromJSON(u)}}},78286(e,t,r){r.d(t,{V:()=>s});var i=r(2272),o=r(80893),n=r(97552);async function s(e,t,r,s){const a=(0,i.Dl)(e),l=await(0,o.Pk)(a,n.A.from(t),r,s);return l.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(l.uniqueIds)??[]}},99199(e,t,r){r.d(t,{e:()=>l,s:()=>a});var i=r(2272),o=r(80893),n=r(22671),s=r(97552);async function a(e,t,r,i){const o=await l(e,t,r,i);return n.A.fromJSON(o)}function l(e,t,r,n){const a=(0,i.Dl)(e),l={...r},u=s.A.from(t);return(0,o.eW)(a,u,u.sourceSpatialReference,l,n)}},63746(e,t,r){function i(e){return class{constructor(){for(const t of e)this[t]=null}}}function o(e,t=1){const{transform:r,hasZ:i,hasM:o}=e;if(null==r)return i&&1!==t?e=>{e[2]*=t}:null;const[n,s]=function(e,t,r,i){let{scale:o,translate:n,originPosition:s}=e;return"upperLeft"===s&&(o=o.map((e,t)=>1===t?-e:e)),t&&(o=o.map((e,t)=>2===t?e*i:e),n=n.map((e,t)=>2===t?e*i:e)),!t&&r&&(o=o.filter((e,t)=>2!==t),n=n.filter((e,t)=>2!==t)),[o,n]}(r,i,o,t),a=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==a||0!==e[t]);++t)e[t]=e[t]*n[t]+s[t]}}r.d(t,{Mv:()=>o,_7:()=>i}),r(53966)},41366(e,t,r){r.d(t,{K:()=>d,Q:()=>l});var i=r(5482),o=r(66552),n=r(53966),s=r(91429),a=r(93223);const l=(0,o.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",d=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&c||r&&u||null,t&&r&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(l,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,s.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},55674(e,t,r){r.d(t,{Ad:()=>y,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>h});var i=r(66131),o=r(49186),n=(r(44208),r(44729)),s=r(15032),a=r(65864),l=r(95466),u=r(43668),c=r(98623);const d=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function y(e,t){return f.create(e,t,null,["$feature","$view"])}function h(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:n,Dictionary:s}=await(0,u.l)();let a;try{a=n.parseScript(e)}catch(t){throw new o.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=n.scriptUsesGeometryEngine(a);l&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,a,null,!1,l);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=n.compileScript(a,c);let p=null;null!=r&&(p=new s(r),p.immutable=!0);const y=new s;return y.immutable=!1,y.setField("scale",0),new f(e,n,a,d,t,y,p,s)}constructor(e,t,r,i,o,n,s,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=o,this._viewDict=n,this._configDict=s,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:o,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=o?null!=r?i.lY.epochToArcadeDate(o,r):i.lY.unknownEpochToArcadeDate(o):void 0,currentEnd:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return s.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},28076(e,t,r){r.d(t,{D:()=>o});var i=r(13337);const o={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:i.h.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:i.h.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry",width:25},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,distancealong:100,movementtype:"Distance"}}},13337(e,t,r){r.d(t,{h:()=>i});const i={Relative:0,Absolute:1}},93397(e,t,r){r.d(t,{$w:()=>f,Bu:()=>_,DW:()=>v,FH:()=>P,FM:()=>a,Kn:()=>w,MM:()=>d,Nl:()=>x,O2:()=>A,UE:()=>F,YC:()=>L,YF:()=>T,_1:()=>M,_d:()=>S,_h:()=>s,bs:()=>D,e6:()=>u,gQ:()=>n,jn:()=>y,lW:()=>c,ll:()=>j,mA:()=>p,oI:()=>G,pM:()=>I,pV:()=>b,pk:()=>Z,rB:()=>E,xo:()=>C,yX:()=>z,z9:()=>g,zb:()=>O,zr:()=>h});var i=r(28076);function o(e){let t=e.length;for(;t--;)if(!" /-,\n".includes(e.charAt(t)))return!1;return!0}function n(e,t){const r=[];let i=0,n=-1;do{if(n=e.indexOf("[",i),n>=i){if(n>i){const t=e.slice(i,n);r.push([t,null,o(t)])}if(i=n+1,n=e.indexOf("]",i),n>=i){if(n>i){const o=t[e.slice(i,n)];o&&r.push([null,o,!1])}i=n+1}}}while(-1!==n);if(i<e.length){const t=e.slice(i);r.push([t,null,o(t)])}return r}function s(e,t,r){let i="",o=null;for(const r of t){const[t,n,s]=r;if(null!=t&&""!==t)s?o=t:(null!=o&&(i+=o,o=null),i+=t);else{const t=e.readAttribute(n);null!=t&&""!==t&&(null!==o&&(i+=o,o=null),i+=t)}}return l(i,r)}function a(e,t,r,i){let o="",n=null;for(const i of t){const[t,s,a]=i;if(null!=t&&""!==t)a?n=t:(null!=n&&(o+=n,n=null),o+=t);else{let t=s;null!=r&&(t=k(s,r));const i=e.attributes[t];null!=i&&""!==i&&(null!=n&&(o+=n,n=null),o+=i)}}return l(o,i)}function l(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function u(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function c(e){return e.data?.symbol??null}function d(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function p(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function y(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function h(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const f=(e,t=0)=>null==e||isNaN(e)?t:e;class m{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function g(e){return new m(e)}function b(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function w(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function S(e){let t="normal",r="normal";if(e){const i=e.toLowerCase();i.includes("italic")?t="italic":i.includes("oblique")&&(t="oblique"),i.includes("bold")?r="bold":i.includes("light")&&(r="lighter")}return{style:t,weight:r}}function v(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function I(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=I(t);if(null!=e)return e}break;case"CIMTextSymbol":return I(e.symbol);case"CIMSolidFill":return e.color}return null}function M(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=M(e);if(null!=t)return t}break}case"CIMTextSymbol":return M(e.symbol);case"CIMSolidStroke":return e.color}}function C(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=C(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return C(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function _(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function x(e){switch(e){default:case"Bottom":return"bottom";case"Top":return"top";case"Center":return"middle";case"Baseline":return"baseline"}}function A(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const F=e=>e.includes("data:image/svg+xml");function T(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function O(e,t,r,i,o,n,s=!0){const{infos:a}=n;let l=1,u=0,c=0,d=0,p=1;for(const{absoluteAnchorPoint:e,offsetX:t,offsetY:r,rotation:i,size:o,frameHeight:n,rotateClockWise:y,scaleSymbolsProportionally:h}of a)p=e?1:l,c=V(t,r,u,p,c),d=R(t,r,u,p,d),n&&(h||s)&&(l*=o/n),u=N(i,y,u);const y=V(i,o,u,p,c),h=R(i,o,u,p,d);return{size:e*l,rotation:N(t,r,u),offsetX:y,offsetY:h}}function P(e){return e?.dashTemplate&&(e.dashTemplate=function(e){return"string"==typeof e?function(e){return e.split(" ").map(e=>Number(e))}(e):e}(e.dashTemplate)),e}function D(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return D(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return D(e.symbol)}}return"Normal"}function L(e){if(e)switch(e.type){case"CIMTextSymbol":return e.height;case"CIMPointSymbol":{let t=0;if(e.symbolLayers)for(const r of e.symbolLayers)if(r)switch(r.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const e=r.size??i.D.CIMVectorMarker.size;e>t&&(t=e);break}}return t}case"CIMLineSymbol":case"CIMPolygonSymbol":{let t=0;if(e.symbolLayers)for(const r of e.symbolLayers)if(r)switch(r.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=r.width;null!=e&&e>t&&(t=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(r.markerPlacement&&h(r.markerPlacement)){const e=r.size??i.D.CIMVectorMarker.size;e>t&&(t=e)}break;case"CIMPictureFill":{const e=r.height;null!=e&&e>t&&(t=e)}}return t}}}function k(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function Z(e){return e.map(e=>({...e,propertyName:T(e.propertyName)}))}function E(e){const t={};for(const r in e){const i=e[r];t[T(r)]=i}return t}function j(e){if(!e)return 0;let t=0;for(const r of e)t+=q(r);return t}function q(e){if(!e)return 0;if(function(e){return e.type.startsWith("PRI")}(e))return e.inflateSize??256;switch(e.type){case"CIMGeometricEffectArrow":return Math.abs(.5*e.width);case"CIMGeometricEffectBuffer":return Math.abs(e.size);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(e.length);case"CIMGeometricEffectJog":return Math.abs(.5*e.length);case"CIMGeometricEffectMove":return Math.max(Math.abs(f(e.offsetX)),Math.abs(f(e.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(e.offset);case"CIMGeometricEffectRadial":return Math.abs(e.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(e.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(e.fromWidth),Math.abs(e.toWidth));case"CIMGeometricEffectWave":return Math.abs(e.amplitude);case"CIMGeometricEffectDonut":return Math.abs(e.width)}}function R(e,t,r,i,o){const n=r*Math.PI/180;if(n){const r=Math.cos(n);return(Math.sin(n)*e+r*t)*i+o}return t*i+o}function V(e,t,r,i,o){const n=r*Math.PI/180;return n?(Math.cos(n)*e-Math.sin(n)*t)*i+o:e*i+o}function N(e,t,r){return t?r-e:r+e}function z(e,t){return Math.max(Math.min((e??t)/100,1),0)}function G(e){return null!=e&&function(e){return"setControlPoint"in e&&"getControlPoint"in e&&"setControlPointAt"in e&&"getControlPointAt"in e}(e)?e:void 0}},93470(e,t,r){r.d(t,{Cb:()=>n,HW:()=>c,JR:()=>o,JZ:()=>l,WR:()=>a,b6:()=>d,fT:()=>i,nC:()=>u,yM:()=>s});const i=[252,146,31,255],o=[153,153,153,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[893],{51624(e,t,s){s.d(t,{A:()=>c});var n=s(44208),r=s(69397),i=s(93687);const o=4294967296,a=new TextDecoder("utf-8"),u=(0,n.A)("safari")||(0,n.A)("ios")?6:(0,n.A)("ff")?12:32;class c{constructor(e,t,s=0,n=e?.byteLength??0){this._tag=0,this._dataType=99,this._init(e,t,s,n)}[Symbol.dispose](){this.release()}_init(e,t,s,n){this._data=e,this._dataView=t,this._pos=s,this._end=n}get usedMemory(){return 64+(0,r.Qf)(this._data)}asUnsafe(){return this}clone(){return new c(this._data,this._dataView,this._pos,this._end)}clonePooled(){return c.constructPooled(this._data,this._dataView,this._pos,this._end)}static constructPooled(e,t,s=0,n=e?.byteLength??0){const r=c.pool.acquire();return r._init(e,t,s,n),r}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getPackedEnd(){const e=this.getUInt32();return this._pos+e}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,n){const r=this.getMessage(),i=e(r,t,s,n);return r.release(),i}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipToEnd(){for(;this.next();)this.skip()}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,s=0,n=0;if(this._end-t>=10)do{if(n=e[t++],s|=127&n,!(128&n))break;if(n=e[t++],s|=(127&n)<<7,!(128&n))break;if(n=e[t++],s|=(127&n)<<14,!(128&n))break;if(n=e[t++],s|=(127&n)<<21,!(128&n))break;if(n=e[t++],s+=268435456*(127&n),!(128&n))break;if(n=e[t++],s+=34359738368*(127&n),!(128&n))break;if(n=e[t++],s+=4398046511104*(127&n),!(128&n))break;if(n=e[t++],s+=562949953421312*(127&n),!(128&n))break;if(n=e[t++],s+=72057594037927940*(127&n),!(128&n))break;if(n=e[t++],s+=0x8000000000000000*(127&n),!(128&n))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(n=e[t],128&n);)++t,s+=(127&n)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=n*r}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,n=0;const r=1&e[this._pos];if(n=e[this._pos++],s|=127&n,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<7,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<14,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<21,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=268435456*(127&n),!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=34359738368*(127&n),!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=4398046511104*(127&n),!(128&n))return r?-(s+1)/2:s/2;if(t=BigInt(s),n=e[this._pos++],t+=0x2000000000000n*BigInt(127&n),!(128&n))return Number(r?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x100000000000000n*BigInt(127&n),!(128&n))return Number(r?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x8000000000000000n*BigInt(127&n),!(128&n))return Number(r?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>u){const n=e.subarray(t,s);return a.decode(n)}let n="",r="";for(let i=t;i<s;++i){const t=e[i];128&t?r+="%"+t.toString(16):(n+=decodeURIComponent(r)+String.fromCharCode(t),r="")}return r.length&&(n+=decodeURIComponent(r)),n}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}static{this.pool=new i.A(()=>new c(null,null),void 0,e=>{e._data=null,e._dataView=null})}}},62815(e,t,s){s.d(t,{N:()=>a,d:()=>u});var n=s(86211),r=s(73941),i=s(21325),o=s(52006);function a(e,t,s){const n=u(t,s);if(1!==n)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,n);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const s of e.curvePaths)for(const e of s){const s=(0,o.yP)(e);s.length>2&&(s[2]*=t)}if(e.paths)for(const s of e.paths)for(const e of s)e.length>2&&(e[2]*=t)}}(e,n);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const s of e.curveRings)for(const e of s){const s=(0,o.yP)(e);s.length>2&&(s[2]*=t)}if(e.rings)for(const s of e.rings)for(const e of s)e.length>2&&(e[2]*=t)}}(e,n);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const s of e.points)s.length>2&&(s[2]*=t)}(e,n);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,n);default:return}}function u(e,t){return null==e||null==t||(0,i.aI)(e,t)||(0,r.xP)(e)||(0,r.xP)(t)?1:(0,n.G9)(e)/(0,n.G9)(t)}},10536(e,t,s){function n(e){const t={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){t[s]=[];for(let e=0;e<r.length;e++)t[s][e]=n(r[e])}else"object"==typeof r?r.toJSON&&(t[s]=JSON.stringify(r)):t[s]=r}return t}s.d(t,{z:()=>n})},53655(e,t,s){s.d(t,{SH:()=>v,ae:()=>E,cn:()=>d});var n=s(5482),r=s(49186),i=s(51624),o=s(50498);const a=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],u=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],c=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],l=["upperLeft","lowerLeft"];function f(e,t){const s=e.getEnum();return s<t.length?t[s]:void 0}function g(e,t){e.featureSet.geometryType=e.usesShortGeometryTypes?o.gy.fromJSON(t):t}function p(e,t=e.featureSet.geometryType){return e.usesShortGeometryTypes?o.gy.toJSON(t):t}function h(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function d(e){const t=e.asUnsafe(),s={type:u[0]};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=f(t,u);break;case 3:s.alias=t.getString();break;case 4:s.sqlType=f(t,c);break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function y(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}let m=[];function _(e,t,s){let n=p(t),r=0;const i=e.asUnsafe();for(;i.next();)switch(i.tag()){case 1:1===s?n=p(t,f(i,a)):i.skip();continue;case 2:for(const e=i.getPackedEnd();i.pos()<e;)m[r++]=i.getUInt32();continue;case 3:r>0?(m.length=r,null!=t.geometry(s,n,m)&&(m=[])):t.geometry(s,n,[]);for(const e=i.getPackedEnd();i.pos()<e;)t.coord(i.getSInt64());continue;default:i.skip()}}function S(e,t){const s=[],n=e.asUnsafe();for(;n.next();)if(3!==n.tag())n.skip();else for(const e=n.getPackedEnd();n.pos()<e;)s.push(n.getSInt64());t.centroid(s)}let k=[],b=[],w=[];function T(e,t){const s={stack:[],error:void 0,hasError:!1};try{let r=0;const i=m;let o=0;const a=e.asUnsafe(),u=(0,n.mS)(s,a.clonePooled().asUnsafe(),!1);for(;a.next();)switch(a.tag()){case 2:for(const c=a.getPackedEnd();a.pos()<c;)i[r++]=a.getUInt32();continue;case 3:if(!("curvedGeometry"in t))throw new Error(`Tried to parse curved geometry in a ${t.constructor.name}, which doesn't support them.`);a.processMessageWithArgs(I,o++);continue;case 4:{const l=a.getUInt32(),f=a.pos()+l;if(0===o||0===r||0===l){a.move(f);continue}i.length=r,w.length=b.length=o,t.curvedGeometry(p(t),i,b,w);const{hasZ:g,hasM:h}=t.featureSet,d=[],y=[0,0];function _(){for(let e=0;e<y.length;++e)d[e]=y[e],y[e]=a.getSInt64()}g&&y.push(0),h&&y.push(0);const S=[0,0],T=[0,0],x=S,q=S;let F=0;for(let E=0;E<r;++E){_(),d.fill(0),t.startCurvedPart(y);for(const O=F+i[E];F<O;++F){const U=b[F],V=w[F];switch(U){case 0:for(let P=0;P<V;++P)_(),y[0]+=d[0],y[1]+=d[1],t.lineSegment(d,y);continue;case 1:for(let v=0;v<V;++v)_(),x[0]=a.getSInt64(),x[1]=a.getSInt64(),t.circularArcSegment(d,y,x);continue;case 2:for(let D=0;D<V;++D)_(),S[0]=a.getSInt64(),S[1]=a.getSInt64(),T[0]=a.getSInt64(),T[1]=a.getSInt64(),t.bezierSegment(d,y,S,T);continue;case 3:if(u.move(k[F]),u.getUInt32()<7*V)throw new Error("Not implemented: compressed full circle encoding");for(let N=0;N<V;++N){_(),q[0]=u.getDouble(),q[1]=u.getDouble();const G=u.getDouble(),M=u.getDouble(),R=u.getDouble(),A=u.getDouble(),B=u.getDouble();t.ellipticArcSegment(d,y,q,G,M,R,A,B)}continue}}t.finishCurvedPart(y)}continue}default:a.skip()}}catch(j){s.error=j,s.hasError=!0}finally{(0,n.hk)(s)}}function I(e,t){const s=e.asUnsafe();let n=0,r=0,i=0;for(;s.next();)switch(s.tag()){case 1:n=s.getEnum();continue;case 2:r=s.getUInt32();continue;case 3:i=s.pos(),s.skip();continue;default:s.skip()}if(3===n&&0===i)throw new Error("An elliptic arc segment set did not include a parameters array");b[t]=n,w[t]=r,k[t]=i}function x(e,t){t.feature();const s=t.featureSet.features.at(-1);let n=0;const{fields:r}=t.featureSet;for(;e.next();)switch(e.tag()){case 1:if(null==r)throw new Error("A Feature had attributes but the FeatureResult didn't include any fields");s.attributes[r[n++].name]=e.processMessage(h);continue;case 2:e.processMessageWithArgs(_,t,0);continue;case 4:e.processMessageWithArgs(S,t);continue;case 7:e.processMessageWithArgs(T,t);continue;case 11:s.distance=e.getDouble();continue;default:e.skip();continue}t.finishFeature?.()}function q(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function F(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function E(e){const t={originPosition:l[0]},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=f(s,l);break;case 2:t.scale=s.processMessage(q);break;case 3:t.translate=s.processMessage(F);break;default:s.skip()}return t}function O(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function U(e){const t={};for(;e.next();)switch(e.tag()){case 1:t.wkid=e.getUInt32();break;case 5:t.wkt=e.getString();break;case 2:t.latestWkid=e.getUInt32();break;case 3:t.vcsWkid=e.getUInt32();break;case 4:t.latestVcsWkid=e.getUInt32();break;default:e.skip()}return t}function V(e,t){const s=e.asUnsafe();if(t.featureSet.features.length=0,"features"===t.parseOnly?.type){const e=t.parseOnly.indices.values();let n=0,r=e.next().value;for(;s.next();)15===s.tag()&&n++===r?(r=e.next().value,s.processMessageWithArgs(x,t)):s.skip();return}let n=!1;for("metadata"===t.parseOnly?.type&&(n=!0,t.parseOnly.featureCount=0),g(t,"esriGeometryPoint");s.next();)switch(s.tag()){case 1:t.idField(s.getString());continue;case 3:t.featureSet.globalIdFieldName=s.getString();continue;case 4:t.featureSet.geohashFieldName=s.getString();continue;case 5:t.featureSet.geometryProperties=s.processMessage(O);continue;case 7:g(t,f(s,a));continue;case 8:t.featureSet.spatialReference=s.processMessageWithArgs(U);continue;case 10:t.featureSet.hasZ=s.getBool();continue;case 11:t.featureSet.hasM=s.getBool();continue;case 12:t.featureSet.transform=s.processMessage(E);continue;case 9:t.featureSet.exceededTransferLimit=s.getBool();continue;case 13:t.featureSet.fields??=[],t.featureSet.fields.push(s.processMessage(d));continue;case 15:if(n){++t.parseOnly.featureCount,s.skip();continue}s.processMessageWithArgs(x,t);continue;case 2:t.idField(s.processMessage(y));continue;default:s.skip()}}function P(e,t,s){let n=-1;for(;e.next();)switch(e.tag()){case 4:n=e.pos(),e.skip();continue;case 1:e.processMessageWithArgs(V,t);continue;default:e.skip()}if(-1!==n){if(!t.queryGeometry()){const s=e.pos();e.move(n),e.processMessageWithArgs(_,t,1),e.move(s)}s.queryGeometryType=t.queryGeometryType(),s.queryGeometry=t.queryGeometry()}t.finish(),s.featureResult=t.featureSet}function v(e,t){const s={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(s,{[Symbol.dispose](){m=[],k=[],b=[],w=[]}},!1);try{const s={stack:[],error:void 0,hasError:!1};try{const r=(0,n.mS)(s,i.A.constructPooled(new Uint8Array(e),new DataView(e)),!1);let o;for(;r.next();)2===r.tag()?(o={},r.processMessageWithArgs(P,t,o)):r.skip();return o}catch(e){s.error=e,s.hasError=!0}finally{(0,n.hk)(s)}}catch(e){throw new r.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}catch(e){s.error=e,s.hasError=!0}finally{(0,n.hk)(s)}}},66208(e,t,s){s.d(t,{m:()=>r});var n=s(53655);function r(e,t){const{featureResult:s}=(0,n.SH)(e,t);return s}},80893(e,t,s){s.d(t,{IJ:()=>p,Jf:()=>m,LT:()=>k,Pk:()=>d,eW:()=>g,gW:()=>y,kS:()=>h});var n=s(11254),r=s(84952),i=s(17136),o=s(10536),a=s(66208),u=s(5076),c=s(58501);const l="Layer does not support extent calculation.";function f(e,t,s){return(0,u.iH)(e,t,s)}async function g(e,t,s,n,r){const i=t.timeExtent?.isEmpty?{features:[]}:await S(e,t,"json",n,void 0,r);return i.features??=[],(0,c.q)(t,s,i),i}async function p(e,t,s,n,r){if(t.timeExtent?.isEmpty)return s.featureSet;const i=await h(e,t,n,r);return(0,a.m)(i,s)}function h(e,t,s,n){return S(e,t,"pbf",s,void 0,n)}function d(e,t,s,n){return t.timeExtent?.isEmpty?Promise.resolve({objectIds:[]}):S(e,t,"json",s,{returnIdsOnly:!0},n)}async function y(e,t,s,n){return t.timeExtent?.isEmpty?0:(await S(e,t,"json",s,{returnCountOnly:!0},n)).count}async function m(e,t,s){if(t.timeExtent?.isEmpty)return{count:0,extent:null};const n=await S(e,t,u.qh,s,{returnExtentOnly:!0,returnCountOnly:!0});if(n.hasOwnProperty("extent"))return n;const r="string"==typeof e?e:e.path;if(/\/imageserver\/?$/i.test(r)&&n.hasOwnProperty("count")){const r=await S(e,t,u.qh,s,{returnExtentOnly:!0});return{count:n.count,extent:r.extent}}if(n.features)throw new Error(l);if(n.hasOwnProperty("count"))throw new Error(l);return n}function _(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;const s={...e,returnUniqueIdsOnly:!0};return delete s.returnIdsOnly,s}async function S(e,t,s,r={},i={},o={}){const a=await k(e,t,s,r,i,o),u="json"===s?"json":"array-buffer";return(0,n.A)(a.url,{responseType:u,...a.options}).then(({data:e})=>e)}async function k(e,t,s,n,a={},u={}){const c="string"==typeof e?(0,r.An)(e):e,l=t.geometry?[t.geometry]:[],g=await(0,i.el)(l,null,{signal:n.signal}),p=g?.[0];if(null!=p){const e=t.clone();e.geometry=p.clone(),t=e}const h=(0,o.z)({...c.query,f:s,..._(a,u),...f(t,a,u)});return n={...n,query:{...h,...n.query}},new b((0,r.fj)(c.path,function(e,t){return null!=e.formatOf3DObjects&&!(t.returnCountOnly||t.returnExtentOnly||t.returnIdsOnly)}(t,a)?"query3d":"query"),n)}class b{constructor(e,t){this.url=e,this.options=t}}},5076(e,t,s){s.d(t,{iH:()=>i,qh:()=>o});var n=s(60408),r=s(21325);function i(e,t,s){const{geometry:i}=e,o=e.compactGeometryEnabled??!1,a=e.toJSON();delete a.compactGeometryEnabled,delete a.defaultSpatialReferenceEnabled;const u=a;let c,l,f;if(i&&(l=i.spatialReference,f=(0,r.YX)(l),u.geometryType=(0,n.$B)(i),u.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const s=e.toJSON();return delete s.spatialReference,JSON.stringify(s)}(i,o),u.inSR=f),a.groupByFieldsForStatistics&&(u.groupByFieldsForStatistics=a.groupByFieldsForStatistics.join(",")),a.objectIds)switch(s?.uniqueIdFields?.length){case void 0:u.objectIds=a.objectIds.join(",");break;case 1:u.uniqueIds=JSON.stringify(a.objectIds),delete u.objectIds;break;default:u.uniqueIds=JSON.stringify(a.objectIds.map(e=>JSON.parse(e))),delete u.objectIds}if(a.orderByFields&&(u.orderByFields=a.orderByFields.join(",")),!a.outFields||!a.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete u.outFields:a.outFields.includes("*")?u.outFields="*":u.outFields=a.outFields.join(","),a.outSR?(u.outSR=(0,r.YX)(a.outSR),c=e.outSpatialReference):i&&(a.returnGeometry||a.returnCentroid)&&(u.outSR=u.inSR,c=l),a.returnGeometry&&delete a.returnGeometry,a.outStatistics&&(u.outStatistics=JSON.stringify(a.outStatistics)),a.outDistance&&(u.outDistance=JSON.stringify(a.outDistance)),a.fullText&&(u.fullText=JSON.stringify(a.fullText)),a.pixelSize&&(u.pixelSize=JSON.stringify(a.pixelSize)),a.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete a.quantizationParameters.extent.spatialReference,u.quantizationParameters=JSON.stringify(a.quantizationParameters)),a.parameterValues&&(u.parameterValues=JSON.stringify(a.parameterValues)),a.rangeValues&&(u.rangeValues=JSON.stringify(a.rangeValues)),a.dynamicDataSource&&(u.layer=JSON.stringify({source:a.dynamicDataSource}),delete a.dynamicDataSource),a.timeExtent){const e=a.timeExtent,{start:t,end:s}=e;null==t&&null==s||(u.time=t===s?t:`${t??"null"},${s??"null"}`),delete a.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=c&&l.equals(c)&&(u.defaultSR=u.inSR,delete u.inSR,delete u.outSR),u}const o="json"},58501(e,t,s){s.d(t,{q:()=>r});var n=s(62815);function r(e,t,s){if(!s?.features||!s.hasZ)return;const r=(0,n.N)(s.geometryType,t,e.outSpatialReference);if(r)for(const e of s.features)r(e.geometry)}}}]);