@arcgis/core 4.24.0-next.20220511 → 4.24.0-next.20220512

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 (231) hide show
  1. package/assets/components/assets/icon/compactness16.json +1 -0
  2. package/assets/components/assets/icon/compactness24.json +1 -0
  3. package/assets/components/assets/icon/compactness32.json +1 -0
  4. package/assets/components/assets/icon/configure16.json +1 -0
  5. package/assets/components/assets/icon/configure24.json +1 -0
  6. package/assets/components/assets/icon/configure32.json +1 -0
  7. package/assets/components/assets/icon/debugScript16.json +1 -0
  8. package/assets/components/assets/icon/debugScript24.json +1 -0
  9. package/assets/components/assets/icon/debugScript32.json +1 -0
  10. package/assets/components/assets/icon/dissolveFeatures16.json +1 -0
  11. package/assets/components/assets/icon/dissolveFeatures24.json +1 -0
  12. package/assets/components/assets/icon/dissolveFeatures32.json +1 -0
  13. package/assets/components/assets/icon/distanceType16.json +1 -0
  14. package/assets/components/assets/icon/distanceType24.json +1 -0
  15. package/assets/components/assets/icon/distanceType32.json +1 -0
  16. package/assets/components/assets/icon/gridDiamond16.json +1 -0
  17. package/assets/components/assets/icon/gridDiamond24.json +1 -0
  18. package/assets/components/assets/icon/gridDiamond32.json +1 -0
  19. package/assets/components/assets/icon/gridHexagon16.json +1 -0
  20. package/assets/components/assets/icon/gridHexagon24.json +1 -0
  21. package/assets/components/assets/icon/gridHexagon32.json +1 -0
  22. package/assets/components/assets/icon/gridTriangle16.json +1 -0
  23. package/assets/components/assets/icon/gridTriangle24.json +1 -0
  24. package/assets/components/assets/icon/gridTriangle32.json +1 -0
  25. package/assets/components/assets/icon/insets16.json +1 -0
  26. package/assets/components/assets/icon/insets24.json +1 -0
  27. package/assets/components/assets/icon/insets32.json +1 -0
  28. package/assets/components/assets/icon/maximumTerritoryDistance16.json +1 -0
  29. package/assets/components/assets/icon/maximumTerritoryDistance24.json +1 -0
  30. package/assets/components/assets/icon/maximumTerritoryDistance32.json +1 -0
  31. package/assets/components/assets/icon/minDistanceBetweenCenters16.json +1 -0
  32. package/assets/components/assets/icon/minDistanceBetweenCenters24.json +1 -0
  33. package/assets/components/assets/icon/minDistanceBetweenCenters32.json +1 -0
  34. package/assets/components/assets/icon/numberOfTerritories16.json +1 -0
  35. package/assets/components/assets/icon/numberOfTerritories24.json +1 -0
  36. package/assets/components/assets/icon/numberOfTerritories32.json +1 -0
  37. package/assets/components/assets/icon/overlapFeatures16.json +1 -0
  38. package/assets/components/assets/icon/overlapFeatures24.json +1 -0
  39. package/assets/components/assets/icon/overlapFeatures32.json +1 -0
  40. package/assets/components/assets/icon/profileVariables16.json +1 -0
  41. package/assets/components/assets/icon/profileVariables24.json +1 -0
  42. package/assets/components/assets/icon/profileVariables32.json +1 -0
  43. package/assets/components/assets/icon/rasterAnalysis16.json +1 -0
  44. package/assets/components/assets/icon/rasterAnalysis24.json +1 -0
  45. package/assets/components/assets/icon/rasterAnalysis32.json +1 -0
  46. package/assets/components/assets/icon/recurrence16.json +1 -0
  47. package/assets/components/assets/icon/recurrence24.json +1 -0
  48. package/assets/components/assets/icon/recurrence32.json +1 -0
  49. package/assets/components/assets/icon/splitFeatures16.json +1 -0
  50. package/assets/components/assets/icon/splitFeatures24.json +1 -0
  51. package/assets/components/assets/icon/splitFeatures32.json +1 -0
  52. package/assets/components/assets/icon/territoryBufferDistance16.json +1 -0
  53. package/assets/components/assets/icon/territoryBufferDistance24.json +1 -0
  54. package/assets/components/assets/icon/territoryBufferDistance32.json +1 -0
  55. package/assets/components/assets/icon/testData16.json +1 -0
  56. package/assets/components/assets/icon/testData24.json +1 -0
  57. package/assets/components/assets/icon/testData32.json +1 -0
  58. package/assets/esri/core/workers/RemoteClient.js +1 -1
  59. package/assets/esri/core/workers/chunks/07eda3e958d29f86b37e.js +1 -0
  60. package/assets/esri/core/workers/chunks/0ecaa28b8bff1d779d66.js +1 -0
  61. package/assets/esri/core/workers/chunks/{adae54f116f311d72d97.js → 1aba8c73c62a64e0658c.js} +1 -1
  62. package/assets/esri/core/workers/chunks/1d109cd048170e2d529a.js +1 -0
  63. package/assets/esri/core/workers/chunks/366e5c1abd1ab6d3e548.js +1 -0
  64. package/assets/esri/core/workers/chunks/3e94e35f44aadbb332ff.js +1 -0
  65. package/assets/esri/core/workers/chunks/46411f32b29a0e783105.js +1 -0
  66. package/assets/esri/core/workers/chunks/4d1c87e3e0a02efcc082.js +1 -0
  67. package/assets/esri/core/workers/chunks/{b089058b64db3912478f.js → 5e46e60fab93ad034d3a.js} +1 -1
  68. package/assets/esri/core/workers/chunks/6281b15009712a5dee3c.js +1 -0
  69. package/assets/esri/core/workers/chunks/66f627d68dbb0fdb725f.js +1 -0
  70. package/assets/esri/core/workers/chunks/672da24bbf86718bf48d.js +1 -0
  71. package/assets/esri/core/workers/chunks/733625d85602127d62cd.js +1 -0
  72. package/assets/esri/core/workers/chunks/{c51c9b5da855f84b9a48.js → 7391422fc51acb96a25d.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{f435dc615fdc8917f6ca.js → 7cf3cff7b28ff007dbad.js} +1 -1
  74. package/assets/esri/core/workers/chunks/7ea06c86adfc827fda08.js +1 -0
  75. package/assets/esri/core/workers/chunks/{a054a52712a118c6d505.js → 82bc24bdc9c6ebaf58c0.js} +1 -1
  76. package/assets/esri/core/workers/chunks/8965ab74e03506e3475e.js +1 -0
  77. package/assets/esri/core/workers/chunks/{5405f478af3563580926.js → 8b497d9c37a8f577a467.js} +1 -1
  78. package/assets/esri/core/workers/chunks/919d0d8b1c2176760973.js +1 -0
  79. package/assets/esri/core/workers/chunks/ab2a0480dc2b608deda3.js +1 -0
  80. package/assets/esri/core/workers/chunks/ab97a35f7a7d5cf1da19.js +2 -0
  81. package/assets/esri/core/workers/chunks/{dcd0653191cd4a1ccaae.js.LICENSE.txt → ab97a35f7a7d5cf1da19.js.LICENSE.txt} +1 -1
  82. package/assets/esri/core/workers/chunks/ae554c88e862a5761f2e.js +1 -0
  83. package/assets/esri/core/workers/chunks/ae5ce55cd1a32525f101.js +1 -0
  84. package/assets/esri/core/workers/chunks/b597c04a4abb98e29d1c.js +1 -0
  85. package/assets/esri/core/workers/chunks/{287c484fd40eee643f3a.js → b78c3e9d31c4a562cdf0.js} +1 -1
  86. package/assets/esri/core/workers/chunks/be4bf1e4cbe2a593f8b3.js +1 -0
  87. package/assets/esri/core/workers/chunks/{b7572b0921b23aef8b9d.js → c40d9caf5189be2c698e.js} +1 -1
  88. package/assets/esri/core/workers/chunks/{b28539c5a6bedb71b038.js → d63f736b3560c577a8a4.js} +1 -1
  89. package/assets/esri/core/workers/chunks/d869dabe937d3b60504e.js +1 -0
  90. package/assets/esri/core/workers/chunks/dd6c9a114ad38cf622ba.js +1 -0
  91. package/assets/esri/core/workers/chunks/e6b0f74226b9394bfa7a.js +1 -0
  92. package/assets/esri/themes/base/widgets/_Editor.scss +3 -2
  93. package/assets/esri/themes/dark/main.css +1 -1
  94. package/assets/esri/themes/light/main.css +1 -1
  95. package/assets/esri/themes/light/view.css +1 -1
  96. package/assets/esri/views/interactive/tooltip/t9n/Tooltip.json +1 -0
  97. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_en.json +1 -0
  98. package/chunks/EdgeShader.glsl.js +3 -4
  99. package/interfaces.d.ts +463 -30
  100. package/layers/FeatureLayer.js +1 -1
  101. package/layers/GeoJSONLayer.js +1 -1
  102. package/layers/OGCFeatureLayer.js +1 -1
  103. package/layers/RouteLayer.js +1 -1
  104. package/layers/SceneLayer.js +1 -1
  105. package/layers/StreamLayer.js +1 -1
  106. package/layers/SubtypeGroupLayer.js +1 -1
  107. package/layers/WFSLayer.js +1 -1
  108. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  109. package/layers/mixins/ArcGISImageService.js +1 -1
  110. package/layers/save/featureLayerUtils.js +1 -1
  111. package/layers/support/AggregateField.d.ts +4 -0
  112. package/layers/support/AggregateField.js +1 -1
  113. package/layers/support/FeatureReductionBinning.d.ts +4 -0
  114. package/layers/support/FeatureReductionBinning.js +1 -1
  115. package/layers/support/OutStatistic.d.ts +4 -0
  116. package/layers/support/Sublayer.js +1 -1
  117. package/layers/support/SubtypeSublayer.js +1 -1
  118. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  119. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  120. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  121. package/package.json +3 -3
  122. package/portal/support/portalItemUtils.js +1 -1
  123. package/renderers/PieChartRenderer.d.ts +4 -0
  124. package/renderers/PieChartRenderer.js +5 -0
  125. package/renderers/Renderer.js +1 -1
  126. package/renderers/support/AuthoringInfo.js +1 -1
  127. package/renderers/support/RasterSymbolizer.js +1 -1
  128. package/renderers/support/clickToleranceUtils.js +1 -1
  129. package/renderers/support/rasterRendererHelper.js +1 -1
  130. package/renderers/support/types.js +1 -1
  131. package/renderers/support/utils.js +1 -1
  132. package/renderers.js +1 -1
  133. package/request.js +1 -1
  134. package/rest/imageService/fetchRasterInfo.js +5 -0
  135. package/rest/imageService/getCatalogItemRasterInfo.js +5 -0
  136. package/rest/print.js +1 -1
  137. package/smartMapping/renderers/color.js +1 -1
  138. package/smartMapping/renderers/dotDensity.js +1 -1
  139. package/smartMapping/renderers/heatmap.js +1 -1
  140. package/smartMapping/renderers/location.js +1 -1
  141. package/smartMapping/renderers/size.js +1 -1
  142. package/smartMapping/renderers/type.js +1 -1
  143. package/support/arcadeUtils.js +1 -1
  144. package/support/revision.js +1 -1
  145. package/symbols/cim/CIMSymbolHelper.js +1 -1
  146. package/symbols/cim/CurveHelper.js +1 -1
  147. package/symbols/cim/ExpandedCIM.js +1 -1
  148. package/symbols/cim/cimAnalyzer.js +1 -1
  149. package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
  150. package/views/2d/engine/brushes.js +1 -1
  151. package/views/2d/engine/vectorTiles/GlyphSource.js +1 -1
  152. package/views/2d/engine/vectorTiles/style/Filter.js +1 -1
  153. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  154. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  155. package/views/2d/engine/webgl/Painter.js +1 -1
  156. package/views/2d/engine/webgl/Utils.js +1 -1
  157. package/views/2d/engine/webgl/brushes/WGLBrushPieChart.js +5 -0
  158. package/views/2d/engine/webgl/brushes/WGLGeometryBrush.js +1 -1
  159. package/views/2d/engine/webgl/brushes/WGLGeometryBrushFill.js +1 -1
  160. package/views/2d/engine/webgl/brushes/WGLGeometryBrushMarker.js +1 -1
  161. package/views/2d/engine/webgl/color.js +1 -1
  162. package/views/2d/engine/webgl/definitions.js +1 -1
  163. package/views/2d/engine/webgl/enums.js +1 -1
  164. package/views/2d/engine/webgl/mesh/templates/WGLBaseFillTemplate.js +1 -1
  165. package/views/2d/engine/webgl/mesh/templates/WGLBaseLineTemplate.js +1 -1
  166. package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
  167. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  168. package/views/2d/engine/webgl/mesh/templates/WGLMarkerTemplate.js +1 -1
  169. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  170. package/views/2d/engine/webgl/techniques/dotDensity/TechniqueDotDensity.js +1 -1
  171. package/views/2d/engine/webgl/techniques/pieChart/TechniquePieChart.js +5 -0
  172. package/views/2d/engine/webgl/techniques/utils.js +1 -1
  173. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  174. package/views/2d/layers/features/schemaUtils.js +1 -1
  175. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  176. package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
  177. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  178. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  179. package/views/3d/analysis/Dimensioning/DimensioningTool.js +1 -1
  180. package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
  181. package/views/3d/environment/SnowyWeather.d.ts +4 -0
  182. package/views/3d/layers/I3SMeshView3D.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  184. package/views/3d/terrain/TerrainRenderer.js +1 -1
  185. package/views/3d/terrain/TerrainSurface.js +1 -1
  186. package/views/3d/terrain/TileRenderer.js +1 -1
  187. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  188. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +5 -5
  189. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  190. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  191. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
  192. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  193. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +37 -31
  194. package/views/draw/DrawOperation.js +1 -1
  195. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  196. package/views/interactive/snapping/SceneSnappingEngine.js +5 -0
  197. package/views/interactive/snapping/SnappingManager.js +1 -1
  198. package/views/interactive/snapping/snappingFactory.js +5 -0
  199. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  200. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  201. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  202. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  203. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  204. package/widgets/Editor/workflowUtils.js +1 -1
  205. package/widgets/Editor.js +1 -1
  206. package/widgets/Popup/PopupViewModel.js +1 -1
  207. package/widgets/Popup/actionUtils.js +1 -1
  208. package/widgets/Sketch/SketchViewModel.js +1 -1
  209. package/assets/esri/core/workers/chunks/0564f1cfa3d17ff1aad3.js +0 -1
  210. package/assets/esri/core/workers/chunks/0806d5d706a864542bfb.js +0 -1
  211. package/assets/esri/core/workers/chunks/52478ee2d2a1354b6900.js +0 -1
  212. package/assets/esri/core/workers/chunks/5759af97f96f24c40105.js +0 -1
  213. package/assets/esri/core/workers/chunks/7bc828fbdd54c0b28aac.js +0 -1
  214. package/assets/esri/core/workers/chunks/875f26ee040f3d75c0db.js +0 -1
  215. package/assets/esri/core/workers/chunks/88384e7cafbfd2348598.js +0 -1
  216. package/assets/esri/core/workers/chunks/89acd5f888d6b8df4aad.js +0 -1
  217. package/assets/esri/core/workers/chunks/9d7533aaeac3b8d145c4.js +0 -1
  218. package/assets/esri/core/workers/chunks/a3bb600bfcb0282622f1.js +0 -1
  219. package/assets/esri/core/workers/chunks/b50ae3dc7e43ff452568.js +0 -1
  220. package/assets/esri/core/workers/chunks/b5b7bcbc19b3430903ee.js +0 -1
  221. package/assets/esri/core/workers/chunks/b758f3c419edc2306784.js +0 -1
  222. package/assets/esri/core/workers/chunks/cf47b605c31063e88357.js +0 -1
  223. package/assets/esri/core/workers/chunks/cfbb332d144e65a4a55d.js +0 -1
  224. package/assets/esri/core/workers/chunks/db937849b2c1af87b481.js +0 -1
  225. package/assets/esri/core/workers/chunks/dc3ed59f450283d97a19.js +0 -1
  226. package/assets/esri/core/workers/chunks/dcd0653191cd4a1ccaae.js +0 -2
  227. package/assets/esri/core/workers/chunks/dfb6a28039e5d5ce6fd4.js +0 -1
  228. package/assets/esri/core/workers/chunks/e4fdd1eaf987977d0a51.js +0 -1
  229. package/assets/esri/core/workers/chunks/f7e0bb11ba3677069c94.js +0 -1
  230. package/assets/esri/core/workers/chunks/f7f3dde4c8f9c687cc1e.js +0 -1
  231. package/assets/esri/core/workers/chunks/fc6beaf9466ea3898549.js +0 -1
@@ -1,2 +0,0 @@
1
- /*! For license information please see dcd0653191cd4a1ccaae.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[280],{77210:(t,e,r)=>{r.d(e,{YY:()=>o});const n="undefined"!=typeof window?window:{},i=(n.document,n.HTMLElement,{$flags$:0,$resourcesUrl$:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,r,n)=>t.addEventListener(e,r,n),rel:(t,e,r,n)=>t.removeEventListener(e,r,n),ce:(t,e)=>new CustomEvent(t,e)}),o=(new WeakMap,t=>i.$resourcesUrl$=t);new WeakMap,new Map},44291:(t,e,r)=>{r.d(e,{v:()=>j});var n=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],i=n.join(","),o="undefined"==typeof Element,a=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,s=!o&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},l=function(t,e,r){var n=Array.prototype.slice.apply(t.querySelectorAll(i));return e&&a.call(t,i)&&n.unshift(t),n.filter(r)},c=function t(e,r,n){for(var o=[],s=Array.from(e);s.length;){var l=s.shift();if("SLOT"===l.tagName){var c=l.assignedElements(),u=t(c.length?c:l.children,!0,n);n.flatten?o.push.apply(o,u):o.push({scope:l,candidates:u})}else{a.call(l,i)&&n.filter(l)&&(r||!e.includes(l))&&o.push(l);var d=l.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(l);if(d){var f=t(!0===d?l.children:d.children,!0,n);n.flatten?o.push.apply(o,f):o.push({scope:l,candidates:f})}else s.unshift.apply(s,l.children)}}return o},u=function(t,e){return t.tabIndex<0&&(e||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},d=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},f=function(t){return"INPUT"===t.tagName},p=function(t){var e=t.getBoundingClientRect(),r=e.width,n=e.height;return 0===r&&0===n},g=function(t,e){return!(e.disabled||function(t){return f(t)&&"hidden"===t.type}(e)||function(t,e){var r=e.displayCheck,n=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var i=a.call(t,"details>summary:first-of-type")?t.parentElement:t;if(a.call(i,"details:not([open]) *"))return!0;var o=s(t).host,l=(null==o?void 0:o.ownerDocument.contains(o))||t.ownerDocument.contains(t);if(r&&"full"!==r){if("non-zero-area"===r)return p(t)}else{if("function"==typeof n){for(var c=t;t;){var u=t.parentElement,d=s(t);if(u&&!u.shadowRoot&&!0===n(u))return p(t);t=t.assignedSlot?t.assignedSlot:u||d===t.ownerDocument?u:d.host}t=c}if(l)return!t.getClientRects().length}return!1}(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var r=0;r<e.children.length;r++){var n=e.children.item(r);if("LEGEND"===n.tagName)return!!a.call(e,"fieldset[disabled] *")||!n.contains(t)}return!0}e=e.parentElement}return!1}(e))},b=function(t,e){return!(function(t){return function(t){return f(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,r=t.form||s(t),n=function(t){return r.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=n(window.CSS.escape(t.name));else try{e=n(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=function(t,e){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===e)return t[r]}(e,t.form);return!i||i===t}(t)}(e)||u(e)<0||!g(t,e))},h=function t(e){var r=[],n=[];return e.forEach((function(e,i){var o=!!e.scope,a=o?e.scope:e,s=u(a,o),l=o?t(e.candidates):a;0===s?o?r.push.apply(r,l):r.push(a):n.push({documentOrder:i,tabIndex:s,item:e,isScope:o,content:l})})),n.sort(d).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(r)},m=function(t,e){var r;return r=(e=e||{}).getShadowRoot?c([t],e.includeContainer,{filter:b.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot}):l(t,e.includeContainer,b.bind(null,e)),h(r)},v=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==a.call(t,i)&&b(e,t)},y=n.concat("iframe").join(","),w=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==a.call(t,y)&&g(e,t)};function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?k(Object(r),!0).forEach((function(e){A(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function A(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var O,T=(O=[],{activateTrap:function(t){if(O.length>0){var e=O[O.length-1];e!==t&&e.pause()}var r=O.indexOf(t);-1===r||O.splice(r,1),O.push(t)},deactivateTrap:function(t){var e=O.indexOf(t);-1!==e&&O.splice(e,1),O.length>0&&O[O.length-1].unpause()}}),S=function(t){return setTimeout(t,0)},E=function(t,e){var r=-1;return t.every((function(t,n){return!e(t)||(r=n,!1)})),r},I=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return"function"==typeof t?t.apply(void 0,r):t},C=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},j=function(t,e){var r,n=(null==e?void 0:e.document)||document,i=x({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(t,e,r){return t&&void 0!==t[e]?t[e]:i[r||e]},s=function(t){return o.containerGroups.findIndex((function(e){var r=e.container,n=e.tabbableNodes;return r.contains(t)||n.find((function(e){return e===t}))}))},u=function(t){var e=i[t];if("function"==typeof e){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];e=e.apply(void 0,o)}if(!e){if(void 0===e||!1===e)return e;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var s=e;if("string"==typeof e&&!(s=n.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return s},d=function(){var t=u("initialFocus");if(!1===t)return!1;if(void 0===t)if(s(n.activeElement)>=0)t=n.activeElement;else{var e=o.tabbableGroups[0];t=e&&e.firstTabbableNode||u("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},f=function(){if(o.containerGroups=o.containers.map((function(t){var e,r,n=m(t,i.tabbableOptions),o=(e=t,(r=(r=i.tabbableOptions)||{}).getShadowRoot?c([e],r.includeContainer,{filter:g.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):l(e,r.includeContainer,g.bind(null,r)));return{container:t,tabbableNodes:n,focusableNodes:o,firstTabbableNode:n.length>0?n[0]:null,lastTabbableNode:n.length>0?n[n.length-1]:null,nextTabbableNode:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=o.findIndex((function(e){return e===t}));if(!(r<0))return e?o.slice(r+1).find((function(t){return v(t,i.tabbableOptions)})):o.slice(0,r).reverse().find((function(t){return v(t,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},p=function t(e){!1!==e&&e!==n.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(d()))},b=function(t){var e=u("setReturnFocus",t);return e||!1!==e&&t},h=function(t){var e=C(t);s(e)>=0||(I(i.clickOutsideDeactivates,t)?r.deactivate({returnFocus:i.returnFocusOnDeactivate&&!w(e,i.tabbableOptions)}):I(i.allowOutsideClick,t)||t.preventDefault())},y=function(t){var e=C(t),r=s(e)>=0;r||e instanceof Document?r&&(o.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),p(o.mostRecentlyFocusedNode||d()))},k=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==I(i.escapeDeactivates,t))return t.preventDefault(),void r.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=C(t);f();var r=null;if(o.tabbableGroups.length>0){var n=s(e),a=n>=0?o.containerGroups[n]:void 0;if(n<0)r=t.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var l=E(o.tabbableGroups,(function(t){var r=t.firstTabbableNode;return e===r}));if(l<0&&(a.container===e||w(e,i.tabbableOptions)&&!v(e,i.tabbableOptions)&&!a.nextTabbableNode(e,!1))&&(l=n),l>=0){var c=0===l?o.tabbableGroups.length-1:l-1;r=o.tabbableGroups[c].lastTabbableNode}}else{var d=E(o.tabbableGroups,(function(t){var r=t.lastTabbableNode;return e===r}));if(d<0&&(a.container===e||w(e,i.tabbableOptions)&&!v(e,i.tabbableOptions)&&!a.nextTabbableNode(e))&&(d=n),d>=0){var g=d===o.tabbableGroups.length-1?0:d+1;r=o.tabbableGroups[g].firstTabbableNode}}}else r=u("fallbackFocus");r&&(t.preventDefault(),p(r))}(t)},A=function(t){var e=C(t);s(e)>=0||I(i.clickOutsideDeactivates,t)||I(i.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},O=function(){if(o.active)return T.activateTrap(r),o.delayInitialFocusTimer=i.delayInitialFocus?S((function(){p(d())})):p(d()),n.addEventListener("focusin",y,!0),n.addEventListener("mousedown",h,{capture:!0,passive:!1}),n.addEventListener("touchstart",h,{capture:!0,passive:!1}),n.addEventListener("click",A,{capture:!0,passive:!1}),n.addEventListener("keydown",k,{capture:!0,passive:!1}),r},j=function(){if(o.active)return n.removeEventListener("focusin",y,!0),n.removeEventListener("mousedown",h,!0),n.removeEventListener("touchstart",h,!0),n.removeEventListener("click",A,!0),n.removeEventListener("keydown",k,!0),r};return(r={get active(){return o.active},get paused(){return o.paused},activate:function(t){if(o.active)return this;var e=a(t,"onActivate"),r=a(t,"onPostActivate"),i=a(t,"checkCanFocusTrap");i||f(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=n.activeElement,e&&e();var s=function(){i&&f(),O(),r&&r()};return i?(i(o.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(t){if(!o.active)return this;var e=x({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},t);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,j(),o.active=!1,o.paused=!1,T.deactivateTrap(r);var n=a(e,"onDeactivate"),s=a(e,"onPostDeactivate"),l=a(e,"checkCanReturnFocus"),c=a(e,"returnFocus","returnFocusOnDeactivate");n&&n();var u=function(){S((function(){c&&p(b(o.nodeFocusedBeforeActivation)),s&&s()}))};return c&&l?(l(b(o.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,j()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,f(),O(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return o.containers=e.map((function(t){return"string"==typeof t?n.querySelector(t):t})),o.active&&f(),this}}).updateContainerElements(t),r}},8728:(t,e,r)=>{r.d(e,{Z:()=>dt});var n,i,o=Function.prototype,a=Object.prototype,s=o.toString,l=a.hasOwnProperty,c=s.call(Object),u=a.toString,d=(n=Object.getPrototypeOf,i=Object,function(t){return n(i(t))}),f={exports:{}},p={},g={exports:{}},b={};function h(){return{"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1}}var m=/javascript\s*\:/gim;b.whiteList={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1},b.getDefaultWhiteList=h,b.onAttr=function(t,e,r){},b.onIgnoreAttr=function(t,e,r){},b.safeAttrValue=function(t,e){return m.test(e)?"":e};var v=function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},y=function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")},w=b,k=function(t,e){";"!==(t=y(t))[t.length-1]&&(t+=";");var r=t.length,n=!1,i=0,o=0,a="";function s(){if(!n){var r=v(t.slice(i,o)),s=r.indexOf(":");if(-1!==s){var l=v(r.slice(0,s)),c=v(r.slice(s+1));if(l){var u=e(i,a.length,l,c,r);u&&(a+=u+"; ")}}}i=o+1}for(;o<r;o++){var l=t[o];if("/"===l&&"*"===t[o+1]){var c=t.indexOf("*/",o+2);if(-1===c)break;i=(o=c+1)+1,n=!1}else"("===l?n=!0:")"===l?n=!1:";"===l?n||s():"\n"===l&&s()}return v(a)};function x(t){return null==t}function A(t){(t=function(t){var e={};for(var r in t)e[r]=t[r];return e}(t||{})).whiteList=t.whiteList||w.whiteList,t.onAttr=t.onAttr||w.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||w.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||w.safeAttrValue,this.options=t}A.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,r=e.whiteList,n=e.onAttr,i=e.onIgnoreAttr,o=e.safeAttrValue;return k(t,(function(t,e,a,s,l){var c=r[a],u=!1;if(!0===c?u=c:"function"==typeof c?u=c(s):c instanceof RegExp&&(u=c.test(s)),!0!==u&&(u=!1),s=o(a,s)){var d,f={position:e,sourcePosition:t,source:l,isWhite:u};return u?x(d=n(a,s,f))?a+":"+s:d:x(d=i(a,s,f))?void 0:d}}))};var O=A;!function(t,e){var r=b,n=O;for(var i in(e=t.exports=function(t,e){return new n(e).process(t)}).FilterCSS=n,r)e[i]=r[i]}(g,g.exports);var T={indexOf:function(t,e){var r,n;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1},forEach:function(t,e,r){var n,i;if(Array.prototype.forEach)return t.forEach(e,r);for(n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}},S=g.exports.FilterCSS,E=g.exports.getDefaultWhiteList,I=T;var C=new S;function j(t){return t.replace(F,"&lt;").replace(L,"&gt;")}var F=/</g,L=/>/g,N=/"/g,D=/&quot;/g,z=/&#([a-zA-Z0-9]*);?/gim,R=/&colon;?/gim,P=/&newline;?/gim,V=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,G=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,B=/u\s*r\s*l\s*\(.*/gi;function W(t){return t.replace(N,"&quot;")}function q(t){return t.replace(D,'"')}function $(t){return t.replace(z,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function U(t){return t.replace(R,":").replace(P," ")}function H(t){for(var e="",r=0,n=t.length;r<n;r++)e+=t.charCodeAt(r)<32?" ":t.charAt(r);return I.trim(e)}function M(t){return H(t=U(t=$(t=q(t))))}function _(t){return j(t=W(t))}p.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},p.getDefaultWhiteList=function(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}},p.onTag=function(t,e,r){},p.onIgnoreTag=function(t,e,r){},p.onTagAttr=function(t,e,r){},p.onIgnoreTagAttr=function(t,e,r){},p.safeAttrValue=function(t,e,r,n){if(r=M(r),"href"===e||"src"===e){if("#"===(r=I.trim(r)))return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"data:image/"!==r.substr(0,11)&&"ftp://"!==r.substr(0,6)&&"./"!==r.substr(0,2)&&"../"!==r.substr(0,3)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===e){if(V.lastIndex=0,V.test(r))return""}else if("style"===e){if(G.lastIndex=0,G.test(r))return"";if(B.lastIndex=0,B.test(r)&&(V.lastIndex=0,V.test(r)))return"";!1!==n&&(r=(n=n||C).process(r))}return _(r)},p.escapeHtml=j,p.escapeQuote=W,p.unescapeQuote=q,p.escapeHtmlEntities=$,p.escapeDangerHtml5Entities=U,p.clearNonPrintableCharacter=H,p.friendlyAttrValue=M,p.escapeAttrValue=_,p.onIgnoreTagStripAll=function(){return""},p.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var r=!Array.isArray(t),n=[],i=!1;return{onIgnoreTag:function(o,a,s){if(function(e){return!!r||-1!==I.indexOf(t,e)}(o)){if(s.isClosing){var l="[/removed]",c=s.position+l.length;return n.push([!1!==i?i:s.position,c]),i=!1,l}return i||(i=s.position),"[removed]"}return e(o,a,s)},remove:function(t){var e="",r=0;return I.forEach(n,(function(n){e+=t.slice(r,n[0]),r=n[1]})),e+=t.slice(r)}}},p.stripCommentTag=function(t){for(var e="",r=0;r<t.length;){var n=t.indexOf("\x3c!--",r);if(-1===n){e+=t.slice(r);break}e+=t.slice(r,n);var i=t.indexOf("--\x3e",n);if(-1===i)break;r=i+3}return e},p.stripBlankChar=function(t){var e=t.split("");return(e=e.filter((function(t){var e=t.charCodeAt(0);return!(127===e||e<=31&&10!==e&&13!==e)}))).join("")},p.cssFilter=C,p.getDefaultCSSWhiteList=E;var X={},Y=T;function Z(t){var e=Y.spaceIndex(t);if(-1===e)var r=t.slice(1,-1);else r=t.slice(1,e+1);return"/"===(r=Y.trim(r).toLowerCase()).slice(0,1)&&(r=r.slice(1)),"/"===r.slice(-1)&&(r=r.slice(0,-1)),r}function K(t){return"</"===t.slice(0,2)}var Q=/[^a-zA-Z0-9_:\.\-]/gim;function J(t,e){for(;e<t.length;e++){var r=t[e];if(" "!==r)return"="===r?e:-1}}function tt(t,e){for(;e>0;e--){var r=t[e];if(" "!==r)return"="===r?e:-1}}function et(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}X.parseTag=function(t,e,r){var n="",i=0,o=!1,a=!1,s=0,l=t.length,c="",u="";t:for(s=0;s<l;s++){var d=t.charAt(s);if(!1===o){if("<"===d){o=s;continue}}else if(!1===a){if("<"===d){n+=r(t.slice(i,s)),o=s,i=s;continue}if(">"===d){n+=r(t.slice(i,o)),c=Z(u=t.slice(o,s+1)),n+=e(o,n.length,c,u,K(u)),i=s+1,o=!1;continue}if('"'===d||"'"===d)for(var f=1,p=t.charAt(s-f);""===p.trim()||"="===p;){if("="===p){a=d;continue t}p=t.charAt(s-++f)}}else if(d===a){a=!1;continue}}return i<t.length&&(n+=r(t.substr(i))),n},X.parseAttr=function(t,e){var r=0,n=[],i=!1,o=t.length;function a(t,r){if(!((t=(t=Y.trim(t)).replace(Q,"").toLowerCase()).length<1)){var i=e(t,r||"");i&&n.push(i)}}for(var s=0;s<o;s++){var l,c=t.charAt(s);if(!1!==i||"="!==c)if(!1===i||s!==r||'"'!==c&&"'"!==c||"="!==t.charAt(s-1)){if(/\s|\n|\t/.test(c)){if(t=t.replace(/\s|\n|\t/g," "),!1===i){if(-1===(l=J(t,s))){a(Y.trim(t.slice(r,s))),i=!1,r=s+1;continue}s=l-1;continue}if(-1===(l=tt(t,s-1))){a(i,et(Y.trim(t.slice(r,s)))),i=!1,r=s+1;continue}}}else{if(-1===(l=t.indexOf(c,s+1)))break;a(i,Y.trim(t.slice(r+1,l))),i=!1,r=(s=l)+1}else i=t.slice(r,s),r=s+1}return r<t.length&&(!1===i?a(t.slice(r)):a(i,et(Y.trim(t.slice(r))))),Y.trim(n.join(" "))};var rt=g.exports.FilterCSS,nt=p,it=X,ot=it.parseTag,at=it.parseAttr,st=T;function lt(t){return null==t}function ct(t){(t=function(t){var e={};for(var r in t)e[r]=t[r];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=nt.onIgnoreTagStripAll),t.whiteList=t.whiteList||t.allowList||nt.whiteList,t.onTag=t.onTag||nt.onTag,t.onTagAttr=t.onTagAttr||nt.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||nt.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||nt.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||nt.safeAttrValue,t.escapeHtml=t.escapeHtml||nt.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new rt(t.css))}ct.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,r=e.whiteList,n=e.onTag,i=e.onIgnoreTag,o=e.onTagAttr,a=e.onIgnoreTagAttr,s=e.safeAttrValue,l=e.escapeHtml,c=this.cssFilter;e.stripBlankChar&&(t=nt.stripBlankChar(t)),e.allowCommentTag||(t=nt.stripCommentTag(t));var u=!1;e.stripIgnoreTagBody&&(u=nt.StripTagBody(e.stripIgnoreTagBody,i),i=u.onIgnoreTag);var d=ot(t,(function(t,e,u,d,f){var p,g={sourcePosition:t,position:e,isClosing:f,isWhite:r.hasOwnProperty(u)};if(!lt(p=n(u,d,g)))return p;if(g.isWhite){if(g.isClosing)return"</"+u+">";var b=function(t){var e=st.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var r="/"===(t=st.trim(t.slice(e+1,-1)))[t.length-1];return r&&(t=st.trim(t.slice(0,-1))),{html:t,closing:r}}(d),h=r[u],m=at(b.html,(function(t,e){var r,n=-1!==st.indexOf(h,t);return lt(r=o(u,t,e,n))?n?(e=s(u,t,e,c))?t+'="'+e+'"':t:lt(r=a(u,t,e,n))?void 0:r:r}));return d="<"+u,m&&(d+=" "+m),b.closing&&(d+=" /"),d+">"}return lt(p=i(u,d,g))?l(d):p}),l);return u&&(d=u.remove(d)),d};var ut=ct;!function(t,e){var r=p,n=X,i=ut;function o(t,e){return new i(e).process(t)}for(var a in(e=t.exports=o).filterXSS=o,e.FilterXSS=i,r)e[a]=r[a];for(var a in n)e[a]=n[a];"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)}(f,f.exports);var dt=function(){function t(t,e){var r,n=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],audio:["autoplay","controls","loop","muted","preload"],b:[],br:[],dd:["style"],div:["align","style"],dl:["style"],dt:["style"],em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],hr:[],i:[],img:["alt","border","height","src","style","width"],li:[],ol:[],p:["style"],source:["media","src","type"],span:["style"],strong:[],sub:["style"],sup:["style"],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],u:[],ul:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(t,e,r,i){return"a"===t&&"href"===e||("img"===t||"source"===t)&&"src"===e?n.sanitizeUrl(r):f.exports.safeAttrValue(t,e,r,i)}},t&&!e?r=t:t&&e?(r=Object.create(this.arcgisFilterOptions),Object.keys(t).forEach((function(e){"whiteList"===e?r.whiteList=n._extendObjectOfArrays([n.arcgisWhiteList,t.whiteList||{}]):r[e]=t[e]}))):(r=Object.create(this.arcgisFilterOptions)).whiteList=this.arcgisWhiteList,this.xssFilterOptions=r,this._xssFilter=new f.exports.FilterXSS(r)}return t.prototype.sanitize=function(t,e){switch(void 0===e&&(e={}),typeof t){case"number":return isNaN(t)||!isFinite(t)?null:t;case"boolean":return t;case"string":return this._xssFilter.process(t);case"object":return this._iterateOverObject(t,e);default:if(e.allowUndefined&&void 0===t)return;return null}},t.prototype.sanitizeUrl=function(t,e){var r=(null!=e?e:{}).isProtocolRequired,n=void 0===r||r,i=this._trim(t.substring(0,t.indexOf(":"))),o="/"===t,a=/^#/.test(t),s=i&&this.allowedProtocols.indexOf(i.toLowerCase())>-1;return o||a||s?f.exports.escapeAttrValue(t):i||n?"":f.exports.escapeAttrValue("https://".concat(t))},t.prototype.sanitizeHTMLAttribute=function(t,e,r,n){return"function"==typeof this.xssFilterOptions.safeAttrValue?this.xssFilterOptions.safeAttrValue(t,e,r,n):f.exports.safeAttrValue(t,e,r,n)},t.prototype.validate=function(t,e){void 0===e&&(e={});var r=this.sanitize(t,e);return{isValid:t===r,sanitized:r}},t.prototype._extendObjectOfArrays=function(t){var e={};return t.forEach((function(t){Object.keys(t).forEach((function(r){Array.isArray(t[r])&&Array.isArray(e[r])?e[r]=e[r].concat(t[r]):e[r]=t[r]}))})),e},t.prototype._iterateOverObject=function(t,e){var r=this;void 0===e&&(e={});try{var n=!1,i=void 0;if(Array.isArray(t))i=t.reduce((function(t,i){var o=r.validate(i,e);return o.isValid?t.concat([i]):(n=!0,t.concat([o.sanitized]))}),[]);else{if(!function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=u.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=d(t);if(null===e)return!0;var r=l.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==c}(t)){if(e.allowUndefined&&void 0===t)return;return null}i=Object.keys(t).reduce((function(i,o){var a=t[o],s=r.validate(a,e);return s.isValid?i[o]=a:(n=!0,i[o]=s.sanitized),i}),{})}return n?i:t}catch(t){return null}},t.prototype._trim=function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},t}()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3301,4889],{78346:(e,t,r)=>{r.d(t,{bA:()=>Z});var i=r(20102),s=r(80442),n=r(95330),a=r(80903),o=r(25045),l=r(40330),c=r(92604),u=r(70586),h=r(94362),f=r(99880),d=r(68773),m=(r(2587),r(17452));const p={};function g(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=p.baseUrl),p.packages?.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(t.packages,e)})),t}var y=r(41213);class x{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class b{constructor(){this._dispatcher=new x,this._workerPostMessage({type:h.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,y.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,y.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,h.QM)(e);if(t&&t.type===h.Cs.OPEN){const{modulePath:e,jobId:r}=t;let i=await o.default.loadWorker(e);i||(i=await import(e));const s=o.default.connect(i);this._workerPostMessage({type:h.Cs.OPENED,jobId:r,data:s})}}}var w=r(70171),I=r(17202);const v=c.Z.getLogger("esri.core.workers"),{HANDSHAKE:_}=h.Cs;let C,S;const k="Failed to create Worker. Fallback to execute module in main thread";async function R(e){return new Promise((t=>{function r(s){const n=(0,h.QM)(s);n&&n.type===_&&(e.removeEventListener("message",r),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",i),v.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new b).addEventListener("message",r),e.addEventListener("error",i)}e.addEventListener("message",r),e.addEventListener("error",i)}))}let T=0;const P=c.Z.getLogger("esri.core.workers"),{ABORT:M,INVOKE:E,OPEN:D,OPENED:O,RESPONSE:F}=h.Cs;class N{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),P.error(e)}))}static async create(e){const t=await async function(){if(!(0,s.Z)("esri-workers")||((0,s.Z)("mozilla"),0))return R(new b);if(!C&&!S)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=d.Z.default){const t={...d.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(d.Z));e.assetsPath=(0,m.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,w.Kd)(),e.has={"esri-csp-restrictions":(0,s.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,s.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,s.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,s.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,s.Z)("esri-atomics"),"esri-shared-array-buffer":(0,s.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,m.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,m.hF)(e.workers.workerPath):e.workers.workerPath=(0,m.hF)((0,f.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=d.Z.workers.loaderConfig,r=g({baseUrl:t?.baseUrl,locale:(0,w.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),i={version:l.i8,buildDate:I.r,revision:I.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:i})}()}'`);C=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){S=e||{}}let e;if(C)try{e=new Worker(C,{name:"esri-worker-"+T++})}catch(t){v.warn(k,S),e=new b}else v.warn(k,S),e=new b;return R(e)}();return new N(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,i=(0,h.jt)();return new Promise(((t,s)=>{const a={resolve:t,reject:s,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(i),this._post({type:M,jobId:i})}))};this._outJobs.set(i,a),this._post({type:D,jobId:i,modulePath:e})}))}_onMessage(e){const t=(0,h.QM)(e);if(t)switch(t.type){case O:this._onOpenedMessage(t);break;case F:this._onResponseMessage(t);break;case M:this._onAbortMessage(t);break;case E:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);i&&(i.controller&&i.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:s}=e,a=s?new AbortController:null,o=this._inJobs,c=l.Nv[t];let u;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);u=c.call(null,i,{signal:a?a.signal:null})}catch(e){return void this._post({type:F,jobId:r,error:(0,h.AB)(e)})}(0,n.y8)(u)?(o.set(r,{controller:a,promise:u}),u.then((e=>{o.has(r)&&(o.delete(r),this._post({type:F,jobId:r},e))}),(e=>{o.has(r)&&(o.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:F,jobId:r,error:(0,h.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:F,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,u.hw)(i.abortHandle),i.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:s}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,u.hw)(n.abortHandle),r?n.reject(i.Z.fromJSON(JSON.parse(r))):n.resolve(s))}_post(e,t,r){return(0,h.oi)(this.worker,e,t,r)}}let B=(0,s.Z)("esri-workers-debug")?1:(0,s.Z)("host-browser")?navigator.hardwareConcurrency-1:0;B||(B=(0,s.Z)("safari")&&(0,s.Z)("mac")||(0,s.Z)("trident")?7:2);let z=0;const L=[];async function A(e,t){const r=new a.Z;return await r.open(e,t),r}async function Z(e,t={}){if("string"!=typeof e)throw new i.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.Z)("host-webworker")&&!(0,s.Z)("esri-workers")&&(r="local"),"local"===r){let r=await o.default.loadWorker(e);r||(r=await import(e)),(0,n.k_)(t.signal);const i=t.client||r;return A([o.default.connect(r)],{...t,client:i})}if(await async function(){if(J)return J;H=new AbortController;const e=[];for(let t=0;t<B;t++){const r=N.create(t).then((e=>(L[t]=e,e)));e.push(r)}return J=Promise.all(e),J}(),(0,n.k_)(t.signal),"dedicated"===r){const r=z++%B;return A([await L[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,B);if(r<B){const i=new Array(r);for(let s=0;s<r;++s){const r=z++%B;i[s]=L[r].open(e,t)}return A(i,t)}}return A(L.map((r=>r.open(e,t))),t)}let H,J=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var i=r(94443),s=r(3172),n=r(20102),a=r(70586);async function o(e){if((0,a.pC)(c.fetchBundleAsset))return c.fetchBundleAsset(e);const t=await(0,s.default)(e,{responseType:"text"});return JSON.parse(t.data)}class l{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let i;i="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=i,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const a=t.exec(r);if(!a)throw new n.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",c=a[2],u=(0,i.Su)(s),h=`${l}${c}.json`,f=u?`${l}${c}_${u}.json`:h;let d;try{d=await o(e(f))}catch(t){if(f===h)throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{d=await o(e(h))}catch(e){throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return d}(this.getAssetUrl,this.matcher,e,t)}}const c={};var u,h=r(99880);(0,i.tz)((u={pattern:"esri/",location:h.V},new l(u)))},940:(e,t,r)=>{r.d(t,{n:()=>c});var i=r(92604),s=r(78286),n=r(19153),a=r(90344),o=r(18848);const l=i.Z.getLogger("esri.intl");function c(e,t,r={}){const{format:i={}}=r;return(0,n.gx)(e,(e=>function(e,t,r){let i,n;const a=e.indexOf(":");if(-1===a?i=e.trim():(i=e.slice(0,a).trim(),n=e.slice(a+1).trim()),!i)return"";const o=(0,s.hS)(i,t);if(null==o)return"";const l=r[n]||r[i];return l?u(o,l):n?h(o,n):f(o)}(e,t,i)))}function u(e,t){switch(t.type){case"date":return(0,a.p6)(e,t.intlOptions);case"number":return(0,o.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),f(e)}}function h(e,t){switch(t.toLowerCase()){case"dateformat":return(0,a.p6)(e);case"numberformat":return(0,o.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,a.p6)(e):/^numberformat/i.test(t)?(0,o.uf)(e):f(e)}}function f(e){switch(typeof e){case"string":return e;case"number":return(0,o.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,a.p6)(e):""}}},69971:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Xe});var i=r(43697),s=r(51773),n=r(30030),a=r(20102),o=r(70586),l=r(16453),c=r(95330),u=r(17445),h=r(5600),f=(r(67676),r(80442),r(75215)),d=r(36030),m=r(71715),p=r(52011),g=r(87085),y=r(71612),x=r(17017),b=(r(66577),r(3172)),w=r(92604),I=r(44422),v=r(8744),_=r(66677),C=r(21506),S=r(35956),k=r(88281),R=r(11145);function T(e,t,r){const i=t.shift();if(0===r.length){const e=[];r.push({sliceId:-1,multidimensionalDefinition:e})}const s=r.length;for(let t=0;t<s;t++){const t=r.shift().multidimensionalDefinition;i.values.forEach((s=>{r.push({sliceId:-1,multidimensionalDefinition:[...t,{variableName:e,dimensionName:i.name,values:[s]}]})}))}t.length&&T(e,t,r)}function P(e,t){const r=[];let i=0;return(t?e.variables.filter((e=>e.name.toLowerCase()===t.toLowerCase())):[...e.variables].sort(((e,t)=>e.name>t.name?1:-1))).forEach((e=>{const t=[],s=[...e.dimensions].sort(((e,t)=>e.name>t.name?-1:1));T(e.name,s,t),t.forEach((e=>{r.push({...e,sliceId:i++})}))})),r}function M(e){return!((0,o.Wi)(e)||!e.length)&&e.some((e=>{if(null==e.values)return!0;const t=e.values.length;return 0===t||t>1||!e.isSlice&&Array.isArray(e.values[0])}))}var E=r(80676),D=r(67058),O=r(91219),F=r(23808),N=r(6570),B=r(82971);const z=w.Z.getLogger("esri.layers.mixins.ImageryTileMixin"),L=e=>{let t=class extends e{constructor(){super(...arguments),this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.fullExtent=null,this.interpolation="nearest",this.multidimensionalDefinition=null,this.raster=null,this.rasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.tileInfo=null,this.symbolizer=null}set url(e){this._set("url",(0,_.Nm)(e,z))}set renderer(e){this._set("renderer",e),this.updateRenderer()}async convertVectorFieldData(e,t){if((0,o.Wi)(e))return null;const r=this._rasterJobHandler.instance,i=this.rasterInfo.dataType;return r?r.convertVectorFieldData({pixelBlock:e,dataType:i},t):(0,E.KC)(e,i)}async createStreamlinesMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createStreamlinesMesh(e,t):(0,F.z_)(e.rendererSettings,e.flowData,(0,o.pC)(t.signal)?t.signal:(new AbortController).signal)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.rasterInfo;if((0,o.Wi)(t))return e;let r=e.multidimensionalDefinition||this.multidimensionalDefinition;!(0,o.Wi)(r)&&r.length||(r=this._getDefaultSlice());const i=e.timeExtent||this.timeExtent;if((0,o.pC)(r)&&(0,o.pC)(i)&&((0,o.pC)(i.start)||(0,o.pC)(i.end))){r=r.map((e=>e.clone()));const s=t.variables.find((({name:e})=>e===r[0].variableName))?.dimensions?.find((({name:e})=>"StdTime"===e)),n=r.find((({dimensionName:e})=>"StdTime"===e));if(!s||!n)return{...e,multidimensionalDefinition:null};const{start:a,end:l}=i,c=(0,o.Wi)(a)?null:a.getTime(),u=(0,o.Wi)(l)?null:l.getTime(),h=c??u,f=u??c;if((0,o.pC)(s.values)){const e=s.values.filter((e=>{if(Array.isArray(e)){if(h===f)return e[0]<=h&&e[1]>=h;const t=e[0]<=h&&e[1]>h||e[0]<f&&e[1]>=f,r=e[0]>=h&&e[1]<=f||e[0]<h&&e[1]>f;return t||r}return h===f?e===h:e>=h&&e<=f}));if(e.length){const t=e.sort(((e,t)=>h===f?(e[0]??e)-(t[0]??t):Math.abs((e[1]??e)-f)-Math.abs((t[1]??t)-f)))[0];n.values=[t]}else r=null}else if(s.hasRegularIntervals&&s.extent){const[e,t]=s.extent;h>t||f<e?r=null:n.values=h===f?[h]:[Math.max(e,h),Math.min(t,f)]}}return{...e,multidimensionalDefinition:r}}async updateRenderer(){if(!this.loaded)return;if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(this.renderer))return;const e=this._rasterJobHandler.instance;e&&(this.symbolizer.rendererJSON=(0,D.ol)(this.renderer.toJSON()),this.symbolizer.bind(),await e.updateSymbolizer(this.symbolizer),this._cachedRendererJson=this.renderer.toJSON())}async applyRenderer(e,t){const r=e&&e.pixelBlock;if(!((0,o.pC)(r)&&r.pixels&&r.pixels.length>0))return null;let i;await this.updateRenderer();const s=this._rasterJobHandler.instance,{bandIds:n}=this;return i=s?await s.symbolize({...e,simpleStretchParams:t,bandIds:n}):this.symbolizer.symbolize({...e,simpleStretchParams:t,bandIds:n}),i}getTileUrl(e,t,r){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${r}`:""}getCompatibleTileInfo(e,t,r=!1){if(!this.loaded||(0,o.Wi)(t))return null;if(r&&e.equals(this.spatialReference))return this.tileInfo;const i=(0,v.C5)(e);return R.Z.create({size:256,spatialReference:e,origin:i?{x:i.origin[0],y:i.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent&&this._compatibleFullExtent.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,r,i={}){if(i.requestAsImageElement){const s=this.getTileUrl(e,t,r);return(0,b.default)(s,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:i.signal}).then((e=>e.data))}if((0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(i=this.normalizeRasterFetchOptions(i),(0,o.Wi)(i.multidimensionalDefinition))){const s=i.tileInfo||this.rasterInfo.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,t,r,s),pixelBlock:null}}return await this._initJobHandler(),"raster-shaded-relief"===this.renderer.type&&(i={...i,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,r,i)}async fetchPixels(e,t,r,i={}){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(i=this.normalizeRasterFetchOptions(i),(0,o.Wi)(i.multidimensionalDefinition))?{extent:e,pixelBlock:null}:(await this._initJobHandler(),this.raster.fetchPixels(e,t,r,i))}async identify(e,t={}){return!(0,o.pC)(this.rasterInfo.multidimensionalInfo)||this.rasterInfo.hasMultidimensionalTranspose&&(M(t.multidimensionalDefinition)||t.transposedVariableName||t.timeExtent)||(t=this.normalizeRasterFetchOptions(t),!(0,o.Wi)(t.multidimensionalDefinition))?this.raster.identify(e,t):{location:e,value:null}}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){const e=this.rasterInfo.multidimensionalInfo;if((0,o.Wi)(e)||"standard-time"!==this.rasterInfo.dataType)return!1;const t=this.multidimensionalDefinition[0]?.variableName;return e.variables.some((e=>e.name===t&&e.dimensions.some((e=>"StdTime"===e.name))))}getStandardTimeValue(e){return new Date(24*(e-25569)*3600*1e3).toString()}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=this._getDefaultSlice()),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new k.Z;return this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e,this.raster.rasterJobHandler=e,this.renderer&&this.updateRenderer()})).catch((()=>null)),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this.raster.rasterJobHandler=null}_configDefaultInterpolation(){if(null==this.interpolation){const e=(0,D.In)(this.rasterInfo,this.raster.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",e)}}_getDefaultSlice(){const{multidimensionalInfo:e}=this.raster.rasterInfo;if((0,o.Wi)(e))return null;const t=e.variables[0];return t.dimensions.map((e=>new S.Z({variableName:t.name,dimensionName:e.name,values:[e.values?.[0]??e.extent[0]],isSlice:!0})))}_configDefaultRenderer(){const e=this.raster.rasterInfo;this.bandIds||(this.bandIds=(0,D.YD)(e)),this.renderer||(this.renderer=(0,D.Ob)(e,{bandIds:this.bandIds,variableName:(0,o.pC)(this.multidimensionalDefinition)?this.multidimensionalDefinition[0]?.variableName:null})),this.symbolizer?(this.symbolizer.rendererJSON=(0,D.ol)(this.renderer.toJSON()),this.symbolizer.rasterInfo=e):this.symbolizer=new O.Z({rendererJSON:this.renderer.toJSON(),rasterInfo:e});const t=this.symbolizer.bind();t.success||z.warn("imagery-tile-mixin",t.error||"The given renderer is not supported by the layer.")}};return(0,i._)([(0,h.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"_compatibleFullExtent",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"bandIds",void 0),(0,i._)([(0,h.Cb)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,i._)([(0,h.Cb)({type:N.Z,json:{read:!1}}),(0,I.B)("rasterInfo.extent")],t.prototype,"fullExtent",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"interpolation",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"ioConfig",void 0),(0,i._)([(0,h.Cb)({type:[S.Z]})],t.prototype,"multidimensionalDefinition",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"raster",void 0),(0,i._)([(0,h.Cb)({readOnly:!0}),(0,I.B)("raster.rasterInfo")],t.prototype,"rasterInfo",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"sourceJSON",void 0),(0,i._)([(0,h.Cb)({type:B.Z,json:{read:!1}}),(0,I.B)("rasterInfo.spatialReference")],t.prototype,"spatialReference",void 0),(0,i._)([(0,h.Cb)({type:R.Z,json:{read:!1}}),(0,I.B)("rasterInfo.storageInfo.tileInfo")],t.prototype,"tileInfo",void 0),(0,i._)([(0,h.Cb)(C.HQ)],t.prototype,"url",null),(0,i._)([(0,h.Cb)({types:n.dr})],t.prototype,"renderer",null),(0,i._)([(0,h.Cb)()],t.prototype,"symbolizer",void 0),t=(0,i._)([(0,p.j)("esri.layers.ImageryTileMixin")],t),t};var A=r(38009),Z=r(16859),H=r(34760),J=r(72965),W=r(28294),j=r(1231),q=r(69608),U=r(48526),G=r(36679),$=r(96674),V=r(609),Y=r(73506),X=r(13473);const K=new Map,Q=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const r=e+"/"+t,i=this._cachedBlocks;if(i.has(r)){const e=i.get(r);return e.refCount--,e.refCount<=0&&(i.delete(r),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const r=e+"/"+t,i=this._cachedBlocks;if(i.has(r)){const e=i.get(r);return e.ts=Date.now(),e.refCount++,i.delete(r),i.set(r,e),e.block}return null}putBlock(e,t,r,i=null){const s=this._cachedBlocks,n=e+"/"+t;if(s.has(n)){const e=s.get(n);e.ts=Date.now(),e.refCount++}else s.set(n,{block:r,ts:Date.now(),refCount:1,controller:i});this._trim(),this._updateTimer()}deleteBlock(e,t){const r=this._cachedBlocks,i=e+"/"+t;r.has(i)&&r.delete(i)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval((()=>{const t=Array.from(e),r=Date.now();for(let i=0;i<t.length&&t[i][1].ts<=r-this._duration;i++)e.delete(t[i][0]);0===e.size&&this._clearTimer()}),this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let r=0;r<t.length-this._size;r++)e.delete(t[r][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function ee(e,t){return null==t?e:`${e}?sliceId=${t}`}function te(e,t,r){if(!K.has(e))return null==t?Q.getBlock(e,r):null;const i=K.get(e);if(null==i[t]){for(let e=0;e<i.length;e++)if(i[e]&&i[e].cache.has(r)){const t=i[e].cache.get(r);return t.refCount++,t.block}return Q.getBlock(e,r)}const s=i[t].cache;if(s.has(r)){const e=s.get(r);return e.refCount++,e.block}for(let e=0;e<i.length;e++)if(e!==t&&i[e]&&i[e]&&i[e].cache.has(r)){const t=i[e].cache.get(r);return t.refCount++,s.set(r,t),t.block}return null}function re(e,t,r,i,s=null){if(!K.has(e))return void(null==t&&Q.putBlock(e,r,i,s));const n=K.get(e);if(null==n[t])return void Q.putBlock(e,r,i,s);const a={refCount:1,block:i,isResolved:!1,isRejected:!1,controller:s};i.then((()=>a.isResolved=!0)).catch((()=>a.isRejected=!0)),n[t].cache.set(r,a)}var ie=r(75993),se=r(55914);let ne=class extends((0,V.v)($.wq)){constructor(){super(...arguments),this.rasterJobHandler=null,this.datasetName=null,this.datasetFormat=null,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}async init(){const e=(0,Y.zD)();this.addResolvingPromise(e),await this.when()}normalizeCtorArgs(e){return e&&e.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:R.Z.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,Y.ut)(e.spatialReference);return(0,o.pC)(t)&&e.extent.width>=t/2}set url(e){this._set("url",(0,_.Nm)(e,w.Z.getLogger(this.declaredClass)))}async open(e){throw new a.Z("BaseRaster:open-not-implemented","open() is not implemented")}async fetchTile(e,t,r,i={}){const s=i.tileInfo||this.rasterInfo.storageInfo.tileInfo,n=this.getTileExtentFromTileInfo(e,t,r,s);return this.fetchPixels(n,s.size[0],s.size[1],i)}async identify(e,t={}){const{multidimensionalDefinition:r,timeExtent:i}=t,{hasMultidimensionalTranspose:s,multidimensionalInfo:n}=this.rasterInfo;let{transposedVariableName:a}=t;const l=(0,o.pC)(n)&&s&&(null!=i||M(r));l&&!a&&(a=(0,o.pC)(r)&&r.length>0?r[0].variableName:n.variables[0].name,t={...t,transposedVariableName:a}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=this.rasterInfo,{datumTransformation:h}=t;let f=(0,Y.nF)(e,c,h);if(!u.intersects(f))return{location:f,value:null};if((0,o.pC)(this.rasterInfo.transform)){const e=this.rasterInfo.transform.inverseTransform(f);if(!this.rasterInfo.nativeExtent.intersects(e))return{location:e,value:null};f=e}let d=0;const m=a&&(0,o.pC)(n)&&this.rasterInfo.hasMultidimensionalTranspose;if(!m)if(t.srcResolution)d=(0,Y.kr)(t.srcResolution,this.rasterInfo,this.ioConfig.sampling).pyramidLevel;else if(d=await this.computeBestPyramidLevelForLocation(e,t),null==d)return{location:f,value:null};const p=this.identifyPixelLocation(f,d,null,m);if(null===p)return{location:f,value:null};const{row:g,col:y,rowOffset:x,colOffset:b,blockWidth:w}=p,I=a??(0,o.Wg)(t.sliceId),v=ee(this.url,I),_=`${d}/${g}/${y}`;let C=te(v,null,_);(0,o.Wi)(C)&&(C=this.fetchRawTile(d,g,y,t),re(v,null,_,C));const S=await C;if((0,o.Wi)(S)||!S.pixels?.length)return{location:f,value:null};const k=x*w+b;return this._processIdentifyResult(S,{srcLocation:f,position:k,pyramidLevel:d,useTransposedTile:m,requestSomeSlices:l,identifyOptions:t})}async fetchPixels(e,t,r,i={}){if(e=(0,Y.kZ)(e),(i=this._getRequestOptionsWithSliceId(i)).requestRawData)return this._fetchPixels(e,t,r,i);const s=(0,Y.ut)(e.spatialReference),n=(0,Y.Hq)(e);if((0,o.Wi)(s)||0===n||1===n&&this._isGlobalWrappableSource)return this._fetchPixels(e,t,r,i);if(n>=3)return{extent:e,pixelBlock:null};const a=[],{xmin:l,xmax:c}=e,u=Math.round(s/(c-l)*t),h=u-Math.round((s/2-l)/(c-l)*t);let f=0;const d=[];for(let o=0;o<=n;o++){const m=new N.Z({xmin:0===o?l:-s/2,xmax:o===n?c-s*o:s/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),p=0===o?u-h:o===n?t-f:u;f+=p,d.push(p);const g=i.disableWrapAround&&o>0?null:this._fetchPixels(m,p,r,i);a.push(g)}const m=(await Promise.all(a)).map((e=>e?.pixelBlock));let p=null;const g={width:t,height:r};return p=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:g,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:d},i)).pixelBlock:(0,se.us)(m,g,{blockWidths:d}),{extent:e,srcExtent:(0,Y.tB)(e,this.rasterInfo.spatialReference,i.datumTransformation),pixelBlock:p}}async fetchRawPixels(e,t,r,i={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const s=await this._fetchRawTiles(e,t,r,i),{nativeExtent:n,nativePixelSize:a,storageInfo:l}=this.rasterInfo,c=2**e,u=a.x*c,h=a.y*c,f=new N.Z({xmin:n.xmin+u*t.x,xmax:n.xmin+u*(t.x+r.width-1),ymin:n.ymax-h*(t.y+r.height-1),ymax:n.ymax-h*t.y,spatialReference:n.spatialReference});if(!s)return{extent:f,srcExtent:f,pixelBlock:null};const{pixelBlocks:d,mosaicSize:m}=s;if(1===d.length&&(0,o.pC)(d[0])&&d[0].width===r.width&&d[0].height===r.height)return{extent:f,srcExtent:f,pixelBlock:s.pixelBlocks[0]};const p=e>0?l.pyramidBlockWidth:l.blockWidth,g=e>0?l.pyramidBlockHeight:l.blockHeight,y={x:t.x%p,y:t.y%g};let x;return x=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:m,destDimension:r,clipOffset:y,clipSize:r,coefs:null,sampleSpacing:null,interpolation:i.interpolation,alignmentInfo:null,blockWidths:null},i)).pixelBlock:(0,se.us)(d,m,{clipOffset:y,clipSize:r}),{extent:f,srcExtent:f,pixelBlock:x}}fetchRawTile(e,t,r,i){throw new a.Z("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,Y.tB)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,ie.J)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,r){const{customFetchParameters:i}=this.ioConfig,{range:s,query:n,headers:a}=t;r=r??t.retryCount??this.ioConfig.retryCount;const o=s?{Range:`bytes=${s.from}-${s.to}`}:null;try{return await(0,b.default)(e,{...t,query:{...n,...i},headers:{...a,...o}})}catch(i){if(r>0)return r--,this.request(e,t,r);throw i}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;if((0,o.Wi)(t))return null;if((0,o.Wi)(e)||0===e.length)return null;let r=0;const i=e[0].variableName;for(let s=0;s<t.variables.length;s++){const n=t.variables[s],a=n.dimensions;if(n.name!==i){r+=a.map((e=>this._getDimensionValuesCount(e))).reduce(((e,t)=>e+t));break}const o=a.map((e=>this._getDimensionValuesCount(e))),l=a.length;for(let t=0;t<l;t++){const i=e.find((e=>e.dimensionName===a[t].name));if(null==i)return null;const s=Array.isArray(i.values[0])?i.values[0][0]:i.values[0],n=this._getIndexFromDimensions(s,a[t]);if(-1===n)return null;o.shift(),r+=t===l-1?n:n*o.reduce(((e,t)=>e+t))}}return r}getTileExtentFromTileInfo(e,t,r,i){const s=i.lodAt(e);return this.getTileExtent({x:s.resolution,y:s.resolution},t,r,i.origin,i.spatialReference,i.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:r,pixelSize:i}=this.rasterInfo;if(!e.tileInfo){const s=[],n=e.maximumPyramidLevel||0;let a=Math.max(i.x,i.y),o=1/.0254*96*a;for(let e=0;e<=n;e++)s.push({level:n-e,resolution:a,scale:o}),a*=2,o*=2;const l=new X.Z({x:r.xmin,y:r.ymax,spatialReference:t});e.tileInfo=new R.Z({origin:l,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:s}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,r=512,i){const{width:s,height:n,nativeExtent:a,pixelSize:o,spatialReference:l}=e,c=new X.Z({x:a.xmin,y:a.ymax,spatialReference:l});null==i&&(i=Math.max(0,Math.round(Math.log(Math.max(s,n))/Math.LN2-8)));const u=this.computeBlockBoundary(a,512,512,{x:a.xmin,y:a.ymax},[o],i);e.storageInfo=new G.Z({blockWidth:t,blockHeight:r,pyramidBlockWidth:t,pyramidBlockHeight:r,origin:c,firstPyramidLevel:1,maximumPyramidLevel:i,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,r,i,s,n=0,a=2){if(1===s.length&&n>0){s=[...s];let{x:e,y:t}=s[0];for(let r=0;r<n;r++)e*=a,t*=a,s.push({x:e,y:t})}const o=[],{x:l,y:c}=i;for(let i=0;i<s.length;i++){const{x:n,y:a}=s[i];o.push({minCol:Math.floor((e.xmin-l+.1*n)/t/n),maxCol:Math.floor((e.xmax-l-.1*n)/t/n),minRow:Math.floor((c-e.ymax+.1*a)/r/a),maxRow:Math.floor((c-e.ymin-.1*a)/r/a)})}return o}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:r,pyramidScalingFactor:i}=this.rasterInfo.storageInfo;if(0===e)return t;if((0,o.pC)(r)&&r.length)return r[e-1];const s=i**e;return{x:t.x*s,y:t.y*s}}identifyPixelLocation(e,t,r,i){const{spatialReference:s,nativeExtent:n,storageInfo:a}=this.rasterInfo,{maximumPyramidLevel:l,origin:c,transposeInfo:u}=a,h=i&&(0,o.pC)(u)?u.tileSize[0]:a.blockWidth,f=i&&(0,o.pC)(u)?u.tileSize[1]:a.blockHeight,d=(0,Y.nF)(e,s,r);if(!n.intersects(d))return null;if(t<0||t>l)return null;const m=this.getPyramidPixelSize(t),{x:p,y:g}=m,y=(c.y-d.y)/g/f,x=(d.x-c.x)/p/h,b=Math.min(f-1,Math.floor((y-Math.floor(y))*f)),w=Math.min(h-1,Math.floor((x-Math.floor(x))*h));return{pyramidLevel:t,row:Math.floor(y),col:Math.floor(x),rowOffset:b,colOffset:w,blockWidth:h,srcLocation:d}}getTileExtent(e,t,r,i,s,n){const[a,o]=n,l=i.x+r*a*e.x,c=l+a*e.x,u=i.y-t*o*e.y,h=u-o*e.y;return new N.Z({xmin:l,xmax:c,ymin:h,ymax:u,spatialReference:s})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,r){const i=this.rasterInfo.storageInfo.blockBoundary[e];return!i||i.maxRow<t||i.maxCol<r||i.minRow>t||i.minCol>r}async _fetchPixels(e,t,r,i={}){let s=(0,Y.Hq)(e);if(s>=2)return{extent:e,pixelBlock:null};const n=this._getSourceDataInfo(e,t,r,i),{pyramidLevel:a,pyramidResolution:l,srcResolution:c,srcExtent:u,srcWidth:h,srcHeight:f}=n;if(0===h||0===f)return{extent:e,srcExtent:u,pixelBlock:null};const d=(0,o.Wg)(this.rasterInfo.transform),m="gcs-shift"===d?.type,p=(0,o.pC)((0,Y.ut)(e.spatialReference));!m&&p||(s=(0,Y.Hq)(n.srcExtent,m));const g=this.rasterInfo.storageInfo,y={x:Math.floor((u.xmin-g.origin.x)/l.x+.1),y:Math.floor((g.origin.y-u.ymax)/l.y+.1)},x=await this._fetchRawTiles(a,y,{width:h,height:f,wrapCount:s},i);if(!x)return{extent:e,srcExtent:u,pixelBlock:null};const b=a>0?g.pyramidBlockWidth:g.blockWidth,w=a>0?g.pyramidBlockHeight:g.blockHeight,I=b===h&&w===f&&y.x%b==0&&y.y%w==0,v=new X.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/r,spatialReference:e.spatialReference}),_=!e.spatialReference.equals(this.rasterInfo.spatialReference),{datumTransformation:C}=i;if(!_&&I&&1===x.pixelBlocks.length&&b===t&&w===r&&c.x===v.x&&c.y===v.y)return{extent:e,srcExtent:u,pixelBlock:x.pixelBlocks[0]};const S=p&&(0,o.pC)((0,Y.ut)(u.spatialReference)),k=i.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");k&&!this.rasterJobHandler&&await(0,Y.zD)();const R=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:v.toJSON(),datumTransformation:C,rasterTransform:d,hasWrapAround:s>0||S,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:k},i):(0,Y.Qp)({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:v,datumTransformation:C,rasterTransform:d,hasWrapAround:s>0||S,isAdaptive:!1,includeGCSGrid:k});let T;const P=!i.requestRawData,M={rows:R.spacing[0],cols:R.spacing[1]},D=(0,o.Wg)(this._getRasterTileAlignmentInfo(a,x.extent.xmin)),{pixelBlocks:O,mosaicSize:F,isPartiallyFilled:N}=x;let B=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:O,srcMosaicSize:F,destDimension:P?{width:t,height:r}:null,coefs:P?R.coefficients:null,sampleSpacing:P?M:null,projectDirections:k,gcsGrid:k?R.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:i.interpolation,alignmentInfo:D,blockWidths:null},i);({pixelBlock:T,localNorthDirections:B}=e)}else{const e=(0,se.us)(O,F,{alignmentInfo:D});T=P?(0,se.Uk)(e,{width:t,height:r},R.coefficients,M,i.interpolation):e,k&&R.gcsGrid&&(B=(0,se.Qh)({width:t,height:r},R.gcsGrid),T=(0,E.xQ)(T,this.rasterInfo.dataType,B))}return i.requestRawData||k?{srcExtent:u,pixelBlock:T,transformGrid:R,localNorthDirections:B,extent:e,isPartiallyFilled:N}:{srcExtent:u,extent:e,pixelBlock:T}}async _fetchRawTiles(e,t,r,i){const{origin:s,blockBoundary:n}=this.rasterInfo.storageInfo,{blockWidth:a,blockHeight:l}=this.getBlockWidthHeight(e);let{x:c,y:u}=t,{width:h,height:f,wrapCount:d}=r;const m=this._getRasterTileAlignmentInfo(e,0);i.buffer&&(c-=i.buffer.cols,u-=i.buffer.rows,h+=2*i.buffer.cols,f+=2*i.buffer.rows);let p=0,g=0,y=0;d&&(0,o.pC)(m)&&(({worldColumnCountFromOrigin:g,originColumnOffset:y,rightPadding:p}=m),g*m.blockWidth-p>=c+h&&(p=0));const x=Math.floor(c/a),b=Math.floor(u/l),w=Math.floor((c+h+p-1)/a),I=Math.floor((u+f+p-1)/l),v=n[e];if(!v)return null;const{minRow:_,minCol:C,maxCol:S,maxRow:k}=v;if(0===d&&(I<_||w<C||b>k||x>S))return null;const R=new Array;let T=!1;const P=null==this.ioConfig.allowPartialFill?i.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=b;t<=I;t++)for(let r=x;r<=w;r++){let s=r;if(!i.disableWrapAround&&d&&(0,o.pC)(m)&&g<=r&&(s=r-g-y),t>=_&&s>=C&&k>=t&&S>=s){const r=this._fetchRawTile(e,t,s,i);P?R.push(new Promise((e=>{r.then((t=>e(t))).catch((()=>{T=!0,e(null)}))}))):R.push(r)}else R.push(null)}if(0===R.length)return null;const M=await Promise.all(R),E={height:(I-b+1)*l,width:(w-x+1)*a},{spatialReference:D}=this.rasterInfo,O=this.getPyramidPixelSize(e),{x:F,y:B}=O;return{extent:new N.Z({xmin:s.x+x*a*F,xmax:s.x+(w+1)*a*F,ymin:s.y-(I+1)*l*B,ymax:s.y-b*l*B,spatialReference:D}),pixelBlocks:M,mosaicSize:E,isPartiallyFilled:T}}_fetchRawTile(e,t,r,i){const s=this.rasterInfo.storageInfo.blockBoundary[e];if(!s)return Promise.resolve(null);const{minRow:n,minCol:a,maxCol:l,maxRow:u}=s;if(t<n||r<a||t>u||r>l)return Promise.resolve(null);const h=ee(this.url,i.sliceId),f=`${e}/${t}/${r}`;let d=te(h,i.registryId,f);if((0,o.Wi)(d)){const s=new AbortController;d=this.fetchRawTile(e,t,r,{...i,signal:s.signal}),re(h,i.registryId,f,d,s),d.catch((()=>function(e,t,r){if(!K.has(e))return void(null==t&&Q.deleteBlock(e,r));const i=K.get(e);null!=i[t]?i[t].cache.delete(r):Q.deleteBlock(e,r)}(h,i.registryId,f)))}return i.signal&&(0,c.fu)(i,(()=>{!function(e,t,r){if(!K.has(e))return null==t?Q.decreaseRefCount(e,r):0;const i=K.get(e);if(null==i[t])return Q.decreaseRefCount(e,r);const s=i[t].cache;if(s.has(r)){const e=s.get(r);if(e.refCount--,0===e.refCount){s.delete(r);for(let e=0;e<i.length;e++)i[e]&&i[e].cache.has(r)&&i[e].cache.delete(r);e.controller&&e.controller.abort()}e.refCount}}(h,i.registryId,f)})),d}_computeMagDirValues(e){const{bandCount:t,dataType:r}=this.rasterInfo;if((2!==t||"vector-magdir"!==r)&&"vector-uv"!==r||2!==e?.length||!e[0]?.length)return null;const i=e[0].length;if("vector-magdir"===r){const t=e[1].map((e=>(e+360)%360));return[e[0],t]}const[s,n]=e,a=[],o=[];for(let e=0;e<i;e++){const[t,r]=(0,E.Tg)([s[e],n[e]]);a.push(t),o.push(r)}return[a,o]}_getIndexFromDimensions(e,t){const{extent:r,interval:i,unit:s,values:n}=t;if(n?.length)return Array.isArray(n[0])?n.findIndex((t=>t[0]<=e&&t[1]>=e)):n.indexOf(e);if(e>r[1])return-1;const a=r[0];let o=-1;if("ISO8601"===s){switch(t.intervalUnit?.toLowerCase()||"seconds"){case"seconds":o=Math.round((e-a)/1e3/i);break;case"minutes":o=Math.round((e-a)/6e4/i);break;case"hours":o=Math.round((e-a)/36e5/i);break;case"days":o=Math.round((e-a)/864e5/i);break;case"years":o=Math.round((new Date(e).getUTCFullYear()-new Date(a).getUTCFullYear())/i);break;case"decades":o=Math.round((new Date(e).getUTCFullYear()-new Date(a).getUTCFullYear())/10/i)}return o}return Math.round((e-a)/i)}_getDimensionValuesCount(e){const{extent:t,interval:r,unit:i,values:s}=e;let n=s?.length||0;if(n)return n;const a=t[0];if(0===n&&"ISO8601"===i){switch(e.intervalUnit?.toLowerCase()||"seconds"){case"seconds":n=Math.round((t[1]-t[0])/1e3/r);break;case"minutes":n=Math.round((t[1]-t[0])/6e4/r);break;case"hours":n=Math.round((t[1]-t[0])/36e5/r);break;case"days":n=Math.round((t[1]-t[0])/864e5/r);break;case"years":n=Math.round((new Date(t[1]).getUTCFullYear()-new Date(a).getUTCFullYear())/r);break;case"decades":n=Math.round((new Date(t[1]).getUTCFullYear()-new Date(a).getUTCFullYear())/10/r)}return n}return Math.round((t[1]-t[0])/r)}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlighmentInfo&&(this._rasterTileAlighmentInfo=(0,Y.P_)(this.rasterInfo)),(0,o.Wi)(this._rasterTileAlighmentInfo.pyramidsInfo)?null:{startX:t,halfWorldWidth:this._rasterTileAlighmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlighmentInfo.hasGCSSShiftTransform,...this._rasterTileAlighmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,r,i={}){const s={datumTransformation:i.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0};i.srcResolution&&(s.srcResolution=i.srcResolution,this._updateSourceDataInfo(e,s));const n=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:a,srcHeight:o,pyramidLevel:l}=s,c=a/t,u=o/r,h=l<n&&c*u>=16;if(h||l===n&&(c>8||u>8)||0===a||0===o){const a=new X.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/r,spatialReference:e.spatialReference});let o=(0,Y.VO)(a,this.rasterInfo.spatialReference,e,s.datumTransformation);const f=!o||i.srcResolution&&o.x+o.y<i.srcResolution.x+i.srcResolution.y;if(h&&i.srcResolution&&f){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(n-l+3>=e){const t=2**e;o={x:i.srcResolution.x*t,y:i.srcResolution.y*t}}}o&&(s.srcResolution=o,this._updateSourceDataInfo(e,s))}return(s.srcWidth/t>8||s.srcHeight/r>8)&&(s.srcWidth=0,s.srcHeight=0),s}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const r=this.rasterInfo.spatialReference,{srcResolution:i,datumTransformation:s}=t,{pyramidLevel:n,pyramidResolution:a,excessiveReading:l}=(0,Y.kr)(i,this.rasterInfo,this.ioConfig.sampling);if(l)return;let c=t.srcExtent||(0,Y.tB)(e,r,s);if(null==c)return;const u=(0,o.Wg)(this.rasterInfo.transform);u&&(c=u.inverseTransform(c)),t.srcExtent=c;const h=Math.ceil((c.xmax-c.xmin)/a.x-.1),f=Math.ceil((c.ymax-c.ymin)/a.y-.1);t.pyramidLevel=n,t.pyramidResolution=a,t.srcWidth=h,t.srcHeight=f}_getRequestOptionsWithSliceId(e){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:r,position:i,pyramidLevel:s,useTransposedTile:n}=t,a=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[i])return{location:r,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if((0,o.Wi)(l)||!n){const t=e.pixels.map((e=>e[i])),n={location:r,value:t,pyramidLevel:s},a=this._computeMagDirValues(t.map((e=>[e])));return a?.length&&(n.magdirValue=a.map((e=>e[0]))),n}let c=e.pixels.map((e=>Array.prototype.slice.call(e,i*a,i*a+a))),u=this._computeMagDirValues(c);const{requestSomeSlices:h,identifyOptions:f}=t;let d=P(l,f.transposedVariableName);if(h){const e=function(e,t,r){let i=e;if(t&&(t=[...t].sort(((e,t)=>e.dimensionName<t.dimensionName?-1:1))).forEach((({dimensionName:e,values:t,isSlice:r})=>{t.length&&(i=i.filter((i=>{const s=i.multidimensionalDefinition.find((t=>t.dimensionName===e));if(null==s)return!1;const n=s.values[0];return"number"==typeof n?"number"==typeof t[0]?t.includes(n):t.some((e=>e[0]<=n&&e[1]>=n)):"number"==typeof t[0]?t.some((e=>n[0]<=e&&n[1]>=e)):r?t.some((e=>e[0]===n[0]&&e[0]===n[1])):t.some((e=>e[0]>=n[0]&&e[0]<=n[1]||e[1]>=n[0]&&e[1]<=n[1]||e[0]<n[0]&&e[1]>n[1]))})))})),i.length&&r&&(0,o.pC)(r.start)&&(0,o.pC)(r.end)){const e=r.start.getTime(),t=r.end.getTime(),s=i[0].multidimensionalDefinition.findIndex((e=>"StdTime"===e.dimensionName));s>-1&&(i=i.filter((r=>{const i=r.multidimensionalDefinition[s].values[0];return e<=i&&t>=i})))}return i.map((e=>e.sliceId))}(d,(0,o.Wg)(f.multidimensionalDefinition),(0,o.Wg)(f.timeExtent));c=c.map((t=>e.map((e=>t[e])))),u=u?.map((t=>e.map((e=>t[e])))),d=e.map((e=>d[e]))}return{location:r,value:null,dataSeries:d.map(((e,t)=>{const r={value:c.map((e=>e[t])),multidimensionalDefinition:e.multidimensionalDefinition,variableName:e.multidimensionalDefinition[0].variableName,dimensionValues:{}};return u?.length&&(r.magdirValue=[u[0][t],u[1][t]]),e.multidimensionalDefinition.forEach((e=>r.dimensionValues[e.dimensionName]=e.values[0])),r})),pyramidLevel:s}}};(0,i._)([(0,h.Cb)()],ne.prototype,"_rasterTileAlighmentInfo",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],ne.prototype,"_isGlobalWrappableSource",null),(0,i._)([(0,h.Cb)(C.HQ)],ne.prototype,"url",null),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],ne.prototype,"datasetName",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],ne.prototype,"datasetFormat",void 0),(0,i._)([(0,h.Cb)()],ne.prototype,"rasterInfo",void 0),(0,i._)([(0,h.Cb)()],ne.prototype,"ioConfig",void 0),(0,i._)([(0,h.Cb)()],ne.prototype,"sourceJSON",void 0),ne=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.BaseRaster")],ne);const ae=ne;var oe=r(20095);function le(e){const t=e.fields,r=e.records,i=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",s=[{name:i,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),n=s.map((e=>e.name)),a=[];let o=0,l=0;return r.forEach((e=>{const t={};for(t[i]=o++,l=1;l<n.length;l++)t[n[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:s,features:a}}var ce=r(87521),ue=r(74889);const he=new Map;he.set("int16","esriFieldTypeSmallInteger"),he.set("int32","esriFieldTypeInteger"),he.set("int64","esriFieldTypeInteger"),he.set("float32","esriFieldTypeSingle"),he.set("float64","esriFieldTypeDouble"),he.set("text","esriFieldTypeString");let fe=class extends ae{constructor(){super(...arguments),this.storageInfo=null,this.datasetFormat="CRF"}async open(e){await this.init();const{data:t}=await this.request(this.url+"/conf.json",{signal:e?.signal});if(!this._validateHeader(t))throw new a.Z("cloudraster:open","Invalid or unsupported conf.json.");this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{storageInfo:r,rasterInfo:i}=this._parseHeader(t);if("thematic"===i.dataType){const e=await this._fetchAuxiliaryInformation();i.attributeTable=e}this._set("storageInfo",r),this._set("rasterInfo",i),this.ioConfig.retryCount=this.ioConfig.retryCount||0}async fetchRawTile(e,t,r,i={}){const{transposeInfo:s}=this.rasterInfo.storageInfo,{transposedVariableName:n}=i,a=!(!s||!n),o=a?0:this.rasterInfo.storageInfo.maximumPyramidLevel-e;if(o<0)return null;const l=this._buildCacheFilePath(o,t,r,i.multidimensionalDefinition,n),c=this._getIndexRecordFromBundle(t,r,a),u=await this.request(l,{range:{from:0,to:this.storageInfo.headerSize-1},responseType:"array-buffer",signal:i.signal});if(!u)return null;const h=new Uint8Array(u.data),f=this._getTileEndAndContentType(h,c);if(0===f.recordSize)return null;const d=await this.request(l,{range:{from:f.position,to:f.position+f.recordSize},responseType:"array-buffer",signal:i.signal});if(!d)return null;const[m,p]=this._getTileSize(a);return this.decodePixelBlock(d.data,{width:m,height:p,planes:null,pixelType:null,returnPixelInterleavedDims:a})}_validateHeader(e){return e&&"RasterInfo"===e.type&&!["origin","extent","geodataXform","LODInfos","blockWidth","blockHeight","bandCount","pixelType","pixelSizeX","pixelSizeY","format","packetSize"].some((t=>!e[t]))}_parseHeader(e){const t=["u1","u2","u4","u8","s8","u16","s16","u32","s32","f32","f64"][e.pixelType],{bandCount:r,histograms:i,colormap:s,blockWidth:n,blockHeight:a,firstPyramidLevel:o,maximumPyramidLevel:l}=e,c=e.statistics&&e.statistics.map((e=>({min:e.min,max:e.max,avg:e.mean,stddev:e.standardDeviation,median:e.median,mode:e.mode}))),u=e.extent.spatialReference,h=e.geodataXform?.spatialReference,f=new B.Z(u?.wkid||u?.wkt?u:h);let d=new N.Z({xmin:e.extent.xmin,ymin:e.extent.ymin,xmax:e.extent.xmax,ymax:e.extent.ymax,spatialReference:f});const m=new X.Z({x:e.pixelSizeX,y:e.pixelSizeY,spatialReference:f}),p=Math.round((d.xmax-d.xmin)/m.x),g=Math.round((d.ymax-d.ymin)/m.y),y=this._parseTransform(e.geodataXform),x=y?d:null;y&&(d=y.forwardTransform(d),m.x=(d.xmax-d.xmin)/p,m.y=(d.ymax-d.ymin)/g);const b=e.properties??{},w=e.format.toLowerCase().replace("cache/",""),I=new X.Z(e.origin.x,e.origin.y,f);let v,_,C,S;if(s&&s.colors)for(v=[],_=0;_<s.colors.length;_++)C=s.colors[_],S=s.values?s.values[_]:_,v.push([S,255&C,C<<16>>>24,C<<8>>>24,C>>>24]);const k=e.LODInfos,T=[];for(_=0;_<k.levels.length;_++)T.push({level:k.levels[_],resolution:k.resolutions[_],scale:96/.0254*k.resolutions[_]});const P=new R.Z({dpi:96,lods:T,format:w,origin:I,size:[n,a],spatialReference:f}),M={recordSize:8,packetSize:e.packetSize,headerSize:e.packetSize*e.packetSize*8+64},E=[{maxCol:Math.ceil(p/n)-1,maxRow:Math.ceil(g/a)-1,minCol:0,minRow:0}];let D=2;if(l>0)for(_=0;_<l;_++)E.push({maxCol:Math.ceil(p/D/n)-1,maxRow:Math.ceil(g/D/a)-1,minCol:0,minRow:0}),D*=2;const O=e.mdInfo;let F=null;if(O&&b._yxs){const e=b._yxs;F={packetSize:e.PacketSize,tileSize:[e.TileXSize,e.TileYSize]}}return{storageInfo:M,rasterInfo:new U.Z({width:p,height:g,pixelType:t,bandCount:r,extent:d,nativeExtent:x,transform:y,spatialReference:f,pixelSize:m,keyProperties:b,statistics:c,histograms:i,multidimensionalInfo:O,colormap:v,storageInfo:new G.Z({blockWidth:n,blockHeight:a,pyramidBlockWidth:n,pyramidBlockHeight:a,origin:I,tileInfo:P,transposeInfo:F,firstPyramidLevel:o,maximumPyramidLevel:l,blockBoundary:E})})}}_parseTransform(e){if(!(0,ce.j)(e))throw new a.Z("cloudraster:open","the data contains unsupported geodata transform types");const t=(0,ce.c)(e);if("identity"===t.type)return null;if("polynomial"!==t.type||!t.forwardCoefficients?.length||!t.inverseCoefficients?.length)throw new a.Z("cloudraster:open","the data contains unsupported geodata transforms - both forward and inverse coefficients are required currently");return t}async _fetchAuxiliaryInformation(e){const t=this.request(this.url+"/conf.vat.json",{signal:e}).then((e=>e.data)).catch((()=>null)),r=this.request(this.url+"/conf.vat.dbf",{responseType:"array-buffer",signal:e}).then((e=>e.data)).catch((()=>null)),i=await Promise.all([t,r]);let s;if(i[0]){let e=i[0].fields;const t=i[0].values;if(e&&t){e=e.map((e=>({type:"OID"===e.name?"esriFieldTypeOID":he.get(e.type),name:e.name,alias:e.alias||e.name})));const r=t.map((e=>({attributes:e})));e&&t&&(s={fields:e,features:r})}}return!s&&i[1]&&(s=class{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),r=3&t.getUint8(0);if(3!==r)return{header:{version:r},recordSet:null};const i=t.getUint32(4,!0),s=t.getUint16(8,!0),n=t.getUint16(10,!0),a={version:r,recordCount:i,headerByteCount:s,recordByteCount:n};let o=32;const l=[],c=[];let u;if(3===r){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,oe.f)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<i&&e.byteLength-o>n;){const r=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)r.push((0,oe.f)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)r.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)r.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const i=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();r.push(new Date(parseInt(i.substring(0,4),10),parseInt(i.substring(4,6),10)-1,parseInt(i.substring(6,8),10)))}o+=t.length})),c.push(r)):o+=n}}return{header:a,fields:l,records:c,recordSet:le({fields:l,records:c})}}}.parse(i[1]).recordSet),ue.default.fromJSON(s)}_buildCacheFilePath(e,t,r,i,s){const n=this._getPackageSize(!!s),a=Math.floor(t/n)*n,l=Math.floor(r/n)*n,c="R"+this._toHexString4(a)+"C"+this._toHexString4(l);let u="L";u+=e>=10?e.toString():"0"+e.toString();const{multidimensionalInfo:h}=this.rasterInfo,f=i?.[0];if((0,o.Wi)(h)||!f)return`${this.url}/_alllayers/${u}/${c}.bundle`;let d="_yxs";if(!s){d=h.variables.find((e=>e.name===f.variableName)).dimensions[0].values.indexOf(f.values[0]).toString(16);const e=4-d.length;for(let t=0;t<e;t++)d="0"+d;d="S"+d}const m=this._getVariableFolderName(s||f.variableName);return`${this.url}/_alllayers/${m}/${d}/${u}/${c}.bundle`}_getPackageSize(e=!1){const{transposeInfo:t}=this.rasterInfo.storageInfo;return e&&(0,o.pC)(t)?t.packetSize:this.storageInfo.packetSize}_getTileSize(e=!1){const{storageInfo:t}=this.rasterInfo,{transposeInfo:r}=t;return e&&(0,o.pC)(r)?r.tileSize:t.tileInfo.size}_getVariableFolderName(e){return""===(e=e.trim())?"_v":e.replace(/[\{|\}\-]/g,"_").replace("\\*","_v")}_getIndexRecordFromBundle(e,t,r=!1){const i=this._getPackageSize(r),s=i*(e%i)+t%i;if(s<0)throw"Invalid level / row / col";return 20+s*this.storageInfo.recordSize+44}_getTileEndAndContentType(e,t){const r=e.subarray(t,t+8);let i,s=0;for(i=0;i<5;i++)s|=(255&r[i])<<8*i;const n=0xffffffffff&s;for(s=0,i=5;i<8;i++)s|=(255&r[i])<<8*(i-5);return{position:n,recordSize:0xffffffffff&s}}_toHexString4(e){let t=e.toString(16);if(4!==t.length){let e=4-t.length;for(;e-- >0;)t="0"+t}return t}};(0,i._)([(0,h.Cb)({readOnly:!0})],fe.prototype,"storageInfo",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],fe.prototype,"datasetFormat",void 0),fe=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.CloudRaster")],fe);const de=fe;var me=r(15612);let pe=class extends ae{constructor(){super(...arguments),this.datasetFormat="MEMORY"}async open(e){await this.init();const{pixelBlock:t,statistics:r,histograms:i,name:s,keyProperties:n,nativeExtent:a,transform:o}=this.data,{width:l,height:c,pixelType:u}=t,h=this.data.extent||new N.Z({xmin:-.5,ymin:.5,xmax:l-.5,ymax:c-.5,spatialReference:new B.Z({wkid:3857})}),f=this.data.isPseudoSpatialReference??!this.data.extent,d={x:h.width/l,y:h.height/c},m=new U.Z({width:l,height:c,pixelType:u,extent:h,nativeExtent:a,transform:o,pixelSize:d,spatialReference:h.spatialReference,bandCount:3,keyProperties:n||{},statistics:r,isPseudoSpatialReference:f,histograms:i});this.createRemoteDatasetStorageInfo(m,512,512),this._set("rasterInfo",m),this.updateTileInfo(),await this._buildInMemoryRaster(t,{width:512,height:512},e),this.datasetName=s,this.url="/InMemory/"+s}fetchRawTile(e,t,r,i={}){const s=this._pixelBlockTiles.get(`${e}/${t}/${r}`);return Promise.resolve(s)}async _buildInMemoryRaster(e,t,r){const i=this.rasterInfo.storageInfo.maximumPyramidLevel,s=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:i},r):Promise.resolve((0,se.Vl)(e,t,i)),n=(0,o.pC)(this.rasterInfo.statistics),l=(0,o.pC)(this.rasterInfo.histograms),u=n&&l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},r):Promise.resolve((0,me.Hv)(e)),h=await(0,c.as)([s,u]);if(!h[0].value&&h[1].value)throw new a.Z("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,n||(this.rasterInfo.statistics=h[1].value?.statistics),l&&(this.rasterInfo.histograms=h[1].value?.histograms)}};(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],pe.prototype,"datasetFormat",void 0),(0,i._)([(0,h.Cb)()],pe.prototype,"data",void 0),pe=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.InMemoryRaster")],pe);const ge=pe;function ye(e,t){if(!e||!t)return[];let r=t;t.includes("/")?(r=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const i=[];if(t){const s=ye(e,r);for(let e=0;e<s.length;e++)ye(s[e],t).forEach((e=>i.push(e)));return i}const s=e.getElementsByTagNameNS("*",r);if(!s||0===s.length)return[];for(let e=0;e<s.length;e++)i.push(s[e]||s.item[e]);return i}function xe(e,t){if(!e||!t)return null;let r=t;t.includes("/")?(r=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const i=ye(e,r);return i.length>0?t?xe(i[0],t):i[0]:null}function be(e,t=null){const r=t?xe(e,t):e;let i;return r?(i=r.textContent||r.nodeValue,i?i.trim():null):null}function we(e,t){return function(e,t){const r=ye(e,t),i=[];let s;for(let e=0;e<r.length;e++)s=r[e].textContent||r[e].nodeValue,s&&(s=s.trim(),""!==s&&i.push(s));return i}(e,t).map((e=>Number(e)))}function Ie(e,t){const r=be(e,t);return Number(r)}function ve(e,t){const r=e?.nodeName?.toLowerCase(),i=t.toLowerCase();return r.slice(r.lastIndexOf(":")+1)===i}var _e=r(87390);function Ce(e,t){if(!e||!t)return null;const r=[];for(let i=0;i<e.length;i++)r.push(e[i]),r.push(t[i]);return r}function Se(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new B.Z({wkid:t});if((e=String(e)).startsWith("COMPD_CS")){if(!e.includes("VERTCS")||!e.includes("GEOGCS")&&!e.startsWith("PROJCS"))return null;const r=e.indexOf("VERTCS"),i=e.indexOf("PROJCS"),s=i>-1?i:e.indexOf("GEOGCS");if(-1===s)return null;const n=e.slice(s,e.lastIndexOf("]",r)+1).trim(),a=e.slice(r,e.lastIndexOf("]")).trim();t=ke(n);const o=new B.Z(t?{wkid:t}:{wkt:n}),l=ke(a);return l&&(o.vcsWkid=l),o}return e.startsWith("GEOGCS")||e.startsWith("PROJCS")?(t=ke(e),new B.Z(0!==t?{wkid:t}:{wkt:e})):null}function ke(e){const t=e.replace(/\]/g,"[").replace(/\"/g,"").split("[").map((e=>e.trim())).filter((e=>""!==e)),r=t[t.length-1].split(","),i=r[0]?.toLowerCase();if(("epsg"===i||"esri"===i)&&e.endsWith('"]]')){const e=Number(r[1]);if(!isNaN(e)&&0!==e)return e}return 0}function Re(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if(ve(e,"SRS")){if(!t.spatialReference){const r=be(e);t.spatialReference=Se(r)}}else if(ve(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:r,transform:i}=function(e){const t=xe(e,"GeodataXform"),r=Se(Ie(t,"SpatialReference/WKID")||be(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:r,transform:null};const i=Ie(t,"PolynomialOrder")??1,s=we(t,"CoeffX/Double"),n=we(t,"CoeffY/Double"),a=we(t,"InverseCoeffX/Double"),o=we(t,"InverseCoeffY/Double"),l=Ce(s,n),c=Ce(a,o);return{spatialReference:r,transform:new _e.Z({spatialReference:r,polynomialOrder:i,forwardCoefficients:l,inverseCoefficients:c})}}(e);t.transform=i,t.spatialReference||(t.spatialReference=r)}else ye(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=be(e)));else if(ve(e,"PAMRasterBand")){const r=function(e){const t=Ie(e,"NoDataValue"),r=xe(e,"Histograms/HistItem"),i=Ie(r,"HistMin"),s=Ie(r,"HistMax"),n=Ie(r,"BucketCount"),a=be(r,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;ye(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const h=Ie(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=o&&null!=l?{min:i,max:s,size:n||a.length,counts:a}:null,sourceBandIndex:h,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=r.sourceBandIndex&&null==t.rasterBands[r.sourceBandIndex]?t.rasterBands[r.sourceBandIndex]=r:t.rasterBands.push(r)}}));const r=t.rasterBands;if(r){const e=!!r[0].statistics;t.statistics=e?r.map((e=>e.statistics)):null;const i=!!r[0].histogram;t.histograms=i?r.map((e=>e.histogram)):null}return t}let Te=class extends ae{async open(e){await this.init();const t=await this._fetchData(e);let{spatialReference:r,statistics:i,histograms:s,transform:n}=await this._fetchAuxiliaryData(e);const a=!r;a&&(r=new B.Z({wkid:3857})),s?.length&&null==i&&(i=(0,me.Oh)(s));const{width:o,height:l}=t;let c=new N.Z({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:r});const u=n?n.forwardTransform(c):c;let h=!0;if(n){const e=n.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(n=null,c=u)}const f=new ge({data:{extent:u,nativeExtent:c,transform:n,pixelBlock:t,statistics:i,histograms:s,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a}});await f.open(),this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}fetchRawTile(e,t,r,i={}){return this._inMemoryRaster.fetchRawTile(e,t,r,i)}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),r=(0,ie.y)(t).toUpperCase();if("JPG"!==r&&"PNG"!==r&&"GIF"!==r&&"BMP"!==r)throw new a.Z("image-aux-raster:open","the data is not a supported format");return this._set("datasetFormat",r),await this.decodePixelBlock(t,{format:"jpg",width:1,height:1,useCanvas:!0})}async _fetchAuxiliaryData(e){const t=(0,o.Wg)(e?.signal),r=this.ioConfig.skipExtensions??[],i=r.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),s=this.datasetFormat,n="JPG"===s?"jgw":"PNG"===s?"pgw":"BMP"===s?"bpw":null,a=r.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,c.as)([i,a]);if(t?.aborted)throw(0,c.zE)();const u=Re(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new _e.Z({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],Te.prototype,"datasetFormat",void 0),Te=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.ImageAuxRaster")],Te);const Pe=Te;var Me=r(17452),Ee=r(45322),De=r(56608),Oe=r(29680);let Fe=class extends ae{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer"}async open(e){await this.init();const t=e&&e.signal,r=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});r.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const i=r.data;if(this.sourceJSON=i,!i)throw new a.Z("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!i.tileInfo)throw new a.Z("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=i.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(i.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===i.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=i.name.slice(i.name.indexOf("/")+1);const s=await this._fetchRasterInfo({signal:t});if(!(0,o.pC)(s))throw new a.Z("image-server-raster:open","cannot initialize image service");{const e="Map"===this.tileType?(0,Ee.d)(i.tileInfo,i):R.Z.fromJSON(i.tileInfo),{extent:t,pixelSize:r}=s,n=.5/s.width*r.x;let a,o;const l=e.lodAt(Math.max.apply(null,e.lods.map((e=>e.level))));"Map"!==this.tileType&&0!==i.maxScale&&("Raster"===this.tileType?(a=e.lods.find((e=>e.resolution===r.x)),a||(a=e.lods[e.lods.length-1])):(a=e.lods.find((e=>Math.abs(e.scale-i.maxScale)<n)),a||(a=e.lods.filter((e=>e.scale>i.maxScale)).sort(((e,t)=>e.scale>t.scale?1:-1))[0])),r.x=r.y=a.resolution,s.width=Math.ceil((t.xmax-t.xmin)/r.x-.1),s.height=Math.ceil((t.ymax-t.ymin)/r.y-.1)),a||(a=l);const c=e.lodAt(Math.min.apply(null,e.lods.map((e=>e.level))));"Map"===this.tileType?this._levelOffset=e.lods[0].level:0!==i.minScale&&"Elevation"===this.tileType&&(o=e.lods.find((e=>Math.abs(e.scale-i.minScale)<n)),this._levelOffset=o.level-c.level),o||(o=c);const u=Math.max(r.x,r.y);(Math.abs(r.x-r.y)>n||!e.lods.some((e=>Math.abs(e.resolution-u)<n)))&&(r.x=r.y=a.resolution,s.width=Math.ceil((t.xmax-t.xmin)/r.x-.1),s.height=Math.ceil((t.ymax-t.ymin)/r.y-.1));const h=a.level-o.level,[f,d]=e.size,m=[];e.lods.forEach((e=>{e.level>=o.level&&e.level<=a.level&&m.push({x:e.resolution,y:e.resolution})})),m.sort(((e,t)=>e.x-t.x));const p=this.computeBlockBoundary(t,f,d,e.origin,m,h),g=m.length>1?m.slice(1):null;let y;i.transposeInfo&&(y={tileSize:[i.transposeInfo.rows,i.transposeInfo.cols],packetSize:s.keyProperties?._yxs.PacketSize??0}),s.storageInfo=new G.Z({blockWidth:e.size[0],blockHeight:e.size[1],pyramidBlockWidth:e.size[0],pyramidBlockHeight:e.size[1],pyramidResolutions:g,compression:e.format,origin:e.origin,firstPyramidLevel:1,maximumPyramidLevel:h,tileInfo:e,transposeInfo:y,blockBoundary:p}),this._fixGCSShift(s),this._set("rasterInfo",s)}if(i.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:s.storageInfo.tileInfo,parsedUrl:(0,Me.mN)(this.url),url:this.url,tileServers:[],type:"tile"};this._tilemapCache=new De.y({layer:e})}}async fetchRawTile(e,t,r,i={}){const{storageInfo:s,extent:n}=this.rasterInfo,{transposeInfo:a}=s,l=(0,o.pC)(a)&&!!i.transposedVariableName;if(this._slices&&!l&&null==i.sliceId)return null;const c=l?0:s.maximumPyramidLevel-e+this._levelOffset,u=`${this.url}/tile/${c}/${t}/${r}`,h=this._slices?l?{variable:i.transposedVariableName}:{sliceId:i.sliceId||0}:null,{data:f}=await this.request(u,{query:h,responseType:"array-buffer",signal:i.signal});if(!f)return null;const d=l?a.tileSize:s.tileInfo.size,m=await this.decodePixelBlock(f,{width:d[0],height:d[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType,returnPixelInterleavedDims:l}),p=s.blockBoundary[e];if("jpg"!==s.compression||r>p.minCol&&r<p.maxCol&&t>p.minRow&&t<p.maxRow)return m;const{origin:g,blockWidth:y,blockHeight:x}=s,{x:b,y:w}=this.getPyramidPixelSize(e),I=Math.round((n.xmin-g.x)/b)%y,v=Math.round((n.xmax-g.x)/b)%y||y,_=Math.round((g.y-n.ymax)/w)%x,C=Math.round((g.y-n.ymin)/w)%x||x,S=r===p.minCol?I:0,k=t===p.minRow?_:0,R=r===p.maxCol?v:y,T=t===p.maxRow?C:x;return(0,se.pW)(m,{x:S,y:k},{width:R-S,height:T-k}),m}getSliceIndex(e){if(!this._slices||(0,o.Wi)(e)||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const r=this._slices[e].multidimensionalDefinition;if(r.length===t.length&&!r.some((e=>{const r=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!r||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(r.values[0])?`${r.values[0][0]}-${r.values[0][1]}`:r.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const r=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),i=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([r,i]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let r=this.identifyPixelLocation(e,0,(0,o.Wg)(t.datumTransformation));if(null===r)return null;let i=0;const{maximumPyramidLevel:s}=this.rasterInfo.storageInfo;let n=s-i+this._levelOffset;const a=r.srcLocation;for(;n>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(n,r.row,r.col,t))break}catch{}if(n--,i++,r=this.identifyPixelLocation(a,i,(0,o.Wg)(t.datumTransformation)),null===r)return null}return-1===n||null==r?null:i}async _fetchRasterInfo(e){const t=this.sourceJSON,r=Math.ceil((t.extent.xmax-t.extent.xmin)/t.pixelSizeX-.1),i=Math.ceil((t.extent.ymax-t.extent.ymin)/t.pixelSizeY-.1),s=B.Z.fromJSON(t.spatialReference||t.extent.spatialReference);if("Map"===this.tileType)return new U.Z({width:r,height:i,bandCount:3,extent:N.Z.fromJSON(t.extent),spatialReference:s,pixelSize:new X.Z({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:s}),pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}});const{slice:n,signal:a}=e,o=!!t.hasRasterAttributeTable&&this.request(this.url+"/rasterAttributeTable",{query:{slice:n,f:"json"},signal:a}).then((e=>ue.default.fromJSON(e.data))).catch((()=>null)),l=!!t.hasColormap&&this.request(this.url+"/colormap",{query:{slice:n,f:"json"},signal:a}).then((e=>e.data?.colormap)),c=!!t.hasHistograms&&this.request(this.url+"/histograms",{query:{slice:n,f:"json"},signal:a}).then((e=>e.data?.histograms)),u=this.request(this.url+"/keyProperties",{query:{f:"json"},signal:a}).then((e=>e.data)).catch((()=>{})),h=!!t.hasMultidimensions&&this._fetchMultidimensionalInfo(),f=!!t.hasMultidimensions&&this.request(this.url+"/slices",{query:{f:"json"},signal:a}).then((e=>e.data&&e.data.slices)).catch((()=>{}));return Promise.all([o,l,c,u,h,f]).then((e=>{let n=null;if(t.minValues&&t.minValues.length===t.bandCount){n=[];for(let e=0;e<t.minValues.length;e++)n.push({min:t.minValues[e],max:t.maxValues[e],avg:t.meanValues[e],stddev:t.stdvValues[e]})}return this._slices=e[5]||null,new U.Z({width:r,height:i,bandCount:t.bandCount,extent:N.Z.fromJSON(t.extent),spatialReference:s,pixelSize:new X.Z({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:s}),pixelType:t.pixelType.toLowerCase(),statistics:n,attributeTable:e[0]||null,colormap:e[1]||null,histograms:e[2]||null,keyProperties:e[3]||{},multidimensionalInfo:e[4]||null})}))}async _fetchMultidimensionalInfo(e){const t=await this.request(this.url+"/multidimensionalInfo",{query:{f:"json"},signal:e}).then((e=>e.data?.multidimensionalInfo));return t.variables?.length&&t.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation}))})),t}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_fixGCSShift(e){const{extent:t,spatialReference:r}=e;0===t.xmin&&360===t.xmax&&r.wkid&&r.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Oe.Z,e.extent=e.transform.forwardTransform(t))}};(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],Fe.prototype,"datasetFormat",void 0),(0,i._)([(0,h.Cb)()],Fe.prototype,"tileType",void 0),Fe=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.ImageServerRaster")],Fe);const Ne=Fe;var Be=r(54163),ze=r(48279);const Le=new Map;Le.set("Int8","s8"),Le.set("UInt8","u8"),Le.set("Int16","s16"),Le.set("UInt16","u16"),Le.set("Int32","s32"),Le.set("UInt32","u32"),Le.set("Float32","f32"),Le.set("Float64","f32"),Le.set("Double64","f32");const Ae=new Map;Ae.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Ae.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Ae.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Ae.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Ze=class extends ae{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async open(e){await this.init(),this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?(0,o.Wg)(e.signal):null,r=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:i,files:s}=this._parseHeader(r.data);if(-1===this.ioConfig.skipExtensions?.indexOf("aux.xml")){const t=await this._fetchAuxiliaryData(e);null!=t&&(i.statistics=t.statistics??i.statistics,i.histograms=t.histograms,t.histograms&&(0,o.Wi)(i.statistics)&&(i.statistics=(0,me.Oh)(t.histograms)))}this._set("rasterInfo",i),this._files=s;const n=await this.request(s.index,{responseType:"array-buffer",signal:t});this._storageIndex=this._parseIndex(n.data);const{blockWidth:a,blockHeight:l}=this.rasterInfo.storageInfo,c=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:u,height:h}=this.rasterInfo,f=[],d=this._getBandSegmentCount();let m=0,p=-1;for(;m<this._storageIndex.length;){p++;const e=Math.ceil(u/a/c**p)-1,t=Math.ceil(h/l/c**p)-1;m+=(e+1)*(t+1)*d*4,f.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=f,p>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=p),this.updateTileInfo()}async fetchRawTile(e,t,r,i={}){const{blockWidth:s,blockHeight:n,blockBoundary:a}=this.rasterInfo.storageInfo,l=a[e];if(!l||l.maxRow<t||l.maxCol<r||l.minRow>t||l.minCol>r)return null;const{bandCount:c,pixelType:u}=this.rasterInfo,{ranges:h,actualTileWidth:f,actualTileHeight:d}=this._getTileLocation(e,t,r);if(!h||0===h.length)return null;if(0===h[0].from&&0===h[0].to){const e=new Uint8Array(s*n);return new Be.Z({width:s,height:n,pixels:null,mask:e,validPixelCount:0})}const{bandIds:m}=this.ioConfig,p=this._getBandSegmentCount(),g=[];let y=0;for(y=0;y<p;y++)(!m||m.indexOf[y]>-1)&&g.push(this.request(this._files.data,{range:{from:h[y].from,to:h[y].to},responseType:"array-buffer",signal:i.signal}));const x=await Promise.all(g),b=x.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),w=new Uint8Array(b);let I=0;for(y=0;y<p;y++)w.set(new Uint8Array(x[y].data),I),I+=x[y].data.byteLength;const v=Ae.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(w.buffer,{width:s,height:n,format:v,planes:m?.length||c,pixelType:u});if((0,o.pC)(this.rasterInfo.noDataValue)&&"lerc"!==v&&!_.mask){const e=this.rasterInfo.noDataValue[0];if(null!=e){const t=_.width*_.height,r=new Uint8Array(t);if(Math.abs(e)>1e24)for(y=0;y<t;y++)Math.abs((_.pixels[0][y]-e)/e)>1e-6&&(r[y]=1);else for(y=0;y<t;y++)_.pixels[0][y]!==e&&(r[y]=1);_.mask=r}}let C=0,S=0;if(f!==s||d!==n){let e=_.mask;if(e)for(y=0;y<n;y++)if(S=y*s,y<d)for(C=f;C<s;C++)e[S+C]=0;else for(C=0;C<s;C++)e[S+C]=0;else for(e=new Uint8Array(s*n),_.mask=e,y=0;y<d;y++)for(S=y*s,C=0;C<f;C++)e[S+C]=1}return _}_parseIndex(e){if(e.byteLength%16>0)throw"invalid array buffer must be multiples of 16";let t,r,i,s,n,a;if(ze.f){for(r=new Uint8Array(e),s=new ArrayBuffer(e.byteLength),i=new Uint8Array(s),n=0;n<e.byteLength/4;n++)for(a=0;a<4;a++)i[4*n+a]=r[4*n+3-a];t=new Uint32Array(s)}else t=new Uint32Array(e);return t}_getBandSegmentCount(){return Ae.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,r){const{blockWidth:i,blockHeight:s,pyramidScalingFactor:n}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,h,f=0,d=0;for(h=0;h<e;h++)d=n**h,c=Math.ceil(a/i/d),u=Math.ceil(o/s/d),f+=c*u;d=n**e,c=Math.ceil(a/i/d),u=Math.ceil(o/s/d),f+=t*c+r,f*=4*l;const m=this._storageIndex.subarray(f,f+4*l);let p=0,g=0;const y=[];for(let e=0;e<l;e++)p=m[4*e+0]*2**32+m[4*e+1],g=p+m[4*e+2]*2**32+m[4*e+3],y.push({from:p,to:g});return{ranges:y,actualTileWidth:r<c-1?i:Math.ceil(a/d)-i*(c-1),actualTileHeight:t<u-1?s:Math.ceil(o/d)-s*(u-1)}}_parseHeader(e){const t=xe(e,"MRF_META/Raster");if(!t)throw new a.Z("mrf:open","not a valid MRF format");const r=xe(t,"Size"),i=parseInt(r.getAttribute("x"),10),s=parseInt(r.getAttribute("y"),10),n=parseInt(r.getAttribute("c"),10),o=(be(t,"Compression")||"none").toLowerCase();if(!Ae.has(o))throw new a.Z("mrf:open","currently does not support compression "+o);const l=be(t,"DataType")||"UInt8",c=Le.get(l);if(null==c)throw new a.Z("mrf:open","currently does not support pixel type "+l);const u=xe(t,"PageSize"),h=parseInt(u.getAttribute("x"),10),f=parseInt(u.getAttribute("y"),10),d=xe(t,"DataValues");let m,p;if(d&&(p=d.getAttribute("NoData"),null!=p&&(m=p.trim().split(" ").map((e=>parseFloat(e))))),xe(e,"MRF_META/CachedSource"))throw new a.Z("mrf:open","currently does not support MRF referencing other data files");const g=xe(e,"MRF_META/GeoTags"),y=xe(g,"BoundingBox");let x,b=!1;if(null!=y){const e=parseFloat(y.getAttribute("minx")),t=parseFloat(y.getAttribute("miny")),r=parseFloat(y.getAttribute("maxx")),i=parseFloat(y.getAttribute("maxy")),s=be(g,"Projection")||"";let n;if("LOCAL_CS[]"!==s)if(s.toLowerCase().startsWith("epsg:")){const e=Number(s.slice(5));isNaN(e)||0===e||(n=new B.Z({wkid:e}))}else n=Se(s);else b=!0,n=new B.Z({wkid:3857});x=new N.Z(e,t,r,i),x.spatialReference=n}else b=!0,x=new N.Z({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:new B.Z({wkid:3857})});const w=xe(e,"MRF_META/Rsets"),I=parseInt(w&&w.getAttribute("scale")||"2",10),v=x.spatialReference,_=new G.Z({origin:new X.Z({x:x.xmin,y:x.ymax,spatialReference:v}),blockWidth:h,blockHeight:f,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:o,pyramidScalingFactor:I}),C=new X.Z({x:x.width/i,y:x.height/s,spatialReference:v}),S=new U.Z({width:i,height:s,extent:x,isPseudoSpatialReference:b,spatialReference:v,bandCount:n,pixelType:c,pixelSize:C,noDataValue:m,storageInfo:_}),k=be(e,"datafile"),R=be(e,"IndexFile");return{rasterInfo:S,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:k||this.url.replace(".mrf",Ae.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return Re(t)}catch{return null}}};(0,i._)([(0,h.Cb)()],Ze.prototype,"_files",void 0),(0,i._)([(0,h.Cb)()],Ze.prototype,"_storageIndex",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],Ze.prototype,"datasetFormat",void 0),Ze=(0,i._)([(0,p.j)("esri.layers.support.rasterIO.MRFRaster")],Ze);const He=Ze;var Je=r(94793),We=r(9832);const je=(e,t)=>{const r=e.get(t);return r&&r.values},qe=(e,t)=>{const r=e.get(t);return r&&r.values[0]};let Ue=class extends ae{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async open(e){await this.init();const t=e?(0,o.Wg)(e.signal):null,{data:r}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!r)throw new a.Z("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{littleEndian:i,firstIFD:s,isBigTiff:n}=(0,Je.cK)(r),l=[];await this._readIFDs(l,r,i,s,0,n?8:4,t);const c=(0,Je.FI)(l),{width:u,height:h,tileWidth:f,tileHeight:d,planes:m,pixelType:p,compression:g,firstPyramidLevel:y,maximumPyramidLevel:x,pyramidBlockWidth:b,pyramidBlockHeight:w,tileBoundary:I,affine:v,metadata:_}=c;let C=Se(c.extent.spatialReference?.wkt||c.extent.spatialReference?.wkid),S=!1;null==C&&(S=!0,C=new B.Z({wkid:3857}));const k=new N.Z({...c.extent,spatialReference:C}),R=new X.Z(k?{x:k.xmin,y:k.ymax,spatialReference:C}:{x:0,y:0}),T=new G.Z({blockWidth:f,blockHeight:d,pyramidBlockWidth:b,pyramidBlockHeight:w,compression:g,origin:R,firstPyramidLevel:y,maximumPyramidLevel:x,blockBoundary:I}),P=new X.Z({x:(k.xmax-k.xmin)/u,y:(k.ymax-k.ymin)/h,spatialReference:C}),M=_?{BandProperties:_.bandProperties,DataType:_.dataType}:{},E=new U.Z({width:u,height:h,bandCount:m,pixelType:p,compression:g,pixelSize:P,storageInfo:T,spatialReference:C,isPseudoSpatialReference:S,keyProperties:M,extent:k,statistics:_?_.statistics:null});if(v?.length&&(E.nativeExtent=new N.Z({xmin:-.5,ymin:.5-h,xmax:u-.5,ymax:.5,spatialReference:C}),E.transform=new _e.Z({polynomialOrder:1,forwardCoefficients:[v[2]+v[0]/2,v[5]-v[3]/2,v[0],v[3],-v[1],-v[4]]}),E.extent=E.transform.forwardTransform(E.nativeExtent),E.pixelSize=new X.Z({x:(k.xmax-k.xmin)/u,y:(k.ymax-k.ymin)/h,spatialReference:C}),T.origin.x=-.5,T.origin.y=.5),!this.ioConfig.skipExtensions?.includes("aux.xml")){const t=await this._fetchAuxiliaryData(e);if(null!=t){if(E.statistics=t.statistics??E.statistics,E.histograms=t.histograms,t.histograms&&(0,o.Wi)(E.statistics)&&(E.statistics=(0,me.Oh)(t.histograms)),t.transform&&!v){E.transform=t.transform,E.nativeExtent=E.extent;const e=E.transform.forwardTransform(E.nativeExtent);E.pixelSize=new X.Z({x:(e.xmax-e.xmin)/u,y:(e.ymax-e.ymin)/h,spatialReference:C}),E.extent=e}E.spatialReference||(E.spatialReference=t.spatialReference)}}if(this._set("rasterInfo",E),this._headerInfo={littleEndian:i,isBigTiff:n,ifds:l,...c},!this._headerInfo.isSupported)throw new a.Z("tiffraster:open","this tiff is not supported: "+this._headerInfo.message);this.updateTileInfo()}async fetchRawTile(e,t,r,i={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,r))return null;const s=this._getTileLocation(e,t,r);if(!s)return null;const{ranges:n,actualTileWidth:a,actualTileHeight:o,ifd:l}=s,c=n.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:i.signal}))),u=await Promise.all(c),h=u.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),f=1===u.length?u[0].data:new ArrayBuffer(h),d=[0],m=[0];if(u.length>1){const e=new Uint8Array(f);for(let t=0,r=0;t<u.length;t++){const i=u[t].data;e.set(new Uint8Array(i),r),d[t]=r,r+=i.byteLength,m[t]=i.byteLength}}const{blockWidth:p,blockHeight:g}=this.getBlockWidthHeight(e),y=await this.decodePixelBlock(f,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:l,offsets:d,sizes:m},width:p,height:g,planes:null,pixelType:null});let x,b,w;if(a!==p||o!==g){let e=y.mask;if(e)for(x=0;x<g;x++)if(w=x*p,x<o)for(b=a;b<p;b++)e[w+b]=0;else for(b=0;b<p;b++)e[w+b]=0;else for(e=new Uint8Array(p*g),y.mask=e,x=0;x<o;x++)for(w=x*p,b=0;b<a;b++)e[w+b]=1}return y}async _readIFDs(e,t,r,i,s,n=4,a){if(!i)return null;(i>=t.byteLength||i<0)&&(t=(await this.request(this.url,{range:{from:i+s,to:i+s+this._bufferSize},responseType:"array-buffer",signal:a})).data,s=i+s,i=0);const o=await this._readIFD(t,r,i,s,We.Z.TIFF_TAGS,n,a);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,r,o.nextIFD-s,s,n,a)}async _readIFD(e,t,r,i,s=We.Z.TIFF_TAGS,n=4,a){if(!e)return null;const o=(0,Je.vr)(e,t,r,i,s,n);if(o.success){const r=[];if(o.ifd.forEach((e=>{e.values||r.push(e)})),r.length>0){const s=r.map((e=>e.offlineOffsetSize)),n=Math.min.apply(null,s.map((e=>e[0])));if(Math.min.apply(null,s.map((e=>e[0]+e[1])))-n<=this._bufferSize){const{data:s}=await this.request(this.url,{range:{from:n,to:n+this._bufferSize},responseType:"array-buffer",signal:a});e=s,i=n,r.forEach((r=>(0,Je.Dq)(e,t,r,i)))}}if(o.ifd.has("GEOKEYDIRECTORY")){const r=o.ifd.get("GEOKEYDIRECTORY"),s=r.values;if(s&&s.length>4){const n=s[0]+"."+s[1]+"."+s[2],o=await this._readIFD(e,t,r.valueOffset+6-i,i,We.Z.GEO_KEYS,2,a);r.data=o.ifd,r.data&&r.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const r=await this.request(this.url,{range:{from:i,to:i+o.requiredBufferSize+4},responseType:"array-buffer",signal:a});return(e=r.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,i,We.Z.TIFF_TAGS,4,a)}}_getTileLocation(e,t,r){const{firstPyramidLevel:i,blockBoundary:s}=this.rasterInfo.storageInfo,n=0===e?0:e-(i-1),a=this._headerInfo.ifds[n];if(!a)return null;const o=(0,Je.If)(a,this._headerInfo),l=je(a,"TILEOFFSETS");if(void 0===l)return null;const c=je(a,"TILEBYTECOUNTS"),{minRow:u,minCol:h,maxRow:f,maxCol:d}=s[n];if(t>f||r>d||t<u||r<h)return null;const m=qe(a,"IMAGEWIDTH"),p=qe(a,"IMAGELENGTH"),g=qe(a,"TILEWIDTH"),y=qe(a,"TILELENGTH"),x=o?this.rasterInfo.bandCount:1,b=x*t*(d+1)+r,w=[{from:l[b],to:l[b+x-1]+c[b+x-1]-1}];if(o){let e=!0;for(let t=0;t<x;t++)if(l[b+t]+c[b+t]!==l[b+t+1]){e=!1;break}if(!e)for(let e=0;e<x;e++)w[e]={from:l[b+e],to:l[b+e]+c[b+e]-1}}const I=l[b],v=c[b];return null==I||null==v?null:{ranges:w,ifd:a,actualTileWidth:r===d?m%g:g,actualTileHeight:t===f?p%y:y}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return Re(t)}catch{return null}}};(0,i._)([(0,h.Cb)()],Ue.prototype,"_files",void 0),(0,i._)([(0,h.Cb)()],Ue.prototype,"_headerInfo",void 0),(0,i._)([(0,h.Cb)()],Ue.prototype,"_bufferSize",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],Ue.prototype,"datasetFormat",void 0),Ue=(0,i._)([(0,p.j)("esri.layers.support.rasterDatasets.TIFFRaster")],Ue);const Ge=Ue,$e=new Map;$e.set("CRF",{desc:"Cloud Raster Format",constructor:de}),$e.set("MRF",{desc:"Meta Raster Format",constructor:He}),$e.set("TIFF",{desc:"GeoTIFF",constructor:Ge}),$e.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Ne}),$e.set("JPG",{desc:"JPG Raster Format",constructor:Pe}),$e.set("PNG",{desc:"PNG Raster Format",constructor:Pe}),$e.set("GIF",{desc:"GIF Raster Format",constructor:Pe}),$e.set("BMP",{desc:"BMP Raster Format",constructor:Pe});var Ve=r(32163);let Ye=class extends((0,y.h)((0,J.M)((0,A.q)((0,Z.I)((0,x.N)(L((0,W.n)((0,H.Q)((0,l.R)(g.Z)))))))))){constructor(...e){super(...e),this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.title=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,o.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.r9).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[new j.Z({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"})];const t=this.rasterInfo?.attributeTable?.fields;if(t){const r=t.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const t=e.clone();return t.name="Raster."+e.name,t}));e=e.concat(r)}const r=this.rasterInfo.dataType;if(("vector-magdir"===r||"vector-uv"===r)&&(0,o.pC)(this.rasterInfo.multidimensionalInfo)){const t=this.rasterInfo.multidimensionalInfo.variables[0].unit?.trim(),r="Magnitude"+(t?` (${t})`:"");e.push(new j.Z({name:"Raster.Magnitude",alias:r,domain:null,editable:!1,type:"double"})),e.push(new j.Z({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return e}set renderer(e){this._set("renderer",e),this.updateRenderer()}readRenderer(e,t,r){const i=t&&t.layerDefinition&&t.layerDefinition.drawingInfo&&t.layerDefinition.drawingInfo.renderer,s=(0,n.ij)(i,r)||void 0;if(null!=s)return s}createPopupTemplate(e){return(0,Ve.eZ)({fields:this.rasterFields,title:this.title},e)}write(e,t){const{raster:r}=this;if(this.loaded?"RasterTileServer"===r.datasetFormat&&("Raster"===r.tileType||"Map"===r.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t&&t.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){this.raster?(this.raster.rasterInfo||await this.raster.open(),this.url=this.raster.url):this.raster=await class{static get supportedFormats(){const e=new Set;return $e.forEach(((t,r)=>e.add(r))),e}static async open(e){const{url:t,ioConfig:r,sourceJSON:i}=e;let s=e.datasetFormat;null==s&&t.lastIndexOf(".")&&(s=t.slice(t.lastIndexOf(".")+1).toUpperCase()),"OVR"===s||"TIF"===s?s="TIFF":"JPG"!==s&&"JPEG"!==s&&"JFIF"!==s||(s="JPG"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(s="RasterTileServer");const n={url:t,sourceJSON:i,datasetFormat:s,ioConfig:r||{bandIds:null,sampling:null}};let o,l;if(this.supportedFormats.has(s))return o=$e.get(s).constructor,l=new o(n),await l.open({signal:e.signal}),l;if(s)throw new a.Z("rasterfactory:open","not a supported format "+s);const c=Array.from($e.keys());let u=0;const h=()=>(s=c[u++],s?(o=$e.get(s).constructor,l=new o(n),l.open({signal:e.signal}).then((()=>l)).catch((()=>h()))):null);return h()}static register(e,t,r){$e.has(e.toUpperCase())||$e.set(e.toUpperCase(),{desc:t,constructor:r})}}.open({url:this.url,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e});const{rasterInfo:t}=this.raster;if(!t)throw new a.Z("imagery-tile-layer:load","cannot load resources on "+this.url);if(this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}null==this.title&&(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.own((0,u.YP)((()=>this.customParameters),(e=>{this.raster.ioConfig.customFetchParameters=e})))}};(0,i._)([(0,h.Cb)({type:[f.z8],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],Ye.prototype,"bandIds",void 0),(0,i._)([(0,h.Cb)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,d.J)(q.c)],Ye.prototype,"interpolation",void 0),(0,i._)([(0,h.Cb)({json:{write:!0}})],Ye.prototype,"multidimensionalDefinition",void 0),(0,i._)([(0,h.Cb)(C.rn)],Ye.prototype,"legendEnabled",void 0),(0,i._)([(0,h.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ye.prototype,"isReference",void 0),(0,i._)([(0,h.Cb)({type:["show","hide"]})],Ye.prototype,"listMode",void 0),(0,i._)([(0,h.Cb)()],Ye.prototype,"sourceJSON",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],Ye.prototype,"version",void 0),(0,i._)([(0,h.Cb)()],Ye.prototype,"title",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],Ye.prototype,"type",void 0),(0,i._)([(0,h.Cb)({type:["ArcGISTiledImageServiceLayer"]})],Ye.prototype,"operationalLayerType",void 0),(0,i._)([(0,h.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,r){t[r]=!e}}}})],Ye.prototype,"popupEnabled",void 0),(0,i._)([(0,h.Cb)({type:s.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],Ye.prototype,"popupTemplate",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],Ye.prototype,"defaultPopupTemplate",null),(0,i._)([(0,h.Cb)({readOnly:!0,type:[j.Z]})],Ye.prototype,"fields",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,type:[j.Z]})],Ye.prototype,"rasterFields",null),(0,i._)([(0,h.Cb)({types:n.dr,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:n.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],Ye.prototype,"renderer",null),(0,i._)([(0,m.r)("renderer")],Ye.prototype,"readRenderer",null),Ye=(0,i._)([(0,p.j)("esri.layers.ImageryTileLayer")],Ye);const Xe=Ye},74889:(e,t,r)=>{r.r(t),r.d(t,{default:()=>w});var i,s=r(43697),n=r(66577),a=r(38171),o=r(35454),l=r(96674),c=r(22974),u=r(70586),h=r(5600),f=(r(75215),r(71715)),d=r(52011),m=r(30556),p=r(82971),g=r(33955),y=r(1231);const x=new o.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=p.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],n=a.Z.fromJSON(s),o=s.geometry&&s.geometry.spatialReference;(0,u.pC)(n.geometry)&&!o&&(n.geometry.spatialReference=r);const l=s.aggregateGeometries,c=n.aggregateGeometries;if(l&&(0,u.pC)(c))for(const e in c){const t=c[e],i=l[e]?.spatialReference;(0,u.pC)(t)&&!i&&(t.spatialReference=r)}i.push(n)}return i}writeGeometryType(e,t,r,i){if(e)return void x.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&(0,u.pC)(e.geometry))return void x.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,g.im)(e);return!r&&t.spatialReference&&(i.spatialReference=p.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,c.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)a((0,u.Wg)(n[e].geometry))||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,a]}=r,o=this._getHydrationFunction(e,(e=>e*n+i),(e=>s-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&o(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const n=[];for(let a=0,o=e.length;a<o;a++){const o=e[a];if(a>0){const e=t(o[0]),a=r(o[1]);e===i&&a===s||(n.push([e-i,a-s]),i=e,s=a)}else i=t(o[0]),s=r(o[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,g.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],a=this._quantizePoints(n,t,r);a&&s.push(a)}return s.length>0?((0,g.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const i=(0,g.oU)(e)?e.rings:e.paths;let s,n;for(let e=0,a=i.length;e<a;e++){const a=i[e];for(let e=0,i=a.length;e<i;e++){const i=a[e];e>0?(s+=i[0],n+=i[1]):(s=i[0],n=i[1]),i[0]=t(s),i[1]=r(n)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const i=e.points;let s,n;for(let e=0,a=i.length;e<a;e++){const a=i[e];e>0?(s+=a[0],n+=a[1]):(s=a[0],n=a[1]),a[0]=t(s),a[1]=r(n)}}:void 0}};(0,s._)([(0,h.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,s._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,h.Cb)({type:[a.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,s._)([(0,f.r)("features")],b.prototype,"readFeatures",null),(0,s._)([(0,h.Cb)({type:[y.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,s._)([(0,h.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:x.read}}})],b.prototype,"geometryType",void 0),(0,s._)([(0,m.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,s._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,s._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,s._)([(0,h.Cb)({types:n.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,s._)([(0,f.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,s._)([(0,h.Cb)({type:p.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,s._)([(0,m.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,s._)([(0,h.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,s._)([(0,d.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const w=b}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3172],{3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>p});var s=r(68773),o=r(40330),n=r(20102),a=r(80442),i=r(22974),l=r(70586),c=r(95330),u=r(17452),d=r(71058),h=r(85958);async function p(e,t){const i=(0,u.HK)(e),y=(0,u.jc)(e);y||i||(e=(0,u.Fv)(e));const g={url:e,requestOptions:{...(0,l.Wg)(t)}};let b=(0,u.oh)(e);if(b){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,s;try{s=await e.before(t)}catch(e){r=C("request:interceptor",e,t)}if((s instanceof Error||s instanceof n.Z)&&(r=C("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}(b,g);if(null!=e)return{data:e,getHeader:q,requestOptions:g.requestOptions,url:g.url};b.after||b.error||(b=null)}if(e=g.url,"image"===(t=g.requestOptions).responseType){if((0,a.Z)("host-webworker")||(0,a.Z)("host-node"))throw C("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),g)}else if(i)throw C("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),g);if("head"===t.method){if(t.body)throw C("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),g);if(i||y)throw C("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),g)}if(await async function(){(0,a.Z)("host-webworker")?f||(f=await r.e(9884).then(r.bind(r,29884))):p._abortableFetch||(p._abortableFetch=globalThis.fetch.bind(globalThis))}(),f)return f.execute(e,t);const k=new AbortController;(0,c.fu)(t,(()=>k.abort()));const T={controller:k,credential:null,credentialToken:null,fetchOptions:null,hasToken:!1,interceptor:b,params:g,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},L=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,n=e.controller.signal,a=r.body;let i=null,l=null,u=null;if(w&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(l=a,i=new FormData(l))),"string"==typeof a&&(u=a),e.fetchOptions={cache:r.cacheBust&&!p._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:n},(i||u)&&(e.fetchOptions.body=i||u),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query&&r.query.token||i&&i.get&&i.get("token")||l&&l.elements.token),!e.hasToken&&s.Z.apiKey&&(0,d.r)(t)&&(r.query||(r.query={}),r.query.token=s.Z.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!v(t)&&!(0,c.Hc)(n)){let s;"immediate"===r.authMode?(await O(),s=await o.id.getCredential(t,{signal:n}),e.credential=s):"no-prompt"===r.authMode?(await O(),s=await o.id.getCredential(t,{prompt:!1,signal:n}).catch((()=>{})),e.credential=s):o.id&&(s=o.id.findCredential(t)),s&&(e.credentialToken=s.token,e.useSSL=!!s.ssl)}}(e);try{do{[t,r]=await E(e)}while(!await S(e,t,r))}catch(r){const s=C("request:server",r,e.params,t);throw s.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(s),s}const n=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,u.kl)(n)){const e=(0,u.P$)(n,!0);e&&m.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,h.Hu)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&o.id){const e=o.id.findServerInfo(a.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,a.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t.headers.get(e):q,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(T);return b?.after?.(L),L}let f;const m=s.Z.request,w="FormData"in globalThis,y=[499,498,403,401],g=["COM_0056","COM_0057","SB_0008"],b=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],q=()=>null,k=Symbol();function T(e){const t=(0,u.P$)(e);return!t||t.endsWith(".arcgis.com")||p._corsServers.includes(t)||(0,u.kl)(t)}function C(e,t,r,s){let o="Error";const a={url:r.url,requestOptions:r.requestOptions,getHeader:q,ssl:!1};if(t instanceof n.Z)return t.details?(t.details=(0,i.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(e=>s.headers.get(e)),r=s&&s.status,n=t.message;n&&(o=n),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=k in t?t[k]:t}return(0,c.D_)(t)?(0,c.zE)():new n.Z(e,o,a)}async function O(){o.id||await Promise.all([r.e(280),r.e(1400),r.e(3879)]).then(r.bind(r,28153))}function v(e){return b.some((t=>t.test(e)))}async function E(e){let t=e.params.url;const r=e.params.requestOptions,s=e.fetchOptions,n=(0,u.jc)(t)||(0,u.HK)(t),i=r.responseType||"json",l=n?0:null!=r.timeout?r.timeout:m.timeout;let d=!1;if(!n){e.useSSL&&(t=(0,u.hO)(t)),r.cacheBust&&"default"===s.cache&&(t=(0,u.ZN)(t,"request.preventCache",Date.now()));let n={...r.query};e.credentialToken&&(n.token=e.credentialToken);let i=(0,u.B7)(n);(0,a.Z)("esri-url-encodes-apostrophe")&&(i=i.replace(/'/g,"%27"));const l=t.length+1+i.length;let c;d="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>m.maxUrlLength;const p=r.useProxy||!!(0,u.ed)(t);if(p){const e=(0,u.b7)(t);c=e.path,!d&&c.length+1+l>m.maxUrlLength&&(d=!0),e.query&&(n={...e.query,...n})}if("HEAD"===s.method&&(d||p)){if(d){if(l>m.maxUrlLength)throw C("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw C("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(p)throw C("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(d?(s.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,u.fl)(t,n):(s.body=(0,u.B7)(n),s.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,u.fl)(t,n),p&&(e.useProxy=!0,t=`${c}?${t}`),n.token&&w&&s.body instanceof FormData){const e=s.body;e.set?e.set("token",n.token):e.append("token",n.token)}if(r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,u.D6)(t,(0,u.TI)()))if((0,u.kl)(t))e.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(t);r&&r.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(s.credentials="include",(0,h.jH)(t)&&await(0,h.jz)(d?(0,u.fl)(t,n):t))}let f,y,g=0,b=!1;l>0&&(g=setTimeout((()=>{b=!0,e.controller.abort()}),l));try{if("native-request-init"===r.responseType)y=s,y.url=t;else if("image"!==r.responseType||"default"!==s.cache||"GET"!==s.method||d||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!n&&!e.useProxy&&m.proxyUrl&&!T(t)){if(f=await p._abortableFetch(t,s),e.useProxy||function(e){const t=(0,u.P$)(e);t&&!p._corsServers.includes(t)&&p._corsServers.push(t)}(t),"native"===r.responseType)y=f;else if("HEAD"!==s.method)if(f.ok){switch(i){case"array-buffer":y=await f.arrayBuffer();break;case"blob":case"image":y=await f.blob();break;default:y=await f.text()}if(g&&(clearTimeout(g),g=0),"json"===i||"xml"===i||"document"===i)if(y)switch(i){case"json":y=JSON.parse(y);break;case"xml":y=L(y,"application/xml");break;case"document":y=L(y,"text/html")}else y=null;if(y){if("array-buffer"===i||"blob"===i){const e=f.headers.get("Content-Type");if(/application\/json|text\/plain/i.test(e)&&y["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(y).json();e.error&&(y=e)}catch{}}"image"===i&&y instanceof Blob&&(y=await x(URL.createObjectURL(y),e,!0))}}else y=await f.text()}else y=await x(t,e)}catch(s){if("AbortError"===s.name){if(b)throw new Error("Timeout exceeded");throw(0,c.zE)("Request canceled")}if(!(!f&&s instanceof TypeError&&m.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||T(t))throw s;e.redoRequest=!0,(0,u.tD)({proxyUrl:m.proxyUrl,urlPrefix:(0,u.P$)(t)})}finally{g&&clearTimeout(g)}return[f,y]}function L(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function S(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let n,a,i,l;if(!t.ok)throw n=new Error(`Unable to load ${t.url} status: ${t.status}`),n[k]=r,n;r?.error&&(n=r.error),n&&(a=Number(n.code),i=n.hasOwnProperty("subcode")?Number(n.subcode):null,l=n.messageCode,l=l&&l.toUpperCase());const c=s.authMode;if(403===a&&(4===i||n.message&&n.message.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&y.includes(a)&&!v(e.params.url)&&(403!==a||!g.includes(l)&&(null==i||2===i&&e.credentialToken))){await O();try{const t=await o.id.getCredential(e.params.url,{error:C("request:server",n,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=null,e.credentialToken=null,!1;n=t}}if(n)throw n;return!0}function x(e,t,r=!1){const s=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchpriority=m.priority,o.src=e,(0,h.fY)(o,e,r,s)}p._abortableFetch=null,p._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>n});var s=r(17452);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function n(e){const t=(0,s.P$)(e,!0);return t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>u,fY:()=>l,jH:()=>d,jz:()=>h});var s=r(68773),o=r(80442),n=r(70586),a=r(95330),i=r(17452);function l(e,t,r=!1,s){return new Promise(((i,l)=>{if((0,a.Hc)(s))return void l(c());let u=()=>{p(),l(new Error(`Unable to load ${t}`))},d=()=>{const t=e;p(),i(t)},h=()=>{if(!e)return;const t=e;p(),t.src="",l(c())};const p=()=>{(0,o.Z)("esri-image-decode")||(e.removeEventListener("error",u),e.removeEventListener("load",d)),u=null,d=null,e=null,(0,n.pC)(s)&&s.removeEventListener("abort",h),h=null,r&&URL.revokeObjectURL(t)};(0,n.pC)(s)&&s.addEventListener("abort",h),(0,o.Z)("esri-image-decode")?e.decode().then(d,u):(e.addEventListener("error",u),e.addEventListener("load",d))}))}function c(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function u(e){s.Z.request.crossOriginNoCorsDomains||(s.Z.request.crossOriginNoCorsDomains={});const t=s.Z.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,i.P$)(r)]=0:(t[(0,i.P$)("http://"+r)]=0,t[(0,i.P$)("https://"+r)]=0)}function d(e){const t=s.Z.request.crossOriginNoCorsDomains;if(t){let r=(0,i.P$)(e);if(r)return r=r.toLowerCase(),!(0,i.D6)(r,(0,i.TI)())&&t[r]<Date.now()-36e5}return!1}async function h(e){const t=s.Z.request.crossOriginNoCorsDomains;t&&(t[(0,i.P$)(e).toLowerCase()]=Date.now());const r=(0,i.mN)(e);e=r.path,"json"===r.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2485],{57435:(e,t,r)=>{r.d(t,{Z:()=>d});var s=r(43697),o=r(80539),i=r(3920),n=r(70586),a=(r(95330),r(26258),r(87538)),l=r(5600),p=(r(67676),r(80442),r(75215),r(52011));let u=class extends((0,i.p)(o.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,a.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,n.pC)(this.getCollections)?this.getCollections():null;if((0,n.Wi)(e))return void this.removeAll();let t=0;for(const r of e)(0,n.pC)(r)&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new o.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,l.Cb)()],u.prototype,"getCollections",void 0),(0,s._)([(0,l.Cb)()],u.prototype,"getChildrenFunction",void 0),(0,s._)([(0,l.Cb)()],u.prototype,"itemFilterFunction",void 0),u=(0,s._)([(0,p.j)("esri.core.CollectionFlattener")],u);const d=u},68668:(e,t,r)=>{r.d(t,{G:()=>a,w:()=>l});var s=r(66643),o=r(80539),i=r(83379),n=r(70586);async function a(e,t){return await e.load(),l(e,t)}async function l(e,t){const r=[],a=(...e)=>{for(const t of e)(0,n.Wi)(t)||(Array.isArray(t)?a(...t):o.Z.isCollection(t)?t.forEach((e=>a(e))):i.Z.isLoadable(t)&&r.push(t))};t(a);let l=null;if(await(0,s.UI)(r,(async e=>{!1!==(await(0,s.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load())).ok||l||(l=e)})),l)throw l.loadError;return e}},42033:(e,t,r)=>{r.d(t,{E:()=>o,_:()=>i});var s=r(70586);async function o(e,t){const{WhereClause:s}=await Promise.resolve().then(r.bind(r,41534));return s.create(e,t)}function i(e,t){return(0,s.pC)(e)?(0,s.pC)(t)?`(${e}) AND (${t})`:e:t}},30223:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$e});var s=r(43697),o=r(80539),i=r(57435),n=r(20102),a=r(22974),l=r(68668),p=r(92604),u=r(70586),d=r(16453),y=r(95330),c=r(17452),h=r(5600),b=r(75215),f=r(71715),v=r(52011),g=r(82971),m=r(87085),_=r(51773),C=(r(16050),r(12501),r(95088),r(92271),r(5499),r(84382),r(30687),r(91423),r(32400)),w=r(3172),S=r(35454),I=r(83379),x=r(609),F=(r(67676),r(80442),r(36030)),j=r(6570),O=r(3121),T=r(10699),A=r(21506);let L=class extends((0,T.I)(d.w)){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:void 0}};(0,s._)([(0,h.Cb)({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],L.prototype,"title",void 0),(0,s._)([(0,f.r)("service","title",["alias","name"])],L.prototype,"readTitle",null),(0,s._)([(0,h.Cb)()],L.prototype,"layer",void 0),(0,s._)([(0,h.Cb)({type:b.z8,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],L.prototype,"id",void 0),(0,s._)([(0,f.r)("service","id")],L.prototype,"readIdOnlyOnce",null),(0,s._)([(0,h.Cb)((0,A.Lx)(String))],L.prototype,"modelName",void 0),(0,s._)([(0,h.Cb)((0,A.Lx)(Boolean))],L.prototype,"isEmpty",void 0),(0,s._)([(0,h.Cb)({type:Boolean,json:{name:"visibility",write:!0}})],L.prototype,"visible",void 0),(0,s._)([(0,h.Cb)({type:Number,json:{write:!0}})],L.prototype,"opacity",void 0),L=(0,s._)([(0,v.j)("esri.layers.buildingSublayers.BuildingSublayer")],L);const q=L;var R=r(15506),P=r(53518),B=r(99514),U=r(61064),E=r(51161),M=r(57444),k=r(32163),N=r(20682);const D=p.Z.getLogger("esri.layers.buildingSublayers.BuildingComponentSublayer"),Z=(0,P.v)();let Q=class extends(I.Z.LoadableMixin((0,x.v)(q))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.fields=null,this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl.path}/sublayers/${this.id}`,query:this.layer.parsedUrl.query}:null}get fieldsIndex(){return new B.Z(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,s=t.associatedLayerID;return(0,u.pC)(r)&&"number"==typeof s?new O.default({portalItem:r,layerId:s}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return(0,u.pC)(this.associatedLayer)?this.associatedLayer.displayField:null}get apiKey(){return this.layer.apiKey}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=(0,u.pC)(e)?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=(0,U.T)(this.parsedUrl.path,this.rootNode,this.nodePages,this.apiKey,D,t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return(0,k.eZ)(this,e)}async _fetchService(e){const t=(await(0,w.default)(this.parsedUrl.path,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&(0,u.pC)(this.associatedLayer)?this.associatedLayer.getFeatureType(e):null}get types(){return(0,u.pC)(this.associatedLayer)?this.associatedLayer.types:[]}get typeIdField(){return(0,u.pC)(this.associatedLayer)?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=(0,u.pC)(this.associatedLayer)&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:R.C,{query:t,data:{supportsZ:r,supportsM:s,isVersioned:o}}=e;return{query:t,data:{supportsZ:r,supportsM:s,isVersioned:o}}}createQuery(){const e=new M.Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:(0,u.pC)(this.associatedLayer)}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return(0,u.pC)(e)&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),(0,u.Wi)(this.associatedLayer))throw new n.Z("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n.Z("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};(0,s._)([(0,h.Cb)({readOnly:!0})],Q.prototype,"parsedUrl",null),(0,s._)([(0,h.Cb)({type:E.U4,readOnly:!0})],Q.prototype,"nodePages",void 0),(0,s._)([(0,h.Cb)({type:[E.QI],readOnly:!0})],Q.prototype,"materialDefinitions",void 0),(0,s._)([(0,h.Cb)({type:[E.Yh],readOnly:!0})],Q.prototype,"textureSetDefinitions",void 0),(0,s._)([(0,h.Cb)({type:[E.H3],readOnly:!0})],Q.prototype,"geometryDefinitions",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],Q.prototype,"serviceUpdateTimeStamp",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],Q.prototype,"store",void 0),(0,s._)([(0,h.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],Q.prototype,"rootNode",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],Q.prototype,"attributeStorageInfo",void 0),(0,s._)([(0,h.Cb)(Z.fields)],Q.prototype,"fields",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],Q.prototype,"fieldsIndex",null),(0,s._)([(0,h.Cb)({readOnly:!0,type:O.default})],Q.prototype,"associatedLayer",void 0),(0,s._)([(0,f.r)("service","associatedLayer",["associatedLayerID"])],Q.prototype,"readAssociatedLayer",null),(0,s._)([(0,h.Cb)(Z.outFields)],Q.prototype,"outFields",void 0),(0,s._)([(0,h.Cb)({type:String,readOnly:!0})],Q.prototype,"objectIdField",null),(0,s._)([(0,h.Cb)({readOnly:!0,type:String,json:{read:!1}})],Q.prototype,"displayField",null),(0,s._)([(0,h.Cb)({readOnly:!0,type:String})],Q.prototype,"apiKey",null),(0,s._)([(0,h.Cb)({readOnly:!0,type:j.Z})],Q.prototype,"fullExtent",null),(0,s._)([(0,h.Cb)({readOnly:!0,type:g.Z})],Q.prototype,"spatialReference",null),(0,s._)([(0,h.Cb)({readOnly:!0})],Q.prototype,"version",null),(0,s._)([(0,h.Cb)({readOnly:!0,type:N.Z})],Q.prototype,"elevationInfo",null),(0,s._)([(0,h.Cb)({readOnly:!0,type:Number})],Q.prototype,"minScale",null),(0,s._)([(0,h.Cb)({readOnly:!0,type:Number})],Q.prototype,"maxScale",null),(0,s._)([(0,h.Cb)({readOnly:!0,type:Number})],Q.prototype,"effectiveScaleRange",null),(0,s._)([(0,h.Cb)({type:["hide","show"],json:{write:!0}})],Q.prototype,"listMode",void 0),(0,s._)([(0,h.Cb)({types:C.o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Q.prototype,"renderer",void 0),(0,s._)([(0,h.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Q.prototype,"definitionExpression",void 0),(0,s._)([(0,h.Cb)(A.C_)],Q.prototype,"popupEnabled",void 0),(0,s._)([(0,h.Cb)({type:_.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Q.prototype,"popupTemplate",void 0),(0,s._)([(0,h.Cb)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Q.prototype,"normalReferenceFrame",void 0),(0,s._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],Q.prototype,"defaultPopupTemplate",null),(0,s._)([(0,h.Cb)()],Q.prototype,"types",null),(0,s._)([(0,h.Cb)()],Q.prototype,"typeIdField",null),(0,s._)([(0,h.Cb)({json:{write:!1}}),(0,F.J)(new S.X({"3DObject":"3d-object",Point:"point"}))],Q.prototype,"layerType",void 0),(0,s._)([(0,h.Cb)()],Q.prototype,"geometryType",null),(0,s._)([(0,h.Cb)()],Q.prototype,"profile",null),(0,s._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],Q.prototype,"capabilities",null),Q=(0,s._)([(0,v.j)("esri.layers.buildingSublayers.BuildingComponentSublayer")],Q);const V=Q;var z,K=r(20941);const W={type:o.Z,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:$}}},read:!1}};function $(e,t,r){if(e&&Array.isArray(e))return new o.Z(e.map((e=>{const t=function(e){return"group"===e.layerType?G:V}(e);if(t){const s=new t;return s.read(e,r),s}r&&r.messages&&e&&r.messages.push(new K.Z("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r}))})))}let G=z=class extends q{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return(0,l.w)(this,(e=>z.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)}))))}};var J;(0,s._)([(0,h.Cb)({type:["hide","show","hide-children"],json:{write:!0}})],G.prototype,"listMode",void 0),(0,s._)([(0,h.Cb)(W)],G.prototype,"sublayers",void 0),G=z=(0,s._)([(0,v.j)("esri.layers.buildingSublayers.BuildingGroupSublayer")],G),(J=G||(G={})).sublayersProperty=W,J.readSublayers=$,J.forEachSublayer=function e(t,r){t.forEach((t=>{r(t),"building-group"===t.type&&e(t.sublayers,r)}))};const H=G;var Y=r(54295),X=r(17287),ee=r(38009),te=r(16859),re=r(72965),se=r(32271),oe=r(96674),ie=r(41123);let ne=class extends oe.wq{constructor(){super(...arguments),this.type=null}};(0,s._)([(0,h.Cb)({type:String,readOnly:!0,json:{write:!0}})],ne.prototype,"type",void 0),ne=(0,s._)([(0,v.j)("esri.layers.support.BuildingFilterAuthoringInfo")],ne);const ae=ne;var le;let pe=le=class extends oe.wq{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new le({filterType:this.filterType,filterValues:(0,a.d9)(this.filterValues)})}};(0,s._)([(0,h.Cb)({type:String,json:{write:!0}})],pe.prototype,"filterType",void 0),(0,s._)([(0,h.Cb)({type:[String],json:{write:!0}})],pe.prototype,"filterValues",void 0),pe=le=(0,s._)([(0,v.j)("esri.layers.support.BuildingFilterAuthoringInfoType")],pe);const ue=pe;var de;const ye=o.Z.ofType(ue);let ce=de=class extends oe.wq{clone(){return new de({filterTypes:(0,a.d9)(this.filterTypes)})}};(0,s._)([(0,h.Cb)({type:ye,json:{write:!0}})],ce.prototype,"filterTypes",void 0),ce=de=(0,s._)([(0,v.j)("esri.layers.support.BuildingFilterAuthoringInfoBlock")],ce);const he=ce;var be;const fe=o.Z.ofType(he);let ve=be=class extends ae{constructor(){super(...arguments),this.type="checkbox"}clone(){return new be({filterBlocks:(0,a.d9)(this.filterBlocks)})}};(0,s._)([(0,h.Cb)({type:["checkbox"]})],ve.prototype,"type",void 0),(0,s._)([(0,h.Cb)({type:fe,json:{write:!0}})],ve.prototype,"filterBlocks",void 0),ve=be=(0,s._)([(0,v.j)("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],ve);const ge=ve;let me=class extends oe.wq{};(0,s._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],me.prototype,"type",void 0),me=(0,s._)([(0,v.j)("esri.layers.support.BuildingFilterMode")],me);const _e=me;var Ce;let we=Ce=class extends _e{constructor(){super(...arguments),this.type="solid"}clone(){return new Ce}};(0,s._)([(0,h.Cb)({type:["solid"],readOnly:!0,json:{write:!0}})],we.prototype,"type",void 0),we=Ce=(0,s._)([(0,v.j)("esri.layers.support.BuildingFilterModeSolid")],we);const Se=we;var Ie,xe=r(56332);let Fe=Ie=class extends _e{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new Ie({edges:(0,a.d9)(this.edges)})}};(0,s._)([(0,F.J)({wireFrame:"wire-frame"})],Fe.prototype,"type",void 0),(0,s._)([(0,h.Cb)(xe.Z)],Fe.prototype,"edges",void 0),Fe=Ie=(0,s._)([(0,v.j)("esri.layers.support.BuildingFilterModeWireFrame")],Fe);const je=Fe;var Oe;let Te=Oe=class extends _e{constructor(){super(...arguments),this.type="x-ray"}clone(){return new Oe}};(0,s._)([(0,h.Cb)({type:["x-ray"],readOnly:!0,json:{write:!0}})],Te.prototype,"type",void 0),Te=Oe=(0,s._)([(0,v.j)("esri.layers.support.BuildingFilterModeXRay")],Te);const Ae=Te;var Le;const qe={nonNullable:!0,types:{key:"type",base:_e,typeMap:{solid:Se,"wire-frame":je,"x-ray":Ae}},json:{read:e=>{switch(e&&e.type){case"solid":return Se.fromJSON(e);case"wireFrame":return je.fromJSON(e);case"x-ray":return Ae.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let Re=Le=class extends oe.wq{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new Se,this.title=""}clone(){return new Le({filterExpression:this.filterExpression,filterMode:(0,a.d9)(this.filterMode),title:this.title})}};(0,s._)([(0,h.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Re.prototype,"filterExpression",void 0),(0,s._)([(0,h.Cb)(qe)],Re.prototype,"filterMode",void 0),(0,s._)([(0,h.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Re.prototype,"title",void 0),Re=Le=(0,s._)([(0,v.j)("esri.layers.support.BuildingFilterBlock")],Re);const Pe=Re;var Be;const Ue=o.Z.ofType(Pe);let Ee=Be=class extends oe.wq{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=(0,ie.D)(),this.name=null}clone(){return new Be({description:this.description,filterBlocks:(0,a.d9)(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:(0,a.d9)(this.filterAuthoringInfo)})}};(0,s._)([(0,h.Cb)({type:String,json:{write:!0}})],Ee.prototype,"description",void 0),(0,s._)([(0,h.Cb)({type:Ue,json:{write:{enabled:!0,isRequired:!0}}})],Ee.prototype,"filterBlocks",void 0),(0,s._)([(0,h.Cb)({types:{key:"type",base:ae,typeMap:{checkbox:ge}},json:{read:e=>"checkbox"===(e&&e.type)?ge.fromJSON(e):null,write:!0}})],Ee.prototype,"filterAuthoringInfo",void 0),(0,s._)([(0,h.Cb)({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],Ee.prototype,"id",void 0),(0,s._)([(0,h.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Ee.prototype,"name",void 0),Ee=Be=(0,s._)([(0,v.j)("esri.layers.support.BuildingFilter")],Ee);const Me=Ee,ke=p.Z.getLogger("esri.layers.support.BuildingSummaryStatistics");let Ne=class extends oe.wq{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};(0,s._)([(0,h.Cb)({type:String})],Ne.prototype,"fieldName",void 0),(0,s._)([(0,h.Cb)({type:String})],Ne.prototype,"modelName",void 0),(0,s._)([(0,h.Cb)({type:String})],Ne.prototype,"label",void 0),(0,s._)([(0,h.Cb)({type:Number})],Ne.prototype,"min",void 0),(0,s._)([(0,h.Cb)({type:Number})],Ne.prototype,"max",void 0),(0,s._)([(0,h.Cb)({json:{read:e=>Array.isArray(e)&&(e.every((e=>"string"==typeof e))||e.every((e=>"number"==typeof e)))?e.slice():null}})],Ne.prototype,"mostFrequentValues",void 0),(0,s._)([(0,h.Cb)({type:[Number]})],Ne.prototype,"subLayerIds",void 0),Ne=(0,s._)([(0,v.j)("esri.layers.support.BuildingFieldStatistics")],Ne);let De=class extends(I.Z.LoadableMixin((0,x.v)(oe.wq))){constructor(){super(...arguments),this.url=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(ke.error("building summary statistics are not loaded"),null)}load(e){const t=(0,u.pC)(e)?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await(0,w.default)(this.url,{query:{f:"json"},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};(0,s._)([(0,h.Cb)({constructOnly:!0,type:String})],De.prototype,"url",void 0),(0,s._)([(0,h.Cb)({readOnly:!0,type:[Ne],json:{read:{source:"summary"}}})],De.prototype,"fields",null),De=(0,s._)([(0,v.j)("esri.layers.support.BuildingSummaryStatistics")],De);const Ze=De;var Qe=r(14147);const Ve=p.Z.getLogger("esri.layers.BuildingSceneLayer"),ze=o.Z.ofType(Me),Ke=(0,a.d9)(H.sublayersProperty);Ke.json.origins["web-scene"]={type:[V],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},Ke.json.origins["portal-item"]={type:[V],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}};let We=class extends((0,se.Vt)((0,X.Y)((0,ee.q)((0,te.I)((0,re.M)((0,d.R)((0,Y.V)(m.Z)))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new i.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this.sublayerOverrides=null,this.filters=new ze,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const s=H.readSublayers(e,t,r);return H.forEachSublayer(s,(e=>e.layer=this)),this.sublayerOverrides&&(this.applySublayerOverrides(s,this.sublayerOverrides),this.sublayerOverrides=null),s}applySublayerOverrides(e,{overrides:t,context:r}){H.forEachSublayer(e,(e=>e.read(t.get(e.id),r)))}readSublayerOverrides(e,t){const r=new Map;for(const s of e)null!=s&&"object"==typeof s&&"number"==typeof s.id?r.set(s.id,s):t.messages.push(new n.Z("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:s}));return{overrides:r,context:t}}writeSublayerOverrides(e,t,r){const s=[];H.forEachSublayer(this.sublayers,(e=>{const t=e.write({},r);Object.keys(t).length>1&&s.push(t)})),s.length>0&&(t.sublayers=s)}writeUnappliedOverrides(e,t){t.sublayers=[],e.overrides.forEach((e=>{t.sublayers.push((0,a.d9)(e))}))}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?this.writeSublayerOverrides(this.sublayers,e,t):this.sublayerOverrides&&this.writeUnappliedOverrides(this.sublayerOverrides,e)),e}read(e,t){if(super.read(e,t),t&&("web-scene"===t.origin||"portal-item"===t.origin)&&null!=e&&Array.isArray(e.sublayers)){const r=this.readSublayerOverrides(e.sublayers,t);this.sublayers?this.applySublayerOverrides(this.sublayers,r):this.sublayerOverrides=r}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef){const e=(0,c.v_)(this.parsedUrl.path,t.statisticsHRef);return new Ze({url:e})}return null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}load(e){const t=(0,u.pC)(e)?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.r9).then((()=>this._fetchService(t))).then((()=>this._fetchAssociatedFeatureService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return(0,l.G)(this,(e=>{H.forEachSublayer(this.sublayers,(t=>{"building-group"!==t.type&&e(t)})),this.summaryStatistics&&e(this.summaryStatistics)}))}async saveAs(e,t){return this._debouncedSaveOperations(se.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(se.xp.SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new n.Z("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}_validateElevationInfo(){const e=this.elevationInfo;e&&("absolute-height"!==e.mode&&Ve.warn(".elevationInfo=","Building scene layers only support absolute-height elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&Ve.warn(".elevationInfo=","Building scene layers do not support featureExpressionInfo"))}async _fetchAssociatedFeatureService(e){const t=new Qe.W(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedFeatureServiceItem=await t.fetchPortalItem()}catch(e){Ve.warn("Associated feature service item could not be loaded",e)}}};(0,s._)([(0,h.Cb)({type:["BuildingSceneLayer"]})],We.prototype,"operationalLayerType",void 0),(0,s._)([(0,h.Cb)({readOnly:!0})],We.prototype,"allSublayers",void 0),(0,s._)([(0,h.Cb)(Ke)],We.prototype,"sublayers",void 0),(0,s._)([(0,f.r)("service","sublayers")],We.prototype,"readSublayers",null),(0,s._)([(0,h.Cb)({type:ze,nonNullable:!0,json:{write:!0}})],We.prototype,"filters",void 0),(0,s._)([(0,h.Cb)({type:String,json:{write:!0}})],We.prototype,"activeFilterId",void 0),(0,s._)([(0,h.Cb)({readOnly:!0,type:Ze})],We.prototype,"summaryStatistics",void 0),(0,s._)([(0,f.r)("summaryStatistics",["statisticsHRef"])],We.prototype,"readSummaryStatistics",null),(0,s._)([(0,h.Cb)({type:[String],json:{read:!1}})],We.prototype,"outFields",void 0),(0,s._)([(0,h.Cb)(A.vg)],We.prototype,"fullExtent",void 0),(0,s._)([(0,h.Cb)({type:["show","hide","hide-children"]})],We.prototype,"listMode",void 0),(0,s._)([(0,h.Cb)((0,A.Lx)(g.Z))],We.prototype,"spatialReference",void 0),(0,s._)([(0,h.Cb)(A.PV)],We.prototype,"elevationInfo",null),(0,s._)([(0,h.Cb)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,s._)([(0,h.Cb)()],We.prototype,"associatedFeatureServiceItem",void 0),We=(0,s._)([(0,v.j)("esri.layers.BuildingSceneLayer")],We);const $e=We},14147:(e,t,r)=>{r.d(t,{W:()=>u});var s=r(40330),o=r(3172),i=r(70586),n=r(95330),a=r(3121),l=r(65587),p=r(15235);class u{constructor(e,t,r,s){this.parsedUrl=e,this.portalItem=t,this.apiKey=r,this.signal=s,this.rootDocument=null;const o=this.parsedUrl.path.match(/^(.*)\/SceneServer\/layers\/([\d]*)\/?$/i);o&&(this.urlParts={root:o[1],layerId:parseInt(o[2],10)})}async fetch(){if(!this.urlParts)return null;const e=this.portalItem??await this._portalItemFromServiceItemId();if((0,i.Wi)(e))return this._loadFromUrl();const t=await this._findAndLoadRelatedPortalItem(e);return(0,i.Wi)(t)?null:this._loadFeatureLayerFromPortalItem(t)}async fetchPortalItem(){if(!this.urlParts)return null;const e=this.portalItem??await this._portalItemFromServiceItemId();return(0,i.Wi)(e)?null:this._findAndLoadRelatedPortalItem(e)}async _fetchRootDocument(){if((0,i.pC)(this.rootDocument))return this.rootDocument;if((0,i.Wi)(this.urlParts))return this.rootDocument={},{};const e={query:{f:"json",token:this.apiKey},responseType:"json",signal:this.signal},t=`${this.urlParts.root}/SceneServer`;try{const r=await(0,o.default)(t,e);this.rootDocument=r.data}catch{this.rootDocument={}}return this.rootDocument}async _fetchServiceOwningPortalUrl(){const e=s.id?.findServerInfo(this.parsedUrl.path);if(e?.owningSystemUrl)return e.owningSystemUrl;const t=this.parsedUrl.path.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const e=(await(0,o.default)(t,{query:{f:"json"},responseType:"json",signal:this.signal})).data.owningSystemUrl;if(e)return e}catch(e){(0,n.r9)(e)}return null}async _findAndLoadRelatedPortalItem(e){try{return(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:this.signal})).find((e=>"Feature Service"===e.type))||null}catch(e){return(0,n.r9)(e),null}}async _loadFeatureLayerFromPortalItem(e){await e.load({signal:this.signal});const t=await this._findMatchingAssociatedSublayerUrl(e.url);return new a.default({url:t,portalItem:e}).load({signal:this.signal})}async _loadFromUrl(){const e=await this._findMatchingAssociatedSublayerUrl(`${this.urlParts.root}/FeatureServer`);return new a.default({url:e}).load({signal:this.signal})}async _findMatchingAssociatedSublayerUrl(e){const t=e.replace(/^(.*FeatureServer)(\/[\d]*\/?)?$/i,"$1"),r={query:{f:"json"},responseType:"json",authMode:"no-prompt",signal:this.signal},s=this.urlParts.layerId,i=this._fetchRootDocument(),n=(0,o.default)(t,r),[a,l]=await Promise.all([n,i]),p=l&&l.layers,u=a.data&&a.data.layers;if(!Array.isArray(u))throw new Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,u.length);e++)if(p[e].id===s)return`${t}/${u[e].id}`}else if(s<u.length)return`${t}/${u[s].id}`;throw new Error("could not find matching associated sublayer")}async _portalItemFromServiceItemId(){const e=(await this._fetchRootDocument()).serviceItemId;if(!e)return null;const t=new p.default({id:e,apiKey:this.apiKey}),r=await this._fetchServiceOwningPortalUrl();(0,i.pC)(r)&&(t.portal=new l.Z({url:r}));try{return t.load({signal:this.signal})}catch(e){return(0,n.r9)(e),null}}}},51161:(e,t,r)=>{r.d(t,{H3:()=>v,QI:()=>d,U4:()=>l,Yh:()=>c});var s=r(43697),o=r(96674),i=r(5600),n=(r(67676),r(80442),r(75215),r(36030)),a=r(52011);let l=class extends o.wq{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,s._)([(0,i.Cb)({type:Number})],l.prototype,"nodesPerPage",void 0),(0,s._)([(0,i.Cb)({type:Number})],l.prototype,"rootIndex",void 0),(0,s._)([(0,i.Cb)({type:String})],l.prototype,"lodSelectionMetricType",void 0),l=(0,s._)([(0,a.j)("esri.layer.support.I3SNodePageDefinition")],l);let p=class extends o.wq{constructor(){super(...arguments),this.factor=1}};(0,s._)([(0,i.Cb)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],p.prototype,"id",void 0),(0,s._)([(0,i.Cb)({type:Number})],p.prototype,"factor",void 0),p=(0,s._)([(0,a.j)("esri.layer.support.I3SMaterialTexture")],p);let u=class extends o.wq{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,s._)([(0,i.Cb)({type:[Number]})],u.prototype,"baseColorFactor",void 0),(0,s._)([(0,i.Cb)({type:p})],u.prototype,"baseColorTexture",void 0),(0,s._)([(0,i.Cb)({type:p})],u.prototype,"metallicRoughnessTexture",void 0),(0,s._)([(0,i.Cb)({type:Number})],u.prototype,"metallicFactor",void 0),(0,s._)([(0,i.Cb)({type:Number})],u.prototype,"roughnessFactor",void 0),u=(0,s._)([(0,a.j)("esri.layer.support.I3SMaterialPBRMetallicRoughness")],u);let d=class extends o.wq{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,s._)([(0,n.J)({opaque:"opaque",mask:"mask",blend:"blend"})],d.prototype,"alphaMode",void 0),(0,s._)([(0,i.Cb)({type:Number})],d.prototype,"alphaCutoff",void 0),(0,s._)([(0,i.Cb)({type:Boolean})],d.prototype,"doubleSided",void 0),(0,s._)([(0,n.J)({none:"none",back:"back",front:"front"})],d.prototype,"cullFace",void 0),(0,s._)([(0,i.Cb)({type:p})],d.prototype,"normalTexture",void 0),(0,s._)([(0,i.Cb)({type:p})],d.prototype,"occlusionTexture",void 0),(0,s._)([(0,i.Cb)({type:p})],d.prototype,"emissiveTexture",void 0),(0,s._)([(0,i.Cb)({type:[Number]})],d.prototype,"emissiveFactor",void 0),(0,s._)([(0,i.Cb)({type:u})],d.prototype,"pbrMetallicRoughness",void 0),d=(0,s._)([(0,a.j)("esri.layer.support.I3SMaterialDefinition")],d);let y=class extends o.wq{};(0,s._)([(0,i.Cb)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],y.prototype,"name",void 0),(0,s._)([(0,n.J)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],y.prototype,"format",void 0),y=(0,s._)([(0,a.j)("esri.layer.support.I3STextureFormat")],y);let c=class extends o.wq{constructor(){super(...arguments),this.atlas=!1}};(0,s._)([(0,i.Cb)({type:[y]})],c.prototype,"formats",void 0),(0,s._)([(0,i.Cb)({type:Boolean})],c.prototype,"atlas",void 0),c=(0,s._)([(0,a.j)("esri.layer.support.I3STextureSetDefinition")],c);let h=class extends o.wq{};(0,s._)([(0,n.J)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],h.prototype,"type",void 0),(0,s._)([(0,i.Cb)({type:Number})],h.prototype,"component",void 0),h=(0,s._)([(0,a.j)("esri.layer.support.I3SGeometryAttribute")],h);let b=class extends o.wq{};(0,s._)([(0,n.J)({draco:"draco"})],b.prototype,"encoding",void 0),(0,s._)([(0,i.Cb)({type:[String]})],b.prototype,"attributes",void 0),b=(0,s._)([(0,a.j)("esri.layer.support.I3SGeometryCompressedAttributes")],b);let f=class extends o.wq{constructor(){super(...arguments),this.offset=0}};(0,s._)([(0,i.Cb)({type:Number})],f.prototype,"offset",void 0),(0,s._)([(0,i.Cb)({type:h})],f.prototype,"position",void 0),(0,s._)([(0,i.Cb)({type:h})],f.prototype,"normal",void 0),(0,s._)([(0,i.Cb)({type:h})],f.prototype,"uv0",void 0),(0,s._)([(0,i.Cb)({type:h})],f.prototype,"color",void 0),(0,s._)([(0,i.Cb)({type:h})],f.prototype,"uvRegion",void 0),(0,s._)([(0,i.Cb)({type:h})],f.prototype,"featureId",void 0),(0,s._)([(0,i.Cb)({type:h})],f.prototype,"faceRange",void 0),(0,s._)([(0,i.Cb)({type:b})],f.prototype,"compressedAttributes",void 0),f=(0,s._)([(0,a.j)("esri.layer.support.I3SGeometryBuffer")],f);let v=class extends o.wq{};(0,s._)([(0,n.J)({triangle:"triangle"})],v.prototype,"topology",void 0),(0,s._)([(0,i.Cb)()],v.prototype,"geometryBuffers",void 0),v=(0,s._)([(0,a.j)("esri.layer.support.I3SGeometryDefinition")],v)},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var s,o=r(43697),i=r(80539),n=r(96674),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011));let p=s=class extends n.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new i.Z}clone(){return new s({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=s=(0,o._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},15506:(e,t,r)=>{r.d(t,{C:()=>s});const s={attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},51706:(e,t,r)=>{var s,o;function i(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function n(e){return null!=e&&!isNaN(e)&&isFinite(e)}function a(e){return e.valueExpression?s.Expression:e.field&&"string"==typeof e.field?s.Field:s.Unknown}function l(e,t){const r=t||a(e),i=e.valueUnit||"unknown";return r===s.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===i?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}r.d(t,{PS:()=>a,QW:()=>l,RY:()=>s,hL:()=>o,iY:()=>i,qh:()=>n}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(s||(s={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3128],{57435:(e,t,r)=>{r.d(t,{Z:()=>p});var i=r(43697),s=r(80539),l=r(3920),o=r(70586),n=(r(95330),r(26258),r(87538)),a=r(5600),u=(r(67676),r(80442),r(75215),r(52011));let y=class extends((0,l.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,o.pC)(this.getCollections)?this.getCollections():null;if((0,o.Wi)(e))return void this.removeAll();let t=0;for(const r of e)(0,o.pC)(r)&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,a.Cb)()],y.prototype,"getCollections",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"getChildrenFunction",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"itemFilterFunction",void 0),y=(0,i._)([(0,u.j)("esri.core.CollectionFlattener")],y);const p=y},23670:(e,t,r)=>{r.d(t,{G:()=>s});var i=r(20102);class s{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.Z(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new s(this.major,this.minor,this._context)}static parse(e,t=""){const[r,l]=e.split("."),o=/^\s*\d+\s*$/;if(!r||!r.match||!r.match(o))throw new i.Z((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!l||!l.match||!l.match(o))throw new i.Z((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const n=parseInt(r,10),a=parseInt(l,10);return new s(n,a,t)}}},42033:(e,t,r)=>{r.d(t,{E:()=>s,_:()=>l});var i=r(70586);async function s(e,t){const{WhereClause:i}=await Promise.resolve().then(r.bind(r,41534));return i.create(e,t)}function l(e,t){return(0,i.pC)(e)?(0,i.pC)(t)?`(${e}) AND (${t})`:e:t}},54295:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(43697),s=r(5600),l=(r(67676),r(80442),r(75215),r(52011));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.APIKeyMixin")],t),t}},7944:(e,t,r)=>{r.d(t,{O:()=>h});var i=r(43697),s=r(3172),l=r(95330),o=r(17452),n=r(23670),a=r(5600),u=(r(67676),r(80442),r(75215),r(71715)),y=r(52011),p=r(6570),d=r(82971),c=r(21506);const h=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s=r.includes("data"),l=r.includes("query"),o=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),y="tile"!==i&&!!t.supportsDynamicLayers,p="tile"!==i&&(!t.tileInfo||y),d="tile"!==i&&(!t.tileInfo||y),c="tile"!==i,h=t.cimVersion&&n.G.parse(t.cimVersion),f=h?.since(1,4)??!1,b=h?.since(2,0)??!1;return{operations:{supportsExportMap:o,supportsExportTiles:a,supportsIdentify:l,supportsQuery:s,supportsTileMap:u},exportMap:o?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:c,supportsDynamicLayers:y,supportsSublayerVisibility:p,supportsSublayerDefinitionExpression:d,supportsCIMSymbols:b}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchSublayerInfo(e,t){return await this.fetchAllLayersAndTables(t),this._allLayersAndTablesMap.get(e)}async fetchAllLayersAndTables(e){await this.load(e),this._allLayersAndTablesPromise||(this._allLayersAndTablesPromise=(0,s.default)((0,o.mN)(this.url).path+"/layers",{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{this._allLayersAndTablesMap=new Map;for(const t of e.data.layers)this._allLayersAndTablesMap.set(t.id,t);return{result:e.data}}),(e=>({error:e}))));const t=await this._allLayersAndTablesPromise;if((0,l.k_)(e),"result"in t)return t.result;throw t.error}};return(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,u.r)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,a.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,a.Cb)({type:p.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,a.Cb)(c.id)],t.prototype,"id",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,a.Cb)(c.C_)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,a.Cb)({type:d.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,u.r)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,y.j)("esri.layers.mixins.ArcGISMapService")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>u});var i=r(43697),s=r(92604),l=r(70586),o=r(5600),n=(r(67676),r(80442),r(75215),r(52011)),a=r(66677);const u=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if((0,l.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,o.Cb)()],t.prototype,"title",null),(0,i._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},10343:(e,t,r)=>{r.d(t,{x:()=>m});var i=r(43697),s=r(80539),l=r(57435),o=r(20102),n=r(92604),a=r(17445),u=r(5600),y=(r(67676),r(80442),r(1153)),p=(r(75215),r(52011)),d=r(31263),c=r(49867),h=r(32073);const f=n.Z.getLogger("esri.layers.TileLayer"),b=s.Z.ofType(c.Z);function g(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&g(e.sublayers,t)}))}const m=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new l.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[d.s3.SERVICE]:{},[d.s3.PORTAL_ITEM]:{},[d.s3.WEB_SCENE]:{},[d.s3.WEB_MAP]:{}},this.own((0,a.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),a.Z_))}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,d.M9)(t.origin);if(i<d.s3.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>d.s3.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:l}=this.createSublayersForOrigin("web-document"),o=(0,y.vw)(this);o.setDefaultOrigin(l),this._set("sublayers",new b(s)),o.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,d.M9)("web-document"===e?"web-map":e);let r=d.s3.SERVICE,i=this.sublayersSourceJSON[d.s3.SERVICE].layers,s=this.sublayersSourceJSON[d.s3.SERVICE].context,l=null;const o=[d.s3.PORTAL_ITEM,d.s3.WEB_SCENE,d.s3.WEB_MAP].filter((e=>e<=t));for(const e of o){const t=this.sublayersSourceJSON[e];(0,h.ac)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(l={visibleLayers:t.visibleLayers,context:t.context}))}const n=[d.s3.PORTAL_ITEM,d.s3.WEB_SCENE,d.s3.WEB_MAP].filter((e=>e>r&&e<=t));let a=null;for(const e of n){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(a={layers:t,context:i}),r&&(l={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new c.Z;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),y=new Map,p=new Set;if(a)for(const e of a.layers)y.set(e.id,e);if(l)for(const e of l.visibleLayers)p.add(e);return g(u,(e=>{a&&e.read(y.get(e.id),a.context),l&&e.read({defaultVisibility:p.has(e.id)},l.context)})),{origin:(0,d.x3)(r),sublayers:new b({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.remove("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.handles.add(e.on("before-changes",(e=>{f.error(new o.Z("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:s.Z.ofType(c.Z)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.Cb)({value:null,type:b,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=(0,i._)([(0,p.j)("esri.layers.mixins.SublayersOwner")],t),t}},56765:(e,t,r)=>{r.d(t,{Z:()=>y});var i,s=r(43697),l=r(80539),o=r(96674),n=r(5600),a=(r(67676),r(80442),r(75215),r(52011));let u=i=class extends o.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new l.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,n.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,n.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,s._)([(0,a.j)("esri.layers.support.LayerFloorInfo")],u);const y=u},49867:(e,t,r)=>{r.d(t,{Z:()=>z});var i,s=r(43697),l=(r(66577),r(51773)),o=(r(16050),r(12501),r(95088),r(92271),r(5499),r(84382),r(30687),r(91423),r(32400)),n=r(3172),a=r(78223),u=r(80539),y=r(20102),p=r(3920),d=r(10699),c=r(22974),h=r(83379),f=r(92604),b=r(70586),g=r(16453),m=r(42033),v=r(17452),S=r(5600),I=r(1153),w=r(90578),_=r(71715),C=r(52011),E=r(30556),x=r(75215),L=r(31263),O=r(16451),D=r(1231),F=r(99514),P=r(2319),T=r(56765),A=r(10158),j=r(42843),V=r(57444),M=r(32163),N=r(6570);function Z(e){return e&&"esriSMS"===e.type}function R(e,t,r){const i=this.originIdOf(t)>=(0,L.M9)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function k(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&this._isOverridden(t)}}function U(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function $(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,L.M9)(r.origin))}}const J=f.Z.getLogger("esri.layers.support.Sublayer");let B=0;const W=new Set;W.add("layer"),W.add("parent"),W.add("loaded"),W.add("loadStatus"),W.add("loadError"),W.add("loadWarnings");let q=i=class extends((0,p.p)((0,g.R)((0,d.I)(h.Z)))){constructor(e){super(e),this.capabilities=void 0,this.fields=null,this.fullExtent=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.types=null}async load(e){return this.addResolvingPromise((async()=>{if(!this.layer&&!this.url)throw new y.Z("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});let t=null;if(!this.layer||this.originIdOf("url")>L.s3.SERVICE||"data-layer"===this.source?.type)t=(await(0,n.default)(this.url,{responseType:"json",query:{f:"json"},...e})).data;else{let r=this.id;"map-layer"===this.source?.type&&(r=this.source.mapLayerId),t=await this.layer.fetchSublayerInfo(r,e)}t&&(this.sourceJSON=t,this.read({layerDefinition:t},{origin:"service"}))})()),this}readCapabilities(e,t){const r=(e=(t=t.layerDefinition||t).capabilities||e)?e.toLowerCase().split(",").map((e=>e.trim())):[];return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r.includes("query")}}}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get fieldsIndex(){return new F.Z(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){const e=this._get("id");return null==e?B++:e}set id(e){this._get("id")!==e&&(!1!==this.get("layer.capabilities.exportMap.supportsDynamicLayers")?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition&&t.layerDefinition.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition&&t.layerDefinition.maxScale||0}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*(null!=r.transparency?r.transparency:r.drawingInfo.transparency)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,x.vU)(this.parent.id):t.parentLayerId=-1}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){if(e)for(const t of e.getSymbols())if((0,a.dU)(t)){J.warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new j.R({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,x.se)(u.Z.ofType(i),e)}writeSublayers(e,t,r){this.get("sublayers.length")&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return null}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,v.B7)(r)}`}set url(e){e?this._override("url",e):this._clearOverride("url")}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,I.vw)(this),t=new i;return(0,I.vw)(t).store=e.clone(W),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,M.eZ)(this,e)}createQuery(){return new V.Z({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=this.layer?.parsedUrl,t=new(0,(await Promise.all([r.e(6105),r.e(8326),r.e(3121)]).then(r.bind(r,3121))).default)({url:e.path});return e&&this.source&&("map-layer"===this.source.type?t.layerId=this.source.mapLayerId:t.dynamicDataSource=this.source),null!=this.layer.refreshInterval&&(t.refreshInterval=this.layer.refreshInterval),this.definitionExpression&&(t.definitionExpression=this.definitionExpression),this.floorInfo&&(t.floorInfo=(0,c.d9)(this.floorInfo)),this.originIdOf("labelingInfo")>L.s3.SERVICE&&(t.labelingInfo=(0,c.d9)(this.labelingInfo)),this.originIdOf("labelsVisible")>L.s3.DEFAULTS&&(t.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>L.s3.DEFAULTS&&(t.legendEnabled=this.legendEnabled),this.originIdOf("visible")>L.s3.DEFAULTS&&(t.visible=this.visible),this.originIdOf("minScale")>L.s3.DEFAULTS&&(t.minScale=this.minScale),this.originIdOf("maxScale")>L.s3.DEFAULTS&&(t.maxScale=this.maxScale),this.originIdOf("opacity")>L.s3.DEFAULTS&&(t.opacity=this.opacity),this.originIdOf("popupTemplate")>L.s3.DEFAULTS&&(t.popupTemplate=(0,c.d9)(this.popupTemplate)),this.originIdOf("renderer")>L.s3.SERVICE&&(t.renderer=(0,c.d9)(this.renderer)),"data-layer"===this.source?.type&&(t.dynamicDataSource=this.source.clone()),this.originIdOf("title")>L.s3.DEFAULTS&&(t.title=this.title),"map-image"===this.layer.type&&this.layer.originIdOf("customParameters")>L.s3.DEFAULTS&&(t.customParameters=this.layer.customParameters),"tile"===this.layer.type&&this.layer.originIdOf("customParameters")>L.s3.DEFAULTS&&(t.customParameters=this.layer.customParameters),t}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.get("capabilities.operations.supportsQuery"))throw new y.Z("Sublayer.queryFeatures","this layer doesn't support queries.");const[{executeQuery:i},{default:s}]=await Promise.all([Promise.resolve().then(r.bind(r,34599)),r.e(4889).then(r.bind(r,74889))]),l=await i(this.url,V.Z.from(e),this.layer?.spatialReference??null,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}}),o=s.fromJSON(l.data);if(o?.features)for(const e of o.features)e.sourceLayer=this;return o}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,m._)(e,this.definitionExpression);(0,b.pC)(r)&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>L.s3.SERVICE));if(s){const e=t.drawingInfo={};i.renderer>L.s3.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>L.s3.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>L.s3.SERVICE&&(e.labelingInfo=this.labelingInfo?this.labelingInfo.map((e=>e.write({},{origin:"service",layer:this.layer}))):null,e.showLabels=!0),i.opacity>L.s3.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline&&e.outline.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r="uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:[];for(const e of r)Z(e.symbol)&&t(e.symbol);"symbol"in e&&Z(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&Z(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,l;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",l="supportsModification"}const o=(0,I.vw)(this).getDefaultOrigin();if("service"!==o){if(s&&!1===this.get(`layer.capabilities.exportMap.${s}`))return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(l&&!1===this.get(`capabilities.exportMap.${l}`))return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${l}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==o&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.removeAll()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{const t=this.get("layer.capabilities.exportMap.supportsSublayersChanges");null==t||t||(J.error(new y.Z("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){J.error(new y.Z("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${this.layer.id}'`,{reason:t,sublayer:this,layer:this.layer}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};q.test={isMapImageLayerOverridePolicy:e=>e===U||e===R,isTileImageLayerOverridePolicy:e=>e===k},(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"capabilities",void 0),(0,s._)([(0,_.r)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],q.prototype,"readCapabilities",null),(0,s._)([(0,S.Cb)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:R}}})],q.prototype,"definitionExpression",null),(0,s._)([(0,S.Cb)({type:[D.Z],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],q.prototype,"fields",void 0),(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"fieldsIndex",null),(0,s._)([(0,S.Cb)({type:T.Z,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:R},origins:{"web-scene":{read:!1,write:!1}}}})],q.prototype,"floorInfo",null),(0,s._)([(0,S.Cb)({type:N.Z,json:{read:{source:"layerDefinition.extent"}}})],q.prototype,"fullExtent",void 0),(0,s._)([(0,S.Cb)({type:String})],q.prototype,"globalIdField",void 0),(0,s._)([(0,_.r)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],q.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,S.Cb)({type:x.z8,json:{write:{ignoreOrigin:!0}}})],q.prototype,"id",null),(0,s._)([(0,S.Cb)({value:null,type:[P.Z],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:U}}})],q.prototype,"labelingInfo",null),(0,s._)([(0,E.c)("labelingInfo")],q.prototype,"writeLabelingInfo",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:U}}})],q.prototype,"labelsVisible",null),(0,s._)([(0,S.Cb)({value:null})],q.prototype,"layer",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:$}}})],q.prototype,"legendEnabled",void 0),(0,s._)([(0,S.Cb)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],q.prototype,"listMode",null),(0,s._)([(0,S.Cb)({type:Number,value:0,json:{write:{overridePolicy:U}}})],q.prototype,"minScale",null),(0,s._)([(0,_.r)("minScale",["minScale","layerDefinition.minScale"])],q.prototype,"readMinScale",null),(0,s._)([(0,S.Cb)({type:Number,value:0,json:{write:{overridePolicy:U}}})],q.prototype,"maxScale",null),(0,s._)([(0,_.r)("maxScale",["maxScale","layerDefinition.maxScale"])],q.prototype,"readMaxScale",null),(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"effectiveScaleRange",null),(0,s._)([(0,S.Cb)({type:String})],q.prototype,"objectIdField",void 0),(0,s._)([(0,_.r)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],q.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,S.Cb)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:U}}})],q.prototype,"opacity",null),(0,s._)([(0,_.r)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],q.prototype,"readOpacity",null),(0,s._)([(0,E.c)("opacity")],q.prototype,"writeOpacity",null),(0,s._)([(0,S.Cb)({json:{type:x.z8,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:U}}})],q.prototype,"parent",void 0),(0,s._)([(0,E.c)("parent")],q.prototype,"writeParent",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:$,writer(e,t,r){t[r]=!e}}}})],q.prototype,"popupEnabled",void 0),(0,s._)([(0,S.Cb)({type:l.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:$}}})],q.prototype,"popupTemplate",void 0),(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"defaultPopupTemplate",null),(0,s._)([(0,S.Cb)({types:o.A,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:U},origins:{"web-scene":{types:o.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:U}}}}})],q.prototype,"renderer",null),(0,s._)([(0,S.Cb)({types:{key:"type",base:null,typeMap:{"data-layer":A.n,"map-layer":j.R}},cast(e){if(e){if("mapLayerId"in e)return(0,x.TJ)(j.R,e);if("dataSource"in e)return(0,x.TJ)(A.n,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:U}}})],q.prototype,"source",null),(0,s._)([(0,S.Cb)()],q.prototype,"sourceJSON",void 0),(0,s._)([(0,S.Cb)({value:null,json:{type:[x.z8],write:{target:"subLayerIds",allowNull:!0,overridePolicy:U}}})],q.prototype,"sublayers",null),(0,s._)([(0,w.p)("sublayers")],q.prototype,"castSublayers",null),(0,s._)([(0,E.c)("sublayers")],q.prototype,"writeSublayers",null),(0,s._)([(0,S.Cb)({type:String,json:{name:"name",write:{overridePolicy:$}}})],q.prototype,"title",void 0),(0,s._)([(0,S.Cb)({type:String})],q.prototype,"typeIdField",void 0),(0,s._)([(0,_.r)("typeIdField",["layerDefinition.typeIdField"])],q.prototype,"readTypeIdField",null),(0,s._)([(0,S.Cb)({type:[O.Z],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],q.prototype,"types",void 0),(0,s._)([(0,S.Cb)({type:String,json:{read:{source:"layerUrl"},write:{target:"layerUrl",overridePolicy:k}}})],q.prototype,"url",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:U}}})],q.prototype,"visible",null),(0,s._)([(0,E.c)("visible")],q.prototype,"writeVisible",null),q=i=(0,s._)([(0,C.j)("esri.layers.support.Sublayer")],q);const z=q},32073:(e,t,r)=>{r.d(t,{FN:()=>o,QV:()=>l,ac:()=>a});var i=r(70586),s=r(31263);function l(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&((0,i.Wi)(t.gdbVersion)||t.gdbVersion===r))||e.originIdOf("renderer")>s.s3.SERVICE||e.originIdOf("labelingInfo")>s.s3.SERVICE||e.originIdOf("opacity")>s.s3.SERVICE||e.originIdOf("labelsVisible")>s.s3.SERVICE}))||!n(e,t)}function n(e,t){if(!e||!e.length||(0,i.Wi)(t))return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let s=0;const l=r.length;for(const{id:t}of e){for(;s<l&&r[s]!==t;)s++;if(s>=l)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||e.layerDefinition&&null!=e.layerDefinition.minScale))}},51706:(e,t,r)=>{var i,s;function l(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function o(e){return null!=e&&!isNaN(e)&&isFinite(e)}function n(e){return e.valueExpression?i.Expression:e.field&&"string"==typeof e.field?i.Field:i.Unknown}function a(e,t){const r=t||n(e),l=e.valueUnit||"unknown";return r===i.Unknown?s.Constant:e.stops?s.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?s.ClampedLinear:"unknown"===l?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?s.Proportional:s.Additive:s.Identity:s.RealWorldSize}r.d(t,{PS:()=>n,QW:()=>a,RY:()=>i,hL:()=>s,iY:()=>l,qh:()=>o}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(i||(i={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(s||(s={}))}}]);