@arcgis/core 4.27.0-rc.2 → 4.27.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
- package/assets/esri/core/workers/chunks/09e677ca7532a281d262.js +1 -0
- package/assets/esri/core/workers/chunks/0f7ddb063ee0664f2fca.js +1 -0
- package/assets/esri/core/workers/chunks/17ab08f60764244b2cf8.js +1 -0
- package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
- package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
- package/assets/esri/core/workers/chunks/{2446e336b1f7256d4fde.js → 2c587ed66e2586cccb8d.js} +1 -1
- package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
- package/assets/esri/core/workers/chunks/{00c7b9fb375c9a934158.js → 38c6452dc9cf18e8bca8.js} +1 -1
- package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
- package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
- package/assets/esri/core/workers/chunks/{16db0bc87d87a7313dc4.js → 4806df402845c717c842.js} +1 -1
- package/assets/esri/core/workers/chunks/4884432d80e9af947449.js +1 -0
- package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
- package/assets/esri/core/workers/chunks/588cd91d08cec5207be1.js +1 -0
- package/assets/esri/core/workers/chunks/{83e3d104886b48f00397.js → 633c00c02a81397fc8df.js} +1 -1
- package/assets/esri/core/workers/chunks/{efb96aefe979a0f5c632.js → 640e8ac3498be30c6614.js} +1 -1
- package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
- package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{33901eb1574e46abd9af.js → 6c213768715c52625855.js} +1 -1
- package/assets/esri/core/workers/chunks/{5e6471dd2a08e66b47d0.js → 6e4940fe3bba014c921b.js} +57 -58
- package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 6f724f75f85dc3989d60.js} +1 -1
- package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
- package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
- package/assets/esri/core/workers/chunks/8b05fb365336cc42fecc.js +1 -0
- package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
- package/assets/esri/core/workers/chunks/8eec6da5e862cc33ea2b.js +1 -0
- package/assets/esri/core/workers/chunks/90d8f297d9cb359e071d.js +1 -0
- package/assets/esri/core/workers/chunks/91785144901dfe56c5e2.js +1 -0
- package/assets/esri/core/workers/chunks/{471f6eba213412b82840.js → 927417abea79c955b216.js} +1 -1
- package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
- package/assets/esri/core/workers/chunks/{adaa9d4239f4e905d011.js → 9d4bd73dd50400e9d328.js} +1 -1
- package/assets/esri/core/workers/chunks/a324cc07d486061d0d8e.js +1 -0
- package/assets/esri/core/workers/chunks/a40130579791293cefa2.js +1 -0
- package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → a49718c74053314ed741.js} +1 -1
- package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
- package/assets/esri/core/workers/chunks/ad2891985e0fe45aa8d2.js +1 -0
- package/assets/esri/core/workers/chunks/afcba35eea836aea98ca.js +1 -0
- package/assets/esri/core/workers/chunks/b3d2e397ea74ebef4423.js +1 -0
- package/assets/esri/core/workers/chunks/b5fb9da45cc9dee286f8.js +1 -0
- package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
- package/assets/esri/core/workers/chunks/b846d4215210aac9f6ef.js +1 -0
- package/assets/esri/core/workers/chunks/c7dc821db8c14fec24a7.js +1 -0
- package/assets/esri/core/workers/chunks/c9df9a0a4a45f9a53ce9.js +1 -0
- package/assets/esri/core/workers/chunks/{45a4041881e6235d73a2.js → d0a9711f48dfa5fee68a.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f69fb9687de9ebfcf90.js → d4ba894a2583f3930a4f.js} +1 -1
- package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
- package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
- package/assets/esri/core/workers/chunks/e23ec4f867c4735eec20.js +1 -0
- package/assets/esri/core/workers/chunks/ea16230a0edfc9f756bd.js +1 -0
- package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
- package/assets/esri/core/workers/chunks/ef900614353505afb210.js +1 -0
- package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
- package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
- package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
- package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
- package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
- package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -0
- package/assets/esri/themes/base/_View.scss +2 -5
- package/assets/esri/themes/base/widgets/_Feature.scss +12 -4
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +19 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/DefaultMaterial.glsl.js +42 -42
- package/chunks/Terrain.glsl.js +7 -7
- package/copyright.txt +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/meshUtils/bounds.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/interfaces.d.ts +87 -3
- package/kernel.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
- package/layers/graphics/sources/support/uploadAssets.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/bestImageUtils.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/editableLayers.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +5 -0
- package/layers/video/VideoController.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/renderers/support/colorRampUtils.js +1 -1
- package/request.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/smartMapping/labels/bins.js +5 -0
- package/smartMapping/labels/clusters.js +1 -1
- package/smartMapping/labels/support/utils.js +5 -0
- package/smartMapping/support/binningUtils.js +1 -1
- package/support/requestUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +5 -0
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -20
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/ui/DefaultUI.js +1 -1
- package/views/ui/UI.js +1 -1
- package/webmap/initialViewPropertiesUtils.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +4 -0
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0610691a0c0d9fbbd6d2.js +0 -1
- package/assets/esri/core/workers/chunks/0618fb0058f39ecd363f.js +0 -1
- package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
- package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
- package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
- package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +0 -1
- package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
- package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
- package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
- package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +0 -1
- package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
- package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +0 -1
- package/assets/esri/core/workers/chunks/6f510f28526c73ab453c.js +0 -1
- package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +0 -1
- package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
- package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
- package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
- package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
- package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
- package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +0 -1
- package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
- package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +0 -1
- package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
- package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
- package/assets/esri/core/workers/chunks/c96db6b7ce47bd343fdb.js +0 -1
- package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
- package/assets/esri/core/workers/chunks/d95ca50ca7af4c222036.js +0 -1
- package/assets/esri/core/workers/chunks/da57eba2fe25495ea217.js +0 -1
- package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +0 -1
- package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
- package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
- package/assets/esri/core/workers/chunks/f720967ba8c5486a26a2.js +0 -1
- package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.js +0 -1
- package/layers/orientedImagery/core/Affixes.js +0 -5
- package/layers/orientedImagery/core/CameraProperties.js +0 -5
- package/layers/orientedImagery/core/ImageProperties.js +0 -5
- package/layers/orientedImagery/core/ImageryTypes.js +0 -5
- package/layers/orientedImagery/core/imageryUtils.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5235],{15235:(e,t,i)=>{i.r(t),i.d(t,{default:()=>O});var r=i(43697),o=i(99880),a=i(40330),s=i(20102),n=i(96674),l=i(22974),p=i(83379),c=i(70586),d=i(81271),u=i(5600),h=i(75215),m=i(71715),g=i(52011),y=i(6570),b=i(48522),v=i(92036),w=i(92604),f=i(90578);i(67676),i(80442);let k=class extends v.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){null!=e&&(0,d.YP)(e)?w.Z.getLogger(this).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get cdnUrl(){return this.portalItem&&this.path?`${this.portalItem.itemCdnUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const i=this.cdnUrl;if(null==i)throw new s.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal.request(i,{responseType:e,query:{token:this.portalItem.apiKey},signal:t?.signal})}async update(e,t){const{addOrUpdateResource:r}=await i.e(7873).then(i.bind(i,97873));return r(this,"update",e,t)}hasPath(){return null!=this.path}_normalizePath(e,t){return null==e?e:(e=e.replace(/^\/+/,""),null!=t&&(0,d.YP)(e)&&(e=(0,d.PF)(e,t.itemUrl)),e?.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,r._)([(0,u.Cb)()],k.prototype,"portalItem",void 0),(0,r._)([(0,u.Cb)({type:String,value:null})],k.prototype,"path",null),(0,r._)([(0,f.p)("path")],k.prototype,"_castPath",null),(0,r._)([(0,u.Cb)({type:String,readOnly:!0})],k.prototype,"url",null),(0,r._)([(0,u.Cb)({type:String,readOnly:!0})],k.prototype,"cdnUrl",null),(0,r._)([(0,u.Cb)({type:String,readOnly:!0})],k.prototype,"itemRelativeUrl",null),k=(0,r._)([(0,g.j)("esri.portal.PortalItemResource")],k);const C=k;let S=class extends v.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,r._)([(0,u.Cb)()],S.prototype,"created",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"rating",void 0),S=(0,r._)([(0,g.j)("esri.portal.PortalRating")],S);const _=S;var I;const x=new Set(["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","GeoJson","CSV","KML","WFS","WMTS","WMS","Feed"]),U=new Set(["KML","GeoJson","CSV"]);let R=I=class extends((0,n.eC)(p.Z)){static from(e){return(0,h.TJ)(I,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geocoding Service"===e?i="Locator":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e&&e.toLowerCase().includes("add in")?i=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e&&(i="Insights Report"),i}readExtent(e){return e&&e.length?new y.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",t=this.typeKeywords||[];let i,r=!1,a=!1,s=!1,n=!1,l=!1,p=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(r=t.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(a=t.includes("Table"),s=t.includes("Route Layer"),n=t.includes("Markup"),l=t.includes("Spatiotemporal"),p=t.includes("UtilityNetwork"),i=l&&a?"spatiotemporaltable":a?"table":s?"routelayer":n?"markup":l?"spatiotemporal":r?"featureshosted":p?"utilitynetwork":"features"):i="map service"===e||"wms"===e||"wmts"===e?r||t.includes("Tiled")||"wmts"===e?"maptiles":"mapimages":"scene service"===e?t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"video service"===e?"mediaservice":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e?t.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"layers"):i="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&t.includes("configurableApp")?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.includes("ArcGIS Pro")||"explorer map"===e&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"360 vr experience"===e?"360vr":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&t.includes("Explorer Mapping Application")||t.includes("Document")?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"hub project"===e?"hubproject":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"pro report template"===e?"proreporttemplate":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"experience builder widget"===e?"experiencebuilderwidget":"experience builder widget package"===e?"experiencebuilderwidgetpackage":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"notebook code snippets"===e||"notebook code snippet library"===e?"notebookcodesnippets":"suitability model"===e?"suitabilitymodel":"esri classifier definition"===e?"classifierdefinition":"esri classification schema"===e?"classificationschema":"insights data engineering workbook"===e?"dataengineeringworkbook":"insights data engineering model"===e?"dataengineeringmodel":"deep learning studio project"===e?"deeplearningproject":"discussion"===e?"discussion":"allsource project"===e?"allsourceproject":"api key"===e?"apikey":"data pipeline"===e?"datapipelines":"maps",i?(0,o.V)("esri/images/portal/"+i+"16.png"):null}get isLayer(){return null!=this.type&&x.has(this.type)}get itemCdnUrl(){let e=this.itemUrl;return e&&a.id&&!a.id.findCredential(e)&&(e=a.id._normalizeAGOLorgDomain(e),e=e.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),e=e.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),e=e.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),e}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){const t=this.portal??(this.portal=b.Z.getDefault()),i=t.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}};return e instanceof _&&(e=e.rating),null==e||isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new _({rating:e,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,l.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,l.d9)(this.categories),created:(0,l.d9)(this.created),culture:this.culture,description:this.description,extent:(0,l.d9)(this.extent),groupCategories:(0,l.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,l.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,l.d9)(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,l.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,l.d9)(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new I({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");const{extent:t}=e;return t&&(e.extent=JSON.stringify(t)),e}async deleteRating(){await(0,c.s3)(this.portal).request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return(0,c.s3)(this.portal).request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await(0,c.s3)(this.portal).request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new _(t)):null}fetchRelatedItems(e,t){return(0,c.s3)(this.portal).requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},I)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return(0,c.s3)(this.portal).request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>(0,c.s3)(this.portal).signIn())).then((()=>{const t=e&&e.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new s.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new s.Z("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:i}=this;await(0,c.s3)(t).signIn();const{copyResources:r,folder:o,tags:a,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===r,folder:"string"==typeof o?o:o?.id,includeResources:!!r,tags:a?.join(","),title:n}},{itemId:p}=await t.request(`${i}/copy`,l);return new I({id:p,portal:t})}updateThumbnail(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)(0,d.HK)(t)?r.query={data:t}:r.query={url:(0,d.hF)(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new s.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:r}=await i.e(7873).then(i.bind(i,97873));return r(this,e,t)}async addResource(e,t,r){const{addOrUpdateResource:o}=await i.e(7873).then(i.bind(i,97873));return e.portalItem=this,o(e,"add",t,r)}async removeResource(e,t){const{removeResource:r}=await i.e(7873).then(i.bind(i,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new s.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await i.e(7873).then(i.bind(i,97873));return t(this,e)}resourceFromPath(e){return new C({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:(0,l.d9)(this.categories),created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,l.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,l.d9)(this.typeKeywords),url:this.url};return(0,l.yd)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new I({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,r._)([(0,u.Cb)({type:["private","shared","org","public"]})],R.prototype,"access",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"accessInformation",void 0),(0,r._)([(0,u.Cb)({type:String})],R.prototype,"apiKey",void 0),(0,r._)([(0,u.Cb)({json:{read:{source:"appProxies"}}})],R.prototype,"applicationProxies",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"avgRating",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"categories",void 0),(0,r._)([(0,u.Cb)({type:Date})],R.prototype,"created",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"culture",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"description",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"displayName",null),(0,r._)([(0,u.Cb)({type:y.Z})],R.prototype,"extent",void 0),(0,r._)([(0,m.r)("extent")],R.prototype,"readExtent",null),(0,r._)([(0,u.Cb)()],R.prototype,"groupCategories",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"iconUrl",null),(0,r._)([(0,u.Cb)()],R.prototype,"id",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"isLayer",null),(0,r._)([(0,u.Cb)({type:Boolean,readOnly:!0})],R.prototype,"isOrgItem",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"itemControl",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"itemPageUrl",null),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"itemUrl",null),(0,r._)([(0,u.Cb)()],R.prototype,"licenseInfo",void 0),(0,r._)([(0,u.Cb)({type:Date})],R.prototype,"modified",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"name",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"numComments",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"numRatings",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"numViews",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"owner",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"ownerFolder",void 0),(0,r._)([(0,u.Cb)({type:b.Z})],R.prototype,"portal",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"screenshots",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"size",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"snippet",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"sourceJSON",void 0),(0,r._)([(0,u.Cb)({type:String})],R.prototype,"sourceUrl",void 0),(0,r._)([(0,u.Cb)({type:String})],R.prototype,"spatialReference",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"tags",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"thumbnail",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"thumbnailUrl",null),(0,r._)([(0,u.Cb)()],R.prototype,"title",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"type",void 0),(0,r._)([(0,u.Cb)()],R.prototype,"typeKeywords",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read(e,t){if(U.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],R.prototype,"url",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],R.prototype,"userItemUrl",null),R=I=(0,r._)([(0,g.j)("esri.portal.PortalItem")],R);const O=R}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4608],{28924:(e,t,r)=>{r.d(t,{Z:()=>i});class i{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,r){this._layerById[t]=r,this._layerByName[e]=r}async featureSetByName(e,t=!0,r=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,r=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}},67651:(e,t,r)=>{r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>ie,constructFeatureSet:()=>te,constructFeatureSetFromPortalItem:()=>de,constructFeatureSetFromRelationship:()=>se,constructFeatureSetFromUrl:()=>ee,convertToFeatureSet:()=>ue,createFeatureSetCollectionFromMap:()=>le,createFeatureSetCollectionFromService:()=>oe,initialiseMetaDataCache:()=>X});var i=r(3172),s=r(28924),n=r(61363),a=r(84328),l=r(38171),o=r(70409),u=r(85065),d=r(91136),c=r(90961),h=r(3823),f=r(90658),p=r(36515),y=r(95002),_=r(59987),g=r(41534);class m{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new m;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,r){const i=new m;i.field=e;const s=g.WhereClause.create(t,r),n=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new _.eS(_.f.MissingStatisticParameters);const t=g.WhereClause.create((0,p.XF)(e.parseTree.args.value[0],f.Bj.Standardised,e.parameters),e.fieldsIndex);return{name:e.parseTree.name,expr:t}}return null}(s);if(null===n)throw new _.eS(_.f.UnsupportedSqlFunction,{function:""});const a=n.name.toUpperCase().trim();if("MIN"===a){if(i.typeofstat="MIN",i.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"min"})}else if("MAX"===a){if(i.typeofstat="MAX",i.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"max"})}else if("COUNT"===a)i.typeofstat="COUNT",i.workingexpr=n.expr;else if("STDEV"===a){if(i.typeofstat="STDDEV",i.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"stdev"})}else if("SUM"===a){if(i.typeofstat="SUM",i.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"sum"})}else if("MEAN"===a){if(i.typeofstat="AVG",i.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:a})}else if("AVG"===a){if(i.typeofstat="AVG",i.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"avg"})}else{if("VAR"!==a)throw new _.eS(_.f.UnsupportedSqlFunction,{function:a});if(i.typeofstat="VAR",i.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"var"})}return i}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var w=r(44543),b=r(82971),S=r(1231),F=r(99514);function I(e){if(!e)return"COUNT";switch(e.toLowerCase()){case"max":return"MAX";case"var":case"variance":return"VAR";case"avg":case"average":case"mean":return"AVG";case"min":return"MIN";case"sum":return"SUM";case"stdev":case"stddev":return"STDDEV";case"count":return"COUNT"}return"COUNT"}class v extends d.Z{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return f.dj.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,r=1;const i=this._parent?this._parent.getFieldsIndex():new F.Z([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+r.toString(),r++)}for(const e of this._config.statsfields){const t=new m;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,i),t.typeofstat=I(e.statistic),this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,i)};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null}else this.geometryType=f.Qk.point,this.typeIdField="",this.types=null,this.spatialReference=new b.Z({wkid:4326});this.fields=[];const s=new m;s.field=this._nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=g.WhereClause.create(this._parent.objectIdField,this._parent.getFieldsIndex()),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const r=new S.Z;if(t.name=this._nextUniqueName(e),r.name=t.tofieldname,r.alias=r.name,(0,p.y5)(t.expression)){const e=this._parent.getField((0,p.zR)(t.expression,f.Bj.Standardised));if(!e)throw new _.EN(_.H9.AggregationFieldNotFound);t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),r.type=e.type}else{r.type=this._convertToEsriFieldType((0,p.DT)(t.expression,this._parent.fields));const e=new S.Z;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new o.yN(e,t.expression)),this._candosimplegroupby=!1}this.fields.push(r)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new o.$X(e));for(let t=0;t<this._decodedStatsfield.length;t++){const r=new S.Z;let i=null;const s=this._decodedStatsfield[t];s.field=this._nextUniqueName(e),s.tofieldname===this.objectIdField&&(this._internalObjectIdField=s.field),r.name=s.tofieldname,r.alias=r.name;const n=null!==s.workingexpr&&(0,p.y5)(s.workingexpr)?(0,p.zR)(s.workingexpr,f.Bj.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(i=this._parent.getField(n),!i)throw new _.EN(_.H9.AggregationFieldNotFound);r.type=i.type}else r.type="double";break;case"MIN":case"MAX":if(""!==n){if(i=this._parent.getField(n),!i)throw new _.EN(_.H9.AggregationFieldNotFound);r.type=i.type}else r.type="double";break;case"COUNT":r.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(i=this._parent.getField(n),!i))throw new _.EN(_.H9.AggregationFieldNotFound);r.type="double"}this.fields.push(r)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,r,i){-1!==t&&this._featureCache[t];const s=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,s)?(await this._expandPagedSet(e,s,0,0,i),this._getFeatures(e,t,r,i)):"success"}async _getFilteredSet(e,t,r,i,s){if(""!==e)return new c.Z([],[],!0,null);let n=null;const l={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==r)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,p.hq)(r,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,r=null;break}if(null!==i){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===i.scanForField(this._decodedStatsfield[e].tofieldname)){i=null,l.ordered=!1;break}if(null!==i)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===i.scanForField(e.tofieldname)){i=null,l.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;r&&(e=this._reformulateWhereClauseWithoutGroupByFields(r));let t=null;i&&(t=this._reformulateOrderClauseWithoutGroupByFields(i));const a=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(s),n=!0===l.nowhereclause?new c.Z(a._candidates.slice(0).concat(a._known.slice(0)),[],!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)):new c.Z(a._candidates.slice(0),a._known.slice(0),!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)),n}let d=this._parent;if(this._adaptedFields.length>0&&(d=new o.Xx({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new u.Z({parentfeatureset:d,orderbyclause:new h.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=d;if(null!==r){let t=null;r&&(t=this._reformulateWhereClauseWithoutGroupByFields(r)),e=new a.Z({parentfeatureset:e,whereclause:t})}n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new u.Z({parentfeatureset:e,orderbyclause:new h.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,p.bB)(e,t.tofieldname,(0,p.zR)(t.workingexpr,f.Bj.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,p.bB)(e,t.tofieldname,(0,p.zR)(t.expression,f.Bj.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,r){return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?(await this._expandPagedSet(e,this._maxQuery,0,0,r),this._refineSetBlock(e,t,r)):(this._checkCancelled(r),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,e)}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}async _getPhysicalPage(e,t,r){if(!0===e.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,r,[]);const i=await this._getAgregagtePhysicalPage(e,t,r);for(const e of i){const t={geometry:e.geometry,attributes:{}},r={};for(const t in e.attributes)r[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=r[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=r[e.field.toLowerCase()];this._featureCache[t.attributes[this.objectIdField]]=new l.Z(t)}return i.length}_sequentialGetPhysicalItem(e,t,r,i){return new Promise(((s,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(r)),!0===e.pagesDefinition.internal.fullyResolved||0===t?s(i.length):this._nextAggregateItem(e,t,r,i,(n=>{null===n?s(i.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,r,i)))}),n)}))}_nextAggregateItem(e,t,r,i,s,a){try{(0,n.$)(e.pagesDefinition.internal.iterator.next()).then((n=>{if(null===n)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);i.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,s(null)}else e.pagesDefinition.internal.fullyResolved=!0,s(null);else{const l=this._generateAggregateHash(n);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[n],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const r=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return i.push(r),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(r.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[n],id:l},void s(r)}e.pagesDefinition.internal.workingItem.features.push(n)}this._nextAggregateItem(e,t,r,i,s,a)}}),a)}catch(e){a(e)}}_calculateFieldStat(e,t,r){const i=[];for(let r=0;r<e.features.length;r++)if(null!==t.workingexpr){const s=t.workingexpr.calculateValue(e.features[r]);null!==s&&i.push(s)}else i.push(null);switch(t.typeofstat){case"MIN":r.attributes[t.tofieldname]=(0,y.tj)("min",i,-1);break;case"MAX":r.attributes[t.tofieldname]=(0,y.tj)("max",i,-1);break;case"SUM":r.attributes[t.tofieldname]=(0,y.tj)("sum",i,-1);break;case"COUNT":r.attributes[t.tofieldname]=i.length;break;case"VAR":r.attributes[t.tofieldname]=(0,y.tj)("var",i,-1);break;case"STDDEV":r.attributes[t.tofieldname]=(0,y.tj)("stddev",i,-1);break;case"AVG":r.attributes[t.tofieldname]=(0,y.tj)("avg",i,-1)}return!0}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const r of this._decodedGroupbyfield){const i=r.singlefield?e.features[0].attributes[r.singlefield]:r.expression.calculateValue(e.features[0]);t.attributes[r.tofieldname]=i}for(const r of this._decodedStatsfield)this._calculateFieldStat(e,r,t);const r=[];for(let i=0;i<this._decodedStatsfield.length;i++)r.push(this._calculateFieldStat(e,this._decodedStatsfield[i],t));return this._featureCache[t.attributes[this.objectIdField]]=new l.Z({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const r of this._decodedGroupbyfield){const i=r.singlefield?e.attributes[r.singlefield]:r.expression.calculateValue(e);t+=null==i?":":":"+i.toString()}return(0,w.F)(t,w.M.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){d.Z._featuresetFunctions.groupby=function(e,t){return new v({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var C=r(53073),R=r(63991),D=r(80692),T=r(40330),x=r(33955),k=r(19238),N=r(20102),E=r(80442),P=r(95330),O=r(2981),L=r(10158),A=r(4967),j=r(53261),Z=r(74889),G=r(14165);function q(e,t){return null!=t&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}r(68773),r(67676),r(81271),r(98326),r(56545);var B=r(41818),M=(r(66577),r(16306),r(45091),r(67900),r(8744),r(5396)),U=(r(98732),r(75935)),W=(r(28141),r(58539)),z=r(33586),Q=r(30359);class V extends d.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._cachedDateMetaData={},e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,f.hd)(e.toJSON());return(0,w.F)(t,w.M.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=f.Bj.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=f.Bj.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=f.Bj.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=f.Bj.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._layer instanceof Q.default?(this.typeIdField=this._layer.subtypeField??"",this.types=this._layer.subtypes):(this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types)}_isInFeatureSet(){return f.dj.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new G.Z;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}pbfSupportedForQuery(e){const t=this._layer?.capabilities?.query;return!e.outStatistics&&!0===t?.supportsFormatPBF&&!0===t?.supportsQuantizationEditMode}async queryPBF(e){return e.quantizationParameters={mode:"edit"},(await async function(e,t,i,s){return async function(e,t,i,s){const n=i?.infoFor3D;if(!(q(e,n)&&null!=n&&t.assetMaps&&t.features&&t.features.length))return Z.Z.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,P.Hl)(Promise.all([r.e(6481),r.e(6459),r.e(1681)]).then(r.bind(r,91681)),s);return a(e,n,t)}(t,await async function(e,t,r,i){const s={...i},n=function(e,t){let r=G.Z.from(e);r.sourceSpatialReference=r.sourceSpatialReference??t?.sourceSpatialReference??null,(t?.gdbVersion||t?.dynamicDataSource)&&(r=r===e?r.clone():r,r.gdbVersion=e.gdbVersion||t.gdbVersion,r.dynamicDataSource=e.dynamicDataSource?L.n.from(e.dynamicDataSource):t.dynamicDataSource);const i=t?.infoFor3D;if(null!=i&&q(e,i)){r=r===e?r.clone():r,r.formatOf3DObjects=null;const{supportedFormats:t,queryFormats:s}=i,n=(0,O.S0)("model/gltf-binary",t)??(0,O.Ow)("glb",t),a=(0,O.S0)("model/gltf+json",t)??(0,O.Ow)("gtlf",t);for(const e of s){if(e===n){r.formatOf3DObjects=e;break}e!==a||r.formatOf3DObjects||(r.formatOf3DObjects=e)}if(!r.formatOf3DObjects)throw new N.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(null==r.outFields||!r.outFields.includes("*")){r=r===e?r.clone():r,null==r.outFields&&(r.outFields=[]);const{originX:t,originY:s,originZ:n,translationX:a,translationY:l,translationZ:o,scaleX:u,scaleY:d,scaleZ:c,rotationX:h,rotationY:f,rotationZ:p,rotationDeg:y}=i.transformFieldRoles;r.outFields.push(t,s,n,a,l,o,u,d,c,h,f,p,y)}}return r}(t,r),a=null!=t.outStatistics?.[0],l=(0,E.Z)("featurelayer-pbf-statistics"),o=!a||l;let u;if("pbf"===r?.format&&o)try{u=await(0,j.t)(e,n,s)}catch(e){if("query:parsing-pbf"!==e.name)throw e;r.format="json"}return"json"!==r?.format&&o||(u=await(0,A.F)(e,n,s)),function(e,t){if(null!=e&&null!=t)for(const r of t){const t=e.get(r.name);t&&Object.assign(r,t.toJSON())}}(r?.fieldsIndex,u.fields),u}(e,t,i,s),i,s)}(this._layer.parsedUrl,e,{format:"pbf"},{})).unquantize()}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}executeQuery(e,t){e.returnZ=this.hasZ,e.returnM=this.hasM;const r="execute"===t?A.e:"executeForCount"===t?B.P:M.G,i="execute"===t&&this.pbfSupportedForQuery(e);let s=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);s=this.recentlyUsedQueries.getFromCache(t),null===s&&(s=!0!==i?r(this._layer.parsedUrl.path,e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(t,s),s=s.catch((e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===s&&(s=!0!==i?r(this._layer.parsedUrl.path,e):this.queryPBF(e)),s}async _getFilteredSet(e,t,r,i,s){const n=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,r,i,s);let a="",l=!1;null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=i.constructClause(),l=!0);const o=new G.Z;this.datesInUnknownTimezone&&(o.timeReferenceUnknownClient=!0),o.where=null===r?null===t?"1=1":"":(0,p.zR)(r,n),this._requestStandardised&&(o.sqlFormat="standard"),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e);let u=await this.executeQuery(o,"executeForIds");return null===u&&(u=[]),this._checkCancelled(s),new c.Z([],u,l,null)}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}async _getFilteredSetUsingPaging(e,t,r,i,s){let n="",a=!1;null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=i.constructClause(),a=!0);const l=await this.databaseType();let o=null===r?null===t?"1=1":"":(0,p.zR)(r,l);this._layer.definitionExpression&&this._useDefinitionExpression&&(o=""!==o?"(("+this._layer.definitionExpression+") AND ("+o+"))":this._layer.definitionExpression);let u=this._maxQueryRate();const d=this._layer.capabilities?.query.maxRecordCount;null!=d&&d<u&&(u=d);let h=null;if(!0===this._pageJustIds)h=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let r=!0;!0===this._removeGeometry&&(r=!1);const i=this._overrideFields??this._fieldsIncludingObjectId(["*"]);h=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:i.join(","),resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:r,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(h,u,0,1,s),h}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,r){const i=e.pagesDefinition.internal.lastRetrieved,s=i,n=e.pagesDefinition.internal.lastPage,a=new G.Z;this._requestStandardised&&(a.sqlFormat="standard"),this.datesInUnknownTimezone&&(a.timeReferenceUnknownClient=!0),a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields.split(","),a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.geometry=e.pagesDefinition.geometry,a.where=e.pagesDefinition.where,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(r),e.pagesDefinition.internal.lastPage!==n)return"done";const o=this._layer.objectIdField;for(let t=0;t<l.features.length;t++)e.pagesDefinition.internal.set[s+t]=l.features[t].attributes[o];if(!1===this._pageJustIds)for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=i+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}async _getFeatures(e,t,r,i){const s=[];if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,i),this._getFeatures(e,t,r,i);let n=0;for(let i=e._lastFetchedIndex;i<e._known.length;i++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[i]]){let r=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[i]]){const s=t._featureMap[e._known[i]];null!==s&&(r=!0,this._featureCache[e._known[i]]=s)}}if(!1===r&&(e._known[i]!==t&&s.push(e._known[i]),s.length>=this._maxProcessingRate()-1))break}if(n>=r&&0===s.length)break}if(0===s.length)return"success";const a=new G.Z;this._requestStandardised&&(a.sqlFormat="standard"),this.datesInUnknownTimezone&&(a.timeReferenceUnknownClient=!0),a.objectIds=s,a.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),a.returnGeometry=!0,!0===this._removeGeometry&&(a.returnGeometry=!1),a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(i),void 0!==l.error)throw new _.EN(_.H9.RequestFailed,{reason:l.error});const o=this._layer.objectIdField;for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return"success"}async _getDistinctPages(e,t,r,i,s,n,a,l,o){await this._ensureLoaded();const u=await this.databaseType();let d=r.parseTree.column;const c=this._layer.fields??[];for(let e=0;e<c.length;e++)if(c[e].name.toLowerCase()===d.toLowerCase()){d=c[e].name;break}const h=new G.Z;this._requestStandardised&&(h.sqlFormat="standard"),this.datesInUnknownTimezone&&(h.timeReferenceUnknownClient=!0);let f=null===n?null===s?"1=1":"":(0,p.zR)(n,u);this._layer.definitionExpression&&this._useDefinitionExpression&&(f=""!==f?"(("+this._layer.definitionExpression+") AND ("+f+"))":this._layer.definitionExpression),h.where=f,h.spatialRelationship=this._makeRelationshipEnum(i),h.relationParameter=this._makeRelationshipParam(i),h.geometry=null===s?null:s,h.returnDistinctValues=!0,h.returnGeometry=!1,h.outFields=[d];const y=await this.executeQuery(h,"execute");if(this._checkCancelled(o),!y.hasOwnProperty("features"))throw new _.EN(_.H9.InvalidStatResponse);let g=!1;for(let e=0;e<c.length;e++)if(c[e].name===d){"date"===c[e].type&&(g=!0);break}for(let e=0;e<y.features.length;e++){if(g){const t=y.features[e].attributes[d];null!==t?l.push(new Date(t)):l.push(t)}else l.push(y.features[e].attributes[d]);if(l.length>=a)break}return 0===y.features.length?l:y.features.length===this._layer.capabilities?.query.maxRecordCount&&l.length<a?{calculated:!0,result:await this._getDistinctPages(e+y.features.length,t,r,i,s,n,a,l,o)}:l}async _distinctStat(e,t,r,i,s,n,a){return{calculated:!0,result:await this._getDistinctPages(0,e,t,r,i,s,n,[],a)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,r,i){const s=await this.databaseType(),n=new G.Z;if(this._requestStandardised&&(n.sqlFormat="standard"),this.isTable()&&r&&null!==t&&""!==t)return{calculated:!0,result:0};let a=null===i?null===r?"1=1":"":(0,p.zR)(i,s);return this._layer.definitionExpression&&this._useDefinitionExpression&&(a=""!==a?"(("+this._layer.definitionExpression+") AND ("+a+"))":this._layer.definitionExpression),n.where=a,this.datesInUnknownTimezone&&(n.timeReferenceUnknownClient=!0),n.where=a,n.spatialRelationship=this._makeRelationshipEnum(t),n.relationParameter=this._makeRelationshipParam(t),n.geometry=null===r?null:r,n.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(n,"executeForCount")}}async _stats(e,t,r,i,s,n,a){await this._ensureLoaded();const l=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression,o=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics,u=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsDistinct;if("count"===e)return u?this._countstat(e,r,i,s):{calculated:!1};if(!1===o||!1===(0,p.y5)(t)&&!1===l||!1===t.isStandardized)return""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,n,a);if("distinct"===e)return!1===u?""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,r,i,s,n,a);const d=await this.databaseType();if(this.isTable()&&i&&null!==r&&""!==r)return{calculated:!0,result:null};const c=new G.Z;this._requestStandardised&&(c.sqlFormat="standard");let h=null===s?null===i?"1=1":"":(0,p.zR)(s,d);this._layer.definitionExpression&&this._useDefinitionExpression&&(h=""!==h?"(("+this._layer.definitionExpression+") AND ("+h+"))":this._layer.definitionExpression),c.where=h,c.spatialRelationship=this._makeRelationshipEnum(r),c.relationParameter=this._makeRelationshipParam(r),c.geometry=null===i?null:i,this.datesInUnknownTimezone&&(c.timeReferenceUnknownClient=!0);const f=new W.Z;f.statisticType=(0,y.g3)(e),f.onStatisticField=(0,p.zR)(t,d),f.outStatisticFieldName="ARCADE_STAT_RESULT",c.returnGeometry=!1;let g="ARCADE_STAT_RESULT";c.outStatistics=[f];const m=await this.executeQuery(c,"execute");if(!m.hasOwnProperty("features")||0===m.features.length)throw new _.EN(_.H9.InvalidStatResponse);let w=!1;const b=m.fields??[];for(let e=0;e<b.length;e++)if("ARCADE_STAT_RESULT"===b[e].name.toUpperCase()){g=b[e].name,"date"===b[e].type&&(w=!0);break}if(w){let e=m.features[0].attributes[g];return null!==e&&(e=new Date(m.features[0].attributes[g])),{calculated:!0,result:e}}return{calculated:!0,result:m.features[0].attributes[g]}}_stat(e,t,r,i,s,n,a){return this._stats(e,t,r,i,s,n,a)}async _canDoAggregates(e,t){await this._ensureLoaded();let r=!1;const i=this._layer.capabilities?.query,s=!0===i?.supportsSqlExpression;if(null!=i&&!0===i.supportsStatistics&&!0===i.supportsOrderBy&&(r=!0),r)for(let e=0;e<t.length-1;e++)(!1===t[e].workingexpr?.isStandardized||!1===(0,p.y5)(t[e].workingexpr)&&!1===s)&&(r=!1);return!1!==r}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,a){await this._ensureLoaded();const l=await this.databaseType();let o="",u=!1,d=!1;null!==n&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(o=n.constructClause(),d=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(d=!1,u=!0,o=this._layer.objectIdField);const h=[];for(let e=0;e<t.length;e++){const r=new W.Z;r.onStatisticField=null!==t[e].workingexpr?(0,p.zR)(t[e].workingexpr,l):"",r.outStatisticFieldName=t[e].field,r.statisticType=t[e].toStatisticsName(),h.push(r)}""===o&&(o=e.join(","));let f=this._maxQueryRate();const y=this._layer.capabilities?.query.maxRecordCount;null!=y&&y<f&&(f=y);let _=null===s?null===i?"1=1":"":(0,p.zR)(s,l);return this._layer.definitionExpression&&this._useDefinitionExpression&&(_=""!==_?"(("+this._layer.definitionExpression+") AND ("+_+"))":this._layer.definitionExpression),new c.Z([],["GETPAGES"],d,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(r),relationParam:this._makeRelationshipParam(r),outFields:["*"],useOIDpagination:u,generatedOid:a,resultRecordCount:f,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:h,geometry:null===i?null:i,where:_,orderByFields:o,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}async _getAgregagtePhysicalPage(e,t,r){let i=e.pagesDefinition.where;!0===e.pagesDefinition.useOIDpagination&&(i=""!==i?"("+i+") AND ("+e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString()+")":e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString());const s=e.pagesDefinition.internal.lastRetrieved,n=s,a=e.pagesDefinition.internal.lastPage,o=new G.Z;if(this._requestStandardised&&(o.sqlFormat="standard"),o.where=i,o.spatialRelationship=e.pagesDefinition.spatialRel,o.relationParameter=e.pagesDefinition.relationParam,o.outFields=e.pagesDefinition.outFields,o.outStatistics=e.pagesDefinition.outStatistics,o.geometry=e.pagesDefinition.geometry,o.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,o.num=e.pagesDefinition.resultRecordCount,o.start=e.pagesDefinition.internal.lastPage,o.returnGeometry=e.pagesDefinition.returnGeometry,this.datesInUnknownTimezone&&(o.timeReferenceUnknownClient=!0),o.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(r),!u.hasOwnProperty("features"))throw new _.EN(_.H9.InvalidStatResponse);const d=[];if(e.pagesDefinition.internal.lastPage!==a)return[];u.features.length>0&&void 0===u.features[0].attributes[e.pagesDefinition.generatedOid]&&(e.pagesDefinition.generatedOid=e.pagesDefinition.generatedOid.toLowerCase());for(let t=0;t<u.features.length;t++)e.pagesDefinition.internal.set[n+t]=u.features[t].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<u.features.length;e++)d.push(new l.Z({attributes:u.features[e].attributes,geometry:null}));return!0===e.pagesDefinition.useOIDpagination?0===u.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==e.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=s+u.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,d}static create(e,t,r,i,s){const n=new k.default({url:e,outFields:null===t?["*"]:t});return new V({layer:n,spatialReference:r,lrucache:i,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON&&this._layer.source.sourceJSON.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,f.US)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,i,s){const n=this._layer.capabilities;if(n?.data.supportsAttachment&&n?.operations.supportsQueryAttachments){const n={objectIds:[e],returnMetadata:s};(t&&t>0||r&&r>0)&&(n.size=[t&&t>0?t:0,r&&r>0?r:t+1]),i&&i.length>0&&(n.attachmentTypes=i),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:n,method:"attachments"});const a=await this._layer.queryAttachments(n),l=[];return a&&a[e]&&a[e].forEach((t=>{const r=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let i=null;s&&t.exifInfo&&(i=z.Z.convertJsonToArcade(t.exifInfo,"system",!0)),l.push(new D.Z(t.id,t.name,t.contentType,t.size,r,i,t.keywords??null))})),l}return[]}async queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields?.join(","),returnGeometry:e.returnGeometry.toString()};void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds&&e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=JSON.stringify(e.outSpatialReference.toJSON())),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const r=await(0,i.default)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){const e={},t=r.data;if(t&&t.relatedRecordGroups){const r=t.spatialReference;for(const i of t.relatedRecordGroups){const s=i.objectId,n=[];for(const e of i.relatedRecords){e.geometry&&(e.geometry.spatialReference=r);const t=new l.Z({geometry:e.geometry?(0,x.im)(e.geometry):null,attributes:e.attributes});n.push(t)}e[s]={features:n,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new _.EN(_.H9.InvalidRequest)}async getFeatureByObjectId(e,t){const r=new G.Z;r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=this.objectIdField+"="+e.toString(),this.datesInUnknownTimezone&&(r.timeReferenceUnknownClient=!0),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const i=await(0,A.e)(this._layer.parsedUrl.path,r);return 1===i.features.length?i.features[0]:null}async getIdentityUser(){await this.load();const e=T.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=T.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.substring(0,r):t,t){t+="/rest/info";try{const e=await(0,i.default)(t,{query:{f:"json"}});let r="";return e.data&&e.data.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new V({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeReference(){return void 0===this._cachedDateMetaData.preferredTimeReference&&(this._cachedDateMetaData.preferredTimeReference=this._layer?.preferredTimeReference?.toJSON()??null),this._cachedDateMetaData.preferredTimeReference}get dateFieldsTimeReference(){return void 0===this._cachedDateMetaData.dateFieldsTimeReference&&(this._cachedDateMetaData.dateFieldsTimeReference=this._layer?.dateFieldsTimeReference?.toJSON()??null),this._cachedDateMetaData.dateFieldsTimeReference}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone}get editFieldsInfo(){return void 0===this._cachedDateMetaData.editFieldsInfo&&(this._cachedDateMetaData.editFieldsInfo=this._layer?.editFieldsInfo?.toJSON()??null),this._cachedDateMetaData.editFieldsInfo}get timeInfo(){return void 0===this._cachedDateMetaData.timeInfo&&(this._cachedDateMetaData.timeInfo=this._layer?.timeInfo?.toJSON()??null),this._cachedDateMetaData.timeInfo}}var J=r(17805);class H extends d.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(0),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}_isInFeatureSet(){return f.dj.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new l.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,r,i,s){if(await this.databaseType(),this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new c.Z([],[],!0,null);if(n.capabilities?.queryRelated&&n.capabilities.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,r,i,s);let a="",l=!1;null!==i&&n.capabilities&&n.capabilities.queryRelated&&!0===n.capabilities.queryRelated.supportsOrderBy&&(a=i.constructClause(),l=!0);const o=new U.default;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let d=!0;!0===this._removeGeometry&&(d=!1),o.returnGeometry=d,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null;const h=await n.source.queryRelatedFeatures(o);this._checkCancelled(s);const f=h[this._findObjectId]?h[this._findObjectId].features:[],p=[];for(let e=0;e<f.length;e++)this._featureCache[f[e].attributes[this._relatedLayer.objectIdField]]=f[e],p.push(f[e].attributes[this._relatedLayer.objectIdField]);const y=t&&null!==e&&""!==e,_=null!=r;return new c.Z(y||_?p:[],y||_?[]:p,l,null)}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}async _getFilteredSetUsingPaging(e,t,r,i,s){let n="",a=!1;const l=this._layer.nativeCapabilities();null!==i&&l&&l.capabilities?.queryRelated&&!0===l.capabilities.queryRelated.supportsOrderBy&&(n=i.constructClause(),a=!0),await this.databaseType();let o=this._maxQueryRate();const u=l.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=t&&null!==e&&""!==e,h=null!=r;let f=null,p=!0;!0===this._removeGeometry&&(p=!1);const y=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);return f=new c.Z(d||h?["GETPAGES"]:[],d||h?[]:["GETPAGES"],a,{outFields:y.join(","),resultRecordCount:o,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(f,o,0,0,s),f}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,r){const i=e.pagesDefinition.internal.lastRetrieved,s=i,n=e.pagesDefinition.internal.lastPage,a=this._layer.nativeCapabilities(),l=new U.default;!0===this._requestStandardised&&(l.sqlFormat="standard"),l.relationshipId=this.relationship.id,l.objectIds=e.pagesDefinition.objectIds,l.resultOffset=e.pagesDefinition.internal.lastPage,l.resultRecordCount=e.pagesDefinition.resultRecordCount,l.outFields=e.pagesDefinition.outFields.split(","),l.where=e.pagesDefinition.where,l.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,l.returnGeometry=e.pagesDefinition.returnGeometry,l.outSpatialReference=this.spatialReference;const o=await a.source.queryRelatedFeatures(l);if(this._checkCancelled(r),e.pagesDefinition.internal.lastPage!==n)return 0;const u=o[this._findObjectId]?o[this._findObjectId].features:[];for(let t=0;t<u.length;t++)e.pagesDefinition.internal.set[s+t]=u[t].attributes[this._relatedLayer.objectIdField];for(let e=0;e<u.length;e++)this._featureCache[u[e].attributes[this._relatedLayer.objectIdField]]=u[e];const d=!o[this._findObjectId]||!1===o[this._findObjectId].exceededTransferLimit;return u.length!==e.pagesDefinition.resultRecordCount&&d&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=i+u.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,u.length}async _getFeatures(e,t,r,i){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return await this._expandPagedSet(e,n,0,0,i),this._getFeatures(e,t,r,i);let a=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(a++,a<=r&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[i]&&void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&s.push(e._known[i]),s.length>r)))&&!(a>=r&&0===s.length);i++);if(0===s.length)return"success";throw new _.EN(_.H9.MissingFeatures)}async _refineSetBlock(e,t,r){return e}async _stat(e,t,r,i,s,n,a){return{calculated:!1}}get gdbVersion(){return this._relatedLayer.gdbVersion}async _canDoAggregates(e,t,r,i,s){return!1}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,i,s){return this._relatedLayer.queryAttachments(e,t,r,i,s)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeReference(){return this._relatedLayer?.preferredTimeReference??null}get dateFieldsTimeReference(){return this._relatedLayer?.dateFieldsTimeReference??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}}var K=r(48039),$=r(15235);function X(){null===K.Z.applicationCache&&(K.Z.applicationCache=new K.Z)}async function Y(e,t){if(K.Z.applicationCache){const r=K.Z.applicationCache.getLayerInfo(e);if(r){const i=await r;return new k.default({url:e,outFields:t,sourceJSON:i})}const i=new k.default({url:e,outFields:t}),s=(async()=>(await i.load(),i.sourceJSON))();if(K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(e,s);try{return await s,i}catch(t){throw K.Z.applicationCache.clearLayerInfo(e),t}}return await s,i}return new k.default({url:e,outFields:t})}async function ee(e,t,r,i,s,n=null){return te(await Y(e,["*"]),t,r,i,s,n)}function te(e,t=null,r=null,i=!0,s=null,a=null){if(e instanceof k.default||(0,n.Z)(e)){const n={layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:s,interceptor:a};return 1==!(e.url||!e.source)?new J.Z(n):new V(n)}return te(e.parent,t,r,i,s,a).filter(g.WhereClause.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),e.parent?.fieldsIndex))}async function re(e){if(null!==K.Z.applicationCache){const t=K.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,i.default)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw K.Z.applicationCache.clearLayerInfo(e),t}}return t}async function ie(e,t){const r={metadata:null,networkId:-1,unVersion:3,terminals:[],queryelem:null,layerNameLkp:{},lkp:null},s=await re(e);if(r.metadata=s,s.controllerDatasetLayers&&void 0!==s.controllerDatasetLayers.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)r.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)r.layerNameLkp[e.id]=e.name;const n=s.controllerDatasetLayers.utilityNetworkLayerId;r.networkId=n;const a=await async function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==K.Z.applicationCache){const e=K.Z.applicationCache.getLayerInfo(r);if(null!==e)return e}const s=(async()=>{const r=await(0,i.default)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements&&e.layerDataElements[0])return e.layerDataElements[0]}throw new _.EN(_.H9.DataElementsNotFound)})();if(null!==K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(r,s);try{return await s}catch(e){throw K.Z.applicationCache.clearLayerInfo(r),e}}return s}(e,n);if(a){r.queryelem=a,r.queryelem&&r.queryelem.dataElement&&void 0!==r.queryelem.dataElement.schemaGeneration&&(r.unVersion=r.queryelem.dataElement.schemaGeneration),r.lkp={},r.queryelem.dataElement.domainNetworks||(r.queryelem.dataElement.domainNetworks=[]);for(const e of r.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]??null};e.className&&(r.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]??null};e.className&&(r.lkp[e.className]=e)}}if(r.queryelem.dataElement.terminalConfigurations)for(const e of r.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)r.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==K.Z.applicationCache){const t=K.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,i.default)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw K.Z.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+n);if(s.systemLayers&&void 0!==s.systemLayers.associationsTableId&&null!==s.systemLayers.associationsTableId){const i=[];r.unVersion>=4&&(i.push("STATUS"),i.push("PERCENTALONG"));let n=await ee(e+"/"+s.systemLayers.associationsTableId.toString(),t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...i],!1,null,null);return await n.load(),r.unVersion>=4&&(n=n.filter(g.WhereClause.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62,63)",n.getFieldsIndex())),await n.load()),{lkp:r.lkp,associations:n,unVersion:r.unVersion,terminals:r.terminals}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[]}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[]}}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[]}}async function se(e,t,r,i=null,s=null,n=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await ee(o,i,s,n,a,l);return new H({layer:e,relatedLayer:u,relationship:t,objectId:r,spatialReference:i,outFields:s,includeGeometry:n,lrucache:a,interceptor:l})}a.Z.registerAction(),v.registerAction(),u.Z.registerAction(),C.Z.registerAction(),R.Z.registerAction();class ne extends s.Z{constructor(e,t=null,r=null,i=null){super(),this._map=e,this._overridespref=t,this._lrucache=r,this._interceptor=i,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){const i=te(e,this._overridespref,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async featureSetByName(e,t=!0,r=null){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===i)return this._instantLayers[r].featureset}const s=[],a=this._map.allLayers.find((t=>{if(t instanceof k.default){if(t.title===e)return!0}else if((0,n.Z)(t)){if(t.title===e)return!0;s.push(t)}return!1}));if(a)return this._makeAndAddFeatureSet(a,t,r);if(this._map.tables){const i=this._map.tables.find((t=>!!(t.title&&t.title===e||t.title&&t.title===e)));if(i){if(i instanceof k.default)return this._makeAndAddFeatureSet(i,t,r);if(i._materializedTable);else{const e=i.outFields?i:{...i,outFields:["*"]};i._materializedTable=new k.default(e)}return await i._materializedTable.load(),this._makeAndAddFeatureSet(i._materializedTable,t,r)}}for(const i of s){if("not-loaded"===i.loadStatus||"loading"===i.loadStatus)try{await i.load()}catch(e){}const s=i.sublayers.find((t=>t.title===e));if(s)return this._makeAndAddFeatureSet(s,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===i)return this._instantLayers[r].featureset}const s=[],a=this._map.allLayers.find((t=>{if(t instanceof k.default){if(t.id===e)return!0}else if((0,n.Z)(t)){if(t.id===e)return!0;s.push(t)}return!1}));if(a)return this._makeAndAddFeatureSet(a,t,r);if(this._map.tables){const i=this._map.tables.find((t=>t.id===e));if(i){if(i instanceof k.default)return this._makeAndAddFeatureSet(i,t,r);if(i._materializedTable);else{const e={...i,outFields:["*"]};i._materializedTable=new k.default(e)}return await i._materializedTable.load(),this._makeAndAddFeatureSet(i._materializedTable,t,r)}}for(const i of s){if("not-loaded"===i.loadStatus||"loading"===i.loadStatus)try{await i.load()}catch(e){}const s=i.sublayers.find((t=>t.id===e));if(s)return this._makeAndAddFeatureSet(s,t,r)}return null}}class ae extends s.Z{constructor(e,t=null,r=null,i=null){super(),this._url=e,this._overridespref=t,this._lrucache=r,this._interceptor=i,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){const i=te(e,this._overridespref,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async _loadMetaData(){const e=await re(this._url);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new ae(this._url,this._overridespref,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===i)return this._instantLayers[r].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])t.name===e&&(n=t);if(!n)for(const t of s.tables??[])t.name===e&&(n=t);if(n){const e=await Y(this._url+"/"+n.id,["*"]);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===i)return this._instantLayers[r].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(!n)for(const t of s.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(n){const e=await Y(this._url+"/"+n.id,["*"]);return this._makeAndAddFeatureSet(e,t,r)}return null}}function le(e,t,r=null,i=null){return new ne(e,t,r,i)}function oe(e,t,r=null,i=null){return new ae(e,t,r,i)}function ue(e,t,r,i,s){if(null===e)return null;if(e instanceof k.default){switch(t){case"datasource":return te(e,s,e.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return te(e,s,e.outFields,!0,r,i)}return null}if((0,n.Z)(e)){switch(t){case"datasource":return te(e,s,e.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return te(e,s,e.outFields,!0,r,i)}return null}if((0,n._)(e)){switch(t){case"datasource":return te(e.parent,s,e.parent.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return te(e,s,e.parent.outFields,!0,r,i)}return null}if(e instanceof d.Z)switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}async function de(e,t,r,i,s,n,a,l=null){if(K.Z.applicationCache){const o=K.Z.applicationCache.getLayerInfo(e+":"+n.url);if(o){const e=await o;return te(new k.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]}),r,i,s,a,l)}}const o=new $.default({id:e,portal:n}).load();K.Z.applicationCache&&K.Z.applicationCache.setLayerInfo(e+":"+n.url,o);try{const e=await o;return te(new k.default({url:(0,f.US)(e.url??"")+"/"+t,outFields:["*"]}),r,i,s,a,l)}catch(t){throw K.Z.applicationCache&&K.Z.applicationCache.clearLayerInfo(e+":"+n.url),t}}},70409:(e,t,r)=>{r.d(t,{$X:()=>y,QP:()=>_,TO:()=>g,Xx:()=>w,yN:()=>m});var i=r(38171),s=r(48853),n=r(77286),a=r(59987),l=r(91136),o=r(90961),u=r(90658),d=r(36515),c=r(70586),h=r(41534),f=r(82971);class p{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class y extends p{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class _ extends p{constructor(e,t,r){super((0,u.JW)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=r}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,d.bB)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class g extends p{constructor(e,t,r){super(e),this.codefield=t,this.lkp=r,this.reverseLkp={};for(const e in r)this.reverseLkp[r[e]]=e;this.sqlRewritable=!0}rewriteSql(e,t){const r=this.evaluateNodeToWhereClause(e.parseTree,u.Bj.Standardised,this.field.name,this.codefield instanceof h.WhereClause?(0,d.zR)(this.codefield,u.Bj.Standardised):this.codefield,e.parameters);return r.includes(g.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:h.WhereClause.create(r,(0,c.s3)(t._parent).getFieldsIndex())}}evaluateNodeToWhereClause(e,t,r=null,i=null,n){let l,o,u,c;switch(e.type){case"interval":return(0,d.TE)(this.evaluateNodeToWhereClause(e.value,t,r,i,n),e.qualifier,e.op);case"case-expression":{let i=" CASE ";"simple"===e.format&&(i+=this.evaluateNodeToWhereClause(e.operand,t,r,g.BADNESS,n));for(let s=0;s<e.clauses.length;s++)i+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[s].operand,t,r,g.BADNESS,n)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[s].value,t,r,g.BADNESS,n);return null!==e.else&&(i+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,r,g.BADNESS,n)),i+=" END ",i}case"parameter":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+r.toString().replaceAll("'","''")+"'";if(r instanceof Date)return(0,d.oX)(r,t,null);if(r instanceof s.iG)return(0,d.mA)(r,t,null);if(r instanceof Array){const e=[];for(let i=0;i<r.length;i++)"string"==typeof r[i]?e.push("'"+r[i].toString().replaceAll("'","''")+"'"):r[i]instanceof Date?e.push((0,d.oX)(r[i],t,null)):r[i]instanceof s.iG?e.push((0,d.mA)(r[i],t,null)):e.push(r[i].toString());return e}return r.toString()}case"expression-list":o=[];for(const s of e.value)o.push(this.evaluateNodeToWhereClause(s,t,r,i,n));return o;case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,r,g.BADNESS,n)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" AND "+this.evaluateNodeToWhereClause(e.right,t,r,i,n)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" OR "+this.evaluateNodeToWhereClause(e.right,t,r,i,n)+") ";case"IS":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" IS NOT NULL )";case"IN":if(l=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const s=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}s.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" IN ("+s.join(",")+")) "}return l=this.evaluateNodeToWhereClause(e.right,t,r,i,n)," ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" IN ("+l.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,r,i,n),c instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" IN ("+c+")) ";case"NOT IN":if(l=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const s=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}s.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" NOT IN ("+s.join(",")+")) "}return l=this.evaluateNodeToWhereClause(e.right,t,r,i,n)," ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" NOT IN ("+l.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,r,i,n),c instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" NOT IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,n)+" NOT IN ("+c+")) ";case"BETWEEN":return u=this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,n)," ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,n)+" BETWEEN "+u[0]+" AND "+u[1]+" ) ";case"NOTBETWEEN":return u=this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,n)," ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,n)+" NOT BETWEEN "+u[0]+" AND "+u[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,n)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,n)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,n)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,n)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,n)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,n)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,n)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,n)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+i+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+i+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,n)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,n)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,g.BADNESS,n)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,r,g.BADNESS,n)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":case"date":return(0,d.oX)(e.value,t,null);case"number":return e.value.toString();case"current-time":return(0,d.vR)("date"===e.mode,t);case"column-reference":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+i+")":e.column;case"data-type":return e.value;case"function":{const i=this.evaluateNodeToWhereClause(e.args,t,r,g.BADNESS,n);return(0,d.fz)(e.name,i,t)}}throw new a.eS(a.f.UnsupportedSyntax,{node:e.type})}extractValue(e){return this.codefield instanceof h.WhereClause?this.reverseLkp[this.codefield.calculateValueCompiled(e)]:this.reverseLkp[e.attributes[this.codefield]]}}g.BADNESS="_!!!_BAD_LKP_!!!!";class m extends p{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,d.bB)(e,this.field.name,(0,d.zR)(this._sql,u.Bj.Standardised),t.getFieldsIndex())}}extractValue(e){return this._sql.calculateValueCompiled(e)}}class w extends l.Z{static findField(e,t){for(const r of e)if(r.name.toLowerCase()===t.toString().toLowerCase())return r;return null}constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=[],this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}_initialiseFeatureSet(){null!==this._parent?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new f.Z({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=u.Qk.point,this.typeIdField="",this.types=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();let t=null;return t=this._extraFilter?await this._getFilteredSet("",null,null,null,e):await(this._parent?._getSet(e)),this._checkCancelled(e),(0,c.O3)(t),this._wset=new o.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return(0,c.s3)(this._parent)._isInFeatureSet(e)}async _getFeatures(e,t,r,s){const a=[];-1!==t&&void 0===this._featureCache[t]&&a.push(t);const l=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,l))return await this._expandPagedSet(e,l,0,0,s),this._getFeatures(e,t,r,s);let u=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(u++,u<=r&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&a.push(e._known[i]),a.length>=l)));i++);if(0===a.length)return"success";e=new o.Z([],a,e._ordered,null);const d=Math.min(a.length,r);await(this._parent?._getFeatures(e,-1,d,s)),this._checkCancelled(s);const c=[];for(let e=0;e<d;e++){const t=this._parent?._featureFromCache(a[e]);void 0!==t&&c.push({geometry:t.geometry,attributes:t.attributes,id:a[e]})}for(const e of c){const t=[];for(const r of this.adaptedFields)t[r.field.name]=r.extractValue(e);this._featureCache[e.id]=new i.Z({attributes:t,geometry:(0,n.r1)(e.geometry)})}return"success"}async _fetchAndRefineFeatures(){throw new a.EN(a.H9.NeverReach)}async _getFilteredSet(e,t,r,i,s){let n=!1;const a=this._reformulateWithoutAdaptions(r);n=a.cannot,r=a.where;let l=!1;if(null!==i){l=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof y)&&!0===i.scanForField(t.field.name)){if(!(t instanceof _)){i=null,l=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}i&&e.length>0&&(i=i.replaceFields(e))}null!==r?null!==this._extraFilter&&(r=(0,d.$e)(this._extraFilter,r)):r=this._extraFilter,await this._ensureLoaded();const u=await(0,c.s3)(this._parent)._getFilteredSet(e,t,r,i,s);let h;return this._checkCancelled(s),h=!0===n?new o.Z(u._candidates.slice(0).concat(u._known.slice(0)),[],!0===l&&u._ordered,this._clonePageDefinition(u.pagesDefinition)):new o.Z(u._candidates.slice(0),u._known.slice(0),!0===l&&u._ordered,this._clonePageDefinition(u.pagesDefinition)),h}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const r of this.adaptedFields)if(!0===(0,d.hq)(e,r.field.name)){const i=r.rewriteSql(e,this);if(!0!==i.rewritten){t.cannot=!0,t.where=null;break}t.where=i.where}return t}async _stat(e,t,r,i,s,n,a){let l=!1,o=this._reformulateWithoutAdaptions(t);if(l=o.cannot,t=o.where,o=this._reformulateWithoutAdaptions(s),l=l||o.cannot,null!==(s=o.where)?null!==this._extraFilter&&(s=(0,d.$e)(this._extraFilter,s)):s=this._extraFilter,!0===l)return null===s&&""===r&&null===i?this._manualStat(e,t,n,a):{calculated:!1};const u=await(0,c.s3)(this._parent)._stat(e,t,r,i,s,n,a);return!1===u.calculated?null===s&&""===r&&null===i?this._manualStat(e,t,n,a):{calculated:!1}:u}async _canDoAggregates(e,t,r,i,s){if(null===this._parent)return!1;for(let t=0;t<e.length;t++)for(const r of this.adaptedFields)if(e[t].toLowerCase()===r.field.name.toLowerCase()&&!(r instanceof y))return!1;const n=[];for(let e=0;e<t.length;e++){const r=t[e];if(null!==r.workingexpr){const e=this._reformulateWithoutAdaptions(r.workingexpr);if(e.cannot)return!1;const t=r.clone();t.workingexpr=e.where,n.push(t)}else n.push(r)}const a=this._reformulateWithoutAdaptions(s);return!a.cannot&&(null!==(s=a.where)?null!==this._extraFilter&&(s=(0,d.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,n,r,i,s))}async _getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,l){if(null===this._parent)throw new a.EN(a.H9.NeverReach);const o=[];for(let e=0;e<t.length;e++){const r=t[e];if(null!==r.workingexpr){const e=this._reformulateWithoutAdaptions(r.workingexpr);if(e.cannot)throw new a.EN(a.H9.NeverReach);const t=r.clone();t.workingexpr=e.where,o.push(t)}else o.push(r)}const u=this._reformulateWithoutAdaptions(s);if(u.cannot)throw new a.EN(a.H9.NeverReach);return null!==(s=u.where)?null!==this._extraFilter&&(s=(0,d.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,o,r,i,s,n,l)}}},84328:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(59987),s=r(91136),n=r(90961),a=r(90658),l=r(36515),o=r(95330),u=r(41534),d=r(82971);class c extends s.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof u.WhereClause?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new d.Z({wkid:4326}),this.geometryType=a.Qk.point)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("",null,this._whereclause,null,e);return this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new n.Z(t._candidates.slice(0).concat(t._known.slice(0)),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new n.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent?._isInFeatureSet(e);return t===a.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?a.dj.Unknown:t)}_getFeature(e,t,r){return this._parent._getFeature(e,t,r)}_getFeatures(e,t,r,i){return this._parent._getFeatures(e,t,r,i)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction){const t=this._whereClauseFunction(e);return(0,o.y8)(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,r){const i=new n.Z([],e,!1,null),s=Math.min(t,e.length);if(await(this._parent?._getFeatures(i,-1,s,r)),this._checkCancelled(r),null==this._whereClauseFunction){for(let t=0;t<s;t++){const r=this._parent?._featureFromCache(e[t]);!0===this.executeWhereClause(r)?this._idstates[e[t]]=a.dj.InFeatureSet:this._idstates[e[t]]=a.dj.NotInFeatureSet}return"success"}const l=[];for(let t=0;t<s;t++){const r=this._parent?._featureFromCache(e[t]);l.push(await this.executeWhereClauseDeferred(r))}for(let r=0;r<t;r++)!0===l[r]?this._idstates[e[r]]=a.dj.InFeatureSet:this._idstates[e[r]]=a.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,r,i,s){null!==this._whereClauseFunction||(null!==r?null!==this._whereclause&&(r=(0,l.$e)(this._whereclause,r)):r=this._whereclause),await this._ensureLoaded();const a=await this._parent._getFilteredSet(e,t,r,i,s);let o;return this._checkCancelled(s),o=null!==this._whereClauseFunction?new n.Z(a._candidates.slice(0).concat(a._known.slice(0)),[],a._ordered,this._clonePageDefinition(a.pagesDefinition)):new n.Z(a._candidates.slice(0),a._known.slice(0),a._ordered,this._clonePageDefinition(a.pagesDefinition)),o}async _stat(e,t,r,i,s,n,a){if(null!==this._whereClauseFunction)return null===s&&""===r&&null===i?this._manualStat(e,t,n,a):{calculated:!1};let o=this._whereclause;null!==s&&null!==this._whereclause&&(o=(0,l.$e)(this._whereclause,s));const u=await this._parent._stat(e,t,r,i,o,n,a);return!1===u.calculated?null===s&&""===r&&null===i?this._manualStat(e,t,n,a):{calculated:!1}:u}async _canDoAggregates(e,t,r,i,s){return null===this._whereClauseFunction&&(null!==s?null!==this._whereclause&&(s=(0,l.$e)(this._whereclause,s)):s=this._whereclause,null!==this._parent&&this._parent._canDoAggregates(e,t,r,i,s))}async _getAggregatePagesDataSourceDefinition(e,t,r,s,n,a,o){if(null===this._parent)throw new i.EN(i.H9.NeverReach);return null!==n?null!==this._whereclause&&(n=(0,l.$e)(this._whereclause,n)):n=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,r,s,n,a,o)}static registerAction(){s.Z._featuresetFunctions.filter=function(e){if("function"==typeof e)return new c({parentfeatureset:this,whereclause:e});let t=null;return e instanceof u.WhereClause&&(t=e),new c({parentfeatureset:this,whereclause:t})}}}},85065:(e,t,r)=>{r.d(t,{Z:()=>o});var i=r(61363),s=r(59987),n=r(91136),a=r(90961),l=r(3823);class o extends n.Z{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,this._orderbyclause,e);return this._checkCancelled(e),this._wset=t,this._wset}return this._wset}async manualOrderSet(e,t){const r=await this.getIdColumnDictionary(e,[],-1,t);this._orderbyclause?.order(r);const i=new a.Z([],[],!0,null);for(let e=0;e<r.length;e++)i._known.push(r[e].id);return i}async getIdColumnDictionary(e,t,r,s){if(r<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[r+1])return await(0,i.$)(this._parent._expandPagedSet(e,n,0,0,s)),this.getIdColumnDictionary(e,t,r,s);let a=r+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;r+=l.length;const o=await(0,i.$)(this._parent._getFeatureBatch(l,s));this._checkCancelled(s);for(const e of o)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,r,s)}return e._candidates.length>0?(await(0,i.$)(this._refineSetBlock(e,this._maxProcessingRate(),s)),this._checkCancelled(s),this.getIdColumnDictionary(e,t,r,s)):t}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,r,i){return this._parent._getFeatures(e,t,r,i)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}async _fetchAndRefineFeatures(){throw new s.EN(s.H9.NeverReach)}async _getFilteredSet(e,t,r,i,s){await this._ensureLoaded();const n=await this._parent._getFilteredSet(e,t,r,null===i?this._orderbyclause:i,s);this._checkCancelled(s);const l=new a.Z(n._candidates.slice(0),n._known.slice(0),n._ordered,this._clonePageDefinition(n.pagesDefinition));let o=!0;if(n._candidates.length>0&&(o=!1),!1===l._ordered){let e=await this.manualOrderSet(l,s);return!1===o&&(null===t&&null===r||(e=new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e}return l}static registerAction(){n.Z._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new l.Z(e)})}}}},63991:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(59987),s=r(91136),n=r(90961),a=r(90658);class l extends s.Z{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getSet(e);return this._wset=new n.Z(t._candidates.slice(0),t._known.slice(0),!1,this._clonePageDefinition(t.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset}return this._wset}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===a.dj.NotInFeatureSet)return t;const r=this._idstates[e];return r===a.dj.InFeatureSet||r===a.dj.NotInFeatureSet?r:t===a.dj.InFeatureSet&&void 0===r?this._countedin<this._topnum?(this._idstates[e]=a.dj.InFeatureSet,this._countedin++,a.dj.InFeatureSet):(this._idstates[e]=a.dj.NotInFeatureSet,a.dj.NotInFeatureSet):a.dj.Unknown}async _expandPagedSet(e,t,r,s,n){if(null===this._parent)throw new i.EN(i.H9.NotImplemented);if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),"success"}const a=await this._parent._expandPagedSet(e,t,r,s,n);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),a}async _getFeatures(e,t,r,i){const s=[],a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return await this._expandPagedSet(e,a,0,0,i),this._getFeatures(e,t,r,i);-1!==t&&void 0===this._featureCache[t]&&s.push(t);let l=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(l++,l<=r&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&s.push(e._known[i]),s.length>a)));i++);if(0===s.length)return"success";const o=new n.Z([],s,!1,null),u=Math.min(s.length,r);await this._parent._getFeatures(o,-1,u,i);for(let e=0;e<u;e++){const t=this._parent._featureFromCache(s[e]);void 0!==t&&(this._featureCache[s[e]]=t)}return"success"}async _getFilteredSet(e,t,r,i,s){await this._ensureLoaded();const a=await this._getSet(s);return new n.Z(a._candidates.slice(0).concat(a._known.slice(0)),[],!1,this._clonePageDefinition(a.pagesDefinition))}_refineKnowns(e,t){let r=0,i=null;const s=[];for(let n=0;n<e._candidates.length;n++){const l=this._isInFeatureSet(e._candidates[n]);if(l===a.dj.InFeatureSet){if(e._known.push(e._candidates[n]),r+=1,null===i?i={start:n,end:n}:i.end===n-1?i.end=n:(s.push(i),i={start:n,end:n}),e._known.length>=this._topnum)break}else if(l===a.dj.NotInFeatureSet)null===i?i={start:n,end:n}:i.end===n-1?i.end=n:(s.push(i),i={start:n,end:n}),r+=1;else if(l===a.dj.Unknown)break;if(r>=t)break}null!==i&&s.push(i);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}static registerAction(){s.Z._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}}},17805:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(38171),s=r(59987),n=r(91136),a=r(90961),l=r(90658),o=r(36515),u=r(9361),d=r(19238),c=r(30359),h=r(16451),f=r(1231),p=r(14165);class y extends n.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.tI}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=l.Bj.Standardised,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this._layer instanceof c.default?(this.typeIdField=this._layer.subtypeField??"",this.types=this._layer.subtypes):(this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types)}isTable(){return this._forceIsTable||this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return l.dj.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new i.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,r,i,s){let n="",u=!1;if(null!==i&&(n=i.constructClause(),u=!0),this.isTable()&&t&&null!==e&&""!==e)return new a.Z([],[],!0,null);const d=new p.Z;d.returnZ=this.hasZ,d.returnM=this.hasM,d.where=null===r?null===t?"1=1":"":(0,o.zR)(r,l.Bj.Standardised),d.spatialRelationship=this._makeRelationshipEnum(e),d.outSpatialReference=this.spatialReference,d.orderByFields=""!==n?n.split(","):null,d.geometry=null===t?null:t,d.returnGeometry=!0,d.relationParameter=this._makeRelationshipParam(e);const c=await this._layer.queryFeatures(d);if(null===c)return new a.Z([],[],u,null);this._checkCancelled(s);const h=[];return c.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];h.push(t),this._featureCache[t]=this._changeFeature(e)})),new a.Z([],h,u,null)}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _queryAllFeatures(){if(this._wset)return this._wset;const e=new p.Z;if(e.where="1=1",await this._ensureLoaded(),this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach((t=>{const r=t.attributes[this._layer.objectIdField];e.push(r),this._featureCache[r]=this._changeFeature(t)})),this._wset=new a.Z([],e,!1,null),this._wset}e.returnZ=this.hasZ,e.returnM=this.hasM;const t=await this._layer.queryFeatures(e),r=[];return t.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];r.push(t),this._featureCache[t]=this._changeFeature(e)})),this._wset=new a.Z([],r,!1,null),this._wset}async _getFeatures(e,t,r){const i=[];-1!==t&&void 0===this._featureCache[t]&&i.push(t);for(let s=e._lastFetchedIndex;s<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&i.push(e._known[s]),i.length>r)));s++);if(0===i.length)return"success";throw new s.EN(s.H9.MissingFeatures)}async _refineSetBlock(e){return e}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const r in e)t[r]=e[r];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const i=e.layerDefinition.typeIdField??"",s=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)s.push(h.Z.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!r){let t=!1;for(const i of e.layerDefinition.fields)if("oid"===i.type||"esriFieldTypeOID"===i.type){r=i.name,t=!0;break}if(!1===t){let t="FID",i=!0,s=0;for(;i;){let r=!0;for(const i of e.layerDefinition.fields)if(i.name===t){r=!1;break}!0===r?i=!1:(s++,t="FID"+s.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let r=0;r<a.length;r++)n.push({geometry:e.featureSet.features[r].geometry,attributes:e.featureSet.features[r].attributes?this._cloneAttr(e.featureSet.features[r].attributes):{}}),n[r].attributes[t]=r;a=n,r=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof f.Z?o.push(t):o.push(f.Z.fromJSON(t));let c=n;switch(c||(c=""),c){case"esriGeometryPoint":c="point";break;case"esriGeometryPolyline":c="polyline";break;case"esriGeometryPolygon":c="polygon";break;case"esriGeometryEnvelope":c="extent";break;case"esriGeometryMultipoint":c="multipoint";break;case"":case"esriGeometryNull":c="esriGeometryNull"}if("esriGeometryNull"!==c)for(const e of a)e.geometry&&e.geometry instanceof u.Z==0&&(e.geometry.type=c,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const p={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:s,typeIdField:i,objectIdField:r,spatialReference:t},_="esriGeometryNull"===c||null===c;_||(p.geometryType=c);const g=new d.default(p);return new y({layer:g,spatialReference:t,isTable:_})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=new p.Z;t.where=this.objectIdField+"="+e.toString(),t.returnZ=this.hasZ,t.returnM=this.hasM;const r=await this._layer.queryFeatures(t);return 1===r.features.length?r.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeReference(){return this._layer?.preferredTimeReference?.toJSON()??null}get dateFieldsTimeReference(){return this._layer?.dateFieldsTimeReference?.toJSON()??null}get datesInUnknownTimezone(){return this._layer?.datesInUnknownTimezone}get editFieldsInfo(){return this._layer?.editFieldsInfo?.toJSON()??null}get timeInfo(){return this._layer?.timeInfo?.toJSON()??null}}},3823:(e,t,r)=>{function i(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}r.d(t,{Z:()=>s});class s{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const r=t[e].match(/\S+/g);this._fields.push(r[0]),2===r.length?"asc"===r[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort(((e,t)=>{for(let r=0;r<this._fields.length;r++){const s=this.featureValue(e.feature,this._fields[r],r),n=this.featureValue(t.feature,this._fields[r],r);let a=0;if(a=1===this._directions[r]?i(s,n):-1*i(s,n),0!==a)return a}return 0}))}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let r=0;r<this._fields.length;r++){0!==r&&(t+=",");let i=this._fields[r];for(const t of e)if(i.toLowerCase()===t.field.toLowerCase()){i=t.newfield;break}t+=i,1===this._directions[r]?t+=" ASC":t+=" DESC"}return new s(t)}featureValue(e,t,r){const i=e.attributes[t];if(void 0!==i)return i;for(const i in e.attributes)if(t.toLowerCase()===i.toLowerCase())return this._fields[r]=i,e.attributes[i];return null}}},25929:(e,t,r)=>{r.d(t,{M:()=>p,a:()=>_,e:()=>h,f:()=>s,i:()=>d,p:()=>c,r:()=>a,t:()=>n,w:()=>l});var i=r(81271);function s(e,t){const r=t&&t.url&&t.url.path;if(e&&r&&(e=(0,i.hF)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,i.PF)(e,t.portalItem.itemUrl);null!=r&&u.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return f(e,t&&t.portal)}function n(e,t,r=p.YES){if(null==e)return e;!(0,i.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,i.hF)(e);if(t){const r=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(r){const n=f(r,t.portal),a=f(s,t.portal);s=(0,i.PF)(a,n,n),null!=s&&s!==a&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=h(s,t?.portal),(0,i.YP)(s)&&(s=(0,i.Fv)(s)),t?.resources&&t?.portalItem&&!(0,i.YP)(s)&&!(0,i.HK)(s)&&r===p.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function a(e,t,r){return s(e,r)}function l(e,t,r,i){const s=n(e,i);void 0!==s&&(t[r]=s)}const o=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function d(e){const t=e?.match(o)??null;return t?.[1]??null}function c(e){const t=e?.match(o)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,i.fZ)(r);return{prefix:null,filename:e,extension:t}}const{path:n,extension:a}=(0,i.fZ)(r.slice(s+1));return{prefix:r.slice(0,s),filename:n,extension:a}}function h(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,i.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function f(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,i.TI)();return(0,i.D6)(s,`${s.scheme}://${r}`)?(0,i.Ie)(e,t.portalHostname,r):(0,i.Ie)(e,r,t.portalHostname)}var p,y;(y=p||(p={}))[y.YES=0]="YES",y[y.NO=1]="NO";const _=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return p},ensureMainOnlineDomain:h,fromJSON:s,itemIdFromResourceUrl:d,prefixAndFilenameFromResourceUrl:c,read:a,toJSON:n,write:l},Symbol.toStringTag,{value:"Module"}))},32448:(e,t,r)=>{r.d(t,{Z:()=>o});var i=r(43697),s=r(92036),n=r(50758),a=r(52011);class l{constructor(){this._emitter=new l.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){const r=this._listenersMap&&this._listenersMap.get(e);if(!r)return!1;const i=this._target||this;return[...r].forEach((e=>{e.call(i,t)})),r.length>0}on(e,t){if(Array.isArray(e)){const r=e.map((e=>this.on(e,t)));return(0,n.AL)(r)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const r=this._listenersMap.get(e)||[];return r.push(t),this._listenersMap.set(e,r),{remove:()=>{const r=this._listenersMap&&this._listenersMap.get(e)||[],i=r.indexOf(t);i>=0&&r.splice(i,1)}}}once(e,t){const r=this.on(e,(e=>{r.remove(),t.call(null,e)}));return r}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let r=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return r=(0,i._)([(0,a.j)("esri.core.Evented")],r),r};let r=class extends s.Z{constructor(){super(...arguments),this._emitter=new l.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};r=(0,i._)([(0,a.j)("esri.core.Evented")],r),e.EventedAccessor=r}(l||(l={}));const o=l},10699:(e,t,r)=>{r.d(t,{IG:()=>a,iv:()=>l});var i=r(43697),s=r(52011);let n=0;const a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.j)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.j)("esri.core.NumericIdentifiable")],t),t};let o=class extends(a(class{})){};o=(0,i._)([(0,s.j)("esri.core.Identifiable")],o)},66643:(e,t,r)=>{r.d(t,{Ed:()=>u,UI:()=>d,mt:()=>p,q6:()=>f,vr:()=>y});var i=r(43697),s=r(92036),n=r(70586),a=r(95330),l=r(5600),o=r(52011);function u(e,t,r){return(0,a.as)(e.map(((e,i)=>t.apply(r,[e,i]))))}async function d(e,t,r){return(await(0,a.as)(e.map(((e,i)=>t.apply(r,[e,i]))))).map((e=>e.value))}function c(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return h(e)}}async function p(e){try{return c(await e)}catch(e){return(0,a.r9)(e),h(e)}}function y(e,t){return new _(e,t)}let _=class extends s.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then((e=>{this._result=c(e),this._cleanup()}),(e=>{this._result=h(e),this._cleanup()})),this._abortHandle=(0,a.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,l.Cb)()],_.prototype,"value",null),(0,i._)([(0,l.Cb)()],_.prototype,"error",null),(0,i._)([(0,l.Cb)()],_.prototype,"finished",null),(0,i._)([(0,l.Cb)()],_.prototype,"promise",void 0),(0,i._)([(0,l.Cb)()],_.prototype,"_result",void 0),_=(0,i._)([(0,o.j)("esri.core.asyncUtils.ReactiveTask")],_)},87085:(e,t,r)=>{r.d(t,{Z:()=>w});var i=r(43697),s=(r(66577),r(3172)),n=r(20102),a=r(32448),l=r(10699),o=r(83379),u=r(92604),d=r(95330),c=r(81271),h=r(5600),f=(r(75215),r(67676),r(80442),r(52011)),p=r(68773),y=r(6570),_=r(82971);let g=0,m=class extends(a.Z.EventedMixin((0,l.IG)(o.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.Z(-180,-90,180,90,_.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=_.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(8008).then(r.bind(r,28008));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r&&r.id||"unset",s=r&&r.portal&&r.portal.url||p.default.portalUrl;throw u.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.D_)(e)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,h.Cb)({type:String})],m.prototype,"attributionDataUrl",void 0),(0,i._)([(0,h.Cb)({type:y.Z})],m.prototype,"fullExtent",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],m.prototype,"hasAttributionData",null),(0,i._)([(0,h.Cb)({type:String,clonable:!1})],m.prototype,"id",void 0),(0,i._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],m.prototype,"legendEnabled",void 0),(0,i._)([(0,h.Cb)({type:["show","hide","hide-children"]})],m.prototype,"listMode",void 0),(0,i._)([(0,h.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],m.prototype,"opacity",void 0),(0,i._)([(0,h.Cb)({clonable:!1})],m.prototype,"parent",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],m.prototype,"parsedUrl",null),(0,i._)([(0,h.Cb)({type:Boolean})],m.prototype,"popupEnabled",void 0),(0,i._)([(0,h.Cb)({type:Boolean})],m.prototype,"attributionVisible",void 0),(0,i._)([(0,h.Cb)({type:_.Z})],m.prototype,"spatialReference",void 0),(0,i._)([(0,h.Cb)({type:String})],m.prototype,"title",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],m.prototype,"type",void 0),(0,i._)([(0,h.Cb)()],m.prototype,"url",void 0),(0,i._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],m.prototype,"visible",void 0),m=(0,i._)([(0,f.j)("esri.layers.Layer")],m);const w=m},16451:(e,t,r)=>{r.d(t,{Z:()=>f});var i=r(43697),s=r(2368),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),o=r(52011),u=r(30556),d=r(72729),c=r(70082);let h=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,d.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"id",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"name",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"domains",void 0),(0,i._)([(0,l.r)("domains")],h.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],h.prototype,"writeDomains",null),(0,i._)([(0,a.Cb)({type:[c.Z],json:{write:!0}})],h.prototype,"templates",void 0),h=(0,i._)([(0,o.j)("esri.layers.support.FeatureType")],h);const f=h},66677:(e,t,r)=>{r.d(t,{B5:()=>d,DR:()=>h,G:()=>w,M8:()=>y,Nm:()=>_,Qc:()=>c,XG:()=>g,a7:()=>p,ld:()=>f,wH:()=>m});var i=r(81271),s=r(25929);const n={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},a=Object.values(n),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return!!l.test(e)}function c(e){if(null==e)return null;const t=(0,i.mN)(e),r=t.path.match(l)||t.path.match(o);if(!r)return null;const[,s,a,u,d]=r,c=a.indexOf("/");return{title:f(-1!==c?a.slice(c+1):a),serverType:n[u.toLowerCase()],sublayer:null!=d&&""!==d?parseInt(d,10):null,url:{path:s}}}function h(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function p(e,t){const r=[];if(e){const t=c(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=f(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function y(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),r=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&r}function _(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const r=(0,i.mN)(t),s=c(r.path);let n;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(n=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=h(r.path);null!=e&&(t=e.serviceUrl,n=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:n}}function m(e,t,r,n,a){(0,s.w)(t,n,"url",a),n.url&&null!=e.layerId&&(n.url=(0,i.v_)(n.url,r,e.layerId.toString()))}function w(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),n=t.includes("/wmsserver");return r&&(i||s||n)}},2981:(e,t,r)=>{r.d(t,{$6:()=>d,Ow:()=>n,S0:()=>s,d1:()=>a});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return o(function(e,t){return l(t).find((t=>u(t)===e))}(e,t))}function n(e,t){return o(function(e,t){const r=e.toLowerCase();return l(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function a(e,t){return u(function(e,t){return l(t).find((t=>o(t)===e))}(e,t))}function l(e){return[...i,...e]}function o(e){return e?.[0]}function u(e){return e?.[1]}function d(e){return e.tables?.find((e=>"assetMaps"===e.role))}},84230:(e,t,r)=>{r.d(t,{A2:()=>a,S1:()=>d,fb:()=>n,ln:()=>c,oP:()=>u,rQ:()=>l,y2:()=>o});var i=r(40330),s=r(3172);const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}async function u(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const a=`${e.substring(0,n)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,s.default)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function c(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},14661:(e,t,r)=>{r.d(t,{$o:()=>d,Fj:()=>o,Kz:()=>c,Ss:()=>h,_$:()=>l,ck:()=>u,qj:()=>a});var i=r(44547),s=r(82971),n=r(40488);function a(e,t){if(!l(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,c.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}async function d(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.Sx)(e);const r=s.Z.WGS84;return await(0,i.iQ)(t,r),(0,i.iV)(e,r)}(r)}const c={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service"};function h(e){const{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!r&&!!s?.includes("features:user:fullEdit");const l="update"===i||"admin"===i;return l?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:l}}}},41818:(e,t,r)=>{r.d(t,{P:()=>a});var i=r(11282),s=r(34599),n=r(14165);async function a(e,t,r){const a=(0,i.en)(e);return(0,s.hH)(a,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>a});var i=r(11282),s=r(34599),n=r(14165);async function a(e,t,r){const a=(0,i.en)(e);return(0,s.Ev)(a,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>o,e:()=>l});var i=r(11282),s=r(34599),n=r(74889),a=r(14165);async function l(e,t,r){const i=await o(e,t,r);return n.Z.fromJSON(i)}async function o(e,t,r){const n=(0,i.en)(e),l={...r},o=a.Z.from(t),{data:u}=await(0,s.JT)(n,o,o.sourceSpatialReference,l);return u}},53261:(e,t,r)=>{r.d(t,{t:()=>_});var i=r(11282),s=r(70586),n=r(69285),a=r(98732);function l(e,t){return t}function o(e,t,r,i){switch(r){case 0:return h(e,t+i,0);case 1:return"lowerLeft"===e.originPosition?h(e,t+i,1):function({translate:e,scale:t},r,i){return e[i]-r*t[i]}(e,t+i,1)}}function u(e,t,r,i){return 2===r?h(e,t,2):o(e,t,r,i)}function d(e,t,r,i){return 2===r?h(e,t,3):o(e,t,r,i)}function c(e,t,r,i){return 3===r?h(e,t,3):u(e,t,r,i)}function h({translate:e,scale:t},r,i){return e[i]+r*t[i]}class f{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=l,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,n.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,s.O3)(r),r.push(t);const i=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of i)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,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),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,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:i}=t,s=(0,a.$g)(r.clone(),r,!1,!1,this._transform),n=(0,a.di)(s,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...n}}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,r){const i=(0,s.s3)(this._transform,"transform");switch(t=this._applyTransform(i,t,r,0),r){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 r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const i=(0,s.s3)(this._transform,"transform");return this._applyTransform(i,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const i=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(i)}_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,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const i=this._transformPathLikeValue(t,r),s=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=i}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?c:t?u:r?d:o}}var p=r(34599),y=(r(74889),r(14165));async function _(e,t,r){const s=(0,i.en)(e),n={...r},a=y.Z.from(t),l=!a.quantizationParameters,{data:o}=await(0,p.qp)(s,a,new f({sourceSpatialReference:a.sourceSpatialReference,applyTransform:l}),n);return o}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},98326:(e,t,r)=>{r.d(t,{Z:()=>c});var i,s=r(43697),n=r(96674),a=r(5600),l=r(75215),o=(r(67676),r(80442),r(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 d=i=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:r,tagName:i}=e;if(!t||!r||!i)return null;const s=t.find((e=>e.name===r));return s?function(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const i=r.find((e=>e.name===t));return i&&i.value||null}({tagName:i,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new i({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,a.Cb)({type:String})],d.prototype,"contentType",void 0),(0,s._)([(0,a.Cb)()],d.prototype,"exifInfo",void 0),(0,s._)([(0,a.Cb)({readOnly:!0})],d.prototype,"orientationInfo",null),(0,s._)([(0,a.Cb)({type:l.z8})],d.prototype,"id",void 0),(0,s._)([(0,a.Cb)({type:String})],d.prototype,"globalId",void 0),(0,s._)([(0,a.Cb)({type:String})],d.prototype,"keywords",void 0),(0,s._)([(0,a.Cb)({type:String})],d.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{read:!1}})],d.prototype,"parentGlobalId",void 0),(0,s._)([(0,a.Cb)({json:{read:!1}})],d.prototype,"parentObjectId",void 0),(0,s._)([(0,a.Cb)({type:l.z8})],d.prototype,"size",void 0),(0,s._)([(0,a.Cb)({json:{read:!1}})],d.prototype,"url",void 0),d=i=(0,s._)([(0,o.j)("esri.layers.support.AttachmentInfo")],d);const c=d},74889:(e,t,r)=>{r.d(t,{Z:()=>w});var i,s=r(43697),n=r(66577),a=r(38171),l=r(35454),o=r(96674),u=r(22974),d=r(5600),c=(r(75215),r(71715)),h=r(52011),f=r(30556),p=r(82971),y=r(33955),_=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let m=i=class extends o.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 r=p.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],n=a.Z.fromJSON(s),l=s.geometry&&s.geometry.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=r);const o=s.aggregateGeometries,u=n.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],i=o[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(n)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=p.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.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 r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)a?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,a]}=r;let l=null,o=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;o=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+i),(e=>s-e*a),l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const n=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=r(l[1]);e===i&&a===s||(n.push([e-i,a-s]),i=e,s=a)}else i=t(l[0]),s=r(l[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,y.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],a=this._quantizePoints(n,t,r);a&&s.push(a)}return s.length>0?((0,y.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.oU)(e)?e.rings:e.paths;let a,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(a+=s[0],l+=s[1]):(a=s[0],l=s[1]),s[0]=t(a),s[1]=r(l)}}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let a,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(a+=i[0],l+=i[1]):(a=i[0],l=i[1]),i[0]=t(a),i[1]=r(l)}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],m.prototype,"displayFieldName",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,d.Cb)({type:[a.Z],json:{write:!0}})],m.prototype,"features",void 0),(0,s._)([(0,c.r)("features")],m.prototype,"readFeatures",null),(0,s._)([(0,d.Cb)({type:[_.Z],json:{write:!0}})],m.prototype,"fields",void 0),(0,s._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],m.prototype,"geometryType",void 0),(0,s._)([(0,f.c)("geometryType")],m.prototype,"writeGeometryType",null),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasZ",void 0),(0,s._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],m.prototype,"queryGeometry",void 0),(0,s._)([(0,c.r)("queryGeometry")],m.prototype,"readQueryGeometry",null),(0,s._)([(0,d.Cb)({type:p.Z,json:{write:!0}})],m.prototype,"spatialReference",void 0),(0,s._)([(0,f.c)("spatialReference")],m.prototype,"writeSpatialReference",null),(0,s._)([(0,d.Cb)({json:{write:!0}})],m.prototype,"transform",void 0),m=i=(0,s._)([(0,h.j)("esri.rest.support.FeatureSet")],m),m.prototype.toJSON.isDefaultToJSON=!0;const w=m}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1681],{95401:(e,t,n)=>{n.d(t,{e:()=>l});var r,o,i,s=n(5732),a={exports:{}};r=a,o=function(){function e(e,n,o){o=o||2;var i,s,a,c,u,p,h,f=n&&n.length,g=f?n[0]*o:e.length,m=t(e,0,g,o,!0),d=[];if(!m||m.next===m.prev)return d;if(f&&(m=l(e,n,m,o)),e.length>80*o){i=a=e[0],s=c=e[1];for(var x=o;x<g;x+=o)(u=e[x])<i&&(i=u),(p=e[x+1])<s&&(s=p),u>a&&(a=u),p>c&&(c=p);h=0!==(h=Math.max(a-i,c-s))?1/h:0}return r(m,d,o,i,s,h),d}function t(e,t,n,r,o){var i,s;if(o===M(e,t,n,r)>0)for(i=t;i<n;i+=r)s=Z(i,e[i],e[i+1],s);else for(i=n-r;i>=t;i-=r)s=Z(i,e[i],e[i+1],s);if(s&&v(s,s.next)){var a=s.next;_(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(_(r),(r=t=o)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,p,h){if(e){!h&&p&&f(e,c,u,p);for(var g,m,d=e;e.prev!==e.next;)if(g=e.prev,m=e.next,p?i(e,c,u,p):o(e))t.push(g.i/l),t.push(e.i/l),t.push(m.i/l),_(e),e=m.next,d=m.next;else if((e=m)===d){h?1===h?r(e=s(n(e),t,l),t,l,c,u,p,2):2===h&&a(e,t,l,c,u,p):r(n(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(y(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(d(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&y(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,n,r){var o=e.prev,i=e,s=e.next;if(y(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,p=g(a,l,t,n,r),h=g(c,u,t,n,r),f=e.prevZ,m=e.nextZ;f&&f.z>=p&&m&&m.z<=h;){if(f!==e.prev&&f!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,m!==e.prev&&m!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;f&&f.z>=p;){if(f!==e.prev&&f!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;m&&m.z<=h;){if(m!==e.prev&&m!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function s(e,t,r){var o=e;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&T(i,s)&&T(s,i)&&(t.push(i.i/r),t.push(o.i/r),t.push(s.i/r),_(o),_(o.next),o=e=s),o=o.next}while(o!==e);return n(o)}function a(e,t,o,i,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&x(l,c)){var u=C(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,o,i,s,a),void r(u,t,o,i,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,o,i){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*i,s<a-1?r[s+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(m(l));for(u.sort(c),s=0;s<u.length;s++)o=n(o=p(u[s],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function p(e,t){var r=function(e,t){var n,r=t,o=e.x,i=e.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===s)return n;var l,c=n,u=n.x,p=n.y,f=1/0;r=n;do{o>=r.x&&r.x>=u&&o!==r.x&&d(i<p?o:s,i,u,p,i<p?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),T(r,e)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var o=C(r,e),i=n(r,r.next);let s=u(o);return n(s,s.next),i=u(i),u(t===r?i:t)}function h(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function f(e,t,n,r){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,s,a,l,c=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,c*=2}while(s>1)}(o)}function g(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function d(e,t,n,r,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function x(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(T(e,t)&&T(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||v(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var o=A(y(e,t,n)),i=A(y(e,t,r)),s=A(y(n,r,e)),a=A(y(n,r,t));return o!==i&&s!==a||!(0!==o||!b(e,n,t))||!(0!==i||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function A(e){return e>0?1:e<0?-1:0}function T(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function C(e,t){var n=new S(e.i,e.x,e.y),r=new S(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function Z(e,t,n,r){var o=new S(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function _(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function S(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(e,t,n,r){for(var o=0,i=t,s=n-r;i<n;i+=r)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}return e.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,s=Math.abs(M(e,0,i,n));if(o)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(M(e,c,u,n))}var p=0;for(a=0;a<r.length;a+=3){var h=r[a]*n,f=r[a+1]*n,g=r[a+2]*n;p+=Math.abs((e[h]-e[g])*(e[f+1]-e[h+1])-(e[h]-e[f])*(e[g+1]-e[h+1]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)n.vertices.push(e[o][i][s]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n},e},void 0!==(i=o())&&(r.exports=i);const l=(0,s.g)(a.exports)},24882:(e,t,n)=>{n.d(t,{$z:()=>s,KF:()=>u,mi:()=>o});var r=n(1533);function o(e){return(0,r.kJ)(e)?e.length<r.DB?e:i(e):e.length<r.DB?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:i(e)}function i(e){let t=!0;for(const n of e){if(n>=65536)return(0,r.kJ)(e)?new Uint32Array(e):e;n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=r.DB?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<r.DB)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,n)=>{n.d(t,{Z:()=>y});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),p=n(75215),h=n(65542),f=n(60746),g=n(71630);const m="esri.geometry.support.MeshComponent",d=a.Z.getLogger(m);let x=r=class extends i.wq{static from(e){return(0,p.TJ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},d)}castMaterial(e){return(0,p.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?f.Z:h.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o._)([(0,l.Cb)({json:{write:!0}})],x.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],x.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],x.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],x.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],x.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],x.prototype,"trustSourceNormals",void 0),x=r=(0,o._)([(0,u.j)(m)],x);const y=x},65542:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(91024),u=n(80218);let p=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,o._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"colorTextureTransform",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"normalTextureTransform",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=r=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterial")],p);const h=p},60746:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(91024),u=n(80218);let p=r=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=null!=e?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,s.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTextureTransform",void 0),p=r=(0,o._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const h=p},91024:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(43697);n(80442);let o=null,i=!0;function s(){return o||(o=document.createElement("canvas"),o.width=1,o.height=1),o}function a(e,t,n){return n||(n=s()),n.getContext("2d").createImageData(e,t)}var l,c=n(96674),u=n(5600),p=n(75215),h=(n(67676),n(71715)),f=n(52011),g=n(30556),m=n(25929);const d=new WeakMap;let x=0,y=l=class extends c.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,m.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,m.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else if(e instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(d.has(this.data)||d.set(this.data,++x),t(d.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new l(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return function(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(i)try{return new ImageData(e,t,n)}catch(e){i=!1}const o=a(t,n,void 0);return o.data.set(e,0),o}(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new l({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new l({data:e}):(0,p.TJ)(l,e)}};(0,r._)([(0,u.Cb)({type:String,json:{write:m.w}})],y.prototype,"url",null),(0,r._)([(0,u.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,u.Cb)()],y.prototype,"data",null),(0,r._)([(0,g.c)("data")],y.prototype,"writeData",null),(0,r._)([(0,h.r)("data")],y.prototype,"readData",null),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],y.prototype,"contentHash",null),y=l=(0,r._)([(0,f.j)("esri.geometry.support.MeshTexture")],y);const v=y},80218:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),o=n(2368),i=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011));let l=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(e,t,n)=>{n.d(t,{Q:()=>f,X:()=>m});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const p="esri.geometry.support.MeshVertexAttributes",h=a.Z.getLogger(p);let f=r=class extends i.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return m(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},h)}castPosition(e){return e&&e instanceof Float32Array&&h.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),m(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},h)}castUv(e){return m(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},h)}castNormal(e){return m(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},h)}castTangent(e){return m(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},h)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function g(e,t,n,r){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):e}function m(e,t,n,r,o){if(!e)return e;if(e instanceof t)return g(e,r,t,o);for(const i of n)if(e instanceof i)return g(new t(e),r,t,o);if(Array.isArray(e))return g(new t(e),r,t,o);{const r=n.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function d(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"color",void 0),(0,o._)([(0,c.p)("color")],f.prototype,"castColor",null),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:d}})],f.prototype,"position",void 0),(0,o._)([(0,c.p)("position")],f.prototype,"castPosition",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"uv",void 0),(0,o._)([(0,c.p)("uv")],f.prototype,"castUv",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"normal",void 0),(0,o._)([(0,c.p)("normal")],f.prototype,"castNormal",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"tangent",void 0),(0,o._)([(0,c.p)("tangent")],f.prototype,"castTangent",null),f=r=(0,o._)([(0,u.j)(p)],f)},84470:(e,t,n)=>{n.d(t,{CP:()=>a,JG:()=>g,LL:()=>l,NZ:()=>c,fV:()=>m,vj:()=>x,yT:()=>v,zE:()=>y});var r=n(3172),o=n(67676),i=n(95330),s=n(2981);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map((t=>t.toBlob(e))));return(0,i.k_)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.default)(this.partUrl,{responseType:"blob"});return(0,i.k_)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(f):f(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof a))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,h=/\.(gltf|glb)/i;function f(e){if(e instanceof File){const{type:t,name:n}=e;return p.test(t)||h.test(n)}return p.test(e.assetMimeType)||h.test(e.assetName)}function g(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){return Array.isArray(e)?e.every((e=>d(e,t))):d(e,t)}(n,t)}function m(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n].sort(e),o=[...r].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function d(e,t){return e instanceof a&&e.isOnService(t)}function x(e,t){return e instanceof File?(0,s.Ow)(e.name,t)??(0,s.S0)(e.type,t):(0,s.S0)(e.assetMimeType,t)??(0,s.Ow)(e.assetName,t)}function y(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},47545:(e,t,n)=>{n.d(t,{d:()=>i});var r=n(22021),o=n(24882);function i(e,t,n){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),h=n?.minReduction??0,f=n?.originalIndices||null,g=f?f.length:0,m=n?.componentOffsets||null;let d=0;if(m)for(let e=0;e<m.length-1;e++){const t=m[e+1]-m[e];t>d&&(d=t)}else d=u;const x=Math.floor(1.1*d)+1;(null==c||c.length<2*x)&&(c=new Uint32Array((0,r.Sf)(2*x)));for(let e=0;e<2*x;e++)c[e]=0;let y=0;const v=!!m&&!!f,w=v?g:u;let b=(0,o.$z)(u);const A=new Uint32Array(g),T=1.96;let C=0!==h?Math.ceil(4*T*T/(h*h)*h*(1-h)):w,Z=1,_=m?m[1]:w;for(let e=0;e<w;e++){if(e===C){const t=1-y/e;if(t+T*Math.sqrt(t*(1-t)/e)<h)return null;C*=2}if(e===_){for(let e=0;e<2*x;e++)c[e]=0;if(f)for(let e=m[Z-1];e<m[Z];e++)A[e]=b[f[e]];_=m[++Z]}const n=v?f[e]:e,r=n*t,o=l(p,r,t);let i=o%x,a=y;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(s(p,r,e*t,t)){a=b[e];break}}i++,i>=x&&(i-=x)}a===y&&(c[2*i]=o,c[2*i+1]=n+1,y++),b[n]=a}if(0!==h&&1-y/u<h)return null;if(v){for(let e=m[Z-1];e<A.length;e++)A[e]=b[f[e]];b=(0,o.mi)(A)}const S=i?new Array(y):new Uint32Array(y*t);y=0;for(let e=0;e<w;e++)b[e]===y&&(a(p,(v?f[e]:e)*t,S,y*t,t),y++);if(f&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=b[f[t]];b=(0,o.mi)(e)}return{buffer:Array.isArray(S)?S:S.buffer,indices:b,uniqueCount:y}}function s(e,t,n,r){for(let o=0;o<r;o++)if(e[t+o]!==e[n+o])return!1;return!0}function a(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[t+i]}function l(e,t,n){let r=0;for(let o=0;o<n;o++)r=e[t+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},91681:(e,t,n)=>{n.r(t),n.d(t,{assetMapFromAssetMapsJSON:()=>qe,extractMesh:()=>Ve,meshFeatureSetFromJSON:()=>Be});var r,o,i=n(38171),s=n(92604),a=n(30175),l=n(65617),c=n(6570),u=n(43697),p=n(20102),h=n(3920),f=n(83379),g=n(609),m=n(95330),d=n(17445),x=n(5600),y=(n(75215),n(67676),n(80442),n(52011)),v=n(9361),w=n(94139),b=n(38913),A=n(3709),T=n(62540),C=n(85872),Z=n(50567),_=n(84555),S=n(2674),M=n(71630),R=n(95401),F=n(86662),L=n(83025),j=n(24882),E=n(47545);function D(e,t,n){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const h=(0,L.bg)(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=e[p],m=n===r.CCW_IS_HOLE&&P(g);if(m&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const n={index:f,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=m?U(g,g.length-1,-1,h,f,g.length,t):U(g,0,1,h,f,g.length,t);for(let e=0;e<l;++e){const r=i[e];n.holeIndices[e]=f,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:f,count:r.length}),f=U(r,0,1,h,f,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=i[e];n.length>0&&(a[u++]={index:f,count:n.length}),f=U(n,0,1,h,f,n.length,t)}return s.length=c,a.length=u,{position:h,polygons:s,outlines:a}}function U(e,t,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];r[o++]=i[0],r[o++]=i[1],r[o++]=s?i[2]:0,t+=n}return o/3}function P(e){return!(0,F.bu)(e,!1,!1)}(o=r||(r={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var O=n(66459);let N=null;function I(e,t){let n=1/0,r=1/0,o=1/0,i=-1/0,s=-1/0,a=-1/0;const l=e.length;let u=0;for(;u<l;){const t=e[u++],l=e[u++],c=e[u++];n=Math.min(n,t),r=Math.min(r,l),o=Math.min(o,c),i=Math.max(i,t),s=Math.max(s,l),a=Math.max(a,c)}return new c.Z({xmin:n,ymin:r,zmin:o,xmax:i,ymax:s,zmax:a,spatialReference:t})}var k=n(17896),z=n(44547),W=n(13442);const H="esri.geometry.support.meshUtils.centerAt";const $=(0,l.c)(),B=(0,l.c)(),V=(0,l.c)();var q=n(81271);function G(e){const t=(0,q.Yd)(e.url);return n=>{const r=(0,q.PF)(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??n}}function J(e){return Q.fromBlob(e)}const K=/^(model\/gltf\+json)|(model\/gltf-binary)$/,Y=/\.(gltf|glb)/i;function X(e){const t=new Map;let n=null;for(const{name:r,mimeType:o,source:i}of e)(null==n||K.test(o)||Y.test(r))&&(n=i.url),t.set(r,i.url),i.files.forEach(((e,n)=>t.set(n,e)));if(null==n)throw new p.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new Q(n,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class Q{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new Q(t,(()=>URL.revokeObjectURL(t)))}}var ee=n(2368),te=n(46791),ne=n(84470);let re=class extends ee.j{constructor(){super(),this.externalSources=new te.Z,this._explicitDisplaySource=null}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,ne.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,ne.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.displaySource=null,this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,ne.JG)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(ne.NZ)}};(0,u._)([(0,x.Cb)()],re.prototype,"externalSources",void 0),(0,u._)([(0,x.Cb)()],re.prototype,"displaySource",null),(0,u._)([(0,x.Cb)()],re.prototype,"_implicitDisplaySource",null),(0,u._)([(0,x.Cb)()],re.prototype,"_explicitDisplaySource",void 0),re=(0,u._)([(0,y.j)("esri.geometry.support.meshUtils.Metadata")],re);var oe=n(21787),ie=n(46521),se=n(13598),ae=n(58995),le=n(56493);function ce(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const ue=(0,l.c)(),pe=(0,se.c)(),he=(0,ie.c)(),fe={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function ge(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];ye[0]=n[0],ye[4]=n[1],ye[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)xe[n]=e.position[t+n];(0,k.t)(xe,xe,ye);for(let n=0;n<3;n++)e.position[t+n]=xe[n]}if(n[0]!==n[1]||n[1]!==n[2]){ye[0]=1/n[0],ye[4]=1/n[1],ye[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)xe[n]=e.normal[t+n];(0,k.t)(xe,xe,ye),(0,k.n)(xe,xe);for(let n=0;n<3;n++)e.normal[t+n]=xe[n]}}}(e,n?.size);const{vertexAttributes:r,vertexSpace:o,transform:i}=(0,O.w1)(e,t,n);return{vertexAttributes:new M.Q({...r,uv:e.uv}),vertexSpace:o,transform:i,components:[new T.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const me={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},de={south:0,east:1,north:2,west:3,up:4,down:5},xe=(0,l.c)(),ye=(0,ie.c)();var ve=n(52138);const we="esri.geometry.support.meshUtils.rotate";function be(e,t,n,r=l.Z){if(null!=e){(0,ve.d)(Ze,(0,A.WH)(t),(0,A.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)Ae[n]=e[t+n]-r[n];(0,k.m)(Ae,Ae,Ze);for(let n=0;n<3;n++)e[t+n]=Ae[n]+r[n]}}}const Ae=(0,l.c)(),Te=(0,l.c)(),Ce=(0,A.Ue)(),Ze=(0,se.c)(),_e=(0,ie.c)(),Se=(0,l.c)(),Me="esri.geometry.support.meshUtils.scale";function Re(e,t,n=l.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Fe[t]=e[r+t]-n[t];(0,k.g)(Fe,Fe,t);for(let t=0;t<3;t++)e[r+t]=Fe[t]+n[t]}}const Fe=(0,l.c)(),Le=(0,l.c)(),je=(0,l.c)();var Ee;const De="esri.geometry.Mesh",Ue={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:Z.Z,"georeferenced-relative":C.Z,local:_.Z}};let Pe=Ee=class extends((0,h.p)(f.Z.LoadableMixin((0,g.v)(v.Z)))){constructor(e){super(e),this.components=null,this.vertexSpace=new Z.Z,this.transform=null,this.metadata=new re,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new M.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add((0,d.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:n,vertexSpace:r}=this,o=n.position;if(0===o.length||e&&0===e.length)return new c.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===r.type){const{_untransformedExtent:e,transform:n}=this;return function({xmin:e,xmax:t,ymin:n,ymax:r,zmin:o,zmax:i},s,a,l){o??=0,i??=0,N??=new Float64Array(24);const c=N;return c[0]=e,c[1]=n,c[2]=o,c[3]=e,c[4]=r,c[5]=o,c[6]=t,c[7]=r,c[8]=o,c[9]=t,c[10]=n,c[11]=o,c[12]=e,c[13]=n,c[14]=i,c[15]=e,c[16]=r,c[17]=i,c[18]=t,c[19]=r,c[20]=i,c[21]=t,c[22]=n,c[23]=i,(0,O.iV)(l,s,a,c,l,c),I(c,l)}(e,n,r,t)}if("georeferenced-relative"===r.type){const{transform:e}=this;return I((0,O.iV)(t,e,r,o,t),t)}return I(o,t)}get _untransformedExtent(){return I(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const{center:t,zmin:n}=this._transformedExtent;return new w.Z({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(T.Z.from(e)),this.notifyChange("components")):s.Z.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.Z.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else s.Z.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,n,r){return(0,A.qw)(e,t,n,Ne),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,W.A)(o,we,n);const r=n?.origin??e.origin;e.transform??=new S.Z,function(e,t,n,r){const o=t.origin,i=(0,k.s)(Ae,r.x,r.y,r.z??0),s=(0,k.b)(Ae,i,o);e.applyLocalInverse(s,Te),e.rotation=(0,A.qC)(e.rotation,n,(0,A.Ue)()),e.applyLocalInverse(s,s),(0,k.b)(s,s,Te),e.translation=(0,k.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,r)}else{const o=n?.origin??e.origin;(0,W.h)(r,n)?function(e,t,n){const r=e.spatialReference,o=(0,ae.rS)(r),i=Se;(0,z.KC)(n,i,o)||(0,z.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,z.Bm)(o,i,Ze,o),(0,oe.f)(_e,Ze);const h=Ce;(0,k.t)((0,A.ZZ)(Ce),(0,A.ZZ)(t),_e),h[3]=t[3],(0,le.XO)(s,r,c),null!=a&&null!=u&&(0,le.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,le.wi)(l,s,c,r,p),be(c,h,3,i),(0,le.To)(c,s,r),null!=a&&null!=u&&(be(u,h,3),(0,le.Yk)(u,s,c,r,a)),null!=l&&null!=p&&(be(p,h,4),(0,le.M2)(p,s,c,r,l)),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=Se;if(!(0,z.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(we).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}be(e.vertexAttributes.position,t,3,r),be(e.vertexAttributes.normal,t,3),be(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}}(this,Ne,r),this}offset(e,t,n,r){return this.loaded?(Oe[0]=e,Oe[1]=t,Oe[2]=n,function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e;r.isRelative?((0,W.A)(r,"esri.geometry.support.meshUtils.offset",n),function(e,t){const n=e.origin;e.origin=(0,k.a)((0,l.c)(),n,t)}(r,t)):(0,W.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,o=e.vertexAttributes.normal,i=e.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=o?new Float32Array(o.length):null,l=null!=i?new Float32Array(i.length):null,c=e.extent.center,u=ue;(0,z.Bm)(n,[c.x,c.y,c.z],pe,(0,ae.rS)(n)),(0,oe.f)(he,pe),(0,k.t)(u,t,he),(0,le.XO)(r,n,s),null!=o&&null!=a&&(0,le.Iz)(o,r,s,n,a),null!=i&&null!=l&&(0,le.wi)(i,r,s,n,l),ce(s,u),(0,le.To)(s,r,n),null!=o&&null!=a&&(0,le.Yk)(a,r,s,n,o),null!=i&&null!=l&&(0,le.M2)(l,r,s,n,i),e.vertexAttributesChanged()}(e,t):function(e,t){ce(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t)}(this,Oe,r),this):(s.Z.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:r,vertexSpace:o}=e;if(o.isRelative){(0,W.A)(o,Me,n);const r=n?.origin??e.origin;e.transform??=new S.Z,function(e,t,n,r){const o=t.origin,i=(0,k.s)(Fe,r.x,r.y,r.z),s=(0,k.b)(Fe,i,o);e.applyLocalInverse(s,Le);const a=(0,k.g)((0,l.c)(),e.scale,n);e.scale=a,e.applyLocalInverse(s,s),(0,k.b)(s,s,Le),e.translation=(0,k.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,r)}else{const o=(0,W.h)(r,n),i=n?.origin??e.origin;o?function(e,t,n){const r=e.spatialReference,o=(0,ae.rS)(r),i=je;(0,z.KC)(n,i,o)||(0,z.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,le.XO)(s,r,c),null!=a&&null!=u&&(0,le.Iz)(a,s,c,r,u),null!=l&&null!=p&&(0,le.wi)(l,s,c,r,p),Re(c,t,i),(0,le.To)(c,s,r),null!=a&&null!=u&&(0,le.Yk)(u,s,c,r,a),null!=l&&null!=p&&(0,le.M2)(p,s,c,r,l),e.vertexAttributesChanged()}(e,t,i):function(e,t,n){const r=je;if(!(0,z.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(Me).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Re(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,i)}}(this,e,t),this):(s.Z.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin;r.isRelative?((0,W.A)(r,H,n),function(e,t,n){const{vertexSpace:r}=e;if(!r.isRelative)return;const o=B,i=$;if(!(0,z.KC)(t,i,e.spatialReference))return void s.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!(0,z.KC)(n,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,s.Z.getLogger(H).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const a=(0,k.b)(V,i,o),c=r.origin;r.origin=(0,k.a)((0,l.c)(),c,a)}(e,t,o)):(0,W.h)(e.spatialReference,n)?function(e,t,n){const r=(0,O.FF)(e.vertexAttributes,n,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,O.iv)(r,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=B,o=$;if((0,z.KC)(t,o,e.spatialReference)){if(!(0,z.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,s.Z.getLogger(H).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let o=0;o<3;o++)e[r+o]+=t[o]-n[o]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else s.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(e,t,o)}(this,e,t),this):(s.Z.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){const{source:o}=t,{loadGLTFMesh:i}=await(0,m.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new p.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return X(e.map((e=>({name:e.name,mimeType:e.type,source:J(e)}))))}(e):async function(e,t){const n=await(0,m.WW)(e.map((async e=>{const n=await async function(e,t){const{parts:n}=e;if(1===n.length)return new Q(n[0].partUrl);const r=await e.toBlob(t);return(0,m.k_)(t),Q.fromBlob(r)}(e);return(0,m.k_)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if((0,m.Hc)(t))throw n.forEach((e=>e.source.dispose())),(0,m.zE)();return X(n)}(e,t)}return J(e)}(o,r);(0,m.k_)(r);const a=i(new w.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:G(s),useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:c}=await a;e.vertexAttributes=l,e.components=c}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,n=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,n)))}const n={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ee(n)}cloneShallow(){return new Ee({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=n.e(7277).then(n.bind(n,7277)),r=this.load(),o=await Promise.all([t,r]),{toBinaryGLTF:i}=o[0];return i(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(De).error(".createBox()","expected location to be a Point instance"),null;const n=new Ee(ge(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=me,r=4*e.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let r=0;r<e.length;r++){const h=e[r],f=l/3;for(const e of t)a[p++]=f+e;const g=h.corners;for(let e=0;e<4;e++){const t=g[e];let r=0;s[u++]=.25*n[e][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==h.axis[e]?(o[l++]=.5*h.axis[e],i[c++]=h.axis[e]):(o[l++]=.5*t[r++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,o=de[t],i=6*o,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let e=0;e<r.length;e++)e>=i&&e<i+6?s[l++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new T.Z({faces:s,material:n.material}),new T.Z({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof w.Z?new Ee(ge(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,h=Math.cos(r),f=Math.sin(r);xe[2]=f;const g=0===e||e===t,m=g?n-1:n;for(let r=0;r<=m;r++){const f=r/m*2*Math.PI;xe[0]=-Math.sin(f)*h,xe[1]=Math.cos(f)*h;for(let e=0;e<3;e++)o[l]=.5*xe[e],i[l]=xe[e],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=p,a[u++]=p+1,a[u++]=p-n),1!==e&&(a[u++]=p,a[u++]=p-n,a[u++]=p-n-1)),p++}}return{position:o,normal:i,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(De).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof w.Z?new Ee(ge(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const n=0===e||5===e,h=e<=1||e>=4,f=2===e||4===e,g=n?t-1:t;for(let m=0;m<=g;m++){const d=m/g*2*Math.PI,x=n?0:.5;xe[0]=x*Math.sin(d),xe[1]=x*-Math.cos(d),xe[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=xe[t],o[l++]=h?2===t?e<=1?1:-1:0:2===t?0:xe[t]/x;i[c++]=(m+(n?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,f||0===e||m===t||(5!==e&&(s[u++]=p,s[u++]=p+1,s[u++]=p-t),1!==e&&(s[u++]=p,s[u++]=p-t,s[u++]=p-t-1)),p++}}return{position:r,normal:o,uv:i,faces:s}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(De).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(De).error(".createPlane()","expected location to be a Point instance"),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new Ee(ge(function(e){const t=fe.facingAxisOrderSwap[e],n=fe.position,r=fe.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=n[e+c]*u,i[s]=r[e+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(fe.uv),faces:new Uint32Array(fe.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof b.Z))return s.Z.getLogger(De).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(e){const t=D(e.rings,e.hasZ,r.CCW_IS_HOLE),n=new Array;let o=0,i=0;for(const e of t.polygons){const r=e.count,s=e.index,a=(0,L.Rq)(t.position,3*s,3*r),l=e.holeIndices.map((e=>e-s)),c=(0,j.mi)((0,R.e)(a,l,3));n.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(e,t,n){if(1===e.length)return e[0];const r=(0,L.bg)(t),o=new Array(n);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[i++]=t.position[e];for(const e of t.faces)o[s++]=e+a;a=i/3}return{position:r,faces:(0,j.mi)(o)}}(n,o,i),a=Array.isArray(s.position)?(0,E.d)(s.position,3,{originalIndices:s.faces}):(0,E.d)(s.position.buffer,6,{originalIndices:s.faces});return s.position=(0,L.QZ)(new Float64Array(a.buffer)),s.faces=a.indices,s}(e);return new Ee({vertexAttributes:new M.Q({position:n.position}),components:[new T.Z({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new Z.Z})}static async createFromGLTF(e,t,r){if(!(e instanceof w.Z))throw s.Z.getLogger(De).error(".createfromGLTF()","expected location to be a Point instance"),new p.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,m.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new Ee(await o(e,t,r))}static async createFromFiles(e,t,n){if(!(e instanceof w.Z)){const e="Expected location to be a Point instance";throw s.Z.getLogger(De).error(".createFromFiles()",e),new p.Z("invalid-input",e)}const r=Ee.createWithExternalSource(e,t),o=n?.layer;if(!o){const e="A layer is needed to convert the files";throw s.Z.getLogger(De).error(".createFromFiles()",e),new p.Z("invalid-input",e)}const[i]=await o.uploadAssets([r],n);return i}static createWithExternalSource(e,t,n){const r=n?.extent??null,{x:o,y:i,z:s,spatialReference:a}=e,l=n?.transform?.clone()??new S.Z,c=n?.vertexSpace??new _.Z({origin:[o,i,s??0]}),u={source:t,extent:r},p=new re;return p.externalSources.push(u),new Ee({metadata:p,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(e,t){const{x:n,y:r,z:o,spatialReference:i}=e,s=t?.transform?.clone()??new S.Z,a=t?.vertexSpace??new _.Z({origin:[n,r,o??0]}),l=new Ee({transform:s,vertexSpace:a,spatialReference:i});return l.addResolvingPromise(Promise.reject(new p.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,u._)([(0,x.Cb)({type:[T.Z],json:{write:!0}})],Pe.prototype,"components",void 0),(0,u._)([(0,x.Cb)({nonNullable:!0,types:Ue,constructOnly:!0,json:{write:!0}})],Pe.prototype,"vertexSpace",void 0),(0,u._)([(0,x.Cb)({type:S.Z,json:{write:!0}})],Pe.prototype,"transform",void 0),(0,u._)([(0,x.Cb)({constructOnly:!0})],Pe.prototype,"metadata",void 0),(0,u._)([(0,x.Cb)()],Pe.prototype,"hasExtent",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"_transformedExtent",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"_untransformedExtent",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"anchor",null),(0,u._)([(0,x.Cb)()],Pe.prototype,"origin",null),(0,u._)([(0,x.Cb)({readOnly:!0,json:{read:!1}})],Pe.prototype,"extent",null),(0,u._)([(0,x.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Pe.prototype,"hasZ",void 0),(0,u._)([(0,x.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Pe.prototype,"hasM",void 0),(0,u._)([(0,x.Cb)({type:M.Q,nonNullable:!0,json:{write:!0}})],Pe.prototype,"vertexAttributes",void 0),Pe=Ee=(0,u._)([(0,y.j)(De)],Pe);const Oe=(0,l.c)(),Ne=(0,A.Ue)(),Ie=Pe;var ke,ze,We=n(82971),He=n(2981),$e=n(74889);function Be(e,t,n){const r=n.features;n.features=[],delete n.geometryType;const o=$e.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=qe(t,n.assetMaps),a=e.sourceSpatialReference??We.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(p=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!p)return e;for(const t in e)p.has(t)||delete e[t];return e}):()=>({});var p;for(const e of r){const n=Ve(e,l,a,t,s);null!=n&&o.features.push(new i.Z({geometry:n,attributes:u(e)}))}return o}function Ve(e,t,n,r,o){const i=e.attributes[t],s=o.get(i);if(null==s||!e.geometry)return null;const{originPoint:a,originVector:u}=function({attributes:e},t,{transformFieldRoles:n}){const r=e[n.originX],o=e[n.originY],i=e[n.originZ];return{originPoint:new w.Z({x:r,y:o,z:i,spatialReference:t}),originVector:(0,l.f)(r,o,i)}}(e,n,r),p=c.Z.fromJSON(e.geometry);p.spatialReference=n;const h=function(e,{transformFieldRoles:t}){return new S.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotationAxis:[e[t.rotationX],e[t.rotationZ],e[t.rotationY]],rotationAngle:e[t.rotationDeg],scale:[e[t.scaleX],e[t.scaleY],e[t.scaleZ]]})}(e.attributes,r),f=s.projectVertices?new C.Z({origin:u}):new _.Z({origin:u}),g=function(e){const t=Array.from(e.files.values()),n=new Array;for(const e of t){if(e.status!==ke.COMPLETED)return null;const t=new Array;for(const n of e.parts){if(!n)return null;t.push(new ne.LL(n.url,n.hash))}n.push(new ne.CP(e.name,e.mimeType,t))}return n}(s);return g?Ie.createWithExternalSource(a,g,{extent:p,transform:h,vertexSpace:f}):Ie.createIncomplete(a,{extent:p,transform:h,vertexSpace:f})}function qe(e,t){const n=new Map;for(const r of t){const t=r.parentGlobalId;if(null==t)continue;const o=r.assetName,i=r.assetType,l=r.assetHash,c=r.assetURL,u=r.conversionStatus,p=r.seqNo,h=(0,He.d1)(i,e.supportedFormats);if(!h){s.Z.getLogger("esri.rest.support.meshFeatureSet").error("mesh-feature-set:unknown-format",`Service returned an asset of type ${i}, but it does not list it as a supported type`);continue}const f=(0,a.s1)(n,t,(()=>({projectVertices:Je(r.flags).projectVertices,files:new Map})));(0,a.s1)(f.files,o,(()=>({name:o,type:i,mimeType:h,status:Ge(u),parts:[]}))).parts[p]={hash:l,url:c}}return n}function Ge(e){switch(e){case"COMPLETED":case"SUBMITTED":return ke.COMPLETED;case"INPROGRESS":return ke.PENDING;default:return ke.FAILED}}function Je(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(ze=ke||(ke={}))[ze.FAILED=0]="FAILED",ze[ze.PENDING=1]="PENDING",ze[ze.COMPLETED=2]="COMPLETED"}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>l,e:()=>c,f:()=>o,i:()=>h,m:()=>u,s:()=>a,t:()=>i});var r=n(46851);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function a(t,e,n,r,o,a,i,c,s,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=i,t[6]=c,t[7]=s,t[8]=u,t}function i(t,e){if(t===e){const n=e[1],r=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function c(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s;let g=n*f+r*h+o*p;return g?(g=1/g,t[0]=f*g,t[1]=(-l*r+o*u)*g,t[2]=(c*r-o*i)*g,t[3]=h*g,t[4]=(l*n-o*s)*g,t[5]=(-c*n+o*a)*g,t[6]=p*g,t[7]=(-u*n+r*s)*g,t[8]=(i*n-r*a)*g,t):null}function s(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8];return t[0]=i*l-c*u,t[1]=o*u-r*l,t[2]=r*c-o*i,t[3]=c*s-a*l,t[4]=n*l-o*s,t[5]=o*a-n*c,t[6]=a*u-i*s,t[7]=r*s-n*u,t[8]=n*i-r*a,t}function u(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1],g=n[2],y=n[3],M=n[4],d=n[5],m=n[6],b=n[7],A=n[8];return t[0]=h*r+p*i+g*u,t[1]=h*o+p*c+g*l,t[2]=h*a+p*s+g*f,t[3]=y*r+M*i+d*u,t[4]=y*o+M*c+d*l,t[5]=y*a+M*s+d*f,t[6]=m*r+b*i+A*u,t[7]=m*o+b*c+A*l,t[8]=m*a+b*s+A*f,t}function l(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=e[4],c=e[5],s=e[6],u=e[7],l=e[8],f=e[9],h=e[10],p=e[11],g=e[12],y=e[13],M=e[14],d=e[15],m=n*c-r*i,b=n*s-o*i,A=n*u-a*i,P=r*s-o*c,v=r*u-a*c,w=o*u-a*s,_=l*y-f*g,x=l*M-h*g,F=l*d-p*g,S=f*M-h*y,T=f*d-p*y,C=h*d-p*M;let O=m*C-b*T+A*S+P*F-v*x+w*_;return O?(O=1/O,t[0]=(c*C-s*T+u*S)*O,t[1]=(s*F-i*C-u*x)*O,t[2]=(i*T-c*F+u*_)*O,t[3]=(o*T-r*C-a*S)*O,t[4]=(n*C-o*F+a*x)*O,t[5]=(r*F-n*T-a*_)*O,t[6]=(y*w-M*v+d*P)*O,t[7]=(M*A-g*w-d*b)*O,t[8]=(g*v-y*A+d*m)*O,t):null}function f(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function h(t){const e=(0,r.g)(),n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8];return Math.abs(1-(n*n+i*i+u*u))<=e&&Math.abs(1-(o*o+c*c+l*l))<=e&&Math.abs(1-(a*a+s*s+f*f))<=e}const p=u,g=f;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:s,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],i=t[5],c=t[6],s=t[7],u=t[8];return e*(u*a-i*s)+n*(-u*o+i*c)+r*(s*o-a*c)},equals:function(t,e){const n=t[0],o=t[1],a=t[2],i=t[3],c=t[4],s=t[5],u=t[6],l=t[7],f=t[8],h=e[0],p=e[1],g=e[2],y=e[3],M=e[4],d=e[5],m=e[6],b=e[7],A=e[8],P=(0,r.g)();return Math.abs(n-h)<=P*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(o-p)<=P*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-g)<=P*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(i-y)<=P*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(c-M)<=P*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(s-d)<=P*Math.max(1,Math.abs(s),Math.abs(d))&&Math.abs(u-m)<=P*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(l-b)<=P*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(f-A)<=P*Math.max(1,Math.abs(f),Math.abs(A))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:o,fromQuat:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n+n,c=r+r,s=o+o,u=n*i,l=r*i,f=r*c,h=o*i,p=o*c,g=o*s,y=a*i,M=a*c,d=a*s;return t[0]=1-f-g,t[3]=l-d,t[6]=h+M,t[1]=l+d,t[4]=1-u-g,t[7]=p-y,t[2]=h-M,t[5]=p+y,t[8]=1-u-f,t},fromRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:c,isOrthoNormal:h,mul:p,multiply:u,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:l,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[4],i=e[5],c=e[6],s=e[8],u=e[9],l=e[10],f=l*i-c*u,h=-l*a+c*s,p=u*a-i*s,g=n*f+r*h+o*p;if(!g)return null;const y=1/g;return t[0]=f*y,t[1]=(-l*r+o*u)*y,t[2]=(c*r-o*i)*y,t[3]=h*y,t[4]=(l*n-o*s)*y,t[5]=(-c*n+o*a)*y,t[6]=p*y,t[7]=(-u*n+r*s)*y,t[8]=(i*n-r*a)*y,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=Math.sin(n),p=Math.cos(n);return t[0]=p*r+h*i,t[1]=p*o+h*c,t[2]=p*a+h*s,t[3]=p*i-h*r,t[4]=p*c-h*o,t[5]=p*s-h*a,t[6]=u,t[7]=l,t[8]=f,t},scale:function(t,e,n){const r=n[0],o=n[1],a=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t[6]=a*e[6],t[7]=a*e[7],t[8]=a*e[8],t},scaleByVec2:function(t,e,n){const r=n[0],o=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t},set:a,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:g,subtract:f,translate:function(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=e[4],s=e[5],u=e[6],l=e[7],f=e[8],h=n[0],p=n[1];return t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=c,t[5]=s,t[6]=h*r+p*i+u,t[7]=h*o+p*c+l,t[8]=h*a+p*s+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},46521:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,n,r,o,a,i,c,s){return[t,e,n,r,o,a,i,c,s]}function a(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>a,c:()=>r,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,createView:a,fromValues:o},Symbol.toStringTag,{value:"Module"}))},13598:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function a(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>i,a:()=>a,b:()=>o,c:()=>r});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,createView:a,fromValues:function(t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y){return[t,e,n,r,o,a,i,c,s,u,l,f,h,p,g,y]}},Symbol.toStringTag,{value:"Module"}))},51305:(t,e,n)=>{n.d(e,{c:()=>p,g:()=>l,j:()=>T,k:()=>y,m:()=>f,s:()=>u});var r=n(46521),o=n(94961),a=n(65617),i=n(46851),c=n(17896),s=n(98766);function u(t,e,n){n*=.5;const r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function l(t,e){const n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>(0,i.g)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function f(t,e,n){const r=e[0],o=e[1],a=e[2],i=e[3],c=n[0],s=n[1],u=n[2],l=n[3];return t[0]=r*l+i*c+o*u-a*s,t[1]=o*l+i*s+a*c-r*u,t[2]=a*l+i*u+r*s-o*c,t[3]=i*l-r*c-o*s-a*u,t}function h(t,e,n,r){const o=e[0],a=e[1],c=e[2],s=e[3];let u,l,f,h,p,g=n[0],y=n[1],M=n[2],d=n[3];return l=o*g+a*y+c*M+s*d,l<0&&(l=-l,g=-g,y=-y,M=-M,d=-d),1-l>(0,i.g)()?(u=Math.acos(l),f=Math.sin(u),h=Math.sin((1-r)*u)/f,p=Math.sin(r*u)/f):(h=1-r,p=r),t[0]=h*o+p*g,t[1]=h*a+p*y,t[2]=h*c+p*M,t[3]=h*s+p*d,t}function p(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function g(t,e){const n=e[0]+e[4]+e[8];let r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const o=(n+1)%3,a=(n+2)%3;r=Math.sqrt(e[3*n+n]-e[3*o+o]-e[3*a+a]+1),t[n]=.5*r,r=.5/r,t[3]=(e[3*o+a]-e[3*a+o])*r,t[o]=(e[3*o+n]+e[3*n+o])*r,t[a]=(e[3*a+n]+e[3*n+a])*r}return t}function y(t,e,n,r){const o=.5*Math.PI/180;e*=o,n*=o,r*=o;const a=Math.sin(e),i=Math.cos(e),c=Math.sin(n),s=Math.cos(n),u=Math.sin(r),l=Math.cos(r);return t[0]=a*s*l-i*c*u,t[1]=i*c*l+a*s*u,t[2]=i*s*u-a*c*l,t[3]=i*s*l+a*c*u,t}const M=s.c,d=s.s,m=s.a,b=f,A=s.b,P=s.d,v=s.l,w=s.e,_=w,x=s.f,F=x,S=s.n,T=s.g,C=s.h,O=(0,a.c)(),R=(0,a.f)(1,0,0),B=(0,a.f)(0,1,0),Z=(0,o.a)(),j=(0,o.a)(),V=(0,r.c)();Object.freeze(Object.defineProperty({__proto__:null,add:m,calculateW:function(t,e){const n=e[0],r=e[1],o=e[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t},conjugate:p,copy:M,dot:P,equals:C,exactEquals:T,fromEuler:y,fromMat3:g,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const n=e[0],r=e[1],o=e[2],a=e[3],i=n*n+r*r+o*o+a*a,c=i?1/i:0;return t[0]=-n*c,t[1]=-r*c,t[2]=-o*c,t[3]=a*c,t},len:_,length:w,lerp:v,mul:b,multiply:f,normalize:S,random:function(t){const e=i.R,n=e(),r=e(),o=e(),a=Math.sqrt(1-n),c=Math.sqrt(n);return t[0]=a*Math.sin(2*Math.PI*r),t[1]=a*Math.cos(2*Math.PI*r),t[2]=c*Math.sin(2*Math.PI*o),t[3]=c*Math.cos(2*Math.PI*o),t},rotateX:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+i*c,t[1]=o*s+a*c,t[2]=a*s-o*c,t[3]=i*s-r*c,t},rotateY:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s-a*c,t[1]=o*s+i*c,t[2]=a*s+r*c,t[3]=i*s-o*c,t},rotateZ:function(t,e,n){n*=.5;const r=e[0],o=e[1],a=e[2],i=e[3],c=Math.sin(n),s=Math.cos(n);return t[0]=r*s+o*c,t[1]=o*s-r*c,t[2]=a*s+i*c,t[3]=i*s-a*c,t},rotationTo:function(t,e,n){const r=(0,c.e)(e,n);return r<-.999999?((0,c.f)(O,R,e),(0,c.u)(O)<1e-6&&(0,c.f)(O,B,e),(0,c.n)(O,O),u(t,O,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,c.f)(O,e,n),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+r,S(t,t))},scale:A,set:d,setAxes:function(t,e,n,r){const o=V;return o[0]=n[0],o[3]=n[1],o[6]=n[2],o[1]=r[0],o[4]=r[1],o[7]=r[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],S(t,g(t,o))},setAxisAngle:u,slerp:h,sqlerp:function(t,e,n,r,o,a){return h(Z,e,o,a),h(j,n,r,a),h(t,Z,j,2*a*(1-a)),t},sqrLen:F,squaredLength:x,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>i,a:()=>r,b:()=>o,c:()=>a});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,createView:a,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},20773:(t,e,n)=>{n.d(e,{a:()=>c,b:()=>i,c:()=>o,d:()=>l,e:()=>s,n:()=>f,s:()=>u,t:()=>a});var r=n(72220);function o(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return r.c.error("source and destination buffers need to have the same number of elements"),t;const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[4],f=n[5],h=n[6],p=n[8],g=n[9],y=n[10],M=n[12],d=n[13],m=n[14];let b=0,A=0;for(let n=0;n<i;n++){const n=e[b],r=e[b+1],i=e[b+2];t[A]=c*n+l*r+p*i+M,t[A+1]=s*n+f*r+g*i+d,t[A+2]=u*n+h*r+y*i+m,b+=a,A+=o}return t}function i(t,e,n){c(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function c(t,e,n,o=3,a=o){if(t.length/o!==Math.ceil(e.length/a))return void r.c.error("source and destination buffers need to have the same number of elements");const i=t.length/o,c=n[0],s=n[1],u=n[2],l=n[3],f=n[4],h=n[5],p=n[6],g=n[7],y=n[8];let M=0,d=0;for(let n=0;n<i;n++){const n=e[M],r=e[M+1],i=e[M+2];t[d]=c*n+l*r+p*i,t[d+1]=s*n+f*r+g*i,t[d+2]=u*n+h*r+y*i,M+=a,d+=o}}function s(t,e,n){u(t.typedBuffer,e,n,t.typedBufferStride)}function u(t,e,n,r=3){const o=Math.min(t.length/r,e.count),a=e.typedBuffer,i=e.typedBufferStride;let c=0,s=0;for(let e=0;e<o;e++)t[s]=n*a[c],t[s+1]=n*a[c+1],t[s+2]=n*a[c+2],c+=i,s+=r}function l(t,e){f(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function f(t,e,n=3,r=n){const o=Math.min(t.length/n,e.length/r);let a=0,i=0;for(let c=0;c<o;c++){const o=e[a],c=e[a+1],s=e[a+2],u=o*o+c*c+s*s;if(u>0){const e=1/Math.sqrt(u);t[i]=e*o,t[i+1]=e*c,t[i+2]=e*s}a+=r,i+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:f,normalizeView:l,scale:u,scaleView:s,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),o=t.typedBuffer,a=t.typedBufferStride,i=e.typedBuffer,c=e.typedBufferStride;let s=0,u=0;for(let t=0;t<r;t++)o[u]=i[s]>>n,o[u+1]=i[s+1]>>n,o[u+2]=i[s+2]>>n,s+=c,u+=a},transformMat3:c,transformMat3View:i,transformMat4:a,transformMat4View:o},Symbol.toStringTag,{value:"Module"}))},58995:(t,e,n)=>{n.d(e,{rS:()=>u});var r=n(2109),o=n(82971),a=n(8744);const i=new o.Z(r.kU),c=new o.Z(r.JL),s=new o.Z(r.mM);function u(t){return t&&((0,a.BZ)(t)||(0,a.fS)(t,c))?c:t&&((0,a.V2)(t)||(0,a.fS)(t,s))?s:i}new o.Z(r.pn)},83025:(t,e,n)=>{n.d(e,{JK:()=>c,QZ:()=>a,Rq:()=>i,bg:()=>o});var r=n(1533);function o(t,e=!1){return t<=r.DB?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function a(t){return((0,r.kJ)(t)?t.length:t.byteLength/8)<=r.DB?Array.from(t):new Float64Array(t)}function i(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function c(t,e){for(let n=0;n<e.length;++n)t[n]=e[n];return t}},85872:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],f);const h=f},50567:(t,e,n)=>{n.d(e,{Z:()=>u});var r=n(43697),o=n(2368),a=n(96674),i=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),c=n(52011);let s=class extends((0,o.J)(a.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,i.J)({georeferenced:"georeferenced"},{readOnly:!0})],s.prototype,"type",void 0),s=(0,r._)([(0,c.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],s);const u=s},84555:(t,e,n)=>{n.d(e,{Z:()=>h});var r=n(43697),o=n(2368),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(36030)),s=n(52011),u=n(65617),l=n(94139);let f=class extends((0,o.J)(a.wq)){constructor(t){super(t),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,u.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new l.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFormPoint({x:t,y:e,z:n}){this.origin=(0,u.f)(t,e,n??0)}};(0,r._)([(0,c.J)({local:"local"},{readOnly:!0})],f.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,r._)([(0,s.j)("esri.geometry.support.MeshLocalVertexSpace")],f);const h=f},2674:(t,e,n)=>{n.d(e,{Z:()=>d});var r,o=n(43697),a=n(96674),i=n(5600),c=(n(75215),n(67676),n(80442),n(52011)),s=n(52138),u=n(13598),l=n(51305),f=n(94961),h=n(17896),p=n(65617),g=n(3709);let y=r=class extends a.wq{constructor(t){super(t),this.translation=(0,p.c)(),this.rotationAxis=(0,p.g)(g.UP),this.rotationAngle=0,this.scale=(0,p.f)(1,1,1)}get rotation(){return(0,g.uT)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.a)((0,g.ZZ)(t)),this.rotationAngle=(0,g.EU)(t)}get localMatrix(){const t=(0,u.c)();return(0,l.s)(M,(0,g.ZZ)(this.rotation),(0,g.WH)(this.rotation)),(0,s.g)(t,M,this.translation,this.scale),t}get localMatrixInverse(){return(0,s.a)((0,u.c)(),this.localMatrix)}applyLocal(t,e){return(0,h.m)(e,t,this.localMatrix)}applyLocalInverse(t,e){return(0,h.m)(e,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&(0,s.h)(this.localMatrix,t.localMatrix)}clone(){const t={translation:(0,p.a)(this.translation),rotationAxis:(0,p.a)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.a)(this.scale)};return new r(t)}};(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,o._)([(0,i.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,o._)([(0,i.Cb)()],y.prototype,"rotation",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrix",null),(0,o._)([(0,i.Cb)()],y.prototype,"localMatrixInverse",null),y=r=(0,o._)([(0,c.j)("esri.geometry.support.MeshTransform")],y);const M=(0,f.a)(),d=y},3709:(t,e,n)=>{n.d(e,{EU:()=>p,UP:()=>y,Ue:()=>s,WH:()=>g,ZZ:()=>h,qC:()=>l,qw:()=>f,uT:()=>u});var r=n(22021),o=n(51305),a=n(94961),i=n(17896),c=n(65617);function s(t=y){return[t[0],t[1],t[2],t[3]]}function u(t,e,n=s()){return(0,i.c)(n,t),n[3]=e,n}function l(t,e,n=s()){return(0,o.s)(M,t,g(t)),(0,o.s)(d,e,g(e)),(0,o.m)(M,d,M),function(t,e){return t[3]=e,t}(n,(0,r.BV)((0,o.g)(n,M)))}function f(t,e,n,r=s()){return u(c.d,t,m),u(c.e,e,b),u(c.U,n,A),l(m,b,m),l(m,A,r),r}function h(t){return t}function p(t){return t[3]}function g(t){return(0,r.Vl)(t[3])}const y=[0,0,1,0],M=(0,a.a)(),d=(0,a.a)(),m=(s(),s()),b=s(),A=s()},72220:(t,e,n)=>{n.d(e,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},13442:(t,e,n)=>{n.d(e,{A:()=>a,h:()=>o});var r=n(92604);function o(t,e){return t.isGeographic||t.isWebMercator&&(e?.geographic??!0)}function a(t,e,n){const o=!t.isGeoreferenced;null!=n?.geographic&&n.geographic!==o&&r.Z.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${n.geographic}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}},66459:(t,e,n)=>{n.d(e,{FF:()=>w,I5:()=>P,Yq:()=>_,iV:()=>x,iv:()=>A,w1:()=>v});var r=n(67900),o=n(46521),a=n(52138),i=n(13598),c=n(17896),s=n(65617),u=n(21787),l=n(44547),f=n(58995),h=n(83025),p=n(85872),g=n(50567),y=n(84555),M=n(2674),d=n(20773),m=n(13442),b=n(56493);function A(t,e,n){return(0,m.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference,o=C(e,n,Z),a=new Float64Array(t.position.length),i=function(t,e,n,r){(0,d.t)(r,t,e);const o=new Float64Array(t.length);return(0,b.To)(r,o,n)}(t.position,o,r,a),c=(0,u.b)(V,o);return{position:i,normal:F(i,a,t.normal,c,r),tangent:S(i,a,t.tangent,c,r)}}(t,e,n):function(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,s=B(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=o[t]*s+a,r[t+1]=o[t+1]*s+i,r[t+2]=o[t+2]*s+c;return{position:r,normal:t.normal,tangent:t.tangent}}(t,e,n)}function P(t,e,n,r){const{position:o,normal:a,tangent:c}=t;if(!e.isRelative)return{position:o,normal:a,tangent:c};const s=n?.localMatrix??i.I;return A({position:(0,d.t)(new Float64Array(o.length),o,s),normal:null!=a?(0,b.w9)(a,new Float32Array(a.length),s):null,tangent:null!=c?(0,b.VS)(c,new Float32Array(c.length),s):null},e.getOriginPoint(r),{geographic:!e.isGeoreferenced})}function v(t,e,n){if(n?.useTransform){const{position:r,normal:o,tangent:a}=t,{x:i,y:c,z:u}=e,l=(0,s.f)(i,c,u??0);return{vertexAttributes:{position:r,normal:o,tangent:a},vertexSpace:n.geographic??1?new y.Z({origin:l}):new p.Z({origin:l}),transform:new M.Z}}return{vertexAttributes:A(t,e,n),vertexSpace:new g.Z,transform:null}}function w(t,e,n){return(0,m.h)(e.spatialReference,n)?function(t,e,n){const r=e.spatialReference;C(e,n,Z);const o=(0,a.a)(j,Z),i=new Float64Array(t.position.length),c=function(t,e,n,r){const o=(0,b.XO)(t,e,r),a=new Float64Array(o.length);return(0,d.t)(a,o,n),a}(t.position,r,o,i),s=(0,u.b)(V,o);return{position:c,normal:O(t.normal,t.position,i,r,s),tangent:R(t.tangent,t.position,i,r,s)}}(t,e,n):T(t,e,n)}function _(t,e,n,r,o){if(!e.isRelative)return w(t,r,o);const{spatialReference:a}=r,i=P(t,e,n,a);return r.equals(e.getOriginPoint(a))?T(i,r,o):w(i,r,o)}function x(t,e,n,r,o,u){const p=n.isRelative?n.origin:s.Z,g=n.isRelative?e?.localMatrix??i.I:i.I;if(n.isGeoreferenced){const e=u??(0,h.bg)(r.length);if((0,a.j)(g,i.I)?(0,h.JK)(e,r):(0,d.t)(e,r,g),!(0,c.k)(p,s.Z)){const[t,n,r]=p;for(let o=0;o<e.length;o+=3)e[o]+=t,e[o+1]+=n,e[o+2]+=r}return(0,l.CM)(e,t,0,e,o,0,e.length/3),e}const y=(0,f.rS)(t),M=(0,l.Up)(t,y)?y:t;(0,l.Bm)(t,p,Z,M),(0,a.m)(Z,Z,g);const m=u??(0,h.bg)(r.length);return(0,d.t)(m,r,Z),(0,l.CM)(m,M,0,m,o,0,m.length/3),m}function F(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);return(0,d.a)(a,n,r),(0,b.Yk)(a,t,e,o,a),a}function S(t,e,n,r,o){if(null==n)return null;const a=new Float32Array(n.length);(0,d.a)(a,n,r,4);for(let t=3;t<a.length;t+=4)a[t]=n[t];return(0,b.M2)(a,t,e,o,a),a}function T(t,e,n){const r=new Float64Array(t.position.length),o=t.position,a=e.x,i=e.y,c=e.z??0,s=B(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=(o[t]-a)/s,r[t+1]=(o[t+1]-i)/s,r[t+2]=(o[t+2]-c)/s;return{position:r,normal:t.normal,tangent:t.tangent}}function C(t,e,n){(0,l.Bm)(t.spatialReference,[t.x,t.y,t.z??0],n,(0,f.rS)(t.spatialReference));const r=B(e?e.unit:null,t.spatialReference);return(0,a.k)(n,n,[r,r,r]),n}function O(t,e,n,r,o){if(null==t)return null;const a=(0,b.Iz)(t,e,n,r,new Float32Array(t.length));return(0,d.a)(a,a,o),a}function R(t,e,n,r,o){if(null==t)return null;const a=(0,b.wi)(t,e,n,r,new Float32Array(t.length));return(0,d.a)(a,a,o,4),a}function B(t,e){if(null==t)return 1;const n=(0,r.r6)(e);return 1/(0,r.En)(n,"meters",t)}const Z=(0,i.c)(),j=(0,i.c)(),V=(0,o.c)()},56493:(t,e,n)=>{n.d(e,{Iz:()=>M,M2:()=>w,To:()=>b,VS:()=>P,XO:()=>m,Yk:()=>d,w9:()=>A,wi:()=>v});var r=n(92604),o=n(21787),a=n(46521),i=n(13598),c=n(17896),s=n(65617),u=n(44547),l=n(58995),f=n(8744),h=n(40488),p=n(56481),g=n(20773);const y=r.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function M(t,e,n,r,o){return x(r)?(_(S.TO_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert spatial reference to PCPF"),o)}function d(t,e,n,r,o){return x(r)?(_(S.FROM_PCPF,p.ct.fromTypedArray(t),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o)),o):(y.error("Cannot convert to spatial reference from PCPF"),o)}function m(t,e,n){return(0,u.CM)(t,e,0,n,(0,l.rS)(e),0,t.length/3),n}function b(t,e,n){return(0,u.CM)(t,(0,l.rS)(n),0,e,n,0,t.length/3),e}function A(t,e,n){return(0,o.b)(B,n),(0,g.a)(e,t,B),(0,o.i)(B)||(0,g.n)(e,e),e}function P(t,e,n){if((0,o.b)(B,n),(0,g.a)(e,t,B,4),(0,o.i)(B)||(0,g.n)(e,e,4),t!==e)for(let n=3;n<t.length;n+=4)e[n]=t[n];return e}function v(t,e,n,r,o){if(!x(r))return y.error("Cannot convert spatial reference to PCPF"),o;_(S.TO_PCPF,p.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function w(t,e,n,r,o){if(!x(r))return y.error("Cannot convert to spatial reference from PCPF"),o;_(S.FROM_PCPF,p.ct.fromTypedArray(t,16),p.fP.fromTypedArray(e),p.fP.fromTypedArray(n),r,p.ct.fromTypedArray(o,16));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function _(t,e,n,r,a,i){if(!e)return;const s=n.count,f=(0,l.rS)(a);if(F(a))for(let n=0;n<s;n++)r.getVec(n,C),e.getVec(n,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R),t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),i.setVec(n,O);else for(let a=0;a<s;a++){r.getVec(a,C),e.getVec(a,O),(0,u.Bm)(f,C,R,f),(0,o.f)(B,R);const s=(0,h.mZ)(n.get(a,1));let l=Math.cos(s);t===S.TO_PCPF&&(l=1/l),B[0]*=l,B[1]*=l,B[2]*=l,B[3]*=l,B[4]*=l,B[5]*=l,t===S.FROM_PCPF&&(0,o.t)(B,B),(0,c.t)(O,O,B),(0,c.n)(O,O),i.setVec(a,O)}return i}function x(t){return F(t)||function(t){return t.isWebMercator}(t)}function F(t){return t.isWGS84||(0,f.yW)(t)||(0,f.BZ)(t)||(0,f.V2)(t)}var S,T;(T=S||(S={}))[T.TO_PCPF=0]="TO_PCPF",T[T.FROM_PCPF=1]="FROM_PCPF";const C=(0,s.c)(),O=(0,s.c)(),R=(0,i.c)(),B=(0,a.c)()}}]);
|