@arcgis/core 4.23.0-next.20220124 → 4.23.0-next.20220126

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 (217) hide show
  1. package/Graphic.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/00c5bb5eecb0e89266df.js +1 -0
  4. package/assets/esri/core/workers/chunks/021a37e2b191298e80b7.js +1 -0
  5. package/assets/esri/core/workers/chunks/1370c92c40fd6271553c.js +1 -0
  6. package/assets/esri/core/workers/chunks/1fbcc8424452d0256bd6.js +1 -0
  7. package/assets/esri/core/workers/chunks/{fe864d01e72aa24574b6.js → 23b15e7c2f96d260e16c.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{b2ae5fc4f787ea568b88.js → 2460f3b6ada6ae900dec.js} +1 -1
  9. package/assets/esri/core/workers/chunks/2792ca40f1e92849247c.js +1 -0
  10. package/assets/esri/core/workers/chunks/2a96f1bba9ce6883e5e0.js +1 -0
  11. package/assets/esri/core/workers/chunks/2e899ef5881b4ec6fa55.js +1 -0
  12. package/assets/esri/core/workers/chunks/3231ee3e090bb4cac3fc.js +1 -0
  13. package/assets/esri/core/workers/chunks/{0c3e3a5baf54bd5e210c.js → 36e250278b5622ccf068.js} +1 -1
  14. package/assets/esri/core/workers/chunks/395ba088d4864588ff66.js +1 -0
  15. package/assets/esri/core/workers/chunks/3cc77692b2eee27b9c9e.js +1 -0
  16. package/assets/esri/core/workers/chunks/3f343f792fd9f44d6f25.js +1 -0
  17. package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +1 -0
  18. package/assets/esri/core/workers/chunks/{625d2663daa8e0cf64b0.js → 434b16731c6a81f868ef.js} +1 -1
  19. package/assets/esri/core/workers/chunks/4385a268c2a64281d1c1.js +1 -0
  20. package/assets/esri/core/workers/chunks/{44b01d42d4ec72913229.js → 438f0b5ae5c53ae4f06a.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{4d539878bfbd7c549e60.js → 46b4bb66a54bbd8e2e57.js} +1 -1
  22. package/assets/esri/core/workers/chunks/4c76146014dc15143ba3.js +1 -0
  23. package/assets/esri/core/workers/chunks/5d991b74d958005c26c4.js +1 -0
  24. package/assets/esri/core/workers/chunks/5dfe1f8d520025e2118b.js +1 -0
  25. package/assets/esri/core/workers/chunks/601e697dc7414bda128a.js +1 -0
  26. package/assets/esri/core/workers/chunks/{9cdaba126ac7fa5f33f0.js → 6cd5e4380d29b9a3c344.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{a7b1b75643ed31489495.js → 6f50a9647f026a8d4729.js} +1 -1
  28. package/assets/esri/core/workers/chunks/7d661129a0d8c466eeec.js +1 -0
  29. package/assets/esri/core/workers/chunks/{64276aacaafa4c8a15bd.js → 7dcf52d3db3903c8eb9f.js} +1 -1
  30. package/assets/esri/core/workers/chunks/8070972c0efb78523b68.js +1 -0
  31. package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +1 -0
  32. package/assets/esri/core/workers/chunks/97a28641b3b2fd31bea2.js +1 -0
  33. package/assets/esri/core/workers/chunks/{d1454155ee1b8a421cbb.js → 97ec9eef0048760fa260.js} +1 -1
  34. package/assets/esri/core/workers/chunks/98986e6601b0366376b4.js +1 -0
  35. package/assets/esri/core/workers/chunks/9cdcf9309d6feda70185.js +1 -0
  36. package/assets/esri/core/workers/chunks/aa04b90b82bf70caaae4.js +1 -0
  37. package/assets/esri/core/workers/chunks/aace7e1fef256bb961c9.js +1 -0
  38. package/assets/esri/core/workers/chunks/{c080114a69fa95b88d22.js → af5694b4d278cf1db2d9.js} +1 -1
  39. package/assets/esri/core/workers/chunks/afbb4f802ca5774f0326.js +1 -0
  40. package/assets/esri/core/workers/chunks/b2c5f92e3d7606297ca9.js +1 -0
  41. package/assets/esri/core/workers/chunks/b2d2de935487257c568b.js +1 -0
  42. package/assets/esri/core/workers/chunks/b2ebe4f6d100e15b512d.js +1 -0
  43. package/assets/esri/core/workers/chunks/b8316c6469a543029bc6.js +1 -0
  44. package/assets/esri/core/workers/chunks/{4c9084a04948b6924749.js → ba5eb394f098968c22d2.js} +1 -1
  45. package/assets/esri/core/workers/chunks/bf0a65b4be31959f921d.js +1 -0
  46. package/assets/esri/core/workers/chunks/c890c7fca27170e3341f.js +1 -0
  47. package/assets/esri/core/workers/chunks/c976785f2391c77d8a30.js +1 -0
  48. package/assets/esri/core/workers/chunks/{d39b7983b68d6e5b404d.js → cdbc005eebec1503b99d.js} +1 -1
  49. package/assets/esri/core/workers/chunks/e4b84ca8ddfd48dd79b1.js +1 -0
  50. package/assets/esri/core/workers/chunks/e4e2036373166c1d5cf5.js +1 -0
  51. package/assets/esri/core/workers/chunks/e4f93c55eaefab4192b5.js +1 -0
  52. package/assets/esri/core/workers/chunks/e6165e17fbb07bfc40a1.js +1 -0
  53. package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +1 -0
  54. package/assets/esri/core/workers/chunks/{f678293de9a6d8f5b5db.js → ec89466f76d0ba22525e.js} +1 -1
  55. package/assets/esri/core/workers/chunks/ee45618c45806ab654cb.js +1 -0
  56. package/assets/esri/core/workers/chunks/f4baa5ea2e42b1317941.js +1 -0
  57. package/assets/esri/core/workers/chunks/f760a3e030b0f358a92a.js +1 -0
  58. package/assets/esri/core/workers/chunks/face43cf5abcd2f5bd9d.js +1 -0
  59. package/assets/esri/themes/base/_mixins.scss +4 -1
  60. package/assets/esri/themes/base/icons/style.scss +11 -2
  61. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +13 -10
  62. package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +4 -2
  63. package/assets/esri/themes/base/widgets/_Directions.scss +5 -3
  64. package/assets/esri/themes/base/widgets/_Editor.scss +5 -2
  65. package/assets/esri/themes/base/widgets/_ElevationProfile.scss +6 -4
  66. package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
  67. package/assets/esri/themes/base/widgets/_LayerList.scss +13 -9
  68. package/assets/esri/themes/base/widgets/_Popup.scss +4 -2
  69. package/assets/esri/themes/base/widgets/_Print.scss +24 -11
  70. package/assets/esri/themes/base/widgets/_Search.scss +4 -2
  71. package/assets/esri/themes/base/widgets/_TableList.scss +9 -7
  72. package/assets/esri/themes/base/widgets/_Weather.scss +12 -0
  73. package/assets/esri/themes/base/widgets/_Widget.scss +18 -9
  74. package/assets/esri/themes/dark/main.css +1 -1
  75. package/assets/esri/themes/dark-blue/main.css +1 -1
  76. package/assets/esri/themes/dark-green/main.css +1 -1
  77. package/assets/esri/themes/dark-purple/main.css +1 -1
  78. package/assets/esri/themes/dark-red/main.css +1 -1
  79. package/assets/esri/themes/light/main.css +1 -1
  80. package/assets/esri/themes/light/view.css +1 -1
  81. package/assets/esri/themes/light-blue/main.css +1 -1
  82. package/assets/esri/themes/light-green/main.css +1 -1
  83. package/assets/esri/themes/light-purple/main.css +1 -1
  84. package/assets/esri/themes/light-red/main.css +1 -1
  85. package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
  86. package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
  87. package/chunks/ComponentShader.glsl.js +19 -19
  88. package/chunks/Terrain.glsl.js +11 -11
  89. package/chunks/WaterSurface.glsl.js +21 -21
  90. package/chunks/pe.js +1 -1
  91. package/chunks/vec3.js +1 -1
  92. package/core/accessorSupport/read.js +1 -1
  93. package/core/accessorSupport/write.js +1 -1
  94. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  95. package/geometry/pe.js +1 -1
  96. package/geometry/support/axisAngleDegrees.js +1 -1
  97. package/interfaces.d.ts +36 -2
  98. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  99. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  100. package/package.json +2 -2
  101. package/popup/content/AttachmentsContent.js +1 -1
  102. package/popup/content/support/mediaInfoTypes.js +1 -1
  103. package/support/revision.js +1 -1
  104. package/symbols/LabelSymbol3D.js +1 -1
  105. package/symbols/PointSymbol3D.js +1 -1
  106. package/symbols/cim/CIMSymbolHelper.js +1 -1
  107. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  108. package/symbols/cim/cimAnalyzer.js +1 -1
  109. package/symbols/support/Symbol3DVerticalOffset.js +1 -1
  110. package/symbols/support/previewCIMSymbol.js +1 -1
  111. package/symbols/support/previewSymbol2D.js +1 -1
  112. package/symbols/support/previewSymbol3D.js +1 -1
  113. package/symbols/support/previewWebStyleSymbol.js +1 -1
  114. package/symbols/support/svgUtils.js +1 -1
  115. package/symbols.js +1 -1
  116. package/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap.js +1 -1
  117. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  118. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  119. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  120. package/views/3d/environment/CloudsComposition.js +1 -1
  121. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  122. package/views/3d/environment/Fog.js +1 -1
  123. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  124. package/views/3d/environment/weather.js +1 -1
  125. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  126. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  127. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  128. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  129. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  130. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  131. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  132. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  133. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  134. package/views/3d/terrain/OverlayRenderer.js +1 -1
  135. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +21 -13
  136. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
  137. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  138. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  139. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  140. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  141. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  142. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  143. package/views/interactive/dragEventPipeline.js +1 -1
  144. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  145. package/views/webgl/Program.js +1 -1
  146. package/views/webgl/rasterUtils.js +1 -1
  147. package/widgets/Attachments.js +1 -1
  148. package/widgets/FeatureForm/InputField.js +1 -1
  149. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  150. package/widgets/Popup/PopupViewModel.js +1 -1
  151. package/widgets/Popup/actionUtils.js +1 -1
  152. package/widgets/Slice/SliceViewModel.js +1 -1
  153. package/widgets/Slider/SliderViewModel.js +1 -1
  154. package/widgets/Slider.js +1 -1
  155. package/widgets/Weather/WeatherViewModel.js +1 -1
  156. package/widgets/Weather/css.js +1 -1
  157. package/widgets/Weather.js +1 -1
  158. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  159. package/widgets/support/InteractiveToolViewModel.js +1 -1
  160. package/assets/components/assets/calcite-icon/checkSquareF16.json +0 -1
  161. package/assets/components/assets/calcite-icon/checkSquareF24.json +0 -1
  162. package/assets/components/assets/calcite-icon/checkSquareF32.json +0 -1
  163. package/assets/components/assets/calcite-icon/lineSolid4.json +0 -1
  164. package/assets/components/assets/calcite-icon/squareF16.json +0 -1
  165. package/assets/components/assets/calcite-icon/squareF24.json +0 -1
  166. package/assets/components/assets/calcite-icon/squareF32.json +0 -1
  167. package/assets/components/assets/calcite-icon/xHexagon16.json +0 -1
  168. package/assets/components/assets/calcite-icon/xHexagon24.json +0 -1
  169. package/assets/components/assets/calcite-icon/xHexagon32.json +0 -1
  170. package/assets/components/assets/calcite-icon/xHexagonF16.json +0 -1
  171. package/assets/components/assets/calcite-icon/xHexagonF24.json +0 -1
  172. package/assets/components/assets/calcite-icon/xHexagonF32.json +0 -1
  173. package/assets/components/assets/calcite-icon/xOctagonF16.json +0 -1
  174. package/assets/components/assets/calcite-icon/xOctagonF24.json +0 -1
  175. package/assets/components/assets/calcite-icon/xOctagonF32.json +0 -1
  176. package/assets/esri/core/workers/chunks/09da224052976e290828.js +0 -1
  177. package/assets/esri/core/workers/chunks/0bf079e752ab79468478.js +0 -1
  178. package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +0 -1
  179. package/assets/esri/core/workers/chunks/23745a5ab47c840dc452.js +0 -1
  180. package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +0 -1
  181. package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +0 -1
  182. package/assets/esri/core/workers/chunks/32f8c4af7e70ebdcb19e.js +0 -1
  183. package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +0 -1
  184. package/assets/esri/core/workers/chunks/3a9740dccda6a733313c.js +0 -1
  185. package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +0 -1
  186. package/assets/esri/core/workers/chunks/5538639a49c7cc2eca63.js +0 -1
  187. package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +0 -1
  188. package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +0 -1
  189. package/assets/esri/core/workers/chunks/739e579150bf466d43ae.js +0 -1
  190. package/assets/esri/core/workers/chunks/74df1f3e1e2e524a89d2.js +0 -1
  191. package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.js +0 -1
  192. package/assets/esri/core/workers/chunks/7baf6b1f3f050aa67ae4.js +0 -1
  193. package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +0 -1
  194. package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +0 -1
  195. package/assets/esri/core/workers/chunks/9cb2ae42a8e328b1d98d.js +0 -1
  196. package/assets/esri/core/workers/chunks/9d3c58a0ef634d95b7bd.js +0 -1
  197. package/assets/esri/core/workers/chunks/a6ff3db3493543df81bc.js +0 -1
  198. package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +0 -1
  199. package/assets/esri/core/workers/chunks/a96afc176041f698c7a1.js +0 -1
  200. package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +0 -1
  201. package/assets/esri/core/workers/chunks/afa6912454f2a5ffadce.js +0 -1
  202. package/assets/esri/core/workers/chunks/b2beb6e1fd2ee6503830.js +0 -1
  203. package/assets/esri/core/workers/chunks/bab1cfd0a901181622af.js +0 -1
  204. package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +0 -1
  205. package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +0 -1
  206. package/assets/esri/core/workers/chunks/c6bd943fe8fd13bb4806.js +0 -1
  207. package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +0 -1
  208. package/assets/esri/core/workers/chunks/cd7d83d127e085d52584.js +0 -1
  209. package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +0 -1
  210. package/assets/esri/core/workers/chunks/da1c2873bdbc0956dca0.js +0 -1
  211. package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +0 -1
  212. package/assets/esri/core/workers/chunks/e079cb1d53aca15b7df2.js +0 -1
  213. package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +0 -1
  214. package/assets/esri/core/workers/chunks/e97e986120aaadad7d4c.js +0 -1
  215. package/assets/esri/core/workers/chunks/f8e7755240a94b499e1f.js +0 -1
  216. package/assets/esri/core/workers/chunks/fd3e5d823dc7917f4b8f.js +0 -1
  217. package/views/3d/layers/graphics/IGraphics3DFeatureProcessor.js +0 -4
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7212,5732],{92835:(e,t,r)=>{r.d(t,{Z:()=>f});var s,i=r(43697),n=r(96674),o=r(70586),l=r(35463),a=r(5600),u=(r(67676),r(80442),r(75215),r(71715)),c=r(52011),h=r(30556);let p=s=class extends n.wq{constructor(e){super(e),this.end=null,this.start=null}static get allTime(){return d}static get empty(){return y}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=(0,o.pC)(this.start)?this.start.getTime():this.start,r=(0,o.pC)(this.end)?this.end.getTime():this.end,s=(0,o.pC)(e.start)?e.start.getTime():e.start,i=(0,o.pC)(e.end)?e.end.getTime():e.end;return t===s&&r===i}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.Po)(this.start,(t=>(0,l.JE)(t,e))),r=(0,o.Po)(this.end,(t=>(0,l.Nm)((0,l.JE)(t,e),1,e)));return new s({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=(0,o.R2)(this.start,-1/0,(e=>e.getTime())),r=(0,o.R2)(this.end,1/0,(e=>e.getTime())),i=(0,o.R2)(e.start,-1/0,(e=>e.getTime())),n=(0,o.R2)(e.end,1/0,(e=>e.getTime()));let l,a;if(i>=t&&i<=r?l=i:t>=i&&t<=n&&(l=t),r>=i&&r<=n?a=r:n>=t&&n<=r&&(a=n),!isNaN(l)&&!isNaN(a)){const e=new s;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return s.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new s,{start:i,end:n}=this;return(0,o.pC)(i)&&(r.start=(0,l.Nm)(i,e,t)),(0,o.pC)(n)&&(r.end=(0,l.Nm)(n,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=(0,o.pC)(this.start)&&(0,o.pC)(e.start)?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=(0,o.pC)(this.end)&&(0,o.pC)(e.end)?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:r})}};(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,u.r)("end")],p.prototype,"readEnd",null),(0,i._)([(0,h.c)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,u.r)("start")],p.prototype,"readStart",null),(0,i._)([(0,h.c)("start")],p.prototype,"writeStart",null),p=s=(0,i._)([(0,c.j)("esri.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0}),f=p},5732:(e,t,r)=>{r.d(t,{a:()=>n,c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}},52138:(e,t,r)=>{r.d(t,{a:()=>a,d:()=>f,e:()=>p,f:()=>d,h:()=>h,i:()=>o,j:()=>c,m:()=>u,p:()=>_,s:()=>n,t:()=>l,u:()=>y,v:()=>w,w:()=>b,y:()=>m});var s=r(65617),i=r(46851);function n(e,t,r,s,i,n,o,l,a,u,c,h,p,d,y,f,m){return e[0]=t,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=o,e[6]=l,e[7]=a,e[8]=u,e[9]=c,e[10]=h,e[11]=p,e[12]=d,e[13]=y,e[14]=f,e[15]=m,e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function l(e,t){if(e===t){const r=t[1],s=t[2],i=t[3],n=t[6],o=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=s,e[9]=n,e[11]=t[14],e[12]=i,e[13]=o,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function a(e,t){const r=t[0],s=t[1],i=t[2],n=t[3],o=t[4],l=t[5],a=t[6],u=t[7],c=t[8],h=t[9],p=t[10],d=t[11],y=t[12],f=t[13],m=t[14],g=t[15],v=r*l-s*o,S=r*a-i*o,b=r*u-n*o,w=s*a-i*l,_=s*u-n*l,M=i*u-n*a,A=c*f-h*y,x=c*m-p*y,I=c*g-d*y,U=h*m-p*f,C=h*g-d*f,E=p*g-d*m;let T=v*E-S*C+b*U+w*I-_*x+M*A;return T?(T=1/T,e[0]=(l*E-a*C+u*U)*T,e[1]=(i*C-s*E-n*U)*T,e[2]=(f*M-m*_+g*w)*T,e[3]=(p*_-h*M-d*w)*T,e[4]=(a*I-o*E-u*x)*T,e[5]=(r*E-i*I+n*x)*T,e[6]=(m*b-y*M-g*S)*T,e[7]=(c*M-p*b+d*S)*T,e[8]=(o*C-l*I+u*A)*T,e[9]=(s*I-r*C-n*A)*T,e[10]=(y*_-f*b+g*v)*T,e[11]=(h*b-c*_-d*v)*T,e[12]=(l*x-o*U-a*A)*T,e[13]=(r*U-s*x+i*A)*T,e[14]=(f*S-y*w-m*v)*T,e[15]=(c*w-h*S+p*v)*T,e):null}function u(e,t,r){const s=t[0],i=t[1],n=t[2],o=t[3],l=t[4],a=t[5],u=t[6],c=t[7],h=t[8],p=t[9],d=t[10],y=t[11],f=t[12],m=t[13],g=t[14],v=t[15];let S=r[0],b=r[1],w=r[2],_=r[3];return e[0]=S*s+b*l+w*h+_*f,e[1]=S*i+b*a+w*p+_*m,e[2]=S*n+b*u+w*d+_*g,e[3]=S*o+b*c+w*y+_*v,S=r[4],b=r[5],w=r[6],_=r[7],e[4]=S*s+b*l+w*h+_*f,e[5]=S*i+b*a+w*p+_*m,e[6]=S*n+b*u+w*d+_*g,e[7]=S*o+b*c+w*y+_*v,S=r[8],b=r[9],w=r[10],_=r[11],e[8]=S*s+b*l+w*h+_*f,e[9]=S*i+b*a+w*p+_*m,e[10]=S*n+b*u+w*d+_*g,e[11]=S*o+b*c+w*y+_*v,S=r[12],b=r[13],w=r[14],_=r[15],e[12]=S*s+b*l+w*h+_*f,e[13]=S*i+b*a+w*p+_*m,e[14]=S*n+b*u+w*d+_*g,e[15]=S*o+b*c+w*y+_*v,e}function c(e,t,r){const s=r[0],i=r[1],n=r[2];let o,l,a,u,c,h,p,d,y,f,m,g;return t===e?(e[12]=t[0]*s+t[4]*i+t[8]*n+t[12],e[13]=t[1]*s+t[5]*i+t[9]*n+t[13],e[14]=t[2]*s+t[6]*i+t[10]*n+t[14],e[15]=t[3]*s+t[7]*i+t[11]*n+t[15]):(o=t[0],l=t[1],a=t[2],u=t[3],c=t[4],h=t[5],p=t[6],d=t[7],y=t[8],f=t[9],m=t[10],g=t[11],e[0]=o,e[1]=l,e[2]=a,e[3]=u,e[4]=c,e[5]=h,e[6]=p,e[7]=d,e[8]=y,e[9]=f,e[10]=m,e[11]=g,e[12]=o*s+c*i+y*n+t[12],e[13]=l*s+h*i+f*n+t[13],e[14]=a*s+p*i+m*n+t[14],e[15]=u*s+d*i+g*n+t[15]),e}function h(e,t,r){const s=r[0],i=r[1],n=r[2];return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function p(e,t,r,s){let n,o,l,a,u,c,h,p,d,y,f,m,g,v,S,b,w,_,M,A,x,I,U,C,E=s[0],T=s[1],O=s[2],R=Math.sqrt(E*E+T*T+O*O);return R<i.E?null:(R=1/R,E*=R,T*=R,O*=R,n=Math.sin(r),o=Math.cos(r),l=1-o,a=t[0],u=t[1],c=t[2],h=t[3],p=t[4],d=t[5],y=t[6],f=t[7],m=t[8],g=t[9],v=t[10],S=t[11],b=E*E*l+o,w=T*E*l+O*n,_=O*E*l-T*n,M=E*T*l-O*n,A=T*T*l+o,x=O*T*l+E*n,I=E*O*l+T*n,U=T*O*l-E*n,C=O*O*l+o,e[0]=a*b+p*w+m*_,e[1]=u*b+d*w+g*_,e[2]=c*b+y*w+v*_,e[3]=h*b+f*w+S*_,e[4]=a*M+p*A+m*x,e[5]=u*M+d*A+g*x,e[6]=c*M+y*A+v*x,e[7]=h*M+f*A+S*x,e[8]=a*I+p*U+m*C,e[9]=u*I+d*U+g*C,e[10]=c*I+y*U+v*C,e[11]=h*I+f*U+S*C,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function d(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function y(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function f(e,t,r){let s,n,o,l=r[0],a=r[1],u=r[2],c=Math.sqrt(l*l+a*a+u*u);return c<i.E?null:(c=1/c,l*=c,a*=c,u*=c,s=Math.sin(t),n=Math.cos(t),o=1-n,e[0]=l*l*o+n,e[1]=a*l*o+u*s,e[2]=u*l*o-a*s,e[3]=0,e[4]=l*a*o-u*s,e[5]=a*a*o+n,e[6]=u*a*o+l*s,e[7]=0,e[8]=l*u*o+a*s,e[9]=a*u*o-l*s,e[10]=u*u*o+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function m(e,t){const r=Math.sin(t),s=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function g(e,t,r){const s=t[0],i=t[1],n=t[2],o=t[3],l=s+s,a=i+i,u=n+n,c=s*l,h=s*a,p=s*u,d=i*a,y=i*u,f=n*u,m=o*l,g=o*a,v=o*u;return e[0]=1-(d+f),e[1]=h+v,e[2]=p-g,e[3]=0,e[4]=h-v,e[5]=1-(c+f),e[6]=y+m,e[7]=0,e[8]=p+g,e[9]=y-m,e[10]=1-(c+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}const v=(0,s.c)();function S(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function b(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function w(e,t){if(e===t)return!0;const r=e[0],s=e[1],n=e[2],o=e[3],l=e[4],a=e[5],u=e[6],c=e[7],h=e[8],p=e[9],d=e[10],y=e[11],f=e[12],m=e[13],g=e[14],v=e[15],S=t[0],b=t[1],w=t[2],_=t[3],M=t[4],A=t[5],x=t[6],I=t[7],U=t[8],C=t[9],E=t[10],T=t[11],O=t[12],R=t[13],P=t[14],D=t[15];return Math.abs(r-S)<=i.E*Math.max(1,Math.abs(r),Math.abs(S))&&Math.abs(s-b)<=i.E*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(n-w)<=i.E*Math.max(1,Math.abs(n),Math.abs(w))&&Math.abs(o-_)<=i.E*Math.max(1,Math.abs(o),Math.abs(_))&&Math.abs(l-M)<=i.E*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(a-A)<=i.E*Math.max(1,Math.abs(a),Math.abs(A))&&Math.abs(u-x)<=i.E*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(c-I)<=i.E*Math.max(1,Math.abs(c),Math.abs(I))&&Math.abs(h-U)<=i.E*Math.max(1,Math.abs(h),Math.abs(U))&&Math.abs(p-C)<=i.E*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(d-E)<=i.E*Math.max(1,Math.abs(d),Math.abs(E))&&Math.abs(y-T)<=i.E*Math.max(1,Math.abs(y),Math.abs(T))&&Math.abs(f-O)<=i.E*Math.max(1,Math.abs(f),Math.abs(O))&&Math.abs(m-R)<=i.E*Math.max(1,Math.abs(m),Math.abs(R))&&Math.abs(g-P)<=i.E*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(v-D)<=i.E*Math.max(1,Math.abs(v),Math.abs(D))}function _(e){const t=i.E,r=e[0],s=e[1],n=e[2],o=e[4],l=e[5],a=e[6],u=e[8],c=e[9],h=e[10];return Math.abs(1-(r*r+o*o+u*u))<=t&&Math.abs(1-(s*s+l*l+c*c))<=t&&Math.abs(1-(n*n+a*a+h*h))<=t}const M=u,A=S;Object.freeze({__proto__:null,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},set:n,identity:o,transpose:l,invert:a,adjoint:function(e,t){const r=t[0],s=t[1],i=t[2],n=t[3],o=t[4],l=t[5],a=t[6],u=t[7],c=t[8],h=t[9],p=t[10],d=t[11],y=t[12],f=t[13],m=t[14],g=t[15];return e[0]=l*(p*g-d*m)-h*(a*g-u*m)+f*(a*d-u*p),e[1]=-(s*(p*g-d*m)-h*(i*g-n*m)+f*(i*d-n*p)),e[2]=s*(a*g-u*m)-l*(i*g-n*m)+f*(i*u-n*a),e[3]=-(s*(a*d-u*p)-l*(i*d-n*p)+h*(i*u-n*a)),e[4]=-(o*(p*g-d*m)-c*(a*g-u*m)+y*(a*d-u*p)),e[5]=r*(p*g-d*m)-c*(i*g-n*m)+y*(i*d-n*p),e[6]=-(r*(a*g-u*m)-o*(i*g-n*m)+y*(i*u-n*a)),e[7]=r*(a*d-u*p)-o*(i*d-n*p)+c*(i*u-n*a),e[8]=o*(h*g-d*f)-c*(l*g-u*f)+y*(l*d-u*h),e[9]=-(r*(h*g-d*f)-c*(s*g-n*f)+y*(s*d-n*h)),e[10]=r*(l*g-u*f)-o*(s*g-n*f)+y*(s*u-n*l),e[11]=-(r*(l*d-u*h)-o*(s*d-n*h)+c*(s*u-n*l)),e[12]=-(o*(h*m-p*f)-c*(l*m-a*f)+y*(l*p-a*h)),e[13]=r*(h*m-p*f)-c*(s*m-i*f)+y*(s*p-i*h),e[14]=-(r*(l*m-a*f)-o*(s*m-i*f)+y*(s*a-i*l)),e[15]=r*(l*p-a*h)-o*(s*p-i*h)+c*(s*a-i*l),e},determinant:function(e){const t=e[0],r=e[1],s=e[2],i=e[3],n=e[4],o=e[5],l=e[6],a=e[7],u=e[8],c=e[9],h=e[10],p=e[11],d=e[12],y=e[13],f=e[14],m=e[15];return(t*o-r*n)*(h*m-p*f)-(t*l-s*n)*(c*m-p*y)+(t*a-i*n)*(c*f-h*y)+(r*l-s*o)*(u*m-p*d)-(r*a-i*o)*(u*f-h*d)+(s*a-i*l)*(u*y-c*d)},multiply:u,translate:c,scale:h,rotate:p,rotateX:function(e,t,r){const s=Math.sin(r),i=Math.cos(r),n=t[4],o=t[5],l=t[6],a=t[7],u=t[8],c=t[9],h=t[10],p=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=n*i+u*s,e[5]=o*i+c*s,e[6]=l*i+h*s,e[7]=a*i+p*s,e[8]=u*i-n*s,e[9]=c*i-o*s,e[10]=h*i-l*s,e[11]=p*i-a*s,e},rotateY:function(e,t,r){const s=Math.sin(r),i=Math.cos(r),n=t[0],o=t[1],l=t[2],a=t[3],u=t[8],c=t[9],h=t[10],p=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=n*i-u*s,e[1]=o*i-c*s,e[2]=l*i-h*s,e[3]=a*i-p*s,e[8]=n*s+u*i,e[9]=o*s+c*i,e[10]=l*s+h*i,e[11]=a*s+p*i,e},rotateZ:function(e,t,r){const s=Math.sin(r),i=Math.cos(r),n=t[0],o=t[1],l=t[2],a=t[3],u=t[4],c=t[5],h=t[6],p=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=n*i+u*s,e[1]=o*i+c*s,e[2]=l*i+h*s,e[3]=a*i+p*s,e[4]=u*i-n*s,e[5]=c*i-o*s,e[6]=h*i-l*s,e[7]=p*i-a*s,e},fromTranslation:d,fromScaling:y,fromRotation:f,fromXRotation:m,fromYRotation:function(e,t){const r=Math.sin(t),s=Math.cos(t);return e[0]=s,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromZRotation:function(e,t){const r=Math.sin(t),s=Math.cos(t);return e[0]=s,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromRotationTranslation:g,fromQuat2:function(e,t){const r=v,s=-t[0],i=-t[1],n=-t[2],o=t[3],l=t[4],a=t[5],u=t[6],c=t[7],h=s*s+i*i+n*n+o*o;return h>0?(r[0]=2*(l*o+c*s+a*n-u*i)/h,r[1]=2*(a*o+c*i+u*s-l*n)/h,r[2]=2*(u*o+c*n+l*i-a*s)/h):(r[0]=2*(l*o+c*s+a*n-u*i),r[1]=2*(a*o+c*i+u*s-l*n),r[2]=2*(u*o+c*n+l*i-a*s)),g(e,t,r),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:function(e,t){const r=t[0],s=t[1],i=t[2],n=t[4],o=t[5],l=t[6],a=t[8],u=t[9],c=t[10];return e[0]=Math.sqrt(r*r+s*s+i*i),e[1]=Math.sqrt(n*n+o*o+l*l),e[2]=Math.sqrt(a*a+u*u+c*c),e},getRotation:function(e,t){const r=t[0]+t[5]+t[10];let s=0;return r>0?(s=2*Math.sqrt(r+1),e[3]=.25*s,e[0]=(t[6]-t[9])/s,e[1]=(t[8]-t[2])/s,e[2]=(t[1]-t[4])/s):t[0]>t[5]&&t[0]>t[10]?(s=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/s,e[0]=.25*s,e[1]=(t[1]+t[4])/s,e[2]=(t[8]+t[2])/s):t[5]>t[10]?(s=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/s,e[0]=(t[1]+t[4])/s,e[1]=.25*s,e[2]=(t[6]+t[9])/s):(s=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/s,e[0]=(t[8]+t[2])/s,e[1]=(t[6]+t[9])/s,e[2]=.25*s),e},fromRotationTranslationScale:function(e,t,r,s){const i=t[0],n=t[1],o=t[2],l=t[3],a=i+i,u=n+n,c=o+o,h=i*a,p=i*u,d=i*c,y=n*u,f=n*c,m=o*c,g=l*a,v=l*u,S=l*c,b=s[0],w=s[1],_=s[2];return e[0]=(1-(y+m))*b,e[1]=(p+S)*b,e[2]=(d-v)*b,e[3]=0,e[4]=(p-S)*w,e[5]=(1-(h+m))*w,e[6]=(f+g)*w,e[7]=0,e[8]=(d+v)*_,e[9]=(f-g)*_,e[10]=(1-(h+y))*_,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},fromRotationTranslationScaleOrigin:function(e,t,r,s,i){const n=t[0],o=t[1],l=t[2],a=t[3],u=n+n,c=o+o,h=l+l,p=n*u,d=n*c,y=n*h,f=o*c,m=o*h,g=l*h,v=a*u,S=a*c,b=a*h,w=s[0],_=s[1],M=s[2],A=i[0],x=i[1],I=i[2],U=(1-(f+g))*w,C=(d+b)*w,E=(y-S)*w,T=(d-b)*_,O=(1-(p+g))*_,R=(m+v)*_,P=(y+S)*M,D=(m-v)*M,B=(1-(p+f))*M;return e[0]=U,e[1]=C,e[2]=E,e[3]=0,e[4]=T,e[5]=O,e[6]=R,e[7]=0,e[8]=P,e[9]=D,e[10]=B,e[11]=0,e[12]=r[0]+A-(U*A+T*x+P*I),e[13]=r[1]+x-(C*A+O*x+D*I),e[14]=r[2]+I-(E*A+R*x+B*I),e[15]=1,e},fromQuat:function(e,t){const r=t[0],s=t[1],i=t[2],n=t[3],o=r+r,l=s+s,a=i+i,u=r*o,c=s*o,h=s*l,p=i*o,d=i*l,y=i*a,f=n*o,m=n*l,g=n*a;return e[0]=1-h-y,e[1]=c+g,e[2]=p-m,e[3]=0,e[4]=c-g,e[5]=1-u-y,e[6]=d+f,e[7]=0,e[8]=p+m,e[9]=d-f,e[10]=1-u-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,s,i,n,o){const l=1/(r-t),a=1/(i-s),u=1/(n-o);return e[0]=2*n*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*n*a,e[6]=0,e[7]=0,e[8]=(r+t)*l,e[9]=(i+s)*a,e[10]=(o+n)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*n*2*u,e[15]=0,e},perspective:function(e,t,r,s,i){const n=1/Math.tan(t/2);let o;return e[0]=n/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(o=1/(s-i),e[10]=(i+s)*o,e[14]=2*i*s*o):(e[10]=-1,e[14]=-2*s),e},perspectiveFromFieldOfView:function(e,t,r,s){const i=Math.tan(t.upDegrees*Math.PI/180),n=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),a=2/(o+l),u=2/(i+n);return e[0]=a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(o-l)*a*.5,e[9]=(i-n)*u*.5,e[10]=s/(r-s),e[11]=-1,e[12]=0,e[13]=0,e[14]=s*r/(r-s),e[15]=0,e},ortho:function(e,t,r,s,i,n,o){const l=1/(t-r),a=1/(s-i),u=1/(n-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*l,e[13]=(i+s)*a,e[14]=(o+n)*u,e[15]=1,e},lookAt:function(e,t,r,s){let n,l,a,u,c,h,p,d,y,f;const m=t[0],g=t[1],v=t[2],S=s[0],b=s[1],w=s[2],_=r[0],M=r[1],A=r[2];return Math.abs(m-_)<i.E&&Math.abs(g-M)<i.E&&Math.abs(v-A)<i.E?o(e):(p=m-_,d=g-M,y=v-A,f=1/Math.sqrt(p*p+d*d+y*y),p*=f,d*=f,y*=f,n=b*y-w*d,l=w*p-S*y,a=S*d-b*p,f=Math.sqrt(n*n+l*l+a*a),f?(f=1/f,n*=f,l*=f,a*=f):(n=0,l=0,a=0),u=d*a-y*l,c=y*n-p*a,h=p*l-d*n,f=Math.sqrt(u*u+c*c+h*h),f?(f=1/f,u*=f,c*=f,h*=f):(u=0,c=0,h=0),e[0]=n,e[1]=u,e[2]=p,e[3]=0,e[4]=l,e[5]=c,e[6]=d,e[7]=0,e[8]=a,e[9]=h,e[10]=y,e[11]=0,e[12]=-(n*m+l*g+a*v),e[13]=-(u*m+c*g+h*v),e[14]=-(p*m+d*g+y*v),e[15]=1,e)},targetTo:function(e,t,r,s){const i=t[0],n=t[1],o=t[2],l=s[0],a=s[1],u=s[2];let c=i-r[0],h=n-r[1],p=o-r[2],d=c*c+h*h+p*p;d>0&&(d=1/Math.sqrt(d),c*=d,h*=d,p*=d);let y=a*p-u*h,f=u*c-l*p,m=l*h-a*c;return d=y*y+f*f+m*m,d>0&&(d=1/Math.sqrt(d),y*=d,f*=d,m*=d),e[0]=y,e[1]=f,e[2]=m,e[3]=0,e[4]=h*m-p*f,e[5]=p*y-c*m,e[6]=c*f-h*y,e[7]=0,e[8]=c,e[9]=h,e[10]=p,e[11]=0,e[12]=i,e[13]=n,e[14]=o,e[15]=1,e},str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2+e[9]**2+e[10]**2+e[11]**2+e[12]**2+e[13]**2+e[14]**2+e[15]**2)},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},subtract:S,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,s){return e[0]=t[0]+r[0]*s,e[1]=t[1]+r[1]*s,e[2]=t[2]+r[2]*s,e[3]=t[3]+r[3]*s,e[4]=t[4]+r[4]*s,e[5]=t[5]+r[5]*s,e[6]=t[6]+r[6]*s,e[7]=t[7]+r[7]*s,e[8]=t[8]+r[8]*s,e[9]=t[9]+r[9]*s,e[10]=t[10]+r[10]*s,e[11]=t[11]+r[11]*s,e[12]=t[12]+r[12]*s,e[13]=t[13]+r[13]*s,e[14]=t[14]+r[14]*s,e[15]=t[15]+r[15]*s,e},exactEquals:b,equals:w,isOrthoNormal:_,mul:M,sub:A})},25929:(e,t,r)=>{r.d(t,{M:()=>d,f:()=>n,i:()=>h,p:()=>f,r:()=>l,t:()=>o,w:()=>a});var s=r(70586),i=r(17452);function n(e,t){const r=t&&t.url&&t.url.path;if(e&&r&&(e=(0,i.hF)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,i.PF)(e,t.portalItem.itemUrl);c.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return p(e,t&&t.portal)}function o(e,t,r=d.YES){if(!e)return e;!(0,i.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,i.hF)(e);if(t){const r=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(r){const n=p(r,t.portal);s=(0,i.PF)(p(s,t.portal),n,n),s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=function(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,i.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}(s,t&&t.portal),(0,i.YP)(s)&&(s=(0,i.Fv)(s)),null!=t&&t.resources&&null!=t&&t.portalItem&&!(0,i.YP)(s)&&!(0,i.HK)(s)&&r===d.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s)}),s}function l(e,t,r){return n(e,r)}function a(e,t,r,s){const i=o(e,s);void 0!==i&&(t[r]=i)}const u=/\/items\/([^\/]+)\/resources\//,c=/^\.\/resources\//;function h(e){const t=(0,s.pC)(e)?e.match(u):null;return(0,s.pC)(t)?t[1]:null}function p(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,i.TI)();return(0,i.D6)(s,`${s.scheme}://${r}`)?(0,i.Ie)(e,t.portalHostname,r):(0,i.Ie)(e,r,t.portalHostname)}var d,y;(y=d||(d={}))[y.YES=0]="YES",y[y.NO=1]="NO";const f=Object.freeze({__proto__:null,fromJSON:n,toJSON:o,read:l,write:a,itemIdFromResourceUrl:h,get MarkKeep(){return d}})},3920:(e,t,r)=>{r.d(t,{r:()=>c,p:()=>u});var s=r(43697),i=r(15923),n=r(61247),o=r(5600),l=r(52011),a=r(89749);const u=e=>{let t=class extends e{destroy(){var e,t;this.destroyed||(null==(e=this._get("handles"))||e.destroy(),null==(t=this._get("updatingHandles"))||t.destroy())}get handles(){return this._get("handles")||new n.Z}get updatingHandles(){return this._get("updatingHandles")||new a.t}};return(0,s._)([(0,o.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,s._)([(0,o.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,s._)([(0,l.j)("esri.core.HandleOwner")],t),t};let c=class extends(u(i.Z)){};c=(0,s._)([(0,l.j)("esri.core.HandleOwner")],c)},10699:(e,t,r)=>{r.d(t,{I:()=>o});var s=r(43697),i=r(52011);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,s._)([(0,i.j)("esri.core.Identifiable")],t),t};let l=class extends(o(class{})){};l=(0,s._)([(0,i.j)("esri.core.Identifiable")],l)},16453:(e,t,r)=>{r.d(t,{R:()=>S,w:()=>b});var s=r(43697),i=r(15923),n=r(70586),o=r(41103),l=r(22974),a=r(31263);class u{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new u,r=this._originStores[a.s3.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,l.d9)(e),a.s3.DEFAULTS)}));for(let r=a.s3.SERVICE;r<a.kk;r++){const s=this._originStores[r];s&&s.forEach(((s,i)=>{e&&e.has(i)||t.set(i,(0,l.d9)(s),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.s3.USER){let s=this._originStores[r];if(s||(s=new Map,this._originStores[r]=s),s.set(e,t),!this._values.has(e)||(0,n.j0)(this._propertyOriginMap.get(e))<=r){const s=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),s!==t}return!1}delete(e,t=a.s3.USER){const r=this._originStores[t];if(!r)return;const s=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return s}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],s=r&&r.get(e),i=this._values.get(e);return this._values.set(e,s),this._propertyOriginMap.set(e,t),i!==s}originOf(e){return this._propertyOriginMap.get(e)||a.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var c=r(50549),h=r(1153),p=r(52011);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,n.j0)((0,h.vw)(this)),r=t.store,s=new u;t.store=s,(0,o.M)(t,r,s)}read(e,t){(0,c.i)(this,e,t)}getAtOrigin(e,t){const r=y(this),s=(0,a.M9)(t);if("string"==typeof e)return r.get(e,s);const i={};return e.forEach((e=>{i[e]=r.get(e,s)})),i}originOf(e){return(0,a.x3)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),s=(0,a.M9)(t),i=(0,h.vw)(this);let n;n="string"==typeof e?"*"===e?r.keys(s):[e]:e,n.forEach((e=>{i.invalidate(e),r.revert(e,s),i.commit(e)}))}};return t=(0,s._)([(0,p.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,h.vw)(e).store}let f=class extends(d(i.Z)){};f=(0,s._)([(0,p.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],f);var m=r(76169);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.M9)(t))}write(e={},t){return(0,m.c)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,h.vw)(this).setAtOrigin(e,t,(0,a.M9)(r))}removeOrigin(e){const t=v(this),r=(0,a.M9)(e),s=t.keys(r);for(const e of s)t.originOf(e)===r&&t.set(e,t.get(e,r),a.s3.USER)}updateOrigin(e,t){const r=v(this),s=(0,a.M9)(t),i=this.get(e);for(let t=s+1;t<a.kk;++t)r.delete(e,t);r.set(e,i,s)}toJSON(e){return this.write({},e)}};return t=(0,s._)([(0,p.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,h.vw)(e).store}const S=e=>{let t=class extends(g(d(e))){constructor(...e){super(...e)}};return t=(0,s._)([(0,p.j)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(S(i.Z)){};b=(0,s._)([(0,p.j)("esri.core.MultiOriginJSONSupport")],b)},35463:(e,t,r)=>{r.d(t,{rJ:()=>l,Nm:()=>n,JE:()=>o}),r(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,r){const s=new Date(e.getTime());if(t&&r){const e=i[r],{getter:n,setter:o,multiplier:l}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(s.getFullYear(),s.getMonth()+t);s.getDate()>e&&s.setDate(e)}s[o](s[n]()+t*l)}return s}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function l(e,t,r){return 0===e?0:e*s[t]/s[r]}},67900:(e,t,r)=>{r.d(t,{gV:()=>N,En:()=>M,Z7:()=>E,c9:()=>C,_R:()=>I,qE:()=>R,cM:()=>U,hd:()=>c,ty:()=>A,Jo:()=>L,$C:()=>x}),r(80442);var s=r(35454),i=r(70586),n=r(24678),o=r(82971),l=r(68441),a=r(8744),u=r(58116);const c=39.37,h=l.sv.radius*Math.PI/200,p=/UNIT\[([^\]]+)\]\]$/i,d=u.Z,y=/UNIT\[([^\]]+)\]/i,f=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),m=(0,s.wY)()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),g=e=>e*e,v=e=>e*e*e,S={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:g(.001)},"square-centimeters":{inBaseUnits:g(.01)},"square-decimeters":{inBaseUnits:g(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:g(1e3)},"square-inches":{inBaseUnits:g(.0254)},"square-feet":{inBaseUnits:g(.3048)},"square-yards":{inBaseUnits:g(.9144)},"square-miles":{inBaseUnits:g(1609.344)},"square-us-feet":{inBaseUnits:g(1200/3937)},acres:{inBaseUnits:.0015625*g(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*v(.001)},"cubic-centimeters":{inBaseUnits:1e3*v(.01)},"cubic-decimeters":{inBaseUnits:1e3*v(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*v(1e3)},"cubic-inches":{inBaseUnits:1e3*v(.0254)},"cubic-feet":{inBaseUnits:1e3*v(.3048)},"cubic-yards":{inBaseUnits:1e3*v(.9144)},"cubic-miles":{inBaseUnits:1e3*v(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},b=function(){const e={};for(const t in S)for(const r in S[t].units)e[r]=t;return e}();function w(e){const t=b[e];if(t)return t;throw new Error("unknown measure")}function _(e,t=null){return t=t||w(e),S[t].baseUnit===e}function M(e,t,r){if(t===r)return e;const s=w(t);if(s!==w(r))throw new Error("incompatible units");const i=_(t,s)?e:function(e,t,r){return e*S[r].units[t].inBaseUnits}(e,t,s);return _(r,s)?i:function(e,t,r){return e/S[r].units[t].inBaseUnits}(i,r,s)}function A(e,t,r){return M(e,t,"meters")/(r*Math.PI/180)}function x(e){return m.fromJSON(e.toLowerCase())||null}function I(e){if(e&&"object"==typeof e&&!(0,a.N$)(e))return 1;const t=C(e);return t>1e5?1:t}function U(e){return C(e)>=(e instanceof o.Z?(0,n.Iu)(e).metersPerDegree:1e5)?"meters":R(e)}function C(e,t=l.sv.metersPerDegree){return E(e,!0)||t}function E(e,t=!1){let r,s,i=null;if(null!=e&&("object"==typeof e?(r=e.wkid,s=e.wkt):"number"==typeof e?r=e:"string"==typeof e&&(s=e)),r){if((0,a.o$)(r))return l.yr.metersPerDegree;if((0,a.ME)(r))return l.Z1.metersPerDegree;i=d.values[d[r]],!i&&t&&f.has(r)&&(i=h)}else s&&(D(s)?i=T(p.exec(s),i):P(s)&&(i=T(y.exec(s),i)));return i}function T(e,t){return e&&e[1]?O(e[1]):t}function O(e){return parseFloat(e.split(",")[1])}function R(e){let t,r,s=null;if(null!=e&&("object"==typeof e?(t=e.wkid,r=e.wkt):"number"==typeof e?t=e:"string"==typeof e&&(r=e)),t)s=d.units[d[t]];else if(r){const e=D(r)?p:P(r)?y:null;if(e){const t=e.exec(r);t&&t[1]&&(s=function(e){const t=/[\\"\\']{1}([^\\"\\']+)/.exec(e);let r=t&&t[1];if(!r||-1===d.units.indexOf(r)){const t=O(e);r=null;const s=d.values;for(let e=0;e<s.length;++e)if(Math.abs(t-s[e])<1e-7){r=d.units[e];break}}return r}(t[1]))}}return(0,i.pC)(s)?x(s):null}function P(e){return/^GEOCCS/i.test(e)}function D(e){return/^PROJCS/i.test(e)}const B={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},k={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},N=(0,s.wY)()(B),L=(0,s.wY)()(k);(0,s.wY)()({...B,...k})},24678:(e,t,r)=>{r.d(t,{GG:()=>l,HQ:()=>a,VY:()=>u,wY:()=>c,Iu:()=>p,e8:()=>d,rS:()=>h});var s=r(82971),i=r(68441),n=r(8744);function o(e){return new s.Z({wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`})}const l=o(i.sv),a=o(i.yr),u=o(i.Z1),c=new s.Z({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${i.sv.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`});function h(e){return e&&((0,n.BZ)(e)||e===a)?a:e&&((0,n.V2)(e)||e===u)?u:l}function p(e){return e&&((0,n.BZ)(e)||e===a)?i.yr:e&&((0,n.V2)(e)||e===u)?i.Z1:i.sv}function d(e){return(0,n.o$)(e)?i.yr:(0,n.ME)(e)?i.Z1:i.sv}},24470:(e,t,r)=>{r.d(t,{Gv:()=>p,SO:()=>u,r3:()=>h,Ue:()=>n,oJ:()=>l,al:()=>o,kK:()=>c,HH:()=>a}),r(80442),r(22021);var s=r(70586),i=r(6570);function n(e=d){return[e[0],e[1],e[2],e[3]]}function o(e,t,r,s,i=n()){return i[0]=e,i[1]=t,i[2]=r,i[3]=s,i}function l(e,t=n()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function a(e,t){return new i.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function u(e){return function(e){return(0,s.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function c(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function h(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}const p=[1/0,1/0,-1/0,-1/0],d=[0,0,0,0]},29600:(e,t,r)=>{r.d(t,{Z:()=>b});var s=r(43697),i=r(68773),n=(r(66577),r(3172)),o=r(20102),l=r(32448),a=r(10699),u=r(83379),c=r(92604),h=r(95330),p=r(17452),d=r(5600),y=(r(67676),r(80442),r(75215),r(52011)),f=r(6570),m=r(82971);let g=0;const v=c.Z.getLogger("esri.layers.Layer");let S=class extends(l.Z.EventedMixin((0,a.I)(u.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e,s=await r.e(3529).then(r.bind(r,63529));try{return await s.fromUrl(t)}catch(e){throw v.error("#fromArcGISServerUrl({ url: '"+t.url+"'})","Failed to create layer from arcgis server url",e),e}}static async fromPortalItem(e){const t="portalItem"in e?e:{portalItem:e},s=await r.e(4579).then(r.bind(r,44579));try{return await s.fromItem(t)}catch(e){const r=t&&t.portalItem,s=r&&r.id||"unset",n=r&&r.portal&&r.portal.url||i.Z.portalUrl;throw v.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+s+"')",e),e}}initialize(){this.when().catch((e=>{var t,r;(0,h.D_)(e)||c.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${null!=(t=this.title)?t:"no title"}', id: '${null!=(r=this.id)?r:"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,p.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,s._)([(0,d.Cb)({type:String})],S.prototype,"attributionDataUrl",void 0),(0,s._)([(0,d.Cb)({type:f.Z})],S.prototype,"fullExtent",void 0),(0,s._)([(0,d.Cb)({readOnly:!0})],S.prototype,"hasAttributionData",null),(0,s._)([(0,d.Cb)({type:String})],S.prototype,"id",void 0),(0,s._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],S.prototype,"legendEnabled",void 0),(0,s._)([(0,d.Cb)({type:["show","hide","hide-children"]})],S.prototype,"listMode",void 0),(0,s._)([(0,d.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],S.prototype,"opacity",void 0),(0,s._)([(0,d.Cb)()],S.prototype,"parent",void 0),(0,s._)([(0,d.Cb)({readOnly:!0})],S.prototype,"parsedUrl",null),(0,s._)([(0,d.Cb)({type:Boolean})],S.prototype,"popupEnabled",void 0),(0,s._)([(0,d.Cb)({type:Boolean})],S.prototype,"attributionVisible",void 0),(0,s._)([(0,d.Cb)({type:m.Z})],S.prototype,"spatialReference",void 0),(0,s._)([(0,d.Cb)({type:String})],S.prototype,"title",void 0),(0,s._)([(0,d.Cb)({type:String,readOnly:!0,json:{read:!1}})],S.prototype,"type",void 0),(0,s._)([(0,d.Cb)()],S.prototype,"url",void 0),(0,s._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],S.prototype,"visible",void 0),S=(0,s._)([(0,y.j)("esri.layers.Layer")],S);const b=S},44854:(e,t,r)=>{r.r(t),r.d(t,{default:()=>re});var s=r(43697),i=r(3172),n=r(20102),o=r(22974),l=r(16453),a=r(95330),u=r(17452),c=r(5600),h=(r(75215),r(71715)),p=r(52011),d=r(30556),y=r(6570),f=r(82971),m=r(29600),g=r(54295),v=r(46486),S=r(17287),b=r(71612),w=r(17017),_=r(38009),M=r(16859),A=r(72965);let x=null;const I=r(92604).Z.getLogger("esri.layers.support.SpriteSource");class U{constructor(e,t,r,s){this.baseURL=e,this.devicePixelRatio=t,this.maxTextureSize=r,this._spriteImageFormat=s,this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded"}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData[e]}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}_loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const t=(0,u.mN)(this.baseURL),r=t.query?"?"+(0,u.B7)(t.query):"",s=this._isRetina?"@2x":"",o=`${t.path}${s}.${this._spriteImageFormat}${r}`,l=`${t.path}${s}.json${r}`;return Promise.all([(0,i.default)(l,e),(0,i.default)(o,{responseType:"image",...e})]).then((([e,r])=>{const s=Object.keys(e.data);if(!s||0===s.length||1===s.length&&"_ssl"===s[0]||!r||!r.data)return this._spritesData=this.image=null,this.width=this.height=0,Promise.resolve(null);this._spritesData=e.data;const i=r.data,o=Math.max(this.maxTextureSize,4096);if(i.width>o||i.height>o){const e=`Sprite resource for style ${t.path} is bigger than the maximum allowed of ${o} pixels}`;throw I.error(e),new n.Z("SpriteSource",e)}this.width=i.width,this.height=i.height;const l=document.createElement("canvas"),a=l.getContext("2d");l.width=i.width,l.height=i.height,a.drawImage(i,0,0,i.width,i.height);const u=a.getImageData(0,0,i.width,i.height),c=new Uint8Array(u.data);let h;for(let e=0;e<c.length;e+=4)h=c[e+3]/255,c[e]=c[e]*h,c[e+1]=c[e+1]*h,c[e+2]=c[e+2]*h;this.image=c}))}}var C=r(11145),E=r(68773),T=r(45322),O=r(56608),R=r(55415);class P{constructor(e){this.url=e}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.default)(this.url).then((e=>e.data.index))),this._tileIndexPromise}async dataKey(e,t){const r=await this.fetchTileIndex();return(0,a.k_)(t),this._getIndexedDataKey(r,e)}_getIndexedDataKey(e,t){const r=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let s=t;for(;0!==s.level;)s=new R.Z(s.level-1,s.row>>1,s.col>>1,s.world),r.push(s);let i,n,o=e,l=r.pop();if(1===o)return l;for(;r.length;)if(i=r.pop(),n=(1&i.col)+((1&i.row)<<1),o){if(0===o[n]){l=null;break}if(1===o[n]){l=i;break}l=i,o=o[n]}return l}}class D{constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.default)(this._tileIndexUrl,{query:{...null==e?void 0:e.query}}).then((e=>e.data.index))),this._tileIndexPromise}dataKey(e,t){const{level:r,row:s,col:i}=e,n=new R.Z(e);return this._tilemap.fetchAvailabilityUpsample(r,s,i,n,t).then((()=>(n.world=e.world,n))).catch((e=>{if((0,a.D_)(e))throw e;return null}))}}const B=new Map;class k{constructor(e,t,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.name=e,this.sourceUrl=t;const s=(0,u.mN)(this.sourceUrl),i=(0,o.d9)(r),n=i.tiles;if(s)for(let e=0;e<n.length;e++){const t=(0,u.mN)(n[e]);t&&((0,u.YP)(t.path)||(t.path=(0,u.v_)(s.path,t.path)),n[e]=(0,u.fl)(t.path,{...s.query,...t.query}))}this.tileServers=n;const l=r.capabilities&&r.capabilities.split(",").map((e=>e.toLowerCase().trim())),a=!0===(null==r?void 0:r.exportTilesAllowed),c=!0===(null==l?void 0:l.includes("tilemap")),h=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:c},exportTiles:a?{maxExportTilesCount:+h}:null},this.tileInfo=(0,T.d)(i.tileInfo,i,null,{ignoreMinMaxLOD:!0});const p=r.tileMap?(0,u.fl)((0,u.v_)(s.path,r.tileMap),s.query):null;c?(this.type="vector-tile",this.tilemap=new D(new O.y({layer:{parsedUrl:s,tileInfo:this.tileInfo,type:"vector-tile",tileServers:this.tileServers}}),p)):p&&(this.tilemap=new P(p)),this.fullExtent=y.Z.fromJSON(r.fullExtent)}destroy(){}async getRefKey(e,t){var r,s;return null!=(r=null==(s=this.tilemap)?void 0:s.dataKey(e,t))?r:e}requestTile(e,t,r,s){return function(e,t,r,s,n){return function(e,t){const r=B.get(e);if(r)return r.then((e=>(0,o.d9)(e)));const s=(0,i.default)(e,{responseType:"array-buffer",...t}).then((({data:t})=>(B.delete(e),t))).catch((t=>{throw B.delete(e),t}));return B.set(e,s),s}(e.replace(/\{z\}/gi,t.toString()).replace(/\{y\}/gi,r.toString()).replace(/\{x\}/gi,s.toString()),n)}(this.tileServers[t%this.tileServers.length],e,t,r,s)}isCompatibleWith(e){const t=this.tileInfo,r=e.tileInfo;if(!t.spatialReference.equals(r.spatialReference))return!1;if(!t.origin.equals(r.origin))return!1;if(Math.round(t.dpi)!==Math.round(r.dpi))return!1;const s=t.lods,i=r.lods,n=Math.min(s.length,i.length);for(let e=0;e<n;e++){const t=s[e],r=i[e];if(t.level!==r.level||Math.round(t.scale)!==Math.round(r.scale))return!1}return!0}}const N=E.Z.defaults&&E.Z.defaults.io.corsEnabledServers;function L(e){if(!e)return;const t=(0,u.P$)(e);N&&!N.includes(t)&&N.push(t)}function q(...e){let t;for(let r=0;r<e.length;++r)if((0,u.oC)(e[r])){if(t){const s=t.split("://")[0];t=s+":"+e[r].trim()}}else t=(0,u.YP)(e[r])?e[r]:(0,u.v_)(t,e[r]);return(0,u.Qj)(t)}async function j(e,t,r,s,n){let o,l,c;if((0,a.k_)(n),"string"==typeof r){const e=(0,u.Fv)(r);L(e),c=await(0,i.default)(e,{...n,responseType:"json",query:{f:"json",...null==n?void 0:n.query}}),c.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),l&&(l=l.replace(/^http:/i,"https:"))),o=e,l=e}else c={data:r},o=r.jsonUrl||null,l=s;const h=c.data;return F(h)?(e.styleUrl=o||null,async function(e,t,r,s){const i=r?(0,u.Yd)(r):(0,u.L)();e.styleBase=i,e.style=t,e.styleUrl&&L(e.styleUrl),t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const n=[];if(t.sources&&t.sources.esri){const r=t.sources.esri;r.url?await j(e,"esri",q(i,r.url),void 0,s):n.push(j(e,"esri",r,i,s))}for(const r of Object.keys(t.sources))"esri"!==r&&"vector"===t.sources[r].type&&(t.sources[r].url?n.push(j(e,r,q(i,t.sources[r].url),void 0,s)):t.sources[r].tiles&&n.push(j(e,r,t.sources[r],i,s)));await Promise.all(n)}(e,h,l,n)):function(e){return!F(e)}(h)?e.sourceUrl?G(e,h,l,!1,t,n):(e.sourceUrl=o||null,G(e,h,l,!0,t,n)):Promise.reject("You must specify the URL or the JSON for a service or for a style.")}function F(e){return!!e.sources}async function G(e,t,r,s,i,n){const o=r?(0,u.Qj)(r)+"/":(0,u.L)(),l=function(e,t){if(e.hasOwnProperty("tileInfo"))return e;const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100}};let s=78271.51696400007,i=295828763.7957775;const n=[],o=e.hasOwnProperty("minzoom")?+e.minzoom:0,l=e.hasOwnProperty("maxzoom")?+e.maxzoom:22;for(let e=0;e<=l;e++)e>=o&&n.push({level:e,scale:i,resolution:s}),s/=2,i/=2;for(const r of e.tiles)L(q(t,r));return{capabilities:"TilesOnly",initialExtent:r,fullExtent:r,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:n,spatialReference:{wkid:102100}}}}(t,o),a=new k(i,(0,u.fl)(o,null==n?void 0:n.query),l);if(!s&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(a))return Promise.resolve();null!=a.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(a.fullExtent):t.fullExtent=a.fullExtent.clone()),t.tileInfo.lods.length<a.tileInfo.lods.length&&(t.tileInfo=a.tileInfo)}if(s?(e.sourceBase=o,e.source=t,e.validatedSource=l,e.primarySourceName=i,e.sourceUrl&&L(e.sourceUrl)):L(o),e.sourceNameToSource[i]=a,!e.style)return null==t.defaultStyles?Promise.reject():"string"==typeof t.defaultStyles?j(e,"",q(o,t.defaultStyles,"root.json"),void 0,n):j(e,"",t.defaultStyles,q(o,"root.json"),n)}var Z=r(33516),Y=r(39450);class ${constructor(e,t){this.lockedSchemaPixelSize=e,this.isGCS=t}getLevelRowColumn(e){return this.isGCS?[e[0],e[1]>>1,e[2]>>1]:256===this.lockedSchemaPixelSize&&e[0]>0?[e[0]-1,e[1]>>1,e[2]>>1]:e}adjustLevel(e){return this.isGCS?e:256===this.lockedSchemaPixelSize?e>0?e-1:0:e}getShift(e,t){let r=0,s=0;return(256===this.lockedSchemaPixelSize||this.isGCS)&&(e[2]%2&&(r=t),e[1]%2&&(s=t)),[r,s]}getScale(e){if(this.isGCS){if(512===this.lockedSchemaPixelSize)return 4}else if(256===this.lockedSchemaPixelSize&&0===e)return 1;return 2}static create256x256CompatibleTileInfo(e){if(!e)return null;if(256===e.size[0]&&256===e.size[1])return e;const t=e.spatialReference.isGeographic,r=[],s=e.lods.length;for(let i=0;i<s;i++){const s=e.lods[i],n=t?s.resolution:2*s.resolution;r.push(new Y.Z({level:s.level,scale:s.scale,resolution:n}))}return new C.Z({size:[256,256],dpi:e.dpi,format:e.format,compressionQuality:e.compressionQuality,origin:e.origin,spatialReference:e.spatialReference,lods:r})}static create512x512CompatibleTileInfo(e){if(!e)return null;if(256===e.size[0]||256===e.size[1])return null;const t=[],r=e.lods.length;for(let s=0;s<r;s++){const r=e.lods[s],i=.5*r.resolution;t.push(new Y.Z({level:r.level,scale:r.scale,resolution:i}))}return new C.Z({size:[512,512],dpi:e.dpi,format:e.format,compressionQuality:e.compressionQuality,origin:e.origin,spatialReference:e.spatialReference,lods:t})}}const H=1e-6;function W(e,t){if(e===t)return!0;if(!e&&null!=t)return!1;if(null!=e&&!t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const r=e.origin,s=t.origin;if(Math.abs(r.x-s.x)>=H||Math.abs(r.y-s.y)>=H)return!1;let i,n;e.lods[0].scale>t.lods[0].scale?(i=e,n=t):(n=e,i=t);for(let e=i.lods[0].scale;e>=n.lods[n.lods.length-1].scale-H;e/=2)if(Math.abs(e-n.lods[0].scale)<H)return!0;return!1}function z(e,t){if(e===t)return e;if(!e&&null!=t)return t;if(null!=e&&!t)return e;const r=e.size[0],s=e.format,i=e.dpi,n={x:e.origin.x,y:e.origin.y},o=e.spatialReference.toJSON(),l=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=l.scale,c=l.resolution,h=a.scale,p=[];let d=u,y=c,f=0;for(;d>h;)p.push({level:f,resolution:y,scale:d}),f++,d/=2,y/=2;return new C.Z({size:[r,r],dpi:i,format:s||"pbf",origin:n,lods:p,spatialReference:o})}var V=r(51785),K=r(70586),Q=r(54738);let J;function X(){return J||(J=function(){const e=new ee,t=function(e,t){if(e===Q.zO.WEBGL1&&void 0===typeof WebGLRenderingContext||e===Q.zO.WEBGL2&&void 0===typeof WebGL2RenderingContext)return null;const r=document.createElement("canvas");if(!r)return null;let s=(0,Q.kr)(r,e,{failIfMajorPerformanceCaveat:!0});if((0,K.Wi)(s)&&(s=(0,Q.kr)(r,e),(0,K.pC)(s)&&(t.majorPerformanceCaveat=!0)),(0,K.Wi)(s))return s;if(e===Q.zO.WEBGL1){const e=s.getParameter(s.VERSION),r=null==e?void 0:e.match(/^WebGL\s+([\d.]*)/);if(r){const e=parseFloat(r[1]);t.available=e>=.94}}else t.available=!0;t.maxTextureSize=s.getParameter(s.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);return i&&(t.supportsHighPrecisionFragment=i.precision>0),s}(Q.zO.WEBGL1,e);return(0,K.Wi)(t)||(e.supportsElementIndexUint=null!==t.getExtension("OES_element_index_uint"),e.supportsStandardDerivatives=null!==t.getExtension("OES_standard_derivatives"),e.supportsInstancedArrays=null!==t.getExtension("ANGLE_instanced_arrays"),e.supportsTextureFloat=null!==t.getExtension("OES_texture_float")),e}()),J}class ee extends class{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1}}{constructor(){super(...arguments),this.type=Q.zO.WEBGL1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1}}let te=class extends((0,b.h)((0,A.M)((0,v.Z)((0,S.Y)((0,_.q)((0,M.I)((0,w.N)((0,g.V)((0,l.R)(m.Z)))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.style=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.type="vector-tile",this.url=null,this.symbolCollisionBoxesVisible=!1,this.path=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))null==e||e.destroy();this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(a.r9).then((async()=>{if(!this.portalItem||!this.portalItem.id)return;const t=`${this.portalItem.itemUrl}/resources/styles/root.json`;(await(0,i.default)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:t},(0,Z.m)(this.portalItem))})).catch(a.r9).then((()=>this._loadStyle(e)));return this.addResolvingPromise(t),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e&&e.serviceUrl&&(0,u.mN)(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?(0,u.fl)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){var e;return(null==(e=this.primarySource)?void 0:e.fullExtent)||null}get parsedUrl(){return this.serviceUrl?(0,u.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo&&this.currentStyleInfo.serviceUrl||null}get spatialReference(){return this.tileInfo&&this.tileInfo.spatialReference||null}get styleUrl(){return this.currentStyleInfo&&this.currentStyleInfo.styleUrl||null}writeStyleUrl(e,t){e&&(0,u.oC)(e)&&(e=`https:${e}`),t.styleUrl=e}get tileInfo(){var e;const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let r=(null==(e=this.primarySource)?void 0:e.tileInfo)||new C.Z;if(t.length>1)for(let e=0;e<t.length;e++)W(r,t[e].tileInfo)&&(r=z(r,t[e].tileInfo));return r}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}get compatibleTileInfo256(){return $.create256x256CompatibleTileInfo(this.tileInfo)}get compatibleTileInfo512(){return $.create512x512CompatibleTileInfo(this.tileInfo)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){var r;const s=X().maxTextureSize,i=null!=(r=this.currentStyleInfo)&&r.spriteUrl?(0,u.fl)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,n=new U(i,e,s,this.currentStyleInfo.spriteFormat);await n.load(t),this._spriteSourceMap.set(e,n)}return Promise.resolve(this._spriteSourceMap.get(e))}async loadStyle(e,t){var r;const s=e||this.style||this.url;return this._loadingTask&&"string"==typeof s&&this.url===s||(null==(r=this._loadingTask)||r.abort(),this._loadingTask=(0,a.vr)((e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(s,{signal:e}))),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,o.d9)(this.styleRepository.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const s=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||s})}getStyleLayer(e){return(0,o.d9)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,o.d9)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return null!=t&&t.origin&&!this.styleUrl?(t.messages&&t.messages.push(new n.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await async function(e,t){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[s,i]="string"==typeof e?[e,null]:[null,e.jsonUrl];await j(r,"esri",e,i,t);const n={layerDefinition:r.validatedSource,url:s,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&q(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&q(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName};return L(n.spriteUrl),L(n.glyphsUrl),n}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(e){if(x)return x;const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return x=new Promise((e=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,e(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,e(!1)},r.src="data:image/webp;base64,"+t.lossy})),x}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new V.Z(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),r=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!t)return;const s=t[2]&&t[2].toLowerCase();if(!s)return;const i=t[1]||"";for(const e of r)if(e.toLowerCase().includes(s))return(0,u.Fv)(`//static.arcgis.com/attribution/Vector${i}/${e}`)}async _loadStyle(e){var t,r;return null!=(t=null==(r=this._loadingTask)?void 0:r.promise)?t:this.loadStyle(null,e)}};(0,s._)([(0,c.Cb)({readOnly:!0})],te.prototype,"attributionDataUrl",null),(0,s._)([(0,c.Cb)({type:["show","hide"]})],te.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],te.prototype,"capabilities",null),(0,s._)([(0,c.Cb)({readOnly:!0})],te.prototype,"currentStyleInfo",void 0),(0,s._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:y.Z})],te.prototype,"fullExtent",null),(0,s._)([(0,c.Cb)()],te.prototype,"style",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],te.prototype,"isReference",void 0),(0,s._)([(0,c.Cb)({type:["VectorTileLayer"]})],te.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],te.prototype,"parsedUrl",null),(0,s._)([(0,c.Cb)({readOnly:!0})],te.prototype,"serviceUrl",null),(0,s._)([(0,c.Cb)({type:f.Z,readOnly:!0})],te.prototype,"spatialReference",null),(0,s._)([(0,c.Cb)({readOnly:!0})],te.prototype,"styleRepository",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],te.prototype,"sourceNameToSource",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],te.prototype,"primarySource",void 0),(0,s._)([(0,c.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],te.prototype,"styleUrl",null),(0,s._)([(0,d.c)(["portal-item","web-document"],"styleUrl")],te.prototype,"writeStyleUrl",null),(0,s._)([(0,c.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:C.Z})],te.prototype,"tileInfo",null),(0,s._)([(0,c.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],te.prototype,"type",void 0),(0,s._)([(0,c.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],te.prototype,"url",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],te.prototype,"version",void 0),(0,s._)([(0,h.r)("version",["version","currentVersion"])],te.prototype,"readVersion",null),(0,s._)([(0,c.Cb)({readOnly:!0})],te.prototype,"compatibleTileInfo256",null),(0,s._)([(0,c.Cb)({readOnly:!0})],te.prototype,"compatibleTileInfo512",null),(0,s._)([(0,c.Cb)({type:Boolean})],te.prototype,"symbolCollisionBoxesVisible",void 0),(0,s._)([(0,c.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],te.prototype,"path",void 0),te=(0,s._)([(0,p.j)("esri.layers.VectorTileLayer")],te);const re=te},54295:(e,t,r)=>{r.d(t,{V:()=>o});var s=r(43697),i=r(5600),n=(r(67676),r(80442),r(75215),r(52011));const o=e=>{let t=class extends e{get apiKey(){var e;return this._isOverridden("apiKey")?this._get("apiKey"):function(e){return"portalItem"in e}(this)?null==(e=this.portalItem)?void 0:e.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},46486:(e,t,r)=>{r.d(t,{Z:()=>c});var s=r(43697),i=(r(66577),r(5600)),n=(r(67676),r(80442),r(75215),r(71715)),o=r(52011),l=r(45322),a=r(56608),u=r(82971);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t){return t.capabilities&&t.capabilities.indexOf("Tilemap")>-1?new a.y({layer:this}):null}};return(0,s._)([(0,i.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,s._)([(0,i.Cb)()],t.prototype,"minScale",void 0),(0,s._)([(0,n.r)("service","minScale")],t.prototype,"readMinScale",null),(0,s._)([(0,i.Cb)()],t.prototype,"maxScale",void 0),(0,s._)([(0,n.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,s._)([(0,i.Cb)({type:u.Z})],t.prototype,"spatialReference",void 0),(0,s._)([(0,i.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,s._)([(0,i.Cb)(l.h)],t.prototype,"tileInfo",void 0),(0,s._)([(0,i.Cb)()],t.prototype,"tilemapCache",void 0),(0,s._)([(0,n.r)("service","tilemapCache",["capabilities"])],t.prototype,"readTilemapCache",null),(0,s._)([(0,i.Cb)()],t.prototype,"version",void 0),t=(0,s._)([(0,o.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>u});var s=r(43697),i=r(92604),n=r(70586),o=r(5600),l=(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,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,i.Z.getLogger(this.declaredClass)))}};return(0,s._)([(0,o.Cb)()],t.prototype,"title",null),(0,s._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,l.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>o});var s=r(43697),i=r(5600),n=(r(67676),r(80442),r(75215),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,n.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},66677:(e,t,r)=>{r.d(t,{ld:()=>y,B5:()=>h,M8:()=>m,G:()=>b,Qc:()=>p,DR:()=>d,Nm:()=>g,XG:()=>v,a7:()=>f,wH:()=>S});var s=r(70586),i=r(17452),n=r(25929);const o={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},l=Object.values(o),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(e){return!!a.test(e)}function p(e){const t=(0,i.mN)(e),r=t.path.match(a)||t.path.match(u);if(!r)return null;const[,s,n,l,c]=r,h=n.indexOf("/");return{title:y(-1!==h?n.slice(h+1):n),serverType:o[l.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:s}}}function d(e){const t=(0,i.mN)(e).path.match(c);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function y(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,t){const r=[];if(e){const t=p(e);(0,s.pC)(t)&&t.title&&r.push(t.title)}if(t){const e=y(t);r.push(e)}if(2===r.length){if(-1!==r[0].toLowerCase().indexOf(r[1].toLowerCase()))return r[0];if(-1!==r[1].toLowerCase().indexOf(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function m(e){if(!e)return!1;const t=-1!==(e=e.toLowerCase()).indexOf(".arcgis.com/"),r=-1!==e.indexOf("//services")||-1!==e.indexOf("//tiles")||-1!==e.indexOf("//features");return t&&r}function g(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function v(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const r=(0,i.mN)(t),n=p(r.path);let o;if((0,s.pC)(n))null!=n.sublayer&&null==e.layer.layerId&&(o=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(r.path);(0,s.pC)(e)&&(t=e.serviceUrl,o=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:o}}function S(e,t,r,s,o){(0,n.w)(t,s,"url",o),s.url&&null!=e.layerId&&(s.url=(0,i.v_)(s.url,r,e.layerId.toString()))}function b(e){if(!e)return!1;const t=e.toLowerCase(),r=-1!==t.indexOf("/services/"),s=-1!==t.indexOf("/mapserver/wmsserver"),i=-1!==t.indexOf("/imageserver/wmsserver"),n=-1!==t.indexOf("/wmsserver");return r&&(s||i||n)}},33516:(e,t,r)=>{r.d(t,{m:()=>n});var s=r(17452),i=r(65587);function n(e){return{origin:"portal-item",url:(0,s.mN)(e.itemUrl),portal:e.portal||i.Z.getDefault(),portalItem:e,readResourcePaths:[]}}},55415:(e,t,r)=>{r.d(t,{Z:()=>i});var s=r(71143);class i{constructor(e,t,r,s){this.set(e,t,r,s)}static getId(e,t,r,s){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${r}/${s}`}get key(){return this}get id(){return this.toString()}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,r=63&this.level;return(3&this.world)<<30|t<<22|e<<8|r}acquire(e,t,r,s){this.set(e,t,r,s)}contains(e){const t=e.level-this.level;return this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,r,s){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,r,s,i]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(r),this.col=parseFloat(s),this.world=parseFloat(i)}else this.level=+e,this.row=+t,this.col=+r,this.world=+s||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new i(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const e=this.level+1,t=this.row<<1,r=this.col<<1,s=this.world;return[new i(e,t,r,s),new i(e,t,r+1,s),new i(e,t+1,r,s),new i(e,t+1,r+1,s)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}i.pool=new s.Z(i,null,null,25,50)},89749:(e,t,r)=>{r.d(t,{t:()=>h});var s=r(43697),i=r(15923),n=r(61247),o=r(70586),l=r(17445),a=r(1654),u=r(5600),c=r(52011);let h=class extends i.Z{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new n.Z,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,t,r={}){const s=++this.handleId;r.sync||this._installSyncUpdatingWatch(e,s);const i=(0,l.YP)(e,t,r);return this.handles.add(i,s),{remove:()=>this.handles.remove(s)}}addOnCollectionChange(e,t,{initial:r=!1}={}){const s=++this.handleId;return this.handles.add([(0,l.on)(e,"after-changes",this._createSyncUpdatingCallback(),l.Z_),(0,l.on)(e,"change",t,{onListenerAdd:r?e=>t({added:e.items,removed:[],moved:[],target:e}):void 0})],s),{remove:()=>this.handles.remove(s)}}addPromise(e){if((0,o.Wi)(e))return e;const t=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(p)||this._set("updating",!1))}},t),this.pendingPromises.add(e),this._set("updating",!0);const r=()=>this.handles.remove(t);return e.then(r,r),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}_installSyncUpdatingWatch(e,t){const r=this._createSyncUpdatingCallback(),s=(0,l.YP)(e,r,{sync:!0,equals:()=>!1});return this.handles.add(s,t),s}_createSyncUpdatingCallback(){return()=>{this.handles.remove(p),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add((0,a.Os)((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(p))})),p)}}};(0,s._)([(0,u.Cb)({readOnly:!0})],h.prototype,"updating",void 0),h=(0,s._)([(0,c.j)("esri.views.support.WatchUpdatingTracking")],h);const p=-42;var d,y;(y=d||(d={}))[y.NONE=0]="NONE",y[y.SYNC=1]="SYNC",y[y.INIT=2]="INIT"},54738:(e,t,r)=>{var s,i;function n(e,t,r={}){const i=t===s.WEBGL1?["webgl","experimental-webgl","webkit-3d","moz-webgl"]:["webgl2"];let n=null;for(const t of i){try{n=e.getContext(t,r)}catch(e){}if(n)break}return n}r.d(t,{zO:()=>s,kr:()=>n}),r(80442),(i=s||(s={}))[i.WEBGL1=1]="WEBGL1",i[i.WEBGL2=2]="WEBGL2"},65242:(e,t,r)=>{r.d(t,{a:()=>i,b:()=>n});var s=r(75215);function i(e){const t=(0,s.vU)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8163],{95401:(t,e,n)=>{n.d(e,{e:()=>a});var r,o,i,s={exports:{}};r=s,o=function(){function t(t,n,o){o=o||2;var i,s,a,c,u,p,h,f=n&&n.length,g=f?n[0]*o:t.length,d=e(t,0,g,o,!0),x=[];if(!d||d.next===d.prev)return x;if(f&&(d=l(t,n,d,o)),t.length>80*o){i=a=t[0],s=c=t[1];for(var m=o;m<g;m+=o)(u=t[m])<i&&(i=u),(p=t[m+1])<s&&(s=p),u>a&&(a=u),p>c&&(c=p);h=0!==(h=Math.max(a-i,c-s))?1/h:0}return r(d,x,o,i,s,h),x}function e(t,e,n,r,o){var i,s;if(o===F(t,e,n,r)>0)for(i=e;i<n;i+=r)s=Z(i,t[i],t[i+1],s);else for(i=n-r;i>=e;i-=r)s=Z(i,t[i],t[i+1],s);if(s&&v(s,s.next)){var a=s.next;_(s),s=a}return s}function n(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(_(r),(r=e=o)===r.next)break;n=!0}}while(n||r!==e);return e}function r(t,e,l,c,u,p,h){if(t){!h&&p&&f(t,c,u,p);for(var g,d,x=t;t.prev!==t.next;)if(g=t.prev,d=t.next,p?i(t,c,u,p):o(t))e.push(g.i/l),e.push(t.i/l),e.push(d.i/l),_(t),t=d.next,x=d.next;else if((t=d)===x){h?1===h?r(t=s(n(t),e,l),e,l,c,u,p,2):2===h&&a(t,e,l,c,u,p):r(n(t),e,l,c,u,p,1);break}}}function o(t){var e=t.prev,n=t,r=t.next;if(y(e,n,r)>=0)return!1;for(var o=t.next.next;o!==t.prev;){if(x(e.x,e.y,n.x,n.y,r.x,r.y,o.x,o.y)&&y(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(t,e,n,r){var o=t.prev,i=t,s=t.next;if(y(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,p=g(a,l,e,n,r),h=g(c,u,e,n,r),f=t.prevZ,d=t.nextZ;f&&f.z>=p&&d&&d.z<=h;){if(f!==t.prev&&f!==t.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==t.prev&&d!==t.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=p;){if(f!==t.prev&&f!==t.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function s(t,e,r){var o=t;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&A(i,s)&&A(s,i)&&(e.push(i.i/r),e.push(o.i/r),e.push(s.i/r),_(o),_(o.next),o=t=s),o=o.next}while(o!==t);return n(o)}function a(t,e,o,i,s,a){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=M(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,e,o,i,s,a),void r(u,e,o,i,s,a)}c=c.next}l=l.next}while(l!==t)}function l(t,r,o,i){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=e(t,r[s]*i,s<a-1?r[s+1]*i:t.length,i,!1))===l.next&&(l.steiner=!0),u.push(d(l));for(u.sort(c),s=0;s<u.length;s++)o=n(o=p(u[s],o),o.next);return o}function c(t,e){return t.x-e.x}function u(t){if(t.next.prev===t)return t;let e=t;for(;;){const n=e.next;if(n.prev===e||n===e||n===t)break;e=n}return e}function p(t,e){var r=function(t,e){var n,r=e,o=t.x,i=t.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(o===s)return n;var l,c=n,u=n.x,p=n.y,f=1/0;r=n;do{o>=r.x&&r.x>=u&&o!==r.x&&x(i<p?o:s,i,u,p,i<p?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),A(r,t)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=l)),r=r.next}while(r!==c);return n}(t,e);if(!r)return e;var o=M(r,t),i=n(r,r.next);let s=u(o);return n(s,s.next),i=u(i),u(e===r?i:e)}function h(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function f(t,e,n,r){var o=t;do{null===o.z&&(o.z=g(o.x,o.y,e,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,function(t){var e,n,r,o,i,s,a,l,c=1;do{for(n=t,t=null,i=null,s=0;n;){for(s++,r=n,a=0,e=0;e<c&&(a++,r=r.nextZ);e++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:t=o,o.prevZ=i,i=o;n=r}i.nextZ=null,c*=2}while(s>1)}(o)}function g(t,e,n,r,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function x(t,e,n,r,o,i,s,a){return(o-s)*(e-a)-(t-s)*(i-a)>=0&&(t-s)*(r-a)-(n-s)*(e-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&w(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(A(t,e)&&A(e,t)&&function(t,e){var n=t,r=!1,o=(t.x+e.x)/2,i=(t.y+e.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||v(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,n,r){var o=C(y(t,e,n)),i=C(y(t,e,r)),s=C(y(n,r,t)),a=C(y(n,r,e));return o!==i&&s!==a||!(0!==o||!b(t,n,e))||!(0!==i||!b(t,r,e))||!(0!==s||!b(n,t,r))||!(0!==a||!b(n,e,r))}function b(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function C(t){return t>0?1:t<0?-1:0}function A(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function M(t,e){var n=new T(t.i,t.x,t.y),r=new T(e.i,e.x,e.y),o=t.next,i=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function Z(t,e,n,r){var o=new T(t,e,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function _(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function F(t,e,n,r){for(var o=0,i=e,s=n-r;i<n;i+=r)o+=(t[s]-t[i])*(t[i+1]+t[s+1]),s=i;return o}return t.deviation=function(t,e,n,r){var o=e&&e.length,i=o?e[0]*n:t.length,s=Math.abs(F(t,0,i,n));if(o)for(var a=0,l=e.length;a<l;a++){var c=e[a]*n,u=a<l-1?e[a+1]*n:t.length;s-=Math.abs(F(t,c,u,n))}var p=0;for(a=0;a<r.length;a+=3){var h=r[a]*n,f=r[a+1]*n,g=r[a+2]*n;p+=Math.abs((t[h]-t[g])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[g+1]-t[h+1]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},t.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,o=0;o<t.length;o++){for(var i=0;i<t[o].length;i++)for(var s=0;s<e;s++)n.vertices.push(t[o][i][s]);o>0&&(r+=t[o-1].length,n.holes.push(r))}return n},t},void 0!==(i=o())&&(r.exports=i);const a=s.exports},62540:(t,e,n)=>{n.d(e,{Z:()=>m});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),p=n(75215),h=n(65542),f=n(60746),g=n(71630);const d=a.Z.getLogger("esri.geometry.support.MeshComponent");let x=r=class extends i.wq{constructor(t){super(t),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}static from(t){return(0,p.TJ)(r,t)}castFaces(t){return(0,g.XQ)(t,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},d)}castMaterial(t){return(0,p.TJ)(t&&"object"==typeof t&&("metallic"in t||"roughness"in t||"metallicRoughnessTexture"in t)?f.Z:h.Z,t)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(t,e){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(t,e):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}};(0,o._)([(0,l.Cb)({json:{write:!0}})],x.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],x.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],x.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],x.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],x.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],x.prototype,"trustSourceNormals",void 0),x=r=(0,o._)([(0,u.j)("esri.geometry.support.MeshComponent")],x);const m=x},65542:(t,e,n)=>{n.d(e,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(96674),a=n(70586),l=n(5600),c=(n(67676),n(80442),n(75215),n(52011)),u=n(81118);let p=r=class extends s.wq{constructor(t){super(t),this.color=null,this.colorTexture=null,this.normalTexture=null,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(t,e){const n=(0,a.pC)(t)?t.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(e));return(0,a.pC)(t)&&t.set(this,o),o}clonePropertiesWithDeduplication(t){return{color:(0,a.pC)(this.color)?this.color.clone():null,colorTexture:(0,a.pC)(this.colorTexture)?this.colorTexture.cloneWithDeduplication(t):null,normalTexture:(0,a.pC)(this.normalTexture)?this.normalTexture.cloneWithDeduplication(t):null,alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided}}};(0,o._)([(0,l.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,l.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,l.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=r=(0,o._)([(0,c.j)("esri.geometry.support.MeshMaterial")],p);const h=p},60746:(t,e,n)=>{n.d(e,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(70586),a=n(5600),l=(n(67676),n(80442),n(75215),n(52011)),c=n(65542),u=n(81118);let p=r=class extends c.Z{constructor(t){super(t),this.emissiveColor=null,this.emissiveTexture=null,this.occlusionTexture=null,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(t,e){const n=(0,s.pC)(t)?t.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(e));return(0,s.pC)(t)&&t.set(this,o),o}clonePropertiesWithDeduplication(t){return{...super.clonePropertiesWithDeduplication(t),emissiveColor:(0,s.pC)(this.emissiveColor)?this.emissiveColor.clone():null,emissiveTexture:(0,s.pC)(this.emissiveTexture)?this.emissiveTexture.cloneWithDeduplication(t):null,occlusionTexture:(0,s.pC)(this.occlusionTexture)?this.occlusionTexture.cloneWithDeduplication(t):null,metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:(0,s.pC)(this.metallicRoughnessTexture)?this.metallicRoughnessTexture.cloneWithDeduplication(t):null}}};(0,o._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),p=r=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const h=p},81118:(t,e,n)=>{n.d(e,{Z:()=>m});var r=n(43697),o=(n(80442),n(96674)),i=n(5600),s=(n(67676),n(75215)),a=n(71715),l=n(52011),c=n(30556),u=n(25929);n(22021);let p=null,h=!0;var f;const g=new WeakMap;let d=0,x=f=class extends o.wq{constructor(t){super(t),this.wrap="repeat"}get url(){return this._get("url")||null}set url(t){this._set("url",t),t&&this._set("data",null)}get data(){return this._get("data")||null}set data(t){this._set("data",t),t&&this._set("url",null)}writeData(t,e,n,r){if(t instanceof HTMLImageElement){const o={type:"image-element",src:(0,u.t)(t.src,r),crossOrigin:t.crossOrigin};e[n]=o}else if(t instanceof HTMLCanvasElement){const r=t.getContext("2d").getImageData(0,0,t.width,t.height),o={type:"canvas-element",imageData:this._encodeImageData(r)};e[n]=o}else if(t instanceof HTMLVideoElement){const o={type:"video-element",src:(0,u.t)(t.src,r),autoplay:t.autoplay,loop:t.loop,muted:t.muted,crossOrigin:t.crossOrigin,preload:t.preload};e[n]=o}else{const r={type:"image-data",imageData:this._encodeImageData(t)};e[n]=r}}readData(t){switch(t.type){case"image-element":{const e=new Image;return e.src=t.src,e.crossOrigin=t.crossOrigin,e}case"canvas-element":{const e=this._decodeImageData(t.imageData),n=document.createElement("canvas");return n.width=e.width,n.height=e.height,n.getContext("2d").putImageData(e,0,0),n}case"image-data":return this._decodeImageData(t.imageData);case"video-element":{const e=document.createElement("video");return e.src=t.src,e.crossOrigin=t.crossOrigin,e.autoplay=t.autoplay,e.loop=t.loop,e.muted=t.muted,e.preload=t.preload,e}default:return}}get transparent(){const t=this.data,e=this.url;if(t instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(t.getContext("2d").getImageData(0,0,t.width,t.height));if(t instanceof ImageData)return this._imageDataContainsTransparent(t);if(e){const t=e.substr(e.length-4,4).toLowerCase(),n=e.substr(0,15).toLocaleLowerCase();if(".png"===t||"data:image/png;"===n)return!0}return!1}set transparent(t){null!=t?this._override("transparent",t):this._clearOverride("transparent")}get contentHash(){const t="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",e=(e="")=>`d:${e},t:${this.transparent},w:${t}`;return null!=this.url?e(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?e(this.data.src):(g.has(this.data)||g.set(this.data,++d),e(g.get(this.data))):e()}clone(){const t={url:this.url,data:this.data,wrap:this._cloneWrap()};return new f(t)}cloneWithDeduplication(t){const e=t.get(this);if(e)return e;const n=this.clone();return t.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(t){let e="";for(let n=0;n<t.data.length;n++)e+=String.fromCharCode(t.data[n]);return{data:btoa(e),width:t.width,height:t.height}}_decodeImageData(t){const e=atob(t.data),n=new Uint8ClampedArray(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return function(t,e,n,r){if(!e||!n)throw new Error("Cannot construct image data without dimensions");if(h)try{return new ImageData(t,e,n)}catch(t){h=!1}const o=function(t,e,n){return n||(p||(p=document.createElement("canvas"),p.width=1,p.height=1),n=p),n.getContext("2d").createImageData(t,e)}(e,n,void 0);return o.data.set(t,0),o}(n,t.width,t.height)}_imageDataContainsTransparent(t){for(let e=3;e<t.data.length;e+=4)if(255!==t.data[e])return!0;return!1}static from(t){return"string"==typeof t?new f({url:t}):t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageData||t instanceof HTMLVideoElement?new f({data:t}):(0,s.TJ)(f,t)}};(0,r._)([(0,i.Cb)({type:String,json:{write:u.w}})],x.prototype,"url",null),(0,r._)([(0,i.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,i.Cb)()],x.prototype,"data",null),(0,r._)([(0,c.c)("data")],x.prototype,"writeData",null),(0,r._)([(0,a.r)("data")],x.prototype,"readData",null),(0,r._)([(0,i.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],x.prototype,"transparent",null),(0,r._)([(0,i.Cb)({json:{write:!0}})],x.prototype,"wrap",void 0),(0,r._)([(0,i.Cb)({readOnly:!0})],x.prototype,"contentHash",null),x=f=(0,r._)([(0,l.j)("esri.geometry.support.MeshTexture")],x);const m=x},71630:(t,e,n)=>{n.d(e,{QL:()=>h,XQ:()=>g,ZP:()=>x});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const p=a.Z.getLogger("esri.geometry.support.MeshVertexAttributes");let h=r=class extends i.wq{constructor(t){super(t),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(t){return g(t,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},p)}castPosition(t){return t&&t instanceof Float32Array&&p.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),g(t,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},p)}castUv(t){return g(t,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},p)}castNormal(t){return g(t,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},p)}castTangent(t){return g(t,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},p)}clone(){const t={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(t)}clonePositional(){const t={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(t)}};function f(t,e,n,r){const{loggerTag:o,stride:i}=e;return t.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):t}function g(t,e,n,r,o){if(!t)return t;if(t instanceof e)return f(t,r,e,o);for(const i of n)if(t instanceof i)return f(new e(t),r,e,o);if(Array.isArray(t))return f(new e(t),r,e,o);{const r=n.map((t=>`'${t.name}'`));return o.error(`Failed to set property, expected one of ${r}, but got ${t.constructor.name}`),new e([])}}function d(t,e,n){e[n]=function(t){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=t[n];return e}(t)}(0,o._)([(0,l.Cb)({json:{write:d}})],h.prototype,"color",void 0),(0,o._)([(0,c.p)("color")],h.prototype,"castColor",null),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:d}})],h.prototype,"position",void 0),(0,o._)([(0,c.p)("position")],h.prototype,"castPosition",null),(0,o._)([(0,l.Cb)({json:{write:d}})],h.prototype,"uv",void 0),(0,o._)([(0,c.p)("uv")],h.prototype,"castUv",null),(0,o._)([(0,l.Cb)({json:{write:d}})],h.prototype,"normal",void 0),(0,o._)([(0,c.p)("normal")],h.prototype,"castNormal",null),(0,o._)([(0,l.Cb)({json:{write:d}})],h.prototype,"tangent",void 0),(0,o._)([(0,c.p)("tangent")],h.prototype,"castTangent",null),h=r=(0,o._)([(0,u.j)("esri.geometry.support.MeshVertexAttributes")],h);const x=h},47545:(t,e,n)=>{n.d(e,{d:()=>o});var r=n(22021);function o(t,e,n){var o;const c=t.byteLength/(4*e),u=new Uint32Array(t,0,c*e);let p=new Uint32Array(c);const h=null!=(o=null==n?void 0:n.minReduction)?o:0,f=(null==n?void 0:n.originalIndices)||null,g=f?f.length:0,d=(null==n?void 0:n.componentOffsets)||null;let x=0;if(d)for(let t=0;t<d.length-1;t++){const e=d[t+1]-d[t];e>x&&(x=e)}else x=c;const m=Math.floor(1.1*x)+1;(null==l||l.length<2*m)&&(l=new Uint32Array((0,r.Sf)(2*m)));for(let t=0;t<2*m;t++)l[t]=0;let y=0;const v=!!d&&!!f,w=v?g:c,b=v?new Uint32Array(g):null,C=1.96;let A=0!==h?Math.ceil(4*C*C/(h*h)*h*(1-h)):w,M=1,Z=d?d[1]:w;for(let t=0;t<w;t++){if(t===A){const e=1-y/t;if(e+C*Math.sqrt(e*(1-e)/t)<h)return null;A*=2}if(t===Z){for(let t=0;t<2*m;t++)l[t]=0;if(f)for(let t=d[M-1];t<d[M];t++)b[t]=p[f[t]];Z=d[++M]}const n=v?f[t]:t,r=n*e,o=a(u,r,e);let s=o%m,c=y;for(;0!==l[2*s+1];){if(l[2*s]===o){const t=l[2*s+1]-1;if(i(u,r,t*e,e)){c=p[t];break}}s++,s>=m&&(s-=m)}c===y&&(l[2*s]=o,l[2*s+1]=n+1,y++),p[n]=c}if(0!==h&&1-y/c<h)return null;if(v){for(let t=d[M-1];t<b.length;t++)b[t]=p[f[t]];p=b}const _=new Uint32Array(e*y);y=0;for(let t=0;t<w;t++)p[t]===y&&(s(u,(v?f[t]:t)*e,_,y*e,e),y++);if(f&&!v){const t=new Uint32Array(g);for(let e=0;e<t.length;e++)t[e]=p[f[e]];p=t}return{buffer:_.buffer,indices:p,uniqueCount:y}}function i(t,e,n,r){for(let o=0;o<r;o++)if(t[e+o]!==t[n+o])return!1;return!0}function s(t,e,n,r,o){for(let i=0;i<o;i++)n[r+i]=t[e+i]}function a(t,e,n){let r=0;for(let o=0;o<n;o++)r=t[e+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let l=null},38163:(t,e,n)=>{n.r(e),n.d(e,{meshFeatureSetFromJSON:()=>Et});var r,o,i=n(1692),s=n(70586),a=n(6570),l=n(43697),c=n(20102),u=n(3920),p=n(83379),h=n(92604),f=n(609),g=n(95330),d=n(17445),x=n(5600),m=(n(67676),n(80442),n(75215),n(52011)),y=n(65617),v=n(9361),w=n(13473),b=n(17332),C=n(3709),A=n(62540),M=n(2674),Z=n(71630),_=n(95401),T=n(86662),F=n(47545);function R(t,e,n){const o=t.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,p=0;for(let e=0;e<o;++e)p+=t[e].length;const h=new Float64Array(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=t[p],d=n===r.CCW_IS_HOLE&&I(g);if(d&&1!==o)i[l++]=g;else{let t=g.length;for(let e=0;e<l;++e)t+=i[e].length;const n={index:f,pathLengths:new Array(l+1),count:t,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=d?D(g,g.length-1,-1,h,f,g.length,e):D(g,0,1,h,f,g.length,e);for(let t=0;t<l;++t){const r=i[t];n.holeIndices[t]=f,n.pathLengths[t+1]=r.length,r.length>0&&(a[u++]={index:f,count:r.length}),f=D(r,0,1,h,f,r.length,e)}l=0,n.count>0&&(s[c++]=n)}}for(let t=0;t<l;++t){const n=i[t];n.length>0&&(a[u++]={index:f,count:n.length}),f=D(n,0,1,h,f,n.length,e)}return c<o&&(s.length=c),u<o&&(a.length=u),{position:h,polygons:s,outlines:a}}function D(t,e,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=t[e];r[o++]=i[0],r[o++]=i[1],r[o++]=s?i[2]:0,e+=n}return o/3}function I(t){return!(0,T.bu)(t,!1,!1)}(o=r||(r={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var L=n(90411),E=n(13442),O=n(66459);const P=h.Z.getLogger("esri.geometry.support.meshUtils.centerAt");const S=(0,y.c)(),j=(0,y.c)();var z=n(17452);function N(t){const e=(0,z.Yd)(t.url);return n=>{var r;const o=(0,z.PF)(n,e,e),i=o?o.replace(/^ *\.\//,""):null;return null!=(r=t.files.get(i))?r:n}}async function U(t,e){return t instanceof Blob?W.fromBlob(t):"string"==typeof t?new W(t):Array.isArray(t)?async function(t,e){const n=new Map;let r=null;const o=await(0,g.WW)(t.map((async t=>({name:t.name,source:await U(t instanceof Blob?t:t.source,e)})))),i=[];for(const t of o)t&&((0,g.Hc)(e)?t.source.dispose():i.push(t));(0,g.k_)(e);for(const{name:t,source:e}of i)((0,s.Wi)(r)||/\.(gltf|glb)/i.test(t))&&(r=e.url),n.set(t,e.url),e.files&&e.files.forEach(((t,e)=>n.set(e,t)));if((0,s.Wi)(r))throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new W(r,(()=>i.forEach((({source:t})=>t.dispose()))),n)}(t,e):async function(t,e){const{default:r}=await(0,g.Hl)(Promise.resolve().then(n.bind(n,3172)),e),o="string"==typeof t.multipart[0]?await Promise.all(t.multipart.map((async t=>(await r(t,{responseType:"array-buffer"})).data))):t.multipart;return W.fromBlob(new Blob(o))}(t,e)}class W{constructor(t,e=(()=>{}),n=new Map){this.url=t,this.dispose=e,this.files=n}static fromBlob(t){const e=URL.createObjectURL(t);return new W(e,(()=>URL.revokeObjectURL(e)))}}var k=n(21787),$=n(46521),H=n(13598),B=n(17896),G=n(24678),q=n(56493);const Y=h.Z.getLogger("esri.geometry.support.meshUtils.offset");function X(t,e){if(t)for(let n=0;n<t.length;n+=3)for(let r=0;r<3;r++)t[n+r]+=e[r]}const K=(0,y.c)(),V=(0,H.c)(),J=(0,$.c)(),Q={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function tt(t,e,n){(function(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5})(t),function(t,e){if(null==e)return;const n="number"==typeof e?[e,e,e]:[null!=e.width?e.width:1,null!=e.depth?e.depth:1,null!=e.height?e.height:1];ot[0]=n[0],ot[4]=n[1],ot[8]=n[2];for(let e=0;e<t.position.length;e+=3){for(let n=0;n<3;n++)rt[n]=t.position[e+n];(0,B.t)(rt,rt,ot);for(let n=0;n<3;n++)t.position[e+n]=rt[n]}if(n[0]!==n[1]||n[1]!==n[2]){ot[0]=1/n[0],ot[4]=1/n[1],ot[8]=1/n[2];for(let e=0;e<t.normal.length;e+=3){for(let n=0;n<3;n++)rt[n]=t.normal[e+n];(0,B.t)(rt,rt,ot),(0,B.n)(rt,rt);for(let n=0;n<3;n++)t.normal[e+n]=rt[n]}}}(t,n&&n.size);const{vertexAttributes:r,transform:o}=(0,O.w1)(t,e,n);return{vertexAttributes:new Z.ZP({...r,uv:t.uv}),transform:o,components:[new A.Z({faces:t.faces,material:n&&n.material||null})],spatialReference:e.spatialReference}}const et={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},nt={south:0,east:1,north:2,west:3,up:4,down:5},rt=(0,y.c)(),ot=(0,$.c)();var it=n(52138);const st=h.Z.getLogger("esri.geometry.support.meshUtils.rotate");function at(t,e,n,r=y.Z){if(!(0,s.Wi)(t)){(0,it.d)(pt,(0,C.WH)(e),(0,C.ZZ)(e));for(let e=0;e<t.length;e+=n){for(let n=0;n<3;n++)lt[n]=t[e+n]-r[n];(0,B.m)(lt,lt,pt);for(let n=0;n<3;n++)t[e+n]=lt[n]+r[n]}}}const lt=(0,y.c)(),ct=(0,y.c)(),ut=(0,C.Ue)(),pt=(0,H.c)(),ht=(0,$.c)(),ft=(0,y.c)(),gt=h.Z.getLogger("esri.geometry.support.meshUtils.scale");function dt(t,e,n=y.Z){if(t)for(let r=0;r<t.length;r+=3){for(let e=0;e<3;e++)xt[e]=t[r+e]-n[e];(0,B.a)(xt,xt,e);for(let e=0;e<3;e++)t[r+e]=xt[e]+n[e]}}const xt=(0,y.c)(),mt=(0,y.c)(),yt=(0,y.c)();var vt;const wt=h.Z.getLogger("esri.geometry.Mesh");let bt=vt=class extends((0,u.p)(p.Z.LoadableMixin((0,f.v)(v.Z)))){constructor(t){super(t),this.components=null,this.transform=null,this.external=null,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new Z.QL,this.type="mesh"}initialize(){((0,s.Wi)(this.external)||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add((0,d.YP)((()=>{var t;return{vertexAttributes:this.vertexAttributes,components:null==(t=this.components)?void 0:t.map((t=>t.clone())),transform:(0,s.pC)(this.transform)?this.transform.clone():null}}),(()=>this._set("external",null)),{once:!0,sync:!0}))}))}get hasExtent(){return!this.loaded&&(0,s.pC)(this.external)&&(0,s.pC)(this.external.extent)||this.loaded&&this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0)}get boundingInfo(){const t=this.vertexAttributes.position,e=this.spatialReference;if(0===t.length||this.components&&0===this.components.length)return{extent:new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:e}),center:new w.Z({x:0,y:0,z:0,spatialReference:e})};const n=(0,s.pC)(this.transform)?this.transform.project(t,e):t;let r=1/0,o=1/0,i=1/0,l=-1/0,c=-1/0,u=-1/0,p=0,h=0,f=0;const g=n.length,d=1/(g/3);let x=0;for(;x<g;){const t=n[x++],e=n[x++],s=n[x++];r=Math.min(r,t),o=Math.min(o,e),i=Math.min(i,s),l=Math.max(l,t),c=Math.max(c,e),u=Math.max(u,s),p+=d*t,h+=d*e,f+=d*s}return{extent:new a.Z({xmin:r,ymin:o,zmin:i,xmax:l,ymax:c,zmax:u,spatialReference:e}),center:new w.Z({x:p,y:h,z:f,spatialReference:e})}}get anchor(){if((0,s.pC)(this.transform))return this.transform.getOriginPoint(this.spatialReference);const t=this.boundingInfo;return new w.Z({x:t.center.x,y:t.center.y,z:t.extent.zmin,spatialReference:this.spatialReference})}get origin(){return(0,s.pC)(this.transform)?this.transform.getOriginPoint(this.spatialReference):this.boundingInfo.center}get extent(){return!this.loaded&&(0,s.pC)(this.external)&&(0,s.pC)(this.external.extent)?this.external.extent.clone():this.boundingInfo.extent}addComponent(t){this.loaded?(this.components||(this.components=[]),this.components.push(A.Z.from(t)),this.notifyChange("components")):wt.error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(t){if(this.loaded){if(this.components){const e=this.components.indexOf(t);if(-1!==e)return this.components.splice(e,1),void this.notifyChange("components")}wt.error("removeComponent()","Provided component is not part of the list of components")}else wt.error("removeComponent()","Mesh must be loaded before applying operations")}rotate(t,e,n,r){return(0,C.uT)(Ct.x,t,At),(0,C.uT)(Ct.y,e,Mt),(0,C.uT)(Ct.z,n,Zt),(0,C.qC)(At,Mt,At),(0,C.qC)(At,Zt,At),function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position||0===e[3])return;const r=t.spatialReference;if((0,s.pC)(t.transform)){var o;null!=(null==n?void 0:n.geographic)&&n.geographic!==t.transform.geographic&&st.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${t.transform.geographic}) is not supported`);const i=null!=(o=null==n?void 0:n.origin)?o:t.transform.getOriginPoint(r);!function(t,e,n){const r=(0,B.s)(lt,n.x,n.y,n.z),o=(0,B.f)(lt,r,t.origin);t.applyLocalInverse(o,ct),t.rotation=(0,C.qC)(t.rotation,e,(0,C.Ue)()),t.applyLocalInverse(o,o),(0,B.f)(o,o,ct),t.translation=(0,B.b)((0,y.c)(),t.translation,o)}(t.transform,e,i)}else{var i;const r=null!=(i=null==n?void 0:n.origin)?i:t.origin;(0,E.h)(t.spatialReference,n)?function(t,e,n){const r=t.spatialReference,o=(0,G.rS)(r),i=ft;(0,L.KC)(n,i,o)||(0,L.KC)(t.origin,i,o);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,u=new Float64Array(a.length),p=(0,s.pC)(l)?new Float32Array(l.length):null,h=(0,s.pC)(c)?new Float32Array(c.length):null;(0,L.Bm)(o,i,pt,o),(0,k.f)(ht,pt);const f=ut;(0,B.t)((0,C.ZZ)(ut),(0,C.ZZ)(e),ht),f[3]=e[3],(0,q.XO)(a,r,u),(0,s.pC)(l)&&(0,q.Iz)(l,a,u,r,p),(0,s.pC)(c)&&(0,q.wi)(c,a,u,r,h),at(u,f,3,i),(0,q.To)(u,a,r),(0,s.pC)(l)&&(at(p,f,3),(0,q.Yk)(p,a,u,r,l)),(0,s.pC)(c)&&(at(h,f,4),(0,q.M2)(h,a,u,r,c)),t.vertexAttributesChanged()}(t,e,r):function(t,e,n){const r=ft;if(!(0,L.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,st.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}at(t.vertexAttributes.position,e,3,r),at(t.vertexAttributes.normal,e,3),at(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}(t,e,r)}}(this,At,r),this}offset(t,e,n,r){return this.loaded?(_t[0]=t,_t[1]=e,_t[2]=n,function(t,e,n){t.vertexAttributes&&t.vertexAttributes.position&&((0,s.pC)(t.transform)?(null!=(null==n?void 0:n.geographic)&&n.geographic!==t.transform.geographic&&Y.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${t.transform.geographic}) is not supported`),function(t,e){const n=t.origin;t.origin=(0,B.b)((0,y.c)(),n,e)}(t.transform,e)):(0,E.h)(t.spatialReference,n)?function(t,e){const n=t.spatialReference,r=t.vertexAttributes.position,o=t.vertexAttributes.normal,i=t.vertexAttributes.tangent,a=new Float64Array(r.length),l=(0,s.pC)(o)?new Float32Array(o.length):null,c=(0,s.pC)(i)?new Float32Array(i.length):null,u=t.extent.center,p=K;(0,L.Bm)(n,[u.x,u.y,u.z],V,(0,G.rS)(n)),(0,k.f)(J,V),(0,B.t)(p,e,J),(0,q.XO)(r,n,a),(0,s.pC)(o)&&(0,q.Iz)(o,r,a,n,l),(0,s.pC)(i)&&(0,q.wi)(i,r,a,n,c),X(a,p),(0,q.To)(a,r,n),(0,s.pC)(o)&&(0,q.Yk)(l,r,a,n,o),(0,s.pC)(i)&&(0,q.M2)(c,r,a,n,i),t.vertexAttributesChanged()}(t,e):function(t,e){X(t.vertexAttributes.position,e),t.vertexAttributesChanged()}(t,e))}(this,_t,r),this):(wt.error("offset()","Mesh must be loaded before applying operations"),this)}scale(t,e){return this.loaded?(function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position)return;const r=t.spatialReference;if((0,s.pC)(t.transform)){var o;null!=(null==n?void 0:n.geographic)&&n.geographic!==t.transform.geographic&&gt.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${t.transform.geographic}) is not supported`);const i=null!=(o=null==n?void 0:n.origin)?o:t.transform.getOriginPoint(r);!function(t,e,n){const r=(0,B.s)(xt,n.x,n.y,n.z),o=(0,B.f)(xt,r,t.origin);t.applyLocalInverse(o,mt);const i=(0,B.a)((0,y.c)(),t.scale,e);t.scale=i,t.applyLocalInverse(o,o),(0,B.f)(o,o,mt),t.translation=(0,B.b)((0,y.c)(),t.translation,o)}(t.transform,e,i)}else{const r=(0,E.h)(t.spatialReference,n),o=n&&n.origin||t.origin;r?function(t,e,n){const r=t.spatialReference,o=(0,G.rS)(r),i=yt;(0,L.KC)(n,i,o)||(0,L.KC)(t.origin,i,o);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,u=new Float64Array(a.length),p=(0,s.pC)(l)?new Float32Array(l.length):null,h=(0,s.pC)(c)?new Float32Array(c.length):null;(0,q.XO)(a,r,u),(0,s.pC)(l)&&(0,q.Iz)(l,a,u,r,p),(0,s.pC)(c)&&(0,q.wi)(c,a,u,r,h),dt(u,e,i),(0,q.To)(u,a,r),(0,s.pC)(l)&&(0,q.Yk)(p,a,u,r,l),(0,s.pC)(c)&&(0,q.M2)(h,a,u,r,c),t.vertexAttributesChanged()}(t,e,o):function(t,e,n){const r=yt;if(!(0,L.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,gt.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}dt(t.vertexAttributes.position,e,r),t.vertexAttributesChanged()}(t,e,o)}}(this,t,e),this):(wt.error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(t,e){return this.loaded?(function(t,e,n){var r;if(!t.vertexAttributes||!t.vertexAttributes.position)return;const o=null!=(r=null==n?void 0:n.origin)?r:t.origin;(0,s.pC)(t.transform)?(null!=(null==n?void 0:n.geographic)&&n.geographic!==t.transform.geographic&&P.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${t.transform.geographic}) is not supported`),function(t,e,n){const r=e.x-n.x,o=e.y-n.y,i=e.hasZ&&n.hasZ?e.z-n.z:0,s=t.origin;t.origin=[s[0]+r,s[1]+o,s[2]+i]}(t.transform,e,o)):(0,E.h)(t.spatialReference,n)?function(t,e,n){const r=(0,O.FF)(t.vertexAttributes,n,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,O.iv)(r,e,{geographic:!0});t.vertexAttributes.position=o,t.vertexAttributes.normal=i,t.vertexAttributes.tangent=s,t.vertexAttributesChanged()}(t,e,o):function(t,e,n){const r=j,o=S;if((0,L.KC)(e,o,t.spatialReference)){if(!(0,L.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,P.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}(function(t,e,n){if(t)for(let r=0;r<t.length;r+=3)for(let o=0;o<3;o++)t[r+o]+=e[o]-n[o]})(t.vertexAttributes.position,o,r),t.vertexAttributesChanged()}else P.error(`Failed to project centerAt location (wkid:${e.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid})`)}(t,e,o)}(this,t,e),this):(wt.error("centerAt()","Mesh must be loaded before applying operations"),this)}load(t){return(0,s.pC)(this.external)&&this.addResolvingPromise(async function(t,e,r){const{loadGLTFMesh:o}=await(0,g.Hl)(Promise.all([n.e(2133),n.e(9070)]).then(n.bind(n,99070)),r),i=await U(e,r),a=o(new w.Z({x:0,y:0,z:0,spatialReference:t.spatialReference}),i.url,{resolveFile:N(i),useTransform:!0,signal:(0,s.pC)(r)?r.signal:null});a.then((()=>i.dispose()),(()=>i.dispose()));const{vertexAttributes:l,components:c}=await a;t.vertexAttributes=l,t.components=c}(this,this.external.source,t)),Promise.resolve(this)}clone(){const t=this.components?new Map:null,e=this.components?new Map:null,n={components:this.components?this.components.map((n=>n.cloneWithDeduplication(t,e))):null,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),transform:(0,s.pC)(this.transform)?this.transform.clone():null,external:(0,s.pC)(this.external)?{source:this.external.source,extent:(0,s.pC)(this.external.extent)?this.external.extent.clone():null}:null};return new vt(n)}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(t){const{toBinaryGLTF:e}=await n.e(7277).then(n.bind(n,7277));return e(this,t)}static createBox(t,e){if(!(t instanceof w.Z))return wt.error(".createBox()","expected location to be a Point instance"),null;const n=new vt(tt(function(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:n}=et,r=4*t.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*t.length*3);let l=0,c=0,u=0,p=0;for(let r=0;r<t.length;r++){const h=t[r],f=l/3;for(const t of e)a[p++]=f+t;const g=h.corners;for(let t=0;t<4;t++){const e=g[t];let r=0;s[u++]=.25*n[t][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*n[t][1];for(let t=0;t<3;t++)0!==h.axis[t]?(o[l++]=.5*h.axis[t],i[c++]=h.axis[t]):(o[l++]=.5*e[r++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),t,e));return e&&e.imageFace&&"all"!==e.imageFace?function(t,e){const n=t.components[0],r=n.faces,o=nt[e],i=6*o,a=new Uint32Array(6),l=new Uint32Array(r.length-6);let c=0,u=0;for(let t=0;t<r.length;t++)t>=i&&t<i+6?a[c++]=r[t]:l[u++]=r[t];if((0,s.pC)(t.vertexAttributes.uv)){const e=new Float32Array(t.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let t=0;t<r.length;t++)e[n+t]=r[t];t.vertexAttributes.uv=e}return t.components=[new A.Z({faces:a,material:n.material}),new A.Z({faces:l})],t}(n,e.imageFace):n}static createSphere(t,e){return t instanceof w.Z?new vt(tt(function(t=0){const e=Math.round(8*2**t),n=2*e,r=(e-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((e-1)*n*2*3);let l=0,c=0,u=0,p=0;for(let t=0;t<=e;t++){const r=t/e*Math.PI+.5*Math.PI,h=Math.cos(r),f=Math.sin(r);rt[2]=f;const g=0===t||t===e,d=g?n-1:n;for(let r=0;r<=d;r++){const f=r/d*2*Math.PI;rt[0]=-Math.sin(f)*h,rt[1]=Math.cos(f)*h;for(let t=0;t<3;t++)o[l]=.5*rt[t],i[l]=rt[t],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=t/e,0!==t&&r!==n&&(t!==e&&(a[u++]=p,a[u++]=p+1,a[u++]=p-n),1!==t&&(a[u++]=p,a[u++]=p-n,a[u++]=p-n-1)),p++}}return{position:o,normal:i,uv:s,faces:a}}(e&&e.densificationFactor||0),t,e)):(wt.error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(t,e){return t instanceof w.Z?new vt(tt(function(t=0){const e=Math.round(16*2**t),n=4*(e+1)+2*e,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*e*3);let a=0,l=0,c=0,u=0,p=0;for(let t=0;t<=5;t++){const n=0===t||5===t,h=t<=1||t>=4,f=2===t||4===t,g=n?e-1:e;for(let d=0;d<=g;d++){const x=d/g*2*Math.PI,m=n?0:.5;rt[0]=m*Math.sin(x),rt[1]=m*-Math.cos(x),rt[2]=t<=2?.5:-.5;for(let e=0;e<3;e++)r[a++]=rt[e],o[l++]=h?2===e?t<=1?1:-1:0:2===e?0:rt[e]/m;i[c++]=(d+(n?.5:0))/e,i[c++]=t<=1?1*t/3:t<=3?1*(t-2)/3+1/3:1*(t-4)/3+2/3,f||0===t||d===e||(5!==t&&(s[u++]=p,s[u++]=p+1,s[u++]=p-e),1!==t&&(s[u++]=p,s[u++]=p-e,s[u++]=p-e-1)),p++}}return{position:r,normal:o,uv:i,faces:s}}(e&&e.densificationFactor||0),t,e)):(wt.error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(t,e){var n;if(!(t instanceof w.Z))return wt.error(".createPlane()","expected location to be a Point instance"),null;const r=null!=(n=null==e?void 0:e.facing)?n:"up",o=function(t,e){const n="number"==typeof e?e:null!=e?e.width:1,r="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(r,null==e?void 0:e.size);return new vt(tt(function(t){const e=Q.facingAxisOrderSwap[t],n=Q.position,r=Q.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let t=0;t<4;t++){const t=s;for(let a=0;a<3;a++){const l=e[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=n[t+c]*u,i[s]=r[t+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(Q.uv),faces:new Uint32Array(Q.faces)}}(r),t,{...e,size:o}))}static createFromPolygon(t,e){if(!(t instanceof b.Z))return wt.error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(t){const e=R(t.rings,t.hasZ,r.CCW_IS_HOLE),n=[];let o=0,i=0;for(const t of e.polygons){const r=t.count,s=t.index,a=new Float64Array(e.position.buffer,3*s*e.position.BYTES_PER_ELEMENT,3*r),l=t.holeIndices.map((t=>t-s)),c=new Uint32Array((0,_.e)(a,l,3));n.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(t,e,n){if(1===t.length)return t[0];const r=new Float64Array(e),o=new Uint32Array(n);let i=0,s=0,a=0;for(const e of t){for(let t=0;t<e.position.length;t++)r[i++]=e.position[t];for(let t=0;t<e.faces.length;t++)o[s++]=e.faces[t]+a;a=i/3}return{position:r,faces:o}}(n,o,i),a=(0,F.d)(s.position.buffer,6,{originalIndices:s.faces});return s.position=new Float64Array(a.buffer),s.faces=a.indices,s}(t);return new vt({vertexAttributes:new Z.QL({position:n.position}),components:[new A.Z({faces:n.faces,shading:"flat",material:e&&e.material||null})],spatialReference:t.spatialReference})}static async createFromGLTF(t,e,r){if(!(t instanceof w.Z))throw wt.error(".createfromGLTF()","expected location to be a Point instance"),new c.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,g.Hl)(Promise.all([n.e(2133),n.e(9070)]).then(n.bind(n,99070)),r);return new vt(await o(t,e,r))}static createWithExternalSource(t,e,n){var r,o,i;const s=null!=(r=null==n?void 0:n.extent)?r:null,a=null!=(o=null==n?void 0:n.transform.clone())?o:new M.Z;a.origin=[t.x,t.y,null!=(i=t.z)?i:0];const l=t.spatialReference;return new vt({external:{source:e,extent:s},transform:a,spatialReference:l})}static createIncomplete(t,e){var n,r;const o=null!=(n=null==e?void 0:e.transform.clone())?n:new M.Z;o.origin=[t.x,t.y,null!=(r=t.z)?r:0];const i=t.spatialReference,s=new vt({transform:o,spatialReference:i});return s.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),s}};(0,l._)([(0,x.Cb)({type:[A.Z],json:{write:!0}})],bt.prototype,"components",void 0),(0,l._)([(0,x.Cb)({type:M.Z,json:{write:!0}})],bt.prototype,"transform",void 0),(0,l._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"external",void 0),(0,l._)([(0,x.Cb)({readOnly:!0})],bt.prototype,"hasExtent",null),(0,l._)([(0,x.Cb)({readOnly:!0})],bt.prototype,"boundingInfo",null),(0,l._)([(0,x.Cb)({readOnly:!0})],bt.prototype,"anchor",null),(0,l._)([(0,x.Cb)({readOnly:!0})],bt.prototype,"origin",null),(0,l._)([(0,x.Cb)({readOnly:!0,json:{read:!1}})],bt.prototype,"extent",null),(0,l._)([(0,x.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],bt.prototype,"hasZ",void 0),(0,l._)([(0,x.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],bt.prototype,"hasM",void 0),(0,l._)([(0,x.Cb)({type:Z.QL,nonNullable:!0,json:{write:!0}})],bt.prototype,"vertexAttributes",void 0),bt=vt=(0,l._)([(0,m.j)("esri.geometry.Mesh")],bt);const Ct={x:(0,y.f)(1,0,0),y:(0,y.f)(0,1,0),z:(0,y.f)(0,0,1)},At=(0,C.Ue)(),Mt=(0,C.Ue)(),Zt=(0,C.Ue)(),_t=(0,y.c)(),Tt=bt;var Ft,Rt;!function(t){t.featureGUID="featureGUID",t.assetName="assetName",t.hash="hash",t.type="type",t.conversionStatus="conversionStatus",t.flags="flags",t.complexity="complexity",t.size="size",t.seqNo="seqNo",t.sourceHash="sourceHash",t.assetURL="assetURL"}(Ft||(Ft={})),function(t){t.SUBMITTED="SUBMITTED",t.INPROGRESS="INPROGRESS",t.FAILED="FAILED",t.COMPLETED="COMPLETED"}(Rt||(Rt={}));var Dt,It,Lt=n(74889);function Et(t,e,n){const r=n.features;n.features=[],delete n.geometryType;const o=Lt.default.fromJSON(n);o.geometryType="mesh";const a=o.spatialReference,l=(0,s.Wi)(t.outFields)||!t.outFields.length?()=>({}):(c=t.outFields.includes("*")?null:new Set(t.outFields),({attributes:t})=>{if(!t)return{};if(!c)return t;for(const e in t)c.has(e)||delete t[e];return t});var c;for(const t of r){const n=Ot(t,a,e);(0,s.pC)(n)&&o.features.push(new i.Z({geometry:n,attributes:l(t)}))}return o}function Ot(t,e,n){const{status:r,source:o}=function(t){if(!t.assetMappings)return{status:Dt.FAILED};const e=[],n=new Map;for(const r of t.assetMappings){const t=r[Ft.seqNo],o=r[Ft.assetName],i=r[Ft.assetURL],s=r[Ft.conversionStatus];if(s===Rt.FAILED)return{status:Dt.FAILED};if(s!==Rt.COMPLETED)return{status:Dt.PENDING};if(null==t)e.push({name:o,source:i});else{const r=n.get(o);let s;r?s=r.multipart:(s=[],e.push({name:o,source:{multipart:s}}),n.set(o,{multipart:s})),s[t]=i}}return{status:Dt.COMPLETED,source:e}}(t);if(r===Dt.FAILED)return null;const i=function({attributes:t},e,{transformFieldRoles:n}){return new w.Z({x:t[n.originX],y:t[n.originY],z:t[n.originZ],spatialReference:e})}(t,e,n),s=a.Z.fromJSON(t.geometry);s.spatialReference=e;const l=function({attributes:t,assetMappings:e},{transformFieldRoles:n}){var r;return new M.Z({translation:[t[n.translationX],t[n.translationY],t[n.translationZ]],rotation:(0,C.uT)([t[n.rotationX],t[n.rotationY],t[n.rotationZ]],t[n.rotationDeg]),scale:[t[n.scaleX],t[n.scaleY],t[n.scaleZ]],geographic:!(null!=(r=e[Ft.flags])&&r.includes("PROJECT_VERTICES"))})}(t,n);return r===Dt.PENDING?Tt.createIncomplete(i,{extent:s,transform:l}):Tt.createWithExternalSource(i,o,{extent:s,transform:l})}(It=Dt||(Dt={}))[It.FAILED=0]="FAILED",It[It.PENDING=1]="PENDING",It[It.COMPLETED=2]="COMPLETED"}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8163],{95401:(t,e,n)=>{n.d(e,{e:()=>a});var r,o,i,s={exports:{}};r=s,o=function(){function t(t,n,o){o=o||2;var i,s,a,c,u,p,h,f=n&&n.length,g=f?n[0]*o:t.length,d=e(t,0,g,o,!0),x=[];if(!d||d.next===d.prev)return x;if(f&&(d=l(t,n,d,o)),t.length>80*o){i=a=t[0],s=c=t[1];for(var m=o;m<g;m+=o)(u=t[m])<i&&(i=u),(p=t[m+1])<s&&(s=p),u>a&&(a=u),p>c&&(c=p);h=0!==(h=Math.max(a-i,c-s))?1/h:0}return r(d,x,o,i,s,h),x}function e(t,e,n,r,o){var i,s;if(o===F(t,e,n,r)>0)for(i=e;i<n;i+=r)s=Z(i,t[i],t[i+1],s);else for(i=n-r;i>=e;i-=r)s=Z(i,t[i],t[i+1],s);if(s&&v(s,s.next)){var a=s.next;_(s),s=a}return s}function n(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(_(r),(r=e=o)===r.next)break;n=!0}}while(n||r!==e);return e}function r(t,e,l,c,u,p,h){if(t){!h&&p&&f(t,c,u,p);for(var g,d,x=t;t.prev!==t.next;)if(g=t.prev,d=t.next,p?i(t,c,u,p):o(t))e.push(g.i/l),e.push(t.i/l),e.push(d.i/l),_(t),t=d.next,x=d.next;else if((t=d)===x){h?1===h?r(t=s(n(t),e,l),e,l,c,u,p,2):2===h&&a(t,e,l,c,u,p):r(n(t),e,l,c,u,p,1);break}}}function o(t){var e=t.prev,n=t,r=t.next;if(y(e,n,r)>=0)return!1;for(var o=t.next.next;o!==t.prev;){if(x(e.x,e.y,n.x,n.y,r.x,r.y,o.x,o.y)&&y(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(t,e,n,r){var o=t.prev,i=t,s=t.next;if(y(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,p=g(a,l,e,n,r),h=g(c,u,e,n,r),f=t.prevZ,d=t.nextZ;f&&f.z>=p&&d&&d.z<=h;){if(f!==t.prev&&f!==t.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==t.prev&&d!==t.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=p;){if(f!==t.prev&&f!==t.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&x(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function s(t,e,r){var o=t;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&A(i,s)&&A(s,i)&&(e.push(i.i/r),e.push(o.i/r),e.push(s.i/r),_(o),_(o.next),o=t=s),o=o.next}while(o!==t);return n(o)}function a(t,e,o,i,s,a){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=M(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,e,o,i,s,a),void r(u,e,o,i,s,a)}c=c.next}l=l.next}while(l!==t)}function l(t,r,o,i){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=e(t,r[s]*i,s<a-1?r[s+1]*i:t.length,i,!1))===l.next&&(l.steiner=!0),u.push(d(l));for(u.sort(c),s=0;s<u.length;s++)o=n(o=p(u[s],o),o.next);return o}function c(t,e){return t.x-e.x}function u(t){if(t.next.prev===t)return t;let e=t;for(;;){const n=e.next;if(n.prev===e||n===e||n===t)break;e=n}return e}function p(t,e){var r=function(t,e){var n,r=e,o=t.x,i=t.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(o===s)return n;var l,c=n,u=n.x,p=n.y,f=1/0;r=n;do{o>=r.x&&r.x>=u&&o!==r.x&&x(i<p?o:s,i,u,p,i<p?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),A(r,t)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=l)),r=r.next}while(r!==c);return n}(t,e);if(!r)return e;var o=M(r,t),i=n(r,r.next);let s=u(o);return n(s,s.next),i=u(i),u(e===r?i:e)}function h(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function f(t,e,n,r){var o=t;do{null===o.z&&(o.z=g(o.x,o.y,e,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,function(t){var e,n,r,o,i,s,a,l,c=1;do{for(n=t,t=null,i=null,s=0;n;){for(s++,r=n,a=0,e=0;e<c&&(a++,r=r.nextZ);e++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:t=o,o.prevZ=i,i=o;n=r}i.nextZ=null,c*=2}while(s>1)}(o)}function g(t,e,n,r,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function x(t,e,n,r,o,i,s,a){return(o-s)*(e-a)-(t-s)*(i-a)>=0&&(t-s)*(r-a)-(n-s)*(e-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&w(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(A(t,e)&&A(e,t)&&function(t,e){var n=t,r=!1,o=(t.x+e.x)/2,i=(t.y+e.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||v(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,n,r){var o=C(y(t,e,n)),i=C(y(t,e,r)),s=C(y(n,r,t)),a=C(y(n,r,e));return o!==i&&s!==a||!(0!==o||!b(t,n,e))||!(0!==i||!b(t,r,e))||!(0!==s||!b(n,t,r))||!(0!==a||!b(n,e,r))}function b(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function C(t){return t>0?1:t<0?-1:0}function A(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function M(t,e){var n=new T(t.i,t.x,t.y),r=new T(e.i,e.x,e.y),o=t.next,i=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function Z(t,e,n,r){var o=new T(t,e,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function _(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function F(t,e,n,r){for(var o=0,i=e,s=n-r;i<n;i+=r)o+=(t[s]-t[i])*(t[i+1]+t[s+1]),s=i;return o}return t.deviation=function(t,e,n,r){var o=e&&e.length,i=o?e[0]*n:t.length,s=Math.abs(F(t,0,i,n));if(o)for(var a=0,l=e.length;a<l;a++){var c=e[a]*n,u=a<l-1?e[a+1]*n:t.length;s-=Math.abs(F(t,c,u,n))}var p=0;for(a=0;a<r.length;a+=3){var h=r[a]*n,f=r[a+1]*n,g=r[a+2]*n;p+=Math.abs((t[h]-t[g])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[g+1]-t[h+1]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},t.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,o=0;o<t.length;o++){for(var i=0;i<t[o].length;i++)for(var s=0;s<e;s++)n.vertices.push(t[o][i][s]);o>0&&(r+=t[o-1].length,n.holes.push(r))}return n},t},void 0!==(i=o())&&(r.exports=i);const a=s.exports},62540:(t,e,n)=>{n.d(e,{Z:()=>m});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),p=n(75215),h=n(65542),f=n(60746),g=n(71630);const d=a.Z.getLogger("esri.geometry.support.MeshComponent");let x=r=class extends i.wq{constructor(t){super(t),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}static from(t){return(0,p.TJ)(r,t)}castFaces(t){return(0,g.XQ)(t,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},d)}castMaterial(t){return(0,p.TJ)(t&&"object"==typeof t&&("metallic"in t||"roughness"in t||"metallicRoughnessTexture"in t)?f.Z:h.Z,t)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(t,e){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(t,e):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}};(0,o._)([(0,l.Cb)({json:{write:!0}})],x.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],x.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],x.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],x.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],x.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],x.prototype,"trustSourceNormals",void 0),x=r=(0,o._)([(0,u.j)("esri.geometry.support.MeshComponent")],x);const m=x},65542:(t,e,n)=>{n.d(e,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(96674),a=n(70586),l=n(5600),c=(n(67676),n(80442),n(75215),n(52011)),u=n(81118);let p=r=class extends s.wq{constructor(t){super(t),this.color=null,this.colorTexture=null,this.normalTexture=null,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(t,e){const n=(0,a.pC)(t)?t.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(e));return(0,a.pC)(t)&&t.set(this,o),o}clonePropertiesWithDeduplication(t){return{color:(0,a.pC)(this.color)?this.color.clone():null,colorTexture:(0,a.pC)(this.colorTexture)?this.colorTexture.cloneWithDeduplication(t):null,normalTexture:(0,a.pC)(this.normalTexture)?this.normalTexture.cloneWithDeduplication(t):null,alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided}}};(0,o._)([(0,l.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,l.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,l.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=r=(0,o._)([(0,c.j)("esri.geometry.support.MeshMaterial")],p);const h=p},60746:(t,e,n)=>{n.d(e,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(70586),a=n(5600),l=(n(67676),n(80442),n(75215),n(52011)),c=n(65542),u=n(81118);let p=r=class extends c.Z{constructor(t){super(t),this.emissiveColor=null,this.emissiveTexture=null,this.occlusionTexture=null,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(t,e){const n=(0,s.pC)(t)?t.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(e));return(0,s.pC)(t)&&t.set(this,o),o}clonePropertiesWithDeduplication(t){return{...super.clonePropertiesWithDeduplication(t),emissiveColor:(0,s.pC)(this.emissiveColor)?this.emissiveColor.clone():null,emissiveTexture:(0,s.pC)(this.emissiveTexture)?this.emissiveTexture.cloneWithDeduplication(t):null,occlusionTexture:(0,s.pC)(this.occlusionTexture)?this.occlusionTexture.cloneWithDeduplication(t):null,metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:(0,s.pC)(this.metallicRoughnessTexture)?this.metallicRoughnessTexture.cloneWithDeduplication(t):null}}};(0,o._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),p=r=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const h=p},81118:(t,e,n)=>{n.d(e,{Z:()=>m});var r=n(43697),o=(n(80442),n(96674)),i=n(5600),s=(n(67676),n(75215)),a=n(71715),l=n(52011),c=n(30556),u=n(25929);n(22021);let p=null,h=!0;var f;const g=new WeakMap;let d=0,x=f=class extends o.wq{constructor(t){super(t),this.wrap="repeat"}get url(){return this._get("url")||null}set url(t){this._set("url",t),t&&this._set("data",null)}get data(){return this._get("data")||null}set data(t){this._set("data",t),t&&this._set("url",null)}writeData(t,e,n,r){if(t instanceof HTMLImageElement){const o={type:"image-element",src:(0,u.t)(t.src,r),crossOrigin:t.crossOrigin};e[n]=o}else if(t instanceof HTMLCanvasElement){const r=t.getContext("2d").getImageData(0,0,t.width,t.height),o={type:"canvas-element",imageData:this._encodeImageData(r)};e[n]=o}else if(t instanceof HTMLVideoElement){const o={type:"video-element",src:(0,u.t)(t.src,r),autoplay:t.autoplay,loop:t.loop,muted:t.muted,crossOrigin:t.crossOrigin,preload:t.preload};e[n]=o}else{const r={type:"image-data",imageData:this._encodeImageData(t)};e[n]=r}}readData(t){switch(t.type){case"image-element":{const e=new Image;return e.src=t.src,e.crossOrigin=t.crossOrigin,e}case"canvas-element":{const e=this._decodeImageData(t.imageData),n=document.createElement("canvas");return n.width=e.width,n.height=e.height,n.getContext("2d").putImageData(e,0,0),n}case"image-data":return this._decodeImageData(t.imageData);case"video-element":{const e=document.createElement("video");return e.src=t.src,e.crossOrigin=t.crossOrigin,e.autoplay=t.autoplay,e.loop=t.loop,e.muted=t.muted,e.preload=t.preload,e}default:return}}get transparent(){const t=this.data,e=this.url;if(t instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(t.getContext("2d").getImageData(0,0,t.width,t.height));if(t instanceof ImageData)return this._imageDataContainsTransparent(t);if(e){const t=e.substr(e.length-4,4).toLowerCase(),n=e.substr(0,15).toLocaleLowerCase();if(".png"===t||"data:image/png;"===n)return!0}return!1}set transparent(t){null!=t?this._override("transparent",t):this._clearOverride("transparent")}get contentHash(){const t="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",e=(e="")=>`d:${e},t:${this.transparent},w:${t}`;return null!=this.url?e(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?e(this.data.src):(g.has(this.data)||g.set(this.data,++d),e(g.get(this.data))):e()}clone(){const t={url:this.url,data:this.data,wrap:this._cloneWrap()};return new f(t)}cloneWithDeduplication(t){const e=t.get(this);if(e)return e;const n=this.clone();return t.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(t){let e="";for(let n=0;n<t.data.length;n++)e+=String.fromCharCode(t.data[n]);return{data:btoa(e),width:t.width,height:t.height}}_decodeImageData(t){const e=atob(t.data),n=new Uint8ClampedArray(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return function(t,e,n,r){if(!e||!n)throw new Error("Cannot construct image data without dimensions");if(h)try{return new ImageData(t,e,n)}catch(t){h=!1}const o=function(t,e,n){return n||(p||(p=document.createElement("canvas"),p.width=1,p.height=1),n=p),n.getContext("2d").createImageData(t,e)}(e,n,void 0);return o.data.set(t,0),o}(n,t.width,t.height)}_imageDataContainsTransparent(t){for(let e=3;e<t.data.length;e+=4)if(255!==t.data[e])return!0;return!1}static from(t){return"string"==typeof t?new f({url:t}):t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageData||t instanceof HTMLVideoElement?new f({data:t}):(0,s.TJ)(f,t)}};(0,r._)([(0,i.Cb)({type:String,json:{write:u.w}})],x.prototype,"url",null),(0,r._)([(0,i.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,i.Cb)()],x.prototype,"data",null),(0,r._)([(0,c.c)("data")],x.prototype,"writeData",null),(0,r._)([(0,a.r)("data")],x.prototype,"readData",null),(0,r._)([(0,i.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],x.prototype,"transparent",null),(0,r._)([(0,i.Cb)({json:{write:!0}})],x.prototype,"wrap",void 0),(0,r._)([(0,i.Cb)({readOnly:!0})],x.prototype,"contentHash",null),x=f=(0,r._)([(0,l.j)("esri.geometry.support.MeshTexture")],x);const m=x},71630:(t,e,n)=>{n.d(e,{QL:()=>h,XQ:()=>g,ZP:()=>x});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const p=a.Z.getLogger("esri.geometry.support.MeshVertexAttributes");let h=r=class extends i.wq{constructor(t){super(t),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(t){return g(t,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},p)}castPosition(t){return t&&t instanceof Float32Array&&p.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),g(t,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},p)}castUv(t){return g(t,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},p)}castNormal(t){return g(t,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},p)}castTangent(t){return g(t,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},p)}clone(){const t={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(t)}clonePositional(){const t={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(t)}};function f(t,e,n,r){const{loggerTag:o,stride:i}=e;return t.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):t}function g(t,e,n,r,o){if(!t)return t;if(t instanceof e)return f(t,r,e,o);for(const i of n)if(t instanceof i)return f(new e(t),r,e,o);if(Array.isArray(t))return f(new e(t),r,e,o);{const r=n.map((t=>`'${t.name}'`));return o.error(`Failed to set property, expected one of ${r}, but got ${t.constructor.name}`),new e([])}}function d(t,e,n){e[n]=function(t){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=t[n];return e}(t)}(0,o._)([(0,l.Cb)({json:{write:d}})],h.prototype,"color",void 0),(0,o._)([(0,c.p)("color")],h.prototype,"castColor",null),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:d}})],h.prototype,"position",void 0),(0,o._)([(0,c.p)("position")],h.prototype,"castPosition",null),(0,o._)([(0,l.Cb)({json:{write:d}})],h.prototype,"uv",void 0),(0,o._)([(0,c.p)("uv")],h.prototype,"castUv",null),(0,o._)([(0,l.Cb)({json:{write:d}})],h.prototype,"normal",void 0),(0,o._)([(0,c.p)("normal")],h.prototype,"castNormal",null),(0,o._)([(0,l.Cb)({json:{write:d}})],h.prototype,"tangent",void 0),(0,o._)([(0,c.p)("tangent")],h.prototype,"castTangent",null),h=r=(0,o._)([(0,u.j)("esri.geometry.support.MeshVertexAttributes")],h);const x=h},47545:(t,e,n)=>{n.d(e,{d:()=>o});var r=n(22021);function o(t,e,n){var o;const c=t.byteLength/(4*e),u=new Uint32Array(t,0,c*e);let p=new Uint32Array(c);const h=null!=(o=null==n?void 0:n.minReduction)?o:0,f=(null==n?void 0:n.originalIndices)||null,g=f?f.length:0,d=(null==n?void 0:n.componentOffsets)||null;let x=0;if(d)for(let t=0;t<d.length-1;t++){const e=d[t+1]-d[t];e>x&&(x=e)}else x=c;const m=Math.floor(1.1*x)+1;(null==l||l.length<2*m)&&(l=new Uint32Array((0,r.Sf)(2*m)));for(let t=0;t<2*m;t++)l[t]=0;let y=0;const v=!!d&&!!f,w=v?g:c,b=v?new Uint32Array(g):null,C=1.96;let A=0!==h?Math.ceil(4*C*C/(h*h)*h*(1-h)):w,M=1,Z=d?d[1]:w;for(let t=0;t<w;t++){if(t===A){const e=1-y/t;if(e+C*Math.sqrt(e*(1-e)/t)<h)return null;A*=2}if(t===Z){for(let t=0;t<2*m;t++)l[t]=0;if(f)for(let t=d[M-1];t<d[M];t++)b[t]=p[f[t]];Z=d[++M]}const n=v?f[t]:t,r=n*e,o=a(u,r,e);let s=o%m,c=y;for(;0!==l[2*s+1];){if(l[2*s]===o){const t=l[2*s+1]-1;if(i(u,r,t*e,e)){c=p[t];break}}s++,s>=m&&(s-=m)}c===y&&(l[2*s]=o,l[2*s+1]=n+1,y++),p[n]=c}if(0!==h&&1-y/c<h)return null;if(v){for(let t=d[M-1];t<b.length;t++)b[t]=p[f[t]];p=b}const _=new Uint32Array(e*y);y=0;for(let t=0;t<w;t++)p[t]===y&&(s(u,(v?f[t]:t)*e,_,y*e,e),y++);if(f&&!v){const t=new Uint32Array(g);for(let e=0;e<t.length;e++)t[e]=p[f[e]];p=t}return{buffer:_.buffer,indices:p,uniqueCount:y}}function i(t,e,n,r){for(let o=0;o<r;o++)if(t[e+o]!==t[n+o])return!1;return!0}function s(t,e,n,r,o){for(let i=0;i<o;i++)n[r+i]=t[e+i]}function a(t,e,n){let r=0;for(let o=0;o<n;o++)r=t[e+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let l=null},38163:(t,e,n)=>{n.r(e),n.d(e,{meshFeatureSetFromJSON:()=>Et});var r,o,i=n(1692),s=n(70586),a=n(6570),l=n(43697),c=n(20102),u=n(3920),p=n(83379),h=n(92604),f=n(609),g=n(95330),d=n(17445),x=n(5600),m=(n(67676),n(80442),n(75215),n(52011)),y=n(65617),v=n(9361),w=n(13473),b=n(17332),C=n(3709),A=n(62540),M=n(2674),Z=n(71630),_=n(95401),T=n(86662),F=n(47545);function R(t,e,n){const o=t.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,p=0;for(let e=0;e<o;++e)p+=t[e].length;const h=new Float64Array(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=t[p],d=n===r.CCW_IS_HOLE&&I(g);if(d&&1!==o)i[l++]=g;else{let t=g.length;for(let e=0;e<l;++e)t+=i[e].length;const n={index:f,pathLengths:new Array(l+1),count:t,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=d?D(g,g.length-1,-1,h,f,g.length,e):D(g,0,1,h,f,g.length,e);for(let t=0;t<l;++t){const r=i[t];n.holeIndices[t]=f,n.pathLengths[t+1]=r.length,r.length>0&&(a[u++]={index:f,count:r.length}),f=D(r,0,1,h,f,r.length,e)}l=0,n.count>0&&(s[c++]=n)}}for(let t=0;t<l;++t){const n=i[t];n.length>0&&(a[u++]={index:f,count:n.length}),f=D(n,0,1,h,f,n.length,e)}return c<o&&(s.length=c),u<o&&(a.length=u),{position:h,polygons:s,outlines:a}}function D(t,e,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=t[e];r[o++]=i[0],r[o++]=i[1],r[o++]=s?i[2]:0,e+=n}return o/3}function I(t){return!(0,T.bu)(t,!1,!1)}(o=r||(r={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var L=n(44547),E=n(13442),O=n(66459);const P=h.Z.getLogger("esri.geometry.support.meshUtils.centerAt");const S=(0,y.c)(),j=(0,y.c)();var z=n(17452);function N(t){const e=(0,z.Yd)(t.url);return n=>{var r;const o=(0,z.PF)(n,e,e),i=o?o.replace(/^ *\.\//,""):null;return null!=(r=t.files.get(i))?r:n}}async function U(t,e){return t instanceof Blob?W.fromBlob(t):"string"==typeof t?new W(t):Array.isArray(t)?async function(t,e){const n=new Map;let r=null;const o=await(0,g.WW)(t.map((async t=>({name:t.name,source:await U(t instanceof Blob?t:t.source,e)})))),i=[];for(const t of o)t&&((0,g.Hc)(e)?t.source.dispose():i.push(t));(0,g.k_)(e);for(const{name:t,source:e}of i)((0,s.Wi)(r)||/\.(gltf|glb)/i.test(t))&&(r=e.url),n.set(t,e.url),e.files&&e.files.forEach(((t,e)=>n.set(e,t)));if((0,s.Wi)(r))throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new W(r,(()=>i.forEach((({source:t})=>t.dispose()))),n)}(t,e):async function(t,e){const{default:r}=await(0,g.Hl)(Promise.resolve().then(n.bind(n,3172)),e),o="string"==typeof t.multipart[0]?await Promise.all(t.multipart.map((async t=>(await r(t,{responseType:"array-buffer"})).data))):t.multipart;return W.fromBlob(new Blob(o))}(t,e)}class W{constructor(t,e=(()=>{}),n=new Map){this.url=t,this.dispose=e,this.files=n}static fromBlob(t){const e=URL.createObjectURL(t);return new W(e,(()=>URL.revokeObjectURL(e)))}}var k=n(21787),$=n(46521),H=n(13598),B=n(17896),G=n(24678),q=n(56493);const Y=h.Z.getLogger("esri.geometry.support.meshUtils.offset");function X(t,e){if(t)for(let n=0;n<t.length;n+=3)for(let r=0;r<3;r++)t[n+r]+=e[r]}const K=(0,y.c)(),V=(0,H.c)(),J=(0,$.c)(),Q={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function tt(t,e,n){(function(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5})(t),function(t,e){if(null==e)return;const n="number"==typeof e?[e,e,e]:[null!=e.width?e.width:1,null!=e.depth?e.depth:1,null!=e.height?e.height:1];ot[0]=n[0],ot[4]=n[1],ot[8]=n[2];for(let e=0;e<t.position.length;e+=3){for(let n=0;n<3;n++)rt[n]=t.position[e+n];(0,B.t)(rt,rt,ot);for(let n=0;n<3;n++)t.position[e+n]=rt[n]}if(n[0]!==n[1]||n[1]!==n[2]){ot[0]=1/n[0],ot[4]=1/n[1],ot[8]=1/n[2];for(let e=0;e<t.normal.length;e+=3){for(let n=0;n<3;n++)rt[n]=t.normal[e+n];(0,B.t)(rt,rt,ot),(0,B.n)(rt,rt);for(let n=0;n<3;n++)t.normal[e+n]=rt[n]}}}(t,n&&n.size);const{vertexAttributes:r,transform:o}=(0,O.w1)(t,e,n);return{vertexAttributes:new Z.ZP({...r,uv:t.uv}),transform:o,components:[new A.Z({faces:t.faces,material:n&&n.material||null})],spatialReference:e.spatialReference}}const et={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},nt={south:0,east:1,north:2,west:3,up:4,down:5},rt=(0,y.c)(),ot=(0,$.c)();var it=n(52138);const st=h.Z.getLogger("esri.geometry.support.meshUtils.rotate");function at(t,e,n,r=y.Z){if(!(0,s.Wi)(t)){(0,it.d)(pt,(0,C.WH)(e),(0,C.ZZ)(e));for(let e=0;e<t.length;e+=n){for(let n=0;n<3;n++)lt[n]=t[e+n]-r[n];(0,B.m)(lt,lt,pt);for(let n=0;n<3;n++)t[e+n]=lt[n]+r[n]}}}const lt=(0,y.c)(),ct=(0,y.c)(),ut=(0,C.Ue)(),pt=(0,H.c)(),ht=(0,$.c)(),ft=(0,y.c)(),gt=h.Z.getLogger("esri.geometry.support.meshUtils.scale");function dt(t,e,n=y.Z){if(t)for(let r=0;r<t.length;r+=3){for(let e=0;e<3;e++)xt[e]=t[r+e]-n[e];(0,B.a)(xt,xt,e);for(let e=0;e<3;e++)t[r+e]=xt[e]+n[e]}}const xt=(0,y.c)(),mt=(0,y.c)(),yt=(0,y.c)();var vt;const wt=h.Z.getLogger("esri.geometry.Mesh");let bt=vt=class extends((0,u.p)(p.Z.LoadableMixin((0,f.v)(v.Z)))){constructor(t){super(t),this.components=null,this.transform=null,this.external=null,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new Z.QL,this.type="mesh"}initialize(){((0,s.Wi)(this.external)||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add((0,d.YP)((()=>{var t;return{vertexAttributes:this.vertexAttributes,components:null==(t=this.components)?void 0:t.map((t=>t.clone())),transform:(0,s.pC)(this.transform)?this.transform.clone():null}}),(()=>this._set("external",null)),{once:!0,sync:!0}))}))}get hasExtent(){return!this.loaded&&(0,s.pC)(this.external)&&(0,s.pC)(this.external.extent)||this.loaded&&this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0)}get boundingInfo(){const t=this.vertexAttributes.position,e=this.spatialReference;if(0===t.length||this.components&&0===this.components.length)return{extent:new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:e}),center:new w.Z({x:0,y:0,z:0,spatialReference:e})};const n=(0,s.pC)(this.transform)?this.transform.project(t,e):t;let r=1/0,o=1/0,i=1/0,l=-1/0,c=-1/0,u=-1/0,p=0,h=0,f=0;const g=n.length,d=1/(g/3);let x=0;for(;x<g;){const t=n[x++],e=n[x++],s=n[x++];r=Math.min(r,t),o=Math.min(o,e),i=Math.min(i,s),l=Math.max(l,t),c=Math.max(c,e),u=Math.max(u,s),p+=d*t,h+=d*e,f+=d*s}return{extent:new a.Z({xmin:r,ymin:o,zmin:i,xmax:l,ymax:c,zmax:u,spatialReference:e}),center:new w.Z({x:p,y:h,z:f,spatialReference:e})}}get anchor(){if((0,s.pC)(this.transform))return this.transform.getOriginPoint(this.spatialReference);const t=this.boundingInfo;return new w.Z({x:t.center.x,y:t.center.y,z:t.extent.zmin,spatialReference:this.spatialReference})}get origin(){return(0,s.pC)(this.transform)?this.transform.getOriginPoint(this.spatialReference):this.boundingInfo.center}get extent(){return!this.loaded&&(0,s.pC)(this.external)&&(0,s.pC)(this.external.extent)?this.external.extent.clone():this.boundingInfo.extent}addComponent(t){this.loaded?(this.components||(this.components=[]),this.components.push(A.Z.from(t)),this.notifyChange("components")):wt.error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(t){if(this.loaded){if(this.components){const e=this.components.indexOf(t);if(-1!==e)return this.components.splice(e,1),void this.notifyChange("components")}wt.error("removeComponent()","Provided component is not part of the list of components")}else wt.error("removeComponent()","Mesh must be loaded before applying operations")}rotate(t,e,n,r){return(0,C.uT)(Ct.x,t,At),(0,C.uT)(Ct.y,e,Mt),(0,C.uT)(Ct.z,n,Zt),(0,C.qC)(At,Mt,At),(0,C.qC)(At,Zt,At),function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position||0===e[3])return;const r=t.spatialReference;if((0,s.pC)(t.transform)){var o;null!=(null==n?void 0:n.geographic)&&n.geographic!==t.transform.geographic&&st.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${t.transform.geographic}) is not supported`);const i=null!=(o=null==n?void 0:n.origin)?o:t.transform.getOriginPoint(r);!function(t,e,n){const r=(0,B.s)(lt,n.x,n.y,n.z),o=(0,B.f)(lt,r,t.origin);t.applyLocalInverse(o,ct),t.rotation=(0,C.qC)(t.rotation,e,(0,C.Ue)()),t.applyLocalInverse(o,o),(0,B.f)(o,o,ct),t.translation=(0,B.b)((0,y.c)(),t.translation,o)}(t.transform,e,i)}else{var i;const r=null!=(i=null==n?void 0:n.origin)?i:t.origin;(0,E.h)(t.spatialReference,n)?function(t,e,n){const r=t.spatialReference,o=(0,G.rS)(r),i=ft;(0,L.KC)(n,i,o)||(0,L.KC)(t.origin,i,o);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,u=new Float64Array(a.length),p=(0,s.pC)(l)?new Float32Array(l.length):null,h=(0,s.pC)(c)?new Float32Array(c.length):null;(0,L.Bm)(o,i,pt,o),(0,k.f)(ht,pt);const f=ut;(0,B.t)((0,C.ZZ)(ut),(0,C.ZZ)(e),ht),f[3]=e[3],(0,q.XO)(a,r,u),(0,s.pC)(l)&&(0,q.Iz)(l,a,u,r,p),(0,s.pC)(c)&&(0,q.wi)(c,a,u,r,h),at(u,f,3,i),(0,q.To)(u,a,r),(0,s.pC)(l)&&(at(p,f,3),(0,q.Yk)(p,a,u,r,l)),(0,s.pC)(c)&&(at(h,f,4),(0,q.M2)(h,a,u,r,c)),t.vertexAttributesChanged()}(t,e,r):function(t,e,n){const r=ft;if(!(0,L.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,st.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}at(t.vertexAttributes.position,e,3,r),at(t.vertexAttributes.normal,e,3),at(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}(t,e,r)}}(this,At,r),this}offset(t,e,n,r){return this.loaded?(_t[0]=t,_t[1]=e,_t[2]=n,function(t,e,n){t.vertexAttributes&&t.vertexAttributes.position&&((0,s.pC)(t.transform)?(null!=(null==n?void 0:n.geographic)&&n.geographic!==t.transform.geographic&&Y.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${t.transform.geographic}) is not supported`),function(t,e){const n=t.origin;t.origin=(0,B.b)((0,y.c)(),n,e)}(t.transform,e)):(0,E.h)(t.spatialReference,n)?function(t,e){const n=t.spatialReference,r=t.vertexAttributes.position,o=t.vertexAttributes.normal,i=t.vertexAttributes.tangent,a=new Float64Array(r.length),l=(0,s.pC)(o)?new Float32Array(o.length):null,c=(0,s.pC)(i)?new Float32Array(i.length):null,u=t.extent.center,p=K;(0,L.Bm)(n,[u.x,u.y,u.z],V,(0,G.rS)(n)),(0,k.f)(J,V),(0,B.t)(p,e,J),(0,q.XO)(r,n,a),(0,s.pC)(o)&&(0,q.Iz)(o,r,a,n,l),(0,s.pC)(i)&&(0,q.wi)(i,r,a,n,c),X(a,p),(0,q.To)(a,r,n),(0,s.pC)(o)&&(0,q.Yk)(l,r,a,n,o),(0,s.pC)(i)&&(0,q.M2)(c,r,a,n,i),t.vertexAttributesChanged()}(t,e):function(t,e){X(t.vertexAttributes.position,e),t.vertexAttributesChanged()}(t,e))}(this,_t,r),this):(wt.error("offset()","Mesh must be loaded before applying operations"),this)}scale(t,e){return this.loaded?(function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position)return;const r=t.spatialReference;if((0,s.pC)(t.transform)){var o;null!=(null==n?void 0:n.geographic)&&n.geographic!==t.transform.geographic&&gt.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${t.transform.geographic}) is not supported`);const i=null!=(o=null==n?void 0:n.origin)?o:t.transform.getOriginPoint(r);!function(t,e,n){const r=(0,B.s)(xt,n.x,n.y,n.z),o=(0,B.f)(xt,r,t.origin);t.applyLocalInverse(o,mt);const i=(0,B.a)((0,y.c)(),t.scale,e);t.scale=i,t.applyLocalInverse(o,o),(0,B.f)(o,o,mt),t.translation=(0,B.b)((0,y.c)(),t.translation,o)}(t.transform,e,i)}else{const r=(0,E.h)(t.spatialReference,n),o=n&&n.origin||t.origin;r?function(t,e,n){const r=t.spatialReference,o=(0,G.rS)(r),i=yt;(0,L.KC)(n,i,o)||(0,L.KC)(t.origin,i,o);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,u=new Float64Array(a.length),p=(0,s.pC)(l)?new Float32Array(l.length):null,h=(0,s.pC)(c)?new Float32Array(c.length):null;(0,q.XO)(a,r,u),(0,s.pC)(l)&&(0,q.Iz)(l,a,u,r,p),(0,s.pC)(c)&&(0,q.wi)(c,a,u,r,h),dt(u,e,i),(0,q.To)(u,a,r),(0,s.pC)(l)&&(0,q.Yk)(p,a,u,r,l),(0,s.pC)(c)&&(0,q.M2)(h,a,u,r,c),t.vertexAttributesChanged()}(t,e,o):function(t,e,n){const r=yt;if(!(0,L.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,gt.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}dt(t.vertexAttributes.position,e,r),t.vertexAttributesChanged()}(t,e,o)}}(this,t,e),this):(wt.error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(t,e){return this.loaded?(function(t,e,n){var r;if(!t.vertexAttributes||!t.vertexAttributes.position)return;const o=null!=(r=null==n?void 0:n.origin)?r:t.origin;(0,s.pC)(t.transform)?(null!=(null==n?void 0:n.geographic)&&n.geographic!==t.transform.geographic&&P.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${t.transform.geographic}) is not supported`),function(t,e,n){const r=e.x-n.x,o=e.y-n.y,i=e.hasZ&&n.hasZ?e.z-n.z:0,s=t.origin;t.origin=[s[0]+r,s[1]+o,s[2]+i]}(t.transform,e,o)):(0,E.h)(t.spatialReference,n)?function(t,e,n){const r=(0,O.FF)(t.vertexAttributes,n,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,O.iv)(r,e,{geographic:!0});t.vertexAttributes.position=o,t.vertexAttributes.normal=i,t.vertexAttributes.tangent=s,t.vertexAttributesChanged()}(t,e,o):function(t,e,n){const r=j,o=S;if((0,L.KC)(e,o,t.spatialReference)){if(!(0,L.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,P.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}(function(t,e,n){if(t)for(let r=0;r<t.length;r+=3)for(let o=0;o<3;o++)t[r+o]+=e[o]-n[o]})(t.vertexAttributes.position,o,r),t.vertexAttributesChanged()}else P.error(`Failed to project centerAt location (wkid:${e.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid})`)}(t,e,o)}(this,t,e),this):(wt.error("centerAt()","Mesh must be loaded before applying operations"),this)}load(t){return(0,s.pC)(this.external)&&this.addResolvingPromise(async function(t,e,r){const{loadGLTFMesh:o}=await(0,g.Hl)(Promise.all([n.e(2133),n.e(9070)]).then(n.bind(n,99070)),r),i=await U(e,r),a=o(new w.Z({x:0,y:0,z:0,spatialReference:t.spatialReference}),i.url,{resolveFile:N(i),useTransform:!0,signal:(0,s.pC)(r)?r.signal:null});a.then((()=>i.dispose()),(()=>i.dispose()));const{vertexAttributes:l,components:c}=await a;t.vertexAttributes=l,t.components=c}(this,this.external.source,t)),Promise.resolve(this)}clone(){const t=this.components?new Map:null,e=this.components?new Map:null,n={components:this.components?this.components.map((n=>n.cloneWithDeduplication(t,e))):null,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),transform:(0,s.pC)(this.transform)?this.transform.clone():null,external:(0,s.pC)(this.external)?{source:this.external.source,extent:(0,s.pC)(this.external.extent)?this.external.extent.clone():null}:null};return new vt(n)}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(t){const{toBinaryGLTF:e}=await n.e(7277).then(n.bind(n,7277));return e(this,t)}static createBox(t,e){if(!(t instanceof w.Z))return wt.error(".createBox()","expected location to be a Point instance"),null;const n=new vt(tt(function(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:n}=et,r=4*t.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*t.length*3);let l=0,c=0,u=0,p=0;for(let r=0;r<t.length;r++){const h=t[r],f=l/3;for(const t of e)a[p++]=f+t;const g=h.corners;for(let t=0;t<4;t++){const e=g[t];let r=0;s[u++]=.25*n[t][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*n[t][1];for(let t=0;t<3;t++)0!==h.axis[t]?(o[l++]=.5*h.axis[t],i[c++]=h.axis[t]):(o[l++]=.5*e[r++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),t,e));return e&&e.imageFace&&"all"!==e.imageFace?function(t,e){const n=t.components[0],r=n.faces,o=nt[e],i=6*o,a=new Uint32Array(6),l=new Uint32Array(r.length-6);let c=0,u=0;for(let t=0;t<r.length;t++)t>=i&&t<i+6?a[c++]=r[t]:l[u++]=r[t];if((0,s.pC)(t.vertexAttributes.uv)){const e=new Float32Array(t.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let t=0;t<r.length;t++)e[n+t]=r[t];t.vertexAttributes.uv=e}return t.components=[new A.Z({faces:a,material:n.material}),new A.Z({faces:l})],t}(n,e.imageFace):n}static createSphere(t,e){return t instanceof w.Z?new vt(tt(function(t=0){const e=Math.round(8*2**t),n=2*e,r=(e-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((e-1)*n*2*3);let l=0,c=0,u=0,p=0;for(let t=0;t<=e;t++){const r=t/e*Math.PI+.5*Math.PI,h=Math.cos(r),f=Math.sin(r);rt[2]=f;const g=0===t||t===e,d=g?n-1:n;for(let r=0;r<=d;r++){const f=r/d*2*Math.PI;rt[0]=-Math.sin(f)*h,rt[1]=Math.cos(f)*h;for(let t=0;t<3;t++)o[l]=.5*rt[t],i[l]=rt[t],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=t/e,0!==t&&r!==n&&(t!==e&&(a[u++]=p,a[u++]=p+1,a[u++]=p-n),1!==t&&(a[u++]=p,a[u++]=p-n,a[u++]=p-n-1)),p++}}return{position:o,normal:i,uv:s,faces:a}}(e&&e.densificationFactor||0),t,e)):(wt.error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(t,e){return t instanceof w.Z?new vt(tt(function(t=0){const e=Math.round(16*2**t),n=4*(e+1)+2*e,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*e*3);let a=0,l=0,c=0,u=0,p=0;for(let t=0;t<=5;t++){const n=0===t||5===t,h=t<=1||t>=4,f=2===t||4===t,g=n?e-1:e;for(let d=0;d<=g;d++){const x=d/g*2*Math.PI,m=n?0:.5;rt[0]=m*Math.sin(x),rt[1]=m*-Math.cos(x),rt[2]=t<=2?.5:-.5;for(let e=0;e<3;e++)r[a++]=rt[e],o[l++]=h?2===e?t<=1?1:-1:0:2===e?0:rt[e]/m;i[c++]=(d+(n?.5:0))/e,i[c++]=t<=1?1*t/3:t<=3?1*(t-2)/3+1/3:1*(t-4)/3+2/3,f||0===t||d===e||(5!==t&&(s[u++]=p,s[u++]=p+1,s[u++]=p-e),1!==t&&(s[u++]=p,s[u++]=p-e,s[u++]=p-e-1)),p++}}return{position:r,normal:o,uv:i,faces:s}}(e&&e.densificationFactor||0),t,e)):(wt.error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(t,e){var n;if(!(t instanceof w.Z))return wt.error(".createPlane()","expected location to be a Point instance"),null;const r=null!=(n=null==e?void 0:e.facing)?n:"up",o=function(t,e){const n="number"==typeof e?e:null!=e?e.width:1,r="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(r,null==e?void 0:e.size);return new vt(tt(function(t){const e=Q.facingAxisOrderSwap[t],n=Q.position,r=Q.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let t=0;t<4;t++){const t=s;for(let a=0;a<3;a++){const l=e[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=n[t+c]*u,i[s]=r[t+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(Q.uv),faces:new Uint32Array(Q.faces)}}(r),t,{...e,size:o}))}static createFromPolygon(t,e){if(!(t instanceof b.Z))return wt.error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(t){const e=R(t.rings,t.hasZ,r.CCW_IS_HOLE),n=[];let o=0,i=0;for(const t of e.polygons){const r=t.count,s=t.index,a=new Float64Array(e.position.buffer,3*s*e.position.BYTES_PER_ELEMENT,3*r),l=t.holeIndices.map((t=>t-s)),c=new Uint32Array((0,_.e)(a,l,3));n.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(t,e,n){if(1===t.length)return t[0];const r=new Float64Array(e),o=new Uint32Array(n);let i=0,s=0,a=0;for(const e of t){for(let t=0;t<e.position.length;t++)r[i++]=e.position[t];for(let t=0;t<e.faces.length;t++)o[s++]=e.faces[t]+a;a=i/3}return{position:r,faces:o}}(n,o,i),a=(0,F.d)(s.position.buffer,6,{originalIndices:s.faces});return s.position=new Float64Array(a.buffer),s.faces=a.indices,s}(t);return new vt({vertexAttributes:new Z.QL({position:n.position}),components:[new A.Z({faces:n.faces,shading:"flat",material:e&&e.material||null})],spatialReference:t.spatialReference})}static async createFromGLTF(t,e,r){if(!(t instanceof w.Z))throw wt.error(".createfromGLTF()","expected location to be a Point instance"),new c.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,g.Hl)(Promise.all([n.e(2133),n.e(9070)]).then(n.bind(n,99070)),r);return new vt(await o(t,e,r))}static createWithExternalSource(t,e,n){var r,o,i;const s=null!=(r=null==n?void 0:n.extent)?r:null,a=null!=(o=null==n?void 0:n.transform.clone())?o:new M.Z;a.origin=[t.x,t.y,null!=(i=t.z)?i:0];const l=t.spatialReference;return new vt({external:{source:e,extent:s},transform:a,spatialReference:l})}static createIncomplete(t,e){var n,r;const o=null!=(n=null==e?void 0:e.transform.clone())?n:new M.Z;o.origin=[t.x,t.y,null!=(r=t.z)?r:0];const i=t.spatialReference,s=new vt({transform:o,spatialReference:i});return s.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),s}};(0,l._)([(0,x.Cb)({type:[A.Z],json:{write:!0}})],bt.prototype,"components",void 0),(0,l._)([(0,x.Cb)({type:M.Z,json:{write:!0}})],bt.prototype,"transform",void 0),(0,l._)([(0,x.Cb)({constructOnly:!0})],bt.prototype,"external",void 0),(0,l._)([(0,x.Cb)({readOnly:!0})],bt.prototype,"hasExtent",null),(0,l._)([(0,x.Cb)({readOnly:!0})],bt.prototype,"boundingInfo",null),(0,l._)([(0,x.Cb)({readOnly:!0})],bt.prototype,"anchor",null),(0,l._)([(0,x.Cb)({readOnly:!0})],bt.prototype,"origin",null),(0,l._)([(0,x.Cb)({readOnly:!0,json:{read:!1}})],bt.prototype,"extent",null),(0,l._)([(0,x.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],bt.prototype,"hasZ",void 0),(0,l._)([(0,x.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],bt.prototype,"hasM",void 0),(0,l._)([(0,x.Cb)({type:Z.QL,nonNullable:!0,json:{write:!0}})],bt.prototype,"vertexAttributes",void 0),bt=vt=(0,l._)([(0,m.j)("esri.geometry.Mesh")],bt);const Ct={x:(0,y.f)(1,0,0),y:(0,y.f)(0,1,0),z:(0,y.f)(0,0,1)},At=(0,C.Ue)(),Mt=(0,C.Ue)(),Zt=(0,C.Ue)(),_t=(0,y.c)(),Tt=bt;var Ft,Rt;!function(t){t.featureGUID="featureGUID",t.assetName="assetName",t.hash="hash",t.type="type",t.conversionStatus="conversionStatus",t.flags="flags",t.complexity="complexity",t.size="size",t.seqNo="seqNo",t.sourceHash="sourceHash",t.assetURL="assetURL"}(Ft||(Ft={})),function(t){t.SUBMITTED="SUBMITTED",t.INPROGRESS="INPROGRESS",t.FAILED="FAILED",t.COMPLETED="COMPLETED"}(Rt||(Rt={}));var Dt,It,Lt=n(74889);function Et(t,e,n){const r=n.features;n.features=[],delete n.geometryType;const o=Lt.default.fromJSON(n);o.geometryType="mesh";const a=o.spatialReference,l=(0,s.Wi)(t.outFields)||!t.outFields.length?()=>({}):(c=t.outFields.includes("*")?null:new Set(t.outFields),({attributes:t})=>{if(!t)return{};if(!c)return t;for(const e in t)c.has(e)||delete t[e];return t});var c;for(const t of r){const n=Ot(t,a,e);(0,s.pC)(n)&&o.features.push(new i.Z({geometry:n,attributes:l(t)}))}return o}function Ot(t,e,n){const{status:r,source:o}=function(t){if(!t.assetMappings)return{status:Dt.FAILED};const e=[],n=new Map;for(const r of t.assetMappings){const t=r[Ft.seqNo],o=r[Ft.assetName],i=r[Ft.assetURL],s=r[Ft.conversionStatus];if(s===Rt.FAILED)return{status:Dt.FAILED};if(s!==Rt.COMPLETED)return{status:Dt.PENDING};if(null==t)e.push({name:o,source:i});else{const r=n.get(o);let s;r?s=r.multipart:(s=[],e.push({name:o,source:{multipart:s}}),n.set(o,{multipart:s})),s[t]=i}}return{status:Dt.COMPLETED,source:e}}(t);if(r===Dt.FAILED)return null;const i=function({attributes:t},e,{transformFieldRoles:n}){return new w.Z({x:t[n.originX],y:t[n.originY],z:t[n.originZ],spatialReference:e})}(t,e,n),s=a.Z.fromJSON(t.geometry);s.spatialReference=e;const l=function({attributes:t,assetMappings:e},{transformFieldRoles:n}){var r;return new M.Z({translation:[t[n.translationX],t[n.translationY],t[n.translationZ]],rotation:(0,C.uT)([t[n.rotationX],t[n.rotationY],t[n.rotationZ]],t[n.rotationDeg]),scale:[t[n.scaleX],t[n.scaleY],t[n.scaleZ]],geographic:!(null!=(r=e[Ft.flags])&&r.includes("PROJECT_VERTICES"))})}(t,n);return r===Dt.PENDING?Tt.createIncomplete(i,{extent:s,transform:l}):Tt.createWithExternalSource(i,o,{extent:s,transform:l})}(It=Dt||(Dt={}))[It.FAILED=0]="FAILED",It[It.PENDING=1]="PENDING",It[It.COMPLETED=2]="COMPLETED"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7049,3172],{25929:(e,t,r)=>{r.d(t,{M:()=>f,f:()=>s,i:()=>h,p:()=>m,r:()=>a,t:()=>i,w:()=>l});var n=r(70586),o=r(17452);function s(e,t){const r=t&&t.url&&t.url.path;if(e&&r&&(e=(0,o.hF)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,o.PF)(e,t.portalItem.itemUrl);c.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return p(e,t&&t.portal)}function i(e,t,r=f.YES){if(!e)return e;!(0,o.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let n=(0,o.hF)(e);if(t){const r=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(r){const s=p(r,t.portal);n=(0,o.PF)(p(n,t.portal),s,s),n!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(n)}}return n=function(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,o.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}(n,t&&t.portal),(0,o.YP)(n)&&(n=(0,o.Fv)(n)),null!=t&&t.resources&&null!=t&&t.portalItem&&!(0,o.YP)(n)&&!(0,o.HK)(n)&&r===f.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(n)}),n}function a(e,t,r){return s(e,r)}function l(e,t,r,n){const o=i(e,n);void 0!==o&&(t[r]=o)}const u=/\/items\/([^\/]+)\/resources\//,c=/^\.\/resources\//;function h(e){const t=(0,n.pC)(e)?e.match(u):null;return(0,n.pC)(t)?t[1]:null}function p(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,n=(0,o.TI)();return(0,o.D6)(n,`${n.scheme}://${r}`)?(0,o.Ie)(e,t.portalHostname,r):(0,o.Ie)(e,r,t.portalHostname)}var f,d;(d=f||(f={}))[d.YES=0]="YES",d[d.NO=1]="NO";const m=Object.freeze({__proto__:null,fromJSON:s,toJSON:i,read:a,write:l,itemIdFromResourceUrl:h,get MarkKeep(){return f}})},32448:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(43697),o=r(15923),s=r(50758),i=r(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this.target=e,this._listenersMap=null}clear(){this._listenersMap&&this._listenersMap.clear(),this._listenersMap=null}emit(e,t){const r=this._listenersMap&&this._listenersMap.get(e);if(!r)return!1;const n=this.target||this;return[...r].forEach((e=>{e.call(n,t)})),r.length>0}on(e,t){if(Array.isArray(e)){const r=e.map((e=>this.on(e,t)));return(0,s.AL)(r)}if(e.indexOf(",")>-1)throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const r=this._listenersMap.get(e)||[];return r.push(t),this._listenersMap.set(e,r),{remove:()=>{const r=this._listenersMap&&this._listenersMap.get(e)||[],n=r.indexOf(t);n>=0&&r.splice(n,1)}}}once(e,t){const r=this.on(e,(e=>{r.remove(),t.call(null,e)}));return r}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let r=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return r=(0,n._)([(0,i.j)("esri.core.Evented")],r),r};let r=class extends o.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};r=(0,n._)([(0,i.j)("esri.core.Evented")],r),e.EventedAccessor=r}(a||(a={}));const l=a},10699:(e,t,r)=>{r.d(t,{I:()=>i});var n=r(43697),o=r(52011);let s=0;const i=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,n._)([(0,o.j)("esri.core.Identifiable")],t),t};let a=class extends(i(class{})){};a=(0,n._)([(0,o.j)("esri.core.Identifiable")],a)},16453:(e,t,r)=>{r.d(t,{R:()=>w,w:()=>b});var n=r(43697),o=r(15923),s=r(70586),i=r(41103),a=r(22974),l=r(31263);class u{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new u,r=this._originStores[l.s3.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,a.d9)(e),l.s3.DEFAULTS)}));for(let r=l.s3.SERVICE;r<l.kk;r++){const n=this._originStores[r];n&&n.forEach(((n,o)=>{e&&e.has(o)||t.set(o,(0,a.d9)(n),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=l.s3.USER){let n=this._originStores[r];if(n||(n=new Map,this._originStores[r]=n),n.set(e,t),!this._values.has(e)||(0,s.j0)(this._propertyOriginMap.get(e))<=r){const n=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),n!==t}return!1}delete(e,t=l.s3.USER){const r=this._originStores[t];if(!r)return;const n=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return n}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],n=r&&r.get(e),o=this._values.get(e);return this._values.set(e,n),this._propertyOriginMap.set(e,t),o!==n}originOf(e){return this._propertyOriginMap.get(e)||l.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var c=r(50549),h=r(1153),p=r(52011);const f=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,s.j0)((0,h.vw)(this)),r=t.store,n=new u;t.store=n,(0,i.M)(t,r,n)}read(e,t){(0,c.i)(this,e,t)}getAtOrigin(e,t){const r=d(this),n=(0,l.M9)(t);if("string"==typeof e)return r.get(e,n);const o={};return e.forEach((e=>{o[e]=r.get(e,n)})),o}originOf(e){return(0,l.x3)(this.originIdOf(e))}originIdOf(e){return d(this).originOf(e)}revert(e,t){const r=d(this),n=(0,l.M9)(t),o=(0,h.vw)(this);let s;s="string"==typeof e?"*"===e?r.keys(n):[e]:e,s.forEach((e=>{o.invalidate(e),r.revert(e,n),o.commit(e)}))}};return t=(0,n._)([(0,p.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function d(e){return(0,h.vw)(e).store}let m=class extends(f(o.Z)){};m=(0,n._)([(0,p.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var y=r(76169);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,l.M9)(t))}write(e={},t){return(0,y.c)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,h.vw)(this).setAtOrigin(e,t,(0,l.M9)(r))}removeOrigin(e){const t=v(this),r=(0,l.M9)(e),n=t.keys(r);for(const e of n)t.originOf(e)===r&&t.set(e,t.get(e,r),l.s3.USER)}updateOrigin(e,t){const r=v(this),n=(0,l.M9)(t),o=this.get(e);for(let t=n+1;t<l.kk;++t)r.delete(e,t);r.set(e,o,n)}toJSON(e){return this.write({},e)}};return t=(0,n._)([(0,p.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,h.vw)(e).store}const w=e=>{let t=class extends(g(f(e))){constructor(...e){super(...e)}};return t=(0,n._)([(0,p.j)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(w(o.Z)){};b=(0,n._)([(0,p.j)("esri.core.MultiOriginJSONSupport")],b)},91460:(e,t,r)=>{function n(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const n=t.slice();for(const t of n)e.addEventListener(t,r);return{remove(){for(const t of n)e.removeEventListener(t,r)}}}return e.addEventListener(t,r),{remove(){e.removeEventListener(t,r)}}}function s(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const s=o(e,t,(t=>{s.remove(),r.call(e,t)}));return{remove(){s.remove()}}}r.d(t,{vT:()=>n,on:()=>o,IH:()=>s})},95330:(e,t,r)=>{r.d(t,{e4:()=>C,$6:()=>l,Ue:()=>u,zE:()=>c,dD:()=>O,hh:()=>U,vr:()=>L,Ds:()=>T,as:()=>_,WW:()=>E,R8:()=>b,D_:()=>w,Hc:()=>f,y8:()=>k,fu:()=>y,$F:()=>g,d1:()=>x,DB:()=>S,r9:()=>d,k_:()=>h,H9:()=>m,Yn:()=>P,gx:()=>q,Hl:()=>v});const n=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return{remove:()=>o.clearTimeout(r)}}});var o,s=r(20102),i=r(91460),a=(r(92604),r(70586));function l(e){return Promise.all(e)}function u(e){return new Promise(((t,r)=>{try{e(t,r)}catch(e){Promise.resolve().then((()=>r(e)))}}))}function c(e="Aborted"){return new s.Z("AbortError",e)}function h(e,t="Aborted"){if(f(e))throw c(t)}function p(e){return(0,a.pC)(e)?"aborted"in e?e:e.signal:e}function f(e){const t=p(e);return(0,a.pC)(t)&&t.aborted}function d(e){if(w(e))throw e}function m(e){if(!w(e))throw e}function y(e,t){const r=p(e);if(!(0,a.Wi)(r)){if(!r.aborted)return(0,i.IH)(r,"abort",(()=>t()));t()}}function g(e,t){const r=p(e);if(!(0,a.Wi)(r))return h(r),(0,i.IH)(r,"abort",(()=>t(c())))}function v(e,t){const r=p(t);return(0,a.Wi)(r)?e:new Promise(((r,n)=>{let o=y(t,(()=>n(c())));const s=()=>o=(0,a.hw)(o);e.then(s,s),e.then(r,n)}))}function w(e){return e&&"AbortError"===e.name}function b(e){return e.catch((e=>{if(!w(e))throw e}))}function O(){let e=null;const t=new Promise(((t,r)=>{e={promise:void 0,resolve:t,reject:r}}));return e.promise=t,e}function _(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e);return _(t.map((t=>e[t]))).then((e=>{const r={};return t.forEach(((t,n)=>r[t]=e[n])),r}))}const t=e;return u((e=>{const r=[];let n=t.length;0===n&&e(r),t.forEach((t=>{const o={promise:t||Promise.resolve(t)};r.push(o),o.promise.then((e=>{o.value=e})).catch((e=>{o.error=e})).then((()=>{--n,0===n&&e(r)}))}))}))}function E(e){return _(e).then((e=>e.filter((e=>!!e.value)).map((e=>e.value))))}function x(e){return Promise.reject(e)}function S(e){return Promise.resolve(e)}function C(e,t,r){const n=new AbortController;return y(r,(()=>n.abort())),new Promise(((r,o)=>{let s=setTimeout((()=>{s=0,r(t)}),e);y(n,(()=>{s&&(clearTimeout(s),o(c()))}))}))}function k(e){return e&&"function"==typeof e.then}function q(e){return k(e)?e:Promise.resolve(e)}function T(e,t=-1){let r,n,o,s,i=null;const l=(...u)=>{if(r){n=u,s&&s.reject(c()),s=O();const e=(0,a.j0)(s.promise);if(i){const e=i;i=null,e.abort()}return e}if(o=s||O(),s=null,t>0){const n=new AbortController;r=q(e(...u,n.signal));const o=r;C(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=q(e(...u));const h=()=>{const e=n;n=o=r=i=null,null!=e&&l(...e)},p=r,f=o;return p.then(h,h),p.then(f.resolve,f.reject),(0,a.j0)(f.promise)};return l}function U(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),o=t=>{e(t)};return o.resolve=t=>e(t),o.reject=e=>t(e),o.timeout=(e,t)=>n.setTimeout((()=>o.reject(t)),e),o.promise=r,o}function L(e,t){let r,n=new AbortController;const o=e(n.signal);let s={promise:o,finished:!1,abort:()=>{n&&(n.abort(),n=null)}};const i=()=>{s&&(s.finished=!0,s=null),(0,a.pC)(r)&&(r.remove(),r=null),n=null};return o.then(i,i),r=y(t,(()=>{(0,a.pC)(s)&&s.abort()})),s}function P(e){return Promise.resolve().then((()=>{h(e)}))}},17452:(e,t,r)=>{r.d(t,{R9:()=>v,qg:()=>T,tD:()=>$,ZN:()=>pe,fl:()=>fe,Ie:()=>ue,sJ:()=>V,AH:()=>K,io:()=>X,L:()=>E,TI:()=>_,vt:()=>ae,oh:()=>R,P$:()=>B,Ml:()=>de,ed:()=>M,b7:()=>q,D6:()=>Z,tm:()=>j,YP:()=>J,jc:()=>W,HK:()=>Y,$U:()=>re,oC:()=>ee,kl:()=>A,v_:()=>G,hF:()=>N,_l:()=>Q,PF:()=>F,Fv:()=>H,B7:()=>k,u0:()=>S,Yd:()=>ie,Hu:()=>he,Qj:()=>le,hO:()=>ne,mN:()=>x});var n=r(68773),o=r(20102),s=r(92604),i=r(70586);const a=s.Z.getLogger("esri.core.urlUtils"),l=n.Z.request,u="esri/config: esriConfig.request.proxyUrl is not set.",c=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,h=/^\s*http:/i,p=/^\s*https:/i,f=/^\s*file:/i,d=/:\d+$/,m=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,y=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),g=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class v{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=(0,i.j0)(this.uri.match(y));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=(0,i.j0)(this.authority.match(g)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const w={};let b=new v(n.Z.applicationUrl);let O=function(){const e=(0,i.j0)(b.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${b.scheme}://${b.host}${null!=b.port?`:${b.port}`:""}${t}`}();const _=()=>b,E=()=>O;function x(e){const t={path:null,query:null},r=new v(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=S(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function S(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,o;t<0?(n=decodeURIComponent(e),o=""):(n=decodeURIComponent(e.slice(0,t)),o=decodeURIComponent(e.slice(t+1)));let s=r[n];"string"==typeof s&&(s=r[n]=[s]),Array.isArray(s)?s.push(o):r[n]=o}return r}function C(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function k(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const o=encodeURIComponent(r)+"=",s=t&&t[r];return s?o+encodeURIComponent(s(n)):Array.isArray(n)?n.map((e=>C(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):C(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function q(e=!1){let t,r=l.proxyUrl;if("string"==typeof e){t=re(e);const n=M(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(u),new o.Z("urlutils:proxy-not-set",u);return t&&oe()&&(r=ne(r)),x(r)}function T(e){const t=M(e);let r,n;if(t){const e=L(t.proxyUrl);r=e.path,n=e.query?S(e.query):null}if(r){const t=x(e);e=r+"?"+t.path;const o=k({...n,...t.query});o&&(e=`${e}?${o}`)}return e}const U={path:"",query:""};function L(e){const t=e.indexOf("?");return-1!==t?(U.path=e.slice(0,t),U.query=e.slice(t+1)):(U.path=e,U.query=null),U}function P(e){return(e=se(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=L(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:P(e.urlPrefix)},r=l.proxyRules,n=t.urlPrefix;let o=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;o=e;break}0===t.indexOf(n)&&(o=e+1)}return r.splice(o,0,t),o}function M(e){const t=l.proxyRules,r=P(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function j(e,t){return e=I(e),t=I(t),se(e)===se(t)}function I(e){const t=(e=H(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function R(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=l.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function Z(e,t,r=!1){const n=ce(e),o=ce(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function A(e){if("string"==typeof e){if(!J(e))return!0;e=ce(e)}if(Z(e,b))return!0;const t=l.trustedServers||[];for(let r=0;r<t.length;r++){const n=D(t[r]);for(let t=0;t<n.length;t++)if(Z(e,n[t]))return!0}return!1}function D(e){return w[e]||(te(e)||ee(e)?w[e]=[new v(N(e))]:w[e]=[new v(`http://${e}`),new v(`https://${e}`)]),w[e]}function N(e,t=O,r){return ee(e)?r&&r.preserveProtocolRelative?e:"http"===b.scheme&&b.authority===B(e).slice(2)?`http:${e}`:`https:${e}`:te(e)?e:(0,i.j0)(G("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e))}function F(e,t=O,r){if(!J(e))return e;const n=H(e),o=n.toLowerCase(),s=H(t).toLowerCase().replace(/\/+$/,""),i=r?H(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let l=a(o,"/",o.indexOf("//")+2),u=-1;for(;o.slice(0,l+1)===s.slice(0,l)+"/"&&(u=l+1,l!==o.length);)l=a(o,"/",l+1);if(-1===u)return e;if(i&&u<i.length)return e;e=n.slice(u);const c=s.slice(u-1).replace(/[^/]+/g,"").length;if(c>0)for(let t=0;t<c;t++)e=`../${e}`;else e=`./${e}`;return e}function H(e){return function(e){const t=l.httpsDomains;if(!function(e){return h.test(e)||"http"===b.scheme&&ee(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),d.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===b.scheme&&n===b.authority&&!m.test(e)||(oe()&&n===b.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||oe()&&!M(e))&&(e=ne(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=L(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=N(e=e.trim()))))}function G(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(J(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return f.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function B(e,t=!1){if(W(e)||Y(e))return null;let r=e.indexOf("://");if(-1===r&&ee(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=se(e,!0)),e}function J(e){return ee(e)||te(e)}function W(e){return null!=e&&"blob:"===e.slice(0,5)}function Y(e){return"data:"===e.slice(0,5)}function K(e){const t=V(e);if(!t||!t.isBase64)return null;const r=atob(t.data),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n.buffer}const z=/^data:(.*?)(;base64)?,(.*)$/;function V(e){const t=e.match(z);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function Q(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function X(e,t){(function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);return r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),!0})(e,t)||function(e,t){!!window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(e,t)}(e,t)}function ee(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function te(e){return c.test(e)}function re(e){return p.test(e)||"https"===b.scheme&&ee(e)}function ne(e){return ee(e)?`https:${e}`:e.replace(h,"https:")}function oe(){return"https"===b.scheme}function se(e,t=!1){return ee(e)?e.slice(2):(e=e.replace(c,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ie(e){let t=0;if(J(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function ae(e,t){if(!e)return"";const r=x(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(null==t||!t.length)return n;const o=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(o,"")}function le(e){return e.replace(/\/+$/,"")}function ue(e,t,r){if(!(t&&r&&e&&J(e)))return e;const n=e.indexOf("//"),o=e.indexOf("/",n+2),s=e.indexOf(":",n+2),i=Math.min(o<0?e.length:o,s<0?e.length:s);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function ce(e){return"string"==typeof e?new v(N(e)):(e.scheme||(e.scheme=b.scheme),e)}function he(e,t){const r=x(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function pe(e,t,r){const n=x(e),o=n.query||{};return o[t]=String(r),`${n.path}?${k(o)}`}function fe(e,t){const r=x(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=k(n);return o?`${r.path}?${o}`:r.path}function de(e){if((0,i.Wi)(e))return null;const t=e.match(me);return t?t[1]:null}const me=/.*?\.([^\/]*)$/},66577:(e,t,r)=>{r.d(t,{qM:()=>c});var n=r(75215),o=r(6570),s=r(9361),i=r(65091),a=r(13473),l=r(17332),u=r(58901);r(82971),r(86973),r(33955);const c={base:s.Z,key:"type",typeMap:{extent:o.Z,multipoint:i.Z,point:a.Z,polyline:u.Z,polygon:l.Z}};(0,n.N7)(c)},33955:(e,t,r)=>{r.d(t,{im:()=>m,q9:()=>v,Ji:()=>y,YX:()=>c,aW:()=>h,wp:()=>p,oU:()=>d,l9:()=>f});var n=r(70586),o=r(6570),s=r(9361),i=r(65091),a=r(13473),l=r(17332),u=r(58901);function c(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function h(e){return void 0!==e.points}function p(e){return void 0!==e.x&&void 0!==e.y}function f(e){return void 0!==e.paths}function d(e){return void 0!==e.rings}function m(e){return(0,n.Wi)(e)?null:e instanceof s.Z?e:p(e)?a.Z.fromJSON(e):f(e)?u.Z.fromJSON(e):d(e)?l.Z.fromJSON(e):h(e)?i.Z.fromJSON(e):c(e)?o.Z.fromJSON(e):null}function y(e){return e?p(e)?"esriGeometryPoint":f(e)?"esriGeometryPolyline":d(e)?"esriGeometryPolygon":c(e)?"esriGeometryEnvelope":h(e)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:a.Z,esriGeometryPolyline:u.Z,esriGeometryPolygon:l.Z,esriGeometryEnvelope:o.Z,esriGeometryMultipoint:i.Z};function v(e){return e&&g[e]||null}},86973:(e,t,r)=>{r.d(t,{Mk:()=>o,P$:()=>s});var n=r(35454);const o=(0,n.wY)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),s=(0,n.wY)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},40330:(e,t,r)=>{r.d(t,{Dp:()=>u,id:()=>a,qh:()=>l,i8:()=>s,Nv:()=>i});var n=r(80442),o=r(17452);const s="4.23",i={async request(e,t){var n;const{default:s}=await r.e(3172).then(r.bind(r,3172)),i=e.options,a=i.responseType;i.signal=null==t?void 0:t.signal,i.responseType="native"===a||"native-request-init"===a?"native-request-init":["blob","json","text"].includes(a)&&null!=(n=(0,o.oh)(e.url))&&n.after?a:"array-buffer";const l=await s(e.url,i),u={data:l.data,ssl:l.ssl};switch(l.requestOptions.responseType){case"native-request-init":return delete u.data.signal,u;case"blob":u.data=await u.data.arrayBuffer();break;case"json":u.data=(new TextEncoder).encode(JSON.stringify(u.data)).buffer;break;case"text":u.data=(new TextEncoder).encode(u.data).buffer}return{result:u,transferList:[u.data]}}};let a;function l(e){a=e}function u(e){const t=a&&a.findCredential(e);return t&&t.token?(0,o.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")||((0,n.Z)("edge")||(0,n.Z)("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},29600:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(43697),o=r(68773),s=(r(66577),r(3172)),i=r(20102),a=r(32448),l=r(10699),u=r(83379),c=r(92604),h=r(95330),p=r(17452),f=r(5600),d=(r(67676),r(80442),r(75215),r(52011)),m=r(6570),y=r(82971);let g=0;const v=c.Z.getLogger("esri.layers.Layer");let w=class extends(a.Z.EventedMixin((0,l.I)(u.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.Z(-180,-90,180,90,y.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e,n=await r.e(3529).then(r.bind(r,63529));try{return await n.fromUrl(t)}catch(e){throw v.error("#fromArcGISServerUrl({ url: '"+t.url+"'})","Failed to create layer from arcgis server url",e),e}}static async fromPortalItem(e){const t="portalItem"in e?e:{portalItem:e},n=await r.e(4579).then(r.bind(r,44579));try{return await n.fromItem(t)}catch(e){const r=t&&t.portalItem,n=r&&r.id||"unset",s=r&&r.portal&&r.portal.url||o.Z.portalUrl;throw v.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+n+"')",e),e}}initialize(){this.when().catch((e=>{var t,r;(0,h.D_)(e)||c.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${null!=(t=this.title)?t:"no title"}', id: '${null!=(r=this.id)?r:"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,p.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new i.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,n._)([(0,f.Cb)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,n._)([(0,f.Cb)({type:m.Z})],w.prototype,"fullExtent",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,n._)([(0,f.Cb)({type:String})],w.prototype,"id",void 0),(0,n._)([(0,f.Cb)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,n._)([(0,f.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,n._)([(0,f.Cb)()],w.prototype,"parent",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,n._)([(0,f.Cb)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,n._)([(0,f.Cb)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,n._)([(0,f.Cb)({type:y.Z})],w.prototype,"spatialReference",void 0),(0,n._)([(0,f.Cb)({type:String})],w.prototype,"title",void 0),(0,n._)([(0,f.Cb)({type:String,readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,n._)([(0,f.Cb)()],w.prototype,"url",void 0),(0,n._)([(0,f.Cb)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,n._)([(0,d.j)("esri.layers.Layer")],w);const b=w},3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var n=r(68773),o=r(40330),s=r(20102),i=r(80442),a=r(22974),l=r(70586),u=r(95330),c=r(17452),h=r(71058),p=r(85958);async function f(e,t){var a;const p=(0,c.HK)(e),g=(0,c.jc)(e);g||p||(e=(0,c.Fv)(e));const v={url:e,requestOptions:{...(0,l.Wg)(t)}};let w=(0,c.oh)(e);if(w){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,n;try{n=await e.before(t)}catch(e){r=E("request:interceptor",e,t)}if((n instanceof Error||n instanceof s.Z)&&(r=E("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}(w,v);if(null!=e)return{data:e,getHeader:b,requestOptions:v.requestOptions,url:v.url};w.after||w.error||(w=null)}if(e=v.url,"image"===(t=v.requestOptions).responseType){if((0,i.Z)("host-webworker")||(0,i.Z)("host-node"))throw E("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),v)}else if(p)throw E("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),v);if("head"===t.method){if(t.body)throw E("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),v);if(p||g)throw E("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),v)}if(await async function(){(0,i.Z)("host-webworker")?d||(d=await Promise.all([r.e(102),r.e(9884)]).then(r.bind(r,29884))):f._abortableFetch||(f._abortableFetch=globalThis.fetch.bind(globalThis))}(),d)return d.execute(e,t);const O=new AbortController;(0,u.fu)(t,(()=>O.abort()));const _={controller:O,credential:null,credentialToken:null,fetchOptions:null,hasToken:!1,interceptor:w,params:v,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},k=await async function(e){var t,r;let s,i;await async function(e){const t=e.params.url,r=e.params.requestOptions,s=e.controller.signal,i=r.body;let a=null,l=null,c=null;if(y&&"HTMLFormElement"in globalThis&&(i instanceof FormData?a=i:i instanceof HTMLFormElement&&(l=i,a=new FormData(l))),"string"==typeof i&&(c=i),e.fetchOptions={cache:r.cacheBust&&!f._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",redirect:"follow",signal:s},(a||c)&&(e.fetchOptions.body=a||c),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query&&r.query.token||a&&a.get&&a.get("token")||l&&l.elements.token),!e.hasToken&&n.Z.apiKey&&(0,h.r)(t)&&(r.query||(r.query={}),r.query.token=n.Z.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!S(t)&&!(0,u.Hc)(s)){let n;"immediate"===r.authMode?(await x(),n=await o.id.getCredential(t,{signal:s}),e.credential=n):"no-prompt"===r.authMode?(await x(),n=await o.id.getCredential(t,{prompt:!1,signal:s}).catch((()=>{})),e.credential=n):o.id&&(n=o.id.findCredential(t)),n&&(e.credentialToken=n.token,e.useSSL=!!n.ssl)}}(e);try{do{[s,i]=await C(e)}while(!await q(e,s,i))}catch(t){const r=E("request:server",t,e.params,s);throw r.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(r),r}const a=e.params.url;if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)&&!e.hasToken&&!e.credentialToken&&null!=(t=i)&&null!=(r=t.user)&&r.username&&!(0,c.kl)(a)){const e=(0,c.P$)(a,!0);e&&m.trustedServers.push(e)}const l=e.credential;if(l&&o.id){const e=o.id.findServerInfo(l.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,l.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:i,getHeader:s?e=>s.headers.get(e):b,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(_);return null==(a=w)||null==a.after||a.after(k),k}let d;const m=n.Z.request,y="FormData"in globalThis,g=[499,498,403,401],v=["COM_0056","COM_0057","SB_0008"],w=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],b=()=>null,O=Symbol();function _(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||f._corsServers.includes(t)||(0,c.kl)(t)}function E(e,t,r,n){let o="Error";const i={url:r.url,requestOptions:r.requestOptions,getHeader:b,ssl:!1};if(t instanceof s.Z)return t.details?(t.details=(0,a.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=i,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n&&n.status,s=t.message;s&&(o=s),e&&(i.getHeader=e),i.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,i.subCode=t.subcode,i.messageCode=t.messageCode,"string"==typeof t.details?i.messages=[t.details]:i.messages=t.details,i.raw=O in t?t[O]:t}return(0,u.D_)(t)?(0,u.zE)():new s.Z(e,o,i)}async function x(){o.id||await Promise.all([r.e(280),r.e(2785),r.e(102),r.e(8536)]).then(r.bind(r,85976))}function S(e){return w.some((t=>t.test(e)))}async function C(e){let t=e.params.url;const r=e.params.requestOptions,n=e.fetchOptions,s=(0,c.jc)(t)||(0,c.HK)(t),a=r.responseType||"json",l=s?0:null!=r.timeout?r.timeout:m.timeout;let h=!1;if(!s){e.useSSL&&(t=(0,c.hO)(t)),r.cacheBust&&"default"===n.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let s={...r.query};e.credentialToken&&(s.token=e.credentialToken);let a=(0,c.B7)(s);(0,i.Z)("esri-url-encodes-apostrophe")&&(a=a.replace(/'/g,"%27"));const l=t.length+1+a.length;let u;h="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>m.maxUrlLength;const p=r.useProxy||!!(0,c.ed)(t);if(p){const e=(0,c.b7)(t);u=e.path,!h&&u.length+1+l>m.maxUrlLength&&(h=!0),e.query&&(s={...e.query,...s})}if("HEAD"===n.method&&(h||p)){if(h){if(l>m.maxUrlLength)throw E("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw E("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(p)throw E("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(h?(n.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,c.fl)(t,s):(n.body=(0,c.B7)(s),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,s),p&&(e.useProxy=!0,t=`${u}?${t}`),s.token&&y&&n.body instanceof FormData){const e=n.body;e.set?e.set("token",s.token):e.append("token",s.token)}if(r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(t);r&&r.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include")}let p,d,g=0,v=!1;l>0&&(g=setTimeout((()=>{v=!0,e.controller.abort()}),l));try{if("native-request-init"===r.responseType)d=n,d.url=t;else if("image"!==r.responseType||"default"!==n.cache||"GET"!==n.method||h||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!s&&!e.useProxy&&m.proxyUrl&&!_(t)){if(p=await f._abortableFetch(t,n),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!f._corsServers.includes(t)&&f._corsServers.push(t)}(t),"native"===r.responseType)d=p;else if("HEAD"!==n.method)if(p.ok){switch(a){case"array-buffer":d=await p.arrayBuffer();break;case"blob":case"image":d=await p.blob();break;default:d=await p.text()}if(g&&(clearTimeout(g),g=0),"json"===a||"xml"===a||"document"===a)if(d)switch(a){case"json":d=JSON.parse(d);break;case"xml":d=k(d,"application/xml");break;case"document":d=k(d,"text/html")}else d=null;if(d){if("array-buffer"===a||"blob"===a){const e=p.headers.get("Content-Type");if(/application\/json|text\/plain/i.test(e)&&d["blob"===a?"size":"byteLength"]<=750)try{const e=await new Response(d).json();e.error&&(d=e)}catch{}}"image"===a&&d instanceof Blob&&(d=await T(URL.createObjectURL(d),e,!0))}}else d=await p.text()}else d=await T(t,e)}catch(n){if("AbortError"===n.name){if(v)throw new Error("Timeout exceeded");throw(0,u.zE)("Request canceled")}if(!(!p&&n instanceof TypeError&&m.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||_(t))throw n;e.redoRequest=!0,(0,c.tD)({proxyUrl:m.proxyUrl,urlPrefix:(0,c.P$)(t)})}finally{g&&clearTimeout(g)}return[p,d]}function k(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 q(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const n=e.params.requestOptions;if(!t||"native"===n.responseType||"native-request-init"===n.responseType)return!0;let s,i,a,l;if(!t.ok)throw s=new Error(`Unable to load ${t.url} status: ${t.status}`),s[O]=r,s;null!=r&&r.error&&(s=r.error),s&&(i=Number(s.code),a=s.hasOwnProperty("subcode")?Number(s.subcode):null,l=s.messageCode,l=l&&l.toUpperCase());const u=n.authMode;if(403===i&&(4===a||s.message&&s.message.toLowerCase().indexOf("ssl")>-1&&-1===s.message.toLowerCase().indexOf("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===i)&&-1!==g.indexOf(i)&&!S(e.params.url)&&(403!==i||-1===v.indexOf(l)&&(null==a||2===a&&e.credentialToken))){await x();try{const t=await o.id.getCredential(e.params.url,{error:E("request:server",s,e.params),prompt:"no-prompt"!==u,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"===u)return e.credential=null,e.credentialToken=null,!1;s=t}}if(s)throw s;return!0}function T(e,t,r=!1){const n=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.src=e,(0,p.f)(o,e,r,n)}f._abortableFetch=null,f._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>s});var n=r(17452);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function s(e){const t=(0,n.P$)(e,!0);return t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{f:()=>i});var n=r(80442),o=r(70586),s=r(95330);function i(e,t,r=!1,i){return new Promise(((l,u)=>{if((0,s.Hc)(i))return void u(a());let c=()=>{f(),u(new Error(`Unable to load ${t}`))},h=()=>{const t=e;f(),l(t)},p=()=>{if(!e)return;const t=e;f(),t.src="",u(a())};const f=()=>{(0,n.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",h)),c=null,h=null,e=null,(0,o.pC)(i)&&i.removeEventListener("abort",p),p=null,r&&URL.revokeObjectURL(t)};(0,o.pC)(i)&&i.addEventListener("abort",p),(0,n.Z)("esri-image-decode")?e.decode().then(h,c):(e.addEventListener("error",c),e.addEventListener("load",h))}))}function a(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}}}]);