@arcgis/core 4.28.0-rc.2 → 4.28.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/arcade/ArcadeDate.js +1 -1
  2. package/arcade/functions/featuresetbase.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{0e354096ad8817971eed.js → 02d235849ba93541d7ad.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0422c5160491fbcf01dc.js +1 -0
  6. package/assets/esri/core/workers/chunks/1da721608993783dc9cf.js +1 -0
  7. package/assets/esri/core/workers/chunks/224e79f6c172da444e0a.js +1 -0
  8. package/assets/esri/core/workers/chunks/{ca3d5803cdf035d7389d.js → 30776102fbab294bfe7b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{61dec8399919b278b636.js → 3ac9001b19a90faf5573.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{fa6103e3d4e857b0035b.js → 3dcb2a82e1e4b520c9c9.js} +11 -8
  11. package/assets/esri/core/workers/chunks/41081c921037e543a22f.js +1 -0
  12. package/assets/esri/core/workers/chunks/4564a7885d045a850887.js +1 -0
  13. package/assets/esri/core/workers/chunks/4adf3a8c6b49c381a633.js +1 -0
  14. package/assets/esri/core/workers/chunks/{2721aa6b6941b28b9758.js → 63c8bf00120a4e67f5b0.js} +1 -1
  15. package/assets/esri/core/workers/chunks/6bc1f6f8a2408fa4bb6a.js +1 -0
  16. package/assets/esri/core/workers/chunks/74951370a341f02d3714.js +1 -0
  17. package/assets/esri/core/workers/chunks/78e49a70193e5adea17c.js +1 -0
  18. package/assets/esri/core/workers/chunks/7b8377b3a9f78f9d3613.js +1 -0
  19. package/assets/esri/core/workers/chunks/{fd28400141a6751327ae.js → 7cf7f2b991a7cbdad2ce.js} +1 -1
  20. package/assets/esri/core/workers/chunks/830d99e6c58a52a58973.js +1 -0
  21. package/assets/esri/core/workers/chunks/{1a723bb4a341f645e5fe.js → 83b8141f0c80e3448012.js} +1 -1
  22. package/assets/esri/core/workers/chunks/8f7997e8e6ee9e56239f.js +1 -0
  23. package/assets/esri/core/workers/chunks/934c32c49bb9e21482fd.js +1 -0
  24. package/assets/esri/core/workers/chunks/{a4341ec0fe89b865d849.js → a160576f21ada91995ac.js} +1 -1
  25. package/assets/esri/core/workers/chunks/a1e16c33f1843dbdce26.js +1 -0
  26. package/assets/esri/core/workers/chunks/{d07235ce2765a25b9be4.js → a50ec5b647a160199cb2.js} +1 -1
  27. package/assets/esri/core/workers/chunks/b6bd31674076e543d8b2.js +1 -0
  28. package/assets/esri/core/workers/chunks/{77923afde29ae1ff10ca.js → b6e86e179f99b5cf8dff.js} +1 -1
  29. package/assets/esri/core/workers/chunks/c3ddf5dbc34f118002df.js +1 -0
  30. package/assets/esri/core/workers/chunks/{562eafa5090827ebb7ec.js → c87e9280681c20d042b5.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{7b3d5f044c96e2c2af11.js → d191267d91a53db42956.js} +1 -1
  32. package/assets/esri/core/workers/chunks/ffa330a19a09679212fb.js +1 -0
  33. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +9 -13
  34. package/assets/esri/themes/base/widgets/_Features.scss +5 -0
  35. package/assets/esri/themes/base/widgets/_Legend.scss +1 -1
  36. package/assets/esri/themes/base/widgets/_Popup.scss +0 -1
  37. package/assets/esri/themes/base/widgets/_TimeZoneLabel.scss +3 -3
  38. package/assets/esri/themes/dark/main.css +1 -1
  39. package/assets/esri/themes/light/main.css +1 -1
  40. package/assets/esri/themes/light/view.css +1 -1
  41. package/geometry/support/meshUtils/georeference.js +1 -1
  42. package/interfaces.d.ts +1506 -314
  43. package/intl/date.js +1 -1
  44. package/kernel.js +1 -1
  45. package/layers/FeatureLayer.js +1 -1
  46. package/layers/GroupLayer.js +1 -1
  47. package/layers/OrientedImageryLayer.js +1 -1
  48. package/layers/SceneLayer.js +1 -1
  49. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  50. package/layers/graphics/data/QueryEngineResult.js +1 -1
  51. package/layers/graphics/data/queryValidationUtils.js +1 -1
  52. package/layers/mixins/ArcGISMapService.js +1 -1
  53. package/layers/save/groupLayerUtils.js +1 -1
  54. package/layers/save/utils.js +1 -1
  55. package/layers/support/ImageElement.js +1 -1
  56. package/layers/support/LayerContingentValuesCache.js +1 -1
  57. package/layers/support/Sublayer.js +1 -1
  58. package/layers/support/Subtype.d.ts +4 -0
  59. package/layers/support/Subtype.js +1 -1
  60. package/layers/support/imageryRendererUtils.js +1 -1
  61. package/networks/Network.js +1 -1
  62. package/package.json +1 -1
  63. package/portal/support/jsonContext.js +1 -1
  64. package/portal/support/layersLoader.js +1 -1
  65. package/rest/featureService/FeatureService.d.ts +4 -0
  66. package/rest/featureService/FeatureService.js +1 -1
  67. package/rest/featureService/utils.d.ts +4 -0
  68. package/rest/query/operations/query.js +1 -1
  69. package/smartMapping/support/utils.js +1 -1
  70. package/statistics/utils.js +1 -1
  71. package/support/basemapUtils.js +1 -1
  72. package/support/revision.js +1 -1
  73. package/versionManagement/VersionManagementService.d.ts +4 -0
  74. package/versionManagement/VersionManagementService.js +1 -1
  75. package/views/2d/engine/Container.js +1 -1
  76. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  77. package/views/2d/engine/webgl/Overlay.js +1 -1
  78. package/views/2d/input/handlers/KeyPan.js +1 -1
  79. package/views/2d/interactive/editingTools/manipulations/DragManipulation.js +1 -1
  80. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  81. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  82. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  83. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  84. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  85. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  86. package/views/3d/layers/I3SMeshView3D.js +1 -1
  87. package/views/3d/layers/MediaLayerView3D.js +1 -1
  88. package/views/3d/layers/SceneLayerWorker.js +1 -1
  89. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  90. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  91. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  92. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  93. package/views/3d/support/MemoryController.js +1 -1
  94. package/views/3d/support/PBFDecoder.js +1 -1
  95. package/views/3d/support/ResourceController.js +1 -1
  96. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  97. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  98. package/views/3d/webgl-engine/core/FBOPool.js +5 -0
  99. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -6
  100. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -2
  101. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  102. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  103. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  104. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  105. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  106. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  107. package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
  108. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  109. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  110. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  111. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +1 -1
  112. package/views/draw/DrawOperation.js +1 -1
  113. package/views/draw/support/Reshape.js +1 -1
  114. package/views/interactive/sketch/constraints.js +1 -1
  115. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  116. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  117. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  118. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  119. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  120. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  121. package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
  122. package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
  123. package/webdoc/support/writeUtils.js +1 -1
  124. package/widgets/BasemapGallery.js +1 -1
  125. package/widgets/DirectionalPad.js +1 -1
  126. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  127. package/widgets/Editor/EditorViewModel.js +1 -1
  128. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  129. package/widgets/Editor/UpdateWorkflow.js +1 -1
  130. package/widgets/Editor/VisibleElements.js +1 -1
  131. package/widgets/Editor/workflowUtils.js +1 -1
  132. package/widgets/Editor.js +1 -1
  133. package/widgets/FeatureForm/FieldInput.js +1 -1
  134. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  135. package/widgets/FeatureForm.js +1 -1
  136. package/widgets/Features.js +1 -1
  137. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +4 -0
  138. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  139. package/widgets/OrientedImageryViewer.js +1 -1
  140. package/widgets/TimeSlider.js +1 -1
  141. package/widgets/TimeZoneLabel.js +1 -1
  142. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  143. package/widgets/UtilityNetworkTrace.js +1 -1
  144. package/widgets/support/dateUtils.js +1 -1
  145. package/assets/esri/core/workers/chunks/00da3c16741a9bc47f3a.js +0 -1
  146. package/assets/esri/core/workers/chunks/0e4646d14fa0775bf463.js +0 -1
  147. package/assets/esri/core/workers/chunks/4e0bf30da4281070e453.js +0 -1
  148. package/assets/esri/core/workers/chunks/51b8913dff24e693bd25.js +0 -1
  149. package/assets/esri/core/workers/chunks/5e907ec0ee1565b5fbbc.js +0 -1
  150. package/assets/esri/core/workers/chunks/7388fd97e7b1a2142744.js +0 -1
  151. package/assets/esri/core/workers/chunks/7648f3341b7dff2825c3.js +0 -1
  152. package/assets/esri/core/workers/chunks/92d8f75e616afa5c761e.js +0 -1
  153. package/assets/esri/core/workers/chunks/9c77d69a13ec22cdd760.js +0 -1
  154. package/assets/esri/core/workers/chunks/a821fa1870b83fed5d31.js +0 -1
  155. package/assets/esri/core/workers/chunks/a877a4826cd6a46ec99b.js +0 -1
  156. package/assets/esri/core/workers/chunks/b251d8a856dc8b9406e0.js +0 -1
  157. package/assets/esri/core/workers/chunks/c416df0668f6c596095f.js +0 -1
  158. package/assets/esri/core/workers/chunks/d8c696da42f8f8919b83.js +0 -1
  159. package/assets/esri/core/workers/chunks/f0d342303fc20e266d27.js +0 -1
  160. package/assets/esri/core/workers/chunks/fac3e57784d7f37053af.js +0 -1
  161. package/assets/esri/core/workers/chunks/fc95b1a36ed68b851400.js +0 -1
  162. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +0 -4
  163. package/widgets/DirectionalPad.d.ts +0 -4
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[299,5935],{44543:(e,t,r)=>{r.d(t,{F:()=>f,M:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function d(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function u(e,t,r,i,s,n,o){return d(t&r|~t&i,e,t,s,n,o)}function c(e,t,r,i,s,n,o){return d(t&i|r&~i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return d(t^r^i,e,t,s,n,o)}function y(e,t,r,i,s,n,o){return d(r^(t|~i),e,t,s,n,o)}function h(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,d=s,h=n;r=u(r,i,s,n,e[t],7,-680876936),n=u(n,r,i,s,e[t+1],12,-389564586),s=u(s,n,r,i,e[t+2],17,606105819),i=u(i,s,n,r,e[t+3],22,-1044525330),r=u(r,i,s,n,e[t+4],7,-176418897),n=u(n,r,i,s,e[t+5],12,1200080426),s=u(s,n,r,i,e[t+6],17,-1473231341),i=u(i,s,n,r,e[t+7],22,-45705983),r=u(r,i,s,n,e[t+8],7,1770035416),n=u(n,r,i,s,e[t+9],12,-1958414417),s=u(s,n,r,i,e[t+10],17,-42063),i=u(i,s,n,r,e[t+11],22,-1990404162),r=u(r,i,s,n,e[t+12],7,1804603682),n=u(n,r,i,s,e[t+13],12,-40341101),s=u(s,n,r,i,e[t+14],17,-1502002290),i=u(i,s,n,r,e[t+15],22,1236535329),r=c(r,i,s,n,e[t+1],5,-165796510),n=c(n,r,i,s,e[t+6],9,-1069501632),s=c(s,n,r,i,e[t+11],14,643717713),i=c(i,s,n,r,e[t],20,-373897302),r=c(r,i,s,n,e[t+5],5,-701558691),n=c(n,r,i,s,e[t+10],9,38016083),s=c(s,n,r,i,e[t+15],14,-660478335),i=c(i,s,n,r,e[t+4],20,-405537848),r=c(r,i,s,n,e[t+9],5,568446438),n=c(n,r,i,s,e[t+14],9,-1019803690),s=c(s,n,r,i,e[t+3],14,-187363961),i=c(i,s,n,r,e[t+8],20,1163531501),r=c(r,i,s,n,e[t+13],5,-1444681467),n=c(n,r,i,s,e[t+2],9,-51403784),s=c(s,n,r,i,e[t+7],14,1735328473),i=c(i,s,n,r,e[t+12],20,-1926607734),r=p(r,i,s,n,e[t+5],4,-378558),n=p(n,r,i,s,e[t+8],11,-2022574463),s=p(s,n,r,i,e[t+11],16,1839030562),i=p(i,s,n,r,e[t+14],23,-35309556),r=p(r,i,s,n,e[t+1],4,-1530992060),n=p(n,r,i,s,e[t+4],11,1272893353),s=p(s,n,r,i,e[t+7],16,-155497632),i=p(i,s,n,r,e[t+10],23,-1094730640),r=p(r,i,s,n,e[t+13],4,681279174),n=p(n,r,i,s,e[t],11,-358537222),s=p(s,n,r,i,e[t+3],16,-722521979),i=p(i,s,n,r,e[t+6],23,76029189),r=p(r,i,s,n,e[t+9],4,-640364487),n=p(n,r,i,s,e[t+12],11,-421815835),s=p(s,n,r,i,e[t+15],16,530742520),i=p(i,s,n,r,e[t+2],23,-995338651),r=y(r,i,s,n,e[t],6,-198630844),n=y(n,r,i,s,e[t+7],10,1126891415),s=y(s,n,r,i,e[t+14],15,-1416354905),i=y(i,s,n,r,e[t+5],21,-57434055),r=y(r,i,s,n,e[t+12],6,1700485571),n=y(n,r,i,s,e[t+3],10,-1894986606),s=y(s,n,r,i,e[t+10],15,-1051523),i=y(i,s,n,r,e[t+1],21,-2054922799),r=y(r,i,s,n,e[t+8],6,1873313359),n=y(n,r,i,s,e[t+15],10,-30611744),s=y(s,n,r,i,e[t+6],15,-1560198380),i=y(i,s,n,r,e[t+13],21,1309151649),r=y(r,i,s,n,e[t+4],6,-145523070),n=y(n,r,i,s,e[t+11],10,-1120210379),s=y(s,n,r,i,e[t+2],15,718787259),i=y(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,d),n=o(n,h)}return[r,i,s,n]}function f(e,t=i.Hex){const r=t||i.Base64,n=h(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},28576:(e,t,r)=>{r.d(t,{B:()=>y});var i=r(20102),s=r(44543),n=r(81153),o=r(17452),a=r(41123),l=r(7628),d=r(31263),u=r(5600),c=r(66094),p=r(25929);function y(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.Oe)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,p.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,p.t)(t,l)):void(s[a]=t.write({},l));const u=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),y=(0,p.t)(u,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},p.M.NO),g=i.type!==String&&(!(0,n.l)(this)||l?.origin&&this.originIdOf(r)>(0,d.M9)(l.origin)),b={object:this,propertyName:r,value:t,targetUrl:y,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&y&&!(0,o.YP)(y)?g&&e?.contentAddressed?h(b):g?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),d=m(s,r,t),u=(0,c.B)(d),p=(0,o.Ml)(l.path),y=i?.compress??!1;u===p?(t.resources&&f({...e,resource:l,content:d,compress:y,updates:t.resources.toUpdate}),n[a]=r):h(e)}(b):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(b):l?.portalItem&&(null==y||null!=(0,p.i)(y)||(0,o.jc)(y)||g)?h(b):s[a]=y}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=p.a;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,u.CJ)(r,e,i);for(const e in s)t[e]=s[e]}}}function h(e){const{targetUrl:t,params:r,value:n,context:l,dest:d,targetPropertyName:u}=e;if(!l.portalItem)return;const y=(0,p.p)(t),h=m(n,t,l);if(r?.contentAddressed&&"json"!==h.type)return void l.messages?.push(new i.Z("persistable:contentAddressingUnsupported",`Property "${u}" is trying to serializing a resource with content of type ${h.type} with content addressing. Content addressing is only supported for json resources.`,{content:h}));const g=r?.contentAddressed&&"json"===h.type?(0,s.F)(h.jsonString):y?.filename??(0,a.D)(),b=(0,o.v_)(r?.prefix??y?.prefix,g),w=`${b}.${(0,c.B)(h)}`;if(r?.contentAddressed&&l.resources&&"json"===h.type){const e=l.resources.toKeep.find((e=>e.resource.path===w))??l.resources.toAdd.find((e=>e.resource.path===w));if(e)return void(d[u]=e.resource.itemRelativeUrl)}const v=l.portalItem.resourceFromPath(w);(0,o.jc)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.gi)(t).then((e=>{v.path=`${b}.${(0,c.B)({type:"blob",blob:e})}`,d[u]=v.itemRelativeUrl})).catch((()=>{})));const I=r?.compress??!1;l.resources&&f({...e,resource:v,content:h,compress:I,updates:l.resources.toAdd}),d[u]=v.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function m(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},41123:(e,t,r)=>{r.d(t,{D:()=>s,z:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s()}}`}},79235:(e,t,r)=>{r.d(t,{Z:()=>w});var i,s=r(43697),n=r(67676),o=r(35454),a=r(96674),l=r(67900),d=r(20941),u=r(5600),c=(r(75215),r(80442),r(71715)),p=r(52011),y=r(30556);const h=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=h.jsonValues.slice();(0,n.e$)(f,"orthometric");const m=(0,o.w)()({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=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return h.write(e,t,r)}readHeightModel(e,t,r){return h.read(e)||(r?.messages&&r.messages.push(function(e,t){return new d.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(b(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||m.read(e)||(r?.messages&&r.messages.push(b(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({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 r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,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 i;return t.read(e,{origin:"web-scene"}),t}};function b(e,t){return new d.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.Cb)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,y.c)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,c.r)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,u.Cb)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,c.r)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,c.r)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,c.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,s._)([(0,p.j)("esri.geometry.HeightModelInfo")],g);const w=g},57476:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ge});var i=r(43697),s=r(38171),n=r(51773),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),a=r(3172),l=r(2368),d=r(46791),u=r(20102),c=r(92604),p=r(16453),y=r(95330),h=r(17445),f=r(17452),m=r(5600),g=(r(75215),r(67676),r(80442),r(1153)),b=r(71715),w=r(52011),v=r(31263),I=r(87085),_=r(54295),S=r(17287),F=r(66361),j=r(38009),C=r(16859),L=r(72965),x=r(37253),R=r(66677),O=r(71592),A=r(15506),E=r(21506),Z=r(45574),P=r(61960),M=r(85857),U=r(53518),q=r(99514),T=r(35671),N=r(51161),D=r(54306),V=r(30707),k=r(56765),G=r(87344),H=r(96674);let $=class extends H.wq{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i._)([(0,m.Cb)({type:String,json:{read:!0,write:!0}})],$.prototype,"name",void 0),(0,i._)([(0,m.Cb)({type:String,json:{read:!0,write:!0}})],$.prototype,"field",void 0),(0,i._)([(0,m.Cb)({type:[Number],json:{read:!0,write:!0}})],$.prototype,"currentRangeExtent",void 0),(0,i._)([(0,m.Cb)({type:[Number],json:{read:!0,write:!0}})],$.prototype,"fullRangeExtent",void 0),(0,i._)([(0,m.Cb)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],$.prototype,"type",void 0),$=(0,i._)([(0,w.j)("esri.layers.support.RangeInfo")],$);var Q,J=r(22974),B=r(28576),z=r(20941),K=r(38913),W=r(73615);let Y=Q=class extends((0,H.eC)(d.Z.ofType(K.Z))){constructor(e){super(e)}clone(){return new Q(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((r=>{if(!t.equals(r.spatialReference)){if(!(0,W.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages&&e.messages.push(new z.Z("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new K.Z;(0,W.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new z.Z("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 r=new Q;return e.forEach((e=>r.add(K.Z.fromJSON(e,t)))),r}};Y=Q=(0,i._)([(0,w.j)("esri.layers.support.PolygonCollection")],Y);const X=Y;var ee,te=r(25929);let re=ee=class extends H.wq{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new X,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.Z_))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=X.fromJSON(e,r):this._geometriesSource={url:(0,te.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,a.Z)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map((e=>({...e,spatialReference:n})));this.geometries=X.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new ee({geometries:(0,J.d9)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i._)([(0,m.Cb)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],re.prototype,"spatialRelationship",void 0),(0,i._)([(0,m.Cb)({type:X,nonNullable:!0,json:{write:!0}}),(0,B.B)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],re.prototype,"geometries",void 0),(0,i._)([(0,b.r)(["web-scene","portal-item"],"geometries")],re.prototype,"readGeometries",null),re=ee=(0,i._)([(0,w.j)("esri.layers.support.SceneFilter")],re);const ie=re;var se=r(40555),ne=r(14165),oe=r(36405),ae=r(72245),le=r(32163),de=r(2358),ue=r(19833),ce=r(65242);const pe=new Set(["3DObject","Point"]),ye=(0,U.v)();let he=class extends((0,F.o1)((0,x.Vt)((0,S.Y)((0,j.q)((0,C.I)((0,L.M)((0,p.R)((0,_.V)((0,l.J)(I.Z)))))))))){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 d.Z,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 r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r: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 q.Z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:N.U4.fromJSON(e,r)}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,Z.sX)(this.associatedLayer)}get geometryType(){return me[this.profile]||"mesh"}set renderer(e){(0,T.YN)(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:A.C;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:c},operations:{supportsEditing:p,supportsAdd:y,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:b}}=e,w=e.operations.supportsChangeTracking,v=!!this.associatedLayer?.infoFor3D&&(0,ae.Rx)();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:v&&o,supportsUploadWithItemId:n},data:{supportsAttachment:c,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:p&&w,supportsAdd:v&&y&&w,supportsDelete:v&&f&&w,supportsUpdate:h&&w,supportsAsyncConvert3D:b}}}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 r=t.store.profile;return null!=r&&fe[r]?fe[r]:(c.Z.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}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(y.r9),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await(0,se.y)(this,{origin:"service"},t),(0,T.YN)(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){c.Z.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 ne.Z;return"mesh"!==this.geometryType&&(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((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,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new u.Z("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 u.Z("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 r=(0,T.Lk)(this.fieldsIndex,await(0,ue.e7)(this,(0,ue.V5)(this)));return(0,de.xe)(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new u.Z("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.Z;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(c.Z.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,le.eZ)(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 u.Z("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 u.Z("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){if(await this.load(t),!this.statisticsInfo)throw new u.Z("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new u.Z("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.statisticsInfo)if(e.name===r.name){const r=(0,f.v_)(this.parsedUrl.path,e.href);return(0,a.Z)(r,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new u.Z("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(x.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(x.xp.SAVE,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(1444).then(r.bind(r,14720));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new u.Z(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n;return(0,R.M8)(n.url)&&n.infoFor3D&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,Z.HW)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new u.Z(`${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)}validateLayer(e){if(e.layerType&&!pe.has(e.layerType))throw new u.Z("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 u.Z("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 u.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new u.Z("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new u.Z("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 u.Z("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||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_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 r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.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,g.vw)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(n===v.s3.SERVICE||n===v.s3.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.editingInfo?.lastEditDate,t=this.associatedLayer?.serverGens,r=this.associatedLayer?.getAtOrigin("fullExtent","service");(0,ae.Rx)()&&null!=this.associatedLayer?.infoFor3D&&r&&(0,R.M8)(this.associatedLayer?.url)&&e&&this.serviceUpdateTimeStamp?.lastUpdate!==e.getTime()&&(this.serviceUpdateTimeStamp||t?.minServerGen!==t?.serverGen)&&(0,g.vw)(this).setAtOrigin("fullExtent",r.clone(),v.s3.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:r,portalItem:i}=await(0,O.w)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,apiKey:this.apiKey,signal:e}),s=await G.T.FeatureLayer();this.associatedLayer=new s({url:t,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,y.D_)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.N1)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?c.Z.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):c.Z.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,oe.LR)(c.Z.getLogger(this),(0,oe.Wb)("Mesh scene layers","relative-to-scene",e)),(0,oe.LR)(c.Z.getLogger(this),(0,oe.kf)("Scene layers",e))}};(0,i._)([(0,m.Cb)({types:{key:"type",base:P.B,typeMap:{selection:M.Z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],he.prototype,"featureReduction",void 0),(0,i._)([(0,m.Cb)({type:[$],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],he.prototype,"rangeInfos",void 0),(0,i._)([(0,m.Cb)({json:{read:!1}})],he.prototype,"associatedLayer",void 0),(0,i._)([(0,m.Cb)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,i._)([(0,m.Cb)({type:["ArcGISSceneServiceLayer"]})],he.prototype,"operationalLayerType",void 0),(0,i._)([(0,m.Cb)({json:{read:!1},readOnly:!0})],he.prototype,"type",void 0),(0,i._)([(0,m.Cb)({...ye.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],he.prototype,"fields",void 0),(0,i._)([(0,m.Cb)()],he.prototype,"types",null),(0,i._)([(0,m.Cb)()],he.prototype,"typeIdField",null),(0,i._)([(0,m.Cb)()],he.prototype,"templates",null),(0,i._)([(0,m.Cb)()],he.prototype,"formTemplate",null),(0,i._)([(0,m.Cb)({readOnly:!0,clonable:!1})],he.prototype,"fieldsIndex",null),(0,i._)([(0,m.Cb)({type:k.Z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],he.prototype,"floorInfo",void 0),(0,i._)([(0,m.Cb)(ye.outFields)],he.prototype,"outFields",void 0),(0,i._)([(0,m.Cb)({type:N.U4,readOnly:!0,json:{read:!1}})],he.prototype,"nodePages",void 0),(0,i._)([(0,b.r)("service","nodePages",["nodePages","pointNodePages"])],he.prototype,"readNodePages",null),(0,i._)([(0,m.Cb)({type:[N.QI],readOnly:!0})],he.prototype,"materialDefinitions",void 0),(0,i._)([(0,m.Cb)({type:[N.Yh],readOnly:!0})],he.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,m.Cb)({type:[N.H3],readOnly:!0})],he.prototype,"geometryDefinitions",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"statisticsInfo",void 0),(0,i._)([(0,m.Cb)({type:d.Z.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],he.prototype,"excludeObjectIds",void 0),(0,i._)([(0,m.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],he.prototype,"definitionExpression",void 0),(0,i._)([(0,m.Cb)({type:ie,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],he.prototype,"filter",void 0),(0,i._)([(0,m.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),(0,i._)([(0,m.Cb)(E.PV)],he.prototype,"elevationInfo",null),(0,i._)([(0,m.Cb)({readOnly:!0,json:{read:!1}})],he.prototype,"effectiveCapabilities",null),(0,i._)([(0,m.Cb)({readOnly:!0})],he.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,m.Cb)({type:String})],he.prototype,"geometryType",null),(0,i._)([(0,m.Cb)(E.iR)],he.prototype,"labelsVisible",void 0),(0,i._)([(0,m.Cb)({type:[D.Z],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:V.r},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:V.r},write:!0}})],he.prototype,"labelingInfo",void 0),(0,i._)([(0,m.Cb)(E.rn)],he.prototype,"legendEnabled",void 0),(0,i._)([(0,m.Cb)({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 r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,ce.b)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],he.prototype,"opacity",void 0),(0,i._)([(0,m.Cb)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],he.prototype,"priority",void 0),(0,i._)([(0,m.Cb)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],he.prototype,"semantic",void 0),(0,i._)([(0,m.Cb)({types:o.o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],he.prototype,"renderer",null),(0,i._)([(0,m.Cb)({json:{read:!1}})],he.prototype,"cachedDrawingInfo",void 0),(0,i._)([(0,b.r)("service","cachedDrawingInfo")],he.prototype,"readCachedDrawingInfo",null),(0,i._)([(0,m.Cb)({readOnly:!0,json:{read:!1}})],he.prototype,"capabilities",null),(0,i._)([(0,m.Cb)({type:Boolean,json:{read:!1}})],he.prototype,"editingEnabled",null),(0,i._)([(0,m.Cb)({readOnly:!0,json:{write:!1,read:!1}})],he.prototype,"infoFor3D",null),(0,i._)([(0,m.Cb)({readOnly:!0,json:{write:!1,read:!1}})],he.prototype,"relationships",null),(0,i._)([(0,m.Cb)(E.C_)],he.prototype,"popupEnabled",void 0),(0,i._)([(0,m.Cb)({type:n.Z,json:{name:"popupInfo",write:!0}})],he.prototype,"popupTemplate",void 0),(0,i._)([(0,m.Cb)({readOnly:!0,json:{read:!1}})],he.prototype,"defaultPopupTemplate",null),(0,i._)([(0,m.Cb)({type:String,json:{read:!1}})],he.prototype,"objectIdField",void 0),(0,i._)([(0,b.r)("service","objectIdField",["objectIdField","fields"])],he.prototype,"readObjectIdField",null),(0,i._)([(0,m.Cb)({type:String,json:{read:!1}})],he.prototype,"globalIdField",void 0),(0,i._)([(0,b.r)("service","globalIdField",["globalIdField","fields"])],he.prototype,"readGlobalIdField",null),(0,i._)([(0,m.Cb)({readOnly:!0,type:String,json:{read:!1}})],he.prototype,"displayField",null),(0,i._)([(0,m.Cb)({type:String,json:{read:!1}})],he.prototype,"profile",void 0),(0,i._)([(0,b.r)("service","profile",["store.profile"])],he.prototype,"readProfile",null),(0,i._)([(0,m.Cb)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],he.prototype,"normalReferenceFrame",void 0),(0,i._)([(0,m.Cb)(E.YI)],he.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,m.Cb)({json:{read:!1,origins:{service:{read:!0}}}})],he.prototype,"serviceItemId",void 0),he=(0,i._)([(0,w.j)("esri.layers.SceneLayer")],he);const fe={"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"},me={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},ge=he},66361:(e,t,r)=>{r.d(t,{jF:()=>u,lQ:()=>y,o1:()=>m});var i=r(43697),s=r(32448),n=r(22974),o=r(95330),a=(r(92604),r(75215),r(20102),r(80442),r(52011)),l=r(18596);const d=new s.Z.EventEmitter;function u(e,t,r=null,i=!1){const s=(0,o.hh)();return i=null==t||i,d.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const c="esri.layers.mixins.EditBusLayer",p=Symbol(c);function y(e){return null!=e&&"object"==typeof e&&p in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function f(e,t,r){const i=new URL(e).host,s=l.Jp.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}const m=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,d=null!=r&&null!=this.layerId&&r===this.layerId,u=h(this),c=h(this)&&f(t,i,this.gdbVersion);if(!a||u&&!c||!d&&!s)return;const p=o.then((e=>{if(d&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.d9)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:r,updates:i,deletes:s}=t.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:r?r.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:i?i.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.d9)(e.historicMoment)};return this.emit("edits",o),o}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.d9)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.d9)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(0,l.JV)(t,i)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=h(this),o=h(this)&&f(t,r,this.gdbVersion),a=h(this)&&!f(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then((()=>{this.addHandles(function(e){return d.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return d.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=p,r=(0,i._)([(0,a.j)(c)],r),r}},72965:(e,t,r)=>{r.d(t,{M:()=>o});var i=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));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 r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},61960:(e,t,r)=>{r.d(t,{B:()=>a});var i=r(43697),s=r(96674),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011));let a=class extends s.wq{constructor(){super(...arguments),this.type=null}};(0,i._)([(0,n.Cb)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,o.j)("esri.layers.support.FeatureReduction")],a)},85857:(e,t,r)=>{r.d(t,{Z:()=>d});var i,s=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(61960);let l=i=class extends a.B{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s._)([(0,n.Cb)({type:["selection"]})],l.prototype,"type",void 0),l=i=(0,s._)([(0,o.j)("esri.layers.support.FeatureReductionSelection")],l);const d=l},45574:(e,t,r)=>{r.d(t,{JD:()=>w,Jj:()=>_,sX:()=>N,Ob:()=>V,rP:()=>Z,FV:()=>F,nU:()=>T,Ci:()=>j,Fr:()=>b,HW:()=>G,gG:()=>E,uA:()=>k,SU:()=>C,KE:()=>R,VG:()=>x,tD:()=>L,kp:()=>O,C9:()=>A,rk:()=>P,kZ:()=>M,JY:()=>U,Y5:()=>I,uj:()=>S});var i=r(40330),s=r(9790),n=r(66643),o=r(20102),a=r(35454),l=r(42033),d=r(63213),u=r(14165);async function c(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=p(e));const i=function(e){return p(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),s=e.capabilities.query.supportsPagination;t.start=0,t.num=i;let n=null;for(;;){const o=await e.source.queryFeaturesJSON(t,r);if(null==n?n=o:n.features=n.features.concat(o.features),n.exceededTransferLimit=o.exceededTransferLimit,!s||!o.exceededTransferLimit)break;t.start+=i}return n}function p(e){return e.capabilities.query.supportsMaxRecordCountFactor?u.Z.MAX_MAX_RECORD_COUNT_FACTOR:1}var y=r(84230),h=r(84382),f=r(81571),m=r(56545),g=r(75935);const b=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function w(e,t,r,i){const s=await q(e);if(await v(e,t,i),!s.addAttachment)throw new o.Z(i,"Layer source does not support addAttachment capability");return s.addAttachment(t,r)}function v(e,t,r){const{attributes:i}=t,{objectIdField:s}=e;return e.capabilities?.data?.supportsAttachment?t?i?s&&i[s]?Promise.resolve():Promise.reject(new o.Z(r,`feature is missing the identifying attribute ${s}`)):Promise.reject(new o.Z(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.Z(r,"A feature is required to add/delete/update attachments")):Promise.reject(new o.Z(r,"this layer doesn't support attachments"))}async function I(e,t,r,i,s){const n=await q(e);if(await v(e,t,s),!n.updateAttachment)throw new o.Z(s,"Layer source does not support updateAttachment capability");return n.updateAttachment(t,r,i)}async function _(e,t,i){const{applyEdits:s}=await r.e(4720).then(r.bind(r,14720)),n=await e.load(),{source:o,globalIdField:a}=n;let l=i;return("feature"===n.type?n.infoFor3D:null)&&null!=t.deleteFeatures&&null!=a&&(l={...l,globalIdToObjectId:await G(e,t.deleteFeatures,a)}),s(n,o,t,i)}async function S(e,t,i){const{uploadAssets:s}=await r.e(4720).then(r.bind(r,14720)),n=await e.load();return s(n,n.source,t,i)}async function F(e,t,r,i){const s=await q(e);if(await v(e,t,i),!s.deleteAttachments)throw new o.Z(i,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r)}async function j(e,t,r){const i=(await e.load({signal:t?.signal})).source;if(!i.fetchRecomputedExtents)throw new o.Z(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function C(e,t,r,i){t=m.Z.from(t),await e.load();const s=e.source,n=e.capabilities;if(!n?.data?.supportsAttachment)throw new o.Z(i,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:d,num:u,size:c,start:p,where:y}=t;if(!n?.operations?.supportsQueryAttachments&&(a?.length>0||d?.length>0||c?.length>0||u||p||y))throw new o.Z(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||d?.length||y))throw new o.Z(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!s.queryAttachments)throw new o.Z(i,"Layer source does not support queryAttachments capability",t);return s.queryAttachments(t)}async function L(e,t,r,i){const s=await q(e);if(!s.queryObjectIds)throw new o.Z(i,"Layer source does not support queryObjectIds capability");return s.queryObjectIds(u.Z.from(t)??e.createQuery(),r)}async function x(e,t,r,i){const s=await q(e);if(!s.queryFeatureCount)throw new o.Z(i,"Layer source does not support queryFeatureCount capability");return s.queryFeatureCount(u.Z.from(t)??e.createQuery(),r)}async function R(e,t,r,i){const s=await q(e);if(!s.queryExtent)throw new o.Z(i,"Layer source does not support queryExtent capability");return s.queryExtent(u.Z.from(t)??e.createQuery(),r)}async function O(e,t,r,i){const s=await q(e);if(!s.queryRelatedFeatures)throw new o.Z(i,"Layer source does not support queryRelatedFeatures capability");return s.queryRelatedFeatures(g.default.from(t),r)}async function A(e,t,r,i){const s=await q(e);if(!s.queryRelatedFeaturesCount)throw new o.Z(i,"Layer source does not support queryRelatedFeaturesCount capability");return s.queryRelatedFeaturesCount(g.default.from(t),r)}async function E(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:i}=await t.refresh();if(null!=i&&(e.sourceJSON={...e.sourceJSON,...i},e.read(i,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.E)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function Z(e){const t=new u.Z,r=e.capabilities?.data,i=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,i&&(t.compactGeometryEnabled=i.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=i.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:s,timeExtent:n}=e;return t.timeExtent=null!=s&&null!=n?n.offset(-s.value,s.unit):n||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function P(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function M(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function U(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function q(e){return(await e.load()).source}async function T(e,t,r){const s=e.parsedUrl?.path;s&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!i.id)return;if(i.id.findCredential(e))return;let r;try{const s=await(0,y.oP)(e,t);s&&(r=await i.id.checkSignInStatus(`${s}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await i.id.getCredential(e,{signal:r})}catch(e){}}(s,r)}function N(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const D=(0,d.d)({types:s.QT});function V(e,t){if(e.defaultSymbol)return e.types?.length?new f.Z({defaultSymbol:D(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:D(e.symbol,e,t)})))}):new h.Z({symbol:D(e.defaultSymbol,e,t)})}function k(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function G(e,t,r){if(null==t)return null;const i=[],{objectIdField:s}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:i}=e;t={globalId:i[r],objectId:null!=i[s]&&-1!==i[s]?i[s]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||i.push(t.globalId))})),0===i.length)return null;const o=e.createQuery();o.where=i.map((e=>`${r}='${e}'`)).join(" OR "),o.returnGeometry=!1,o.outFields=[s,r],o.cacheHint=!1;const a=await(0,n.mt)(c(e,o));if(!a.ok)return null;const l=new Map,d=a.value.features;for(const e of d){const t=e.attributes[r],i=e.attributes[s];null!=t&&null!=i&&-1!==i&&l.set(t,i)}return l}},53518:(e,t,r)=>{r.d(t,{v:()=>l});var i=r(80442),s=r(92604),n=r(1231),o=r(99514),a=r(35671);function l(){return{fields:{type:[n.Z],value:null,set:function(e){if(e&&(0,i.Z)("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.Z.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.Z.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.Q0)(this.fieldsIndex,e)}}}}},66094:(e,t,r)=>{r.d(t,{B:()=>s});var i=r(17452);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Ml)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},40555:(e,t,r)=>{r.d(t,{y:()=>o});var i=r(66643),s=r(95330),n=r(20941);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.q6)(o.populateFromStyle());if((0,s.k_)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},75935:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,s=r(43697),n=(r(66577),r(96674)),o=r(22974),a=r(5600),l=r(75215),d=r(52011),u=r(30556),c=r(10158),p=r(82971);let y=i=class extends n.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:c.n,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.Cb)({type:Date})],y.prototype,"historicMoment",void 0),(0,s._)([(0,u.c)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,s._)([(0,a.Cb)({type:p.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,s._)([(0,u.c)("start"),(0,u.c)("num")],y.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=i=(0,s._)([(0,d.j)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.se)(y);const h=y},18596:(e,t,r)=>{r.d(t,{JV:()=>a,Jp:()=>s,Px:()=>o,U8:()=>i});const i=(0,r(41123).z)(),s=new Map,n=new Map;async function o(e,t,s=!1){if(!e||!t)return!0;const o=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=n.get(o)?.entries();if(a)for(const[e,n]of a)if(n.name===t){const t=!n.stack?.hasForwardEdits();if(!t&&s){const[{deleteForwardEdits:t},{default:s}]=await Promise.all([r.e(1316).then(r.bind(r,51316)),r.e(4573).then(r.bind(r,84573))]);return t(o,e,new s({sessionId:i,moment:n.moment}))}return t}return!0}function a(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=n.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4608,5935],{60590:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Bt});var i=r(43697),n=r(51773),s=r(2368),o=r(20102),a=r(16453),l=r(95330),u=r(5600),p=r(75215),c=(r(67676),r(80442),r(52011)),d=r(30556),m=r(87085),h=r(66577),y=r(38171),f=r(30030),g=r(3172),b=r(60235),w=r(22974),v=r(92604),R=r(17445),_=r(17452),S=r(71715),F=r(8744),C=r(21506),x=r(35956),I=r(96674),T=r(45663),N=r(81578);const D={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var j=r(93010),P=r(75509),O=r(23847);const Z=new Set(["u1","u2","u4","u8","s8","u16","s16"]),M={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},A=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function V(e){return A.has(e.type)}function J(e,t){if(!e||!t)return(0,w.d9)(e||t);const r=(0,w.d9)(e);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),E(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(G(r.functionArguments).Raster=t);return r}function E(e,t){for(const r in e)"raster"===r.toLowerCase()&&("RasterFunctionVariable"===e[r].type?(e[r]=t.rasterFunctionDefinition,e[r].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[r].type&&E(e[r].arguments,t))}function q(e){const t=(0,w.d9)(D[e.functionName+"Function"]),r=e.functionArguments;for(const e in r)"raster"===e.toLowerCase()?(t.arguments[e]=q(r[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=U(r[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=r[e];return t}function G(e){const t=e?.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?G(t.functionArguments):e}const z={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function L(e,t){const r=Z.has(t)?(0,N.r)(t):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function B(e){if(null==e)return;const{fields:t}=e,r=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return r?.name}function H(e){const t=[];return e?.forEach((e=>{const r=e;if(Array.isArray(r))t.push(r);else{if(null==r.min||null==r.max)return;const e=[r.min,r.max,r.avg||0,r.stddev||0];t.push(e)}})),t}function U(e){const t=[],r=[];return e.forEach((e=>{t.push(e[0]),r.push((0,j.oI)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:r}}var k=r(98974),Q=r(69608);let $=class extends I.wq{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new k.Z({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.pixelFilter,i=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const n=e.multidimensionalSubset?.areaOfInterest;return n&&(t=this._addClipFunction(t,n)),i&&!r&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:i}=t;return e=e||t.rasterFunction,i&&V(i)?J(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const r=t.convertToRFT,i=new T.Z;i.functionName="Stretch";const n=z[P.v.toJSON(e.stretchType)],s="u8",o={StretchType:n,Statistics:H(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),n===z.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,i.outputPixelType=s):n===z.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,i.outputPixelType=s):n===z.minMax?i.outputPixelType=s:n===z.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),i.functionArguments=o,i.variableName="Raster",e.colorRamp){const n=e.colorRamp,s=new T.Z;if(r)s.functionArguments={ColorRamp:(0,j.pM)(n)};else{const r=(0,j.Uh)(n,!0);if(r)s.functionArguments={colorRampName:r};else if(!t.convertColorRampToColormap||"algorithmic"!==n.type&&"multipart"!==n.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),s.functionArguments={colorRamp:t}}else s.functionArguments={Colormap:(0,j.Jw)(n)}}return s.variableName="Raster",s.functionName="Colormap",s.functionArguments.Raster=i,r?new T.Z({rasterFunctionDefinition:q(s)}):s}return r?new T.Z({rasterFunctionDefinition:q(i)}):i}(e,t);case"class-breaks":return function(e,t){const r=[],i=[],n=[],s=[],o=1e-6,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=B(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,r)=>{const i=t.symbol?.color;let n;i?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(n=o.attributes[e.field],(n>=t.minValue&&n<t.maxValue||r===e.classBreakInfos.length-1&&n>=t.minValue)&&s.push([o.attributes[p],i.r,i.g,i.b]))}))}));const r=a?L(s,a):s,i=new T.Z;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=r,i.variableName="Raster",t.convertToRFT?new T.Z({rasterFunctionDefinition:q(i)}):i}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?r.push(e.minValue,e.maxValue+o):r.push(e.minValue+o,e.maxValue+o),i.push(t),s.push([t,a.r,a.g,a.b])):n.push(e.minValue,e.maxValue)}));const c=a?L(s,a):s,d=new T.Z;d.functionName="Remap",d.functionArguments={InputRanges:r,OutputValues:i,NoDataRanges:n},d.variableName="Raster";const m=new T.Z;return m.functionName="Colormap",m.functionArguments={Colormap:c,Raster:d},t.convertToRFT?new T.Z({rasterFunctionDefinition:q(m)}):m}(e,t);case"unique-value":return function(e,t){const r=[],{pixelType:i,rasterAttributeTable:n}=t,s=null==n?null:n.features,o=B(n),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(s){if(o){const t=new Map;l.forEach((e=>{const r=e.value,i=e.symbol?.color;null!=r&&i?.a&&t.set(String(r),i.toRgb())}));const i=e.field;s.forEach((({attributes:e})=>{const n=String(e[i]),s=e[o],l=t.get(n);l?r.push([s,...l]):a&&r.push([s,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],i=t.symbol?.color,n=+t.value;if(i?.a){if(isNaN(n))return null;r.push([n,i.r,i.g,i.b])}}const u=i?L(r,i):r,p=new T.Z;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new T.Z({rasterFunctionDefinition:q(p)}):p}(e,t);case"raster-colormap":return function(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:i}=t,n=i?L(r,i):r,s=new T.Z;return s.functionName="Colormap",s.functionArguments={},s.functionArguments.Colormap=n,t.convertToRFT?new T.Z({rasterFunctionDefinition:q(s)}):s}(e,t);case"vector-field":return function(e,t){const r=new T.Z;r.functionName="VectorFieldRenderer";const{dataType:i,bandNames:n}=t,s="vector-uv"===i;let o,a;if(n&&2===n.length){const e=n.map((e=>e.toLowerCase()));o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new O.Z,c={magnitudeBandID:o,directionBandID:a,isUVComponents:s,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:M[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};r.functionArguments=c;const d=q(r);return t.convertToRFT?T.Z.fromJSON({rasterFunctionDefinition:d}):r}(e,t);case"raster-shaded-relief":return function(e,t){const r=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new T.Z;const i=new T.Z;i.functionName="Hillshade";const n="traditional"===e.hillshadeType?0:1,s="none"===e.scalingType?1:3,o={HillshadeType:n,SlopeType:s,ZFactor:e.zFactor};return 0===n&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===s&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),i.functionArguments=o,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?o.ColorRamp=(0,j.pM)(e.colorRamp):o.Colormap=(0,j.Jw)(e.colorRamp)),r?new T.Z({rasterFunctionDefinition:q(i)}):i}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(i,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,r=this.layer.serviceRasterInfo.pixelSize;let i=new T.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:r}});return i=e?.rasterFunctionDefinition?new T.Z({rasterFunctionDefinition:q(i)}):i,J(i,e)}_addClipFunction(e,t){return J(new T.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,i._)([(0,u.Cb)()],$.prototype,"layer",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"adjustAspectRatio",null),(0,i._)([(0,d.c)("adjustAspectRatio")],$.prototype,"writeAdjustAspectRatio",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"bandIds",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"compression",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"compressionQuality",null),(0,i._)([(0,d.c)("compressionQuality")],$.prototype,"writeCompressionQuality",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"compressionTolerance",null),(0,i._)([(0,d.c)("compressionTolerance")],$.prototype,"writeCompressionTolerance",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"format",null),(0,i._)([(0,u.Cb)({type:String,json:{read:{reader:Q.cl.read},write:{writer:Q.cl.write}}})],$.prototype,"interpolation",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"noData",null),(0,i._)([(0,u.Cb)({type:String,json:{read:{reader:Q.kQ.read},write:{writer:Q.kQ.write}}})],$.prototype,"noDataInterpretation",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"pixelType",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"lercVersion",void 0),(0,i._)([(0,d.c)("lercVersion")],$.prototype,"writeLercVersion",null),(0,i._)([(0,u.Cb)({type:Number})],$.prototype,"version",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"mosaicRule",null),(0,i._)([(0,u.Cb)({json:{write:!0,name:"renderingRule"}})],$.prototype,"rasterFunction",null),$=(0,i._)([(0,c.j)("esri.layers.mixins.ExportImageServiceParameters")],$);var W=r(1231),X=r(99514),Y=r(90082),K=r(29876),ee=r(5847),te=r(25972),re=r(88281),ie=r(99815),ne=r(75993),se=r(80676),oe=r(67058),ae=r(72758),le=r(16306),ue=r(11282),pe=r(82971);let ce=class extends I.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],ce.prototype,"north",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],ce.prototype,"up",void 0),(0,i._)([(0,u.Cb)({type:pe.Z,json:{write:!0}})],ce.prototype,"spatialReference",void 0),ce=(0,i._)([(0,c.j)("esri.rest.support.ImageAngleResult")],ce);const de=ce;var me=r(67900);let he=class extends I.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,i._)([(0,u.Cb)({type:Number,json:{read:!0,write:!0}})],he.prototype,"value",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],he.prototype,"displayValue",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{read:!0,write:!0}})],he.prototype,"uncertainty",void 0),he=(0,i._)([(0,c.j)("esri.rest.support.ImageMeasureResultValue")],he);let ye=class extends he{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ye.prototype,"unit",void 0),ye=(0,i._)([(0,c.j)("esri.rest.support.ImageMeasureResultLengthValue")],ye);let fe=class extends he{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,u.Cb)({type:String,json:{read:me.gV.read,write:me.gV.write}})],fe.prototype,"unit",void 0),fe=(0,i._)([(0,c.j)("esri.rest.support.ImageMeasureResultAreaValue")],fe);let ge=class extends he{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,u.Cb)({type:String,json:{read:me.CN.read,write:me.CN.write}})],ge.prototype,"unit",void 0),ge=(0,i._)([(0,c.j)("esri.rest.support.ImageMeasureResultAngleValue")],ge);let be=class extends I.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,i._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],be.prototype,"name",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],be.prototype,"sensorName",void 0),be=(0,i._)([(0,c.j)("esri.rest.support.BaseImageMeasureResult")],be);let we=class extends be{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,i._)([(0,u.Cb)({type:fe,json:{read:!0,write:!0}})],we.prototype,"area",void 0),(0,i._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],we.prototype,"perimeter",void 0),we=(0,i._)([(0,c.j)("esri.rest.support.ImageAreaResult")],we);const ve=we;let Re=class extends be{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,i._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],Re.prototype,"distance",void 0),(0,i._)([(0,u.Cb)({type:ge,json:{read:!0,write:!0}})],Re.prototype,"azimuthAngle",void 0),(0,i._)([(0,u.Cb)({type:ge,json:{read:!0,write:!0}})],Re.prototype,"elevationAngle",void 0),Re=(0,i._)([(0,c.j)("esri.rest.support.ImageDistanceResult")],Re);const _e=Re;let Se=class extends be{constructor(){super(...arguments),this.height=null}};(0,i._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],Se.prototype,"height",void 0),Se=(0,i._)([(0,c.j)("esri.rest.support.ImageHeightResult")],Se);const Fe=Se;var Ce=r(94139),xe=r(74889);let Ie=class extends I.wq{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"catalogItemVisibilities",void 0),(0,i._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],Ie.prototype,"catalogItems",void 0),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],Ie.prototype,"location",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"name",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"objectId",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"processedValues",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"properties",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"value",void 0),Ie=(0,i._)([(0,c.j)("esri.rest.support.ImageIdentifyResult")],Ie);const Te=Ie;let Ne=class extends I.wq{constructor(){super(...arguments),this.geometries=null}};(0,i._)([(0,u.Cb)({json:{write:!0}})],Ne.prototype,"geometries",void 0),Ne=(0,i._)([(0,c.j)("esri.rest.support.ImagePixelLocationResult")],Ne);const De=Ne;let je=class extends be{constructor(){super(...arguments),this.point=null}};(0,i._)([(0,u.Cb)({type:Ce.Z,json:{name:"point.value",read:!0,write:!0}})],je.prototype,"point",void 0),je=(0,i._)([(0,c.j)("esri.rest.support.ImagePointResult")],je);const Pe=je;let Oe=class extends I.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,i._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"attributes",void 0),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],Oe.prototype,"location",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"locationId",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"rasterId",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"resolution",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"pixelValue",void 0),Oe=(0,i._)([(0,c.j)("esri.rest.support.ImageSample")],Oe);const Ze=Oe;let Me=class extends I.wq{constructor(){super(...arguments),this.samples=null}};(0,i._)([(0,u.Cb)({type:[Ze],json:{write:!0}})],Me.prototype,"samples",void 0),Me=(0,i._)([(0,c.j)("esri.rest.support.ImageSampleResult")],Me);const Ae=Me;function Ve(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const r=[];null!=t.start&&r.push(t.start),null==t.end||r.includes(t.end)||r.push(t.end),e.time=r.join(",")}}async function Je(e,t,r){const i=(0,ue.en)(e),n=t.geometry?[t.geometry]:[],s=await(0,le.aX)(n),o=t.toJSON();Ve(o);const a=s?.[0];null!=a&&(o.geometry=a.toJSON());const l=(0,ue.cv)({...i.query,f:"json",...o});return(0,ue.lA)(l,r)}async function Ee(e,t,r){const i=(0,ue.en)(e),n=t.geometry?[t.geometry]:[];return(0,le.aX)(n).then((e=>{const n=t.toJSON(),s=e?.[0];null!=s&&(n.geometry=JSON.stringify(s.toJSON()));const o=(0,ue.cv)({...i.query,f:"json",...n}),a=(0,ue.lA)(o,r);return(0,g.Z)(i.path+"/identify",a)})).then((e=>Te.fromJSON(e.data)))}async function qe(e,t,r,i){const n=(0,ue.en)(e),s=await(0,le.aX)(r),o=t.toJSON();null!=s[0]&&(o.fromGeometry=JSON.stringify(Ge(s[0]))),null!=s[1]&&(o.toGeometry=JSON.stringify(Ge(s[1])));const a=(0,ue.cv)({...n.query,f:"json",...o}),l=(0,ue.lA)(a,i),{data:u}=await(0,g.Z)(n.path+"/measure",l);return u}function Ge(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=ze(e.spatialReference)),t}function ze(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:r}=t;return null!=e?r?{icsid:e,icsns:r}:{icsid:e}:{ics:t}}return e.toJSON()}function Le(e,t){if(!e.imageCoordinateSystem)return(0,F.B9)(e);const r=ze(e),{icsid:i,icsns:n}=r;return null==i||null!=n&&!t?.toLowerCase().includes("/"+n.toLowerCase()+"/")?JSON.stringify(r):`0:${i}`}r(10158);var Be,He=r(4967),Ue=(r(68773),r(40330),r(2109),r(98732),r(6570)),ke=(r(9361),r(65091)),Qe=r(38913),$e=(r(58901),r(45091),r(14165)),We=(r(98326),r(56545),r(41818)),Xe=r(5396),Ye=(r(75935),r(28141),r(26059)),Ke=r(36679);let et=Be=class extends I.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Be((0,w.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,i._)([(0,u.Cb)({type:[String],json:{name:"angleName",write:!0}})],et.prototype,"angleNames",void 0),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],et.prototype,"point",void 0),(0,i._)([(0,u.Cb)({type:pe.Z,json:{write:!0}})],et.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({type:p.z8,json:{write:!0}})],et.prototype,"rasterId",void 0),et=Be=(0,i._)([(0,c.j)("esri.rest.support.ImageAngleParameters")],et);const tt=et;var rt=r(33955);const it=new(r(35454).X)({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let nt=class extends I.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var st;(0,i._)([(0,u.Cb)()],nt.prototype,"type",void 0),(0,i._)([(0,u.Cb)({type:it.apiValues,json:{read:it.read,write:it.write}})],nt.prototype,"measureOperation",void 0),(0,i._)([(0,u.Cb)({type:k.Z,json:{write:!0}})],nt.prototype,"mosaicRule",void 0),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],nt.prototype,"pixelSize",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],nt.prototype,"raster",void 0),nt=(0,i._)([(0,c.j)("esri.rest.support.BaseImageMeasureParameters")],nt);let ot=st=class extends nt{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new st((0,w.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.Cb)({types:h.qM,json:{name:"fromGeometry",read:!0,write:!0}})],ot.prototype,"geometry",void 0),(0,i._)([(0,d.c)("geometry")],ot.prototype,"writeGeometry",null),(0,i._)([(0,u.Cb)({type:it.apiValues,json:{write:it.write}})],ot.prototype,"measureOperation",null),(0,i._)([(0,u.Cb)({json:{read:!0}})],ot.prototype,"is3D",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ot.prototype,"linearUnit",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:me.gV.read,write:me.gV.write}})],ot.prototype,"areaUnit",void 0),ot=st=(0,i._)([(0,c.j)("esri.rest.support.ImageAreaParameters")],ot);const at=ot;var lt;let ut=lt=class extends nt{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new lt((0,w.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],ut.prototype,"fromGeometry",void 0),(0,i._)([(0,d.c)("fromGeometry")],ut.prototype,"writeFromGeometry",null),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],ut.prototype,"toGeometry",void 0),(0,i._)([(0,u.Cb)({type:it.apiValues,json:{write:it.write}})],ut.prototype,"measureOperation",null),(0,i._)([(0,u.Cb)({json:{read:!0}})],ut.prototype,"is3D",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ut.prototype,"linearUnit",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:me.CN.read,write:me.CN.write}})],ut.prototype,"angularUnit",void 0),ut=lt=(0,i._)([(0,c.j)("esri.rest.support.ImageDistanceParameters")],ut);const pt=ut;var ct;let dt=ct=class extends nt{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new ct((0,w.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.Cb)({type:Ce.Z,json:{read:!0}})],dt.prototype,"fromGeometry",void 0),(0,i._)([(0,d.c)("fromGeometry")],dt.prototype,"writeFromGeometry",null),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],dt.prototype,"toGeometry",void 0),(0,i._)([(0,u.Cb)({type:it.apiValues,json:{write:it.write}})],dt.prototype,"measureOperation",null),(0,i._)([(0,u.Cb)({json:{read:!0}})],dt.prototype,"operationType",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],dt.prototype,"linearUnit",void 0),dt=ct=(0,i._)([(0,c.j)("esri.rest.support.ImageHeightParameters")],dt);const mt=dt;var ht,yt=r(79681),ft=r(92835);let gt=ht=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=k.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))}get renderingRule(){return(0,b.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,b.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,b.Mr)(v.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,b.Mr)(v.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=T.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[r]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,r){null!=e&&(t[r]=JSON.stringify(e))}writeTimeExtent(e,t,r){if(null!=e){const i=null!=e.start?e.start.getTime():null,n=null!=e.end?e.end.getTime():null;t[r]=null!=i?null!=n?`${i},${n}`:`${i}`:null}}clone(){return new ht((0,w.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,i._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"geometry",void 0),(0,i._)([(0,d.c)("geometry")],gt.prototype,"writeGeometry",null),(0,i._)([(0,u.Cb)({type:k.Z,json:{write:!0}})],gt.prototype,"mosaicRule",null),(0,i._)([(0,d.c)("mosaicRule")],gt.prototype,"writeMosaicRule",null),(0,i._)([(0,u.Cb)({type:T.Z})],gt.prototype,"renderingRule",null),(0,i._)([(0,u.Cb)({type:[T.Z]})],gt.prototype,"renderingRules",null),(0,i._)([(0,u.Cb)({type:T.Z,json:{write:!0,name:"renderingRule"}})],gt.prototype,"rasterFunction",null),(0,i._)([(0,d.c)("rasterFunction")],gt.prototype,"writeRasterFunction",null),(0,i._)([(0,u.Cb)({type:[T.Z],json:{write:!0,name:"renderingRules"}})],gt.prototype,"rasterFunctions",void 0),(0,i._)([(0,d.c)("rasterFunctions")],gt.prototype,"writeRasterFunctions",null),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],gt.prototype,"pixelSize",void 0),(0,i._)([(0,d.c)("pixelSize")],gt.prototype,"writePixelSize",null),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnGeometry",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnCatalogItems",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnPixelValues",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],gt.prototype,"maxItemCount",void 0),(0,i._)([(0,u.Cb)({type:ft.Z,json:{write:{target:"time"}}})],gt.prototype,"timeExtent",void 0),(0,i._)([(0,d.c)("timeExtent")],gt.prototype,"writeTimeExtent",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"raster",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"viewId",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"processAsMultidimensional",void 0),gt=ht=(0,i._)([(0,c.j)("esri.rest.support.ImageIdentifyParameters")],gt);const bt=gt;var wt;let vt=wt=class extends I.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,r){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new wt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,i._)([(0,u.Cb)({type:[Ce.Z],json:{write:!0}})],vt.prototype,"geometries",void 0),(0,i._)([(0,d.c)("geometries")],vt.prototype,"writeGeometry",null),(0,i._)([(0,u.Cb)({type:p.z8,json:{write:!0}})],vt.prototype,"rasterId",void 0),vt=wt=(0,i._)([(0,c.j)("esri.rest.support.ImagePixelLocationParameters")],vt);const Rt=vt;var _t;let St=_t=class extends nt{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new _t((0,w.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.Cb)({types:h.qM,json:{name:"fromGeometry",read:rt.im}})],St.prototype,"geometry",void 0),(0,i._)([(0,d.c)("geometry")],St.prototype,"writeGeometry",null),(0,i._)([(0,u.Cb)({type:it.apiValues,json:{read:it.read,write:it.write}})],St.prototype,"measureOperation",null),(0,i._)([(0,u.Cb)({json:{read:!0}})],St.prototype,"is3D",void 0),St=_t=(0,i._)([(0,c.j)("esri.rest.support.ImagePointParameters")],St);const Ft=St;var Ct;let xt=Ct=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=e.toJSON())}set locations(e){if(e?.length){const t=new ke.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new Ct((0,w.d9)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,i._)([(0,u.Cb)({types:h.qM,json:{read:rt.im}})],xt.prototype,"geometry",void 0),(0,i._)([(0,d.c)("geometry")],xt.prototype,"writeGeometry",null),(0,i._)([(0,u.Cb)()],xt.prototype,"locations",null),(0,i._)([(0,u.Cb)({type:String,json:{type:Q.cl.jsonValues,read:Q.cl.read,write:Q.cl.write}})],xt.prototype,"interpolation",void 0),(0,i._)([(0,u.Cb)({type:k.Z,json:{write:!0}})],xt.prototype,"mosaicRule",void 0),(0,i._)([(0,u.Cb)({type:[String],json:{write:!0}})],xt.prototype,"outFields",void 0),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],xt.prototype,"pixelSize",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],xt.prototype,"raster",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],xt.prototype,"returnFirstValueOnly",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleDistance",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleCount",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sliceId",void 0),(0,i._)([(0,u.Cb)({type:ft.Z,json:{read:{source:"time"},write:{target:"time"}}})],xt.prototype,"timeExtent",void 0),xt=Ct=(0,i._)([(0,c.j)("esri.rest.support.ImageSampleParameters")],xt);const It=xt;var Tt=r(23808);const Nt=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Dt=(0,u.Eg)(p.q9,{min:0,max:255}),jt=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new $({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?k.Z.fromJSON(t):null}get fieldsIndex(){return this.fields?new X.Z(this.fields):null}set format(e){e&&Nt.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=k.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?k.Z.fromJSON(r):this._isMosaicRuleSupported(t)?k.Z.fromJSON(t):null}writeMosaicRule(e,t,r){let i=this.mosaicRule;const n=this.definitionExpression;i?n&&n!==i.where&&(i=i.clone(),i.where=n):n&&(i=new k.Z({where:n})),this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}writeNoData(e,t,r){null!=e&&"number"==typeof e&&(t[r]=Dt(e))}readObjectIdField(e,t){if(!e){const r=t.fields.find((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=r?.name}return e}get parsedUrl(){return(0,_.mN)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer,n=(0,f.ij)(i,r);return null==n?null:("vector-field"===n.type&&t.symbolTileSize&&!i.symbolTileSize&&(n.symbolTileSize=t.symbolTileSize),V(n)||v.Z.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),n)}writeRenderer(e,t,r){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix,t=new W.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new W.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new W.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let n=this.fields?(0,w.d9)(this.fields):[];n.push(r),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&n.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&n.push(i),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{n.push(new W.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(n.push(new W.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),n.push(new W.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:s}=this.rasterInfo??{};if(null!=s){const t=s.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const r=(0,w.d9)(t);return r.name=e+t.name,r}));n=n.concat(t)}return n}get renderingRule(){return(0,b.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this.rasterFunction}set renderingRule(e){(0,b.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=T.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r?.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?T.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):T.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?pe.Z.fromJSON(r):null}readPixelType(e){return Q.sM.fromJSON(e)||e}writePixelType(e,t,r){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[r]=Q.sM.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e;const{renderer:i,symbolizer:n,pixelFilter:s,bandIds:o}=this;if(!this._isPicture()&&i&&n&&!s){const s=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(i.toJSON()),a=this._rasterJobHandler.instance;if(a){s&&(n.bind(),await a.updateSymbolizer(n,t),this._cachedRendererJson=i.toJSON());const l=await a.symbolize({bandIds:o,...e},t);r={extent:e.extent,pixelBlock:l}}else r={extent:e.extent,pixelBlock:n.symbolize({bandIds:o,...e})}}return r}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new o.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,p.TJ)(tt,e).clone(),async function(e,t,r){const i=t.toJSON();null!=i.angleName&&(i.angleName=i.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(i.point.spatialReference=ze(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(i.spatialReference=Le(t.spatialReference));const n=(0,ue.en)(e),s=(0,ue.cv)({...n.query,f:"json",...i}),o=(0,ue.lA)(s,r),{data:a}=await(0,g.Z)(`${n.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new pe.Z({wkid:0,imageCoordinateSystem:a.spatialReference}):pe.Z.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new de(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,p.TJ)(Rt,e).clone(),async function(e,t,r){const i=t.toJSON(),{geometries:n}=t;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(i.geometries.geometries[e].spatialReference=ze(n[e].spatialReference));const s=(0,ue.en)(e),o=(0,ue.cv)({...s.query,f:"json",...i}),a=(0,ue.lA)(o,r),{data:l}=await(0,g.Z)(`${s.path}/computePixelLocation`,a);return De.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,p.TJ)(yt.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Je(e,t,r),n=(0,ue.en)(e),{data:s}=await(0,g.Z)(`${n.path}/computeHistograms`,i);return{histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new o.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,p.TJ)(yt.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Je(e,t,r),n=(0,ue.en)(e),{data:s}=await(0,g.Z)(`${n.path}/computeStatisticsHistograms`,i),{statistics:o}=s;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const r=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?r.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?r.mensuration.supportsHeightFromBaseAndTopShadow:r.mensuration.supportsHeightFromTopAndTopShadow))throw new o.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,p.TJ)(mt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await qe(e,t,[t.fromGeometry,t.toGeometry],r);return Fe.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsAreaAndPerimeter||e.is3D&&!r.mensuration.supports3D)throw new o.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,p.TJ)(at,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await qe(e,t,[t.geometry],r);return ve.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsDistanceAndAngle||e.is3D&&!r.mensuration.supports3D)throw new o.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,p.TJ)(pt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await qe(e,t,[t.fromGeometry,t.toGeometry],r);return _e.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsPointOrCentroid||e.is3D&&!r.mensuration.supports3D)throw new o.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,p.TJ)(Ft,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await qe(e,t,[t.geometry],r);return Pe.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}async fetchImage(e,t,i,n={}){if(null==e||null==t||null==i)throw new o.Z("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:n.signal});e&&(this.rasterInfo=e)}const s=this.getExportImageServiceParameters(e,t,i,n.timeExtent);if(null==s){if(n.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=i,n.returnImageBitmap?{imageBitmap:await(0,Y.g)(e,`${r(this.parsedUrl)}/exportImage`,n.signal)}:{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:o}=this,a=(s?.length||o.bandCount)??0,l=t*i,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(ee.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ee.Z({width:t,height:i,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!n.requestAsImageElement&&!this.pixelFilter,l=a&&!!n.returnImageBitmap,u={imageServiceParameters:s,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:a,returnImageBitmap:l,signal:n.signal};return this._requestArrayBuffer(u)}fetchKeyProperties(e){return(0,g.Z)(r(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new o.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,g.Z)(r(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>xe.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,r){const i=(0,ue.en)(e),n=(0,ue.cv)({...i?.query,f:"json"}),s=(0,ue.lA)(n,r),o=`${i?.path}/${t}/info`,a=(0,g.Z)(`${o}`,s),l=(0,g.Z)(`${o}/keyProperties`,s),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let d=null;p.statistics?.length&&(d=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const m=Ue.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),y=Math.ceil(m.height/p.pixelSizeY-.1),f=m.spatialReference,b=new Ce.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:f}),w=p.histograms?.length?p.histograms:null,v=new Ke.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new te.Z({width:h,height:y,bandCount:p.bandCount,extent:m,spatialReference:f,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:w,keyProperties:c,storageInfo:v})}(r(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,g.Z)(r(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),n=i?.ics;if(!n)return;let s=null;try{s=(await(0,g.Z)(r(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s||!s.spatialReference)return{ics:n,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,g.Z)(r(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=s.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:(0,F.B9)(a),outSR:"0:"+e},u=(0,g.Z)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(s.xmin+s.xmax)/2,c=(s.ymax-s.ymin)/6,d=s.ymin+c,m=[];for(let e=0;e<5;e++)m.push({x:p,y:d+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:m}),inSR:(0,F.B9)(a),outSR:"0:"+e},y=(0,g.Z)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),f=await Promise.all([o,u,y]);let b=f[0].ipxf;if(null==b){const e=n.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(b={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const w=Ue.Z.fromJSON(f[1]?.geometries?.[0]);w&&(w.spatialReference=new pe.Z({wkid:0,imageCoordinateSystem:n}));const v=f[2].geometries?f[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],R=v.length;if(R<3)return{ics:n,icsToPixelTransform:b,icsExtent:w,northDirection:null};let _=0,S=0,C=0,x=0;for(let e=0;e<R;e++)_+=v[e].x,S+=v[e].y,C+=v[e].x*v[e].x,x+=v[e].x*v[e].y;const I=(R*x-_*S)/(R*C-_*_);let T=0;const N=v[4].x>v[0].x,D=v[4].y>v[0].y;return I===1/0?T=D?90:270:0===I?T=N?0:180:I>0?T=N?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(T=D?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:n,icsToPixelTransform:b,icsExtent:w,northDirection:T}}async generateRasterInfo(e,t){if(e=(0,p.TJ)(T.Z,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const i=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),r=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return r?r.join("/"):null}(e);if(!i)throw new o.Z("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const n={...t,query:this._getQueryParams()},s=(0,Ye.Nb)(r(this.parsedUrl),e,n);this._functionRasterInfos[i]=s;try{return await s}catch(e){throw this._functionRasterInfos[i]=null,e}}getExportImageServiceParameters(e,t,i,n){const s=Le((e=e.clone().shiftCentralMeridian()).spatialReference,r(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;o.bandIds=void 0}else o.bandIds=a?.join(",");l instanceof Array&&l.length>0&&(o.noData=l.join(","));const d=this._processMultidimensionalIntersection(null,n,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,n=d.timeExtent,o.renderingRule=this._getRenderingRuleString(T.Z.fromJSON(u));const m={};if(null!=n){const{start:e,end:t}=n.toJSON();e&&t&&e===t?m.time=""+e:null==e&&null==t||(m.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:s,imageSR:s,size:t+","+i,...o,...m}}async getSamples(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r?.operations.supportsGetSamples)throw new o.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,p.TJ)(It,e).clone();const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,r){const i=t.toJSON();Ve(i),i.outFields?.length&&(i.outFields=i.outFields.join(","));const n=await(0,le.aX)(t.geometry),s=n?.[0];null!=s&&(i.geometry=s.toJSON());const o=(0,ue.en)(e),a=(0,ue.cv)({...o.query,f:"json",...i}),l=(0,ue.lA)(a,r),{data:u}=await(0,g.Z)(`${o.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return Ae.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,p.TJ)(bt,e).clone(),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=Qe.Z.fromExtent(e.geometry));const r=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(r.isOutSide)throw new o.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=r.timeExtent,e.mosaicRule=r.mosaicRule;const{raster:i,rasterFunction:n}=this;return n&&null==e.rasterFunction&&(e.rasterFunction=n),i&&null==e.raster&&(e.raster=i),Ee(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new $e.Z;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,He.e)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Xe.G)(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,We.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:n,showNoDataRecords:s}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some((e=>!e.toLowerCase().includes(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(p)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new T.Z({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:r}=this;0===l.length?r?.functionName?(l.push(r),u.push(r.functionName)):l=null:r?.functionName&&!l.some((e=>e.functionName===r.functionName))&&(l.push(r),u.push(r.functionName))}const d=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let h=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:r}=(0,ie.W2)(m,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new o.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=r?.timeExtent&&(h=r.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h);let f=e.geometry;this.version<10.91&&"extent"===f?.type&&(f=Qe.Z.fromExtent(f));const g=this._getQueryParams({geometry:f,timeExtent:h,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:r,returnCatalogItems:a,returnGeometry:d,raster:this.raster,maxItemCount:n?1:null});delete g.f;const b=new bt(g);try{await this._generateRasterInfo(this.rasterFunction);const r=await Ee(this.url,b,{signal:t?.signal,query:{...this.customParameters}}),n=e.outFields,o=null!=r.value&&r.value.toLowerCase().includes("nodata");if(!a||d||!r?.catalogItems?.features.length||!s&&o)return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:s,templateFields:n});const l=this.objectIdField||"ObjectId",p=r.catalogItems?.features??[],c=p.map((e=>e.attributes?.[l])),m=new $e.Z({objectIds:c,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),h=await this.queryRasters(m);return h?.features?.length&&h.features.forEach((t=>{p.forEach((r=>{r.attributes[l]===t.attributes[l]&&(r.geometry=new Qe.Z(t.geometry),null!=e.outSpatialReference&&(r.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:s,templateFields:n})}catch{throw new o.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const i=(0,g.Z)(r(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),n=(0,g.Z)(r(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([i,n]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async createFlowMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(e,t):(0,Tt.GE)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,ie.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Ye.gh)(r(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,Ye.n$)(e,t),e))),n=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([i,n,s]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),v.Z.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,R.YP)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const r=this.timeInfo,{multidimensionalInfo:i}=this.serviceRasterInfo;if(null==e||null==i||null==t||null==r?.startField)return e;const{startField:n}=r,s=i.variables.some((e=>e.dimensions.some((e=>e.name===n))))?n:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==s)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter((e=>e.dimensionName===s)),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach((e=>{e.dimensionName===s&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))}));else if(!c){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=s,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new x.Z({variableName:"",dimensionName:s,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new o.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,p.TJ)($e.Z,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new re.Z;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:r}=this;return"unique-value"===e.type&&this._hasRasterFunction(r)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,oe.U0)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:i,ssl:n}=await(0,g.Z)(r(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=i,this.sourceJSON=t,n&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new o.Z("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),r=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||r}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:r}=e,i="resample"===t?.toLowerCase(),n=r?.ResampleType||r?.resampleType;return i&&(7===n||10===n)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:r}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&r.bandCount>=3){const e=(0,oe.YD)(r);!e||3===r.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,oe.Ob)(r,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,oe.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=r):this.symbolizer=new ae.Z({rendererJSON:t,rasterInfo:r}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,ne.J)(e,t,r)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const i=await(0,g.Z)(r(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return i.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,returnImageBitmap:n,signal:s}=e;if(i&&this._canRequestImageElement(t.format)){const i=`${r(this.parsedUrl)}/exportImage`,{data:o}=await(0,g.Z)(i,{responseType:n?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:s});return o instanceof Blob?{imageBitmap:await(0,Y.g)(o,i,s),params:t}:{imageOrCanvasElement:o,params:t}}const a=this._initJobHandler(),l=(0,g.Z)(r(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s}),u=(await Promise.all([l,a]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,ne.y)(u)),!c)throw new o.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const d={signal:s},m="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,ne.J)(u,{useCanvas:!0,...t},d):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},d);return{pixelData:{pixelBlock:await m,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,ie.Tj)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new k.Z;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const r=e.value,{templateRRFunctionNames:i,showNoDataRecords:n,returnDomainValues:s,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),d=[];if(r&&!l&&!c){const e={};e[p]=0,u=[r],l=[new y.Z(this.fullExtent,null,e)]}if(!l)return[];let m,h,f;this._updateResponseFieldNames(l,o),c&&!n&&(l=[]);for(let e=0;e<l.length;e++){if(m=l[e],null!=r){if(h=u[e],f=this.rasterFunction&&a&&a.length>0&&i&&i.length>0&&i.includes(this.rasterFunction.functionName)?a[i.indexOf(this.rasterFunction.functionName)]:r,"nodata"===h.toLowerCase()&&!n)continue;const t="Raster.ItemPixelValue",s="Raster.ServicePixelValue";m.attributes[t]=h,m.attributes[s]=f,this._updateFeatureWithMagDirValues(m,h);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?h:r:f;this.rasterFunction||(l=o?h:r),this._updateFeatureWithRasterAttributeTableValues(m,l)}if(m.sourceLayer=m.layer=this,s&&this._updateFeatureWithDomainValues(m),i&&a&&i.length===a.length)for(let e=0;e<i.length;e++){const t="Raster.ServicePixelValue."+i[e];m.attributes[t]=a[e]}d.push(l[e])}return d}_processMultidimensionalIntersection(e,t,r){const{multidimensionalSubset:i}=this;if(!i)return{isOutSide:!1,timeExtent:t,mosaicRule:r=this._combineMosaicRuleWithTimeExtent(r,t)};if(i){const{isOutside:r,intersection:n}=(0,ie.W2)(i,{geometry:e,timeExtent:t});if(r)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=n?.timeExtent&&(t=n.timeExtent)}if(r=this._combineMosaicRuleWithTimeExtent(r,t),r?.multidimensionalDefinition){const{isOutside:e}=(0,ie.W2)(i,{multidimensionalDefinition:r.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:r}}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==r)return;const{features:i,fields:n}=r,s=n.map((e=>e.name)).find((e=>"value"===e.toLowerCase()));if(!s)return;const o=i.filter((e=>e.attributes[s]===(null!=t?parseInt(t,10):null)));o&&o[0]&&n.forEach((t=>{const r=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[r]=o[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const r=t.split(/,\s*/).map((e=>parseFloat(e))),i=r.map((e=>[e])),n=r.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),s=new ee.Z({height:1,width:1,pixelType:"f32",pixels:i,statistics:n});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:s,extent:new Ue.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[s.pixels[0][0],s.pixels[1][0]]:(0,se.Tg)([s.pixels[0][0],s.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.find((e=>e.code===r));i&&(e.attributes[t.name]=i.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;null!=r&&e.forEach((e=>{if(e?.attributes)for(const i of t){const t=r.get(i)?.name;t&&t!==i&&(e.attributes[i]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const r=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(r)?t.get(r):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:r,rasterFunction:i}=this;i&&e instanceof yt.Z&&null==e.rasterFunction&&(e.rasterFunction=i),r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:r,advancedQueryCapabilities:i,maxRecordCount:n}=e,s=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:r>=10.2&&s,supportsProject:r>=10.3&&s,supportsComputeStatisticsHistograms:r>=10.4&&s,supportsQueryBoundary:r>=10.6&&s,supportsCalculateVolume:r>=10.7&&o,supportsComputePixelLocation:r>=10.7&&t.includes("catalog"),supportsComputeAngles:r>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:n,maxRecordCountFactor:void 0,supportsStatistics:!!i?.supportsStatistics,supportsOrderBy:!!i?.supportsOrderBy,supportsDistinct:!!i?.supportsDistinct,supportsPagination:!!i?.supportsPagination,supportsStandardizedQueriesOnly:!!i?.useStandardizedQueries,supportsPercentileStatistics:!!i?.supportsPercentileStatistics,supportsCentroid:!!i?.supportsReturningGeometryCentroid,supportsDistance:!!i?.supportsQueryWithDistance,supportsExtent:!!i?.supportsReturningQueryExtent,supportsGeometryProperties:!!i?.supportsReturningGeometryProperties,supportsHavingClause:!!i?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!i?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function r(e){return e?.path??""}return(0,i._)([(0,u.Cb)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,i._)([(0,u.Cb)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,i._)([(0,u.Cb)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,i._)([(0,S.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,i._)([(0,u.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,i._)([(0,u.Cb)({type:[p.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,i._)([(0,S.r)("bandIds")],t.prototype,"readBandIds",null),(0,i._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,i._)([(0,S.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,i._)([(0,d.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,i._)([(0,u.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,i._)([(0,d.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,i._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,i._)([(0,S.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,i._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,i._)([(0,u.Cb)()],t.prototype,"rasterInfo",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:[W.Z]})],t.prototype,"fields",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,i._)([(0,u.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,i._)([(0,S.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,i._)([(0,u.Cb)({type:Ue.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,i._)([(0,u.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,i._)([(0,u.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,i._)([(0,u.Cb)({type:String,json:{type:Q.cl.jsonValues,read:Q.cl.read,write:Q.cl.write}})],t.prototype,"interpolation",void 0),(0,i._)([(0,u.Cb)()],t.prototype,"minScale",void 0),(0,i._)([(0,S.r)("service","minScale")],t.prototype,"readMinScale",null),(0,i._)([(0,u.Cb)()],t.prototype,"maxScale",void 0),(0,i._)([(0,S.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,i._)([(0,u.Cb)({type:k.Z})],t.prototype,"mosaicRule",null),(0,i._)([(0,S.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,i._)([(0,d.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,i._)([(0,u.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,i._)([(0,u.Cb)({type:K.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,i._)([(0,u.Cb)({json:{type:p.z8}})],t.prototype,"noData",void 0),(0,i._)([(0,d.c)("noData")],t.prototype,"writeNoData",null),(0,i._)([(0,u.Cb)({type:String,json:{type:Q.kQ.jsonValues,read:Q.kQ.read,write:Q.kQ.write}})],t.prototype,"noDataInterpretation",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,i._)([(0,S.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,i._)([(0,u.Cb)({})],t.prototype,"typeIdField",void 0),(0,i._)([(0,u.Cb)({})],t.prototype,"types",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,i._)([(0,u.Cb)()],t.prototype,"raster",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,i._)([(0,S.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,i._)([(0,u.Cb)()],t.prototype,"viewId",void 0),(0,i._)([(0,u.Cb)({types:f.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:f.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,i._)([(0,S.r)("renderer")],t.prototype,"readRenderer",null),(0,i._)([(0,d.c)("renderer")],t.prototype,"writeRenderer",null),(0,i._)([(0,u.Cb)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,i._)([(0,u.Cb)(C.Oh)],t.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,i._)([(0,u.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,i._)([(0,u.Cb)({type:T.Z})],t.prototype,"renderingRule",null),(0,i._)([(0,u.Cb)({type:T.Z,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,i._)([(0,S.r)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:pe.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,S.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.Cb)({json:{type:Q.sM.jsonValues}})],t.prototype,"pixelType",void 0),(0,i._)([(0,S.r)("pixelType")],t.prototype,"readPixelType",null),(0,i._)([(0,d.c)("pixelType")],t.prototype,"writePixelType",null),(0,i._)([(0,u.Cb)({constructOnly:!0,type:te.Z})],t.prototype,"serviceRasterInfo",void 0),(0,i._)([(0,u.Cb)()],t.prototype,"sourceJSON",void 0),(0,i._)([(0,u.Cb)(C.HQ)],t.prototype,"url",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,S.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,i._)([(0,c.j)("esri.layers.mixins.ArcGISImageService")],t),t};var Pt=r(17287),Ot=r(71612),Zt=r(17017),Mt=r(38009),At=r(16859),Vt=r(34760),Jt=r(72965),Et=r(28294),qt=r(60199),Gt=r(32163),zt=r(12259);let Lt=class extends((0,Ot.h)((0,Et.n)((0,Jt.M)((0,Mt.q)((0,At.I)(jt((0,Vt.Q)((0,Zt.N)((0,Pt.Y)((0,a.R)((0,s.J)(m.Z)))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.Ds)((async(e,t,i)=>{const{save:n,saveAs:s}=await r.e(4697).then(r.bind(r,64697));switch(e){case zt.x.SAVE:return n(this,t);case zt.x.SAVE_AS:return s(this,i,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,r){const i="vector-field"===this.renderer?.type;t[r]=i?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const t=this.rasterFields,r=this.title,i=new Set;let n=!1,s=!1;this.capabilities&&(n=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,s="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;n&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||i.add(e.name)}s&&i.add("raster.magnitude").add("raster.direction");const a=(0,Gt.eZ)({fields:t,title:r},{...e,visibleFieldNames:i});return a?.fieldInfos&&this.rasterInfo?.pixelType.startsWith("f")&&a.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),a}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(zt.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(zt.x.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,qt.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.Z("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,i._)([(0,u.Cb)(C.rn)],Lt.prototype,"legendEnabled",null),(0,i._)([(0,u.Cb)({type:["show","hide"]})],Lt.prototype,"listMode",null),(0,i._)([(0,u.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Lt.prototype,"isReference",void 0),(0,i._)([(0,u.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Lt.prototype,"operationalLayerType",void 0),(0,i._)([(0,d.c)("web-map","operationalLayerType")],Lt.prototype,"writeOperationalLayerType",null),(0,i._)([(0,u.Cb)(C.C_)],Lt.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:n.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Lt.prototype,"popupTemplate",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],Lt.prototype,"defaultPopupTemplate",null),(0,i._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],Lt.prototype,"type",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],Lt.prototype,"_isPreviewLayer",null),Lt=(0,i._)([(0,c.j)("esri.layers.ImageryLayer")],Lt);const Bt=Lt},70272:(e,t,r)=>{r.d(t,{S6:()=>n,nd:()=>s,u_:()=>i});class i{constructor(e=null,t={},r,i){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new i(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function n(e){return!!e.geometry?.coords?.length}class s extends i{}},44876:(e,t,r)=>{r.d(t,{Z:()=>i});class i{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 i;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}}},5428:(e,t,r)=>{r.d(t,{Z:()=>i});class i{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromRect(e){const[t,r,n,s]=e,o=n-t,a=s-r;return new i([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const i=this.lengths[r];for(let r=0;r<i;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=i}}clone(e){return e?(e.set(this.coords),new i(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new i(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}},98732:(e,t,r)=>{r.d(t,{$:()=>re,$g:()=>ie,EI:()=>B,GH:()=>H,IN:()=>R,Iv:()=>Z,J6:()=>A,Jd:()=>v,Nh:()=>Y,RZ:()=>X,Uy:()=>E,XA:()=>z,Yn:()=>L,cn:()=>Q,dd:()=>O,di:()=>U,eG:()=>J,fQ:()=>S,hY:()=>ne,h_:()=>$,lM:()=>W,lz:()=>oe,zj:()=>K});var i=r(20102),n=r(92604),s=r(70586),o=r(60437),a=r(24470),l=r(33955),u=r(70272),p=r(44876),c=r(5428);function d(e,t){return e?t?4:3:t?3:2}const m=n.Z.getLogger("esri.layers.graphics.featureConversionUtils"),h={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},y=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s},f=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+2]},g=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+3]},b=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+2],e[r+3]=t[i+3]};function w(e,t,r,i){if(e){if(r)return t&&i?b:f;if(t&&i)return g}else if(t&&i)return f;return y}function v({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function R({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function _({scale:e,translate:t},r,i){return r*e[i]+t[i]}function S(e,t,r){return e?t?r?D(e):x(e):r?T(e):F(e):null}function F(e){const t=e.coords;return{x:t[0],y:t[1]}}function C(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function x(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function I(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function T(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function N(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function D(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function j(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 P(e,t){return e&&t?j:e?I:t?N:C}function O(e,t,r=P(null!=t.z,null!=t.m)){return r(e,t)}function Z(e,t,r){if(null==e)return null;const i=d(t,r),n=[];for(let t=0;t<e.coords.length;t+=i){const r=[];for(let n=0;n<i;n++)r.push(e.coords[t+n]);n.push(r)}return t?r?{points:n,hasZ:t,hasM:r}:{points:n,hasZ:t}:r?{points:n,hasM:r}:{points:n}}function M(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const i=e.coords;let n=0;for(const e of t.points)for(let t=0;t<r;t++)i[n++]=e[t];return e}function A(e,t,r){if(!e)return null;const i=d(t,r),{coords:n,lengths:s}=e,o=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}o.push(t)}return t?r?{paths:o,hasZ:t,hasM:r}:{paths:o,hasZ:t}:r?{paths:o,hasM:r}:{paths:o}}function V(e,t,r=d(t.hasZ,t.hasM)){const{lengths:i,coords:n}=e;let s=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)n[s++]=t[e];i.push(e.length)}return e}function J(e,t,r){if(!e)return null;const i=d(t,r),{coords:n,lengths:s}=e,o=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}o.push(t)}return t?r?{rings:o,hasZ:t,hasM:r}:{rings:o,hasZ:t}:r?{rings:o,hasM:r}:{rings:o}}function E(e,t,r=t.hasZ,i=t.hasM){return function(e,t,r,i){const n=d(r,i),{lengths:s,coords:o}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<n;e++)o[a++]=t[e];s.push(e.length)}return e}(e,t.rings,r,i)}const q=[],G=[];function z(e,t,r,i,n){q[0]=e;const[s]=L(G,q,t,r,i,n);return le(q),le(G),s}function L(e,t,r,n,s,o){if(le(e),!r){for(const r of t){const t=o?r.attributes[o]:void 0;e.push(new u.u_(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,i,n){const s=P(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?s(new c.Z,r):null;e.push(new u.u_(t,i,null,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryMultipoint":return function(e,t,r,i,n){const s=d(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?M(new c.Z,r,s):null;e.push(new u.u_(t,i,null,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryPolyline":return function(e,t,r,i,n){const s=d(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?V(new c.Z,r,s):null;e.push(new u.u_(t,i,null,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryPolygon":return function(e,t,r,i,n){for(const{geometry:s,centroid:o,attributes:a}of t){const t=null!=s?E(new c.Z,s,r,i):null,l=n?a[n]:void 0;null!=o?e.push(new u.u_(t,a,C(new c.Z,o),l)):e.push(new u.u_(t,a,null,l))}return e}(e,t,n,s,o);default:m.error("convertToFeatureSet:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${r}'`)),le(e)}return e}function B(e,t,r,i){G[0]=e,k(q,G,t,r,i);const n=q[0];return le(q),le(G),n}function H(e,t,r){if(null==e)return null;const n=new c.Z;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,l.wp)(e)?P(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(n,e):(0,l.oU)(e)?E(n,e,t,r):(0,l.l9)(e)?V(n,e,d(t,r)):(0,l.aW)(e)?M(n,e,d(t,r)):void m.error("convertFromGeometry:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${e}'`))}function U(e,t,r,n){const s=e&&("coords"in e?e:e.geometry);if(null==s)return null;switch(t){case"esriGeometryPoint":{let e=F;return r&&n?e=D:r?e=x:n&&(e=T),e(s)}case"esriGeometryMultipoint":return Z(s,r,n);case"esriGeometryPolyline":return A(s,r,n);case"esriGeometryPolygon":return J(s,r,n);default:return m.error("convertToGeometry:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${t}'`)),null}}function k(e,t,r,n,s){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,i){let n=F;r&&i?n=D:r?n=x:i&&(n=T);for(const r of t){const{geometry:t,attributes:i}=r,s=null!=t?n(t):null;e.push({attributes:i,geometry:s})}return e}(e,t,n,s);case"esriGeometryMultipoint":return function(e,t,r,i){for(const{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:null!=n?Z(n,r,i):null});return e}(e,t,n,s);case"esriGeometryPolyline":return function(e,t,r,i){for(const{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:null!=n?A(n,r,i):null});return e}(e,t,n,s);case"esriGeometryPolygon":return function(e,t,r,i){for(const{geometry:n,attributes:s,centroid:o}of t){const t=null!=n?J(n,r,i):null;if(null!=o){const r=F(o);e.push({attributes:s,centroid:r,geometry:t})}else e.push({attributes:s,geometry:t})}return e}(e,t,n,s);default:m.error("convertToFeatureSet:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${r}'`))}return e}function Q(e){const{objectIdFieldName:t,spatialReference:r,transform:i,fields:n,hasM:s,hasZ:o,features:a,geometryType:l,exceededTransferLimit:u,uniqueIdField:p,queryGeometry:c,queryGeometryType:d}=e,m={features:k([],a,l,o,s),fields:n,geometryType:l,objectIdFieldName:t,spatialReference:r,uniqueIdField:p,queryGeometry:U(c,d,!1,!1)};return i&&(m.transform=i),u&&(m.exceededTransferLimit=u),s&&(m.hasM=s),o&&(m.hasZ=o),m}function $(e,t){const r=new p.Z,{hasM:n,hasZ:s,features:o,objectIdFieldName:a,spatialReference:l,geometryType:u,exceededTransferLimit:c,transform:d,fields:h}=e;return h&&(r.fields=h),r.geometryType=u??null,r.objectIdFieldName=a??t??null,r.spatialReference=l??null,r.objectIdFieldName?(o&&L(r.features,o,u,s,n,r.objectIdFieldName),c&&(r.exceededTransferLimit=c),n&&(r.hasM=n),s&&(r.hasZ=s),d&&(r.transform=d),r):(m.error(new i.Z("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function W(e){const{transform:t,features:r,hasM:i,hasZ:n}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ie(e.geometry,e.geometry,i,n,t),null!=e.centroid&&ie(e.centroid,e.centroid,i,n,t);return e.transform=null,e}function X(e,t){const{geometryType:r,features:i,hasM:n,hasZ:s}=t;if(!e)return t;for(let t=0;t<i.length;t++){const o=i[t],a=o.weakClone();a.geometry=new c.Z,Y(a.geometry,o.geometry,n,s,r,e),o.centroid&&(a.centroid=new c.Z,Y(a.centroid,o.centroid,n,s,"esriGeometryPoint",e)),i[t]=a}return t.transform=e,t}function Y(e,t,r,i,n,s,o=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,c=d(r,i),m=d(r&&o,i&&a),y=w(r,i,o,a);if(!p.length)return y(e.coords,u,0,0,v(s,u[0]),R(s,u[1])),ae(e,c,0),e;let f,g,b,_,S=0,F=0,C=F;for(const t of p){if(t<l)continue;let r=0;F=C,b=f=v(s,u[S]),_=g=R(s,u[S+1]),y(e.coords,u,F,S,b,_),r++,S+=c,F+=m;for(let i=1;i<t;i++,S+=c)b=v(s,u[S]),_=R(s,u[S+1]),b===f&&_===g||(y(e.coords,u,F,S,b-f,_-g),F+=m,r++,f=b,g=_);r>=l&&(e.lengths.push(r),C=F)}return le(e.coords,C),e.coords.length?e:null}function K(e,t,r,i,n,s,o=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,c=d(r,i),m=d(r&&o,i&&a),y=w(r,i,o,a);if(!p.length)return y(e.coords,u,0,0,u[0],u[1]),ae(e,c,0),e;let f=0;const g=s*s;for(const t of p){if(t<l){f+=t*c;continue}const r=e.coords.length/m,i=f,n=f+(t-1)*c;y(e.coords,u,e.coords.length,i,u[i],u[i+1]),te(e.coords,u,c,g,y,i,n),y(e.coords,u,e.coords.length,n,u[n],u[n+1]);const s=e.coords.length/m-r;s>=l?e.lengths.push(s):le(e.coords,r*m),f+=t*c}return e.coords.length?e:null}function ee(e,t,r,i){const n=e[t],s=e[t+1],o=e[r],a=e[r+1],l=e[i],u=e[i+1];let p=o,c=a,d=l-p,m=u-c;if(0!==d||0!==m){const e=((n-p)*d+(s-c)*m)/(d*d+m*m);e>1?(p=l,c=u):e>0&&(p+=d*e,c+=m*e)}return d=n-p,m=s-c,d*d+m*m}function te(e,t,r,i,n,s,o){let a,l=i,u=0;for(let e=s+r;e<o;e+=r)a=ee(t,e,s,o),a>l&&(u=e,l=a);l>i&&(u-s>r&&te(e,t,r,i,n,s,u),n(e,t,e.length,u,t[u],t[u+1]),o-u>r&&te(e,t,r,i,n,u,o))}function re(e,t,r,i){if(!t?.coords?.length)return null;const n=d(r,i);let s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=n){const r=e[t],i=e[t+1];s=Math.min(s,r),u=Math.max(u,r),l=Math.min(l,i),p=Math.max(p,i)}}return(0,o.is)(e)?(0,o.bZ)(e,s,l,u,p):(0,a.al)(s,l,u,p,e),e}function ie(e,t,r,i,n){const{coords:o,lengths:a}=t,l=d(r,i);if(!o.length)return e!==t&&ae(e),e;(0,s.O3)(n);const{originPosition:u,scale:p,translate:c}=n,m=ue;m.originPosition=u;const h=m.scale;h[0]=p[0]??1,h[1]=-(p[1]??1),h[2]=p[2]??1,h[3]=p[3]??1;const y=m.translate;if(y[0]=c[0]??0,y[1]=c[1]??0,y[2]=c[2]??0,y[3]=c[3]??0,!a.length){for(let t=0;t<l;++t)e.coords[t]=_(m,o[t],t);return e!==t&&ae(e,l,0),e}let f=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[f+t]=_(m,o[f+t],t);let i=e.coords[f],n=e.coords[f+1];f+=l;for(let t=1;t<r;t++,f+=l){i+=o[f]*h[0],n+=o[f+1]*h[1],e.coords[f]=i,e.coords[f+1]=n;for(let t=2;t<l;++t)e.coords[f+t]=_(m,o[f+t],t)}}return e!==t&&ae(e,o.length,a.length),e}function ne(e,t,r,i,n,s){if(ae(e),e.lengths.push(...t.lengths),r===n&&i===s)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const o=d(r,i),a=w(r,i,n,s),l=t.coords;for(let t=0;t<l.length;t+=o)a(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function se(e,t,r,i){let n=0,s=e[i*t],o=e[i*(t+1)];for(let a=1;a<r;a++){const r=s+e[i*(t+a)],l=o+e[i*(t+a)+1],u=(r-s)*(l+o);s=r,o=l,n+=u}return.5*n}function oe(e,t){const{coords:r,lengths:i}=e;let n=0,s=0;for(let e=0;e<i.length;e++){const o=i[e];s+=se(r,n,o,t),n+=o}return Math.abs(s)}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]}},99514:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(20102),n=r(96674),s=r(92604),o=r(35671),a=r(25031);class l{static fromJSON(e){return new l(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new l(e.fields??[],d(e))}static fromLayerJSON(e){return new l(e.fields??[],d(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=p(t);if(t&&i){const n=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,o.Dl)(e)||(0,o.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,o.Dl)(e)||(0,o.Se)(e)||e.nullable||void 0!==(0,o.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(p(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.Z.getLogger("esri.layers.support.FieldsIndex").error(new i.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),a.pt):c.has(t.type)?a._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function p(e){return(0,o.q6)(e)?.toLowerCase()??""}const c=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function d(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,a.Jv)(e.dateFieldsTimeReference):null,p=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,a.Jv)(n.dateFieldsTimeReference):l??a.pt:null,d=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,a.Jv)(i.timeReference):l:null,m=new Map([[u(n?.creationDateField??""),p],[u(n?.editDateField??""),p],[u(s),d],[u(o),d]]);for(const{name:i,type:n}of e.fields)if(c.has(n))t.set(i,a._4);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,a._4);else{const e=m.get(u(i??""))??l;t.set(i,e)}return t}},90082:(e,t,r)=>{r.d(t,{V:()=>o,g:()=>s});var i=r(20102),n=r(95330);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.k_)(r),s}async function o(e,t,r,s,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,n.k_)(o),a}},60199:(e,t,r)=>{r.d(t,{D:()=>s});var i=r(66677);const n=[];function s(e,t){if((0,i.M8)(e.url??""))return!0;const{wkid:r}=t;for(const t of n){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}n.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),n.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),n.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),n.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),n.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),n.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),n.push([10.61,()=>new Set([102497])]),n.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}])},41818:(e,t,r)=>{r.d(t,{P:()=>o});var i=r(11282),n=r(34599),s=r(14165);async function o(e,t,r){const o=(0,i.en)(e);return(0,n.hH)(o,s.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(11282),n=r(34599),s=r(14165);async function o(e,t,r){const o=(0,i.en)(e);return(0,n.Ev)(o,s.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>l,e:()=>a});var i=r(11282),n=r(34599),s=r(74889),o=r(14165);async function a(e,t,r){const i=await l(e,t,r);return s.Z.fromJSON(i)}async function l(e,t,r){const s=(0,i.en)(e),a={...r},l=o.Z.from(t),{data:u}=await(0,n.JT)(s,l,l.sourceSpatialReference,a);return u}},28694:(e,t,r)=>{r.d(t,{p:()=>n});var i=r(69285);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},98326:(e,t,r)=>{r.d(t,{Z:()=>c});var i,n=r(43697),s=r(96674),o=r(5600),a=r(75215),l=(r(67676),r(80442),r(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=i=class extends s.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:r,tagName:i}=e;if(!t||!r||!i)return null;const n=t.find((e=>e.name===r));return n?function(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const i=r.find((e=>e.name===t));return i?.value||null}({tagName:i,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new i({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,o.Cb)({type:String})],p.prototype,"contentType",void 0),(0,n._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=i=(0,n._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,r)=>{r.d(t,{Z:()=>d});var i,n=r(43697),s=r(96674),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556);let c=i=class extends s.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new i((0,o.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=i=(0,n._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,n=r(43697),s=(r(66577),r(96674)),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556),c=r(10158),d=r(82971);let m=i=class extends s.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,n._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,n._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,n._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=i=(0,n._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,r)=>{r.d(t,{Z:()=>_});var i,n=r(43697),s=r(66577),o=r(92835),a=r(35454),l=r(96674),u=r(22974),p=r(5600),c=r(75215),d=r(52011),m=r(30556),h=r(33955);r(67676),r(80442);let y=i=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=i=(0,n._)([(0,d.j)("esri.rest.support.TopFilter")],y);const f=y;var g,b=r(82971);const w=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),v=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=g=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new g((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,n._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],R.prototype,"distance",void 0),(0,n._)([(0,p.Cb)({types:s.qM,json:{read:h.im,write:!0}})],R.prototype,"geometry",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"objectIds",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),(0,n._)([(0,p.Cb)({type:b.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],R.prototype,"outSpatialReference",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"returnGeometry",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnM",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnZ",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),(0,n._)([(0,m.c)("start"),(0,m.c)("num")],R.prototype,"writeStart",null),(0,n._)([(0,p.Cb)({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],R.prototype,"spatialRelationship",void 0),(0,n._)([(0,p.Cb)({type:o.Z,json:{write:!0}})],R.prototype,"timeExtent",void 0),(0,n._)([(0,p.Cb)({type:f,json:{write:!0}})],R.prototype,"topFilter",void 0),(0,n._)([(0,p.Cb)({type:String,json:{read:v.read,write:{writer:v.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],R.prototype,"units",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"where",void 0),R=g=(0,n._)([(0,d.j)("esri.rest.support.TopFeaturesQuery")],R),R.from=(0,c.se)(R);const _=R}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2664],{65845:(e,t,r)=>{r.d(t,{D:()=>n});var a=r(81153);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>a})},32664:(e,t,r)=>{r.d(t,{save:()=>P,saveAs:()=>N});var a=r(67676),n=(r(20102),r(19238)),i=r(64383),o=r(66677),s=r(52104),l=r(84230),u=(r(33516),r(14661));const c="Feature Service",p="feature-layer-utils",d=`${p}-save`,y=`${p}-save-as`;function f(e){return{isValid:(0,l.fP)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const t=[],r=[];for(const{layer:a,layerJSON:n}of e)a.isTable?r.push(n):t.push(n);return{layers:t,tables:r}}function w(e){return m([e])}async function v(e,t){return/\/\d+\/?$/.test(e.url)?w(t[0]):async function(e,t){if(!t)return m(e);const{layer:{url:r,customParameters:a,apiKey:i}}=e[0];let o=await t.fetchData("json");null!=o?.layers&&null!=o.tables||(o=await async function(e,t,r){e||={},e.layers||=[],e.tables||=[];const{url:a,customParameters:i,apiKey:o}=t,{serviceJSON:l,layersJSON:u}=await(0,s.V)(a,{customParameters:i,apiKey:o}),c=g(e.layers,l.layers,r),p=g(e.tables,l.tables,r);e.layers=c.itemResources,e.tables=p.itemResources;const d=[...c.added,...p.added],y=u?[...u.layers,...u.tables]:[];return await async function(e,t,r,a){const i=t.map((({id:e})=>new n.default({url:r,layerId:e,sourceJSON:a.find((({id:t})=>t===e))})));await Promise.allSettled(i.map((e=>e.load()))),i.forEach((t=>{const{layerId:r,loaded:a,defaultPopupTemplate:n}=t;a&&null!=n&&I(t,{id:r,popupInfo:n.toJSON()},e)}))}(e,d,a,y),e}(o,{url:r??"",customParameters:a,apiKey:i},e.map((e=>e.layer.layerId))));for(const t of e)I(t.layer,t.layerJSON,o);return o}(t,e)}function g(e,t,r){const n=(0,a.e5)(e,t,((e,t)=>e.id===t.id));e=e.filter((e=>!n.removed.some((t=>t.id===e.id))));const i=n.added.map((({id:e})=>({id:e})));return i.forEach((({id:t})=>{e.push({id:t})})),{itemResources:e,added:i.filter((({id:e})=>!r.includes(e)))}}function I(e,t,r){e.isTable?b(r.tables,t):b(r.layers,t)}function b(e,t){const r=e.findIndex((({id:e})=>e===t.id));-1===r?e.push(t):e[r]=t}async function h(e,t){const{url:r,layerId:a,title:n,fullExtent:i,isTable:s}=e,l=(0,o.Qc)(r);t.url="FeatureServer"===l?.serverType?r:`${r}/${a}`,t.title||=n,t.extent=null,s||null==i||(t.extent=await(0,u.$o)(i)),(0,u.ck)(t,u.Kz.METADATA),(0,u.ck)(t,u.Kz.MULTI_LAYER),(0,u.qj)(t,u.Kz.SINGLE_LAYER),s&&(0,u.qj)(t,u.Kz.TABLE)}async function P(e,t){return(0,i.a1)({layer:e,itemType:c,validateLayer:f,createItemData:(e,t)=>v(t,[e]),errorNamePrefix:d},t)}async function N(e,t,r){return(0,i.po)({layer:e,itemType:c,validateLayer:f,createItemData:(e,t)=>Promise.resolve(w(e)),errorNamePrefix:y,newItem:t,setItemProperties:h},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>v,po:()=>g});var a=r(20102),n=r(65845),i=r(48522),o=r(15235),s=r(33516),l=r(14661),u=r(14769);async function c(e){const{layer:t,errorNamePrefix:r,validateLayer:n}=e;await t.load(),function(e,t,r){const n=r(e);if(!n.isValid)throw new a.Z(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}(t,r,n)}function p(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function d(e){const{item:t,itemType:r,errorNamePrefix:n,layer:i,validateItem:o}=e;if((0,u.w)(t),t.type!==r)throw new a.Z(`${n}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:t,layer:i});if(o){const e=o(t);if(!e.isValid)throw new a.Z(`${n}:invalid-parameters`,e.errorMessage,{layer:i})}}function y(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:n}=t;if(!n)throw new a.Z(`${r}:portal-item-not-set`,p(t,"requires the portalItem property to be set"));if(!n.loaded)throw new a.Z(`${r}:portal-item-not-loaded`,p(t,"cannot be saved to a portal item that does not exist or is inaccessible"));d({...e,item:n})}function f(e){const{newItem:t,itemType:r}=e;let a=o.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=i.Z.getDefault(),d({...e,item:a}),a}async function m(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const n=e.write({},t);return function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.Z(e,t,r)));if(t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new a.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),n}function w(e){(0,l.qj)(e,l.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function v(e,t){const{layer:r,createItemData:a,createJSONContext:i}=e;await c(e),y(e);const o=r.portalItem,l=i?i(o):(0,s.Yv)(o),u=await m(r,l,t),p=await a({layer:r,layerJSON:u},o);return w(o),await o.update({data:p}),(0,n.D)(l),o}async function g(e,t){const{layer:r,createItemData:a,createJSONContext:i,setItemProperties:o}=e;await c(e);const l=f(e),u=i?i(l):(0,s.Yv)(l),p=await m(r,u,t),d=await a({layer:r,layerJSON:p},l);return await o(r,l),w(l),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(l,d,t),r.portalItem=l,(0,n.D)(u),l}},52104:(e,t,r)=>{r.d(t,{V:()=>n});var a=r(96187);async function n(e,t){const r=await(0,a.T)(e,t);r.layers=r.layers.filter(i);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const o=await(0,a.T)(e+"/layers",t);return n.layersJSON={layers:o.layers.filter(i),tables:o.tables},n}function i(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},33516:(e,t,r)=>{r.d(t,{M4:()=>l,Yv:()=>o,ht:()=>i,wk:()=>s});var a=r(17452),n=r(48522);function i(e){return{origin:"portal-item",url:(0,a.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}function s(e){return{origin:"web-map",url:(0,a.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function l(e){return{origin:"web-map",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}},96187:(e,t,r)=>{r.d(t,{T:()=>n});var a=r(3172);async function n(e,t){const{data:r}=await(0,a.Z)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}});return r}},14769:(e,t,r)=>{r.d(t,{w:()=>o});var a=r(68773),n=r(20102),i=r(71058);function o(e){if(a.default.apiKey&&(0,i.r)(e.portal.url))throw new n.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);