@arcgis/core 4.31.0-next.20240708 → 4.31.0-next.20240709

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0975e54c50383375cc09.js → 14cf7411e8318a1bccb9.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{71852b8437ec66b9ef06.js → 2123ab24163a532ebc8d.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{c91b3800cf3891bf2d59.js → 252ff37bf5e12dae0b18.js} +1 -1
  5. package/assets/esri/core/workers/chunks/2799007b5f3f4a2e364c.js +51 -0
  6. package/assets/esri/core/workers/chunks/{ff5e6d823d512f87a527.js → 2dddb8a989b9c96572fe.js} +1 -1
  7. package/assets/esri/core/workers/chunks/3375de864347a847393d.js +1042 -0
  8. package/assets/esri/core/workers/chunks/543f9db420c99d429637.js +1 -0
  9. package/assets/esri/core/workers/chunks/{812e18c65aa6e398c338.js → 5b6c89dc41067d81c952.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{5089a12084a8a8fb93d8.js → 61e5179fb49866241128.js} +1 -1
  11. package/assets/esri/core/workers/chunks/632e3ba2b8a881df29a0.js +1 -0
  12. package/assets/esri/core/workers/chunks/{1cc4a89c96a36d6b3d52.js → 7767559d56d16b644655.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{43e83f4d827f59ff556a.js → 8087288f00dfdcc479b9.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{a5fbe1c95e49093e5af4.js → 8cce4b218568638e6e64.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{c7e2a97cb7bcd153bcef.js → 8e326def543268f8a08e.js} +1 -1
  16. package/assets/esri/core/workers/chunks/92cb45b18e151db007dc.js +1 -0
  17. package/assets/esri/core/workers/chunks/b2e8cc76381077b78d4c.js +1 -0
  18. package/assets/esri/core/workers/chunks/b6a8132708afcd988fa9.js +1 -0
  19. package/assets/esri/core/workers/chunks/{b4d850e82a8ae902d684.js → c44cc686774ff53c0a94.js} +1 -1
  20. package/assets/esri/core/workers/chunks/c52701477405c1fb2072.js +1 -0
  21. package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js → cfc2a1858a8bbb284979.js} +2 -2
  22. package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js.LICENSE.txt → cfc2a1858a8bbb284979.js.LICENSE.txt} +1 -1
  23. package/assets/esri/core/workers/chunks/d9863289c69d2550cd49.js +1 -0
  24. package/assets/esri/core/workers/chunks/e1f4df3a5b0b31521b3c.js +1 -0
  25. package/assets/esri/core/workers/chunks/{61505947371cebab9cbe.js → fdebfe55cd097714ec11.js} +1 -1
  26. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +13 -18
  27. package/assets/esri/themes/dark/main.css +1 -1
  28. package/assets/esri/themes/light/main.css +1 -1
  29. package/assets/esri/themes/light/view.css +1 -1
  30. package/chunks/AtmosphereCompositing.glsl.js +6 -9
  31. package/chunks/BlendLayers.glsl.js +1 -7
  32. package/chunks/BlendWeights.glsl.js +45 -51
  33. package/chunks/Blur.glsl.js +1 -3
  34. package/chunks/ChapmanAtmosphere.glsl.js +3 -8
  35. package/chunks/CheckerBoard.glsl.js +3 -9
  36. package/chunks/Clouds.glsl.js +21 -10
  37. package/chunks/CloudsComposition.glsl.js +3 -7
  38. package/chunks/ColorMaterial.glsl.js +3 -9
  39. package/chunks/ComponentShader.glsl.js +35 -50
  40. package/chunks/Compositing.glsl.js +5 -7
  41. package/chunks/DefaultMaterial.glsl.js +68 -73
  42. package/chunks/EdgeDetect.glsl.js +5 -10
  43. package/chunks/EdgeShader.glsl.js +37 -60
  44. package/chunks/Fog.glsl.js +4 -9
  45. package/chunks/HUDCompositing.glsl.js +1 -3
  46. package/chunks/HUDMaterial.glsl.js +8 -14
  47. package/chunks/Heatmap.glsl.js +4 -7
  48. package/chunks/HeatmapDensity.glsl.js +5 -11
  49. package/chunks/HighlightApply.glsl.js +133 -152
  50. package/chunks/HighlightDownsample.glsl.js +29 -32
  51. package/chunks/ImageMaterial.glsl.js +11 -21
  52. package/chunks/LaserlinePath.glsl.js +4 -9
  53. package/chunks/LineCallout.glsl.js +91 -108
  54. package/chunks/LineMarker.glsl.js +2 -8
  55. package/chunks/Magnifier.glsl.js +4 -9
  56. package/chunks/MeasurementArrow.glsl.js +9 -15
  57. package/chunks/NativeLine.glsl.js +8 -12
  58. package/chunks/NoiseTextureAtlas.glsl.js +89 -86
  59. package/chunks/OITCompositing.glsl.js +2 -3
  60. package/chunks/OverlayCompositing.glsl.js +2 -4
  61. package/chunks/Path.glsl.js +31 -55
  62. package/chunks/Pattern.glsl.js +16 -20
  63. package/chunks/PointRenderer.glsl.js +39 -48
  64. package/chunks/Precipitation.glsl.js +15 -27
  65. package/chunks/RasterColorizer.glsl.js +25 -33
  66. package/chunks/RealisticTree.glsl.js +53 -65
  67. package/chunks/SSAO.glsl.js +7 -10
  68. package/chunks/SSAOBlur.glsl.js +10 -14
  69. package/chunks/ShadedColorMaterial.glsl.js +12 -15
  70. package/chunks/ShadowCastAccumulate.glsl.js +2 -4
  71. package/chunks/ShadowCastVisualize.glsl.js +12 -19
  72. package/chunks/ShadowHighlight.glsl.js +46 -50
  73. package/chunks/SimpleAtmosphere.glsl.js +4 -13
  74. package/chunks/SlicePlaneMaterial.glsl.js +3 -7
  75. package/chunks/Stars.glsl.js +3 -7
  76. package/chunks/Terrain.glsl.js +20 -61
  77. package/chunks/TextureOnly.glsl.js +2 -4
  78. package/chunks/Viewshed.glsl.js +20 -38
  79. package/chunks/WaterSurface.glsl.js +34 -60
  80. package/core/workers/registry.js +1 -1
  81. package/interfaces.d.ts +34 -4
  82. package/layers/WCSLayer.js +1 -1
  83. package/layers/support/SubtypeSublayer.js +1 -1
  84. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  85. package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
  86. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  87. package/package.json +3 -3
  88. package/support/revision.js +1 -1
  89. package/views/2d/engine/webgl/shaderGraph/ShaderBuilder2D.js +1 -1
  90. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  91. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  92. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  93. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  94. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  95. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  96. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  97. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  98. package/views/3d/layers/StreamLayerView3D.js +1 -1
  99. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  100. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  101. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +5 -0
  102. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +5 -0
  103. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +5 -0
  104. package/views/3d/layers/graphics/pipeline/PBFPointFeaturesView.js +5 -0
  105. package/views/3d/layers/graphics/pipeline/TestSymbol.js +5 -0
  106. package/views/3d/layers/graphics/pipeline/Tile.js +5 -0
  107. package/views/3d/layers/graphics/pipeline/Tile3DFetcher.js +5 -0
  108. package/views/3d/layers/graphics/pipeline/Tile3DProcessor.js +5 -0
  109. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  110. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  111. package/views/3d/layers/support/projectExtentUtils.js +1 -1
  112. package/views/3d/terrain/OverlayRenderer.js +1 -1
  113. package/views/3d/terrain/TerrainRenderer.js +1 -1
  114. package/views/3d/terrain/TileCompositor.js +1 -1
  115. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  116. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js +3 -5
  117. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  118. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +29 -59
  119. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +6 -12
  120. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
  121. package/views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js +6 -6
  122. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +2 -2
  123. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -4
  124. package/views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js +2 -2
  125. package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
  126. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  127. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  128. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  129. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  130. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  131. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  132. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  133. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  134. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  135. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  136. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  137. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  138. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  139. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  140. package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
  141. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  142. package/views/SceneView.js +1 -1
  143. package/views/webgl/RenderingContext.js +1 -1
  144. package/views/webgl/enums.js +1 -1
  145. package/views/webgl/heatmapTextureUtils.js +1 -1
  146. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  147. package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
  148. package/widgets/FeatureForm.js +1 -1
  149. package/widgets/OrientedImageryViewer/constants.js +1 -1
  150. package/widgets/OrientedImageryViewer.js +1 -1
  151. package/assets/esri/core/workers/chunks/0cb2eb96ffb1dbed00eb.js +0 -1
  152. package/assets/esri/core/workers/chunks/0d6ed27fc9948f4ea061.js +0 -1
  153. package/assets/esri/core/workers/chunks/225b947ba4b2fcfd5630.js +0 -1
  154. package/assets/esri/core/workers/chunks/7c7c3068da3bf7467685.js +0 -1
  155. package/assets/esri/core/workers/chunks/85e5cdd723f68dec8c25.js +0 -1
  156. package/assets/esri/core/workers/chunks/aed0db145187d9eb52f2.js +0 -51
  157. package/assets/esri/core/workers/chunks/cf9a32a03b3d3b66effb.js +0 -1
  158. package/assets/esri/core/workers/chunks/e840e54455eb500b501d.js +0 -1098
  159. package/assets/esri/core/workers/chunks/fec53ce15ae52f8cb802.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7982],{27982:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(49186),n=r(84952),l=r(60694),s=r(92009),i=r(23154),o=r(83531),c=r(4513),u=r(24183);const y={FeatureLayer:!0,SceneLayer:!0};async function d(e){const{properties:a,url:t}=e,n={...a,url:t},l=await m(t,a?.customParameters),{Constructor:s,layerId:i,sourceJSON:o,parsedUrl:c,layers:u,tables:y}=l;if(u.length+y.length===0)return null!=i&&(n.layerId=i),null!=o&&(n.sourceJSON=o),new s(n);const d=new(0,(await Promise.all([r.e(3161),r.e(8370)]).then(r.bind(r,85989))).default)({title:c.title});return await async function(e,a,r){const t=a.sublayerConstructorProvider;for(const{id:n,serverUrl:l}of a.layers){const s=f(a.sublayerInfos,n),i=w(l,n,s,(s&&t?.(s))??a.Constructor,r);e.add(i)}if(a.tables.length){const t=await p("FeatureLayer");a.tables.forEach((({id:n,serverUrl:l})=>{const s=w(l,n,f(a.tableInfos,n),t,r);e.tables.add(s)}))}}(d,l,n),d}function f(e,a){return e?e.find((({id:e})=>e===a)):null}function w(e,a,r,t,n){const l={...n,layerId:a};return null!=e&&(l.url=e),null!=r&&(l.sourceJSON=r),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}async function m(e,a){let r=(0,l.qg)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.V)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":h(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&h(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.iz)(e):null;return{title:null!=o&&r.name||(0,n.e7)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.An)(e).path}}}(e,a)),null==r)throw new t.A("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const w={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},m="FeatureServer"===c,b="SceneServer"===c,v={parsedUrl:r,Constructor:null,layerId:m||b?d??void 0:void 0,layers:[],tables:[]};switch(c){case"MapServer":if(null!=d){const{type:r}=await(0,u.V)(e,{customParameters:a});switch(f="FeatureLayer",r){case"Catalog Layer":f="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new t.A("arcgis-layers:unsupported",`fromUrl() not supported for "${r}" layers`)}}else f=await async function(e,a){return(await(0,u.V)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.V)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.V)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.XX[e]&&(f=o.XX[e])}}break}case"3DTilesServer":throw new t.A("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(f="FeatureLayer",null!=d){const r=await(0,u.V)(e,{customParameters:a});v.sourceJSON=r,f=(0,i.K)(r.type)}break;default:f=w[c]}if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l=!1;switch(a){case"FeatureServer":{const a=await(0,i.Q)(e,{customParameters:r});l=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.V)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.L)(e),n=await(0,u.V)(t,{customParameters:a}).catch((()=>null));return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.V)(e,{customParameters:r})}const o=t?.layers,c=t?.tables;return{layers:o?.map((e=>({id:e.id}))).reverse()||[],tables:c?.map((e=>({serverUrl:n,id:e.id}))).reverse()||[],layerInfos:l?o:[],tableInfos:l?c:[]}}(e,c,a);if(m&&(v.sublayerInfos=r.layerInfos,v.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length)v.layers=r.layers,v.tables=r.tables,m&&r.layerInfos?.length&&(v.sublayerConstructorProvider=await async function(e){if(!e.length)return;const a=new Set,r=[];for(const{type:t}of e)a.has(t)||(a.add(t),r.push(p((0,i.K)(t))));const t=await Promise.all(r),n=new Map;return Array.from(a).forEach(((e,a)=>{n.set(e,t[a])})),e=>n.get(e.type)}(r.layerInfos));else if(m||b){const e=r.layerInfos?.[0]??r.tableInfos?.[0];if(v.layerId=r.layers[0]?.id??r.tables[0]?.id,v.sourceJSON=e,m){const a=e?.type;f=(0,i.K)(a)}}}return v.Constructor=await p(f),v}function h(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function p(e){return(0,c.S[e])()}},92009:(e,a,r)=>{r.d(a,{L:()=>u});var t=r(70333),n=r(78888),l=r(49186),s=r(74887),i=r(60694),o=r(20655),c=r(80812);async function u(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=l&&(r.portal=new o.A({url:l}));try{return r.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.QP)(e),null}}(u);if(!f?.url)throw new l.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const w=await d(f.url,u);return w.portalItem=f,w}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},f=d("anonymous").catch((()=>d("no-prompt"))),[w,m]=await Promise.all([f,o]),h=m?.layers,p=w.data&&w.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===s)return{serverUrl:t,layerId:p[e].id}}else if(null!=s&&s<p.length)return{serverUrl:t,layerId:p[s].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,r)=>{r.d(a,{K:()=>d,Q:()=>l});var t=r(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function l(e,a){const{loadContext:r,...n}=a||{},l=r?await r.fetchServiceMetadata(e,n):await(0,t.V)(e,n);y(l),o(l);const s={serviceJSON:l};if((l.currentVersion??0)<10.5)return s;const i=`${e}/layers`,c=r?await r.fetchServiceMetadata(i,n):await(0,t.V)(i,n);return y(c),o(c),s.layersJSON={layers:c.layers,tables:c.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function i(e){return"Table"===e.type}function o(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(i)}function c(e){e.type||="Feature Layer"}function u(e){e.type||="Table"}function y(e){e.layers?.forEach(c),e.tables?.forEach(u)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(3161),r.e(7029)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(9558),r.e(620),r.e(3600),r.e(2944),r.e(8947),r.e(4850),r.e(7110),r.e(2931)]).then(r.bind(r,88303))).default,CSVLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(9558),r.e(620),r.e(3600),r.e(4174)]).then(r.bind(r,72256))).default,CatalogLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(9558),r.e(620),r.e(893),r.e(3622),r.e(2593),r.e(6107)]).then(r.bind(r,79003))).default,DimensionLayer:async()=>(await r.e(1493).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(9186),r.e(5204)]).then(r.bind(r,5111))).default,FeatureLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(9558),r.e(620),r.e(3600),r.e(9377)]).then(r.bind(r,13600))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(3839)]).then(r.bind(r,17625))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(3161),r.e(1147),r.e(360),r.e(6184)]).then(r.bind(r,63201))).default,GroupLayer:async()=>(await Promise.all([r.e(3161),r.e(5989)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(893),r.e(2876),r.e(8742),r.e(4135)]).then(r.bind(r,5159))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(2876),r.e(8488),r.e(8742),r.e(9082)]).then(r.bind(r,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await r.e(1528).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(8947),r.e(964),r.e(8003)]).then(r.bind(r,84453))).default,KMLLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(5494),r.e(2469)]).then(r.bind(r,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(835),r.e(3097),r.e(1932),r.e(6493),r.e(1363),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(964),r.e(7272)]).then(r.bind(r,42452))).default,LinkChartLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(835),r.e(3097),r.e(1932),r.e(6493),r.e(1363),r.e(1728)]).then(r.bind(r,71728))).default,MapImageLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(9558),r.e(893),r.e(3622),r.e(591),r.e(7656)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(9558),r.e(620),r.e(3600),r.e(6493),r.e(4273)]).then(r.bind(r,96953))).default,MediaLayer:async()=>(await Promise.all([r.e(3161),r.e(7899)]).then(r.bind(r,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(3089),r.e(4591)]).then(r.bind(r,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(3161),r.e(7314),r.e(349)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(9558),r.e(620),r.e(3600),r.e(3740)]).then(r.bind(r,16230))).default,PointCloudLayer:async()=>(await Promise.all([r.e(2829),r.e(8947),r.e(171)]).then(r.bind(r,76742))).default,RouteLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(5494),r.e(3920)]).then(r.bind(r,97550))).default,SceneLayer:async()=>(await Promise.all([r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(3030),r.e(2944),r.e(8947),r.e(964),r.e(4850),r.e(1535),r.e(7110),r.e(1737)]).then(r.bind(r,13899))).default,StreamLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(4761)]).then(r.bind(r,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(9558),r.e(620),r.e(7e3)]).then(r.bind(r,70048))).default,TileLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(9558),r.e(893),r.e(3622),r.e(9186),r.e(591),r.e(1756)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(3161),r.e(9186),r.e(9949),r.e(5013),r.e(9885)]).then(r.bind(r,64152))).default,VideoLayer:async()=>(await Promise.all([r.e(3161),r.e(6875)]).then(r.bind(r,86875))).default,VoxelLayer:async()=>(await Promise.all([r.e(2829),r.e(8947),r.e(964),r.e(1389)]).then(r.bind(r,16183))).default,WFSLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(4322),r.e(9511)]).then(r.bind(r,16350))).default,WMSLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(5181)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(3161),r.e(7314),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(3161),r.e(7314)]).then(r.bind(r,47314))).default}},24183:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(78888);async function n(e,a){const{data:r}=await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7982],{27982:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(49186),n=r(84952),l=r(60694),s=r(92009),i=r(23154),o=r(83531),c=r(4513),u=r(24183);const y={FeatureLayer:!0,SceneLayer:!0};async function d(e){const{properties:a,url:t}=e,n={...a,url:t},l=await m(t,a?.customParameters),{Constructor:s,layerId:i,sourceJSON:o,parsedUrl:c,layers:u,tables:y}=l;if(u.length+y.length===0)return null!=i&&(n.layerId=i),null!=o&&(n.sourceJSON=o),new s(n);const d=new(0,(await Promise.all([r.e(3161),r.e(8370)]).then(r.bind(r,85989))).default)({title:c.title});return await async function(e,a,r){const t=a.sublayerConstructorProvider;for(const{id:n,serverUrl:l}of a.layers){const s=f(a.sublayerInfos,n),i=w(l,n,s,(s&&t?.(s))??a.Constructor,r);e.add(i)}if(a.tables.length){const t=await p("FeatureLayer");a.tables.forEach((({id:n,serverUrl:l})=>{const s=w(l,n,f(a.tableInfos,n),t,r);e.tables.add(s)}))}}(d,l,n),d}function f(e,a){return e?e.find((({id:e})=>e===a)):null}function w(e,a,r,t,n){const l={...n,layerId:a};return null!=e&&(l.url=e),null!=r&&(l.sourceJSON=r),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}async function m(e,a){let r=(0,l.qg)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.V)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":h(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&h(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.iz)(e):null;return{title:null!=o&&r.name||(0,n.e7)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.An)(e).path}}}(e,a)),null==r)throw new t.A("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const w={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},m="FeatureServer"===c,b="SceneServer"===c,v={parsedUrl:r,Constructor:null,layerId:m||b?d??void 0:void 0,layers:[],tables:[]};switch(c){case"MapServer":if(null!=d){const{type:r}=await(0,u.V)(e,{customParameters:a});switch(f="FeatureLayer",r){case"Catalog Layer":f="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new t.A("arcgis-layers:unsupported",`fromUrl() not supported for "${r}" layers`)}}else f=await async function(e,a){return(await(0,u.V)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.V)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.V)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.XX[e]&&(f=o.XX[e])}}break}case"3DTilesServer":throw new t.A("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(f="FeatureLayer",null!=d){const r=await(0,u.V)(e,{customParameters:a});v.sourceJSON=r,f=(0,i.K)(r.type)}break;default:f=w[c]}if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l=!1;switch(a){case"FeatureServer":{const a=await(0,i.Q)(e,{customParameters:r});l=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.V)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.L)(e),n=await(0,u.V)(t,{customParameters:a}).catch((()=>null));return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.V)(e,{customParameters:r})}const o=t?.layers,c=t?.tables;return{layers:o?.map((e=>({id:e.id}))).reverse()||[],tables:c?.map((e=>({serverUrl:n,id:e.id}))).reverse()||[],layerInfos:l?o:[],tableInfos:l?c:[]}}(e,c,a);if(m&&(v.sublayerInfos=r.layerInfos,v.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length)v.layers=r.layers,v.tables=r.tables,m&&r.layerInfos?.length&&(v.sublayerConstructorProvider=await async function(e){if(!e.length)return;const a=new Set,r=[];for(const{type:t}of e)a.has(t)||(a.add(t),r.push(p((0,i.K)(t))));const t=await Promise.all(r),n=new Map;return Array.from(a).forEach(((e,a)=>{n.set(e,t[a])})),e=>n.get(e.type)}(r.layerInfos));else if(m||b){const e=r.layerInfos?.[0]??r.tableInfos?.[0];if(v.layerId=r.layers[0]?.id??r.tables[0]?.id,v.sourceJSON=e,m){const a=e?.type;f=(0,i.K)(a)}}}return v.Constructor=await p(f),v}function h(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function p(e){return(0,c.S[e])()}},92009:(e,a,r)=>{r.d(a,{L:()=>u});var t=r(70333),n=r(78888),l=r(49186),s=r(74887),i=r(60694),o=r(20655),c=r(80812);async function u(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=l&&(r.portal=new o.A({url:l}));try{return r.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.QP)(e),null}}(u);if(!f?.url)throw new l.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const w=await d(f.url,u);return w.portalItem=f,w}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},f=d("anonymous").catch((()=>d("no-prompt"))),[w,m]=await Promise.all([f,o]),h=m?.layers,p=w.data&&w.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===s)return{serverUrl:t,layerId:p[e].id}}else if(null!=s&&s<p.length)return{serverUrl:t,layerId:p[s].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,r)=>{r.d(a,{K:()=>d,Q:()=>l});var t=r(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function l(e,a){const{loadContext:r,...n}=a||{},l=r?await r.fetchServiceMetadata(e,n):await(0,t.V)(e,n);y(l),o(l);const s={serviceJSON:l};if((l.currentVersion??0)<10.5)return s;const i=`${e}/layers`,c=r?await r.fetchServiceMetadata(i,n):await(0,t.V)(i,n);return y(c),o(c),s.layersJSON={layers:c.layers,tables:c.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function i(e){return"Table"===e.type}function o(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(i)}function c(e){e.type||="Feature Layer"}function u(e){e.type||="Table"}function y(e){e.layers?.forEach(c),e.tables?.forEach(u)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(3161),r.e(7029)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(9558),r.e(620),r.e(3600),r.e(2944),r.e(8947),r.e(7016),r.e(7110),r.e(2931)]).then(r.bind(r,88303))).default,CSVLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(9558),r.e(620),r.e(3600),r.e(4174)]).then(r.bind(r,72256))).default,CatalogLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(9558),r.e(893),r.e(620),r.e(3622),r.e(2593),r.e(6107)]).then(r.bind(r,79003))).default,DimensionLayer:async()=>(await r.e(1493).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(9186),r.e(5204)]).then(r.bind(r,5111))).default,FeatureLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(9558),r.e(620),r.e(3600),r.e(9377)]).then(r.bind(r,13600))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(3839)]).then(r.bind(r,17625))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(3161),r.e(1147),r.e(360),r.e(6184)]).then(r.bind(r,63201))).default,GroupLayer:async()=>(await Promise.all([r.e(3161),r.e(5989)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(893),r.e(2876),r.e(8742),r.e(4135)]).then(r.bind(r,5159))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(2876),r.e(8488),r.e(8742),r.e(9082)]).then(r.bind(r,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await r.e(1528).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(8947),r.e(964),r.e(8003)]).then(r.bind(r,84453))).default,KMLLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(5494),r.e(4850)]).then(r.bind(r,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(835),r.e(3097),r.e(1932),r.e(6493),r.e(1363),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(964),r.e(7272)]).then(r.bind(r,42452))).default,LinkChartLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(835),r.e(3097),r.e(1932),r.e(6493),r.e(1363),r.e(1728)]).then(r.bind(r,71728))).default,MapImageLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(9558),r.e(893),r.e(3622),r.e(591),r.e(7656)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(9558),r.e(620),r.e(3600),r.e(6493),r.e(4273)]).then(r.bind(r,96953))).default,MediaLayer:async()=>(await Promise.all([r.e(3161),r.e(7899)]).then(r.bind(r,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(3089),r.e(4591)]).then(r.bind(r,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(3161),r.e(7314),r.e(349)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(9558),r.e(620),r.e(3600),r.e(3740)]).then(r.bind(r,16230))).default,PointCloudLayer:async()=>(await Promise.all([r.e(2829),r.e(8947),r.e(171)]).then(r.bind(r,76742))).default,RouteLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(5494),r.e(3920)]).then(r.bind(r,97550))).default,SceneLayer:async()=>(await Promise.all([r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(3030),r.e(2944),r.e(8947),r.e(964),r.e(7016),r.e(1535),r.e(7110),r.e(1737)]).then(r.bind(r,13899))).default,StreamLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(4761)]).then(r.bind(r,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(9558),r.e(620),r.e(7e3)]).then(r.bind(r,70048))).default,TileLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(9558),r.e(893),r.e(3622),r.e(9186),r.e(591),r.e(1756)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(3161),r.e(9186),r.e(9949),r.e(5013),r.e(9885)]).then(r.bind(r,64152))).default,VideoLayer:async()=>(await Promise.all([r.e(3161),r.e(6875)]).then(r.bind(r,86875))).default,VoxelLayer:async()=>(await Promise.all([r.e(2829),r.e(8947),r.e(964),r.e(1389)]).then(r.bind(r,16183))).default,WFSLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(1132),r.e(9566),r.e(1956),r.e(5494),r.e(4796),r.e(5894),r.e(4322),r.e(9511)]).then(r.bind(r,16350))).default,WMSLayer:async()=>(await Promise.all([r.e(3161),r.e(2829),r.e(1147),r.e(360),r.e(5181)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(3161),r.e(7314),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(3161),r.e(7314)]).then(r.bind(r,47314))).default}},24183:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(78888);async function n(e,a){const{data:r}=await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2931],{38961:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(90237),s=r(5503),o=(r(60999),r(49186),r(53966),r(14012),r(80559)),n=r(10107),l=r(40608);let a=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,o.fm)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,n.MZ)()],a.prototype,"getCollections",void 0),(0,i._)([(0,n.MZ)()],a.prototype,"getChildrenFunction",void 0),(0,i._)([(0,n.MZ)()],a.prototype,"itemFilterFunction",void 0),a=(0,i._)([(0,l.$)("esri.core.CollectionFlattener")],a);const p=a},88303:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Xe});var i=r(90237),s=r(5503),o=r(38961),n=r(49186),l=r(4718),a=r(81583),p=r(53966),y=r(92071),u=r(74887),d=r(84952),c=r(10107),h=(r(44208),r(36005)),f=r(40608),g=r(16930),m=r(4146),v=r(52106),_=r(13874),b=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494),r(15036)),w=r(78888),M=r(66552),S=r(92474),Z=r(61893),x=(r(87811),r(93223)),F=r(5443),A=r(13600),O=r(4902),j=r(56507),T=r(10873);let L=class extends((0,O.sA)(y.L)){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.legendEnabled=!0,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:-1}};(0,i._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],L.prototype,"title",void 0),(0,i._)([(0,h.w)("service","title",["alias","name"])],L.prototype,"readTitle",null),(0,i._)([(0,c.MZ)()],L.prototype,"layer",void 0),(0,i._)([(0,c.MZ)({type:j.jz,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],L.prototype,"id",void 0),(0,i._)([(0,h.w)("service","id")],L.prototype,"readIdOnlyOnce",null),(0,i._)([(0,c.MZ)((0,T.Qo)(String))],L.prototype,"modelName",void 0),(0,i._)([(0,c.MZ)((0,T.Qo)(Boolean))],L.prototype,"isEmpty",void 0),(0,i._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],L.prototype,"legendEnabled",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],L.prototype,"visible",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:!0}})],L.prototype,"opacity",void 0),L=(0,i._)([(0,f.$)("esri.layers.buildingSublayers.BuildingSublayer")],L);const I=L;var R=r(4071),P=r(17036),B=r(95466),q=r(30524),N=r(83898),E=r(50805),C=r(61956),k=r(30291),$=r(88625),Q=r(708),z=r(45671);const D=(0,P.p)();let G=class extends(S.A.LoadableMixin((0,Z.g)(I))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new B.A(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,i=t.associatedLayerID;return null!=r&&"number"==typeof i?new A.default({portalItem:r,customParameters:this.customParameters,layerId:i}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=(0,N.F)(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.A.getLogger(this),t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return(0,k.tn)(this,e)}async _fetchService(e){const t=(await(0,w.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:R.P,{query:t,data:{supportsZ:r,supportsM:i,isVersioned:s}}=e;return{query:t,data:{supportsZ:r,supportsM:i,isVersioned:s}}}createQuery(){const e=new C.A;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}async queryCachedAttributes(e,t){const r=(0,q.hL)(this.fieldsIndex,await(0,z.TO)(this,(0,z.D8)(this)));return(0,Q.s1)(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new n.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new v.A({attributes:r[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};(0,i._)([(0,c.MZ)({readOnly:!0})],G.prototype,"parsedUrl",null),(0,i._)([(0,c.MZ)({type:E.W4,readOnly:!0})],G.prototype,"nodePages",void 0),(0,i._)([(0,c.MZ)({type:[E.uV],readOnly:!0})],G.prototype,"materialDefinitions",void 0),(0,i._)([(0,c.MZ)({type:[E.Ot],readOnly:!0})],G.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,c.MZ)({type:[E.L0],readOnly:!0})],G.prototype,"geometryDefinitions",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],G.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],G.prototype,"store",void 0),(0,i._)([(0,c.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],G.prototype,"rootNode",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],G.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,c.MZ)(D.fields)],G.prototype,"fields",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],G.prototype,"fieldsIndex",null),(0,i._)([(0,c.MZ)({readOnly:!0,type:A.default})],G.prototype,"associatedLayer",void 0),(0,i._)([(0,h.w)("service","associatedLayer",["associatedLayerID"])],G.prototype,"readAssociatedLayer",null),(0,i._)([(0,c.MZ)(D.outFields)],G.prototype,"outFields",void 0),(0,i._)([(0,c.MZ)({type:String,readOnly:!0})],G.prototype,"objectIdField",null),(0,i._)([(0,c.MZ)({readOnly:!0,type:String,json:{read:!1}})],G.prototype,"displayField",null),(0,i._)([(0,c.MZ)({readOnly:!0,type:String})],G.prototype,"apiKey",null),(0,i._)([(0,c.MZ)({readOnly:!0,type:String})],G.prototype,"customParameters",null),(0,i._)([(0,c.MZ)({readOnly:!0,type:F.A})],G.prototype,"fullExtent",null),(0,i._)([(0,c.MZ)({readOnly:!0,type:g.A})],G.prototype,"spatialReference",null),(0,i._)([(0,c.MZ)({readOnly:!0})],G.prototype,"version",null),(0,i._)([(0,c.MZ)({readOnly:!0,type:$.A})],G.prototype,"elevationInfo",null),(0,i._)([(0,c.MZ)({readOnly:!0,type:Number})],G.prototype,"minScale",null),(0,i._)([(0,c.MZ)({readOnly:!0,type:Number})],G.prototype,"maxScale",null),(0,i._)([(0,c.MZ)({readOnly:!0,type:Number})],G.prototype,"effectiveScaleRange",null),(0,i._)([(0,c.MZ)({type:["hide","show"],json:{write:!0}})],G.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({types:b.X,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],G.prototype,"renderer",void 0),(0,i._)([(0,c.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],G.prototype,"definitionExpression",void 0),(0,i._)([(0,c.MZ)(T.M6)],G.prototype,"popupEnabled",void 0),(0,i._)([(0,c.MZ)({type:_.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],G.prototype,"popupTemplate",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],G.prototype,"normalReferenceFrame",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],G.prototype,"defaultPopupTemplate",null),(0,i._)([(0,c.MZ)()],G.prototype,"types",null),(0,i._)([(0,c.MZ)()],G.prototype,"typeIdField",null),(0,i._)([(0,c.MZ)({json:{write:!1}}),(0,x.e)(new M.J({"3DObject":"3d-object",Point:"point"}))],G.prototype,"layerType",void 0),(0,i._)([(0,c.MZ)()],G.prototype,"geometryType",null),(0,i._)([(0,c.MZ)()],G.prototype,"profile",null),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],G.prototype,"capabilities",null),(0,i._)([(0,c.MZ)({readOnly:!0})],G.prototype,"statisticsInfo",void 0),G=(0,i._)([(0,f.$)("esri.layers.buildingSublayers.BuildingComponentSublayer")],G);const J=G;var K,U=r(67076);const V={type:s.A,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:Y}}},read:!1}};function Y(e,t,r){if(e&&Array.isArray(e))return new s.A(e.map((e=>{const t=function(e){return"group"===e.layerType?H:J}(e);if(t){const i=new t;return i.read(e,r),i}return r?.messages&&e&&r.messages.push(new U.A("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r})),null})))}let H=K=class extends I{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return(0,a.L)(this,(e=>K.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)}))))}};var X;(0,i._)([(0,c.MZ)({type:["hide","show","hide-children"],json:{write:!0}})],H.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)(V)],H.prototype,"sublayers",void 0),H=K=(0,i._)([(0,f.$)("esri.layers.buildingSublayers.BuildingGroupSublayer")],H),(X=H||(H={})).sublayersProperty=V,X.readSublayers=Y,X.forEachSublayer=function e(t,r){t.forEach((t=>{r(t),"building-group"===t.type&&e(t.sublayers,r)}))};const W=H;var ee=r(52136),te=r(18768),re=r(69208),ie=r(16131),se=r(8303),oe=r(25036),ne=r(58947),le=r(92009),ae=r(25482),pe=r(13069);let ye=class extends ae.oY{constructor(){super(...arguments),this.type=null}};(0,i._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:!0}})],ye.prototype,"type",void 0),ye=(0,i._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfo")],ye);const ue=ye;var de;let ce=de=class extends ae.oY{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new de({filterType:this.filterType,filterValues:(0,l.o8)(this.filterValues)})}};(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],ce.prototype,"filterType",void 0),(0,i._)([(0,c.MZ)({type:[String],json:{write:!0}})],ce.prototype,"filterValues",void 0),ce=de=(0,i._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoType")],ce);const he=ce;var fe;const ge=s.A.ofType(he);let me=fe=class extends ae.oY{clone(){return new fe({filterTypes:(0,l.o8)(this.filterTypes)})}};(0,i._)([(0,c.MZ)({type:ge,json:{write:!0}})],me.prototype,"filterTypes",void 0),me=fe=(0,i._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoBlock")],me);const ve=me;var _e;const be=s.A.ofType(ve);let we=_e=class extends ue{constructor(){super(...arguments),this.type="checkbox"}clone(){return new _e({filterBlocks:(0,l.o8)(this.filterBlocks)})}};(0,i._)([(0,c.MZ)({type:["checkbox"]})],we.prototype,"type",void 0),(0,i._)([(0,c.MZ)({type:be,json:{write:!0}})],we.prototype,"filterBlocks",void 0),we=_e=(0,i._)([(0,f.$)("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],we);const Me=we;let Se=class extends ae.oY{};(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Se.prototype,"type",void 0),Se=(0,i._)([(0,f.$)("esri.layers.support.BuildingFilterMode")],Se);const Ze=Se;var xe;let Fe=xe=class extends Ze{constructor(){super(...arguments),this.type="solid"}clone(){return new xe}};(0,i._)([(0,c.MZ)({type:["solid"],readOnly:!0,json:{write:!0}})],Fe.prototype,"type",void 0),Fe=xe=(0,i._)([(0,f.$)("esri.layers.support.BuildingFilterModeSolid")],Fe);const Ae=Fe;var Oe,je=r(51734);let Te=Oe=class extends Ze{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new Oe({edges:(0,l.o8)(this.edges)})}};(0,i._)([(0,x.e)({wireFrame:"wire-frame"})],Te.prototype,"type",void 0),(0,i._)([(0,c.MZ)(je.J)],Te.prototype,"edges",void 0),Te=Oe=(0,i._)([(0,f.$)("esri.layers.support.BuildingFilterModeWireFrame")],Te);const Le=Te;var Ie;let Re=Ie=class extends Ze{constructor(){super(...arguments),this.type="x-ray"}clone(){return new Ie}};(0,i._)([(0,c.MZ)({type:["x-ray"],readOnly:!0,json:{write:!0}})],Re.prototype,"type",void 0),Re=Ie=(0,i._)([(0,f.$)("esri.layers.support.BuildingFilterModeXRay")],Re);const Pe=Re;var Be;const qe={nonNullable:!0,types:{key:"type",base:Ze,typeMap:{solid:Ae,"wire-frame":Le,"x-ray":Pe}},json:{read:e=>{switch(e?.type){case"solid":return Ae.fromJSON(e);case"wireFrame":return Le.fromJSON(e);case"x-ray":return Pe.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let Ne=Be=class extends ae.oY{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new Ae,this.title=""}clone(){return new Be({filterExpression:this.filterExpression,filterMode:(0,l.o8)(this.filterMode),title:this.title})}};(0,i._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Ne.prototype,"filterExpression",void 0),(0,i._)([(0,c.MZ)(qe)],Ne.prototype,"filterMode",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Ne.prototype,"title",void 0),Ne=Be=(0,i._)([(0,f.$)("esri.layers.support.BuildingFilterBlock")],Ne);const Ee=Ne;var Ce;const ke=s.A.ofType(Ee);let $e=Ce=class extends ae.oY{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=(0,pe.lk)(),this.name=null}clone(){return new Ce({description:this.description,filterBlocks:(0,l.o8)(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:(0,l.o8)(this.filterAuthoringInfo)})}};(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],$e.prototype,"description",void 0),(0,i._)([(0,c.MZ)({type:ke,json:{write:{enabled:!0,isRequired:!0}}})],$e.prototype,"filterBlocks",void 0),(0,i._)([(0,c.MZ)({types:{key:"type",base:ue,typeMap:{checkbox:Me}},json:{read:e=>"checkbox"===e?.type?Me.fromJSON(e):null,write:!0}})],$e.prototype,"filterAuthoringInfo",void 0),(0,i._)([(0,c.MZ)({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],$e.prototype,"id",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],$e.prototype,"name",void 0),$e=Ce=(0,i._)([(0,f.$)("esri.layers.support.BuildingFilter")],$e);const Qe=$e;let ze=class extends ae.oY{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};(0,i._)([(0,c.MZ)({type:String})],ze.prototype,"fieldName",void 0),(0,i._)([(0,c.MZ)({type:String})],ze.prototype,"modelName",void 0),(0,i._)([(0,c.MZ)({type:String})],ze.prototype,"label",void 0),(0,i._)([(0,c.MZ)({type:Number})],ze.prototype,"min",void 0),(0,i._)([(0,c.MZ)({type:Number})],ze.prototype,"max",void 0),(0,i._)([(0,c.MZ)({json:{read:e=>Array.isArray(e)&&(e.every((e=>"string"==typeof e))||e.every((e=>"number"==typeof e)))?e.slice():null}})],ze.prototype,"mostFrequentValues",void 0),(0,i._)([(0,c.MZ)({type:[Number]})],ze.prototype,"subLayerIds",void 0),ze=(0,i._)([(0,f.$)("esri.layers.support.BuildingSummaryStatistics.BuildingFieldStatistics")],ze);let De=class extends(S.A.LoadableMixin((0,Z.g)(ae.oY))){constructor(){super(...arguments),this.url=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(p.A.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await(0,w.A)(this.url,{query:{f:"json"},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};(0,i._)([(0,c.MZ)({constructOnly:!0,type:String})],De.prototype,"url",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,type:[ze],json:{read:{source:"summary"}}})],De.prototype,"fields",null),De=(0,i._)([(0,f.$)("esri.layers.support.BuildingSummaryStatistics")],De);const Ge=De;var Je=r(24212);const Ke=s.A.ofType(Qe),Ue=(0,l.o8)(W.sublayersProperty),Ve=Ue.json?.origins;Ve&&(Ve["web-scene"]={type:[J],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},Ve["portal-item"]={type:[J],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let Ye=class extends((0,ne.w6)((0,te.b)((0,ie.q)((0,se.A)((0,oe.j)((0,y.P)((0,re.d)((0,ee.p)(m.A))))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this._allSublayerOverrides=null,this.filters=new Ke,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const i=W.readSublayers(e,t,r);return W.forEachSublayer(i,(e=>e.layer=this)),this._allSublayerOverrides&&(function(e,t){t.forEach((t=>He(e,t)))}(i,this._allSublayerOverrides),this._allSublayerOverrides=null),i}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?function(e,t,r){const i=[];W.forEachSublayer(e,(e=>{const t=e.write({},r);Object.keys(t).length>1&&i.push(t)})),i.length>0&&(t.sublayers=i)}(this.sublayers,e,t):this._allSublayerOverrides&&function(e,t,r){const i=r?.origin&&e.get(r.origin);i&&(t.sublayers=[],i.overrides.forEach((e=>{t.sublayers.push((0,l.o8)(e))})))}(this._allSublayerOverrides,e,t)),e}read(e,t){if(super.read(e,t),("web-scene"===t?.origin||"portal-item"===t?.origin)&&Array.isArray(e?.sublayers)){const r=function(e,t){const r=new Map;for(const i of e)null!=i&&"object"==typeof i&&"number"==typeof i.id?r.set(i.id,i):t.messages?.push(new n.A("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:i}));return{overrides:r,context:t}}(e.sublayers,t);this.sublayers?He(this.sublayers,r):(this._allSublayerOverrides??=new Map,this._allSublayerOverrides.set(t.origin,r))}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef){const e=(0,d.fj)(this.parsedUrl?.path,t.statisticsHRef);return new Ge({url:e})}return null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.QP).then((()=>this._fetchService(t))).then((()=>this._fetchAssociatedFeatureService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return(0,a.g)(this,(e=>{W.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)})),this.summaryStatistics&&e(this.summaryStatistics)}))}async saveAs(e,t){return this._debouncedSaveOperations(ne.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(ne.Xh.SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new n.A("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:t}=await(0,le.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=t}catch(e){p.A.getLogger(this).warn("Associated feature service item could not be loaded",e)}}_validateElevationInfo(){const e=this.elevationInfo,t="Building scene layers";(0,Je.XF)(p.A.getLogger(this),(0,Je.B)(t,"absolute-height",e)),(0,Je.XF)(p.A.getLogger(this),(0,Je.tW)(t,e))}};function He(e,t){const{overrides:r,context:i}=t;W.forEachSublayer(e,(e=>e.read(r.get(e.id),i)))}(0,i._)([(0,c.MZ)({type:["BuildingSceneLayer"]})],Ye.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],Ye.prototype,"allSublayers",void 0),(0,i._)([(0,c.MZ)(Ue)],Ye.prototype,"sublayers",void 0),(0,i._)([(0,h.w)("service","sublayers")],Ye.prototype,"readSublayers",null),(0,i._)([(0,c.MZ)({type:Ke,nonNullable:!0,json:{write:!0}})],Ye.prototype,"filters",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],Ye.prototype,"activeFilterId",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,type:Ge})],Ye.prototype,"summaryStatistics",void 0),(0,i._)([(0,h.w)("summaryStatistics",["statisticsHRef"])],Ye.prototype,"readSummaryStatistics",null),(0,i._)([(0,c.MZ)({type:[String],json:{read:!1}})],Ye.prototype,"outFields",void 0),(0,i._)([(0,c.MZ)(T.Fm)],Ye.prototype,"fullExtent",void 0),(0,i._)([(0,c.MZ)(T.fV)],Ye.prototype,"legendEnabled",void 0),(0,i._)([(0,c.MZ)({type:["show","hide","hide-children"]})],Ye.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)((0,T.Qo)(g.A))],Ye.prototype,"spatialReference",void 0),(0,i._)([(0,c.MZ)(T.Yj)],Ye.prototype,"elevationInfo",null),(0,i._)([(0,c.MZ)({json:{read:!1},readOnly:!0})],Ye.prototype,"type",void 0),(0,i._)([(0,c.MZ)()],Ye.prototype,"associatedFeatureServiceItem",void 0),Ye=(0,i._)([(0,f.$)("esri.layers.BuildingSceneLayer")],Ye);const Xe=Ye},33143:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),s=r(69540),o=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),y=r(72088),u=r(29005);let d=class extends((0,s.O)(o.oY)){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,y.rS)(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,n.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,l.w)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,n.MZ)({type:[u.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,a.$)("esri.layers.support.FeatureType")],d);const c=d},58501:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>_});var i,s=r(90237),o=r(59456),n=r(52106),l=r(66552),a=r(25482),p=r(4718),y=r(10107),u=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),h=r(16930),f=r(65864),g=r(20437);const m=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.A.fromJSON(s),l=s.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=s.aggregateGeometries,p=o.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],i=a[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,p.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.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:[o,n]}=r;let l=null,a=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;a=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(l[0]),s=r(l[1]),o.push([i,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,f.Bi)(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 o=(0,f.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],l+=s[1]):(n=s[0],l=s[1]),s[0]=t(n),s[1]=r(l)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[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=o.length;e<t;e++){const t=o[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=o.length;e<t;e++){const t=o[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 o=e.points;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,y.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,s._)([(0,y.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,y.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,s._)([(0,u.w)("features")],v.prototype,"readFeatures",null),(0,s._)([(0,y.MZ)({type:[g.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,s._)([(0,y.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,s._)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,s._)([(0,y.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,s._)([(0,y.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,s._)([(0,y.MZ)({types:o.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,s._)([(0,u.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,s._)([(0,y.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,s._)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,s._)([(0,y.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,s._)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const _=v}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1737],{54239:(e,t,i)=>{i.d(t,{A:()=>w});var r,s=i(90237),n=i(4576),o=i(66552),a=i(25482),l=i(83047),d=i(67076),u=i(10107),p=(i(44208),i(53966),i(36005)),c=i(40608),h=i(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.Xy)(m,"orthometric");const f=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=r=class extends a.oY{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return y.write(e,t,i)}readHeightModel(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||f.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,h.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:f.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=r=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],g);const w=g},13899:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ee});var r=i(90237),s=i(52106),n=i(13874),o=(i(86162),i(94409),i(65345),i(42980),i(39290),i(92438),i(96576),i(93618),i(65494),i(15036)),a=i(69540),l=i(5503),d=i(49186),u=i(53966),p=i(92071),c=i(74887),h=i(36708),y=i(10107),m=(i(44208),i(87811),i(88620)),f=i(36005),g=i(40608),v=i(35666),w=i(1535),_=i(86738),I=i(4146),b=i(55726),F=i(52136),A=i(18768),S=i(69208),M=i(47685),L=i(16131),x=i(8303),T=i(25036),E=i(58947),O=i(82935),j=i(25482),Z=i(30524);function P({associatedLayer:e,serviceUpdateTimeStamp:t}){const i=e?.editingInfo?.lastEditDate,r=e?.serverGens,s=null!=i,n=null!=t,o=s&&n&&t.lastUpdate!==i.getTime();return s&&(o||!n&&r?.minServerGen!==r?.serverGen)}var U=i(96184),R=i(79677),$=i(10184);const D=e=>{let t=class extends e{constructor(){super(...arguments),this.serviceTimeInfo=null}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return(0,Z.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,Z.sv)(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:i,endTimeField:r}=t;if(null==i&&null==r)return;if(P({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let r=null;try{const i=await(this.fetchStatistics?.(t,e));r=i?.stats}catch{}if(null==r)return null;const{minTimeStr:s,min:n,maxTimeStr:o,max:a}=r,l=t===i?s??n:o??a;return null!=l?new Date(l):null},[n,o]=await Promise.all([s(i),s(r)]);if(null!=i&&null==n||null!=r&&null==o)return;const a=new R.A({start:n,end:o});this.setAtOrigin("timeInfo",new U.A({endField:r,startField:i,fullTimeExtent:a}),"service")}};return(0,r._)([(0,y.MZ)({type:U.A,json:{read:!1,write:!1}})],t.prototype,"timeInfo",null),(0,r._)([(0,y.MZ)({type:R.A,json:{read:!1,write:!1}})],t.prototype,"timeExtent",null),(0,r._)([(0,y.MZ)({type:$.A,json:{read:!1,write:!1}})],t.prototype,"timeOffset",null),(0,r._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],t.prototype,"datesInUnknownTimezone",null),(0,r._)([(0,y.MZ)({type:N,readOnly:!0,json:{read:{source:"timeInfo"}}})],t.prototype,"serviceTimeInfo",void 0),t=(0,r._)([(0,g.$)("esri.layers.mixins.TemporalSceneLayer")],t),t};let N=class extends j.oY{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,r._)([(0,y.MZ)({type:String})],N.prototype,"endTimeField",void 0),(0,r._)([(0,y.MZ)({type:String})],N.prototype,"startTimeField",void 0),N=(0,r._)([(0,g.$)("esri.layers.mixins.TemporalSceneLayer.SceneServiceTimeInfo")],N);var C=i(60694),k=i(92009),H=i(4071),q=i(10873),V=i(15426),G=i(40530),K=i(67202),Q=i(17036),W=i(95466),J=i(50805),B=i(20557),Y=i(81457),z=i(39383),X=i(37352),ee=i(4513);let te=class extends j.oY{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,r._)([(0,y.MZ)({type:String,json:{read:!0,write:!0}})],te.prototype,"name",void 0),(0,r._)([(0,y.MZ)({type:String,json:{read:!0,write:!0}})],te.prototype,"field",void 0),(0,r._)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"currentRangeExtent",void 0),(0,r._)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"fullRangeExtent",void 0),(0,r._)([(0,y.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],te.prototype,"type",void 0),te=(0,r._)([(0,g.$)("esri.layers.support.RangeInfo")],te);var ie,re=i(78888),se=i(4718),ne=i(87024),oe=i(67076),ae=i(39829),le=i(57251);let de=ie=class extends((0,j.Te)(l.A.ofType(ae.A))){constructor(e){super(e)}clone(){return new ie(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((i=>{if(!t.equals(i.spatialReference)){if(!(0,le.canProjectWithoutEngine)(i.spatialReference,t))return e?.messages&&e.messages.push(new oe.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const r=new ae.A;(0,le.projectPolygon)(i,r,t),i=r}const r=i.toJSON(e);return delete r.spatialReference,r})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new oe.A("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const i=new ie;return e.forEach((e=>i.add(ae.A.fromJSON(e,t)))),i}};de=ie=(0,r._)([(0,g.$)("esri.layers.support.PolygonCollection")],de);const ue=de;var pe,ce=i(97159);let he=pe=class extends j.oY{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ue,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.OH))}readGeometries(e,t,i){Array.isArray(e)?this.geometries=ue.fromJSON(e,i):this._geometriesSource={url:(0,ce.f)(e,i),context:i}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:i,context:r}=this._geometriesSource,s=await(0,re.A)(i,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map((e=>({...e,spatialReference:n})));this.geometries=ue.fromJSON(o,r),this._geometriesSource=null}clone(){const e=new pe({geometries:(0,se.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,r._)([(0,y.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],he.prototype,"spatialRelationship",void 0),(0,r._)([(0,y.MZ)({type:ue,nonNullable:!0,json:{write:!0}}),(0,ne.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],he.prototype,"geometries",void 0),(0,r._)([(0,f.w)(["web-scene","portal-item"],"geometries")],he.prototype,"readGeometries",null),he=pe=(0,r._)([(0,g.$)("esri.layers.support.SceneFilter")],he);const ye=he;var me=i(84952),fe=i(8947),ge=i(61956),ve=i(24212),we=i(30291);async function _e(e){const t=[];for(const i of e)i.name.toLowerCase().endsWith(".zip")?t.push(Ie(i)):t.push(Promise.resolve(i));return(await Promise.all(t)).flat()}async function Ie(e){const{BlobReader:t,ZipReader:r,BlobWriter:s}=await Promise.all([i.e(8392),i.e(9588)]).then(i.bind(i,9588)),n=[],o=new r(new t(e));return(await o.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s,i=e.getData?.(t).then((t=>new File([t],e.filename)));i&&n.push(i)})),Promise.all(n)}var be=i(708),Fe=i(45671),Ae=i(78553);const Se=new Set(["3DObject","Point"]),Me=(0,Q.p)();let Le=class extends(D((0,M.w6)((0,E.w6)((0,A.b)((0,L.q)((0,x.A)((0,T.j)((0,p.P)((0,S.d)((0,F.p)((0,a.O)(I.A)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new l.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const i=this.getFeatureType(t?.feature)?.domains?.[e];return i&&"inherited"!==i.type?i:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new W.A(this.fields)}readNodePages(e,t,i){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.W4.fromJSON(e,i)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,V.C$)(this.associatedLayer)}get geometryType(){return Te[this.profile]||"mesh"}set renderer(e){(0,Z.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:H.P;const{query:t,queryRelated:i,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:p},operations:{supportsEditing:c,supportsAdd:h,supportsUpdate:y,supportsDelete:m,supportsQuery:f,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,w=e.operations.supportsChangeTracking,_=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:i,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:_&&o,supportsUploadWithItemId:n},data:{supportsAttachment:p,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:f,supportsQueryAttachments:g,supportsEditing:c&&w,supportsAdd:_&&h&&w,supportsDelete:_&&m&&w,supportsUpdate:y&&w,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const i=t.store.profile;return null!=i&&xe[i]?xe[i]:(u.A.getLogger(this).error("Unknown or missing profile",{profile:i,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,fe.L)(this,{origin:"service"},t),(0,Z.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ge.A;return"mesh"===this.geometryType?this.associatedLayer?.infoFor3D&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const i=(0,Z.hL)(this.fieldsIndex,await(0,Fe.TO)(this,(0,Fe.D8)(this)));return(0,be.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,i,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const i=await this.queryCachedAttributes(e,[t]);if(!i||0===i.length)throw new d.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const r=new s.A;return r.attributes=i[0],r.layer=this,r.sourceLayer=this,r}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,we.tn)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new d.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(E.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(E.Xh.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await i.e(6247).then(i.bind(i,78628));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new d.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,l=s?.globalIdUsed??!0;if(a&&null==o)throw new d.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new d.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,C.Wo)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,V.GA)(n,e.deleteFeatures,o)}),r(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new d.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){const i=e=>{throw u.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||i(new d.A("invalid:layer","SceneLayer has no capability for mesh conversion"));const r=await this.extractAndFilterFiles(e),s=r.reduce(((e,t)=>(0,B.oF)(this.infoFor3D,t)?e+1:e),0);0===s&&i(new b.VP),s>1&&i(new b.XQ);const n=this.spatialReference,o=t?.location??new _.A({x:0,y:0,z:0,spatialReference:n}),a=o.spatialReference.isGeographic?"local":"georeferenced",l=w.A.createWithExternalSource(o,r,{vertexSpace:a}),[p]=await this.uploadAssets([l],t);return p}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await _e(e)).filter((e=>(0,B.fu)(t,e))):e}validateLayer(e){if(e.layerType&&!Se.has(e.layerType))throw new d.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new d.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let i=!1,r=!1;if(null==e)i=!0,r=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":i=!0,r=s;break;case"vertex-reference-frame":i=!0,r=!s;break;default:i=!1}}if(!i)throw new d.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!r)throw new d.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new d.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some((t=>t.name===e.name)),i=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||i,supportsLayerQuery:i};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const i=this.getField(t.name);i?(!i.domain&&t.domain&&(i.domain=t.domain.clone()),i.editable=t.editable,i.nullable=t.nullable,i.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,m.oY)(this);for(let i=0;i<e.length;i++){const r=e[i],s=this.originIdOf(r),n=this.associatedLayer.originIdOf(r);s<n&&(n===v.Gr.SERVICE||n===v.Gr.PORTAL_ITEM)&&t.setAtOrigin(r,this.associatedLayer[r],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");null!=this.associatedLayer?.infoFor3D&&e&&(0,C.Wo)(this.associatedLayer?.url)&&P(this)&&(0,m.oY)(this).setAtOrigin("fullExtent",e.clone(),v.Gr.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:i,portalItem:r}=await(0,k.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ee.S.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:i,portalItem:r}),await this.associatedLayer.load()}catch(e){(0,c.zf)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.C_)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):u.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,ve.XF)(u.A.getLogger(this),(0,ve.$7)("Mesh scene layers","relative-to-scene",e)),(0,ve.XF)(u.A.getLogger(this),(0,ve.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:i,fieldsIndex:r,path:s,customParameters:n,apiKey:o,signal:a}){if(null==t)throw new d.A(`${i}:no-cached-statistics`,"Cached statistics are not available for this layer");const l=r.get(e);if(null==l)throw new d.A(`${i}:field-unexisting`,`Field '${e}' does not exist on the layer`);const u=t.find((e=>e.name===l.name));if(null==u)throw new d.A(`${i}:no-cached-statistics`,"Cached statistics for this attribute are not available");const p=(0,me.fj)(s,u.href),{data:c}=await(0,re.A)(p,{query:{f:"json",...n,token:o},responseType:"json",signal:a});return c}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};(0,r._)([(0,y.MZ)({types:{key:"type",base:G.c,typeMap:{selection:K.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Le.prototype,"featureReduction",void 0),(0,r._)([(0,y.MZ)({type:[te],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Le.prototype,"rangeInfos",void 0),(0,r._)([(0,y.MZ)({json:{read:!1}})],Le.prototype,"associatedLayer",void 0),(0,r._)([(0,y.MZ)({type:["show","hide"]})],Le.prototype,"listMode",void 0),(0,r._)([(0,y.MZ)({type:["ArcGISSceneServiceLayer"]})],Le.prototype,"operationalLayerType",void 0),(0,r._)([(0,y.MZ)({json:{read:!1},readOnly:!0})],Le.prototype,"type",void 0),(0,r._)([(0,y.MZ)({...Me.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"fields",void 0),(0,r._)([(0,y.MZ)()],Le.prototype,"types",null),(0,r._)([(0,y.MZ)()],Le.prototype,"typeIdField",null),(0,r._)([(0,y.MZ)()],Le.prototype,"templates",null),(0,r._)([(0,y.MZ)()],Le.prototype,"formTemplate",null),(0,r._)([(0,y.MZ)({readOnly:!0,clonable:!1})],Le.prototype,"fieldsIndex",null),(0,r._)([(0,y.MZ)({type:X.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Le.prototype,"floorInfo",void 0),(0,r._)([(0,y.MZ)(Me.outFields)],Le.prototype,"outFields",void 0),(0,r._)([(0,y.MZ)({type:J.W4,readOnly:!0,json:{read:!1}})],Le.prototype,"nodePages",void 0),(0,r._)([(0,f.w)("service","nodePages",["nodePages","pointNodePages"])],Le.prototype,"readNodePages",null),(0,r._)([(0,y.MZ)({type:[J.uV],readOnly:!0})],Le.prototype,"materialDefinitions",void 0),(0,r._)([(0,y.MZ)({type:[J.Ot],readOnly:!0})],Le.prototype,"textureSetDefinitions",void 0),(0,r._)([(0,y.MZ)({type:[J.L0],readOnly:!0})],Le.prototype,"geometryDefinitions",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],Le.prototype,"serviceUpdateTimeStamp",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],Le.prototype,"attributeStorageInfo",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],Le.prototype,"statisticsInfo",void 0),(0,r._)([(0,y.MZ)({type:l.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Le.prototype,"excludeObjectIds",void 0),(0,r._)([(0,y.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Le.prototype,"definitionExpression",void 0),(0,r._)([(0,y.MZ)({type:ye,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Le.prototype,"filter",void 0),(0,r._)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Le.prototype,"path",void 0),(0,r._)([(0,y.MZ)(q.Yj)],Le.prototype,"elevationInfo",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"effectiveCapabilities",null),(0,r._)([(0,y.MZ)({readOnly:!0})],Le.prototype,"effectiveEditingEnabled",null),(0,r._)([(0,y.MZ)({type:String})],Le.prototype,"geometryType",null),(0,r._)([(0,y.MZ)(q.kF)],Le.prototype,"labelsVisible",void 0),(0,r._)([(0,y.MZ)({type:[Y.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:z.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:z.w},write:!0}})],Le.prototype,"labelingInfo",void 0),(0,r._)([(0,y.MZ)(q.fV)],Le.prototype,"legendEnabled",void 0),(0,r._)([(0,y.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const i=t.layerDefinition?.drawingInfo?.transparency;return void 0!==i?(0,Ae.D)(i):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Le.prototype,"opacity",void 0),(0,r._)([(0,y.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"priority",void 0),(0,r._)([(0,y.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"semantic",void 0),(0,r._)([(0,y.MZ)({types:o.X,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Le.prototype,"renderer",null),(0,r._)([(0,y.MZ)({json:{read:!1}})],Le.prototype,"cachedDrawingInfo",void 0),(0,r._)([(0,f.w)("service","cachedDrawingInfo")],Le.prototype,"readCachedDrawingInfo",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"capabilities",null),(0,r._)([(0,y.MZ)({type:Boolean,json:{read:!1}})],Le.prototype,"editingEnabled",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],Le.prototype,"infoFor3D",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],Le.prototype,"relationships",null),(0,r._)([(0,y.MZ)(q.M6)],Le.prototype,"popupEnabled",void 0),(0,r._)([(0,y.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],Le.prototype,"popupTemplate",void 0),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"defaultPopupTemplate",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],Le.prototype,"objectIdField",void 0),(0,r._)([(0,f.w)("service","objectIdField",["objectIdField","fields"])],Le.prototype,"readObjectIdField",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],Le.prototype,"globalIdField",void 0),(0,r._)([(0,f.w)("service","globalIdField",["globalIdField","fields"])],Le.prototype,"readGlobalIdField",null),(0,r._)([(0,y.MZ)({readOnly:!0,type:String,json:{read:!1}})],Le.prototype,"displayField",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],Le.prototype,"profile",void 0),(0,r._)([(0,f.w)("service","profile",["store.profile"])],Le.prototype,"readProfile",null),(0,r._)([(0,y.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Le.prototype,"normalReferenceFrame",void 0),(0,r._)([(0,y.MZ)(q.PY)],Le.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,y.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"serviceItemId",void 0),(0,r._)([(0,y.MZ)(O.B)],Le.prototype,"useViewTime",null),Le=(0,r._)([(0,g.$)("esri.layers.SceneLayer")],Le);const xe={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Te={"mesh-pyramids":"mesh",points:"point"},Ee=Le},55726:(e,t,i)=>{i.d(t,{$1:()=>d,H2:()=>h,MT:()=>y,VP:()=>m,WF:()=>u,Wt:()=>o,XQ:()=>f,hK:()=>c,nS:()=>p,uh:()=>a,xY:()=>l});var r=i(49186);const s="upload-assets",n=()=>new Error;class o extends r.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends r.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends r.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class d extends r.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends r.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends r.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class c extends r.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends r.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class y extends r.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class m extends r.A{constructor(){super("invalid-input:no-model","No supported model found")}}class f extends r.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},52136:(e,t,i)=>{i.d(t,{p:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),s=i(53966),n=i(10107),o=(i(44208),i(87811),i(40608)),a=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r._)([(0,n.MZ)()],t.prototype,"title",null),(0,r._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,i)=>{i.d(t,{d:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},47685:(e,t,i)=>{i.d(t,{Mk:()=>h,Zk:()=>p,w6:()=>f});var r=i(90237),s=i(65529),n=i(4718),o=i(74887),a=i(10107),l=(i(44208),i(53966),i(40608)),d=i(20816);const u=new s.A.EventEmitter;function p(e,t,i=null,r=!1){const s=(0,o.Tw)();return r=null==t||r,u.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:i,mayReceiveServiceEdits:r,result:s.promise}),s}const c=Symbol();function h(e){return null!=e&&"object"==typeof e&&c in e}function y(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,i){const r=new URL(e).host,s=d.Z3.get(r),n=e=>!e||e===s;return n(t)&&n(i)||t===i}const f=e=>{var t;let i=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:i,gdbVersion:r,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=i&&null!=this.layerId&&i===this.layerId,d=y(this),u=y(this)&&m(t,r,this.gdbVersion);if(!a||d&&!u||!l&&!s)return;const p=o.then((e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const i=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(i){const{adds:t,updates:r,deletes:s}=i.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:s?s.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:r?r.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,s.historicMoment)&&this.emit("edits",s),s})).then((e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,e.historicMoment)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:i,moment:r}=e,s=t===this.url,n=y(this),o=y(this)&&m(t,i,this.gdbVersion),a=y(this)&&!m(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then((()=>{this.addHandles(function(e){return u.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return u.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}_shouldUpdateHistoricMoment(e,t,i){return"historicMoment"in this&&this.historicMoment!==i&&(0,d.w5)(e,t)}};return t=c,(0,r._)([(0,a.MZ)()],i.prototype,"lastEditsEventDate",void 0),i=(0,r._)([(0,l.$)("esri.layers.mixins.EditBusLayer")],i),i}},8303:(e,t,i)=>{i.d(t,{A:()=>b});var r=i(90237),s=i(92602),n=i(70333),o=i(78888),a=i(60999),l=i(49186),d=i(53966),u=i(97768),p=i(74887),c=i(84952),h=i(10107),y=(i(44208),i(87811),i(36005)),m=i(40608),f=i(43937),g=i(83531),v=i(20655),w=i(80812),_=i(41318),I=i(10407);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(1204)]).then(i.bind(i,41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,I.It)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!s||!(0,c.b8)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,l=!1,d=!1;if(!o)return{features:{edit:a,fullEdit:l},content:{updateItem:d}};try{if(r?await i.reload():(i=new w.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,I.It)(i)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(r))return s.user;const l=`${r}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?_.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,h.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},25036:(e,t,i)=>{i.d(t,{j:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const i=this._get("effectiveScaleRange");return i&&i.minScale===e.minScale&&i.maxScale===e.maxScale?i:e}};return(0,r._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,r._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,r._)([(0,s.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,r._)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},82935:(e,t,i)=>{i.d(t,{B:()=>h,e:()=>y});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(36005)),o=i(40608),a=i(89317),l=i(30524),d=i(96184),u=i(73133),p=i(79677),c=i(10184);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const r=i.timeOffset,s=u.j.fromJSON(i.timeOffsetUnits);return r&&s?new c.A({value:r,unit:s}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r._)([(0,s.MZ)({type:p.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,r._)([(0,s.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,r._)([(0,n.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,r._)([(0,s.MZ)({value:null,type:d.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,r._)([(0,s.MZ)(h)],t.prototype,"useViewTime",void 0),t=(0,r._)([(0,o.$)("esri.layers.mixins.TemporalLayer")],t),t}},40530:(e,t,i)=>{i.d(t,{c:()=>a});var r=i(90237),s=i(25482),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608));let a=class extends s.oY{constructor(){super(...arguments),this.type=null}};(0,r._)([(0,n.MZ)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,r._)([(0,o.$)("esri.layers.support.FeatureReduction")],a)},67202:(e,t,i)=>{i.d(t,{A:()=>d});var r,s=i(90237),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608)),a=i(40530);let l=r=class extends a.c{constructor(e){super(e),this.type="selection"}clone(){return new r}};(0,s._)([(0,n.MZ)({type:["selection"]})],l.prototype,"type",void 0),l=r=(0,s._)([(0,o.$)("esri.layers.support.FeatureReductionSelection")],l);const d=l},37352:(e,t,i)=>{i.d(t,{A:()=>u});var r,s=i(90237),n=i(5503),o=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(40608));let d=r=class extends o.oY{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"floorField",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllMode",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllLevelIds",void 0),d=r=(0,s._)([(0,l.$)("esri.layers.support.LayerFloorInfo")],d);const u=d},96184:(e,t,i)=>{i.d(t,{A:()=>m});var r=i(90237),s=i(69540),n=i(25482),o=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),l=i(40608),d=i(43937),u=i(79677),p=i(10184),c=i(56400);function h(e,t){return p.A.fromJSON({value:e,unit:t})}let y=class extends((0,s.O)(n.oY)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?u.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,r._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,r._)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,r._)([(0,o.MZ)({type:u.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,r._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,r._)([(0,d.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,r._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,r._)([(0,o.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,r._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,r._)([(0,d.K)("interval")],y.prototype,"writeInterval",null),(0,r._)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,r._)([(0,o.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,r._)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,r._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,r._)([(0,o.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,r._)([(0,l.$)("esri.layers.support.TimeInfo")],y);const m=y},17036:(e,t,i)=>{i.d(t,{p:()=>l});var r=i(44208),s=i(53966),n=i(20437),o=i(95466),a=i(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,r.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const i=this.fieldsIndex?.has(t);i||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},20557:(e,t,i)=>{i.d(t,{E1:()=>a,Fm:()=>l,JZ:()=>y,R_:()=>o,fu:()=>s,oF:()=>n,rq:()=>d});const r=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=p(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const i=d(t,e.supportedFormats??[]);return null!=i&&e.editFormats.includes(i)}function o(e,t){return c(function(e,t){const i=e.toLowerCase();return u(t).find((e=>h(e)===i))}(e,t))}function a(e,t){return c(p(e,t))}function l(e,t){return h(function(e,t){return u(t).find((t=>c(t)===e))}(e,t))}function d(e,t){return a(e.name,t)??o(e.type,t)}function u(e){return[...r,...e]}function p(e,t){const i=e.toLowerCase();return u(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>i.endsWith(e)))))}function c(e){return e?.[0]}function h(e){return e?.[1].toLowerCase()}function y(e){return e.tables?.find((e=>"assetMaps"===e.role))}},73133:(e,t,i)=>{i.d(t,{j:()=>r});const r=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},8947:(e,t,i)=>{i.d(t,{L:()=>o});var r=i(60999),s=i(74887),n=i(67076);async function o(e,t,i){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,r.Ke)(o.populateFromStyle());if((0,s.Te)(i),!1===a.ok){const i=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},10184:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(90237),s=i(69540),n=i(25482),o=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),d=i(40608),u=i(73133);let p=class extends((0,s.O)(n.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,r._)([(0,l.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,r._)([(0,d.$)("esri.time.TimeInterval")],p);const c=p},20816:(e,t,i)=>{i.d(t,{TA:()=>s,We:()=>a,Z3:()=>n,ZJ:()=>l,w5:()=>d});var r=i(78888);const s=(0,i(13069).vD)(),n=new Map,o=new Map;async function a(e,t,i){if(!e||!i)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,r.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,r=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&r){const[{deleteForwardEdits:t},{default:r}]=await Promise.all([i.e(2186).then(i.bind(i,32186)),i.e(2558).then(i.bind(i,32558))]),a=await t(n,e,new r({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=o.get(i)?.entries();if(r)for(const[e,i]of r)if(i.name===t)return"edit"===i.lockType;return!1}new Map}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9748],{21818:(e,t,r)=>{function n(e){}r.d(t,{Xb:()=>n}),r(44208)},51624:(e,t,r)=>{r.d(t,{A:()=>c});var n,s,o=r(44208),i=r(93687);(s=n||(n={}))[s.varint=0]="varint",s[s.fixed64=1]="fixed64",s[s.delimited=2]="delimited",s[s.fixed32=5]="fixed32",s[s.unknown=99]="unknown";const a=4294967296,l=new TextDecoder("utf-8"),u=(0,o.A)("safari")||(0,o.A)("ios")?6:(0,o.A)("ff")?12:32;class c{constructor(e,t,r=0,s=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,r,s)}_init(e,t,r,n){this._data=e,this._dataView=t,this._pos=r,this._end=n}asUnsafe(){return this}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,n){const s=this.getMessage(),o=e(s,t,r,n);return s.release(),o}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,n=0;if(this._end-t>=10)do{if(n=e[t++],r|=127&n,!(128&n))break;if(n=e[t++],r|=(127&n)<<7,!(128&n))break;if(n=e[t++],r|=(127&n)<<14,!(128&n))break;if(n=e[t++],r|=(127&n)<<21,!(128&n))break;if(n=e[t++],r+=268435456*(127&n),!(128&n))break;if(n=e[t++],r+=34359738368*(127&n),!(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),!(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),!(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),!(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),!(128&n))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(n=e[t],128&n);)++t,r+=(127&n)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*s}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t,r=0,n=0;const s=1&e[this._pos];if(n=e[this._pos++],r|=127&n,!(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<7,!(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<14,!(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<21,!(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r+=268435456*(127&n),!(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r+=34359738368*(127&n),!(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r+=4398046511104*(127&n),!(128&n))return s?-(r+1)/2:r/2;if(t=BigInt(r),n=e[this._pos++],t+=0x2000000000000n*BigInt(127&n),!(128&n))return Number(s?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x100000000000000n*BigInt(127&n),!(128&n))return Number(s?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x8000000000000000n*BigInt(127&n),!(128&n))return Number(s?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==n.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>u){const n=e.subarray(t,r);return l.decode(n)}let n="",s="";for(let o=t;o<r;++o){const t=e[o];128&t?s+="%"+t.toString(16):(n+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(n+=decodeURIComponent(s)),n}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}c.pool=new i.A(c,void 0,(e=>{e._data=null,e._dataView=null}))},70328:(e,t,r)=>{r.d(t,{BI:()=>y,Ej:()=>c,Hq:()=>u,Ie:()=>p,Jt:()=>g,Ne:()=>h,RF:()=>a,aI:()=>_,fA:()=>o,hZ:()=>f,iT:()=>l,is:()=>m,qv:()=>b,vI:()=>d,v_:()=>w,vt:()=>s,w1:()=>i});var n=r(5443);function s(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,n,o,i,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=o,a[5]=i,a}function i(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,n=t.length/3){let s=e[0],o=e[1],i=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)s=Math.min(s,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),i=Math.min(i,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=s,e[1]=o,e[2]=i,e[3]=a,e[4]=l,e[5]=u}function c(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function p(e){return e?f(e,b):s(b)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,r,n,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function _(e,t,r){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];s()},65864:(e,t,r)=>{r.d(t,{$B:()=>g,Bi:()=>f,Rg:()=>d,U9:()=>c,ZC:()=>u,fT:()=>h,rS:()=>p,xD:()=>m});var n=r(5443),s=r(91075),o=r(48526),i=r(86738),a=r(39829),l=r(82799);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function h(e){return void 0!==e.x&&void 0!==e.y}function d(e){return void 0!==e.paths}function f(e){return void 0!==e.rings}function p(e){return null==e?null:e instanceof s.A?e:h(e)?i.A.fromJSON(e):d(e)?l.A.fromJSON(e):f(e)?a.A.fromJSON(e):c(e)?o.A.fromJSON(e):u(e)?n.A.fromJSON(e):null}function g(e){return e?h(e)?"esriGeometryPoint":d(e)?"esriGeometryPolyline":f(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const y={esriGeometryPoint:i.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:o.A};function m(e){return e&&y[e]||null}},62577:(e,t,r)=>{function n(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance,1,1]:[1,1,1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax,e.extent.zmin??0,e.extent.mmin??0]:[0,0,0,0]}:null}function s(e){if(function(e){return"lowerLeft"===e.originPosition&&4===e.scale.length&&4===e.translate.length}(e))return e;const{originPosition:t,scale:r,translate:n}=e,s=r[0]??1,o=r[1]??1;return{originPosition:"lowerLeft",scale:[s,"lowerLeft"===t?o:-o,r[2]??1,r[3]??1],translate:[n[0]??0,n[1]??0,n[2]??0,n[3]??0]}}function o({scale:e,translate:t},r){return r*e[0]+t[0]}function i({scale:e,translate:t},r){return r*e[1]+t[1]}function a({scale:e,translate:t},r){return(r??0)*e[2]+t[2]}function l({scale:e,translate:t},r){return r?r*e[3]+t[3]:0}function u(e,t){return e&&t?f:e&&!t?h:!e&&t?d:c}r.d(t,{$X:()=>_,Gy:()=>g,P5:()=>b,Q1:()=>s,SW:()=>y,Tr:()=>m,VV:()=>n}),r(65864);const c=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const n=t[0];let s=o(e,n[0]),a=i(e,n[1]);r[0]=[s,a];const{scale:l,originPosition:u}=e,c=l[0],h="lowerLeft"===u?l[1]:-l[1];for(let e=1;e<t.length;e++){const[n,o]=t[e];s+=c*n,a+=h*o,r[e]=[s,a]}return r},h=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const n=t[0];let s=o(e,n[0]),l=i(e,n[1]);r[0]=[s,l,a(e,n[2])];const{scale:u,originPosition:c}=e,h=u[0],d="lowerLeft"===c?u[1]:-u[1];for(let n=1;n<t.length;n++){const[o,i,u]=t[n];s+=h*o,l+=d*i,r[n]=[s,l,a(e,u)]}return r},d=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const n=t[0];let s=o(e,n[0]),a=i(e,n[1]);r[0]=[s,a,l(e,n[2])];const{scale:u,originPosition:c}=e,h=u[0],d="lowerLeft"===c?u[1]:-u[1];for(let n=1;n<t.length;n++){const[o,i,u]=t[n];s+=h*o,a+=d*i,r[n]=[s,a,l(e,u)]}return r},f=(e,t)=>{const r=new Array(t.length);if(!t.length)return r;const n=t[0];let s=o(e,n[0]),u=i(e,n[1]);r[0]=[s,u,a(e,n[2]),l(e,n[3])];const{scale:c,originPosition:h}=e,d=c[0],f="lowerLeft"===h?c[1]:-c[1];for(let n=1;n<t.length;n++){const[o,i,c,h]=t[n];s+=d*o,u+=f*i,r[n]=[s,u,a(e,c),l(e,h)]}return r};function p(e,t,r){const n=new Array(r.length);for(let s=0;s<r.length;s++)n[s]=t(e,r[s]);return n}function g(e,t,r){const n=s(e);return t.x=function({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}(n,r.x),t.y=function({scale:e,translate:t},r){return Math.round((r-t[1])/e[1])}(n,r.y),null!=r.z&&(t.z=function({scale:e,translate:t},r){return Math.round(((r??0)-t[2])/e[2])}(n,r.z)),null!=r.m&&(t.m=function({scale:e,translate:t},r){return r?Math.round((r-t[3])/e[3]):0}(n,r.m)),t}function y(e,t,r,n=r?.hasZ??!1,o=r?.hasM??!1){if(null!=r){const i=s(e);t.points=u(n,o)(i,r.points),t.hasZ=n,t.hasM=o}return t}function m(e,t,r,n=null!=r?.z,u=null!=r?.m){if(null==r)return t;const c=s(e);return t.x=o(c,r.x),t.y=i(c,r.y),n&&(t.z=a(c,r.z)),u&&(t.m=l(c,r.m)),t}function _(e,t,r,n=r?.hasZ??!1,o=r?.hasM??!1){if(null!=r){const i=s(e);t.rings=p(i,u(n,o),r.rings),t.hasZ=n,t.hasM=o}return t}function b(e,t,r,n=r?.hasZ??!1,o=r?.hasM??!1){if(null!=r){const i=s(e);t.paths=p(i,u(n,o),r.paths),t.hasZ=n,t.hasM=o}return t}},50498:(e,t,r)=>{r.d(t,{Y:()=>o,g:()=>s});var n=r(66552);const s=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),o=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},62815:(e,t,r)=>{r.d(t,{N:()=>i});var n=r(83047),s=r(73941),o=r(21325);function i(e,t,r){if(null==t||null==r||r.vcsWkid||(0,o.aI)(t,r)||(0,s.xP)(t)||(0,s.xP)(r))return null;const i=(0,n.G9)(t)/(0,n.G9)(r);if(1===i)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,i);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,i);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,i);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,i);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,i);default:return null}}},43334:(e,t,r)=>{r.d(t,{N3:()=>o,Om:()=>s});var n=r(92722);class s{constructor(e=null,t={},r,n){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const r=e.geometry?n.A.fromJSON(e.geometry):null,o=e.centroid?n.A.fromJSON(e.centroid):null,i=e.attributes[t];return new s(r,e.attributes,o,i)}weakClone(){const e=new s(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new s(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function o(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>n});class n{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new n;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>n});class n{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromJSON(e){return new n(e.lengths,e.coords,e.hasIndeterminateRingOrder)}static fromRect(e){const[t,r,s,o]=e,i=s-t,a=o-r;return new n([5],[t,r,i,0,0,a,-i,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const n=this.lengths[r];for(let r=0;r<n;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let n=0;for(const e of r){for(let r=1;r<e;r++)t[2*(n+r)]+=t[2*(n+r)-2],t[2*(n+r)+1]+=t[2*(n+r)-1];n+=e}return e}clone(e){if(0===this.lengths.length)return new n([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new n(this.lengths,e,this.hasIndeterminateRingOrder)):new n(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},90708:(e,t,r)=>{r.d(t,{B2:()=>T,BW:()=>Z,Ch:()=>ne,DF:()=>k,Di:()=>B,E2:()=>j,IE:()=>w,Nl:()=>H,Q4:()=>se,Rk:()=>ie,Ux:()=>z,Ye:()=>O,ZF:()=>W,eY:()=>X,jH:()=>Q,jQ:()=>re,kz:()=>K,oN:()=>E,q3:()=>$,qK:()=>q,qN:()=>V,z5:()=>L,zv:()=>J});var n=r(49186),s=r(53966),o=r(97768),i=r(70328),a=r(19419),l=r(65864),u=r(43334),c=r(58512),h=r(92722);function d(e,t){return e?t?4:3:t?3:2}const f=()=>s.A.getLogger("esri.layers.graphics.featureConversionUtils"),p={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},g=(e,t,r,n,s,o)=>{e[r]=s,e[r+1]=o},y=(e,t,r,n,s,o)=>{e[r]=s,e[r+1]=o,e[r+2]=t[n+2]},m=(e,t,r,n,s,o)=>{e[r]=s,e[r+1]=o,e[r+2]=t[n+3]},_=(e,t,r,n,s,o)=>{e[r]=s,e[r+1]=o,e[r+2]=t[n+2],e[r+3]=t[n+3]};function b(e,t,r,n){if(e){if(r)return t&&n?_:y;if(t&&n)return m}else if(t&&n)return y;return g}function w({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function T({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function I({scale:e,translate:t},r,n){return r*e[n]+t[n]}function k(e,t,r){return e?t?r?N(e):v(e):r?G(e):x(e):null}function x(e){const t=e.coords;return{x:t[0],y:t[1]}}function M(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function v(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function F(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function G(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function P(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function N(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function A(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function S(e,t){return e&&t?A:e?F:t?P:M}function V(e,t,r=S(null!=t.z,null!=t.m)){return r(e,t)}function q(e,t,r){if(null==e)return null;const n=d(t,r),s=[];for(let t=0;t<e.coords.length;t+=n){const r=[];for(let s=0;s<n;s++)r.push(e.coords[t+s]);s.push(r)}return t?r?{points:s,hasZ:t,hasM:r}:{points:s,hasZ:t}:r?{points:s,hasM:r}:{points:s}}function R(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const n=e.coords;let s=0;for(const e of t.points)for(let t=0;t<r;t++)n[s++]=e[t];return e}function Z(e,t,r){if(!e)return null;const n=d(t,r),{coords:s,lengths:o}=e,i=[];let a=0;for(const e of o){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e.push(s[a++]);t.push(e)}i.push(t)}return t?r?{paths:i,hasZ:t,hasM:r}:{paths:i,hasZ:t}:r?{paths:i,hasM:r}:{paths:i}}function C(e,t,r=d(t.hasZ,t.hasM)){const{lengths:n,coords:s}=e;let o=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)s[o++]=t[e];n.push(e.length)}return e}function L(e,t,r){if(!e)return null;const n=d(t,r),{coords:s,lengths:o}=e,i=[];let a=0;for(const e of o){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e.push(s[a++]);t.push(e)}i.push(t)}return t?r?{rings:i,hasZ:t,hasM:r}:{rings:i,hasZ:t}:r?{rings:i,hasM:r}:{rings:i}}function O(e,t,r=t.hasZ,n=t.hasM){return function(e,t,r,n){const s=d(r,n),{lengths:o,coords:i}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<s;e++)i[a++]=t[e];o.push(e.length)}return e}(e,t.rings,r,n)}const U=[],D=[];function j(e,t,r,n,s){U[0]=e;const[o]=B(D,U,t,r,n,s);return le(U),le(D),o}function B(e,t,r,s,o,i){if(le(e),!r){for(const r of t){const t=i?r.attributes[i]:void 0;e.push(new u.Om(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,n,s){const o=S(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?o(new h.A,r):null;e.push(new u.Om(t,n,null,s?n[s]:void 0))}return e}(e,t,s,o,i);case"esriGeometryMultipoint":return function(e,t,r,n,s){const o=d(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?R(new h.A,r,o):null;e.push(new u.Om(t,n,null,s?n[s]:void 0))}return e}(e,t,s,o,i);case"esriGeometryPolyline":return function(e,t,r,n,s){const o=d(r,n);for(const{geometry:r,attributes:n,centroid:i}of t){const t=null!=r?C(new h.A,r,o):null,a=null!=i?V(new h.A,i):null;e.push(new u.Om(t,n,a,s?n[s]:void 0))}return e}(e,t,s,o,i);case"esriGeometryPolygon":return function(e,t,r,n,s){for(const{geometry:o,centroid:i,attributes:a}of t){const t=null!=o?O(new h.A,o,r,n):null,l=s?a[s]:void 0;null!=i?e.push(new u.Om(t,a,M(new h.A,i),l)):e.push(new u.Om(t,a,null,l))}return e}(e,t,s,o,i);default:f().error("convertToFeatureSet:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${r}'`)),le(e)}return e}function E(e,t,r,n){D[0]=e,Y(U,D,t,r,n);const s=U[0];return le(U),le(D),s}function z(e,t,r){if(null==e)return null;const s=new h.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,l.fT)(e)?S(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(s,e):(0,l.Bi)(e)?O(s,e,t,r):(0,l.Rg)(e)?C(s,e,d(t,r)):(0,l.U9)(e)?R(s,e,d(t,r)):void f().error("convertFromGeometry:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${e}'`))}function J(e,t,r,s){const o=e&&("coords"in e?e:e.geometry);if(null==o)return null;switch(t){case"esriGeometryPoint":{let e=x;return r&&s?e=N:r?e=v:s&&(e=G),e(o)}case"esriGeometryMultipoint":return q(o,r,s);case"esriGeometryPolyline":return Z(o,r,s);case"esriGeometryPolygon":return L(o,r,s);default:return f().error("convertToGeometry:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${t}'`)),null}}function Y(e,t,r,s,o){if(le(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,n){let s=x;r&&n?s=N:r?s=v:n&&(s=G);for(const r of t){const{geometry:t,attributes:n}=r,o=null!=t?s(t):null;e.push({attributes:n,geometry:o})}return e}(e,t,s,o);case"esriGeometryMultipoint":return function(e,t,r,n){for(const{geometry:s,attributes:o}of t)e.push({attributes:o,geometry:null!=s?q(s,r,n):null});return e}(e,t,s,o);case"esriGeometryPolyline":return function(e,t,r,n){for(const{geometry:s,attributes:o}of t)e.push({attributes:o,geometry:null!=s?Z(s,r,n):null});return e}(e,t,s,o);case"esriGeometryPolygon":return function(e,t,r,n){for(const{geometry:s,attributes:o,centroid:i}of t){const t=null!=s?L(s,r,n):null;if(null!=i){const r=x(i);e.push({attributes:o,centroid:r,geometry:t})}else e.push({attributes:o,geometry:t})}return e}(e,t,s,o);default:f().error("convertToFeatureSet:unknown-geometry",new n.A(`Unable to parse unknown geometry type '${r}'`))}return e}function W(e){const{objectIdFieldName:t,spatialReference:r,transform:n,fields:s,hasM:o,hasZ:i,features:a,geometryType:l,exceededTransferLimit:u,uniqueIdField:c,queryGeometry:h,queryGeometryType:d}=e,f={features:Y([],a,l,i,o),fields:s,geometryType:l,objectIdFieldName:t,spatialReference:r,uniqueIdField:c,queryGeometry:J(h,d,!1,!1)};return n&&(f.transform=n),u&&(f.exceededTransferLimit=u),o&&(f.hasM=o),i&&(f.hasZ=i),f}function $(e,t){const r=new c.A,{hasM:s,hasZ:o,features:i,objectIdFieldName:a,spatialReference:l,geometryType:u,exceededTransferLimit:h,transform:d,fields:p}=e;return p&&(r.fields=p),r.geometryType=u??null,r.objectIdFieldName=a??t??null,r.spatialReference=l??null,r.objectIdFieldName?(i&&B(r.features,i,u,o,s,r.objectIdFieldName),h&&(r.exceededTransferLimit=h),s&&(r.hasM=s),o&&(r.hasZ=o),d&&(r.transform=d),r):(f().error(new n.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function X(e){const{transform:t,features:r,hasM:n,hasZ:s}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ne(e.geometry,e.geometry,n,s,t),null!=e.centroid&&ne(e.centroid,e.centroid,n,s,t);return e.transform=null,e}function Q(e,t){const{geometryType:r,features:n,hasM:s,hasZ:o}=t;if(!e)return t;for(let t=0;t<n.length;t++){const i=n[t],a=i.weakClone();a.geometry=new h.A,H(a.geometry,i.geometry,s,o,r,e),i.centroid&&(a.centroid=new h.A,H(a.centroid,i.centroid,s,o,"esriGeometryPoint",e)),n[t]=a}return t.transform=e,t}function H(e,t,r,n,s,o,i=r,a=n){if(ae(e),!t?.coords.length)return null;const l=p[s],{coords:u,lengths:c}=t,h=d(r,n),f=d(r&&i,n&&a),g=b(r,n,i,a);if(!c.length)return g(e.coords,u,0,0,w(o,u[0]),T(o,u[1])),ae(e,h,0),e;let y,m,_,I,k=0,x=0,M=x;for(const t of c){if(t<l)continue;let r=0;x=M,_=y=w(o,u[k]),I=m=T(o,u[k+1]),g(e.coords,u,x,k,_,I),r++,k+=h,x+=f;for(let n=1;n<t;n++,k+=h)_=w(o,u[k]),I=T(o,u[k+1]),_===y&&I===m||(g(e.coords,u,x,k,_-y,I-m),x+=f,r++,y=_,m=I);r>=l&&(e.lengths.push(r),M=x)}return le(e.coords,M),e.coords.length?e:null}function K(e,t,r,n,s,o,i=r,a=n){if(ae(e),!t?.coords.length)return null;const l=p[s],{coords:u,lengths:c}=t,h=d(r,n),f=d(r&&i,n&&a),g=b(r,n,i,a);if(!c.length)return g(e.coords,u,0,0,u[0],u[1]),ae(e,h,0),e;let y=0;const m=o*o;for(const t of c){if(t<l){y+=t*h;continue}const r=e.coords.length/f,n=y,s=y+(t-1)*h;g(e.coords,u,e.coords.length,n,u[n],u[n+1]),te(e.coords,u,h,m,g,n,s),g(e.coords,u,e.coords.length,s,u[s],u[s+1]);const o=e.coords.length/f-r;o>=l?e.lengths.push(o):le(e.coords,r*f),y+=t*h}return e.coords.length?e:null}function ee(e,t,r,n){const s=e[t],o=e[t+1],i=e[r],a=e[r+1],l=e[n],u=e[n+1];let c=i,h=a,d=l-c,f=u-h;if(0!==d||0!==f){const e=((s-c)*d+(o-h)*f)/(d*d+f*f);e>1?(c=l,h=u):e>0&&(c+=d*e,h+=f*e)}return d=s-c,f=o-h,d*d+f*f}function te(e,t,r,n,s,o,i){let a,l=n,u=0;for(let e=o+r;e<i;e+=r)a=ee(t,e,o,i),a>l&&(u=e,l=a);l>n&&(u-o>r&&te(e,t,r,n,s,o,u),s(e,t,e.length,u,t[u],t[u+1]),i-u>r&&te(e,t,r,n,s,u,i))}function re(e,t,r,n){if(!t?.coords?.length)return null;const s=d(r,n);let o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=s){const r=e[t],n=e[t+1];o=Math.min(o,r),u=Math.max(u,r),l=Math.min(l,n),c=Math.max(c,n)}}return(0,i.is)(e)?(0,i.BI)(e,o,l,u,c):(0,a.fA)(o,l,u,c,e),e}function ne(e,t,r,n,s){const{coords:i,lengths:a}=t,l=d(r,n);if(!i.length)return e!==t&&ae(e),e;(0,o.Lw)(s);const{originPosition:u,scale:c,translate:h}=s,f=ue;f.originPosition=u;const p=f.scale;p[0]=c[0]??1,p[1]=-(c[1]??1),p[2]=c[2]??1,p[3]=c[3]??1;const g=f.translate;if(g[0]=h[0]??0,g[1]=h[1]??0,g[2]=h[2]??0,g[3]=h[3]??0,!a.length){for(let t=0;t<l;++t)e.coords[t]=I(f,i[t],t);return e!==t&&ae(e,l,0),e}let y=0;for(let t=0;t<a.length;t++){const r=a[t];e.lengths[t]=r;for(let t=0;t<l;++t)e.coords[y+t]=I(f,i[y+t],t);let n=e.coords[y],s=e.coords[y+1];y+=l;for(let t=1;t<r;t++,y+=l){n+=i[y]*p[0],s+=i[y+1]*p[1],e.coords[y]=n,e.coords[y+1]=s;for(let t=2;t<l;++t)e.coords[y+t]=I(f,i[y+t],t)}}return e!==t&&ae(e,i.length,a.length),e}function se(e,t,r,n,s,o){if(ae(e),e.lengths.push(...t.lengths),r===s&&n===o)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const i=d(r,n),a=b(r,n,s,o),l=t.coords;for(let t=0;t<l.length;t+=i)a(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function oe(e,t,r,n){let s=0,o=e[n*t],i=e[n*(t+1)];for(let a=1;a<r;a++){const r=o+e[n*(t+a)],l=i+e[n*(t+a)+1],u=(r-o)*(l+i);o=r,i=l,s+=u}return.5*s}function ie(e,t){const{coords:r,lengths:n}=e;let s=0,o=0;for(let e=0;e<n.length;e++){const i=n[e];o+=oe(r,s,i,t),s+=i}return Math.abs(o)}function ae(e,t=0,r=0){le(e.lengths,r),le(e.coords,t)}function le(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},20437:(e,t,r)=>{r.d(t,{A:()=>y});var n,s=r(90237),o=r(66552),i=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),c=r(36005),h=r(40608),d=r(72088),f=r(98453);const p=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let g=n=class extends i.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?p.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],g.prototype,"alias",void 0),(0,s._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],g.prototype,"defaultValue",void 0),(0,s._)([(0,a.MZ)()],g.prototype,"description",void 0),(0,s._)([(0,c.w)("description")],g.prototype,"readDescription",null),(0,s._)([(0,a.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],g.prototype,"domain",void 0),(0,s._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"editable",void 0),(0,s._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],g.prototype,"length",void 0),(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],g.prototype,"name",void 0),(0,s._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"nullable",void 0),(0,s._)([(0,u.e)(f.m)],g.prototype,"type",void 0),(0,s._)([(0,a.MZ)()],g.prototype,"valueType",void 0),(0,s._)([(0,c.w)("valueType",["description"])],g.prototype,"readValueType",null),(0,s._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],g.prototype,"visible",void 0),g=n=(0,s._)([(0,h.$)("esri.layers.support.Field")],g);const y=g},72088:(e,t,r)=>{r.d(t,{rS:()=>x,gK:()=>k}),r(44208);var n,s=r(90237),o=r(4718),i=r(10107),a=(r(53966),r(93223)),l=r(40608),u=r(25482);r(87811);let c=n=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,s._)([(0,i.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,i.MZ)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=n=(0,s._)([(0,l.$)("esri.layers.support.CodedValue")],c);const h=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,i.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,a.e)(h)],d.prototype,"type",void 0),d=(0,s._)([(0,l.$)("esri.layers.support.Domain")],d);const f=d;var p;let g=p=class extends f{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new p({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,s._)([(0,i.MZ)({type:[c],json:{write:!0}})],g.prototype,"codedValues",void 0),(0,s._)([(0,a.e)({codedValue:"coded-value"})],g.prototype,"type",void 0),g=p=(0,s._)([(0,l.$)("esri.layers.support.CodedValueDomain")],g);const y=g;var m;r(49186);let _=m=class extends f{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,s._)([(0,a.e)({inherited:"inherited"})],_.prototype,"type",void 0),_=m=(0,s._)([(0,l.$)("esri.layers.support.InheritedDomain")],_);const b=_;var w;let T=w=class extends f{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,i.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],T.prototype,"maxValue",void 0),(0,s._)([(0,i.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],T.prototype,"minValue",void 0),(0,s._)([(0,a.e)({range:"range"})],T.prototype,"type",void 0),T=w=(0,s._)([(0,l.$)("esri.layers.support.RangeDomain")],T);const I=T,k={key:"type",base:f,typeMap:{range:T,"coded-value":y,inherited:b}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return I.fromJSON(e);case"codedValue":return y.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>n});const n=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},53655:(e,t,r)=>{r.d(t,{SH:()=>G,ae:()=>k,cn:()=>_});var n=r(49186),s=r(51624),o=r(92722),i=r(69418);const a=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],l=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],u=["upperLeft","lowerLeft"];function c(e){return e>=a.length?null:a[e]}function h(e){return e>=l.length?null:l[e]}function d(e){return e>=u.length?null:u[e]}function f(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function p(e,t,r){const n=e.asUnsafe(),s=t.createPointGeometry(r);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),r=n.pos()+e;let o=0;for(;n.pos()<r;)t.addCoordinatePoint(s,n.getSInt64(),o++);break}default:n.skip()}return s}function g(e,t,r){const n=e.asUnsafe(),s=t.createGeometry(r),o=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),r=n.pos()+e;let o=0;for(;n.pos()<r;)t.addLength(s,n.getUInt32(),o++);break}case 3:{const e=n.getUInt32(),r=n.pos()+e;let i=0;for(t.allocateCoordinates(s);n.pos()<r;)t.addCoordinate(s,n.getSInt64(),i),i++,i===o&&(i=0);break}default:n.skip()}return s}function y(e){const t=e.asUnsafe(),r=new o.A;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.coords.push(t.getSInt64());break}case 1:n=i.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:n}}function m(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),r={type:c(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=c(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=h(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function b(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}function w(e,t,r,n){const s=t.createFeature(r);let o=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[o++].name;s.attributes[t]=e.processMessage(m);break}case 2:s.geometry=e.processMessageWithArgs(g,t,r);break;case 4:s.centroid=e.processMessageWithArgs(p,t,r);break;default:e.skip()}return s}function T(e){const t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function I(e){const t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function k(e){const t={originPosition:d(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=d(r.getEnum());break;case 2:t.scale=r.processMessage(T);break;case 3:t.translate=r.processMessage(I);break;default:r.skip()}return t}function x(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function M(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function v(e,t){const r=t.createFeatureResult(),n=e.asUnsafe();r.geometryType=f(t,0);let s=!1;for(;n.next();)switch(n.tag()){case 1:r.objectIdFieldName=n.getString();break;case 3:r.globalIdFieldName=n.getString();break;case 4:r.geohashFieldName=n.getString();break;case 5:r.geometryProperties=n.processMessage(x);break;case 7:r.geometryType=f(t,n.getEnum());break;case 8:r.spatialReference=n.processMessageWithArgs(M,t);break;case 10:r.hasZ=n.getBool();break;case 11:r.hasM=n.getBool();break;case 12:r.transform=n.processMessage(k);break;case 9:r.exceededTransferLimit=n.getBool();break;case 13:t.addField(r,n.processMessage(_));break;case 15:s||(t.prepareFeatures(r),s=!0),t.addFeature(r,n.processMessageWithArgs(w,t,r,r.fields));break;case 2:r.uniqueIdField=n.processMessage(b);break;default:n.skip()}return t.finishFeatureResult(r),r}function F(e,t){const r={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(y);break;case 1:r.featureResult=e.processMessageWithArgs(v,t);break;default:e.skip()}return null!=n&&r.featureResult&&t.addQueryGeometry(r,n),r}function G(e,t){try{const r=2,n=new s.A(new Uint8Array(e),new DataView(e)),o={};for(;n.next();)n.tag()===r?o.queryResult=n.processMessageWithArgs(F,t):n.skip();return o}catch(e){throw new n.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},69418:(e,t,r)=>{r.d(t,{S:()=>u,z:()=>l});var n=r(83047),s=r(21325),o=r(43334),i=r(58512),a=r(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new i.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,s.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n.G9)(this._options.sourceSpatialReference)/(0,n.G9)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,o.N3)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new o.Om}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.A}}},66208:(e,t,r)=>{r.d(t,{m:()=>s});var n=r(53655);function s(e,t){const r=(0,n.SH)(e,t),s=r.queryResult.featureResult,o=r.queryResult.queryGeometry,i=r.queryResult.queryGeometryType;if(s&&s.features&&s.features.length&&s.objectIdFieldName){const e=s.objectIdFieldName;for(const t of s.features)t.attributes&&(t.objectId=t.attributes[e])}return s&&(s.queryGeometry=o,s.queryGeometryType=i),s}},97367:(e,t,r)=>{r.r(t),r.d(t,{default:()=>w});var n=r(21818),s=r(24326),o=r(16930),i=r(62815),a=(r(44208),r(34275),r(70328),r(19419),r(62577),r(50498),r(20437));r(34727),r(21325);class l{constructor(e,t,r){this.uid=e,this.geometry=t,this.attributes=r,this.visible=!0,this.objectId=null,this.centroid=null}}class u{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}var c=r(90708);function h(e,t){return t}function d(e,t,r,n){switch(r){case 0:return y(e,t+n,0);case 1:return"lowerLeft"===e.originPosition?y(e,t+n,1):function({translate:e,scale:t},r,n){return e[n]-r*t[n]}(e,t+n,1)}}function f(e,t,r,n){return 2===r?y(e,t,2):d(e,t,r,n)}function p(e,t,r,n){return 2===r?y(e,t,3):d(e,t,r,n)}function g(e,t,r,n){return 3===r?y(e,t,3):f(e,t,r,n)}function y({translate:e,scale:t},r,n){return e[n]+r*t[n]}class m{constructor(e){this._options=e,this.geometryTypes=["point","multipoint","polyline","polygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=h,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{},this._missingAttributes=[]}get missingAttributes(){return this._missingAttributes}createFeatureResult(){return new u}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,i.N)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return new o.A}addField(e,t){e.fields.push(a.A.fromJSON(t));const r=e.fields.map((e=>e.name));this._attributesConstructor=function(){for(const e of r)this[e]=null}}addFeature(e,t){const r=this._options.maxStringAttributeLength,n=this._options.maxStringAttributeFields;(function(e,t,r,n){if(t?.size&&null!=r&&e)for(const s in e){if(!t.has(s))continue;const o=e[s];"string"==typeof o&&o.length>r&&(n(s),e[s]="")}})(t.attributes,n,r,(r=>{const n=t.attributes[e.objectIdFieldName];null!=n&&this._missingAttributes.push({objectId:n,attribute:r})})),e.features.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:n}=t,s=(0,c.Ch)(r.clone(),r,!1,!1,this._transform),o=(0,c.zv)(s,n,!1,!1);let i=null;switch(n){case"esriGeometryPoint":i="point";break;case"esriGeometryPolygon":i="polygon";break;case"esriGeometryPolyline":i="polyline";break;case"esriGeometryMultipoint":i="multipoint"}o.type=i,e.queryGeometryType=n,e.queryGeometry=o}prepareFeatures(e){switch(this._transform=e.transform??null,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"point":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"polygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"polyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"multipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e);break;case"mesh":case"extent":break;default:(0,n.Xb)(e.geometryType)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,new l((0,s.c)(),null,new this._attributesConstructor)}allocateCoordinates(){const e=this._lengths.reduce(((e,t)=>e+t),0);this._coordinateBuffer=new Float64Array(e*this._vertexDimension),this._coordinateBufferPtr=0}addLength(e,t){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}createPointGeometry(e){const t={type:"point",x:0,y:0,spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM};return t.hasZ&&(t.z=0),t.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const n=this._transform?this._applyTransform(this._transform,t,r,0):t;if(null!=n)switch(r){case 0:e.x=n;break;case 1:e.y=n;break;case 2:e.hasZ?e.z=n:e.m=n;break;case 3:e.m=n}}_transformPathLikeValue(e,t){let r=0;return t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e),this._transform?this._applyTransform(this._transform,e,t,r):e}_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 n=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(n)}_createPolygonGeometry(e){return{type:"polygon",rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{type:"polyline",paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{type:"multipoint",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 n=this._transformPathLikeValue(t,r),s=e[e.length-1],o=this._coordinateBuffer;if(o){if(0===r){const e=this._coordinateBufferPtr*Float64Array.BYTES_PER_ELEMENT;s.push(new Float64Array(o.buffer,e,this._vertexDimension))}o[this._coordinateBufferPtr++]=n}}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?g:t?f:r?p:d}}var _=r(66208);class b{_parseFeatureQuery(e){const t=new m(e.options),r=(0,_.m)(e.buffer,t),n={...r,spatialReference:r.spatialReference?.toJSON(),fields:r.fields?r.fields.map((e=>e.toJSON())):void 0,missingAttributes:t.missingAttributes};return Promise.resolve(n)}}function w(){return new b}}}]);