@arcgis/core 4.26.3 → 4.26.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/00363fca52417a6dec64.js +1 -0
  3. package/assets/esri/core/workers/chunks/1693ccb22ddb0e075cb7.js +1 -0
  4. package/assets/esri/core/workers/chunks/18feb69bb066f529f4a5.js +1 -0
  5. package/assets/esri/core/workers/chunks/413046749019790fd00f.js +1 -0
  6. package/assets/esri/core/workers/chunks/{1fcc385a9a8904354a67.js → 61cdba0e7382d176510b.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{3cc8526d3c0bb08be773.js → 8440b51d07263ad5bd50.js} +1 -1
  8. package/assets/esri/core/workers/chunks/cb80cf1c614ae3b2f5d6.js +1 -0
  9. package/assets/esri/core/workers/chunks/d363d6dda0043430bc69.js +1 -0
  10. package/config.js +1 -1
  11. package/layers/graphics/editingSupport.js +1 -1
  12. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  13. package/layers/mixins/ArcGISImageService.js +1 -1
  14. package/layers/mixins/ArcGISMapService.js +1 -1
  15. package/layers/support/SubtypeSublayer.js +1 -1
  16. package/package.json +1 -1
  17. package/rest/imageService.js +1 -1
  18. package/support/revision.js +1 -1
  19. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  20. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  21. package/widgets/Editor/CreateWorkflow.js +1 -1
  22. package/widgets/Editor/EditorViewModel.js +1 -1
  23. package/widgets/Editor/UpdateWorkflow.js +1 -1
  24. package/assets/esri/core/workers/chunks/186f2d0c94fa1eca4959.js +0 -1
  25. package/assets/esri/core/workers/chunks/4cb41045be4ee7ac0455.js +0 -1
  26. package/assets/esri/core/workers/chunks/843a8b87ebecc246598a.js +0 -1
  27. package/assets/esri/core/workers/chunks/9dd3522e39e522158049.js +0 -1
  28. package/assets/esri/core/workers/chunks/cb177fb86cf8cec95e87.js +0 -1
  29. package/assets/esri/core/workers/chunks/e26acb83eae5eec87ca1.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6502],{3388:(e,t,s)=>{var r;s.d(t,{i:()=>r}),function(e){e[e.PROJECT_VERTICES=1]="PROJECT_VERTICES"}(r||(r={}))},61159:(e,t,s)=>{s.d(t,{g:()=>r});const r={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},6502:(e,t,s)=>{s.r(t),s.d(t,{default:()=>E});var r=s(43697),a=(s(66577),s(38171)),o=s(40330),n=s(3172),i=s(92835),u=s(20102),l=s(80442),d=s(35454),c=s(83379),p=s(70586),h=s(78286),y=s(95330),f=s(17452),m=s(5600),g=(s(75215),s(67676),s(52011)),_=s(6570),b=s(33955),F=s(3388),R=s(25278),S=s(74654),C=s(66677),I=s(59431),q=s(82971);const O=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"});async function w(e){return"string"==typeof e?(0,f.sJ)(e)||{data:e}:new Promise(((t,s)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t((0,f.sJ)(r.result)),r.onerror=e=>s(e)}))}const x=new Set(["Feature Layer","Table"]),T=new d.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let A=class extends c.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,y.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}))}load(e){const t=(0,p.pC)(e)?e.signal:null,s=this.layer.sourceJSON;return this.addResolvingPromise(this._fetchService(s,t)),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:s,infoFor3D:r,gdbVersion:a,spatialReference:o,fieldsIndex:n}=this.layer,i=(0,l.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&(0,p.Wi)(r),u=e?.operations?.supportsQueryAttachments??!1;return new S.Z({url:t.path,pbfSupported:i,fieldsIndex:n,infoFor3D:r,dynamicDataSource:s,gdbVersion:a,sourceSpatialReference:o,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const s=e.attributes[this.layer.objectIdField],r=this.layer.parsedUrl.path+"/"+s+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,a.query);try{const e=await(0,n.default)(r,{body:o});return this._createFeatureEditResult(e.data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async updateAttachment(e,t,s){await this.load();const r=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+r+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),i=this._getFormDataForAttachment(s,o.query);try{const e=await(0,n.default)(a,{body:i});return this._createFeatureEditResult(e.data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}async applyEdits(e,t){await this.load();const s=this.layer.infoFor3D,r=(0,p.pC)(s),a=r||(t?.globalIdUsed??!1),i=e.addFeatures?.map((e=>this._serializeFeature(e,s))).filter(p.pC)??[],u=e.updateFeatures?.map((e=>this._serializeFeature(e,s))).filter(p.pC)??[],l=this._getFeatureIds(e.deleteFeatures,a);(0,I.P)(i,u,this.layer.spatialReference);const d=[],c=[],h=[...e.deleteAttachments??[]];for(const t of e.addAttachments??[])d.push(await this._serializeAttachment(t));for(const t of e.updateAttachments??[])c.push(await this._serializeAttachment(t));const y=d.length||c.length||h.length?{adds:d,updates:c,deletes:h}:null;let f,m=null;if(r){m=new Map;const t=[];for(const s of e.addAssets??[])t.push(this._serializeAssetMapEditAndUploadAssets(s,m));const s=await Promise.all(t);f=s.length?{adds:s,updates:[],deletes:[]}:void 0}const g={gdbVersion:t?.gdbVersion||this.layer.gdbVersion,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:a,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,sessionId:t?.sessionId};t?.returnServiceEditsOption?(g.edits=JSON.stringify([{id:this.layer.layerId,adds:i,updates:u,deletes:l,attachments:y,assetMaps:(0,p.Wg)(f)}]),g.returnServiceEditsOption=O.toJSON(t?.returnServiceEditsOption),g.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(g.adds=i.length?JSON.stringify(i):null,g.updates=u.length?JSON.stringify(u):null,g.deletes=l.length?a?JSON.stringify(l):l.join(","):null,g.attachments=y&&JSON.stringify(y),g.assetMaps=(0,p.pC)(f)?JSON.stringify(f):void 0);const _=this._getLayerRequestOptions({method:"post",query:g}),b=t?.returnServiceEditsOption?this.layer.url:this.layer.parsedUrl.path,F=await(0,n.default)(b+"/applyEdits",_);if(!this.layer.capabilities.operations?.supportsEditing&&this.layer.effectiveCapabilities?.operations?.supportsEditing){const e=o.id?.findCredential(this.layer.url);await(e?.refreshToken())}if(r&&null!=F.data&&null!=F.data.assetMaps){const e=F.data,t=this.layer.objectIdField,s=[];for(const t of e.addResults)t.success&&s.push(t.objectId);for(const t of e.updateResults)t.success&&s.push(t.objectId);const r=this._createRequestQueryOptions(),a=await(0,n.default)(b+"/query",{...r,query:{f:"json",formatOf3DObjects:"3D_glb",where:`OBJECTID IN (${s.join(",")})`,outFields:`${t}`}});if(a&&a.data&&a.data.assetMaps&&(0,p.pC)(m)){const e=a.data.assetMaps;for(const t of e){const e=m.get(t.parentGlobalId).geometry;(0,p.pC)(e)&&"mesh"===e.type&&e.updateExternalSource({source:[{name:t.assetName,source:t.assetName}],extent:e.extent})}}}return this._createEditsResult(F)}async deleteAttachments(e,t){await this.load();const s=e.attributes[this.layer.objectIdField],r=this.layer.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,n.default)(r,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:s,url:r}=this.layer,{data:a}=await(0,n.default)(`${r}/${s}`,t),{id:o,extent:u,fullExtent:l,timeExtent:d}=a,c=u||l;return{id:o,fullExtent:c&&_.Z.fromJSON(c),timeExtent:d&&i.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const s=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,s)}async queryFeatures(e,t){return await this.load(),this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,C.M8)(this.layer.url))return"unavailable";const e=(0,f.v_)(this.layer.url,"status"),t=await(0,n.default)(e,{query:{f:"json"}});return T.fromJSON(t.data.status)}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const{data:s}=await(0,n.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,l.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:t}));e=s}this.sourceJSON=this._patchServiceJSON(e);const s=e.type;if(!x.has(s))throw new u.Z("feature-layer-source:unsupported-type",`Source type "${s}" is not supported`)}_patchServiceJSON(e){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,R.bU)(e.geometryType).renderer;(0,h.RB)("drawingInfo.renderer",t,e)}return"esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),e}_serializeFeature(e,t){const{geometry:s,attributes:r}=e;if((0,p.pC)(t)&&(0,p.pC)(e.geometry)&&"mesh"===e.geometry.type){const s={...r},a=e.geometry,o=a.origin,n=a.transform;if(s[t.transformFieldRoles.originX]=o.x,s[t.transformFieldRoles.originY]=o.y,s[t.transformFieldRoles.originZ]=o.z,(0,p.pC)(n)){const e=n.translation,r=n.scale,a=n.rotation;s[t.transformFieldRoles.translationX]=e[0],s[t.transformFieldRoles.translationY]=-e[2],s[t.transformFieldRoles.translationZ]=e[1],s[t.transformFieldRoles.scaleX]=r[0],s[t.transformFieldRoles.scaleY]=r[1],s[t.transformFieldRoles.scaleZ]=r[2],s[t.transformFieldRoles.rotationX]=a[0],s[t.transformFieldRoles.rotationY]=a[2],s[t.transformFieldRoles.rotationZ]=a[1],s[t.transformFieldRoles.rotationDeg]=a[3]}return{geometry:null,attributes:s}}return(0,p.Wi)(s)?{attributes:r}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:r}}async _serializeAttachment(e){const{feature:t,attachment:s}=e,{globalId:r,name:a,contentType:o,data:n,uploadId:i}=s,u={globalId:r,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(t&&(u.parentGlobalId="attributes"in t?t.attributes&&t.attributes[this.layer.globalIdField]:t.globalId),i)u.uploadId=i;else if(n){const e=await w(n);e&&(u.contentType=e.mediaType,u.data=e.data),n instanceof File&&(u.name=n.name)}return a&&(u.name=a),o&&(u.contentType=o),u}async _serializeAssetMapEditAndUploadAssets(e,t){const s=this.layer.url;let r=null;try{const t=new Blob([e.data],{type:e.mimeType}),a=new FormData;a.append("f","json"),a.append("file",t,`${e.assetName}`);const o={body:a,method:"post",responseType:"json"},{data:i}=await(0,n.default)(`${s}/uploads/upload`,o);if(!i.success)throw new u.Z("feature-layer-source:upload-failure","Expected upload to be successfull.");r={assetType:e.assetType,assetUploadId:i.item.itemID}}catch(e){r=null}if((0,p.Wi)(r)){const t=await w(new Blob([e.data]));if(!t.isBase64)throw new u.Z("feature-layer-source:uploadAssets-failure","Expected gltf data in base64 format after conversion.");r={assetType:e.assetType,assetData:t.data}}if((0,p.Wi)(r))throw new u.Z("feature-layer-source:uploadAssets-failure","Unable to prepare uploadAsset request options.");const a={method:"post",query:{f:"json",assets:JSON.stringify([r])},responseType:"json"},o=await(0,n.default)((0,f.v_)(this.layer.parsedUrl.path,"uploadAssets"),a);if(1!==o.data.uploadResults.length||!o.data.uploadResults[0].success)throw new u.Z("feature-layer-source:uploadAssets-failure","Bad response.");const i=o.data.uploadResults[0].assetHash,l=[];e.flags&F.i.PROJECT_VERTICES&&l.push("PROJECT_VERTICES");const d={globalId:e.assetMapGlobalId,parentGlobalId:e.featureGlobalId,assetName:e.assetName,assetHash:i,flags:l};return t.set(e.featureGlobalId,e.feature),d}_getFeatureIds(e,t){const s=e?.[0];return s?this._canUseGlobalIds(t,e)?this._getGlobalIdsFromFeatureIdentifier(e):"objectId"in s?this._getObjectIdsFromFeatureIdentifier(e):this._getIdsFromFeatures(e):[]}_getIdsFromFeatures(e){const t=this.layer.objectIdField;return e.map((e=>e.attributes&&e.attributes[t]))}_canUseGlobalIds(e,t){return e&&"globalId"in t[0]}_getObjectIdsFromFeatureIdentifier(e){return e.map((e=>e.objectId))}_getGlobalIdsFromFeatureIdentifier(e){return e.map((e=>e.globalId))}_createEditsResult(e){const t=e.data,{layerId:s}=this.layer,r=[];let a=null;if(Array.isArray(t))for(const e of t)r.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===s&&(a={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else a=t;const o=a?.attachments,n={addFeatureResults:a?.addResults?.map(this._createFeatureEditResult,this)??[],updateFeatureResults:a?.updateResults?.map(this._createFeatureEditResult,this)??[],deleteFeatureResults:a?.deleteResults?.map(this._createFeatureEditResult,this)??[],addAttachmentResults:o&&o.addResults?o.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:o&&o.updateResults?o.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:o&&o.deleteResults?o.deleteResults.map(this._createFeatureEditResult,this):[]};if(a?.editMoment&&(n.editMoment=a.editMoment),r.length>0){n.editedFeatureResults=[];for(const e of r){const{adds:t,updates:s,deletes:r,spatialReference:a}=e.editedFeatures,o=a?new q.Z(a):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:{adds:t?.map((e=>this._createEditedFeature(e,o)))||[],updates:s?.map((e=>({original:this._createEditedFeature(e[0],o),current:this._createEditedFeature(e[1],o)})))||[],deletes:r?.map((e=>this._createEditedFeature(e,o)))||[],spatialReference:o}})}}return n}_createEditedFeature(e,t){return new a.Z({attributes:e.attributes,geometry:(0,b.im)({...e.geometry,spatialReference:t})})}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new u.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_createAttachmentErrorResult(e,t){const s=t.details.messages&&t.details.messages[0]||t.message,r=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new u.Z("feature-layer-source:attachment-failure",s,{code:r})}}_getFormDataForAttachment(e,t){const s=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(s)for(const e in t){const r=t[e];null!=r&&(s.set?s.set(e,r):s.append(e,r))}return s}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:s,dynamicDataSource:r}=this.layer;return{...e,query:{gdbVersion:s,layer:r?JSON.stringify({source:r}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}};(0,r._)([(0,m.Cb)()],A.prototype,"type",void 0),(0,r._)([(0,m.Cb)({constructOnly:!0})],A.prototype,"layer",void 0),(0,r._)([(0,m.Cb)({readOnly:!0})],A.prototype,"queryTask",null),A=(0,r._)([(0,g.j)("esri.layers.graphics.sources.FeatureLayerSource")],A);const E=A},74654:(e,t,s)=>{s.d(t,{Z:()=>E});var r=s(43697),a=s(15923),o=s(20102),n=s(80442),i=s(70586),u=s(95330),l=s(17452),d=s(5600),c=(s(75215),s(67676),s(52011)),p=s(10158),h=s(11282),y=s(41818),f=(s(66577),s(34599)),m=s(14165),g=s(6570),_=s(5396),b=s(4967),F=s(69285),R=s(98732);function S(e,t){return t}function C(e,t,s,r){switch(s){case 0:return w(e,t+r,0);case 1:return"lowerLeft"===e.originPosition?w(e,t+r,1):function({translate:e,scale:t},s,r){return e[r]-s*t[r]}(e,t+r,1)}}function I(e,t,s,r){return 2===s?w(e,t,2):C(e,t,s,r)}function q(e,t,s,r){return 2===s?w(e,t,3):C(e,t,s,r)}function O(e,t,s,r){return 3===s?w(e,t,3):I(e,t,s,r)}function w({translate:e,scale:t},s,r){return e[r]+s*t[r]}class x{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=S,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,F.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(!(0,i.Wi)(t))for(const s of e.features)t(s.geometry)}createSpatialReference(){return{}}addField(e,t){const s=e.fields;(0,i.O3)(s),s.push(t);const r=s.map((e=>e.name));this._attributesConstructor=function(){for(const e of r)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,s)=>this.addCoordinatePoint(e,t,s),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,s)=>this._addCoordinatePolygon(e,t,s),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,s)=>this._addCoordinatePolyline(e,t,s),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,s)=>this._addCoordinateMultipoint(e,t,s),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,s){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:s,queryGeometryType:r}=t,a=(0,R.$g)(s.clone(),s,!1,!1,this._transform),o=(0,R.di)(a,r,!1,!1);e.queryGeometryType=r,e.queryGeometry={...o}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,s){const r=(0,i.s3)(this._transform,"transform");switch(t=this._applyTransform(r,t,s,0),s){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let s=0;t<=1&&(s=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const r=(0,i.s3)(this._transform,"transform");return this._applyTransform(r,e,t,s)}_addCoordinatePolyline(e,t,s){this._dehydratedAddPointsCoordinate(e.paths,t,s)}_addCoordinatePolygon(e,t,s){this._dehydratedAddPointsCoordinate(e.rings,t,s)}_addCoordinateMultipoint(e,t,s){0===s&&e.points.push([]);const r=this._transformPathLikeValue(t,s);e.points[e.points.length-1].push(r)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,s){0===s&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const r=this._transformPathLikeValue(t,s),a=e[e.length-1];0===s&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),a.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=r}_deriveApplyTransform(e){const{hasZ:t,hasM:s}=e;return t&&s?O:t?I:s?q:C}}var T=s(74889);let A=class extends a.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,l.mN)(this.url)}async execute(e,t){const s=await this.executeJSON(e,t);return this.featureSetFromJSON(e,s,t)}async executeJSON(e,t){const s=this._normalizeQuery(e),r=null!=e.outStatistics?.[0],a=(0,n.Z)("featurelayer-pbf-statistics"),o=!r||a;let i;if(this.pbfSupported&&o)try{i=await async function(e,t,s){const r=(0,h.en)(e),a={...s},o=m.Z.from(t),n=!o.quantizationParameters,{data:i}=await(0,f.qp)(r,o,new x({sourceSpatialReference:o.sourceSpatialReference,applyTransform:n}),a);return i}(this.url,s,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&o||(i=await(0,b.F)(this.url,s,t)),this._normalizeFields(i.fields),i}async featureSetFromJSON(e,t,r){if(!this._queryIs3DObjectFormat(e)||(0,i.Wi)(this.infoFor3D)||!t.assetMaps||!t.features||!t.features.length)return T.Z.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,u.Hl)(Promise.all([s.e(6481),s.e(6459),s.e(1932)]).then(s.bind(s,21932)),r);return a(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,s){const r=(0,h.en)(e);return(0,f.Vr)(r,m.Z.from(t),{...s}).then((e=>({count:e.data.count,extent:g.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,_.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:r},{executeRelationshipQuery:a}]=await(0,u.Hl)(Promise.all([s.e(5935).then(s.bind(s,75935)),s.e(1073).then(s.bind(s,81073))]),t);return e=r.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:r},{executeRelationshipQueryForCount:a}]=await(0,u.Hl)(Promise.all([s.e(5935).then(s.bind(s,75935)),s.e(1073).then(s.bind(s,81073))]),t);return e=r.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:r,fetchAttachments:a,processAttachmentQueryResult:o}=await(0,u.Hl)(s.e(540).then(s.bind(s,30540)),t),n=(0,h.en)(this.url);return o(n,await(this.queryAttachmentsSupported?r(n,e,t):a(n,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:r}=await(0,u.Hl)(s.e(1158).then(s.bind(s,71158)),t);return r(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:r}=await(0,u.Hl)(s.e(3992).then(s.bind(s,33992)),t);return r(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:r}=await(0,u.Hl)(s.e(1790).then(s.bind(s,21790)),t);return r(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:r}=await(0,u.Hl)(s.e(4371).then(s.bind(s,14371)),t);return r(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);if(t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?p.n.from(e.dynamicDataSource):this.dynamicDataSource),(0,i.pC)(this.infoFor3D)&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;for(const e of this.infoFor3D.queryFormats){if("3D_glb"===e){t.formatOf3DObjects=e;break}"3D_gltf"!==e||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new o.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if((0,i.Wi)(t.outFields)||!t.outFields.includes("*")){t=t===e?t.clone():t,(0,i.Wi)(t.outFields)&&(t.outFields=[]);const{originX:s,originY:r,originZ:a,translationX:o,translationY:n,translationZ:u,scaleX:l,scaleY:d,scaleZ:c,rotationX:p,rotationY:h,rotationZ:y,rotationDeg:f}=this.infoFor3D.transformFieldRoles;t.outFields.push(s,r,a,o,n,u,l,d,c,p,h,y,f)}}return t}_normalizeFields(e){if((0,i.pC)(this.fieldsIndex)&&(0,i.pC)(e))for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return(0,i.pC)(this.infoFor3D)&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,r._)([(0,d.Cb)({type:p.n})],A.prototype,"dynamicDataSource",void 0),(0,r._)([(0,d.Cb)()],A.prototype,"fieldsIndex",void 0),(0,r._)([(0,d.Cb)()],A.prototype,"gdbVersion",void 0),(0,r._)([(0,d.Cb)()],A.prototype,"infoFor3D",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],A.prototype,"parsedUrl",null),(0,r._)([(0,d.Cb)()],A.prototype,"pbfSupported",void 0),(0,r._)([(0,d.Cb)()],A.prototype,"queryAttachmentsSupported",void 0),(0,r._)([(0,d.Cb)()],A.prototype,"sourceSpatialReference",void 0),(0,r._)([(0,d.Cb)({type:String})],A.prototype,"url",void 0),A=(0,r._)([(0,c.j)("esri.tasks.QueryTask")],A);const E=A},25278:(e,t,s)=>{s.d(t,{Dm:()=>d,Hq:()=>c,MS:()=>p,bU:()=>i});var r=s(80442),a=s(22974),o=s(61159),n=s(58333);function i(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?n.I4:"esriGeometryPolyline"===e?n.ET:n.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,r.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this.${t} = null;`;for(const t in e)s+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new r}catch(s){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},41818:(e,t,s)=>{s.d(t,{P:()=>n});var r=s(11282),a=s(34599),o=s(14165);async function n(e,t,s){const n=(0,r.en)(e);return(0,a.hH)(n,o.Z.from(t),{...s}).then((e=>e.data.count))}},5396:(e,t,s)=>{s.d(t,{G:()=>n});var r=s(11282),a=s(34599),o=s(14165);async function n(e,t,s){const n=(0,r.en)(e);return(0,a.Ev)(n,o.Z.from(t),{...s}).then((e=>e.data.objectIds))}},4967:(e,t,s)=>{s.d(t,{F:()=>u,e:()=>i});var r=s(11282),a=s(34599),o=s(74889),n=s(14165);async function i(e,t,s){const r=await u(e,t,s);return o.Z.fromJSON(r)}async function u(e,t,s){const o=(0,r.en)(e),i={...s},u=n.Z.from(t),{data:l}=await(0,a.JT)(o,u,u.sourceSpatialReference,i);return l}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[665,5935],{45378:(e,t,i)=>{i.r(t),i.d(t,{default:()=>$t});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(o[0].toJSON())),(0,n.pC)(o[1])&&(a.toGeometry=JSON.stringify(o[1].toJSON()));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{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 ke(e,t){const i=Ue(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 Qe,We=i(4967),$e=(i(68773),i(40330),i(8744),i(98732),i(6570)),Xe=(i(9361),i(65091)),Ke=i(38913),Ye=(i(58901),i(45091),i(14165)),et=(i(98326),i(56545),i(41818)),tt=i(5396),it=(i(75935),i(28141),i(26059)),rt=i(36679);let st=Qe=class extends I.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Qe((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}})],st.prototype,"angleNames",void 0),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],st.prototype,"point",void 0),(0,r._)([(0,l.Cb)({type:ye.Z,json:{write:!0}})],st.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:u.z8,json:{write:!0}})],st.prototype,"rasterId",void 0),st=Qe=(0,r._)([(0,p.j)("esri.rest.support.ImageAngleParameters")],st);const nt=st;var ot=i(33955);const at=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 lt=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 ut;(0,r._)([(0,l.Cb)()],lt.prototype,"type",void 0),(0,r._)([(0,l.Cb)({type:at.apiValues,json:{read:at.read,write:at.write}})],lt.prototype,"measureOperation",void 0),(0,r._)([(0,l.Cb)({type:K,json:{write:!0}})],lt.prototype,"mosaicRule",void 0),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],lt.prototype,"renderingRule",void 0),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],lt.prototype,"pixelSize",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],lt.prototype,"raster",void 0),lt=(0,r._)([(0,p.j)("esri.rest.support.BaseImageMeasureParameters")],lt);let pt=ut=class extends lt{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,ot.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new ut((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}})],pt.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],pt.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:at.apiValues,json:{write:at.write}})],pt.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],pt.prototype,"is3D",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:be.Jo.read,write:be.Jo.write}})],pt.prototype,"linearUnit",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:be.gV.read,write:be.gV.write}})],pt.prototype,"areaUnit",void 0),pt=ut=(0,r._)([(0,p.j)("esri.rest.support.ImageAreaParameters")],pt);const ct=pt;var dt;let mt=dt=class extends lt{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,ot.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new dt((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}})],mt.prototype,"fromGeometry",void 0),(0,r._)([(0,c.c)("fromGeometry")],mt.prototype,"writeFromGeometry",null),(0,r._)([(0,l.Cb)({type:Q.Z,json:{read:!0,write:!0}})],mt.prototype,"toGeometry",void 0),(0,r._)([(0,l.Cb)({type:at.apiValues,json:{write:at.write}})],mt.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],mt.prototype,"is3D",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:be.Jo.read,write:be.Jo.write}})],mt.prototype,"linearUnit",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:be.CN.read,write:be.CN.write}})],mt.prototype,"angularUnit",void 0),mt=dt=(0,r._)([(0,p.j)("esri.rest.support.ImageDistanceParameters")],mt);const ht=mt;var yt;let ft=yt=class extends lt{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,ot.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new yt((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}})],ft.prototype,"fromGeometry",void 0),(0,r._)([(0,c.c)("fromGeometry")],ft.prototype,"writeFromGeometry",null),(0,r._)([(0,l.Cb)({type:Q.Z,json:{read:!0,write:!0}})],ft.prototype,"toGeometry",void 0),(0,r._)([(0,l.Cb)({type:at.apiValues,json:{write:at.write}})],ft.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],ft.prototype,"operationType",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:be.Jo.read,write:be.Jo.write}})],ft.prototype,"linearUnit",void 0),ft=yt=(0,r._)([(0,p.j)("esri.rest.support.ImageHeightParameters")],ft);const gt=ft;var bt,Rt=i(92835);let wt=bt=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,ot.Ji)(e),t[i]=e.toJSON())}clone(){return new bt((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:ot.im}})],wt.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],wt.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:K,json:{write:!0}})],wt.prototype,"mosaicRule",void 0),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],wt.prototype,"renderingRule",void 0),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],wt.prototype,"pixelSize",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],wt.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({type:Rt.Z,json:{read:{source:"time"},write:{target:"time"}}})],wt.prototype,"timeExtent",void 0),wt=bt=(0,r._)([(0,p.j)("esri.rest.support.ImageHistogramParameters")],wt);const vt=wt;var _t;let Ct=_t=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,ot.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 _t((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}})],Ct.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],Ct.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:K,json:{write:!0}})],Ct.prototype,"mosaicRule",null),(0,r._)([(0,c.c)("mosaicRule")],Ct.prototype,"writeMosaicRule",null),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],Ct.prototype,"renderingRule",null),(0,r._)([(0,c.c)("renderingRule")],Ct.prototype,"writeRenderingRule",null),(0,r._)([(0,l.Cb)({type:[F.Z],json:{write:!0}})],Ct.prototype,"renderingRules",void 0),(0,r._)([(0,c.c)("renderingRules")],Ct.prototype,"writeRenderingRules",null),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],Ct.prototype,"pixelSize",void 0),(0,r._)([(0,c.c)("pixelSize")],Ct.prototype,"writePixelSize",null),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Ct.prototype,"returnGeometry",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Ct.prototype,"returnCatalogItems",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Ct.prototype,"returnPixelValues",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Ct.prototype,"maxItemCount",void 0),(0,r._)([(0,l.Cb)({type:Rt.Z,json:{write:{target:"time"}}})],Ct.prototype,"timeExtent",void 0),(0,r._)([(0,c.c)("timeExtent")],Ct.prototype,"writeTimeExtent",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ct.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ct.prototype,"viewId",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Ct.prototype,"processAsMultidimensional",void 0),Ct=_t=(0,r._)([(0,p.j)("esri.rest.support.ImageIdentifyParameters")],Ct);const St=Ct;var xt;let It=xt=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 xt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,l.Cb)({type:[Q.Z],json:{write:!0}})],It.prototype,"geometries",void 0),(0,r._)([(0,c.c)("geometries")],It.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:u.z8,json:{write:!0}})],It.prototype,"rasterId",void 0),It=xt=(0,r._)([(0,p.j)("esri.rest.support.ImagePixelLocationParameters")],It);const Ft=It;var jt;let Tt=jt=class extends lt{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,ot.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 jt((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:ot.im}})],Tt.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],Tt.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:at.apiValues,json:{read:at.read,write:at.write}})],Tt.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],Tt.prototype,"is3D",void 0),Tt=jt=(0,r._)([(0,p.j)("esri.rest.support.ImagePointParameters")],Tt);const Dt=Tt;var Nt;let Pt=Nt=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,ot.Ji)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new Xe.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new Nt((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:ot.im}})],Pt.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],Pt.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)()],Pt.prototype,"locations",null),(0,r._)([(0,l.Cb)({type:String,json:{type:Y.c.jsonValues,read:Y.c.read,write:Y.c.write}})],Pt.prototype,"interpolation",void 0),(0,r._)([(0,l.Cb)({type:K,json:{write:!0}})],Pt.prototype,"mosaicRule",void 0),(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],Pt.prototype,"outFields",void 0),(0,r._)([(0,l.Cb)({type:Q.Z,json:{write:!0}})],Pt.prototype,"pixelSize",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],Pt.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Pt.prototype,"sampleDistance",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Pt.prototype,"sampleCount",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Pt.prototype,"sliceId",void 0),(0,r._)([(0,l.Cb)({type:Rt.Z,json:{read:{source:"time"},write:{target:"time"}}})],Pt.prototype,"timeExtent",void 0),Pt=Nt=(0,r._)([(0,p.j)("esri.rest.support.ImageSampleParameters")],Pt);const Ot=Pt;var Mt=i(23808);const Vt=(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"}),At=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Jt=(0,l.Eg)(u.q9,{min:0,max:255}),Zt=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&&At.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]=Jt(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.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||"Raster.",t=new te.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new te.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new te.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?(0,R.d9)(this.fields):[];s.push(i),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&(0,n.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(r),(0,n.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new te.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new te.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new te.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:o}=this.rasterInfo??{};if((0,n.pC)(o)){const t=o.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const i=(0,R.d9)(t);return i.name=e+t.name,i}));s=s.concat(t)}return s}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)}readRenderingRule(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i&&i.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?F.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):F.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}writeRenderingRule(e,t,i){const r=e.toJSON();r.rasterFunctionDefinition?t[i]=r.rasterFunctionDefinition:t[i]=r}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?ye.Z.fromJSON(i):null}readPixelType(e){return Vt.fromJSON(e)||e}writePixelType(e,t,i){((0,n.Wi)(this.serviceRasterInfo)||this.pixelType!==this.serviceRasterInfo.pixelType)&&(t[i]=Vt.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 g.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,u.TJ)(nt,e).clone(),async function(e,t,i){const r=t.toJSON();(0,n.pC)(r.angleName)&&(r.angleName=r.angleName.join(",")),(0,n.pC)(t.point)&&t.point.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=Ue(t.point.spatialReference)),(0,n.pC)(t.spatialReference)&&t.spatialReference.imageCoordinateSystem&&(r.spatialReference=ke(t.spatialReference));const s=(0,he.en)(e),o=(0,he.cv)({...s.query,f:"json",...r}),a=(0,he.lA)(o,i),{data:l}=await(0,f.default)(`${s.path}/computeAngles`,a);return l.spatialReference=l.spatialReference?null!=l.spatialReference.geodataXform?new ye.Z({wkid:0,imageCoordinateSystem:l.spatialReference}):ye.Z.fromJSON(l.spatialReference):null,"NaN"===l.north&&(l.north=null),"NaN"===l.up&&(l.up=null),new ge(l)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new g.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,u.TJ)(Ft,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=Ue(s[e].spatialReference));const n=(0,he.en)(e),o=(0,he.cv)({...n.query,f:"json",...r}),a=(0,he.lA)(o,i),{data:l}=await(0,f.default)(`${n.path}/computePixelLocation`,a);return Me.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new g.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,u.TJ)(vt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ge(e,t,i),s=(0,he.en)(e),{data:n}=await(0,f.default)(`${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 g.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,u.TJ)(vt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ge(e,t,i),s=(0,he.en)(e),{data:n}=await(0,f.default)(`${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 g.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,u.TJ)(gt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Le(e,t,[t.fromGeometry,t.toGeometry],i);return Te.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 g.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,u.TJ)(ct,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Le(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 g.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,u.TJ)(ht,e).clone(),this._applyMosaicAndRenderingRules(e),Be(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 g.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,u.TJ)(Dt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Le(e,t,[t.geometry],i);return Ae.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return(0,n.pC)(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 g.Z("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.renderingRule,{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,re.g)(e,`${i(this.parsedUrl)}/exportImage`)}:{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(ne.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ne.Z({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const o=!!s.requestAsImageElement&&!this.pixelFilter,a=o&&!!s.returnImageBitmap,l={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:o,returnImageBitmap:a,signal:s.signal};return this._requestArrayBuffer(l)}fetchKeyProperties(e){return(0,f.default)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new g.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.default)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>De.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,he.en)(e),s=(0,he.cv)({...r?.query,f:"json"}),n=(0,he.lA)(s,i),o=`${r?.path}/${t}/info`,a=(0,f.default)(`${o}`,n),l=(0,f.default)(`${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=$e.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),y=Math.ceil(m.height/p.pixelSizeY-.1),g=m.spatialReference,b=new Q.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),R=p.histograms?.length?p.histograms:null,w=new rt.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new oe.Z({width:h,height:y,bandCount:p.bandCount,extent:m,spatialReference:g,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:R,keyProperties:c,storageInfo:w})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,f.default)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r&&r.ics;if(!s)return;let n=null;try{n=(await(0,f.default)(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.default)(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:a.wkid||JSON.stringify(a),outSR:"0:"+e},u=(0,f.default)(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:a.wkid||JSON.stringify(a),outSR:"0:"+e},y=(0,f.default)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,y]);let b=g[0].ipxf;if(null==b){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(b={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const R=$e.Z.fromJSON(g[1]&&g[1].geometries&&g[1].geometries[0]);R&&(R.spatialReference=new ye.Z({wkid:0,imageCoordinateSystem:s}));const w=g[2].geometries?g[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],v=w.length;if(v<3)return{ics:s,icsToPixelTransform:b,icsExtent:R,northDirection:null};let _=0,C=0,S=0,x=0;for(let e=0;e<v;e++)_+=w[e].x,C+=w[e].y,S+=w[e].x*w[e].x,x+=w[e].x*w[e].y;const I=(v*x-_*C)/(v*S-_*_);let F=0;const j=w[4].x>w[0].x,T=w[4].y>w[0].y;return I===1/0?F=T?90:270:0===I?F=j?0:180:I>0?F=j?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(F=T?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:s,icsToPixelTransform:b,icsExtent:R,northDirection:F}}async generateRasterInfo(e,t){if(e=(0,u.TJ)(F.Z,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const i=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi)?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return t?t.join("/"):null}(e);if(!i)return null;if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const r=this._generateRasterInfo(e,t);this._functionRasterInfos[i]=r;try{return await r}catch{return this._functionRasterInfos[i]=null,null}}getExportImageServiceParameters(e,t,r,s){const o=ke((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const a=this.exportImageServiceParameters.toJSON(),{bandIds:l,noData:u}=a;let{renderingRule:p}=a;const c=this.renderingRule?.rasterFunctionDefinition,d=!this.renderer||"raster-stretch"===this.renderer.type;if(l?.length&&this._hasRenderingRule(this.renderingRule)&&!c&&d){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFunctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){const t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;a.bandIds=void 0}else a.bandIds=l?.join(",");u instanceof Array&&u.length>0&&(a.noData=u.join(","));const m=this._processMultidimensionalIntersection(null,s,this.exportImageServiceParameters.mosaicRule);if(m.isOutSide)return null;a.mosaicRule=(0,n.pC)(m.mosaicRule)?JSON.stringify(m.mosaicRule):null,s=m.timeExtent,a.renderingRule=this._getRenderingRuleString(F.Z.fromJSON(p));const h={};if((0,n.pC)(s)){const{start:e,end:t}=s.toJSON();e&&t&&e===t?h.time=""+e:null==e&&null==t||(h.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:o,imageSR:o,size:t+","+r,...a,...h}}async getSamples(e,t){if(!(await this._fetchCapabilities(t?.signal))?.operations.supportsGetSamples)throw new g.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,u.TJ)(Ot,e).clone();const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,i){const r=t.toJSON();ze(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const s=(await(0,me.aX)(t.geometry))?.[0];(0,n.pC)(s)&&(r.geometry=s.toJSON());const o=(0,he.en)(e),a=(0,he.cv)({...o.query,f:"json",...r}),l=(0,he.lA)(a,i),{data:u}=await(0,f.default)(`${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 qe.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new g.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,u.TJ)(St,e).clone();const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new g.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=(0,n.Wg)(i.timeExtent),e.mosaicRule=(0,n.Wg)(i.mosaicRule);const{raster:r,renderingRule:s}=this;return s&&null==e.renderingRule&&(e.renderingRule=s),r&&null==e.raster&&(e.raster=r),He(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new Ye.Z;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,We.e)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,tt.G)(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,et.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new g.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:o}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if((0,n.pC)(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>p.length)).map((e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new F.Z({functionName:e[0]}))),u=t.map((e=>e[1]));const{renderingRule: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=(0,n.Wi)(e.outSpatialReference)||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let h=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:i}=(0,le.W2)(m,{geometry:(0,n.Wg)(e.geometry),timeExtent:(0,n.Wg)(e.timeExtent),multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new g.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");i&&(0,n.pC)(i.timeExtent)&&(h=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h),f=this._getQueryParams({geometry:e.geometry,timeExtent:h,mosaicRule:y,renderingRule:this.version<10.4?this.renderingRule:null,renderingRules:l,pixelSize:i,returnCatalogItems:a,returnGeometry:d,raster:this.raster,maxItemCount:s?1:null});delete f.f;const b=new St(f);try{await this.generateRasterInfo(this.renderingRule);const i=await He(this.url,b,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,l=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!a||d||!i?.catalogItems?.features.length||!o&&l)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:o,templateFields:s});const p=this.objectIdField||"ObjectId",c=i.catalogItems?.features??[],m=c.map((e=>e.attributes?.[p])),h=new Ye.Z({objectIds:m,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[p]}),y=await this.queryRasters(h);return y?.features?.length&&y.features.forEach((t=>{c.forEach((i=>{i.attributes[p]===t.attributes[p]&&(i.geometry=new Ke.Z(t.geometry),(0,n.pC)(e.outSpatialReference)&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:o,templateFields:s})}catch{throw new g.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,f.default)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,f.default)(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,Mt.GE)(e.meshType,e.simulationSettings,e.flowData,(0,n.pC)(t.signal)?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,le.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=(0,n.pC)(this.serviceRasterInfo)?Promise.resolve(this.serviceRasterInfo):(0,it.g)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),e))),s=this._hasRenderingRule(this.renderingRule)?this.generateRasterInfo(this.renderingRule,{signal:e}):null,o=this._getRasterFunctionInfos();return Promise.all([r,s,o]).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),w.Z.getLogger(this.declaredClass).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,v.YP)((()=>this.renderingRule),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this.generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;(0,n.pC)(t.multidimensionalInfo)&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if((0,n.Wi)(e)||(0,n.Wi)(r)||(0,n.Wi)(t)||(0,n.Wi)(i?.startField))return e;const{startField:s}=i,o=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!==o)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const a=e.multidimensionalDefinition.filter((e=>e.dimensionName===o)),l=(0,n.pC)(t.start)?t.start.getTime():null,u=(0,n.pC)(t.end)?t.end.getTime():null,p=null==l||null==u||l===u,c=p?[l||u]:[[l,u]],d=this.version>=10.8;if(a.length)a.forEach((e=>{e.dimensionName===o&&(d?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=p,e.values=c))}));else if(!d){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=o,e.isSlice=p,e.values=c})):e.multidimensionalDefinition.push(new x.Z({variableName:"",dimensionName:o,isSlice:p,values:c}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return(0,n.Wi)(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 g.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=(0,n.pC)(e)?(0,u.TJ)(Ye.Z,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 ae.Z;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,renderingRule:i}=this;return"unique-value"===e.type&&this._hasRenderingRule(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,ce.U0)(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.default)(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 g.Z("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((0,n.Wi)(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,ce.YD)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,ce.Ob)(i,{bandIds:this.bandIds,variableName:this.renderingRule?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,ce.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=i):this.symbolizer=new de.Z({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:(0,n.pC)(e.pixelBlock)?e.pixelBlock.clone():null}}_getQueryParams(e){e&&(0,n.pC)(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,ue.J)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;return this.loaded?t:t&&this.version>=10.3?1===t.length&&"none"===t[0].name.toLowerCase()?t:(await(0,f.default)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e})).data?.rasterFunctionInfos: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.default)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,re.g)(o,r),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),a=(0,f.default)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),l=(await Promise.all([a,o]))[0].data,u=t.format||"jpgpng";let p=u;if("bsq"!==p&&"bip"!==p&&(p=(0,ue.y)(l)),!p)throw new g.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:n},d="gif"===u||"bmp"===u||u.includes("png")&&("png"===p||"jpg"===p)?(0,ue.J)(l,{useCanvas:!0,...t},c):this._decodePixelBlock(l,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:u},c);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return(0,it.N)(i(this.parsedUrl),e,r)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,le.Tj)(e,{multidimensionalSubset:this.multidimensionalSubset});if((0,n.pC)(t)&&t.length>0){this.mosaicRule=this.mosaicRule||new K;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.renderingRule&&"none"!==this.renderingRule.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:o,templateFields:a}=t,l=e.processedValues;let u=e.catalogItems&&e.catalogItems.features,p=e.properties&&e.properties.Values&&e.properties.Values.map((e=>e.replace(/ /gi,", ")))||[];const c=this.objectIdField||"ObjectId",d="string"==typeof i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!u&&!d){const e={};e[c]=0,p=[i],u=[new h.Z(this.fullExtent,null,e)]}if(!u)return[];let y,f,g;this._updateResponseFieldNames(u,a),d&&!s&&(u=[]);for(let e=0;e<u.length;e++){if(y=u[e],null!=i){if(f=p[e],g=this.renderingRule&&l&&l.length>0&&r&&r.length>0&&r.includes(this.renderingRule.functionName)?l[r.indexOf(this.renderingRule.functionName)]:i,"nodata"===f.toLowerCase()&&!s)continue;const t="Raster.ItemPixelValue",o="Raster.ServicePixelValue";y.attributes[t]=f,y.attributes[o]=g,this._updateFeatureWithMagDirValues(y,f);const a=this.fields&&this.fields.length>0;let u=this.renderingRule&&(0,n.pC)(this.serviceRasterInfo.attributeTable)?a?f:i:g;this.renderingRule||(u=a?f:i),this._updateFeatureWithRasterAttributeTableValues(y,u)}if(y.sourceLayer=y.layer=this,o&&this._updateFeatureWithDomainValues(y),r&&l&&r.length===l.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];y.attributes[t]=l[e]}m.push(u[e])}return m}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=(0,le.W2)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};s&&(0,n.pC)(s.timeExtent)&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),(0,n.pC)(i)&&i.multidimensionalDefinition){const{isOutside:e}=(0,le.W2)(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((0,n.Wi)(i))return;const{features:r,fields:s}=i,o=s.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),a=o&&o[0];if(!a)return;const l=r.filter((e=>e.attributes[a]===(null!=t?parseInt(t,10):null)));l&&l[0]&&s.forEach((t=>{const i=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=l[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 ne.Z({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new $e.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,pe.Tg)([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;(0,n.Wi)(i)||e.forEach((e=>{if(e&&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(this._hasRenderingRule(e)){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRenderingRule(e){return null!=e&&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().replace(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e&&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,renderingRule:r}=this;r&&null==e.renderingRule&&(e.renderingRule=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&&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");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&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&&t.includes("catalog"),supportsComputeAngles:i>=10.91,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},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,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,l.Cb)()],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,C.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,l.Cb)()],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,l.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,l.Cb)({type:[u.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,C.r)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,C.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,l.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,c.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,l.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,c.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,l.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,C.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,l.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,type:[te.Z]})],t.prototype,"fields",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,l.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,C.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,l.Cb)({type:$e.Z})],t.prototype,"fullExtent",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,l.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,l.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,l.Cb)({type:String,json:{type:Y.c.jsonValues,read:Y.c.read,write:Y.c.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"minScale",void 0),(0,r._)([(0,C.r)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,l.Cb)()],t.prototype,"maxScale",void 0),(0,r._)([(0,C.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,l.Cb)({type:K})],t.prototype,"mosaicRule",null),(0,r._)([(0,C.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,c.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,l.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,l.Cb)({type:se.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,l.Cb)({json:{type:u.z8}})],t.prototype,"noData",void 0),(0,r._)([(0,c.c)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,l.Cb)({type:String,json:{type:Y.k.jsonValues,read:Y.k.read,write:Y.k.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,l.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,C.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,l.Cb)({})],t.prototype,"geometryType",void 0),(0,r._)([(0,l.Cb)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,l.Cb)({})],t.prototype,"types",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,l.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,C.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,l.Cb)()],t.prototype,"viewId",void 0),(0,r._)([(0,l.Cb)({types:y.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:y.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,r._)([(0,C.r)("renderer")],t.prototype,"readRenderer",null),(0,r._)([(0,c.c)("renderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,l.Cb)()],t.prototype,"symbolizer",void 0),(0,r._)([(0,l.Cb)(S.Oh)],t.prototype,"opacity",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,l.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,l.Cb)({type:F.Z})],t.prototype,"renderingRule",null),(0,r._)([(0,C.r)("renderingRule",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRenderingRule",null),(0,r._)([(0,c.c)("renderingRule")],t.prototype,"writeRenderingRule",null),(0,r._)([(0,l.Cb)()],t.prototype,"serviceDataType",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,type:ye.Z})],t.prototype,"spatialReference",void 0),(0,r._)([(0,C.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,l.Cb)({json:{type:Vt.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,C.r)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,c.c)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,l.Cb)({constructOnly:!0,type:oe.Z})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,l.Cb)(S.HQ)],t.prototype,"url",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,C.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,p.j)("esri.layers.mixins.ArcGISImageService")],t),t};var Et=i(17287),qt=i(71612),zt=i(17017),Gt=i(38009),Ht=i(16859),Bt=i(34760),Lt=i(72965),Ut=i(28294),kt=i(60199),Qt=i(32163);let Wt=class extends((0,qt.h)((0,Ut.n)((0,Lt.M)((0,Gt.q)((0,Ht.I)(Zt((0,Bt.Q)((0,zt.N)((0,Et.Y)((0,o.R)(d.Z))))))))))){constructor(...e){super(...e),this.legendEnabled=!0,this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,n.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(a.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}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)}return n&&r.add("raster.magnitude").add("raster.direction"),(0,Qt.eZ)({fields:t,title:i},{...e,visibleFieldNames:r})}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")}serviceSupportsSpatialReference(e){return(0,kt.D)(this,e)}};(0,r._)([(0,l.Cb)(S.rn)],Wt.prototype,"legendEnabled",void 0),(0,r._)([(0,l.Cb)({type:["show","hide"]})],Wt.prototype,"listMode",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Wt.prototype,"isReference",void 0),(0,r._)([(0,l.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Wt.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.c)("web-map","operationalLayerType")],Wt.prototype,"writeOperationalLayerType",null),(0,r._)([(0,l.Cb)(S.C_)],Wt.prototype,"popupEnabled",void 0),(0,r._)([(0,l.Cb)({type:s.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Wt.prototype,"popupTemplate",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],Wt.prototype,"defaultPopupTemplate",null),(0,r._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],Wt.prototype,"type",void 0),Wt=(0,r._)([(0,p.j)("esri.layers.ImageryLayer")],Wt);const $t=Wt},17287:(e,t,i)=>{i.d(t,{Y:()=>u});var r=i(43697),s=i(92604),n=i(70586),o=i(5600),a=(i(75215),i(67676),i(52011)),l=i(66677);const u=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,l.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,r._)([(0,o.Cb)()],t.prototype,"title",null),(0,r._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,a.j)("esri.layers.mixins.ArcGISService")],t),t}},90082:(e,t,i)=>{i.d(t,{g:()=>s});var r=i(20102);async function s(e,t){try{return await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}}},60199:(e,t,i)=>{i.d(t,{D:()=>n});var r=i(66677);const s=[];function n(e,t){if((0,r.M8)(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=102759;t<=102760;t++)e.add(t);for(let t=102901;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}]),s.push([10.51,()=>{const e=new Set([7683,7881,7886,7899,8888,9e3]);for(let t=8013;t<=8032;t++)e.add(t);for(let t=9053;t<=9057;t++)e.add(t);for(let t=104017;t<=104018;t++)e.add(t);for(let t=104971;t<=104974;t++)e.add(t);return e}]),s.push([10.5,()=>{const e=new Set([6962,7035,7037,7039,7041,7084,7086,7133,7798,102399]);for(let t=4087;t<=4088;t++)e.add(t);for(let t=5896;t<=5899;t++)e.add(t);for(let t=7005;t<=7007;t++)e.add(t);for(let t=7057;t<=7070;t++)e.add(t);for(let t=7073;t<=7082;t++)e.add(t);for(let t=7109;t<=7128;t++)e.add(t);for(let t=7844;t<=7859;t++)e.add(t);return e}])},41818:(e,t,i)=>{i.d(t,{P:()=>o});var r=i(11282),s=i(34599),n=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,s.hH)(o,n.Z.from(t),{...i}).then((e=>e.data.count))}},5396:(e,t,i)=>{i.d(t,{G:()=>o});var r=i(11282),s=i(34599),n=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,s.Ev)(o,n.Z.from(t),{...i}).then((e=>e.data.objectIds))}},4967:(e,t,i)=>{i.d(t,{F:()=>l,e:()=>a});var r=i(11282),s=i(34599),n=i(74889),o=i(14165);async function a(e,t,i){const r=await l(e,t,i);return n.Z.fromJSON(r)}async function l(e,t,i){const n=(0,r.en)(e),a={...i},l=o.Z.from(t),{data:u}=await(0,s.JT)(n,l,l.sourceSpatialReference,a);return u}},28694:(e,t,i)=>{i.d(t,{p:()=>n});var r=i(70586),s=i(69285);function n(e,t,i){if(!i||!i.features||!i.hasZ)return;const n=(0,s.k)(i.geometryType,t,e.outSpatialReference);if(!(0,r.Wi)(n))for(const e of i.features)n(e.geometry)}},98326:(e,t,i)=>{i.d(t,{Z:()=>c});var r,s=i(43697),n=i(96674),o=i(5600),a=i(75215),l=(i(67676),i(52011));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.wq{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&&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.Cb)({type:String})],p.prototype,"contentType",void 0),(0,s._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,s._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,s._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,s._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,i)=>{i.d(t,{Z:()=>d});var r,s=i(43697),n=i(96674),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556);let c=r=class extends n.wq{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.d9)({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.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=r=(0,s._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,s=i(43697),n=(i(66577),i(96674)),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556),c=i(10158),d=i(82971);let m=r=class extends n.wq{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.d9)({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.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,s._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,s._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=r=(0,s._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,i)=>{i.d(t,{Z:()=>C});var r,s=i(43697),n=i(66577),o=i(92835),a=i(35454),l=i(96674),u=i(22974),p=i(70586),c=i(5600),d=i(75215),m=i(52011),h=i(30556),y=i(33955);i(67676);let f=r=class extends l.wq{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,c.Cb)({type:[String],json:{write:!0}})],f.prototype,"groupByFields",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],f.prototype,"topCount",void 0),(0,s._)([(0,c.Cb)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),f=r=(0,s._)([(0,m.j)("esri.rest.support.TopFilter")],f);const g=f;var b,R=i(82971);const w=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),v=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let _=b=class extends l.wq{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 b((0,u.d9)({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,c.Cb)({type:Boolean,json:{write:!0}})],_.prototype,"cacheHint",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],_.prototype,"distance",void 0),(0,s._)([(0,c.Cb)({types:n.qM,json:{read:y.im,write:!0}})],_.prototype,"geometry",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],_.prototype,"geometryPrecision",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],_.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],_.prototype,"num",void 0),(0,s._)([(0,c.Cb)({json:{write:!0}})],_.prototype,"objectIds",void 0),(0,s._)([(0,c.Cb)({type:[String],json:{write:!0}})],_.prototype,"orderByFields",void 0),(0,s._)([(0,c.Cb)({type:[String],json:{write:!0}})],_.prototype,"outFields",void 0),(0,s._)([(0,c.Cb)({type:R.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],_.prototype,"outSpatialReference",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],_.prototype,"resultType",void 0),(0,s._)([(0,c.Cb)({json:{write:!0}})],_.prototype,"returnGeometry",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnM",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnZ",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],_.prototype,"start",void 0),(0,s._)([(0,h.c)("start"),(0,h.c)("num")],_.prototype,"writeStart",null),(0,s._)([(0,c.Cb)({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],_.prototype,"spatialRelationship",void 0),(0,s._)([(0,c.Cb)({type:o.Z,json:{write:!0}})],_.prototype,"timeExtent",void 0),(0,s._)([(0,c.Cb)({type:g,json:{write:!0}})],_.prototype,"topFilter",void 0),(0,s._)([(0,c.Cb)({type:String,json:{read:v.read,write:{writer:v.write,overridePolicy(e){return{enabled:(0,p.pC)(e)&&(0,p.pC)(this.distance)&&this.distance>0}}}}})],_.prototype,"units",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],_.prototype,"where",void 0),_=b=(0,s._)([(0,m.j)("esri.rest.support.TopFeaturesQuery")],_),_.from=(0,d.se)(_);const C=_}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9771,6502],{3388:(e,t,s)=>{var r;s.d(t,{i:()=>r}),function(e){e[e.PROJECT_VERTICES=1]="PROJECT_VERTICES"}(r||(r={}))},61159:(e,t,s)=>{s.d(t,{g:()=>r});const r={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},6502:(e,t,s)=>{s.r(t),s.d(t,{default:()=>A});var r=s(43697),a=(s(66577),s(38171)),o=s(40330),n=s(3172),i=s(92835),u=s(20102),l=s(80442),d=s(35454),c=s(83379),p=s(70586),h=s(78286),y=s(95330),f=s(17452),m=s(5600),g=(s(75215),s(67676),s(52011)),_=s(6570),b=s(33955),R=s(3388),F=s(25278),S=s(74654),C=s(66677),w=s(59431),q=s(82971);const O=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"});async function x(e){return"string"==typeof e?(0,f.sJ)(e)||{data:e}:new Promise(((t,s)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t((0,f.sJ)(r.result)),r.onerror=e=>s(e)}))}const I=new Set(["Feature Layer","Table"]),T=new d.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let v=class extends c.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,y.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}))}load(e){const t=(0,p.pC)(e)?e.signal:null,s=this.layer.sourceJSON;return this.addResolvingPromise(this._fetchService(s,t)),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:s,infoFor3D:r,gdbVersion:a,spatialReference:o,fieldsIndex:n}=this.layer,i=(0,l.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&(0,p.Wi)(r),u=e?.operations?.supportsQueryAttachments??!1;return new S.Z({url:t.path,pbfSupported:i,fieldsIndex:n,infoFor3D:r,dynamicDataSource:s,gdbVersion:a,sourceSpatialReference:o,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const s=e.attributes[this.layer.objectIdField],r=this.layer.parsedUrl.path+"/"+s+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,a.query);try{const e=await(0,n.default)(r,{body:o});return this._createFeatureEditResult(e.data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async updateAttachment(e,t,s){await this.load();const r=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+r+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),i=this._getFormDataForAttachment(s,o.query);try{const e=await(0,n.default)(a,{body:i});return this._createFeatureEditResult(e.data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}async applyEdits(e,t){await this.load();const s=this.layer.infoFor3D,r=(0,p.pC)(s),a=r||(t?.globalIdUsed??!1),i=e.addFeatures?.map((e=>this._serializeFeature(e,s))).filter(p.pC)??[],u=e.updateFeatures?.map((e=>this._serializeFeature(e,s))).filter(p.pC)??[],l=this._getFeatureIds(e.deleteFeatures,a);(0,w.P)(i,u,this.layer.spatialReference);const d=[],c=[],h=[...e.deleteAttachments??[]];for(const t of e.addAttachments??[])d.push(await this._serializeAttachment(t));for(const t of e.updateAttachments??[])c.push(await this._serializeAttachment(t));const y=d.length||c.length||h.length?{adds:d,updates:c,deletes:h}:null;let f,m=null;if(r){m=new Map;const t=[];for(const s of e.addAssets??[])t.push(this._serializeAssetMapEditAndUploadAssets(s,m));const s=await Promise.all(t);f=s.length?{adds:s,updates:[],deletes:[]}:void 0}const g={gdbVersion:t?.gdbVersion||this.layer.gdbVersion,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:a,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,sessionId:t?.sessionId};t?.returnServiceEditsOption?(g.edits=JSON.stringify([{id:this.layer.layerId,adds:i,updates:u,deletes:l,attachments:y,assetMaps:(0,p.Wg)(f)}]),g.returnServiceEditsOption=O.toJSON(t?.returnServiceEditsOption),g.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(g.adds=i.length?JSON.stringify(i):null,g.updates=u.length?JSON.stringify(u):null,g.deletes=l.length?a?JSON.stringify(l):l.join(","):null,g.attachments=y&&JSON.stringify(y),g.assetMaps=(0,p.pC)(f)?JSON.stringify(f):void 0);const _=this._getLayerRequestOptions({method:"post",query:g}),b=t?.returnServiceEditsOption?this.layer.url:this.layer.parsedUrl.path,R=await(0,n.default)(b+"/applyEdits",_);if(!this.layer.capabilities.operations?.supportsEditing&&this.layer.effectiveCapabilities?.operations?.supportsEditing){const e=o.id?.findCredential(this.layer.url);await(e?.refreshToken())}if(r&&null!=R.data&&null!=R.data.assetMaps){const e=R.data,t=this.layer.objectIdField,s=[];for(const t of e.addResults)t.success&&s.push(t.objectId);for(const t of e.updateResults)t.success&&s.push(t.objectId);const r=this._createRequestQueryOptions(),a=await(0,n.default)(b+"/query",{...r,query:{f:"json",formatOf3DObjects:"3D_glb",where:`OBJECTID IN (${s.join(",")})`,outFields:`${t}`}});if(a&&a.data&&a.data.assetMaps&&(0,p.pC)(m)){const e=a.data.assetMaps;for(const t of e){const e=m.get(t.parentGlobalId).geometry;(0,p.pC)(e)&&"mesh"===e.type&&e.updateExternalSource({source:[{name:t.assetName,source:t.assetName}],extent:e.extent})}}}return this._createEditsResult(R)}async deleteAttachments(e,t){await this.load();const s=e.attributes[this.layer.objectIdField],r=this.layer.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,n.default)(r,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:s,url:r}=this.layer,{data:a}=await(0,n.default)(`${r}/${s}`,t),{id:o,extent:u,fullExtent:l,timeExtent:d}=a,c=u||l;return{id:o,fullExtent:c&&_.Z.fromJSON(c),timeExtent:d&&i.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const s=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,s)}async queryFeatures(e,t){return await this.load(),this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,C.M8)(this.layer.url))return"unavailable";const e=(0,f.v_)(this.layer.url,"status"),t=await(0,n.default)(e,{query:{f:"json"}});return T.fromJSON(t.data.status)}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const{data:s}=await(0,n.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,l.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:t}));e=s}this.sourceJSON=this._patchServiceJSON(e);const s=e.type;if(!I.has(s))throw new u.Z("feature-layer-source:unsupported-type",`Source type "${s}" is not supported`)}_patchServiceJSON(e){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,F.bU)(e.geometryType).renderer;(0,h.RB)("drawingInfo.renderer",t,e)}return"esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),e}_serializeFeature(e,t){const{geometry:s,attributes:r}=e;if((0,p.pC)(t)&&(0,p.pC)(e.geometry)&&"mesh"===e.geometry.type){const s={...r},a=e.geometry,o=a.origin,n=a.transform;if(s[t.transformFieldRoles.originX]=o.x,s[t.transformFieldRoles.originY]=o.y,s[t.transformFieldRoles.originZ]=o.z,(0,p.pC)(n)){const e=n.translation,r=n.scale,a=n.rotation;s[t.transformFieldRoles.translationX]=e[0],s[t.transformFieldRoles.translationY]=-e[2],s[t.transformFieldRoles.translationZ]=e[1],s[t.transformFieldRoles.scaleX]=r[0],s[t.transformFieldRoles.scaleY]=r[1],s[t.transformFieldRoles.scaleZ]=r[2],s[t.transformFieldRoles.rotationX]=a[0],s[t.transformFieldRoles.rotationY]=a[2],s[t.transformFieldRoles.rotationZ]=a[1],s[t.transformFieldRoles.rotationDeg]=a[3]}return{geometry:null,attributes:s}}return(0,p.Wi)(s)?{attributes:r}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:r}}async _serializeAttachment(e){const{feature:t,attachment:s}=e,{globalId:r,name:a,contentType:o,data:n,uploadId:i}=s,u={globalId:r,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(t&&(u.parentGlobalId="attributes"in t?t.attributes&&t.attributes[this.layer.globalIdField]:t.globalId),i)u.uploadId=i;else if(n){const e=await x(n);e&&(u.contentType=e.mediaType,u.data=e.data),n instanceof File&&(u.name=n.name)}return a&&(u.name=a),o&&(u.contentType=o),u}async _serializeAssetMapEditAndUploadAssets(e,t){const s=this.layer.url;let r=null;try{const t=new Blob([e.data],{type:e.mimeType}),a=new FormData;a.append("f","json"),a.append("file",t,`${e.assetName}`);const o={body:a,method:"post",responseType:"json"},{data:i}=await(0,n.default)(`${s}/uploads/upload`,o);if(!i.success)throw new u.Z("feature-layer-source:upload-failure","Expected upload to be successfull.");r={assetType:e.assetType,assetUploadId:i.item.itemID}}catch(e){r=null}if((0,p.Wi)(r)){const t=await x(new Blob([e.data]));if(!t.isBase64)throw new u.Z("feature-layer-source:uploadAssets-failure","Expected gltf data in base64 format after conversion.");r={assetType:e.assetType,assetData:t.data}}if((0,p.Wi)(r))throw new u.Z("feature-layer-source:uploadAssets-failure","Unable to prepare uploadAsset request options.");const a={method:"post",query:{f:"json",assets:JSON.stringify([r])},responseType:"json"},o=await(0,n.default)((0,f.v_)(this.layer.parsedUrl.path,"uploadAssets"),a);if(1!==o.data.uploadResults.length||!o.data.uploadResults[0].success)throw new u.Z("feature-layer-source:uploadAssets-failure","Bad response.");const i=o.data.uploadResults[0].assetHash,l=[];e.flags&R.i.PROJECT_VERTICES&&l.push("PROJECT_VERTICES");const d={globalId:e.assetMapGlobalId,parentGlobalId:e.featureGlobalId,assetName:e.assetName,assetHash:i,flags:l};return t.set(e.featureGlobalId,e.feature),d}_getFeatureIds(e,t){const s=e?.[0];return s?this._canUseGlobalIds(t,e)?this._getGlobalIdsFromFeatureIdentifier(e):"objectId"in s?this._getObjectIdsFromFeatureIdentifier(e):this._getIdsFromFeatures(e):[]}_getIdsFromFeatures(e){const t=this.layer.objectIdField;return e.map((e=>e.attributes&&e.attributes[t]))}_canUseGlobalIds(e,t){return e&&"globalId"in t[0]}_getObjectIdsFromFeatureIdentifier(e){return e.map((e=>e.objectId))}_getGlobalIdsFromFeatureIdentifier(e){return e.map((e=>e.globalId))}_createEditsResult(e){const t=e.data,{layerId:s}=this.layer,r=[];let a=null;if(Array.isArray(t))for(const e of t)r.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===s&&(a={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else a=t;const o=a?.attachments,n={addFeatureResults:a?.addResults?.map(this._createFeatureEditResult,this)??[],updateFeatureResults:a?.updateResults?.map(this._createFeatureEditResult,this)??[],deleteFeatureResults:a?.deleteResults?.map(this._createFeatureEditResult,this)??[],addAttachmentResults:o&&o.addResults?o.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:o&&o.updateResults?o.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:o&&o.deleteResults?o.deleteResults.map(this._createFeatureEditResult,this):[]};if(a?.editMoment&&(n.editMoment=a.editMoment),r.length>0){n.editedFeatureResults=[];for(const e of r){const{adds:t,updates:s,deletes:r,spatialReference:a}=e.editedFeatures,o=a?new q.Z(a):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:{adds:t?.map((e=>this._createEditedFeature(e,o)))||[],updates:s?.map((e=>({original:this._createEditedFeature(e[0],o),current:this._createEditedFeature(e[1],o)})))||[],deletes:r?.map((e=>this._createEditedFeature(e,o)))||[],spatialReference:o}})}}return n}_createEditedFeature(e,t){return new a.Z({attributes:e.attributes,geometry:(0,b.im)({...e.geometry,spatialReference:t})})}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new u.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_createAttachmentErrorResult(e,t){const s=t.details.messages&&t.details.messages[0]||t.message,r=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new u.Z("feature-layer-source:attachment-failure",s,{code:r})}}_getFormDataForAttachment(e,t){const s=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(s)for(const e in t){const r=t[e];null!=r&&(s.set?s.set(e,r):s.append(e,r))}return s}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:s,dynamicDataSource:r}=this.layer;return{...e,query:{gdbVersion:s,layer:r?JSON.stringify({source:r}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}};(0,r._)([(0,m.Cb)()],v.prototype,"type",void 0),(0,r._)([(0,m.Cb)({constructOnly:!0})],v.prototype,"layer",void 0),(0,r._)([(0,m.Cb)({readOnly:!0})],v.prototype,"queryTask",null),v=(0,r._)([(0,g.j)("esri.layers.graphics.sources.FeatureLayerSource")],v);const A=v},74654:(e,t,s)=>{s.d(t,{Z:()=>A});var r=s(43697),a=s(15923),o=s(20102),n=s(80442),i=s(70586),u=s(95330),l=s(17452),d=s(5600),c=(s(75215),s(67676),s(52011)),p=s(10158),h=s(11282),y=s(41818),f=(s(66577),s(34599)),m=s(14165),g=s(6570),_=s(5396),b=s(4967),R=s(69285),F=s(98732);function S(e,t){return t}function C(e,t,s,r){switch(s){case 0:return x(e,t+r,0);case 1:return"lowerLeft"===e.originPosition?x(e,t+r,1):function({translate:e,scale:t},s,r){return e[r]-s*t[r]}(e,t+r,1)}}function w(e,t,s,r){return 2===s?x(e,t,2):C(e,t,s,r)}function q(e,t,s,r){return 2===s?x(e,t,3):C(e,t,s,r)}function O(e,t,s,r){return 3===s?x(e,t,3):w(e,t,s,r)}function x({translate:e,scale:t},s,r){return e[r]+s*t[r]}class I{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=S,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,R.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(!(0,i.Wi)(t))for(const s of e.features)t(s.geometry)}createSpatialReference(){return{}}addField(e,t){const s=e.fields;(0,i.O3)(s),s.push(t);const r=s.map((e=>e.name));this._attributesConstructor=function(){for(const e of r)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,s)=>this.addCoordinatePoint(e,t,s),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,s)=>this._addCoordinatePolygon(e,t,s),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,s)=>this._addCoordinatePolyline(e,t,s),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,s)=>this._addCoordinateMultipoint(e,t,s),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,s){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:s,queryGeometryType:r}=t,a=(0,F.$g)(s.clone(),s,!1,!1,this._transform),o=(0,F.di)(a,r,!1,!1);e.queryGeometryType=r,e.queryGeometry={...o}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,s){const r=(0,i.s3)(this._transform,"transform");switch(t=this._applyTransform(r,t,s,0),s){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let s=0;t<=1&&(s=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const r=(0,i.s3)(this._transform,"transform");return this._applyTransform(r,e,t,s)}_addCoordinatePolyline(e,t,s){this._dehydratedAddPointsCoordinate(e.paths,t,s)}_addCoordinatePolygon(e,t,s){this._dehydratedAddPointsCoordinate(e.rings,t,s)}_addCoordinateMultipoint(e,t,s){0===s&&e.points.push([]);const r=this._transformPathLikeValue(t,s);e.points[e.points.length-1].push(r)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,s){0===s&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const r=this._transformPathLikeValue(t,s),a=e[e.length-1];0===s&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),a.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=r}_deriveApplyTransform(e){const{hasZ:t,hasM:s}=e;return t&&s?O:t?w:s?q:C}}var T=s(74889);let v=class extends a.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,l.mN)(this.url)}async execute(e,t){const s=await this.executeJSON(e,t);return this.featureSetFromJSON(e,s,t)}async executeJSON(e,t){const s=this._normalizeQuery(e),r=null!=e.outStatistics?.[0],a=(0,n.Z)("featurelayer-pbf-statistics"),o=!r||a;let i;if(this.pbfSupported&&o)try{i=await async function(e,t,s){const r=(0,h.en)(e),a={...s},o=m.Z.from(t),n=!o.quantizationParameters,{data:i}=await(0,f.qp)(r,o,new I({sourceSpatialReference:o.sourceSpatialReference,applyTransform:n}),a);return i}(this.url,s,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&o||(i=await(0,b.F)(this.url,s,t)),this._normalizeFields(i.fields),i}async featureSetFromJSON(e,t,r){if(!this._queryIs3DObjectFormat(e)||(0,i.Wi)(this.infoFor3D)||!t.assetMaps||!t.features||!t.features.length)return T.Z.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,u.Hl)(Promise.all([s.e(6481),s.e(6459),s.e(1932)]).then(s.bind(s,21932)),r);return a(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,s){const r=(0,h.en)(e);return(0,f.Vr)(r,m.Z.from(t),{...s}).then((e=>({count:e.data.count,extent:g.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,_.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:r},{executeRelationshipQuery:a}]=await(0,u.Hl)(Promise.all([s.e(5935).then(s.bind(s,75935)),s.e(1073).then(s.bind(s,81073))]),t);return e=r.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:r},{executeRelationshipQueryForCount:a}]=await(0,u.Hl)(Promise.all([s.e(5935).then(s.bind(s,75935)),s.e(1073).then(s.bind(s,81073))]),t);return e=r.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:r,fetchAttachments:a,processAttachmentQueryResult:o}=await(0,u.Hl)(s.e(540).then(s.bind(s,30540)),t),n=(0,h.en)(this.url);return o(n,await(this.queryAttachmentsSupported?r(n,e,t):a(n,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:r}=await(0,u.Hl)(s.e(1158).then(s.bind(s,71158)),t);return r(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:r}=await(0,u.Hl)(s.e(3992).then(s.bind(s,33992)),t);return r(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:r}=await(0,u.Hl)(s.e(1790).then(s.bind(s,21790)),t);return r(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:r}=await(0,u.Hl)(s.e(4371).then(s.bind(s,14371)),t);return r(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);if(t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?p.n.from(e.dynamicDataSource):this.dynamicDataSource),(0,i.pC)(this.infoFor3D)&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;for(const e of this.infoFor3D.queryFormats){if("3D_glb"===e){t.formatOf3DObjects=e;break}"3D_gltf"!==e||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new o.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if((0,i.Wi)(t.outFields)||!t.outFields.includes("*")){t=t===e?t.clone():t,(0,i.Wi)(t.outFields)&&(t.outFields=[]);const{originX:s,originY:r,originZ:a,translationX:o,translationY:n,translationZ:u,scaleX:l,scaleY:d,scaleZ:c,rotationX:p,rotationY:h,rotationZ:y,rotationDeg:f}=this.infoFor3D.transformFieldRoles;t.outFields.push(s,r,a,o,n,u,l,d,c,p,h,y,f)}}return t}_normalizeFields(e){if((0,i.pC)(this.fieldsIndex)&&(0,i.pC)(e))for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return(0,i.pC)(this.infoFor3D)&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,r._)([(0,d.Cb)({type:p.n})],v.prototype,"dynamicDataSource",void 0),(0,r._)([(0,d.Cb)()],v.prototype,"fieldsIndex",void 0),(0,r._)([(0,d.Cb)()],v.prototype,"gdbVersion",void 0),(0,r._)([(0,d.Cb)()],v.prototype,"infoFor3D",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,d.Cb)()],v.prototype,"pbfSupported",void 0),(0,r._)([(0,d.Cb)()],v.prototype,"queryAttachmentsSupported",void 0),(0,r._)([(0,d.Cb)()],v.prototype,"sourceSpatialReference",void 0),(0,r._)([(0,d.Cb)({type:String})],v.prototype,"url",void 0),v=(0,r._)([(0,c.j)("esri.tasks.QueryTask")],v);const A=v},25278:(e,t,s)=>{s.d(t,{Dm:()=>d,Hq:()=>c,MS:()=>p,bU:()=>i});var r=s(80442),a=s(22974),o=s(61159),n=s(58333);function i(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?n.I4:"esriGeometryPolyline"===e?n.ET:n.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,r.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this.${t} = null;`;for(const t in e)s+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new r}catch(s){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},41818:(e,t,s)=>{s.d(t,{P:()=>n});var r=s(11282),a=s(34599),o=s(14165);async function n(e,t,s){const n=(0,r.en)(e);return(0,a.hH)(n,o.Z.from(t),{...s}).then((e=>e.data.count))}},5396:(e,t,s)=>{s.d(t,{G:()=>n});var r=s(11282),a=s(34599),o=s(14165);async function n(e,t,s){const n=(0,r.en)(e);return(0,a.Ev)(n,o.Z.from(t),{...s}).then((e=>e.data.objectIds))}},4967:(e,t,s)=>{s.d(t,{F:()=>u,e:()=>i});var r=s(11282),a=s(34599),o=s(74889),n=s(14165);async function i(e,t,s){const r=await u(e,t,s);return o.Z.fromJSON(r)}async function u(e,t,s){const o=(0,r.en)(e),i={...s},u=n.Z.from(t),{data:l}=await(0,a.JT)(o,u,u.sourceSpatialReference,i);return l}},59431:(e,t,s)=>{s.d(t,{P:()=>i});var r=s(70586),a=s(67900),o=s(8744);function n(e,t,s){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=s)}function i(e,t,s){if(!e&&!t||!s)return;const r=(0,a._R)(s);u(e,s,r),u(t,s,r)}function u(e,t,s){if(e)for(const r of e)l(r.geometry,t,s)}function l(e,t,s){if((0,r.Wi)(e)||!e.spatialReference||(0,o.fS)(e.spatialReference,t))return;const i=(0,a._R)(e.spatialReference)/s;if(1!==i)if("x"in e)null!=e.z&&(e.z*=i);else if("rings"in e)n(e,e.rings,i);else if("paths"in e)n(e,e.paths,i);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=i)}},28694:(e,t,s)=>{s.d(t,{p:()=>o});var r=s(70586),a=s(69285);function o(e,t,s){if(!s||!s.features||!s.hasZ)return;const o=(0,a.k)(s.geometryType,t,e.outSpatialReference);if(!(0,r.Wi)(o))for(const e of s.features)o(e.geometry)}},74889:(e,t,s)=>{s.d(t,{Z:()=>R});var r,a=s(43697),o=s(66577),n=s(38171),i=s(35454),u=s(96674),l=s(22974),d=s(70586),c=s(5600),p=(s(75215),s(71715)),h=s(52011),y=s(30556),f=s(82971),m=s(33955),g=s(1231);const _=new i.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=r=class extends u.wq{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 s=f.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const a=e[t],o=n.Z.fromJSON(a),i=a.geometry&&a.geometry.spatialReference;(0,d.pC)(o.geometry)&&!i&&(o.geometry.spatialReference=s);const u=a.aggregateGeometries,l=o.aggregateGeometries;if(u&&(0,d.pC)(l))for(const e in l){const t=l[e],r=u[e]?.spatialReference;(0,d.pC)(t)&&!r&&(t.spatialReference=s)}r.push(o)}return r}writeGeometryType(e,t,s,r){if(e)return void _.write(e,t,s,r);const{features:a}=this;if(a)for(const e of a)if(e&&(0,d.pC)(e.geometry))return void _.write(e.geometry.type,t,s,r)}readQueryGeometry(e,t){if(!e)return null;const s=!!e.spatialReference,r=(0,m.im)(e);return r&&!s&&t.spatialReference&&(r.spatialReference=f.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:s}=this;if(s)for(const e of s)if(e&&(0,d.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,l.d9)({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 s=0;s<t.features.length;s++){const r=t.features[s];if(r.geometry){const t=e&&e[s];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,s],translate:[r,a]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((a-e)/s)));for(let e=0,t=o.length;e<t;e++)n?.((0,d.Wg)(o[e].geometry))||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:s}=this;if(!s)return this;const{translate:[r,a],scale:[o,n]}=s,i=this._getHydrationFunction(e,(e=>e*o+r),(e=>a-e*n));for(const{geometry:e}of t)(0,d.pC)(e)&&i&&i(e);return this.transform=null,this}_quantizePoints(e,t,s){let r,a;const o=[];for(let n=0,i=e.length;n<i;n++){const i=e[n];if(n>0){const e=t(i[0]),n=s(i[1]);e===r&&n===a||(o.push([e-r,n-a]),r=e,a=n)}else r=t(i[0]),a=s(i[1]),o.push([r,a])}return o.length>0?o:null}_getQuantizationFunction(e,t,s){return"point"===e?e=>(e.x=t(e.x),e.y=s(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,m.oU)(e)?e.rings:e.paths,a=[];for(let e=0,o=r.length;e<o;e++){const o=r[e],n=this._quantizePoints(o,t,s);n&&a.push(n)}return a.length>0?((0,m.oU)(e)?e.rings=a:e.paths=a,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,s);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,s){return"point"===e?e=>{e.x=t(e.x),e.y=s(e.y)}:"polyline"===e||"polygon"===e?e=>{const r=(0,m.oU)(e)?e.rings:e.paths;let a,o;for(let e=0,n=r.length;e<n;e++){const n=r[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(a+=r[0],o+=r[1]):(a=r[0],o=r[1]),r[0]=t(a),r[1]=s(o)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=s(e.ymin),e.xmax=t(e.xmax),e.ymax=s(e.ymax)}:"multipoint"===e?e=>{const r=e.points;let a,o;for(let e=0,n=r.length;e<n;e++){const n=r[e];e>0?(a+=n[0],o+=n[1]):(a=n[0],o=n[1]),n[0]=t(a),n[1]=s(o)}}:null}};(0,a._)([(0,c.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,a._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,a._)([(0,c.Cb)({type:[n.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,a._)([(0,p.r)("features")],b.prototype,"readFeatures",null),(0,a._)([(0,c.Cb)({type:[g.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,a._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:_.read}}})],b.prototype,"geometryType",void 0),(0,a._)([(0,y.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,a._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,a._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,a._)([(0,c.Cb)({types:o.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,a._)([(0,p.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,a._)([(0,c.Cb)({type:f.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,a._)([(0,y.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,a._)([(0,c.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=r=(0,a._)([(0,h.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const R=b}}]);