@doegis/core
Version:
DOE GIS API
1 lines • 114 kB
JavaScript
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[665,5935],{45378:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Xt});var r=i(43697),s=i(51773),n=i(70586),o=i(16453),a=i(95330),l=i(5600),u=i(75215),p=(i(67676),i(52011)),c=i(30556),d=i(87085),m=i(66577),h=i(38171),y=i(30030),f=i(3172),g=i(20102),b=i(35454),R=i(22974),w=i(92604),v=i(17445),_=i(17452),C=i(71715),S=i(21506),x=i(35956),I=i(96674),F=i(40297);const j={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 T=i(81578),D=i(93010),N=i(75509),P=i(23847);const O=new Set(["u1","u2","u4","u8","s8","u16","s16"]),M={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)"},V=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function A(e){return V.has(e.type)}function J(e,t){if(!e||!t)return(0,R.d9)(e||t);const i=(0,R.d9)(e);if(i.rasterFunctionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),Z(i.rasterFunctionDefinition.arguments,t)}else"none"!==t.functionName?.toLowerCase()&&(q(i.functionArguments).Raster=t);return i}function Z(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&&Z(e[i].arguments,t))}function E(e){const t=(0,R.d9)(j[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=E(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=L(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function q(e){const t=e?.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?q(t.functionArguments):e}const z={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function G(e,t){const i=O.has(t)?(0,T.r)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function H(e){if((0,n.Wi)(e))return;const{fields:t}=e,i=t&&t.find((e=>e&&e.name&&"value"===e.name.toLowerCase()));return i&&i.name}function B(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 L(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,D.io)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var U,k=i(90578),Q=i(94139);const W=(0,b.w)()({MT_FIRST:"first",MT_LAST:"last",MT_MIN:"min",MT_MAX:"max",MT_MEAN:"mean",MT_BLEND:"blend",MT_SUM:"sum"}),$=(0,b.w)()({esriMosaicNone:"none",esriMosaicCenter:"center",esriMosaicNadir:"nadir",esriMosaicViewpoint:"viewpoint",esriMosaicAttribute:"attribute",esriMosaicLockRaster:"lock-raster",esriMosaicNorthwest:"northwest",esriMosaicSeamline:"seamline"});let X=U=class extends I.wq{constructor(e){super(e),this.ascending=!0,this.itemRenderingRule=null,this.lockRasterIds=null,this.method=null,this.multidimensionalDefinition=null,this.objectIds=null,this.operation=null,this.sortField=null,this.sortValue=null,this.viewpoint=null,this.where=null}readAscending(e,t){return null!=t.ascending?t.ascending:null==t.sortAscending||t.sortAscending}readMethod(e,t){return function(e){let t;switch(e?e.toLowerCase().replace("esrimosaic",""):""){case"byattribute":case"attribute":t="esriMosaicAttribute";break;case"lockraster":t="esriMosaicLockRaster";break;case"center":t="esriMosaicCenter";break;case"northwest":t="esriMosaicNorthwest";break;case"nadir":t="esriMosaicNadir";break;case"viewpoint":t="esriMosaicViewpoint";break;case"seamline":t="esriMosaicSeamline";break;default:t="esriMosaicNone"}return $.fromJSON(t)}(t.mosaicMethod||t.defaultMosaicMethod)}writeMultidimensionalDefinition(e,t,i){null!=e&&(e=e.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t))).length&&(t[i]=e.map((e=>e.toJSON())))}readOperation(e,t){const i=t.mosaicOperation,r=t.mosaicOperator&&t.mosaicOperator.toLowerCase(),s=i||(r?W.toJSON(r):null);return W.fromJSON(s)||"first"}castSortValue(e){return null==e||"string"==typeof e||"number"==typeof e?e:`${e}`}clone(){return new U({ascending:this.ascending,itemRenderingRule:(0,R.d9)(this.itemRenderingRule),lockRasterIds:(0,R.d9)(this.lockRasterIds),method:this.method,multidimensionalDefinition:(0,R.d9)(this.multidimensionalDefinition),objectIds:(0,R.d9)(this.objectIds),operation:this.operation,sortField:this.sortField,sortValue:this.sortValue,viewpoint:(0,R.d9)(this.viewpoint),where:this.where})}};(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],X.prototype,"ascending",void 0),(0,r._)([(0,C.r)("ascending",["ascending","sortAscending"])],X.prototype,"readAscending",null),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],X.prototype,"itemRenderingRule",void 0),(0,r._)([(0,l.Cb)({type:[u.z8],json:{write:{overridePolicy(){return{enabled:"lock-raster"===this.method}}}}})],X.prototype,"lockRasterIds",void 0),(0,r._)([(0,l.Cb)({type:String,json:{type:$.jsonValues,write:{target:"mosaicMethod",writer:$.write}}})],X.prototype,"method",void 0),(0,r._)([(0,C.r)("method",["mosaicMethod","defaultMosaicMethod"])],X.prototype,"readMethod",null),(0,r._)([(0,l.Cb)({type:[x.Z],json:{write:!0}})],X.prototype,"multidimensionalDefinition",void 0),(0,r._)([(0,c.c)("multidimensionalDefinition")],X.prototype,"writeMultidimensionalDefinition",null),(0,r._)([(0,l.Cb)({type:[u.z8],json:{name:"fids",write:!0}})],X.prototype,"objectIds",void 0),(0,r._)([(0,l.Cb)({json:{type:W.jsonValues,read:{reader:W.read},write:{target:"mosaicOperation",writer:W.write}}})],X.prototype,"operation",void 0),(0,r._)([(0,C.r)("operation",["mosaicOperation","mosaicOperator"])],X.prototype,"readOperation",null),(0,r._)([(0,l.Cb)({type:String,json:{write:{overridePolicy(){return{enabled:"attribute"===this.method}}}}})],X.prototype,"sortField",void 0),(0,r._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0,overridePolicy(){return{enabled:"attribute"===this.method,allowNull:!0}}}}})],X.prototype,"sortValue",void 0),(0,r._)([(0,k.p)("sortValue")],X.prototype,"castSortValue",null),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],X.prototype,"viewpoint",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],X.prototype,"where",void 0),X=U=(0,r._)([(0,p.j)("esri.layers.support.MosaicRule")],X);const K=X;var Y=i(69608);let ee=class extends I.wq{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("renderingRule"),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({where:i})),t}get renderingRule(){const e=this.layer;let t=e.renderingRule;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=this._addClipFunction(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.renderingRule,r&&A(r)?J(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new F.Z;r.functionName="Stretch";const s=z[N.v.toJSON(e.stretchType)],n="u8",o={StretchType:s,Statistics:B(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===z.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===z.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=n):s===z.minMax?r.outputPixelType=n:s===z.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new F.Z;if(i)n.functionArguments={ColorRamp:(0,D.pM)(s)};else{const i=(0,D.Uh)(s);if(i)n.functionArguments={colorRamp: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.Jw)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new F.Z({rasterFunctionDefinition:E(n)}):n}return i?new F.Z({rasterFunctionDefinition:E(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],o=[],a=1e-6,{pixelType:l,rasterAttributeTable:u}=t,p=(0,n.Wi)(u)?null:u.features,c=H(u);if(c&&p&&Array.isArray(p)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,i)=>{const r=t.symbol?.color;let s;r?.a&&null!=t.minValue&&null!=t.maxValue&&p.forEach((n=>{null!=t.minValue&&null!=t.maxValue&&(s=n.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&o.push([n.attributes[c],r.r,r.g,r.b]))}))}));const i=l?G(o,l):o,r=new F.Z;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new F.Z({rasterFunctionDefinition:E(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const n=e.symbol&&e.symbol.color;n?.a?(0===t?i.push(e.minValue,e.maxValue+a):i.push(e.minValue+a,e.maxValue+a),r.push(t),o.push([t,n.r,n.g,n.b])):s.push(e.minValue,e.maxValue)}));const d=l?G(o,l):o,m=new F.Z;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const h=new F.Z;return h.functionName="Colormap",h.functionArguments={Colormap:d,Raster:m},t.convertToRFT?new F.Z({rasterFunctionDefinition:E(h)}):h}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,o=(0,n.Wi)(s)?null:s.features,a=H(s),l=e.defaultSymbol?.color?.toRgb(),u=e.uniqueValueInfos;if(u)if(o){if(a){const t=new Map;u.forEach((e=>{const i=e.value,r=e.symbol?.color;null!=i&&r&&r.a&&t.set(String(i),r.toRgb())}));const r=e.field;o.forEach((({attributes:e})=>{const s=String(e[r]),n=e[a],o=t.get(s);o?i.push([n,...o]):l&&i.push([n,...l])}))}}else for(let e=0;e<u.length;e++){const t=u[e],r=t.symbol?.color,s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const p=r&&i.length>0?G(i,r):i,c=new F.Z;return c.functionName="Colormap",c.functionArguments={},c.functionArguments.Colormap=p,c.variableName="Raster",t.convertToRFT?new F.Z({rasterFunctionDefinition:E(c)}):c}(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?G(i,r):i,n=new F.Z;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new F.Z({rasterFunctionDefinition:E(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new F.Z;i.functionName="VectorFieldRenderer";const{dataType:r,bandProperties:s}=t,n="vector-uv"===r;let o,a;s&&2===s.length&&(o=s.map((e=>e.BandName.toLowerCase())).indexOf("magnitude"),a=s.map((e=>e.BandName.toLowerCase())).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.Z,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:M[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};return i.functionArguments=c,t.convertToRFT?new F.Z({rasterFunctionDefinition:E(i)}):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 F.Z;const r=new F.Z;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.pM)(e.colorRamp):o.Colormap=(0,D.Jw)(e.colorRamp)),i?new F.Z({rasterFunctionDefinition:E(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandProperties:i.keyProperties?.BandProperties,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 F.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new F.Z({rasterFunctionDefinition:E(r)}):r,J(r,e)}_addClipFunction(e,t){return J(new F.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,r._)([(0,l.Cb)()],ee.prototype,"layer",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"adjustAspectRatio",null),(0,r._)([(0,c.c)("adjustAspectRatio")],ee.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"bandIds",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"compression",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"compressionQuality",null),(0,r._)([(0,c.c)("compressionQuality")],ee.prototype,"writeCompressionQuality",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"compressionTolerance",null),(0,r._)([(0,c.c)("compressionTolerance")],ee.prototype,"writeCompressionTolerance",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"format",null),(0,r._)([(0,l.Cb)({type:String,json:{read:{reader:Y.c.read},write:{writer:Y.c.write}}})],ee.prototype,"interpolation",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"noData",null),(0,r._)([(0,l.Cb)({type:String,json:{read:{reader:Y.k.read},write:{writer:Y.k.write}}})],ee.prototype,"noDataInterpretation",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"pixelType",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"lercVersion",void 0),(0,r._)([(0,c.c)("lercVersion")],ee.prototype,"writeLercVersion",null),(0,r._)([(0,l.Cb)({type:Number})],ee.prototype,"version",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"mosaicRule",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],ee.prototype,"renderingRule",null),ee=(0,r._)([(0,p.j)("esri.layers.mixins.ExportImageServiceParameters")],ee);var te=i(1231),ie=i(99514),re=i(90082),se=i(29876),ne=i(5847),oe=i(48526),ae=i(88281),le=i(99815),ue=i(75993),pe=i(80676),ce=i(67058),de=i(72758),me=i(16306),he=i(11282),ye=i(82971);let fe=class extends I.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],fe.prototype,"north",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],fe.prototype,"up",void 0),(0,r._)([(0,l.Cb)({type:ye.Z,json:{write:!0}})],fe.prototype,"spatialReference",void 0),fe=(0,r._)([(0,p.j)("esri.rest.support.ImageAngleResult")],fe);const ge=fe;var be=i(67900);let Re=class extends I.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,l.Cb)({type:Number,json:{read:!0,write:!0}})],Re.prototype,"value",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],Re.prototype,"displayValue",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{read:!0,write:!0}})],Re.prototype,"uncertainty",void 0),Re=(0,r._)([(0,p.j)("esri.rest.support.ImageMeasureResultValue")],Re);let we=class extends Re{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,l.Cb)({type:String,json:{read:be.Jo.read,write:be.Jo.write}})],we.prototype,"unit",void 0),we=(0,r._)([(0,p.j)("esri.rest.support.ImageMeasureResultLengthValue")],we);let ve=class extends Re{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,l.Cb)({type:String,json:{read:be.gV.read,write:be.gV.write}})],ve.prototype,"unit",void 0),ve=(0,r._)([(0,p.j)("esri.rest.support.ImageMeasureResultAreaValue")],ve);let _e=class extends Re{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,l.Cb)({type:String,json:{read:be.CN.read,write:be.CN.write}})],_e.prototype,"unit",void 0),_e=(0,r._)([(0,p.j)("esri.rest.support.ImageMeasureResultAngleValue")],_e);let Ce=class extends I.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,r._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],Ce.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],Ce.prototype,"sensorName",void 0),Ce=(0,r._)([(0,p.j)("esri.rest.support.BaseImageMeasureResult")],Ce);let Se=class extends Ce{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,l.Cb)({type:ve,json:{read:!0,write:!0}})],Se.prototype,"area",void 0),(0,r._)([(0,l.Cb)({type:we,json:{read:!0,write:!0}})],Se.prototype,"perimeter",void 0),Se=(0,r._)([(0,p.j)("esri.rest.support.ImageAreaResult")],Se);const xe=Se;let Ie=class extends Ce{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,l.Cb)({type:we,json:{read:!0,write:!0}})],Ie.prototype,"distance",void 0),(0,r._)([(0,l.Cb)({type:_e,json:{read:!0,write:!0}})],Ie.prototype,"azimuthAngle",void 0),(0,r._)([(0,l.Cb)({type:_e,json:{read:!0,write:!0}})],Ie.prototype,"elevationAngle",void 0),Ie=(0,r._)([(0,p.j)("esri.rest.support.ImageDistanceResult")],Ie);const Fe=Ie;let je=class extends Ce{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,l.Cb)({type:we,json:{read:!0,write:!0}})],je.prototype,"height",void 0),je=(0,r._)([(0,p.j)("esri.rest.support.ImageHeightResult")],je);const Te=je;var De=i(74889);let Ne=class extends I.wq{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,l.Cb)({json:{write:!0}})],Ne.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,l.Cb)({type:De.Z,json:{write:!0}})],Ne.prototype,"catalogItems",void 0),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],Ne.prototype,"location",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"name",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"objectId",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"processedValues",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"properties",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"value",void 0),Ne=(0,r._)([(0,p.j)("esri.rest.support.ImageIdentifyResult")],Ne);const Pe=Ne;let Oe=class extends I.wq{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,l.Cb)({json:{write:!0}})],Oe.prototype,"geometries",void 0),Oe=(0,r._)([(0,p.j)("esri.rest.support.ImagePixelLocationResult")],Oe);const Me=Oe;let Ve=class extends Ce{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,l.Cb)({type:Q.Z,json:{name:"point.value",read:!0,write:!0}})],Ve.prototype,"point",void 0),Ve=(0,r._)([(0,p.j)("esri.rest.support.ImagePointResult")],Ve);const Ae=Ve;let Je=class extends I.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,l.Cb)({json:{write:!0}})],Je.prototype,"attributes",void 0),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],Je.prototype,"location",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Je.prototype,"locationId",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Je.prototype,"rasterId",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Je.prototype,"resolution",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Je.prototype,"pixelValue",void 0),Je=(0,r._)([(0,p.j)("esri.rest.support.ImageSample")],Je);const Ze=Je;let Ee=class extends I.wq{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,l.Cb)({type:[Ze],json:{write:!0}})],Ee.prototype,"samples",void 0),Ee=(0,r._)([(0,p.j)("esri.rest.support.ImageSampleResult")],Ee);const qe=Ee;function ze(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 Ge(e,t,i){const r=(0,he.en)(e),s=t.geometry?[t.geometry]:[],o=await(0,me.aX)(s),a=t.toJSON();ze(a);const l=o&&o[0];(0,n.pC)(l)&&(a.geometry=l.toJSON());const u=(0,he.cv)({...r.query,f:"json",...a});return(0,he.lA)(u,i)}async function He(e,t,i){const r=(0,he.en)(e),s=t.geometry?[t.geometry]:[];return(0,me.aX)(s).then((e=>{const s=t.toJSON(),o=e&&e[0];(0,n.pC)(o)&&(s.geometry=JSON.stringify(o.toJSON()));const a=(0,he.cv)({...r.query,f:"json",...s}),l=(0,he.lA)(a,i);return(0,f.default)(r.path+"/identify",l)})).then((e=>Pe.fromJSON(e.data)))}async function Be(e,t,i){const r=await Le(e,t,[t.fromGeometry,t.toGeometry],i);return Fe.fromJSON(r)}async function Le(e,t,i,r){const s=(0,he.en)(e),o=await(0,me.aX)(i),a=t.toJSON();(0,n.pC)(o[0])&&(a.fromGeometry=JSON.stringify(Ue(o[0]))),(0,n.pC)(o[1])&&(a.toGeometry=JSON.stringify(Ue(o[1])));const l=(0,he.cv)({...s.query,f:"json",...a}),u=(0,he.lA)(l,r),{data:p}=await(0,f.default)(s.path+"/measure",u);return p}function Ue(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=ke(e.spatialReference)),t}function ke(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 Qe(e,t){const i=ke(e),{icsid:r,icsns:s,wkid:n}=i;return null!=r?null==s||t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?`0:${r}`:JSON.stringify(i):n?n.toString():JSON.stringify(i)}i(80442),i(10158);var We,$e=i(4967),Xe=(i(68773),i(40330),i(8744),i(98732),i(6570)),Ke=(i(9361),i(65091)),Ye=i(38913),et=(i(58901),i(45091),i(14165)),tt=(i(98326),i(56545),i(41818)),it=i(5396),rt=(i(75935),i(28141),i(26059)),st=i(36679);let nt=We=class extends I.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new We((0,R.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,l.Cb)({type:[String],json:{name:"angleName",write:!0}})],nt.prototype,"angleNames",void 0),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],nt.prototype,"point",void 0),(0,r._)([(0,l.Cb)({type:ye.Z,json:{write:!0}})],nt.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:u.z8,json:{write:!0}})],nt.prototype,"rasterId",void 0),nt=We=(0,r._)([(0,p.j)("esri.rest.support.ImageAngleParameters")],nt);const ot=nt;var at=i(33955);const lt=new b.X({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 ut=class extends I.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.renderingRule=null,this.pixelSize=null,this.raster=void 0}};var pt;(0,r._)([(0,l.Cb)()],ut.prototype,"type",void 0),(0,r._)([(0,l.Cb)({type:lt.apiValues,json:{read:lt.read,write:lt.write}})],ut.prototype,"measureOperation",void 0),(0,r._)([(0,l.Cb)({type:K,json:{write:!0}})],ut.prototype,"mosaicRule",void 0),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],ut.prototype,"renderingRule",void 0),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],ut.prototype,"pixelSize",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],ut.prototype,"raster",void 0),ut=(0,r._)([(0,p.j)("esri.rest.support.BaseImageMeasureParameters")],ut);let ct=pt=class extends ut{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,at.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new pt((0,R.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,l.Cb)({types:m.qM,json:{name:"fromGeometry",read:!0,write:!0}})],ct.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],ct.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:lt.apiValues,json:{write:lt.write}})],ct.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],ct.prototype,"is3D",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:be.Jo.read,write:be.Jo.write}})],ct.prototype,"linearUnit",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:be.gV.read,write:be.gV.write}})],ct.prototype,"areaUnit",void 0),ct=pt=(0,r._)([(0,p.j)("esri.rest.support.ImageAreaParameters")],ct);const dt=ct;var mt;let ht=mt=class extends ut{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,at.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new mt((0,R.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,l.Cb)({type:Q.Z,json:{read:!0,write:!0}})],ht.prototype,"fromGeometry",void 0),(0,r._)([(0,c.c)("fromGeometry")],ht.prototype,"writeFromGeometry",null),(0,r._)([(0,l.Cb)({type:Q.Z,json:{read:!0,write:!0}})],ht.prototype,"toGeometry",void 0),(0,r._)([(0,l.Cb)({type:lt.apiValues,json:{write:lt.write}})],ht.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],ht.prototype,"is3D",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:be.Jo.read,write:be.Jo.write}})],ht.prototype,"linearUnit",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:be.CN.read,write:be.CN.write}})],ht.prototype,"angularUnit",void 0),ht=mt=(0,r._)([(0,p.j)("esri.rest.support.ImageDistanceParameters")],ht);const yt=ht;var ft;let gt=ft=class extends ut{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,at.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new ft((0,R.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,l.Cb)({type:Q.Z,json:{read:!0}})],gt.prototype,"fromGeometry",void 0),(0,r._)([(0,c.c)("fromGeometry")],gt.prototype,"writeFromGeometry",null),(0,r._)([(0,l.Cb)({type:Q.Z,json:{read:!0,write:!0}})],gt.prototype,"toGeometry",void 0),(0,r._)([(0,l.Cb)({type:lt.apiValues,json:{write:lt.write}})],gt.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],gt.prototype,"operationType",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:be.Jo.read,write:be.Jo.write}})],gt.prototype,"linearUnit",void 0),gt=ft=(0,r._)([(0,p.j)("esri.rest.support.ImageHeightParameters")],gt);const bt=gt;var Rt,wt=i(92835);let vt=Rt=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.mosaicRule=null,this.renderingRule=null,this.pixelSize=null,this.raster=void 0,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,at.Ji)(e),t[i]=e.toJSON())}clone(){return new Rt((0,R.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster,timeExtent:this.timeExtent}))}};(0,r._)([(0,l.Cb)({types:m.qM,json:{read:at.im}})],vt.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],vt.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:K,json:{write:!0}})],vt.prototype,"mosaicRule",void 0),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],vt.prototype,"renderingRule",void 0),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],vt.prototype,"pixelSize",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],vt.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({type:wt.Z,json:{read:{source:"time"},write:{target:"time"}}})],vt.prototype,"timeExtent",void 0),vt=Rt=(0,r._)([(0,p.j)("esri.rest.support.ImageHistogramParameters")],vt);const _t=vt;var Ct;let St=Ct=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.renderingRules=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,at.Ji)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=K.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=F.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}writeRenderingRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRenderingRules(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=(0,n.pC)(e.start)?e.start.getTime():null,s=(0,n.pC)(e.end)?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new Ct((0,R.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,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,l.Cb)({json:{write:!0}})],St.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],St.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:K,json:{write:!0}})],St.prototype,"mosaicRule",null),(0,r._)([(0,c.c)("mosaicRule")],St.prototype,"writeMosaicRule",null),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],St.prototype,"renderingRule",null),(0,r._)([(0,c.c)("renderingRule")],St.prototype,"writeRenderingRule",null),(0,r._)([(0,l.Cb)({type:[F.Z],json:{write:!0}})],St.prototype,"renderingRules",void 0),(0,r._)([(0,c.c)("renderingRules")],St.prototype,"writeRenderingRules",null),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],St.prototype,"pixelSize",void 0),(0,r._)([(0,c.c)("pixelSize")],St.prototype,"writePixelSize",null),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],St.prototype,"returnGeometry",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],St.prototype,"returnCatalogItems",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],St.prototype,"returnPixelValues",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],St.prototype,"maxItemCount",void 0),(0,r._)([(0,l.Cb)({type:wt.Z,json:{write:{target:"time"}}})],St.prototype,"timeExtent",void 0),(0,r._)([(0,c.c)("timeExtent")],St.prototype,"writeTimeExtent",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],St.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],St.prototype,"viewId",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],St.prototype,"processAsMultidimensional",void 0),St=Ct=(0,r._)([(0,p.j)("esri.rest.support.ImageIdentifyParameters")],St);const xt=St;var It;let Ft=It=class extends I.wq{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 It({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,l.Cb)({type:[Q.Z],json:{write:!0}})],Ft.prototype,"geometries",void 0),(0,r._)([(0,c.c)("geometries")],Ft.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:u.z8,json:{write:!0}})],Ft.prototype,"rasterId",void 0),Ft=It=(0,r._)([(0,p.j)("esri.rest.support.ImagePixelLocationParameters")],Ft);const jt=Ft;var Tt;let Dt=Tt=class extends ut{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,at.Ji)(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 Tt((0,R.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,l.Cb)({types:m.qM,json:{name:"fromGeometry",read:at.im}})],Dt.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],Dt.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:lt.apiValues,json:{read:lt.read,write:lt.write}})],Dt.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],Dt.prototype,"is3D",void 0),Dt=Tt=(0,r._)([(0,p.j)("esri.rest.support.ImagePointParameters")],Dt);const Nt=Dt;var Pt;let Ot=Pt=class extends I.wq{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,at.Ji)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new Ke.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new Pt((0,R.d9)({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,l.Cb)({types:m.qM,json:{read:at.im}})],Ot.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],Ot.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)()],Ot.prototype,"locations",null),(0,r._)([(0,l.Cb)({type:String,json:{type:Y.c.jsonValues,read:Y.c.read,write:Y.c.write}})],Ot.prototype,"interpolation",void 0),(0,r._)([(0,l.Cb)({type:K,json:{write:!0}})],Ot.prototype,"mosaicRule",void 0),(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],Ot.prototype,"outFields",void 0),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],Ot.prototype,"pixelSize",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],Ot.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Ot.prototype,"sampleDistance",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Ot.prototype,"sampleCount",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Ot.prototype,"sliceId",void 0),(0,r._)([(0,l.Cb)({type:wt.Z,json:{read:{source:"time"},write:{target:"time"}}})],Ot.prototype,"timeExtent",void 0),Ot=Pt=(0,r._)([(0,p.j)("esri.rest.support.ImageSampleParameters")],Ot);const Mt=Ot;var Vt=i(23808);const At=(0,b.w)()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"}),Jt=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Zt=(0,l.Eg)(u.q9,{min:0,max:255}),Et=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 ee({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||(0,n.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.length<1||(0,n.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replace(/ /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.fromJSON(t):null}get fieldsIndex(){return this.fields?new ie.Z(this.fields):null}set format(e){e&&Jt.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&&t.mosaicMethod&&(t=K.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?K.fromJSON(i):this._isMosaicRuleSupported(t)?K.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({where:s})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=Zt(e))}readObjectIdField(e,t){if(!e){const i=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i&&i[0]&&i[0].name}return e}get parsedUrl(){return(0,_.mN)(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,y.ij)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),A(s)||w.Z.getLogger(this.declaredClass).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.l