@arcgis/core 4.30.0-next.20240408 → 4.30.0-next.20240409
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/2109b2c35be360f41db8.js +1 -0
- package/assets/esri/core/workers/chunks/41570a374aeeb8137576.js +1 -0
- package/assets/esri/core/workers/chunks/{0ef80862fd33cb1ba115.js → 4fade0f64ef61137a5b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{2f113056d17d2630eeee.js → 530cbdcf87b432cd84cf.js} +1 -1
- package/assets/esri/core/workers/chunks/6b5c5f7d1207f65ad52a.js +1 -0
- package/assets/esri/core/workers/chunks/{eb53c23110ba9ce1e687.js → 929f88eaf56aed1e1e63.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e1000c54d0254ae4e33.js → 9de6183a6de13a808ad9.js} +10 -10
- package/assets/esri/core/workers/chunks/{01aa4d8263b9e2be7400.js → c341eb1b044f514dffd8.js} +2 -2
- package/chunks/ComponentShader.glsl.js +1 -1
- package/chunks/Path.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +34 -34
- package/core/unitFormatUtils.js +1 -1
- package/interfaces.d.ts +43 -23
- package/layers/CatalogLayer.js +1 -1
- package/layers/catalog/CatalogDynamicGroupLayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/package.json +1 -1
- package/portal/PortalUser.js +1 -1
- package/renderers/support/AuthoringInfo.js +1 -1
- package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
- package/rest/support/ImageUrlParameters.js +1 -1
- package/smartMapping/raster/renderers/flow.js +1 -1
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/smartMapping/symbology/color.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/LineSymbol3DLayer.js +1 -1
- package/symbols/SimpleLineSymbol.js +1 -1
- package/views/2d/layers/CatalogDynamicGroupLayerView2D.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/widgets/Compass/CompassViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0527408da459aff722cb.js +0 -1
- package/assets/esri/core/workers/chunks/8e34d6077760972f4d86.js +0 -1
- package/assets/esri/core/workers/chunks/9e0110f3066751dbd311.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3522,6591],{3330:(e,t,i)=>{i.d(t,{GB:()=>s,Qo:()=>o,Y4:()=>n});var r=i(96285);class s{}function n(e){return e instanceof r.bo?e===s.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return n(e)?s.instance:e}s.instance=new r.oh("Etc/UTC")},5159:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Zi});var r=i(90237),s=i(13874),n=i(69540),o=i(49186),a=i(92071),l=i(74887),u=i(10107),p=(i(44208),i(53966)),c=(i(87811),i(40608)),d=i(43937),m=i(4146),h=i(59456),y=i(52106),g=i(68729),f=i(78888),w=i(51447),v=i(4718),_=i(36708),R=i(84952),b=i(56507),S=i(36005),M=i(21325),F=i(55785),I=i(45617),x=i(25482),A=i(22796),j=i(16019);const Z={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 D=i(67369),T=i(70274),P=i(496);const N=new Set(["u1","u2","u4","u8","s8","u16","s16"]),O={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)"},C=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function V(e){return C.has(e.type)}function J(e,t){if(!e||!t)return(0,v.o8)(e||t);const i=(0,v.o8)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),E(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(G(i.functionArguments).Raster=t);return i}function E(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&&E(e[i].arguments,t))}function q(e){const t=(0,v.o8)(Z[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=q(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=H(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function G(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?G(t.functionArguments):e}const L={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function z(e,t){const i=N.has(t)?(0,j.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 B(e){if(null==e)return;const{fields:t}=e,i=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return i?.name}function $(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find((e=>"fill"===e.type))?.material?.color:e.symbol?.color}function U(e){const t=[];return e?.forEach((e=>{const i=e;if(Array.isArray(i))t.push(i);else{if(null==i.min||null==i.max)return;const e=[i.min,i.max,i.avg||0,i.stddev||0];t.push(e)}})),t}function H(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,D.vL)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var k=i(85675),Q=i(13868);let K=class extends x.oY{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=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(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}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("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 k.A({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=function(e,t){return J(new A.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,s)),r&&!i&&"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&&V(r)?J(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new A.A;r.functionName="Stretch";const s=L[T.u.toJSON(e.stretchType)],n="u8",o={StretchType:s,Statistics:U(e.statistics??[]),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===L.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===L.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=n):s===L.minMax?r.outputPixelType=n:s===L.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new A.A;if(i)n.functionArguments={ColorRamp:(0,D.hf)(s)};else{const i=(0,D.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,D.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new A.A({rasterFunctionDefinition:q(n)}):n}return i?new A.A({rasterFunctionDefinition:q(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=B(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((o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],r.r,r.g,r.b]))}))}));const i=a?z(n,a):n,r=new A.A;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new A.A({rasterFunctionDefinition:q(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)}));const c=a?z(n,a):n,d=new A.A;d.functionName="Remap",d.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},d.variableName="Raster";const m=new A.A;return m.functionName="Colormap",m.functionArguments={Colormap:c,Raster:d},t.convertToRFT?new A.A({rasterFunctionDefinition:q(m)}):m}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=B(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach((e=>{const i=e.value,r=$(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[o],l=t.get(s);l?i.push([n,...l]):a&&i.push([n,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],r=$(t),s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r?z(i,r):i,p=new A.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new A.A({rasterFunctionDefinition:q(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?z(i,r):i,n=new A.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new A.A({rasterFunctionDefinition:q(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new A.A;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:s}=t,n="vector-uv"===r;let o,a;if(s&&2===s.length){const e=s.map((e=>e.toLowerCase()));o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=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 P.A,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:O[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const d=q(i);return t.convertToRFT?A.A.fromJSON({rasterFunctionDefinition:d}):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 A.A;const r=new A.A;r.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,D.hf)(e.colorRamp):o.Colormap=(0,D.R8)(e.colorRamp)),i?new A.A({rasterFunctionDefinition:q(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}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new A.A({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new A.A({rasterFunctionDefinition:q(r)}):r,J(r,e)}};(0,r._)([(0,u.MZ)()],K.prototype,"layer",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"adjustAspectRatio",null),(0,r._)([(0,d.K)("adjustAspectRatio")],K.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"bandIds",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"compression",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"compressionQuality",null),(0,r._)([(0,d.K)("compressionQuality")],K.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"compressionTolerance",null),(0,r._)([(0,d.K)("compressionTolerance")],K.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"format",null),(0,r._)([(0,u.MZ)({type:String,json:{read:{reader:Q.SZ.read},write:{writer:Q.SZ.write}}})],K.prototype,"interpolation",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"noData",null),(0,r._)([(0,u.MZ)({type:String,json:{read:{reader:Q.hm.read},write:{writer:Q.hm.write}}})],K.prototype,"noDataInterpretation",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"pixelType",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"lercVersion",void 0),(0,r._)([(0,d.K)("lercVersion")],K.prototype,"writeLercVersion",null),(0,r._)([(0,u.MZ)({type:Number})],K.prototype,"version",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"mosaicRule",null),(0,r._)([(0,u.MZ)({json:{write:!0,name:"renderingRule"}})],K.prototype,"rasterFunction",null),K=(0,r._)([(0,c.$)("esri.layers.support.ExportImageServiceParameters")],K);var Y=i(20437),W=i(95466),X=i(33446),ee=i(43577),te=i(14140),ie=i(87186),re=i(69409),se=i(77301),ne=i(51244),oe=i(14636),ae=i(12711),le=i(85676),ue=i(17136),pe=i(2272),ce=i(86738);const de=e=>{let t=class extends e{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"make",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"model",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"focalLength",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"pixelSize",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"rows",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"cols",void 0),t=(0,r._)([(0,c.$)("esri.rest.support.CameraInfoMixin")],t),t};let me=class extends(de(x.oY)){constructor(){super(...arguments),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,r._)([(0,u.MZ)({json:{write:!0}})],me.prototype,"id",void 0),(0,r._)([(0,u.MZ)({json:{name:"uri",write:!0}})],me.prototype,"referenceUri",void 0),(0,r._)([(0,u.MZ)({type:Date,json:{write:!0}})],me.prototype,"acquisitionDate",void 0),(0,r._)([(0,d.K)("acquisitionDate")],me.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],me.prototype,"cameraID",void 0),(0,r._)([(0,u.MZ)({type:ce.A,json:{write:!0}})],me.prototype,"center",void 0),(0,r._)([(0,u.MZ)({type:ce.A,json:{write:!0}})],me.prototype,"perspectiveCenter",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],me.prototype,"orientation",void 0),me=(0,r._)([(0,c.$)("esri.rest.support.ImageInspectionInfo")],me);const he=me;let ye=class extends x.oY{constructor(){super(...arguments),this.images=null}};(0,r._)([(0,u.MZ)({type:[he],json:{write:!0}})],ye.prototype,"images",void 0),ye=(0,r._)([(0,c.$)("esri.rest.support.FindImagesResult")],ye);const ge=ye;var fe=i(16930);let we=class extends x.oY{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],we.prototype,"north",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],we.prototype,"up",void 0),(0,r._)([(0,u.MZ)({type:fe.A,json:{write:!0}})],we.prototype,"spatialReference",void 0),we=(0,r._)([(0,c.$)("esri.rest.support.ImageAngleResult")],we);const ve=we;var _e=i(83047);let Re=class extends x.oY{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,u.MZ)({type:Number,json:{read:!0,write:!0}})],Re.prototype,"value",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Re.prototype,"displayValue",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{read:!0,write:!0}})],Re.prototype,"uncertainty",void 0),Re=(0,r._)([(0,c.$)("esri.rest.support.BaseImageMeasureResult.BaseImageMeasureResultValue")],Re);let be=class extends Re{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:_e.Sk.read,write:_e.Sk.write}})],be.prototype,"unit",void 0),be=(0,r._)([(0,c.$)("esri.rest.support.BaseImageMeasureResult.ImageMeasureResultLengthValue")],be);let Se=class extends Re{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:_e.dk.read,write:_e.dk.write}})],Se.prototype,"unit",void 0),Se=(0,r._)([(0,c.$)("esri.rest.support.BaseImageMeasureResult.ImageMeasureResultAreaValue")],Se);let Me=class extends Re{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:_e.b$.read,write:_e.b$.write}})],Me.prototype,"unit",void 0),Me=(0,r._)([(0,c.$)("esri.rest.support.BaseImageMeasureResult.ImageMeasureResultAngleValue")],Me);let Fe=class extends x.oY{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Fe.prototype,"name",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Fe.prototype,"sensorName",void 0),Fe=(0,r._)([(0,c.$)("esri.rest.support.BaseImageMeasureResult")],Fe);let Ie=class extends Fe{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,u.MZ)({type:Se,json:{read:!0,write:!0}})],Ie.prototype,"area",void 0),(0,r._)([(0,u.MZ)({type:be,json:{read:!0,write:!0}})],Ie.prototype,"perimeter",void 0),Ie=(0,r._)([(0,c.$)("esri.rest.support.ImageAreaResult")],Ie);const xe=Ie;var Ae=i(5443),je=i(39829);let Ze=class extends x.oY{constructor(){super(...arguments),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?je.A.fromJSON(e):Ae.A.fromJSON(e)}};(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Ze.prototype,"area",void 0),(0,r._)([(0,u.MZ)({json:{name:"shape",write:!0}})],Ze.prototype,"geometry",void 0),(0,r._)([(0,S.w)("geometry")],Ze.prototype,"readGeometry",null),Ze=(0,r._)([(0,c.$)("esri.rest.support.ImageBoundaryResult")],Ze);const De=Ze;let Te=class extends Fe{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,u.MZ)({type:be,json:{read:!0,write:!0}})],Te.prototype,"distance",void 0),(0,r._)([(0,u.MZ)({type:Me,json:{read:!0,write:!0}})],Te.prototype,"azimuthAngle",void 0),(0,r._)([(0,u.MZ)({type:Me,json:{read:!0,write:!0}})],Te.prototype,"elevationAngle",void 0),Te=(0,r._)([(0,c.$)("esri.rest.support.ImageDistanceResult")],Te);const Pe=Te;let Ne=class extends(de(x.oY)){constructor(){super(...arguments),this.id=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],Ne.prototype,"id",void 0),Ne=(0,r._)([(0,c.$)("esri.rest.support.CameraInfo")],Ne);const Oe=Ne;let Ce=class extends x.oY{constructor(){super(...arguments),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,r._)([(0,u.MZ)({json:{write:!0}})],Ce.prototype,"id",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ce.prototype,"name",void 0),(0,r._)([(0,u.MZ)({type:Date,json:{write:!0}})],Ce.prototype,"acquisitionDate",void 0),(0,r._)([(0,d.K)("acquisitionDate")],Ce.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ce.prototype,"cameraID",void 0),(0,r._)([(0,u.MZ)({type:ce.A,json:{write:!0}})],Ce.prototype,"center",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ce.prototype,"gps",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ce.prototype,"orientation",void 0),Ce=(0,r._)([(0,c.$)("esri.rest.support.ImageGPSInfo")],Ce);const Ve=Ce;let Je=class extends x.oY{constructor(){super(...arguments),this.images=null,this.cameras=null}};(0,r._)([(0,u.MZ)({type:[Ve],json:{write:!0}})],Je.prototype,"images",void 0),(0,r._)([(0,u.MZ)({type:[Oe],json:{write:!0}})],Je.prototype,"cameras",void 0),Je=(0,r._)([(0,c.$)("esri.rest.support.ImageGPSInfoResult")],Je);const Ee=Je;let qe=class extends Fe{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,u.MZ)({type:be,json:{read:!0,write:!0}})],qe.prototype,"height",void 0),qe=(0,r._)([(0,c.$)("esri.rest.support.ImageHeightResult")],qe);const Ge=qe;var Le=i(22671);let ze=class extends x.oY{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],ze.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,u.MZ)({type:Le.A,json:{write:!0}})],ze.prototype,"catalogItems",void 0),(0,r._)([(0,u.MZ)({type:ce.A,json:{write:!0}})],ze.prototype,"location",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],ze.prototype,"name",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],ze.prototype,"objectId",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],ze.prototype,"processedValues",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],ze.prototype,"properties",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],ze.prototype,"value",void 0),ze=(0,r._)([(0,c.$)("esri.rest.support.ImageIdentifyResult")],ze);const Be=ze;let $e=class extends x.oY{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],$e.prototype,"geometries",void 0),$e=(0,r._)([(0,c.$)("esri.rest.support.ImagePixelLocationResult")],$e);const Ue=$e;let He=class extends Fe{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,u.MZ)({type:ce.A,json:{name:"point.value",read:!0,write:!0}})],He.prototype,"point",void 0),He=(0,r._)([(0,c.$)("esri.rest.support.ImagePointResult")],He);const ke=He;let Qe=class extends x.oY{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],Qe.prototype,"attributes",void 0),(0,r._)([(0,u.MZ)({type:ce.A,json:{write:!0}})],Qe.prototype,"location",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Qe.prototype,"locationId",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Qe.prototype,"rasterId",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Qe.prototype,"resolution",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Qe.prototype,"pixelValue",void 0),Qe=(0,r._)([(0,c.$)("esri.rest.support.ImageSample")],Qe);const Ke=Qe;let Ye=class extends x.oY{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,u.MZ)({type:[Ke],json:{write:!0}})],Ye.prototype,"samples",void 0),Ye=(0,r._)([(0,c.$)("esri.rest.support.ImageSampleResult")],Ye);const We=Ye;let Xe=class extends x.oY{constructor(){super(...arguments),this.url=null}};(0,r._)([(0,u.MZ)({json:{name:"imageURL",write:!0}})],Xe.prototype,"url",void 0),Xe=(0,r._)([(0,c.$)("esri.rest.support.ImageUrlResult")],Xe);const et=Xe;var tt=i(65864);let it=class extends x.oY{constructor(){super(...arguments),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),ce.A.fromJSON(e)}};(0,r._)([(0,u.MZ)({types:h.yR,json:{name:"Shape",read:tt.rS,write:!0}})],it.prototype,"geometry",void 0),(0,r._)([(0,u.MZ)({json:{name:"Length",write:!0}})],it.prototype,"length",void 0),(0,r._)([(0,u.MZ)({json:{name:"Area",write:!0}})],it.prototype,"area",void 0),(0,r._)([(0,u.MZ)({json:{name:"Center",write:!0}})],it.prototype,"center",void 0),(0,r._)([(0,S.w)("center")],it.prototype,"readCenter",null),it=(0,r._)([(0,c.$)("esri.rest.support.MeasureAreaFromImageResult")],it);const rt=it;let st=class extends x.oY{constructor(){super(...arguments),this.geometry=null,this.length=null}};(0,r._)([(0,u.MZ)({types:h.yR,json:{name:"Shape",read:tt.rS,write:!0}})],st.prototype,"geometry",void 0),(0,r._)([(0,u.MZ)({json:{name:"Length",write:!0}})],st.prototype,"length",void 0),st=(0,r._)([(0,c.$)("esri.rest.support.MeasureLengthFromImageResult")],st);const nt=st;function ot(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 at(e,t,i){const r=(0,pe.Dl)(e),s=t.geometry?[t.geometry]:[],n=await(0,ue.el)(s),o=t.toJSON();ot(o);const a=n?.[0];null!=a&&(o.geometry=ct(a));const l=(0,pe.lF)({...r.query,f:"json",...o});return(0,pe.jV)(l,i)}async function lt(e,t,i){const r=(0,pe.Dl)(e),s=t.geometry?[t.geometry]:[];return(0,ue.el)(s).then((e=>{const s=t.toJSON(),n=e?.[0];null!=n&&(s.geometry=JSON.stringify(ct(n)));const o=(0,pe.lF)({...r.query,f:"json",...s}),a=(0,pe.jV)(o,i);return(0,f.A)(r.path+"/identify",a)})).then((e=>Be.fromJSON(e.data)))}async function ut(e,t,i,r){const s=(0,pe.Dl)(e),n=await(0,ue.el)(i),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(ct(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(ct(n[1])));const a=(0,pe.lF)({...s.query,f:"json",...o}),l=(0,pe.jV)(a,r),{data:u}=await(0,f.A)(s.path+"/measure",l);return u}async function pt(e,t,i){const r=(0,pe.Dl)(e),s=t.toJSON(),n=(0,pe.lF)({...r.query,f:"json",...s}),o=(0,pe.jV)(n,i),{data:a}=await(0,f.A)(r.path+"/measureFromImage",o);return a}function ct(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=dt(e.spatialReference)),t}function dt(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 mt(e,t){if(!e.imageCoordinateSystem)return(0,M.YX)(e);const i=dt(e),{icsid:r,icsns:s}=i;return null==r||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}i(27733);var ht=i(99199),yt=(i(92602),i(70333),i(73941),i(70328),i(34727),i(91075),i(48526)),gt=(i(82799),i(80754),i(79258),i(51624),i(61956)),ft=(i(77073),i(54546),i(20615)),wt=i(78286),vt=(i(26591),i(57561),i(82371)),_t=i(20223);let Rt=class extends((0,n.O)(x.oY)){constructor(){super(...arguments),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,r._)([(0,u.MZ)({type:ce.A,json:{read:!0}})],Rt.prototype,"fromGeometry",void 0),(0,r._)([(0,u.MZ)({type:ce.A,json:{read:!0,write:!0}})],Rt.prototype,"toGeometry",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Rt.prototype,"objectIds",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],Rt.prototype,"where",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Rt.prototype,"maxCount",void 0),Rt=(0,r._)([(0,c.$)("esri.rest.support.FindImagesParameters")],Rt);const bt=Rt;var St;let Mt=St=class extends x.oY{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new St((0,v.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,u.MZ)({type:[String],json:{name:"angleName",write:!0}})],Mt.prototype,"angleNames",void 0),(0,r._)([(0,u.MZ)({type:ce.A,json:{write:!0}})],Mt.prototype,"point",void 0),(0,r._)([(0,u.MZ)({type:fe.A,json:{write:!0}})],Mt.prototype,"spatialReference",void 0),(0,r._)([(0,u.MZ)({type:b.jz,json:{write:!0}})],Mt.prototype,"rasterId",void 0),Mt=St=(0,r._)([(0,c.$)("esri.rest.support.ImageAngleParameters")],Mt);const Ft=Mt,It=new(i(66552).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 xt=class extends x.oY{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var At;(0,r._)([(0,u.MZ)()],xt.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:It.apiValues,json:{read:It.read,write:It.write}})],xt.prototype,"measureOperation",void 0),(0,r._)([(0,u.MZ)({type:k.A,json:{write:!0}})],xt.prototype,"mosaicRule",void 0),(0,r._)([(0,u.MZ)({type:ce.A,json:{write:!0}})],xt.prototype,"pixelSize",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],xt.prototype,"raster",void 0),xt=(0,r._)([(0,c.$)("esri.rest.support.BaseImageMeasureParameters")],xt);let jt=At=class extends xt{constructor(){super(...arguments),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,tt.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new At((0,v.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({types:h.yR,json:{name:"fromGeometry",read:!0,write:!0}})],jt.prototype,"geometry",void 0),(0,r._)([(0,d.K)("geometry")],jt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:It.apiValues,json:{write:It.write}})],jt.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],jt.prototype,"is3D",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:_e.Sk.read,write:_e.Sk.write}})],jt.prototype,"linearUnit",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:_e.dk.read,write:_e.dk.write}})],jt.prototype,"areaUnit",void 0),jt=At=(0,r._)([(0,c.$)("esri.rest.support.ImageAreaParameters")],jt);const Zt=jt;let Dt=class extends((0,n.O)(x.oY)){constructor(){super(...arguments),this.outSpatialReference=null}};(0,r._)([(0,u.MZ)({type:fe.A,json:{name:"outSR",write:!0}})],Dt.prototype,"outSpatialReference",void 0),Dt=(0,r._)([(0,c.$)("esri.rest.support.ImageBoundaryParameters")],Dt);const Tt=Dt;var Pt;let Nt=Pt=class extends xt{constructor(){super(...arguments),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,tt.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new Pt((0,v.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,r._)([(0,u.MZ)({type:ce.A,json:{read:!0,write:!0}})],Nt.prototype,"fromGeometry",void 0),(0,r._)([(0,d.K)("fromGeometry")],Nt.prototype,"writeFromGeometry",null),(0,r._)([(0,u.MZ)({type:ce.A,json:{read:!0,write:!0}})],Nt.prototype,"toGeometry",void 0),(0,r._)([(0,u.MZ)({type:It.apiValues,json:{write:It.write}})],Nt.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],Nt.prototype,"is3D",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:_e.Sk.read,write:_e.Sk.write}})],Nt.prototype,"linearUnit",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:_e.b$.read,write:_e.b$.write}})],Nt.prototype,"angularUnit",void 0),Nt=Pt=(0,r._)([(0,c.$)("esri.rest.support.ImageDistanceParameters")],Nt);const Ot=Nt;var Ct=i(60945),Vt=i(93223),Jt=i(58174);let Et=class extends((0,n.O)(x.oY)){constructor(){super(...arguments),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.$B)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,r._)([(0,u.MZ)({types:h.yR,json:{read:tt.rS,write:!0}})],Et.prototype,"geometry",void 0),(0,r._)([(0,d.K)("geometry")],Et.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],Et.prototype,"objectIds",void 0),(0,r._)([(0,Vt.e)(Jt.x,{ignoreUnknown:!1,name:"spatialRel"})],Et.prototype,"spatialRelationship",void 0),(0,r._)([(0,u.MZ)({type:Ct.A,json:{name:"time",write:!0}})],Et.prototype,"timeExtent",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],Et.prototype,"where",void 0),Et=(0,r._)([(0,c.$)("esri.rest.support.ImageGPSInfoParameters")],Et);const qt=Et;var Gt;let Lt=Gt=class extends xt{constructor(){super(...arguments),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,tt.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new Gt((0,v.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({type:ce.A,json:{read:!0}})],Lt.prototype,"fromGeometry",void 0),(0,r._)([(0,d.K)("fromGeometry")],Lt.prototype,"writeFromGeometry",null),(0,r._)([(0,u.MZ)({type:ce.A,json:{read:!0,write:!0}})],Lt.prototype,"toGeometry",void 0),(0,r._)([(0,u.MZ)({type:It.apiValues,json:{write:It.write}})],Lt.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],Lt.prototype,"operationType",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:_e.Sk.read,write:_e.Sk.write}})],Lt.prototype,"linearUnit",void 0),Lt=Gt=(0,r._)([(0,c.$)("esri.rest.support.ImageHeightParameters")],Lt);const zt=Lt;var Bt,$t=i(22048);let Ut=Bt=class extends x.oY{constructor(){super(...arguments),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,tt.$B)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=k.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()))}get renderingRule(){return(0,w.Lx)(p.A.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,w.Lx)(p.A.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,w.Lx)(p.A.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,w.Lx)(p.A.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=A.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 Bt((0,v.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,r._)([(0,u.MZ)({json:{write:!0}})],Ut.prototype,"geometry",void 0),(0,r._)([(0,d.K)("geometry")],Ut.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:k.A,json:{write:!0}})],Ut.prototype,"mosaicRule",null),(0,r._)([(0,d.K)("mosaicRule")],Ut.prototype,"writeMosaicRule",null),(0,r._)([(0,u.MZ)({type:A.A})],Ut.prototype,"renderingRule",null),(0,r._)([(0,u.MZ)({type:[A.A]})],Ut.prototype,"renderingRules",null),(0,r._)([(0,u.MZ)({type:A.A,json:{write:!0,name:"renderingRule"}})],Ut.prototype,"rasterFunction",null),(0,r._)([(0,d.K)("rasterFunction")],Ut.prototype,"writeRasterFunction",null),(0,r._)([(0,u.MZ)({type:[A.A],json:{write:!0,name:"renderingRules"}})],Ut.prototype,"rasterFunctions",void 0),(0,r._)([(0,d.K)("rasterFunctions")],Ut.prototype,"writeRasterFunctions",null),(0,r._)([(0,u.MZ)({type:ce.A,json:{write:!0}})],Ut.prototype,"pixelSize",void 0),(0,r._)([(0,d.K)("pixelSize")],Ut.prototype,"writePixelSize",null),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnGeometry",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnCatalogItems",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnPixelValues",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Ut.prototype,"maxItemCount",void 0),(0,r._)([(0,u.MZ)({type:Ct.A,json:{write:{target:"time"}}})],Ut.prototype,"timeExtent",void 0),(0,r._)([(0,d.K)("timeExtent")],Ut.prototype,"writeTimeExtent",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ut.prototype,"raster",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ut.prototype,"viewId",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],Ut.prototype,"processAsMultidimensional",void 0),Ut=Bt=(0,r._)([(0,c.$)("esri.rest.support.ImageIdentifyParameters")],Ut);const Ht=Ut;var kt;let Qt=kt=class extends x.oY{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new kt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,u.MZ)({type:[ce.A],json:{write:!0}})],Qt.prototype,"geometries",void 0),(0,r._)([(0,d.K)("geometries")],Qt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:b.jz,json:{write:!0}})],Qt.prototype,"rasterId",void 0),Qt=kt=(0,r._)([(0,c.$)("esri.rest.support.ImagePixelLocationParameters")],Qt);const Kt=Qt;var Yt;let Wt=Yt=class extends xt{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.$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 Yt((0,v.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({types:h.yR,json:{name:"fromGeometry",read:tt.rS}})],Wt.prototype,"geometry",void 0),(0,r._)([(0,d.K)("geometry")],Wt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:It.apiValues,json:{read:It.read,write:It.write}})],Wt.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],Wt.prototype,"is3D",void 0),Wt=Yt=(0,r._)([(0,c.$)("esri.rest.support.ImagePointParameters")],Wt);const Xt=Wt;var ei;let ti=ei=class extends x.oY{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.$B)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new yt.A({spatialReference:e[0].spatialReference,points:e.map((({x:e,y:t})=>[e,t]))});this._set("locations",e),this.geometry=t}}clone(){return new ei((0,v.o8)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.MZ)({types:h.yR,json:{read:tt.rS}})],ti.prototype,"geometry",void 0),(0,r._)([(0,d.K)("geometry")],ti.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)()],ti.prototype,"locations",null),(0,r._)([(0,u.MZ)({type:String,json:{type:Q.SZ.jsonValues,read:Q.SZ.read,write:Q.SZ.write}})],ti.prototype,"interpolation",void 0),(0,r._)([(0,u.MZ)({type:k.A,json:{write:!0}})],ti.prototype,"mosaicRule",void 0),(0,r._)([(0,u.MZ)({type:[String],json:{write:!0}})],ti.prototype,"outFields",void 0),(0,r._)([(0,u.MZ)({type:ce.A,json:{write:!0}})],ti.prototype,"pixelSize",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],ti.prototype,"raster",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],ti.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],ti.prototype,"sampleDistance",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],ti.prototype,"sampleCount",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],ti.prototype,"sliceId",void 0),(0,r._)([(0,u.MZ)({type:Ct.A,json:{read:{source:"time"},write:{target:"time"}}})],ti.prototype,"timeExtent",void 0),ti=ei=(0,r._)([(0,c.$)("esri.rest.support.ImageSampleParameters")],ti);const ii=ti;let ri=class extends((0,n.O)(x.oY)){constructor(){super(...arguments),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,tt.$B)(e[0]),geometries:e.map((e=>({...e.toJSON(),spatialReference:void 0})))}:null}};(0,r._)([(0,u.MZ)({types:[h.yR]})],ri.prototype,"geometries",void 0),(0,r._)([(0,d.K)("geometries")],ri.prototype,"writeGeometries",null),(0,r._)([(0,u.MZ)({type:[b.jz],json:{write:!0}})],ri.prototype,"rasterIds",void 0),(0,r._)([(0,u.MZ)({type:fe.A,json:{name:"outSR",write:!0}})],ri.prototype,"outSpatialReference",void 0),ri=(0,r._)([(0,c.$)("esri.rest.support.ImageToMapMultirayParameters")],ri);const si=ri;let ni=class extends((0,n.O)(x.oY)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,r._)([(0,u.MZ)({types:h.yR,json:{read:tt.rS,write:!0}})],ni.prototype,"geometry",void 0),(0,r._)([(0,d.K)("geometry")],ni.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],ni.prototype,"rasterId",void 0),(0,r._)([(0,u.MZ)({type:fe.A,json:{name:"outSR",write:!0}})],ni.prototype,"outSpatialReference",void 0),(0,r._)([(0,u.MZ)({json:{name:"options.DOff",write:!0}})],ni.prototype,"depthOffset",void 0),(0,r._)([(0,u.MZ)({json:{name:"options.Adjust",write:!0}})],ni.prototype,"adjust",void 0),ni=(0,r._)([(0,c.$)("esri.rest.support.ImageToMapParameters")],ni);const oi=ni;let ai=class extends((0,n.O)(x.oY)){constructor(){super(...arguments),this.referenceUri=null,this.rasterId=null}};(0,r._)([(0,u.MZ)({type:String,json:{name:"uri",write:!0}})],ai.prototype,"referenceUri",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],ai.prototype,"rasterId",void 0),ai=(0,r._)([(0,c.$)("esri.rest.support.ImageUrlParameters")],ai);const li=ai;let ui=class extends((0,n.O)(x.oY)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.$B)(e),t[i]=JSON.stringify(e))}};(0,r._)([(0,u.MZ)({types:h.yR,json:{read:tt.rS,write:!0}})],ui.prototype,"geometry",void 0),(0,r._)([(0,d.K)("geometry")],ui.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],ui.prototype,"rasterId",void 0),(0,r._)([(0,u.MZ)({json:{name:"options.VisibleOnly",write:!0}})],ui.prototype,"visibleOnly",void 0),ui=(0,r._)([(0,c.$)("esri.rest.support.MapToImageParameters")],ui);const pi=ui;var ci;let di=ci=class extends x.oY{constructor(){super(...arguments),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,v.o8)({geometry:this.geometry,rasterId:this.rasterId});return new ci(e)}};(0,r._)([(0,u.MZ)({types:h.yR,json:{name:"fromGeometry",read:tt.rS,write:!0}})],di.prototype,"geometry",void 0),(0,r._)([(0,d.K)("geometry")],di.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],di.prototype,"rasterId",void 0),di=ci=(0,r._)([(0,c.$)("esri.rest.support.MeasureFromImageParameters")],di);const mi=di;var hi=i(4095);const yi=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),gi=(0,u.Qp)(b.GB,{min:0,max:255}),fi=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",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 K({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?k.A.fromJSON(t):null}get fieldsIndex(){return this.fields?new W.A(this.fields):null}set format(e){e&&yi.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"}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=k.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?k.A.fromJSON(i):this._isMosaicRuleSupported(t)?k.A.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const s=this.definitionExpression;r?s&&s!==r.where&&(r=r.clone(),r.where=s):s&&(r=new k.A({where:s})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=gi(e))}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,R.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,g.LF)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),V(s)||p.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(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix,t=new Y.A({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new Y.A({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new Y.A({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?(0,v.o8)(this.fields):[];s.push(i),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(r),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new Y.A({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new Y.A({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new Y.A({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:n}=this.rasterInfo??{};if(null!=n){const t=n.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const i=(0,v.o8)(t);return i.name=e+t.name,i}));s=s.concat(t)}return s}get renderingRule(){return(0,w.Lx)(p.A.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this.rasterFunction}set renderingRule(e){(0,w.Lx)(p.A.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=A.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)?A.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):A.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?fe.A.fromJSON(i):null}readPixelType(e){return Q.e8.fromJSON(e)||e}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=Q.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;const{renderer:r,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&r&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(r.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=r.toJSON());const l=await a.symbolize({bandIds:o,...e},t);i={extent:e.extent,pixelBlock:l}}else i={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return i}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new o.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,b.PZ)(Ft,e).clone(),async function(e,t,i){const r=t.toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=dt(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(r.spatialReference=mt(t.spatialReference));const s=(0,pe.Dl)(e),n=(0,pe.lF)({...s.query,f:"json",...r}),o=(0,pe.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new fe.A({wkid:0,imageCoordinateSystem:a.spatialReference}):fe.A.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new ve(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,b.PZ)(Kt,e).clone(),async function(e,t,i){const r=t.toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=dt(s[e].spatialReference));const n=(0,pe.Dl)(e),o=(0,pe.lF)({...n.query,f:"json",...r}),a=(0,pe.jV)(o,i),{data:l}=await(0,f.A)(`${n.path}/computePixelLocation`,a);return Ue.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,b.PZ)($t.A,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await at(e,t,i),s=(0,pe.Dl)(e),{data:n}=await(0,f.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 o.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,b.PZ)($t.A,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await at(e,t,i),s=(0,pe.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeStatisticsHistograms`,r),{statistics:o}=n;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,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 o.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,b.PZ)(zt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await ut(e,t,[t.fromGeometry,t.toGeometry],i);return Ge.fromJSON(r)}(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 o.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,b.PZ)(Zt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await ut(e,t,[t.geometry],i);return xe.fromJSON(r)}(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 o.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,b.PZ)(Ot,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await ut(e,t,[t.fromGeometry,t.toGeometry],i);return Pe.fromJSON(r)}(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 o.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,b.PZ)(Xt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await ut(e,t,[t.geometry],i);return ke.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new o.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return e=(0,b.PZ)(mi,e).clone(),async function(e,t,i){const r=await pt(e,t,i);return nt.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new o.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return e=(0,b.PZ)(mi,e).clone(),async function(e,t,i){const r=await pt(e,t,i);return rt.fromJSON(r)}(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 fetchImage(e,t,r,s={}){if(null==e||null==t||null==r)throw new o.A("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:s.signal});e&&(this.rasterInfo=e)}const n=this.getExportImageServiceParameters(e,t,r,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,s.returnImageBitmap?{imageBitmap:await(0,X.m)(e,`${i(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*r,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(te.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new te.A({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!s.requestAsImageElement&&!this.pixelFilter,l=a&&!!s.returnImageBitmap,u={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:a,returnImageBitmap:l,signal:s.signal};return this._requestArrayBuffer(u)}fetchKeyProperties(e){return(0,f.A)(i(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 o.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.A)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>Le.A.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,pe.Dl)(e),s=(0,pe.lF)({...r?.query,f:"json"}),n=(0,pe.jV)(s,i),o=`${r?.path}/${t}/info`,a=(0,f.A)(`${o}`,n),l=(0,f.A)(`${o}/keyProperties`,n),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let d=null;p.statistics?.length&&(d=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const m=Ae.A.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),y=Math.ceil(m.height/p.pixelSizeY-.1),g=m.spatialReference,w=new ce.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),v=p.histograms?.length?p.histograms:null,_=new _t.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new ie.A({width:h,height:y,bandCount:p.bandCount,extent:m,spatialReference:g,pixelSize:w,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:v,keyProperties:c,storageInfo:_})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,f.A)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await(0,f.A)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n||!n.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,f.A)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,M.YX)(a),outSR:"0:"+e},u=(0,f.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,d=n.ymin+c,m=[];for(let e=0;e<5;e++)m.push({x:p,y:d+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:m}),inSR:(0,M.YX)(a),outSR:"0:"+e},y=(0,f.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,y]);let w=g[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=Ae.A.fromJSON(g[1]?.geometries?.[0]);v&&(v.spatialReference=new fe.A({wkid:0,imageCoordinateSystem:s}));const _=g[2].geometries?g[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],R=_.length;if(R<3)return{ics:s,icsToPixelTransform:w,icsExtent:v,northDirection:null};let b=0,S=0,F=0,I=0;for(let e=0;e<R;e++)b+=_[e].x,S+=_[e].y,F+=_[e].x*_[e].x,I+=_[e].x*_[e].y;const x=(R*I-b*S)/(R*F-b*b);let A=0;const j=_[4].x>_[0].x,Z=_[4].y>_[0].y;return x===1/0?A=Z?90:270:0===x?A=j?0:180:x>0?A=j?180*Math.atan(x)/Math.PI:180*Math.atan(x)/Math.PI+180:x<0&&(A=Z?180+180*Math.atan(x)/Math.PI:360+180*Math.atan(x)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:v,northDirection:A}}async generateRasterInfo(e,t){if(e=(0,b.PZ)(A.A,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const r=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),i=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return i?i.join("/"):null}(e);if(!r)throw new o.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const s={...t,query:this._getQueryParams()},n=(0,vt.X6)(i(this.parsedUrl),e,s);this._functionRasterInfos[r]=n;try{return await n}catch(e){throw this._functionRasterInfos[r]=null,e}}getExportImageServiceParameters(e,t,r,s){const n=mt((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;o.bandIds=void 0}else o.bandIds=a?.join(",");Array.isArray(l)&&l.length>0&&(o.noData=l.join(","));const d=this._processMultidimensionalIntersection(null,s,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,s=d.timeExtent,o.renderingRule=this._getRenderingRuleString(A.A.fromJSON(u));const m={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?m.time=""+e:null==e&&null==t||(m.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+r,...o,...m}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new o.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,b.PZ)(ii,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=t.toJSON();ot(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const s=await(0,ue.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=ct(n));const o=(0,pe.Dl)(e),a=(0,pe.lF)({...o.query,f:"json",...r}),l=(0,pe.jV)(a,i),{data:u}=await(0,f.A)(`${o.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return We.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,b.PZ)(Ht,e).clone(),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=je.A.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new o.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),lt(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new o.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return e=(0,b.PZ)(oi,e),async function(e,t,i){const r=t.toJSON();t.geometry.spatialReference.imageCoordinateSystem&&(r.geometry=ct(t.geometry)),t.depthOffset&&t.adjust||delete r.options;const s=(0,pe.Dl)(e),n=(0,pe.lF)({...s.query,f:"json",...r}),o=(0,pe.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/imageToMap`,o);return(0,tt.rS)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new o.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return e=(0,b.PZ)(si,e),async function(e,t,i){const r=t.toJSON();t.rasterIds?.length&&(r.rasterIds=t.rasterIds.join(","));const s=(0,pe.Dl)(e),n=(0,pe.lF)({...s.query,f:"json",...r}),o=(0,pe.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/imageToMapMultiray`,o);return(0,tt.rS)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new o.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return e=(0,b.PZ)(pi,e),async function(e,t,i){const r=t.toJSON(),s=await(0,ue.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=ct(n)),t.visibleOnly||delete r.options;const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=mt(o));const a=(0,pe.Dl)(e),l=(0,pe.lF)({...a.query,f:"json",...r}),u=(0,pe.jV)(l,i),{data:p}=await(0,f.A)(`${a.path}/mapToImage`,u);return(0,tt.rS)(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new o.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return e=(0,b.PZ)(bt,e),async function(e,t,i){const r=t.toJSON(),s=await(0,ue.el)([t.fromGeometry,t.toGeometry]);null!=s[0]&&(r.fromGeometry=ct(s[0]),s[0].spatialReference&&(r.inSR=mt(s[0].spatialReference))),null!=s[1]&&(r.toGeometry=ct(s[1])),t.objectIds?.length&&(r.objectIds=r.objectIds.join(","));const n=(0,pe.Dl)(e),o=(0,pe.lF)({...n.query,f:"json",...r}),a=(0,pe.jV)(o,i),{data:l}=await(0,f.A)(`${n.path}/find`,a);return ge.fromJSON(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new o.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return e=(0,b.PZ)(li,e),async function(e,t,i){const r=t.toJSON(),s=(0,pe.Dl)(e),n=(0,pe.lF)({...s.query,f:"json",...r}),o=(0,pe.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/getImageUrl`,o);return et.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new gt.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new o.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=(0,b.PZ)(Tt,e??{outSpatialReference:this.spatialReference}).clone(),async function(e,t,i){const r=(0,pe.Dl)(e),s=t.toJSON();t.outSpatialReference&&(s.outSR=mt(t.outSpatialReference));const n=(0,pe.lF)({...r.query,f:"json",...s}),o=(0,pe.jV)(n,i),{data:a}=await(0,f.A)(r.path+"/queryBoundary",o);return De.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,ht.s)(this.url,e,t)}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 o.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=(0,b.PZ)(qt,e??{outSpatialReference:this.spatialReference}).clone(),async function(e,t,i){const r=t.toJSON();ot(r),r.objectIds?.length&&(r.objectIds=r.objectIds.join(",")),r.geometry||r.objectIds||r.time||r.where||(r.where="1=1");const s=await(0,ue.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=ct(n));const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=mt(o));const a=(0,pe.Dl)(e),l=(0,pe.lF)({...a.query,f:"json",...r}),u=(0,pe.jV)(l,i),{data:p}=await(0,f.A)(`${a.path}/queryGPSInfo`,u);return Ee.fromJSON(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,ft.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o.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,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some((e=>!e.toLowerCase().includes(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(p)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new A.A({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some((e=>e.functionName===i.functionName))&&(l.push(i),u.push(i.functionName))}const d=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let h=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:i}=(0,se.Rp)(m,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new o.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(h=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=je.A.fromExtent(g));const f=this._getQueryParams({geometry:g,timeExtent:h,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:a,returnGeometry:d,raster:this.raster,maxItemCount:s?1:null});delete f.f;const w=new Ht(f);try{await this._generateRasterInfo(this.rasterFunction);const i=await lt(this.url,w,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,o=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!a||d||!i?.catalogItems?.features.length||!n&&o)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s});const l=this.objectIdField||"ObjectId",p=i.catalogItems?.features??[],c=p.map((e=>e.attributes?.[l])),m=new gt.A({objectIds:c,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),h=await this.queryRasters(m);return h?.features?.length&&h.features.forEach((t=>{p.forEach((i=>{i.attributes[l]===t.attributes[l]&&(i.geometry=new je.A(t.geometry),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s})}catch{throw new o.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,f.A)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,f.A)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),n=await Promise.all([r,s]);return n[0]&&n[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:n[0]||null,histograms:n[1]||null}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,hi.CW)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,se.z2)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,vt.Tw)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,vt.E9)(e,t),e))),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([r,s,n]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),p.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,_.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 o=e.multidimensionalDefinition.filter((e=>e.dimensionName===n)),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.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 I.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 o.A("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,b.PZ)(gt.A,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new re.A;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_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,ae.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:r,ssl:s}=await(0,f.A)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new o.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)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&i.bandCount>=3){const e=(0,ae.ci)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,ae.PD)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,ae.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=i):this.symbolizer=new le.A({rendererJSON:t,rasterInfo:i}),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.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,ne.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 r=await(0,f.A)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:s,signal:n}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:o}=await(0,f.A)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,X.m)(o,r,n),params:t}:{imageOrCanvasElement:o,params:t}}const a=this._initJobHandler(),l=(0,f.A)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),u=(await Promise.all([l,a]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,ne.g)(u)),!c)throw new o.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const d={signal:n},m="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,ne.D)(u,{useCanvas:!0,...t},d):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},d);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,se.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new k.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:o}=t,a=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"),d=[];if(i&&!l&&!c){const e={};e[p]=0,u=[i],l=[new y.A({geometry:this.fullExtent,attributes:e})]}if(!l)return[];let m,h,g;this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);for(let e=0;e<l.length;e++){if(m=l[e],null!=i){if(h=u[e],g=this.rasterFunction&&a&&a.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?a[r.indexOf(this.rasterFunction.functionName)]:i,"nodata"===h.toLowerCase()&&!s)continue;const t="Raster.ItemPixelValue",n="Raster.ServicePixelValue";m.attributes[t]=h,m.attributes[n]=g,this._updateFeatureWithMagDirValues(m,h);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?h:i:g;this.rasterFunction||(l=o?h:i),this._updateFeatureWithRasterAttributeTableValues(m,l)}if(m.sourceLayer=m.layer=this,n&&this._updateFeatureWithDomainValues(m),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];m.attributes[t]=a[e]}d.push(l[e])}return d}_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,se.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,se.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 o=r.filter((e=>e.attributes[n]===(null!=t?parseInt(t,10):null)));o&&o[0]&&s.forEach((t=>{const i=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=o[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 te.A({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new Ae.A(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,oe.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"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&&e instanceof $t.A&&null==e.rasterFunction&&(e.rasterFunction=r),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,advancedQueryCapabilities:r,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic"),d=this._isMosaicDataset(e)&&t.includes("catalog"),m=t.includes("download");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsImageToMap:i>=11.2&&d,supportsImageToMapMultiray:i>=11.2&&d,supportsMapToImage:i>=11.2&&d,supportsFindImages:i>=11.2&&d,supportsGetImageUrl:i>=11.3&&m,supportsMeasure:u,supportsMeasureFromImage:i>=11.2,supportsDownload:m,supportsQuery:d&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&n,supportsProject:i>=10.3&&n,supportsComputeStatisticsHistograms:i>=10.4&&n,supportsQueryBoundary:i>=10.6&&n,supportsCalculateVolume:i>=10.7&&o,supportsComputePixelLocation:i>=10.7&&d,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&d,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function i(e){return e?.path??""}return(0,r._)([(0,u.MZ)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,u.MZ)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,u.MZ)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,S.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,u.MZ)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,u.MZ)({type:[b.jz],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,S.w)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,S.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,u.MZ)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,d.K)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.MZ)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,d.K)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,S.w)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,u.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,type:[Y.A]})],t.prototype,"fields",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,u.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,S.w)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,u.MZ)({type:Ae.A})],t.prototype,"fullExtent",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,u.MZ)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,u.MZ)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,u.MZ)({type:String,json:{type:Q.SZ.jsonValues,read:Q.SZ.read,write:Q.SZ.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"minScale",void 0),(0,r._)([(0,S.w)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,u.MZ)()],t.prototype,"maxScale",void 0),(0,r._)([(0,S.w)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,u.MZ)({type:k.A})],t.prototype,"mosaicRule",null),(0,r._)([(0,S.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,d.K)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,u.MZ)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,u.MZ)({type:ee.A,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,u.MZ)({json:{type:b.jz}})],t.prototype,"noData",void 0),(0,r._)([(0,d.K)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,u.MZ)({type:String,json:{type:Q.hm.jsonValues,read:Q.hm.read,write:Q.hm.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,u.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,S.w)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,r._)([(0,u.MZ)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,u.MZ)({})],t.prototype,"types",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,u.MZ)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"raster",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,S.w)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,u.MZ)()],t.prototype,"viewId",void 0),(0,r._)([(0,u.MZ)({types:g.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:g.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,r._)([(0,S.w)("renderer")],t.prototype,"readRenderer",null),(0,r._)([(0,d.K)("renderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,u.MZ)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,r._)([(0,u.MZ)(F.ke)],t.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,u.MZ)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,u.MZ)({type:A.A})],t.prototype,"renderingRule",null),(0,r._)([(0,u.MZ)({type:A.A,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,r._)([(0,S.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,type:fe.A})],t.prototype,"spatialReference",void 0),(0,r._)([(0,S.w)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,u.MZ)({json:{type:Q.e8.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,S.w)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,d.K)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,u.MZ)({constructOnly:!0,type:ie.A})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,u.MZ)(F.OZ)],t.prototype,"url",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,S.w)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,c.$)("esri.layers.mixins.ArcGISImageService")],t),t};var wi=i(18768),vi=i(63074),_i=i(69208),Ri=i(16131),bi=i(8303),Si=i(54310),Mi=i(25036),Fi=i(82935),Ii=i(91908),xi=i(30291),Ai=i(92935);let ji=class extends((0,vi.d)((0,Fi.e)((0,Mi.j)((0,Ri.q)((0,bi.A)(fi((0,Si.J)((0,_i.d)((0,wi.b)((0,a.P)((0,n.O)(m.A)))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.sg)((async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case Ai.X.SAVE:return s(this,t);case Ai.X.SAVE_AS: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(l.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}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)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const t=this.rasterFields,i=this.title,r=new Set;let s=!1,n=!1;this.capabilities&&(s=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,n="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;s&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||r.add(e.name)}n&&r.add("raster.magnitude").add("raster.direction");const a=(0,xi.tn)({fields:t,title:i},{...e,visibleFieldNames:r});return a?.fieldInfos&&this.rasterInfo?.pixelType.startsWith("f")&&a.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),a}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(Ai.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ai.X.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,Ii.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.A("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,r._)([(0,u.MZ)(F.fV)],ji.prototype,"legendEnabled",null),(0,r._)([(0,u.MZ)({type:["show","hide"]})],ji.prototype,"listMode",null),(0,r._)([(0,u.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ji.prototype,"isReference",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],ji.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.K)("web-map","operationalLayerType")],ji.prototype,"writeOperationalLayerType",null),(0,r._)([(0,u.MZ)(F.M6)],ji.prototype,"popupEnabled",void 0),(0,r._)([(0,u.MZ)({type:s.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],ji.prototype,"popupTemplate",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],ji.prototype,"defaultPopupTemplate",null),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],ji.prototype,"type",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],ji.prototype,"_isPreviewLayer",null),ji=(0,r._)([(0,c.$)("esri.layers.ImageryLayer")],ji);const Zi=ji},43334:(e,t,i)=>{i.d(t,{N3:()=>s,Om:()=>r});class r{constructor(e=null,t={},i,r){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new r(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new r(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function s(e){return!!e.geometry?.coords?.length}},58512:(e,t,i)=>{i.d(t,{A:()=>r});class r{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,i)=>{i.d(t,{A:()=>r});class r{constructor(e=[],t=[],i=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=i}static fromRect(e){const[t,i,s,n]=e,o=s-t,a=n-i;return new r([5],[t,i,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let i=0;i<this.lengths.length;i++){const r=this.lengths[i];for(let i=0;i<r;i++)e(this.coords[2*(i+t)],this.coords[2*(i+t)+1]);t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:i}=e;let r=0;for(const e of i){for(let i=1;i<e;i++)t[2*(r+i)]+=t[2*(r+i)-2],t[2*(r+i)+1]+=t[2*(r+i)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new r([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),i=this.coords.slice(0,t);return e?(e.set(i),new r(this.lengths,e,this.hasIndeterminateRingOrder)):new r(Array.from(this.lengths),Array.from(i),this.hasIndeterminateRingOrder)}}},95466:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(49186),s=i(25482),n=i(53966),o=i(91869),a=i(3330),l=i(30524),u=i(56400),p=i(96285);const c=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],g(e))}static fromLayerJSON(e){return new d(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=h(t);if(t&&r){const s=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").error(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(c,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function h(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,u.ZS)(s.dateFieldsTimeReference):a??u.n$:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,u.ZS)(r.timeReference):a:null,c=new Map([[m(s?.creationDateField??""),l],[m(s?.editDateField??""),l],[m(n),p],[m(o),p]]);for(const{name:r,type:s}of e.fields)if(y.has(s))t.set(r,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,u.L5);else{const e=c.get(m(r??""))??a;t.set(r,e)}return t}},33446:(e,t,i)=>{i.d(t,{C:()=>o,m:()=>n});var r=i(49186),s=i(74887);async function n(e,t,i){let n;try{n=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(i),n}async function o(e,t,i,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load tile ${t}/${i}/${n}`,{error:e,level:t,row:i,col:n})}return(0,s.Te)(o),a}},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}]),s.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),s.push([10.61,()=>new Set([102497])]),s.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}])},20615:(e,t,i)=>{i.d(t,{I:()=>o});var r=i(2272),s=i(80893),n=i(61956);async function o(e,t,i){const o=(0,r.Dl)(e);return(0,s.gW)(o,n.A.from(t),{...i}).then((e=>e.data.count))}},78286:(e,t,i)=>{i.d(t,{V:()=>o});var r=i(2272),s=i(80893),n=i(61956);async function o(e,t,i){const o=(0,r.Dl)(e);return(0,s.Pk)(o,n.A.from(t),{...i}).then((e=>e.data.objectIds))}},99199:(e,t,i)=>{i.d(t,{e:()=>l,s:()=>a});var r=i(2272),s=i(80893),n=i(22671),o=i(61956);async function a(e,t,i){const r=await l(e,t,i);return n.A.fromJSON(r)}async function l(e,t,i){const n=(0,r.Dl)(e),a={...i},l=o.A.from(t),{data:u}=await(0,s.eW)(n,l,l.sourceSpatialReference,a);return u}},58501:(e,t,i)=>{i.d(t,{q:()=>s});var r=i(62815);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},77073:(e,t,i)=>{i.d(t,{A:()=>c});var r,s=i(90237),n=i(25482),o=i(10107),a=i(56507),l=(i(87811),i(44208),i(40608));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=r=class extends n.oY{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const s=t.find((e=>e.name===i));return s?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r?.value||null}({tagName:r,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,s._)([(0,o.MZ)({type:String})],p.prototype,"contentType",void 0),(0,s._)([(0,o.MZ)()],p.prototype,"exifInfo",void 0),(0,s._)([(0,o.MZ)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,s._)([(0,o.MZ)({type:a.jz})],p.prototype,"id",void 0),(0,s._)([(0,o.MZ)({type:String})],p.prototype,"globalId",void 0),(0,s._)([(0,o.MZ)({type:String})],p.prototype,"keywords",void 0),(0,s._)([(0,o.MZ)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,o.MZ)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,s._)([(0,o.MZ)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,s._)([(0,o.MZ)({type:a.jz})],p.prototype,"size",void 0),(0,s._)([(0,o.MZ)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,s._)([(0,l.$)("esri.rest.query.support.AttachmentInfo")],p);const c=p},54546:(e,t,i)=>{i.d(t,{A:()=>d});var r,s=i(90237),n=i(25482),o=i(4718),a=i(10107),l=i(56507),u=i(40608),p=i(43937);let c=r=class extends n.oY{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new r((0,o.o8)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,s._)([(0,a.MZ)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.MZ)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,s._)([(0,a.MZ)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,s._)([(0,a.MZ)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,s._)([(0,a.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,s._)([(0,a.MZ)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,s._)([(0,a.MZ)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,s._)([(0,a.MZ)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,s._)([(0,p.K)("start"),(0,p.K)("num")],c.prototype,"writeStart",null),(0,s._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=r=(0,s._)([(0,u.$)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.dp)(c);const d=c},26591:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,s=i(90237),n=(i(59456),i(25482)),o=i(4718),a=i(10107),l=i(56507),u=i(40608),p=i(43937),c=i(27733),d=i(16930);let m=r=class extends n.oY{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new r((0,o.o8)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,s._)([(0,a.MZ)({type:c.L,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.MZ)({type:Date})],m.prototype,"historicMoment",void 0),(0,s._)([(0,p.K)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.MZ)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,s._)([(0,a.MZ)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,s._)([(0,a.MZ)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,s._)([(0,a.MZ)({type:d.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,s._)([(0,p.K)("start"),(0,p.K)("num")],m.prototype,"writeStart",null),(0,s._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,s._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,s._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,s._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,s._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=r=(0,s._)([(0,u.$)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.dp)(m);const h=m},57561:(e,t,i)=>{i.d(t,{A:()=>b});var r,s=i(90237),n=i(59456),o=i(60945),a=i(66552),l=i(25482),u=i(4718),p=i(10107),c=i(56507),d=i(40608),m=i(43937),h=i(65864);i(44208),i(53966),i(87811);let y=r=class extends l.oY{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new r({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,p.MZ)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,s._)([(0,p.MZ)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,s._)([(0,p.MZ)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=r=(0,s._)([(0,d.$)("esri.rest.support.TopFilter")],y);const g=y;var f,w=i(16930);const v=new a.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),_=new a.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=f=class extends l.oY{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new f((0,u.o8)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),(0,s._)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],R.prototype,"distance",void 0),(0,s._)([(0,p.MZ)({types:n.yR,json:{read:h.rS,write:!0}})],R.prototype,"geometry",void 0),(0,s._)([(0,p.MZ)({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),(0,s._)([(0,p.MZ)({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,p.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),(0,s._)([(0,p.MZ)({json:{write:!0}})],R.prototype,"objectIds",void 0),(0,s._)([(0,p.MZ)({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),(0,s._)([(0,p.MZ)({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),(0,s._)([(0,p.MZ)({type:w.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],R.prototype,"outSpatialReference",void 0),(0,s._)([(0,p.MZ)({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),(0,s._)([(0,p.MZ)({json:{write:!0}})],R.prototype,"returnGeometry",void 0),(0,s._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnM",void 0),(0,s._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnZ",void 0),(0,s._)([(0,p.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),(0,s._)([(0,m.K)("start"),(0,m.K)("num")],R.prototype,"writeStart",null),(0,s._)([(0,p.MZ)({type:String,json:{read:{source:"spatialRel",reader:v.read},write:{target:"spatialRel",writer:v.write}}})],R.prototype,"spatialRelationship",void 0),(0,s._)([(0,p.MZ)({type:o.A,json:{write:!0}})],R.prototype,"timeExtent",void 0),(0,s._)([(0,p.MZ)({type:g,json:{write:!0}})],R.prototype,"topFilter",void 0),(0,s._)([(0,p.MZ)({type:String,json:{read:_.read,write:{writer:_.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],R.prototype,"units",void 0),(0,s._)([(0,p.MZ)({type:String,json:{write:!0}})],R.prototype,"where",void 0),R=f=(0,s._)([(0,d.$)("esri.rest.support.TopFeaturesQuery")],R),R.from=(0,c.dp)(R);const b=R}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9197,9062,6591,3069],{39516:(e,t,r)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return i.create(e,t)}function n(e,t){return"1=1"===e?t:"1=1"===t?e:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>i,m:()=>n})},3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>o,Y4:()=>s});var i=r(96285);class n{}function s(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},13069:(e,t,r)=>{r.d(t,{lk:()=>n,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}},70328:(e,t,r)=>{r.d(t,{BI:()=>m,Ej:()=>p,Hq:()=>u,Ie:()=>h,Jt:()=>f,Ne:()=>d,RF:()=>a,aI:()=>w,fA:()=>s,hZ:()=>y,iT:()=>l,is:()=>g,qv:()=>v,vI:()=>c,v_:()=>_,vt:()=>n,w1:()=>o});var i=r(5443);function n(e=_){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,o,a=n()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=s,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function c(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?y(e,v):n(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],_=[0,0,0,0,0,0];n()},88982:(e,t,r)=>{r.r(t),r.d(t,{default:()=>oe});var i=r(90237),n=r(78888),s=r(5503),o=r(49186),a=r(91869),l=r(92071),u=r(74887),p=r(84952),d=r(10107),c=(r(44208),r(53966),r(87811),r(40608)),y=r(4146),h=r(36563),f=r(55359),m=r(36708),g=r(35666);function w(e,t){return{ignoreOrigin:this.originIdOf(t)<g.Gr.PORTAL_ITEM}}var v=r(63074),_=r(25036),b=r(55785),S=r(91880),M=r(1873);let F=class extends((0,_.j)((0,v.d)((0,l.P)(y.A)))){constructor(e){super(e),this._layerCache=new f.q(20,(e=>e.destroy())),this._oidToReference=new Map,this._layerToReference=new Map,this.layers=new s.A,this.maximumVisibleSublayers=10,this.opacity=1,this.persistenceEnabled=!0,this.title="Layers In View",this.type="catalog-dynamic-group",this.visible=!0}initialize(){this.addHandles((0,m.wB)((()=>this._orderBy),(()=>{this._updateLayerSortValues(),this._sortAllLayers()})))}load(e){return this.addResolvingPromise(this.parent.load()),Promise.resolve(this)}destroy(){this._oidToReference.clear(),this._layerToReference.clear(),this._layerCache.destroy()}get _orderBy(){return this.parent.orderBy?.find((e=>!e.valueExpression&&e.field))??new S.A({field:this.parent.objectIdField})}get _referenceComparator(){const e=this._orderBy,t=this.parent.fieldsIndex.get(e.field),r=(0,M.FM)(t?.toJSON().type,"descending"===e.order);return(e,t)=>r(e.sortValue,t.sortValue)||e.objectId-e.objectId}acquireLayer(e){const t=this._getLayerReference(e);return t.count++,(0,h.hA)((()=>{t.count--,t.count||this._destroyLayerReference(t)}))}_getLayerReference(e){const t=e.getObjectId();return(0,a.tE)(this._oidToReference,t,(()=>{const t=e.getObjectId(),r=e.getAttribute(this.parent.itemSourceField),i=new A(e,t,r),n=this._layerCache.pop(r);return n?(this._addLayer(i,n),i):(this.parent.createLayerFromFootprint(e).then((e=>{i.count?this._addLayer(i,e):(this._layerCache.get(r)||this._layerCache.put(i.itemSource,e),i.layer=null)})).catch((()=>{})),i)}))}_destroyLayerReference(e){e.layer&&(this._layerToReference.delete(e.layer),this.layers.remove(e.layer),this._layerCache.put(e.itemSource,e.layer),e.layer=null),this._oidToReference.delete(e.objectId)}_addLayer(e,t){e.layer=t,this._layerToReference.set(t,e),this._updateLayerSortValue(e),t.parent=this,this.layers.add(t),this._sortAllLayers()}_updateLayerSortValues(){for(const e of this._layerToReference.values())this._updateLayerSortValue(e)}_updateLayerSortValue(e){e.sortValue=e.footprint.getAttribute(this._orderBy.field)}_sortAllLayers(){this.layers.sort(((e,t)=>this._referenceComparator(this._layerToReference.get(e),this._layerToReference.get(t))))}};(0,i._)([(0,d.MZ)()],F.prototype,"_orderBy",null),(0,i._)([(0,d.MZ)()],F.prototype,"_referenceComparator",null),(0,i._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],F.prototype,"id",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],F.prototype,"layers",void 0),(0,i._)([(0,d.MZ)({json:{write:{overridePolicy:w}}})],F.prototype,"maximumVisibleSublayers",void 0),(0,i._)([(0,d.MZ)(b.ke)],F.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({type:String,nonNullable:!0,json:{write:{overridePolicy:w}}})],F.prototype,"title",void 0),(0,i._)([(0,d.MZ)({json:{read:!1}})],F.prototype,"type",void 0),(0,i._)([(0,d.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],F.prototype,"visible",void 0),F=(0,i._)([(0,c.$)("esri.layers.catalog.CatalogDynamicGroupLayer")],F);const x=F;class A{constructor(e,t,r){this.footprint=e,this.objectId=t,this.itemSource=r,this.count=0,this.layer=null,this.sortValue=void 0}}var I=r(13874),R=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576)),Z=(r(93618),r(65494),r(15036)),T=r(4718),j=r(4206),E=r(87718),O=r(30524),L=r(81457),C=r(39383),N=r(30291),P=r(94985);let q=class extends((0,_.j)((0,E.F)((0,v.d)((0,l.P)(y.A))))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.formTemplate=null,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.opacity=1,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.title="Footprints",this.type="catalog-footprint",this.visible=!0}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.parent.load(e),(0,O.yp)(this.renderer,this.fieldsIndex)}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveEditingEnabled(){return!1}get fields(){return this.parent.fields}get fieldsIndex(){return this.parent.fieldsIndex}get geometryType(){return this.parent.geometryType}get objectIdField(){return this.parent.objectIdField}get orderBy(){return this.parent.orderBy}set renderer(e){(0,O.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):function(){const e=new P.A({style:"solid",color:[0,0,0,0],outline:{style:"solid",color:[96,96,96,.75],width:.75}});return new R.A({symbol:e})}()}createPopupTemplate(e){const t={fields:this.parent.fields,objectIdField:this.parent.objectIdField,title:this.title};return(0,N.tn)(t,e)}createQuery(){return this.parent.createQuery()}queryFeatures(e,t){return this.parent.queryFeatures(e,t)}};(0,i._)([(0,d.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],q.prototype,"charts",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],q.prototype,"defaultPopupTemplate",null),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:!0}})],q.prototype,"editingEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],q.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,d.MZ)({type:j.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],q.prototype,"formTemplate",void 0),(0,i._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],q.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:[L.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:C.w,write:!0}})],q.prototype,"labelingInfo",void 0),(0,i._)([(0,d.MZ)(b.kF)],q.prototype,"labelsVisible",void 0),(0,i._)([(0,d.MZ)(b.fV)],q.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)((()=>{const e=(0,T.o8)(b.hG);return e.json.origins.service.read=!1,e})())],q.prototype,"maxScale",void 0),(0,i._)([(0,d.MZ)((()=>{const e=(0,T.o8)(b.hn);return e.json.origins.service.read=!1,e})())],q.prototype,"minScale",void 0),(0,i._)([(0,d.MZ)(b.ke)],q.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)(b.M6)],q.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:I.A,json:{name:"popupInfo",write:!0}})],q.prototype,"popupTemplate",void 0),(0,i._)([(0,d.MZ)({types:Z.H,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:w}}})],q.prototype,"renderer",null),(0,i._)([(0,d.MZ)({type:String,nonNullable:!0,json:{write:{overridePolicy:w}}})],q.prototype,"title",void 0),(0,i._)([(0,d.MZ)({json:{read:!1}})],q.prototype,"type",void 0),(0,i._)([(0,d.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],q.prototype,"visible",void 0),q=(0,i._)([(0,c.$)("esri.layers.catalog.CatalogFootprintLayer")],q);const V=q;var D=r(72593),G=r(52136),B=r(18768),Q=r(69208),$=r(72390),z=r(16131),J=r(32756),U=r(8303),H=r(54310),k=r(82935),K=r(15426),W=r(17036),Y=r(4513),X=r(91908),ee=r(20655),te=r(80812),re=r(61956);const ie=(0,W.p)();function ne(e,t,r,i){const n=e.write({},i);(function(e){if(null==e)return!0;const t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]})(n)||(t[r]=n)}let se=class extends((0,$.j)((0,v.d)((0,J.f)((0,k.e)((0,_.j)((0,H.J)((0,B.b)((0,z.q)((0,U.A)((0,l.P)((0,Q.d)((0,G.p)(y.A))))))))))))){constructor(e){super(e),this._portals=new Map,this.dynamicGroupLayer=new x({parent:this}),this.fields=null,this.fieldsIndex=null,this.footprintLayer=new V({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new s.A([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.outFields=null,this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new D.default({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog"}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u.QP).then((async()=>{const{url:e,source:r,portalItem:i}=this;if(!e)throw new o.A("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){const r=await this._fetchFirstValidLayerId(t);if(null==r)throw new o.A("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t});const{sourceJSON:n}=r;n&&(this.sourceJSON=n,this.read(n,{origin:"service",portalItem:i,portal:i?.portal,url:this.parsedUrl}))})).then((()=>(0,K.VA)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&!!this.capabilities?.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}get parsedUrl(){const e=(0,p.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,p.fj)(e.path,this.layerId.toString())),e}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),t}createQuery(){const e=new re.A,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return this.fieldsIndex.get(e)?.domain}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(re.A.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r.footprintLayer;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(re.A.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(re.A.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(re.A.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,X.D)(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async _fetchFirstValidLayerId(e){const{data:t}=await(0,n.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(Array.isArray(t?.layers))return t.layers.find((({type:e})=>this.supportedSourceTypes.has(e)))?.id}async _createLayer(e){const t=e.getAttribute(this.itemSourceField),r=JSON.parse(t);if(function(e){return"object"==typeof e&&null!=e&&"itemId"in e&&"portalUrl"in e}(r)){const{itemId:e,portalUrl:t}=r,i=(0,a.tE)(this._portals,t,(()=>new ee.A({url:t})));return y.A.fromPortalItem(new te.default({id:e,portal:i}))}return function(e){return"object"==typeof e&&null!=e&&"url"in e}(r)?y.A.fromArcGISServerUrl({url:r.url}):new(await Y.S.UnsupportedLayer())}_configureLayer(e,t){const r=t.getAttribute(this.itemNameField);r&&(e.title=r);const i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);const n=t.getAttribute(this.minScaleField);null!=n&&"minScale"in e&&(e.minScale=n)}};(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"createQueryVersion",null),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:ne}}})],se.prototype,"dynamicGroupLayer",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"editingEnabled",null),(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,d.MZ)({...ie.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],se.prototype,"fields",void 0),(0,i._)([(0,d.MZ)(ie.fieldsIndex)],se.prototype,"fieldsIndex",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:ne}}})],se.prototype,"footprintLayer",void 0),(0,i._)([(0,d.MZ)(b.id)],se.prototype,"id",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"itemNameField",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"itemSourceField",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"itemTypeField",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"layers",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"maxScaleField",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"minScaleField",void 0),(0,i._)([(0,d.MZ)({value:"CatalogLayer",type:["CatalogLayer"]})],se.prototype,"operationalLayerType",void 0),(0,i._)([(0,d.MZ)(ie.outFields)],se.prototype,"outFields",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({readOnly:!0})],se.prototype,"source",void 0),(0,i._)([(0,d.MZ)({json:{read:!1}})],se.prototype,"type",void 0),se=(0,i._)([(0,c.$)("esri.layers.CatalogLayer")],se);const oe=se},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{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._)([(0,n.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),n=r(53966),s=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{let t=class extends e{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(null!=e&&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,n.A.getLogger(this)))}};return(0,i._)([(0,s.MZ)()],t.prototype,"title",null),(0,i._)([(0,s.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},87718:(e,t,r)=>{r.d(t,{F:()=>I});var i,n=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(49186),l=r(25482),u=r(93637),p=r(76369),d=r(59456),c=r(60945),y=r(66552),h=r(4718),f=r(61956);const m=new y.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new y.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=i=class extends l.oY{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:s,units:o,distance:a}=this;return new f.A({geometry:(0,h.o8)(r),objectIds:(0,h.o8)(s),spatialRelationship:i,timeExtent:(0,h.o8)(n),where:t,units:o,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:s,units:o,distance:a}=this;return new i({geometry:(0,h.o8)(t),objectIds:(0,h.o8)(s),spatialRelationship:r,timeExtent:(0,h.o8)(n),where:e,units:o,distance:a})}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,n._)([(0,s.MZ)({types:d.yR,json:{write:!0}})],w.prototype,"geometry",void 0),(0,n._)([(0,s.MZ)({type:m.apiValues,json:{name:"spatialRel",read:{reader:m.read},write:{allowNull:!1,writer:m.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,n._)([(0,s.MZ)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,n._)([(0,s.MZ)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,n._)([(0,s.MZ)({type:c.A,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=i=(0,n._)([(0,o.$)("esri.layers.support.FeatureFilter")],w);const v=w;var _;const b={read:{reader:p.LF},write:{writer:p.M9,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:p.LF},write:{writer:p.M9,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},M={name:"showExcludedLabels",default:!0};let F=_=class extends l.oY{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.A("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.A("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new _({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n._)([(0,s.MZ)({type:v,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,u.sM)(r,n,t):(0,u.sM)(r,null,t)}}}})],F.prototype,"filter",void 0),(0,n._)([(0,s.MZ)({json:{write:!0,origins:{"web-map":b,"portal-item":b}}})],F.prototype,"includedEffect",void 0),(0,n._)([(0,s.MZ)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],F.prototype,"excludedEffect",void 0),(0,n._)([(0,s.MZ)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":M,"portal-item":M}}})],F.prototype,"excludedLabelsVisible",void 0),F=_=(0,n._)([(0,o.$)("esri.layers.support.FeatureEffect")],F);const x=F,A={write:{allowNull:!0}},I=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,n._)([(0,s.MZ)({type:x,json:{origins:{"web-map":A,"portal-item":A}}})],t.prototype,"featureEffect",void 0),t=(0,n._)([(0,o.$)("esri.layers.mixins.FeatureEffectLayer")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>p});var i=r(90237),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new a.A;return n.read(i,r),[n]}function u(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,n.sM)(r,[s.toJSON()],t)}const p=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,s.MZ)({type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:l},write:{target:"layerDefinition.orderBy",writer:u}}})],t.prototype,"orderBy",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},20437:(e,t,r)=>{r.d(t,{A:()=>m});var i,n=r(90237),s=r(66552),o=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),p=r(36005),d=r(40608),c=r(72088),y=r(98453);const h=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,a.MZ)()],f.prototype,"description",void 0),(0,n._)([(0,p.w)("description")],f.prototype,"readDescription",null),(0,n._)([(0,a.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,u.e)(y.m)],f.prototype,"type",void 0),(0,n._)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,n._)([(0,p.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,n._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,n._)([(0,d.$)("esri.layers.support.Field")],f);const m=f},95466:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(49186),n=r(25482),s=r(53966),o=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],m(e))}static fromLayerJSON(e){return new c(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function h(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,u.ZS)(n.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,d=new Map([[y(n?.creationDateField??""),l],[y(n?.editDateField??""),l],[y(s),p],[y(o),p]]);for(const{name:i,type:n}of e.fields)if(f.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=d.get(y(i??""))??a;t.set(i,e)}return t}},37352:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(90237),s=r(5503),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));let u=i=class extends o.oY{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,n._)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,n._)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,n._)([(0,l.$)("esri.layers.support.LayerFloorInfo")],u);const p=u},91880:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(90237),s=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let p=i=class extends o.oY{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,n._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:u.apiValues,json:{read:u.read,write:u.write}})],p.prototype,"order",void 0),p=i=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],p);const d=p},72088:(e,t,r)=>{r.d(t,{rS:()=>F,gK:()=>M}),r(44208);var i,n=r(90237),s=r(4718),o=r(10107),a=(r(53966),r(93223)),l=r(40608),u=r(25482);r(87811);let p=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,n._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],p);const d=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.e)(d)],c.prototype,"type",void 0),c=(0,n._)([(0,l.$)("esri.layers.support.Domain")],c);const y=c;var h;let f=h=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.MZ)({type:[p],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=h=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],f);const m=f;var g;r(49186);let w=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,a.e)({inherited:"inherited"})],w.prototype,"type",void 0),w=g=(0,n._)([(0,l.$)("esri.layers.support.InheritedDomain")],w);const v=w;var _;let b=_=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new _({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],b.prototype,"maxValue",void 0),(0,n._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],b.prototype,"minValue",void 0),(0,n._)([(0,a.e)({range:"range"})],b.prototype,"type",void 0),b=_=(0,n._)([(0,l.$)("esri.layers.support.RangeDomain")],b);const S=b,M={key:"type",base:y,typeMap:{range:b,"coded-value":m,inherited:v}};function F(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},15426:(e,t,r)=>{r.d(t,{Xl:()=>v,ct:()=>S,C$:()=>V,PD:()=>G,VZ:()=>O,mm:()=>F,VA:()=>q,WP:()=>x,iX:()=>w,GA:()=>Q,jp:()=>E,tG:()=>B,lV:()=>A,B5:()=>Z,Ye:()=>R,sg:()=>I,hM:()=>T,S2:()=>j,jD:()=>L,Zm:()=>C,$4:()=>N,bt:()=>b,rn:()=>M});var i=r(70333),n=r(61147),s=r(60999),o=r(49186),a=r(66552),l=r(39516),u=r(90360),p=r(61956);async function d(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=c(e));const i=function(e){return c(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),n=e.capabilities.query.supportsPagination;t.start=0,t.num=i;let s=null;for(;;){const o=await e.source.queryFeaturesJSON(t,r);if(null==s?s=o:s.features=s.features.concat(o.features),s.exceededTransferLimit=o.exceededTransferLimit,!n||!o.exceededTransferLimit)break;t.start+=i}return s}function c(e){return e.capabilities.query.supportsMaxRecordCountFactor?p.A.MAX_MAX_RECORD_COUNT_FACTOR:1}var y=r(83531),h=r(96576),f=r(93618),m=r(54546),g=r(26591);const w=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function v(e,t,r,i){const n=await P(e);if(await _(e,t,i),!n.addAttachment)throw new o.A(i,"Layer source does not support addAttachment capability");return n.addAttachment(t,r)}function _(e,t,r){const{attributes:i}=t,{objectIdField:n}=e;return e.capabilities?.data?.supportsAttachment?t?i?n&&i[n]?Promise.resolve():Promise.reject(new o.A(r,`feature is missing the identifying attribute ${n}`)):Promise.reject(new o.A(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.A(r,"A feature is required to add/delete/update attachments")):Promise.reject(new o.A(r,"this layer doesn't support attachments"))}async function b(e,t,r,i,n){const s=await P(e);if(await _(e,t,n),!s.updateAttachment)throw new o.A(n,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,r,i)}async function S(e,t,i){const{applyEdits:n}=await r.e(8628).then(r.bind(r,78628)),s=await e.load(),{source:o,globalIdField:a}=s;let l=i;return("feature"===s.type?s.infoFor3D:null)&&null!=t.deleteFeatures&&null!=a&&(l={...l,globalIdToObjectId:await Q(e,t.deleteFeatures,a)}),n(s,o,t,i)}async function M(e,t,i){const{uploadAssets:n}=await r.e(8628).then(r.bind(r,78628)),s=await e.load();return n(s,s.source,t,i)}async function F(e,t,r,i){const n=await P(e);if(await _(e,t,i),!n.deleteAttachments)throw new o.A(i,"Layer source does not support deleteAttachments capability");return n.deleteAttachments(t,r)}async function x(e,t,r){const i=(await e.load({signal:t?.signal})).source;if(!i.fetchRecomputedExtents)throw new o.A(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function A(e,t,r,i){t=m.A.from(t),await e.load();const n=e.source,s=e.capabilities;if(!s?.data?.supportsAttachment)throw new o.A(i,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:u,num:p,size:d,start:c,where:y}=t;if(!s?.operations?.supportsQueryAttachments&&(a?.length>0||u?.length>0||d?.length>0||p||c||y))throw new o.A(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||u?.length||y))throw new o.A(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!n.queryAttachments)throw new o.A(i,"Layer source does not support queryAttachments capability",t);return n.queryAttachments(t)}async function I(e,t,r,i){const n=await P(e);if(!n.queryObjectIds)throw new o.A(i,"Layer source does not support queryObjectIds capability");return n.queryObjectIds(p.A.from(t)??e.createQuery(),r)}async function R(e,t,r,i){const n=await P(e);if(!n.queryFeatureCount)throw new o.A(i,"Layer source does not support queryFeatureCount capability");return n.queryFeatureCount(p.A.from(t)??e.createQuery(),r)}async function Z(e,t,r,i){const n=await P(e);if(!n.queryExtent)throw new o.A(i,"Layer source does not support queryExtent capability");return n.queryExtent(p.A.from(t)??e.createQuery(),r)}async function T(e,t,r,i){const n=await P(e);if(!n.queryRelatedFeatures)throw new o.A(i,"Layer source does not support queryRelatedFeatures capability");return n.queryRelatedFeatures(g.default.from(t),r)}async function j(e,t,r,i){const n=await P(e);if(!n.queryRelatedFeaturesCount)throw new o.A(i,"Layer source does not support queryRelatedFeaturesCount capability");return n.queryRelatedFeaturesCount(g.default.from(t),r)}async function E(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:i}=await t.refresh();if(null!=i&&(e.sourceJSON={...e.sourceJSON,...i},e.read(i,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.G)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function O(e){const t=new p.A,r=e.capabilities?.data,i=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,i&&(t.compactGeometryEnabled=i.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=i.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:n,timeExtent:s}=e;return t.timeExtent=null!=n&&null!=s?s.offset(-n.value,n.unit):s||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function L(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function C(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function N(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function P(e){return(await e.load()).source}async function q(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!i.id)return;if(i.id.findCredential(e))return;let r;try{const n=await(0,y.wI)(e,t);n&&(r=await i.id.checkSignInStatus(`${n}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await i.id.getCredential(e,{signal:r})}catch(e){}}(n,r)}function V(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const D=(0,u.C)({types:n.xK});function G(e,t){if(e.defaultSymbol)return e.types?.length?new f.A({defaultSymbol:D(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:D(e.symbol,e,t)})))}):new h.A({symbol:D(e.defaultSymbol,e,t)})}function B(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function Q(e,t,r){if(null==t)return null;const i=[],{objectIdField:n}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:i}=e;t={globalId:i[r],objectId:null!=i[n]&&-1!==i[n]?i[n]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||i.push(t.globalId))})),0===i.length)return null;const o=e.createQuery();o.where=i.map((e=>`${r}='${e}'`)).join(" OR "),o.returnGeometry=!1,o.outFields=[n,r],o.cacheHint=!1;const a=await(0,s.DZ)(d(e,o));if(!a.ok)return null;const l=new Map,u=a.value.features;for(const e of u){const t=e.attributes[r],i=e.attributes[n];null!=t&&null!=i&&-1!==i&&l.set(t,i)}return l}},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),n=r(53966),s=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>f,lc:()=>y,mX:()=>w,rU:()=>g,tH:()=>M});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),p='"',d=p+" + ",c=" + "+p;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function w(e){let t;return e?(t=(0,i.HC)(e,(e=>n+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(o,d).replaceAll(a,c)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,S=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=_.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=S.exec(e),t?t[2]:null)}},22453:(e,t,r)=>{r.d(t,{S:()=>d,d:()=>b});var i=r(44208),n=r(60694);function s(e,t,r){return!!a(e,t,r)}function o(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function u(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function p(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:c(e),attachment:y(e),data:h(e),metadata:f(e),operations:m(e.capabilities,e,t),query:g(e,t),queryRelated:w(e),queryTopFeatures:v(e),editing:_(e)}}function c(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:p(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:s(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:s(e,"isDataVersioned",!1),supportsAttachment:s(e,"hasAttachments",!1),supportsM:s(e,"hasM",!1),supportsZ:s(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:s(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const i=e?e.toLowerCase().split(",").map((e=>e.trim())):[],o=r?(0,n.qg)(r):null,a=i.includes(null!=o&&"MapServer"===o.serverType?"data":"query"),l=i.includes("editing")&&!t.datesInUnknownTimezone;let u=l&&i.includes("create"),p=l&&i.includes("delete"),d=l&&i.includes("update");const c=i.includes("changetracking"),y=t.advancedQueryCapabilities;return l&&!(u||p||d)&&(u=p=d=!0),{supportsCalculate:s(t,"supportsCalculate",!1),supportsTruncate:s(t,"supportsTruncate",!1),supportsValidateSql:s(t,"supportsValidateSql",!1),supportsAdd:u,supportsDelete:p,supportsEditing:l,supportsChangeTracking:c,supportsQuery:a,supportsQueryAnalytics:s(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:s(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:s(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:s(t,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:s(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:s(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,c=t?.includes("MapServer"),y=!c||d>=(0,i.A)("mapserver-pbf-version-support"),h=(0,n.Wo)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:s(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:s(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:s(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:u(r),supportsCentroid:s(r,"supportsReturningGeometryCentroid",!1),supportsDistance:s(r,"supportsQueryWithDistance",!1),supportsDistinct:s(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:s(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:s(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:s(r,"supportsHavingClause",!1),supportsOrderBy:s(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:s(r,"supportsPagination",!1),supportsQuantization:s(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:s(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:s(e,"supportsReturningQueryGeometry",!1),supportsResultType:s(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:s(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:s(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:s(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:s(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:s(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:s(a,"allowOthersToQuery",!0),supportsHistoricMoment:s(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&f.has("pbf"),supportsDisjointSpatialRelationship:s(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:s(r,"supportsQueryWithCacheHint",!1)||p(r,"query"),supportsDefaultSpatialReference:s(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:s(r,"supportsFullTextSearch",!1),maxRecordCountFactor:o(e,"maxRecordCountFactor",void 0),maxRecordCount:o(e,"maxRecordCount",void 0),standardMaxRecordCount:o(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:o(e,"tileMaxRecordCount",void 0)}}function w(e){const t=e.advancedQueryCapabilities,r=s(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:s(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:p(t,"queryRelated")}}function v(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryTopFilter")}}function _(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:s(e,"allowGeometryUpdates",!0),supportsGlobalId:s(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:s(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:s(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:s(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:s(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:s(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:s(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:s(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:s(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:s(r,"supportsAsyncApplyEdits",!1),zDefault:o(e,"zDefault",void 0)}}function b(e){return{operations:{supportsAppend:s(e,"supportsAppend",!1),supportsExportClip:s(e,"supportsExportClip",!1),supportsExportFrameset:s(e,"supportsExportFrameset",!1),supportsMensuration:s(e,"supportsMensuration",!1),supportsUpdate:s(e,"supportsUpdate",!1)},query:{supportsCoverageQuery:e?.playbackInfo?.klv["0601"]??!1}}}},96520:(e,t,r)=>{r.d(t,{u:()=>o});var i=r(83047),n=r(21325);function s(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function o(e,t,r){if(!e&&!t||!r)return;const n=(0,i.G9)(r);a(e,r,n),a(t,r,n)}function a(e,t,r){if(e)for(const i of e)l(i.geometry,t,r)}function l(e,t,r){if(!e?.spatialReference||(0,n.aI)(e.spatialReference,t))return;const o=(0,i.G9)(e.spatialReference)/r;if(1!==o)if("x"in e)null!=e.z&&(e.z*=o);else if("rings"in e)s(e,e.rings,o);else if("paths"in e)s(e,e.paths,o);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=o)}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(90237),s=r(59456),o=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),d=(r(44208),r(53966),r(36005)),c=r(40608),y=r(43937),h=r(16930),f=r(65864),m=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],s=o.A.fromJSON(n),a=n.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=n.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(s)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>n-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,n._)([(0,d.w)("features")],w.prototype,"readFeatures",null),(0,n._)([(0,p.MZ)({type:[m.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,n._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,n._)([(0,y.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n._)([(0,p.MZ)({types:s.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n._)([(0,d.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n._)([(0,p.MZ)({type:h.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n._)([(0,y.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n._)([(0,p.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,n._)([(0,c.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w},26591:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,n=r(90237),s=(r(59456),r(25482)),o=r(4718),a=r(10107),l=r(56507),u=r(40608),p=r(43937),d=r(27733),c=r(16930);let y=i=class extends s.oY{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.o8)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,n._)([(0,a.MZ)({type:d.L,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,n._)([(0,a.MZ)({type:Date})],y.prototype,"historicMoment",void 0),(0,n._)([(0,p.K)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,a.MZ)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,n._)([(0,a.MZ)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,n._)([(0,a.MZ)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,n._)([(0,a.MZ)({type:c.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,n._)([(0,p.K)("start"),(0,p.K)("num")],y.prototype,"writeStart",null),(0,n._)([(0,a.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,n._)([(0,a.MZ)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,n._)([(0,a.MZ)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=i=(0,n._)([(0,u.$)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.dp)(y);const h=y},59868:(e,t,r)=>{r.d(t,{A7:()=>u,Cx:()=>p,Hk:()=>d,UK:()=>l}),r(44208);var i=r(94985),n=r(31593),s=r(53930),o=r(68249),a=r(93470);const l=s.A.fromJSON(a.Cb),u=n.A.fromJSON(a.yM),p=i.A.fromJSON(a.WR),d=o.A.fromJSON(a.JZ);s.A.fromJSON(a.nC),n.A.fromJSON(a.HW),i.A.fromJSON(a.b6)},93470:(e,t,r)=>{r.d(t,{Cb:()=>n,HW:()=>u,JZ:()=>a,WR:()=>o,b6:()=>p,nC:()=>l,yM:()=>s});const i=[252,146,31,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},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={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},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|