@arcgis/core 4.33.0-next.20250430 → 4.33.0-next.20250502

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 (203) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02b38423276536596aba.js +1 -0
  3. package/assets/esri/core/workers/chunks/{de16b771d2c8d816c738.js → 05c80002c37002ac99e8.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{5d40c4783f58af1ae0dc.js → 0e8181e7fc1386d08ffc.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{96e5d192c8d23c1e324f.js → 13e68c43acc8916520db.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{e6a5911ea21bef32834b.js → 1bc22af4cc4effcbcf2b.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{9b2ab27159500315fbc1.js → 26850ec0917ee355ddb7.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{1bd4fe77ba6fb25322e7.js → 29e2b105f55adafc3a6d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{5d63dfa5a60c88e03b28.js → 2c77a543a174e5bc736a.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{d0ddf4f1c6a351b447c7.js → 30d7d2c7d6e9e5e2ecb9.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3cee3ff926f47aae476f.js +1 -0
  12. package/assets/esri/core/workers/chunks/{febae745a29a17ca130a.js → 4480e4b61affb3b2e9d6.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{4d4a271351fd288277d2.js → 49085a0b3a74e158f32f.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{392e64a573f67817db02.js → 4cb199b547e5b97e65fb.js} +1 -1
  15. package/assets/esri/core/workers/chunks/4df36ee2406861c7afa8.js +1 -0
  16. package/assets/esri/core/workers/chunks/{ba917175ca2a6681501e.js → 563594357f3648652a5c.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{abfc5f9ac16c3e885c5f.js → 56db71ea7eb8a5652d98.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{e56647e61296643c5f84.js → 5719471414810b6a9aec.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{235efd948ae470a6f238.js → 60b1365d25581ccf0485.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{3795793643f4db64af0e.js → 63c25455b9cf1b3df76a.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{cb25b45a6b385e60c68d.js → 653ff3e631fea8ad393a.js} +122 -121
  22. package/assets/esri/core/workers/chunks/{909be86782af3deb448e.js → 654fe135d41af81daa13.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{cd9343c78a7c3acdbbcd.js → 681b2662f6ce936afd7e.js} +1 -1
  24. package/assets/esri/core/workers/chunks/6d89d42bcba213be2d9d.js +1 -0
  25. package/assets/esri/core/workers/chunks/6ecc3a3737ae8622dfa4.js +1 -0
  26. package/assets/esri/core/workers/chunks/6fef5a07f75b2a5736ad.js +1 -0
  27. package/assets/esri/core/workers/chunks/6ff46126c82354e6c78e.js +1 -0
  28. package/assets/esri/core/workers/chunks/{65f2b22d8fc12e6d4a87.js → 7000d9158da929a16071.js} +1 -1
  29. package/assets/esri/core/workers/chunks/71dc9d78dec981078a1a.js +1 -0
  30. package/assets/esri/core/workers/chunks/{ab6ecd8eeec5ff761b34.js → 73bca519c93920bc8c9f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{7551011117c3d36ff3db.js → 743cdbff5c4616ddc2b4.js} +1 -1
  32. package/assets/esri/core/workers/chunks/7a282674d77875c58acd.js +1 -0
  33. package/assets/esri/core/workers/chunks/{968956284f44187f0622.js → 8540fb31bd0b29ff1906.js} +1 -1
  34. package/assets/esri/core/workers/chunks/8c5cea49e48f8858f115.js +1 -0
  35. package/assets/esri/core/workers/chunks/{237a965bd41ba8903e03.js → 921c040d0497031fd8ff.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{96d2a0777f5c418055fb.js → 92b48e3365d1cc933113.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{5d485c07848164099859.js → 95a4da3150ad8e8e36d8.js} +1 -1
  38. package/assets/esri/core/workers/chunks/9652cfd4668b95036c87.js +39 -0
  39. package/assets/esri/core/workers/chunks/{46fb6ba8900286d18b6f.js → 9d564f79b82d427fc1da.js} +1 -1
  40. package/assets/esri/core/workers/chunks/9f07919ade6707b103da.js +1 -0
  41. package/assets/esri/core/workers/chunks/{00612d6e05b1c8647668.js → 9fff43ffcd5602ccc50f.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{1cc5c566e68f2255d035.js → a6ca68ef6311ffc365b2.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{5a51c75a2932d9da001a.js → a8d043b73e087bee7c40.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{d3174ff4dd5acd16485a.js → c041f4a1d18d42e27ad7.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{ebfa4a0334401f5e004a.js → c12765e0c8b44e349c2a.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{afddb94ff4e1a70022c7.js → c3b2b05996e2008adbe3.js} +1 -1
  47. package/assets/esri/core/workers/chunks/c9a2c4fd169b943db4b4.js +1 -0
  48. package/assets/esri/core/workers/chunks/{4fb4884d2de42792abe3.js → d1a9e8db5ba403abe721.js} +1 -1
  49. package/assets/esri/core/workers/chunks/d35cd309ba7bb8968a22.js +1 -0
  50. package/assets/esri/core/workers/chunks/{6e6422eda398774acbc7.js → d60da671aba70485050e.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{7a8df1225abd54ff68ed.js → db298b292a4e43cba72d.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{2bda2cfc6e81818d7d33.js → dcaeb57c69d432118604.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{fb455fd89b74b70a6a2b.js → e613df03ceb39e29befa.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{05d7d8ff3e4cbad32580.js → e8dcaa7837b6fe7bff20.js} +1 -1
  55. package/assets/esri/core/workers/chunks/ec1a4b82cbc44ba45f83.js +1 -0
  56. package/assets/esri/core/workers/chunks/ec778cc7a55068f51937.js +1 -0
  57. package/assets/esri/core/workers/chunks/{51339193abddfe37745d.js → f2b63597ae956db74eb3.js} +1 -1
  58. package/chunks/Bufferer-CicaNej1.js +1 -1
  59. package/chunks/Distance2DCalculator-C1KHhZwD.js +1 -1
  60. package/chunks/Envelope.js +1 -1
  61. package/chunks/Envelope2D.js +1 -1
  62. package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +1 -1
  63. package/chunks/Geometry.js +1 -1
  64. package/chunks/GeometryCleaner-BEJM7I4l.js +1 -1
  65. package/chunks/OperatorClip.js +1 -1
  66. package/chunks/OperatorCrosses.js +1 -1
  67. package/chunks/OperatorCut.js +1 -1
  68. package/chunks/OperatorGeneralize.js +1 -1
  69. package/chunks/OperatorGeodesicBuffer.js +1 -1
  70. package/chunks/OperatorGeodeticArea.js +1 -1
  71. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  72. package/chunks/OperatorGeodeticDistance.js +1 -1
  73. package/chunks/OperatorGeodeticLength.js +1 -1
  74. package/chunks/OperatorIntersects.js +1 -1
  75. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  76. package/chunks/OperatorOverlaps.js +1 -1
  77. package/chunks/OperatorProximity.js +1 -1
  78. package/chunks/OperatorProximityGeodesic.js +1 -1
  79. package/chunks/OperatorShapePreservingLength.js +1 -1
  80. package/chunks/OperatorShapePreservingProject.js +1 -1
  81. package/chunks/OperatorSimplifyOGC.js +1 -1
  82. package/chunks/OperatorTouches.js +1 -1
  83. package/chunks/OperatorWithin.js +1 -1
  84. package/chunks/Point2D.js +1 -1
  85. package/chunks/ProjectionTransformation.js +1 -1
  86. package/chunks/QuadraticBezier.js +1 -1
  87. package/chunks/SSAO.glsl.js +43 -42
  88. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  89. package/chunks/Transformation2D.js +1 -1
  90. package/chunks/containsOperator.js +1 -1
  91. package/chunks/disjointOperator.js +1 -1
  92. package/chunks/equalsOperator.js +1 -1
  93. package/core/NestedMap.js +1 -1
  94. package/core/deprecate.js +1 -1
  95. package/geometry/operators/extendOperator.js +1 -1
  96. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  97. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  98. package/geometry/operators/gx/operatorBuffer.js +1 -1
  99. package/geometry/operators/gx/operatorDifference.js +1 -1
  100. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  101. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  102. package/geometry/operators/gx/operatorIntersection.js +1 -1
  103. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  104. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  105. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  106. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  107. package/geometry/operators/gx/operatorOffset.js +1 -1
  108. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  109. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  110. package/geometry/operators/gx/operatorSimplify.js +1 -1
  111. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  112. package/geometry/operators/gx/operatorUnion.js +1 -1
  113. package/geometry/operators/isNearOperator.js +1 -1
  114. package/geometry/operators/json/containsOperator.js +1 -1
  115. package/geometry/operators/json/disjointOperator.js +1 -1
  116. package/geometry/operators/reshapeOperator.js +1 -1
  117. package/geometry/operators/support/apiConverter.js +1 -1
  118. package/geometry/operators/support/initNoPeFactory.js +1 -1
  119. package/geometry/operators/support/jsonConverter.js +1 -1
  120. package/interfaces.d.ts +263 -39
  121. package/layers/MapImageLayer.js +1 -1
  122. package/layers/RouteLayer.js +1 -1
  123. package/layers/mixins/operationalLayers.js +1 -1
  124. package/layers/save/mapImageLayerUtils.js +5 -0
  125. package/package.json +1 -1
  126. package/portal/support/portalItemUtils.js +1 -1
  127. package/support/revision.js +1 -1
  128. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/utils.js +1 -1
  129. package/views/3d/environment/EnvironmentManager.js +1 -1
  130. package/views/3d/glTF/LoaderResult.js +1 -1
  131. package/views/3d/glTF/loader.js +1 -1
  132. package/views/3d/interactive/Manipulator3D.js +1 -1
  133. package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
  134. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  135. package/views/3d/layers/I3SMeshView3D.js +1 -1
  136. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  137. package/views/3d/layers/graphics/DeconflictAABR.js +5 -0
  138. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  139. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  140. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  141. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  142. package/views/3d/layers/graphics/Labeler.js +1 -1
  143. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  144. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  145. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  146. package/views/3d/webgl-engine/Stage.js +1 -1
  147. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  148. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  149. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  150. package/views/3d/webgl-engine/lib/ContentObjectType.js +1 -1
  151. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +5 -0
  152. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  153. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  154. package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
  155. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  156. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  157. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  158. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  159. package/views/3d/webgl-engine/lib/RendererBase.js +1 -1
  160. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  161. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  162. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  163. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  164. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  165. package/views/3d/webgl-engine/parts/Model.js +1 -1
  166. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  167. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  168. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  169. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  170. package/views/SelectionManager.js +1 -1
  171. package/views/ui/DefaultUI.js +1 -1
  172. package/views/webgl/Sync.js +5 -0
  173. package/widgets/Directions/DirectionsViewModel.js +1 -1
  174. package/widgets/Directions/css.js +5 -0
  175. package/widgets/Directions.js +1 -1
  176. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  177. package/widgets/FeatureTable/support/AttachmentsViewOptions.d.ts +4 -0
  178. package/widgets/FeatureTable.js +1 -1
  179. package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
  180. package/widgets/Fullscreen.js +1 -1
  181. package/widgets/LayerList/LayerListItem.js +1 -1
  182. package/widgets/LayerList/ListItemPanel.js +1 -1
  183. package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
  184. package/widgets/NavigationToggle.js +1 -1
  185. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  186. package/widgets/TableList/ListItemPanel.js +1 -1
  187. package/widgets/Weather/WeatherViewModel.js +1 -1
  188. package/widgets/Weather.js +1 -1
  189. package/assets/esri/core/workers/chunks/11b55e7e76e50fe11bbe.js +0 -1
  190. package/assets/esri/core/workers/chunks/25142d431dd1e5e82234.js +0 -1
  191. package/assets/esri/core/workers/chunks/2c92f6f268aa2de5432c.js +0 -1
  192. package/assets/esri/core/workers/chunks/7bfa18dd8771d4932533.js +0 -1
  193. package/assets/esri/core/workers/chunks/7fce62ef3f0b011e0d35.js +0 -1
  194. package/assets/esri/core/workers/chunks/84d7ed2cf5fe23a0888f.js +0 -1
  195. package/assets/esri/core/workers/chunks/86931186095c23e47c0c.js +0 -1
  196. package/assets/esri/core/workers/chunks/8c8d812a7f2d29c29676.js +0 -1
  197. package/assets/esri/core/workers/chunks/a79511b926a2830bb160.js +0 -1
  198. package/assets/esri/core/workers/chunks/b780c7062b1b18a5ae19.js +0 -1
  199. package/assets/esri/core/workers/chunks/b8248939373e25a8d6db.js +0 -1
  200. package/assets/esri/core/workers/chunks/baa9fd23414f03ef90bc.js +0 -1
  201. package/assets/esri/core/workers/chunks/c819535525e9a27bae1f.js +0 -39
  202. package/assets/esri/core/workers/chunks/e08bff9f8247909776a4.js +0 -1
  203. package/assets/esri/core/workers/chunks/f2bc75a718a10065011d.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4399],{4399:(e,t,r)=>{r.d(t,{loadGLTF:()=>P});var o,n,s=r(53966),a=r(9093),i=r(63907),u=r(49186),l=r(91869),c=r(74887),f=r(84952),d=r(46140),p=r(58083),h=r(67026),m=r(82534),T=r(13030),w=r(24045);r(44208);class g{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}!function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(o||(o={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(n||(n={}));var x=r(21818);const b={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},y={pbrMetallicRoughness:b,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},_={ESRI_externalColorMixMode:"tint",ESRI_receiveShadows:!0,ESRI_receiveAmbientOcclusion:!0},A=(e={})=>{const t={...b,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,x.Xb)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({..._,...e.extras});return{...y,...e,pbrMetallicRoughness:t,extras:r}},S={magFilter:i.Cj.LINEAR,minFilter:i.Cj.LINEAR_MIPMAP_LINEAR,wrapS:i.pF.REPEAT,wrapT:i.pF.REPEAT};var R=r(51530);const E=1179937895;class O{constructor(e,t,r,o){if(this._context=e,this.uri=t,this.json=r,this._glbBuffer=o,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=["KHR_texture_basisu","KHR_texture_transform"],this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,((e,o,n)=>(t=o||"",r=n||"",""))),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),null==r.scenes)throw new u.A("gltf-loader-unsupported-feature","Scenes must be defined.");if(null==r.meshes)throw new u.A("gltf-loader-unsupported-feature","Meshes must be defined");if(null==r.nodes)throw new u.A("gltf-loader-unsupported-feature","Nodes must be defined.");this._computeNodeParents()}static async load(e,t,r){if((0,f.DB)(t)){const r=(0,f.r$)(t);if(r&&"model/gltf-binary"!==r.mediaType)try{const o=JSON.parse(r.isBase64?atob(r.data):r.data);return new O(e,t,o)}catch{}const o=(0,f.lJ)(t);if(O._isGLBData(o))return this._fromGLBData(e,t,o)}if(U.test(t)||"gltf"===r?.expectedType){const o=await e.loadJSON(t,r);return new O(e,t,o)}const o=await e.loadBinary(t,r);if(O._isGLBData(o))return this._fromGLBData(e,t,o);if(D.test(t)||"glb"===r?.expectedType)throw new u.A("gltf-loader-invalid-glb","This is not a valid glb file.");const n=await e.loadJSON(t,r);return new O(e,t,n)}static _isGLBData(e){if(null==e)return!1;const t=new g(e);return t.remainingBytes()>=4&&t.readUint32()===E}static async _fromGLBData(e,t,r){const o=await O._parseGLBData(r);return new O(e,t,o.json,o.binaryData)}static async _parseGLBData(e){const t=new g(e);if(t.remainingBytes()<12)throw new u.A("gltf-loader-error","glb binary data is insufficiently large.");const r=t.readUint32(),o=t.readUint32(),n=t.readUint32();if(r!==E)throw new u.A("gltf-loader-error","Magic first 4 bytes do not fit to expected glb value.");if(e.byteLength<n)throw new u.A("gltf-loader-error","glb binary data is smaller than header specifies.");if(2!==o)throw new u.A("gltf-loader-unsupported-feature","An unsupported glb container version was detected. Only version 2 is supported.");let a,i,l=0;for(;t.remainingBytes()>=8;){const e=t.readUint32(),r=t.readUint32();if(0===l){if(1313821514!==r)throw new u.A("gltf-loader-error","First glb chunk must be JSON.");if(e<0)throw new u.A("gltf-loader-error","No JSON data found.");a=await(0,R.KB)(t.readUint8Array(e))}else if(1===l){if(5130562!==r)throw new u.A("gltf-loader-unsupported-feature","Second glb chunk expected to be BIN.");i=t.readUint8Array(e)}else s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] More than 2 glb chunks detected. Skipping.");l+=1}if(!a)throw new u.A("gltf-loader-error","No glb JSON chunk detected.");return{json:a,binaryData:i}}async getBuffer(e,t){const r=this.json.buffers[e];if(null==r.uri){if(null==this._glbBuffer)throw new u.A("gltf-loader-error","glb buffer not present");return this._glbBuffer}const o=await this._getBufferLoader(e,t);if(o.byteLength!==r.byteLength)throw new u.A("gltf-loader-error","Buffer byte lengths should match.");return o}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const o=this.json.buffers[e].uri,n=this._context.loadBinary(this._resolveUri(o),t).then((e=>new Uint8Array(e)));return this._bufferLoaders.set(e,n),n}async getAccessor(e,t){if(!this.json.accessors)throw new u.A("gltf-loader-unsupported-feature","Accessors missing.");const r=this.json.accessors[e];if(null==r?.bufferView)throw new u.A("gltf-loader-unsupported-feature","Some accessor does not specify a bufferView.");if(r.type in[o.MAT2,o.MAT3,o.MAT4])throw new u.A("gltf-loader-unsupported-feature",`AttributeType ${r.type} is not supported`);const n=this.json.bufferViews[r.bufferView],s=await this.getBuffer(n.buffer,t),a=M[r.type],i=I[r.componentType],l=a*i,c=n.byteStride||l;return{raw:s.buffer,byteStride:c,byteOffset:s.byteOffset+(n.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:c===l,componentCount:a,componentByteSize:i,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t){if(null==e.indices)return;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case i.pe.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case i.pe.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case i.pe.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case i.pe.UNSIGNED_BYTE:return(0,w.m)(L(T.SL,r));case i.pe.UNSIGNED_SHORT:return(0,w.m)(L(T.h,r));case i.pe.UNSIGNED_INT:return(0,w.m)(L(T.P,r))}}async getPositionData(e,t){if(null==e.attributes.POSITION)throw new u.A("gltf-loader-unsupported-feature","No POSITION vertex data found.");const r=await this.getAccessor(e.attributes.POSITION,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for POSITION vertex attribute, but found "+i.pe[r.componentType]);if(3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","POSITION vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return L(T.xs,r)}async getNormalData(e,t){if(null==e.attributes.NORMAL)throw new u.A("gltf-loader-error","No NORMAL vertex data found.");const r=await this.getAccessor(e.attributes.NORMAL,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for NORMAL vertex attribute, but found "+i.pe[r.componentType]);if(3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","NORMAL vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return L(T.xs,r)}async getTangentData(e,t){if(null==e.attributes.TANGENT)throw new u.A("gltf-loader-error","No TANGENT vertex data found.");const r=await this.getAccessor(e.attributes.TANGENT,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for TANGENT vertex attribute, but found "+i.pe[r.componentType]);if(4!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","TANGENT vertex attribute must have 4 components, but found "+r.componentCount.toFixed());return L(T.Eq,r)}async getTextureCoordinates(e,t){if(null==e.attributes.TEXCOORD_0)throw new u.A("gltf-loader-error","No TEXCOORD_0 vertex data found.");const r=await this.getAccessor(e.attributes.TEXCOORD_0,t);if(2!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","TEXCOORD_0 vertex attribute must have 2 components, but found "+r.componentCount.toFixed());if(r.componentType===i.pe.FLOAT)return L(T.gH,r);if(!r.normalized)throw new u.A("gltf-loader-unsupported-feature","Integer component types are only supported for a normalized accessor for TEXCOORD_0.");return function(e){switch(e.componentType){case i.pe.BYTE:return new T.D6(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_BYTE:return new T.LC(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.SHORT:return new T.mJ(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_SHORT:return new T.Yi(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_INT:return new T.An(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.FLOAT:return new T.gH(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(r)}async getVertexColors(e,t){if(null==e.attributes.COLOR_0)throw new u.A("gltf-loader-error","No COLOR_0 vertex data found.");const r=await this.getAccessor(e.attributes.COLOR_0,t);if(4!==r.componentCount&&3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","COLOR_0 attribute must have 3 or 4 components, but found "+r.componentCount.toFixed());if(4===r.componentCount){if(r.componentType===i.pe.FLOAT)return L(T.Eq,r);if(r.componentType===i.pe.UNSIGNED_BYTE)return L(T.XP,r);if(r.componentType===i.pe.UNSIGNED_SHORT)return L(T.Uz,r)}else if(3===r.componentCount){if(r.componentType===i.pe.FLOAT)return L(T.xs,r);if(r.componentType===i.pe.UNSIGNED_BYTE)return L(T.eI,r);if(r.componentType===i.pe.UNSIGNED_SHORT)return L(T.nS,r)}throw new u.A("gltf-loader-unsupported-feature","Unsupported component type for COLOR_0 attribute: "+i.pe[r.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let o=e.material?this._materialCache.get(e.material):void 0;if(!o){const n=null!=e.material?A(this.json.materials[e.material]):A(),s=n.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(n.normalTexture,t),l=r?this.getTexture(n.occlusionTexture,t):void 0,c=r?this.getTexture(n.emissiveTexture,t):void 0,f=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,d=null!=e.material?e.material:-1;o={alphaMode:n.alphaMode,alphaCutoff:n.alphaCutoff,color:s.baseColorFactor,doubleSided:!!n.doubleSided,colorTexture:await i,normalTexture:await u,name:n.name,id:d,occlusionTexture:await l,emissiveTexture:await c,emissiveFactor:n.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await f,hasVertexColors:a,ESRI_externalColorMixMode:n.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:n.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:n.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:n.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform,receiveAmbientOcclusion:n.extras.ESRI_receiveAmbientOcclusion,receiveShadows:n.extras.ESRI_receiveShadows}}return o}async getTexture(e,t){if(!e)return;if(0!==(e.texCoord||0))throw new u.A("gltf-loader-unsupported-feature","Only TEXCOORD with index 0 is supported.");const r=e.index,o=this.json.textures[r],n=(c=null!=o.sampler?this.json.samplers[o.sampler]:{},{...S,...c}),s=F(o),a=this.json.images[s],i=await this._loadTextureImageData(r,o,t);var c;return(0,l.tE)(this._textureCache,r,(()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>{throw new u.A("gltf-loader-error",`Unexpected TextureSampler WrapMode: ${e}`)};return{data:i,wrapS:e(n.wrapS)?n.wrapS:t(n.wrapS),wrapT:e(n.wrapT)?n.wrapT:t(n.wrapT),minFilter:n.minFilter,name:a.name,id:r}}))}getNodeTransform(e){if(void 0===e)return N;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),o=this.json.nodes[e];o.matrix?t=(0,p.lw)((0,a.vt)(),r,o.matrix):o.translation||o.rotation||o.scale?(t=(0,a.o8)(r),o.translation&&(0,p.Tl)(t,t,o.translation),o.rotation&&(C[3]=(0,h.Xd)(C,o.rotation),(0,p.e$)(t,t,C[3],C)),o.scale&&(0,p.hs)(t,t,o.scale)):t=(0,a.o8)(r),this._nodeTransformCache.set(e,t)}return t}_resolveUri(e){return(0,f.s2)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=d.R.parse(this.json.asset.version,"glTF");v.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json;if(e.extensionsRequired&&!e.extensionsRequired.every((e=>this._supportedExtensions.includes(e))))throw new u.A("gltf-loader-unsupported-feature","gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach(((e,t)=>{e.children&&e.children.forEach((e=>{this._nodeParentMap.set(e,t)}))}))}async _loadTextureImageData(e,t,r){const o=this._textureLoaders.get(e);if(o)return o;const n=this._createTextureLoader(t,r);return this._textureLoaders.set(e,n),n}async _createTextureLoader(e,t){const r=F(e),o=this.json.images[r];if(o.uri){if(o.uri.endsWith(".ktx2")){const e=await this._context.loadBinary(this._resolveUri(o.uri),t);return new R.Xi(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(o.uri),t)}if(null==o.bufferView)throw new u.A("gltf-loader-unsupported-feature","Image bufferView must be defined.");if(null==o.mimeType)throw new u.A("gltf-loader-unsupported-feature","Image mimeType must be defined.");const n=this.json.bufferViews[o.bufferView],s=await this.getBuffer(n.buffer,t);if(null!=n.byteStride)throw new u.A("gltf-loader-unsupported-feature","byteStride not supported for image buffer");const a=s.byteOffset+(n.byteOffset||0);return(0,R.pn)(new Uint8Array(s.buffer,a,n.byteLength),o.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await(0,c.nA)(Array.from(this._bufferLoaders.values())),t=await(0,c.nA)(Array.from(this._textureLoaders.values()));return e.reduce(((e,t)=>e+(t?.byteLength??0)),0)+t.reduce(((e,t)=>e+(t?(0,R.x3)(t)?t.data.byteLength:t.width*t.height*4:0)),0)}}const N=(0,p.hM)((0,a.vt)(),Math.PI/2),v=new d.R(2,0,"glTF"),C=(0,m.vt)(),M={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},I={[i.pe.BYTE]:1,[i.pe.UNSIGNED_BYTE]:1,[i.pe.SHORT]:2,[i.pe.UNSIGNED_SHORT]:2,[i.pe.HALF_FLOAT]:2,[i.pe.FLOAT]:4,[i.pe.INT]:4,[i.pe.UNSIGNED_INT]:4};function L(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}function F(e){if(null!=e.extensions?.KHR_texture_basisu)return e.extensions.KHR_texture_basisu.source;if(null!==e.source)return e.source;throw new u.A("gltf-loader-unsupported-feature","Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.")}const U=/\.gltf$/i,D=/\.glb$/i;let B=0;async function P(e,t,r={},o=!0){const n=await O.load(e,t,r),u="gltf_"+B++,l={lods:[],materials:new Map,textures:new Map,meta:G(n)},c=!(!n.json.asset.extras||"symbolResource"!==n.json.asset.extras.ESRI_type),f=n.json.asset.extras?.ESRI_webstyleSymbol?.webstyle,d=new Map;await j(n,(async(e,t,c,f)=>{const p=d.get(c)??0;d.set(c,p+1);const h=void 0!==e.mode?e.mode:i.WR.TRIANGLES,m=h===i.WR.TRIANGLES||h===i.WR.TRIANGLE_STRIP||h===i.WR.TRIANGLE_FAN?h:null;if(null==m)return void s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+i.WR[h]+"). Skipping primitive.");if(!n.hasPositions(e))return void s.A.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const T=n.getPositionData(e,r),w=n.getMaterial(e,r,o),g=n.hasNormals(e)?n.getNormalData(e,r):null,x=n.hasTangents(e)?n.getTangentData(e,r):null,b=n.hasTextureCoordinates(e)?n.getTextureCoordinates(e,r):null,y=n.hasVertexColors(e)?n.getVertexColors(e,r):null,_=n.getIndexData(e,r),A={name:f,transform:(0,a.o8)(t),attributes:{position:await T,normal:g?await g:null,texCoord0:b?await b:null,color:y?await y:null,tangent:x?await x:null},indices:await _,primitiveType:m,material:k(l,await w,u)};let S=null;null!=l.meta?.ESRI_lod&&"screenSpaceRadius"===l.meta.ESRI_lod.metric&&(S=l.meta.ESRI_lod.thresholds[c]),l.lods[c]=l.lods[c]||{parts:[],name:f,lodThreshold:S},l.lods[c].parts[p]=A}));for(const e of l.lods)e.parts=e.parts.filter((e=>!!e));const p=await n.getLoadedBuffersSize();return{model:l,meta:{isEsriSymbolResource:c,uri:n.uri,ESRI_webstyle:f},customMeta:{},cachedMemory:p}}function G(e){const t=e.json;let r=null;return t.nodes.forEach((e=>{const t=e.extras;null!=t&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)})),r}async function j(e,t){const r=e.json,o=r.scenes[r.scene||0].nodes,n=o.length>1,a=[];for(const e of o){const t=r.nodes[e];a.push(i(e,0)),V(t)&&!n&&t.extensions.MSFT_lod.ids.forEach(((e,t)=>i(e,t+1)))}async function i(o,n){const u=r.nodes[o],l=e.getNodeTransform(o);if(null!=u.weights&&s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=u.mesh){const e=r.meshes[u.mesh];for(const r of e.primitives)a.push(t(r,l,n,e.name))}for(const e of u.children||[])a.push(i(e,n))}await Promise.all(a)}function V(e){return e.extensions?.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function k(e,t,r){const o=t=>{const o=`${r}_tex_${t&&t.id}${t?.name?"_"+t.name:""}`;if(t&&!e.textures.has(o)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:i.pF.REPEAT,t:i.pF.REPEAT,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:H.has(t.minFilter),noUnpackFlip:!0});e.textures.set(o,r)}return o},n=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(n)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclustion:!0,colorTexture:null,normalTexture:null,occlusionTexture:null,emissiveTexture:null,metallicRoughnessTexture:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,colorTexture:t.colorTexture?o(t.colorTexture):void 0,normalTexture:t.normalTexture?o(t.normalTexture):void 0,occlusionTexture:t.occlusionTexture?o(t.occlusionTexture):void 0,emissiveTexture:t.emissiveTexture?o(t.emissiveTexture):void 0,metallicRoughnessTexture:t.metallicRoughnessTexture?o(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor,receiveShadows:t.receiveShadows,receiveAmbientOcclustion:t.receiveAmbientOcclusion});e.materials.set(n,r)}return n}const H=new Set([i.Cj.LINEAR_MIPMAP_LINEAR,i.Cj.LINEAR_MIPMAP_NEAREST])},24045:(e,t,r)=>{function o(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let o=0;o<r;o++)t[o]=e.get(o);return t}r.d(t,{m:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,makeDense:o},Symbol.toStringTag,{value:"Module"}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4399],{4399:(e,t,r)=>{r.d(t,{loadGLTF:()=>P});var o,n,s=r(53966),a=r(9093),i=r(63907),u=r(49186),l=r(91869),c=r(74887),f=r(84952),d=r(46140),p=r(58083),h=r(67026),m=r(82534),T=r(13030),w=r(24045);r(44208);class g{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}!function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(o||(o={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(n||(n={}));var x=r(21818);const b={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},y={pbrMetallicRoughness:b,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},_={ESRI_externalColorMixMode:"tint",ESRI_receiveShadows:!0,ESRI_receiveAmbientOcclusion:!0},A=(e={})=>{const t={...b,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,x.Xb)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({..._,...e.extras});return{...y,...e,pbrMetallicRoughness:t,extras:r}},S={magFilter:i.Cj.LINEAR,minFilter:i.Cj.LINEAR_MIPMAP_LINEAR,wrapS:i.pF.REPEAT,wrapT:i.pF.REPEAT};var R=r(51530);const E=1179937895;class O{constructor(e,t,r,o){if(this._context=e,this.uri=t,this.json=r,this._glbBuffer=o,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=["KHR_texture_basisu","KHR_texture_transform"],this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,((e,o,n)=>(t=o||"",r=n||"",""))),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),null==r.scenes)throw new u.A("gltf-loader-unsupported-feature","Scenes must be defined.");if(null==r.meshes)throw new u.A("gltf-loader-unsupported-feature","Meshes must be defined");if(null==r.nodes)throw new u.A("gltf-loader-unsupported-feature","Nodes must be defined.");this._computeNodeParents()}static async load(e,t,r){if((0,f.DB)(t)){const r=(0,f.r$)(t);if(r&&"model/gltf-binary"!==r.mediaType)try{const o=JSON.parse(r.isBase64?atob(r.data):r.data);return new O(e,t,o)}catch{}const o=(0,f.lJ)(t);if(O._isGLBData(o))return this._fromGLBData(e,t,o)}if(U.test(t)||"gltf"===r?.expectedType){const o=await e.loadJSON(t,r);return new O(e,t,o)}const o=await e.loadBinary(t,r);if(O._isGLBData(o))return this._fromGLBData(e,t,o);if(D.test(t)||"glb"===r?.expectedType)throw new u.A("gltf-loader-invalid-glb","This is not a valid glb file.");const n=await e.loadJSON(t,r);return new O(e,t,n)}static _isGLBData(e){if(null==e)return!1;const t=new g(e);return t.remainingBytes()>=4&&t.readUint32()===E}static async _fromGLBData(e,t,r){const o=await O._parseGLBData(r);return new O(e,t,o.json,o.binaryData)}static async _parseGLBData(e){const t=new g(e);if(t.remainingBytes()<12)throw new u.A("gltf-loader-error","glb binary data is insufficiently large.");const r=t.readUint32(),o=t.readUint32(),n=t.readUint32();if(r!==E)throw new u.A("gltf-loader-error","Magic first 4 bytes do not fit to expected glb value.");if(e.byteLength<n)throw new u.A("gltf-loader-error","glb binary data is smaller than header specifies.");if(2!==o)throw new u.A("gltf-loader-unsupported-feature","An unsupported glb container version was detected. Only version 2 is supported.");let a,i,l=0;for(;t.remainingBytes()>=8;){const e=t.readUint32(),r=t.readUint32();if(0===l){if(1313821514!==r)throw new u.A("gltf-loader-error","First glb chunk must be JSON.");if(e<0)throw new u.A("gltf-loader-error","No JSON data found.");a=await(0,R.KB)(t.readUint8Array(e))}else if(1===l){if(5130562!==r)throw new u.A("gltf-loader-unsupported-feature","Second glb chunk expected to be BIN.");i=t.readUint8Array(e)}else s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] More than 2 glb chunks detected. Skipping.");l+=1}if(!a)throw new u.A("gltf-loader-error","No glb JSON chunk detected.");return{json:a,binaryData:i}}async getBuffer(e,t){const r=this.json.buffers[e];if(null==r.uri){if(null==this._glbBuffer)throw new u.A("gltf-loader-error","glb buffer not present");return this._glbBuffer}const o=await this._getBufferLoader(e,t);if(o.byteLength!==r.byteLength)throw new u.A("gltf-loader-error","Buffer byte lengths should match.");return o}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const o=this.json.buffers[e].uri,n=this._context.loadBinary(this._resolveUri(o),t).then((e=>new Uint8Array(e)));return this._bufferLoaders.set(e,n),n}async getAccessor(e,t){if(!this.json.accessors)throw new u.A("gltf-loader-unsupported-feature","Accessors missing.");const r=this.json.accessors[e];if(null==r?.bufferView)throw new u.A("gltf-loader-unsupported-feature","Some accessor does not specify a bufferView.");if(r.type in[o.MAT2,o.MAT3,o.MAT4])throw new u.A("gltf-loader-unsupported-feature",`AttributeType ${r.type} is not supported`);const n=this.json.bufferViews[r.bufferView],s=await this.getBuffer(n.buffer,t),a=M[r.type],i=I[r.componentType],l=a*i,c=n.byteStride||l;return{raw:s.buffer,byteStride:c,byteOffset:s.byteOffset+(n.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:c===l,componentCount:a,componentByteSize:i,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t){if(null==e.indices)return;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case i.pe.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case i.pe.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case i.pe.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case i.pe.UNSIGNED_BYTE:return(0,w.m)(L(T.SL,r));case i.pe.UNSIGNED_SHORT:return(0,w.m)(L(T.h,r));case i.pe.UNSIGNED_INT:return(0,w.m)(L(T.P,r))}}async getPositionData(e,t){if(null==e.attributes.POSITION)throw new u.A("gltf-loader-unsupported-feature","No POSITION vertex data found.");const r=await this.getAccessor(e.attributes.POSITION,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for POSITION vertex attribute, but found "+i.pe[r.componentType]);if(3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","POSITION vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return L(T.xs,r)}async getNormalData(e,t){if(null==e.attributes.NORMAL)throw new u.A("gltf-loader-error","No NORMAL vertex data found.");const r=await this.getAccessor(e.attributes.NORMAL,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for NORMAL vertex attribute, but found "+i.pe[r.componentType]);if(3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","NORMAL vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return L(T.xs,r)}async getTangentData(e,t){if(null==e.attributes.TANGENT)throw new u.A("gltf-loader-error","No TANGENT vertex data found.");const r=await this.getAccessor(e.attributes.TANGENT,t);if(r.componentType!==i.pe.FLOAT)throw new u.A("gltf-loader-unsupported-feature","Expected type FLOAT for TANGENT vertex attribute, but found "+i.pe[r.componentType]);if(4!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","TANGENT vertex attribute must have 4 components, but found "+r.componentCount.toFixed());return L(T.Eq,r)}async getTextureCoordinates(e,t){if(null==e.attributes.TEXCOORD_0)throw new u.A("gltf-loader-error","No TEXCOORD_0 vertex data found.");const r=await this.getAccessor(e.attributes.TEXCOORD_0,t);if(2!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","TEXCOORD_0 vertex attribute must have 2 components, but found "+r.componentCount.toFixed());if(r.componentType===i.pe.FLOAT)return L(T.gH,r);if(!r.normalized)throw new u.A("gltf-loader-unsupported-feature","Integer component types are only supported for a normalized accessor for TEXCOORD_0.");return function(e){switch(e.componentType){case i.pe.BYTE:return new T.D6(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_BYTE:return new T.LC(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.SHORT:return new T.mJ(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_SHORT:return new T.Yi(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.UNSIGNED_INT:return new T.An(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.pe.FLOAT:return new T.gH(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(r)}async getVertexColors(e,t){if(null==e.attributes.COLOR_0)throw new u.A("gltf-loader-error","No COLOR_0 vertex data found.");const r=await this.getAccessor(e.attributes.COLOR_0,t);if(4!==r.componentCount&&3!==r.componentCount)throw new u.A("gltf-loader-unsupported-feature","COLOR_0 attribute must have 3 or 4 components, but found "+r.componentCount.toFixed());if(4===r.componentCount){if(r.componentType===i.pe.FLOAT)return L(T.Eq,r);if(r.componentType===i.pe.UNSIGNED_BYTE)return L(T.XP,r);if(r.componentType===i.pe.UNSIGNED_SHORT)return L(T.Uz,r)}else if(3===r.componentCount){if(r.componentType===i.pe.FLOAT)return L(T.xs,r);if(r.componentType===i.pe.UNSIGNED_BYTE)return L(T.eI,r);if(r.componentType===i.pe.UNSIGNED_SHORT)return L(T.nS,r)}throw new u.A("gltf-loader-unsupported-feature","Unsupported component type for COLOR_0 attribute: "+i.pe[r.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let o=e.material?this._materialCache.get(e.material):void 0;if(!o){const n=null!=e.material?A(this.json.materials[e.material]):A(),s=n.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(n.normalTexture,t),l=r?this.getTexture(n.occlusionTexture,t):void 0,c=r?this.getTexture(n.emissiveTexture,t):void 0,f=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,d=null!=e.material?e.material:-1;o={alphaMode:n.alphaMode,alphaCutoff:n.alphaCutoff,color:s.baseColorFactor,doubleSided:!!n.doubleSided,colorTexture:await i,normalTexture:await u,name:n.name,id:d,occlusionTexture:await l,emissiveTexture:await c,emissiveFactor:n.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await f,hasVertexColors:a,ESRI_externalColorMixMode:n.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:n.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:n.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:n.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform,receiveAmbientOcclusion:n.extras.ESRI_receiveAmbientOcclusion,receiveShadows:n.extras.ESRI_receiveShadows}}return o}async getTexture(e,t){if(!e)return;if(0!==(e.texCoord||0))throw new u.A("gltf-loader-unsupported-feature","Only TEXCOORD with index 0 is supported.");const r=e.index,o=this.json.textures[r],n=(c=null!=o.sampler?this.json.samplers[o.sampler]:{},{...S,...c}),s=F(o),a=this.json.images[s],i=await this._loadTextureImageData(r,o,t);var c;return(0,l.tE)(this._textureCache,r,(()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>{throw new u.A("gltf-loader-error",`Unexpected TextureSampler WrapMode: ${e}`)};return{data:i,wrapS:e(n.wrapS)?n.wrapS:t(n.wrapS),wrapT:e(n.wrapT)?n.wrapT:t(n.wrapT),minFilter:n.minFilter,name:a.name,id:r}}))}getNodeTransform(e){if(void 0===e)return N;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),o=this.json.nodes[e];o.matrix?t=(0,p.lw)((0,a.vt)(),r,o.matrix):o.translation||o.rotation||o.scale?(t=(0,a.o8)(r),o.translation&&(0,p.Tl)(t,t,o.translation),o.rotation&&(C[3]=(0,h.Xd)(C,o.rotation),(0,p.e$)(t,t,C[3],C)),o.scale&&(0,p.hs)(t,t,o.scale)):t=(0,a.o8)(r),this._nodeTransformCache.set(e,t)}return t}_resolveUri(e){return(0,f.s2)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=d.R.parse(this.json.asset.version,"glTF");v.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json;if(e.extensionsRequired&&!e.extensionsRequired.every((e=>this._supportedExtensions.includes(e))))throw new u.A("gltf-loader-unsupported-feature","gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach(((e,t)=>{e.children&&e.children.forEach((e=>{this._nodeParentMap.set(e,t)}))}))}async _loadTextureImageData(e,t,r){const o=this._textureLoaders.get(e);if(o)return o;const n=this._createTextureLoader(t,r);return this._textureLoaders.set(e,n),n}async _createTextureLoader(e,t){const r=F(e),o=this.json.images[r];if(o.uri){if(o.uri.endsWith(".ktx2")){const e=await this._context.loadBinary(this._resolveUri(o.uri),t);return new R.Xi(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(o.uri),t)}if(null==o.bufferView)throw new u.A("gltf-loader-unsupported-feature","Image bufferView must be defined.");if(null==o.mimeType)throw new u.A("gltf-loader-unsupported-feature","Image mimeType must be defined.");const n=this.json.bufferViews[o.bufferView],s=await this.getBuffer(n.buffer,t);if(null!=n.byteStride)throw new u.A("gltf-loader-unsupported-feature","byteStride not supported for image buffer");const a=s.byteOffset+(n.byteOffset||0);return(0,R.pn)(new Uint8Array(s.buffer,a,n.byteLength),o.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await(0,c.nA)(Array.from(this._bufferLoaders.values())),t=await(0,c.nA)(Array.from(this._textureLoaders.values()));return e.reduce(((e,t)=>e+(t?.byteLength??0)),0)+t.reduce(((e,t)=>e+(t?(0,R.x3)(t)?t.data.byteLength:t.width*t.height*4:0)),0)}}const N=(0,p.hM)((0,a.vt)(),Math.PI/2),v=new d.R(2,0,"glTF"),C=(0,m.vt)(),M={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},I={[i.pe.BYTE]:1,[i.pe.UNSIGNED_BYTE]:1,[i.pe.SHORT]:2,[i.pe.UNSIGNED_SHORT]:2,[i.pe.HALF_FLOAT]:2,[i.pe.FLOAT]:4,[i.pe.INT]:4,[i.pe.UNSIGNED_INT]:4};function L(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}function F(e){if(null!=e.extensions?.KHR_texture_basisu)return e.extensions.KHR_texture_basisu.source;if(null!==e.source)return e.source;throw new u.A("gltf-loader-unsupported-feature","Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.")}const U=/\.gltf$/i,D=/\.glb$/i;let B=0;async function P(e,t,r={},o=!0){const n=await O.load(e,t,r),u="gltf_"+B++,l={lods:[],materials:new Map,textures:new Map,meta:G(n)},c=!(!n.json.asset.extras||"symbolResource"!==n.json.asset.extras.ESRI_type),f=n.json.asset.extras?.ESRI_webstyleSymbol?.webstyle,d=new Map;await j(n,(async(e,t,c,f)=>{const p=d.get(c)??0;d.set(c,p+1);const h=void 0!==e.mode?e.mode:i.WR.TRIANGLES,m=h===i.WR.TRIANGLES||h===i.WR.TRIANGLE_STRIP||h===i.WR.TRIANGLE_FAN?h:null;if(null==m)return void s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+i.WR[h]+"). Skipping primitive.");if(!n.hasPositions(e))return void s.A.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const T=n.getPositionData(e,r),w=n.getMaterial(e,r,o),g=n.hasNormals(e)?n.getNormalData(e,r):null,x=n.hasTangents(e)?n.getTangentData(e,r):null,b=n.hasTextureCoordinates(e)?n.getTextureCoordinates(e,r):null,y=n.hasVertexColors(e)?n.getVertexColors(e,r):null,_=n.getIndexData(e,r),A={name:f,transform:(0,a.o8)(t),attributes:{position:await T,normal:g?await g:null,texCoord0:b?await b:null,color:y?await y:null,tangent:x?await x:null},indices:await _,primitiveType:m,material:k(l,await w,u)};let S=null;null!=l.meta?.ESRI_lod&&"screenSpaceRadius"===l.meta.ESRI_lod.metric&&(S=l.meta.ESRI_lod.thresholds[c]),l.lods[c]=l.lods[c]||{parts:[],name:f,lodThreshold:S},l.lods[c].parts[p]=A}));for(const e of l.lods)e.parts=e.parts.filter((e=>!!e));const p=await n.getLoadedBuffersSize();return{model:l,meta:{isEsriSymbolResource:c,uri:n.uri,ESRI_webstyle:f},customMeta:{},cachedMemory:p}}function G(e){const t=e.json;let r=null;return t.nodes.forEach((e=>{const t=e.extras;null!=t&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)})),r}async function j(e,t){const r=e.json,o=r.scenes[r.scene||0].nodes,n=o.length>1,a=[];for(const e of o){const t=r.nodes[e];a.push(i(e,0)),V(t)&&!n&&t.extensions.MSFT_lod.ids.forEach(((e,t)=>i(e,t+1)))}async function i(o,n){const u=r.nodes[o],l=e.getNodeTransform(o);if(null!=u.weights&&s.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=u.mesh){const e=r.meshes[u.mesh];for(const r of e.primitives)a.push(t(r,l,n,e.name))}for(const e of u.children||[])a.push(i(e,n))}await Promise.all(a)}function V(e){return e.extensions?.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function k(e,t,r){const o=t=>{const o=`${r}_tex_${t&&t.id}${t?.name?"_"+t.name:""}`;if(t&&!e.textures.has(o)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:i.pF.REPEAT,t:i.pF.REPEAT,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:H.has(t.minFilter),noUnpackFlip:!0});e.textures.set(o,r)}return o},n=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(n)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclusion:!0,colorTexture:null,normalTexture:null,occlusionTexture:null,emissiveTexture:null,metallicRoughnessTexture:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,colorTexture:t.colorTexture?o(t.colorTexture):void 0,normalTexture:t.normalTexture?o(t.normalTexture):void 0,occlusionTexture:t.occlusionTexture?o(t.occlusionTexture):void 0,emissiveTexture:t.emissiveTexture?o(t.emissiveTexture):void 0,metallicRoughnessTexture:t.metallicRoughnessTexture?o(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor,receiveShadows:t.receiveShadows,receiveAmbientOcclusion:t.receiveAmbientOcclusion});e.materials.set(n,r)}return n}const H=new Set([i.Cj.LINEAR_MIPMAP_LINEAR,i.Cj.LINEAR_MIPMAP_NEAREST])},24045:(e,t,r)=>{function o(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let o=0;o<r;o++)t[o]=e.get(o);return t}r.d(t,{m:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,makeDense:o},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,6061,8125,9041],{68613:(e,t,n)=>{n.d(t,{fz:()=>y,g7:()=>h,zo:()=>p});var r=n(76061),o=n(55537),s=n(83661),i=n(35368),a=n(79187),u=n(95213),c=n(12189);function m(e,t,n,r){const o=e.getImpl().getAttributeStreamRef(0),i=e.getPointCount(),c=t.getXY(),m=e.createInstance(),l=(0,u.d)(n),f=new a.Envelope2D;if(e.queryEnvelope(f),f.inflateCoords(l,l),f.contains(c)){const n=l*l;let r=!1;const a=(0,s.d)(i,!1);for(let e=0;e<i;e++){const t=o.read(2*e),s=o.read(2*e+1),i=t-c.x,u=s-c.y;i*i+u*u<=n&&(r=!0,a[e]=!0)}if(r)for(let t=0;t<i;t++)a[t]||m.addPoints(e,t,t+1);else m.addPoints(e,0,i),m.add(t)}else m.addPoints(e,0,i),m.add(t);return m}class l extends r.G{constructor(e,t,n,r){super(),this.m_progressTracker=r,this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=n,this.m_rightGeom=t.next(),this.m_bEmpty=!this.m_rightGeom,(0,o.d)(this.m_rightGeom)}tock(){return!0}getRank(){return 1}next(){if(this.m_bEmpty)return null;const e=this.m_inputGeoms.next();return e?((0,o.d)(e),this.m_index=this.m_inputGeoms.getGeometryID(),function(e,t,n,r){const l=e.getDimension(),f=t.getDimension();if(l!==f)return l>f?e:t;if(e.isEmpty())return t;if(t.isEmpty())return e;const h=new a.Envelope2D,p=new a.Envelope2D,y=new a.Envelope2D;e.queryEnvelope(h),t.queryEnvelope(p),y.setCoords({env2D:h}),y.mergeEnvelope2D(p);const g=(0,u.a)(n,y,!0),G=e.getGeometryType(),d=t.getGeometryType();return G===o.G.enumPoint&&d===o.G.enumPoint?function(e,t,n){const r=(0,u.d)(n),o=r*r,a=e.getXY(),c=t.getXY(),m=new i.M({vd:e.getDescription()});return s.P.sqrDistance(a,c)>o&&(m.add(e),m.add(t)),m}(e,t,g):G===o.G.enumPoint&&d===o.G.enumMultiPoint?m(t,e,g):G===o.G.enumMultiPoint&&d===o.G.enumPoint?m(e,t,g):(0,c.ak)(e,t,n,r)}(e,this.m_rightGeom,this.m_spatialReference,this.m_progressTracker)):null}getGeometryID(){return this.m_index}}const f=new class{getOperatorType(){return 10003}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,r){return new l(e,t,n,r)}execute(e,t,n,s){const i=new r.S([e]),a=new r.S([t]),u=this.executeMany(i,a,n,s).next();return u||(0,o.c)("null output"),u}};function h(e,t,n){return f.execute(e,t,n,null)}function p(e,t,n){const o=f.executeMany(new r.S(e),new r.S([t]),n,null);return Array.from(o)}function y(){return f.supportsCurves()}},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>o});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class o extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>x,fromGeometry:()=>d,fromMultipoint:()=>C,fromPoint:()=>v,fromPolygon:()=>M,fromPolyline:()=>w,fromSpatialReference:()=>P,getSpatialReference:()=>G,toExtent:()=>R,toGeometry:()=>_,toMultipoint:()=>E,toPoint:()=>V,toPolygon:()=>S,toPolyline:()=>D});var r=n(83661),o=(n(79187),n(55537)),s=n(95213),i=n(35368),a=n(12189),u=n(5443),c=n(48526),m=n(86738),l=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",y=2,g=1;function G(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function d(e){switch(e.type){case"point":return v(e);case"multipoint":return C(e);case"polyline":return w(e);case"polygon":return M(e);case"extent":return x(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(p)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function C(e){if(!e.getCacheValue(p)){const t=new i.M,n=new s.P,r=e.points,o=e.hasM,a=e.hasZ,u=a?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),a&&n.setZ(s[2]??0),o&&n.setM(s[u]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:o}=e,s=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:o});e.setCacheValue(p,s)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:o}=e,s=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:o});e.setCacheValue(p,s)}return e.getCacheValue(p)}function P(e){if(e.wkid)return(0,a.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,a.b)(t):null}function _(e,t){if(e)switch(e.getGeometryType()){case o.G.enumPoint:return V(e,t);case o.G.enumEnvelope:return R(e,t);case o.G.enumMultiPoint:return E(e,t);case o.G.enumPolyline:return D(e,t);case o.G.enumPolygon:return S(e,t)}return null}function R(e,t){if(e.isEmpty())return null;const n=new u.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(g,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function E(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),o=n.hasZ(),i=[],a=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,a);const n=[a.getX(),a.getY()];o&&n.push(a.getZ()),r&&n.push(a.getM()),i.push(n)}const u=new c.A({hasM:r,hasZ:o,points:i,spatialReference:t});return u.setCacheValue(p,e),u}function V(e,t){if(e instanceof r.P)return new m.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new m.A({x:e.getX(),y:e.getY(),spatialReference:t}),o=e.getDescription();return o.hasM()&&(n.m=e.getM()),o.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function S(e,t){if(e.isEmpty())return null;const n=l.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function D(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}},89041:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>r.e,executeMany:()=>r.a,supportsCurves:()=>r.b}),n(4576),n(68613),n(78125);var r=n(96957)},96957:(e,t,n)=>{n.d(t,{a:()=>a,b:()=>u,e:()=>i,s:()=>c});var r=n(4576),o=n(68613),s=n(78125);function i(e,t){const n=(0,s.getSpatialReference)(e);return(0,s.toGeometry)((0,o.g7)((0,s.fromGeometry)(e),(0,s.fromGeometry)(t),(0,s.fromSpatialReference)(n)),n)}function a(e,t){const n=e.map(s.fromGeometry),i=(0,s.getSpatialReference)(e);return(0,o.zo)(n,(0,s.fromGeometry)(t),(0,s.fromSpatialReference)(i)).map((e=>(0,s.toGeometry)(e,i))).filter(r.Ru)}const u=(0,o.fz)(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:i,executeMany:a,supportsCurves:u},Symbol.toStringTag,{value:"Module"}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,6061,8125,9041],{68613:(e,t,n)=>{n.d(t,{fz:()=>y,g7:()=>h,zo:()=>p});var r=n(76061),o=n(55537),s=n(83661),i=n(35368),a=n(79187),u=n(95213),c=n(12189);function m(e,t,n,r){const o=e.getImpl().getAttributeStreamRef(0),i=e.getPointCount(),c=t.getXY(),m=e.createInstance(),l=(0,u.e)(n),f=new a.Envelope2D;if(e.queryEnvelope(f),f.inflateCoords(l,l),f.contains(c)){const n=l*l;let r=!1;const a=(0,s.d)(i,!1);for(let e=0;e<i;e++){const t=o.read(2*e),s=o.read(2*e+1),i=t-c.x,u=s-c.y;i*i+u*u<=n&&(r=!0,a[e]=!0)}if(r)for(let t=0;t<i;t++)a[t]||m.addPoints(e,t,t+1);else m.addPoints(e,0,i),m.add(t)}else m.addPoints(e,0,i),m.add(t);return m}class l extends r.G{constructor(e,t,n,r){super(),this.m_progressTracker=r,this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=n,this.m_rightGeom=t.next(),this.m_bEmpty=!this.m_rightGeom,(0,o.d)(this.m_rightGeom)}tock(){return!0}getRank(){return 1}next(){if(this.m_bEmpty)return null;const e=this.m_inputGeoms.next();return e?((0,o.d)(e),this.m_index=this.m_inputGeoms.getGeometryID(),function(e,t,n,r){const l=e.getDimension(),f=t.getDimension();if(l!==f)return l>f?e:t;if(e.isEmpty())return t;if(t.isEmpty())return e;const h=new a.Envelope2D,p=new a.Envelope2D,y=new a.Envelope2D;e.queryEnvelope(h),t.queryEnvelope(p),y.setCoords({env2D:h}),y.mergeEnvelope2D(p);const g=(0,u.c)(n,y,!0),G=e.getGeometryType(),x=t.getGeometryType();return G===o.G.enumPoint&&x===o.G.enumPoint?function(e,t,n){const r=(0,u.e)(n),o=r*r,a=e.getXY(),c=t.getXY(),m=new i.M({vd:e.getDescription()});return s.P.sqrDistance(a,c)>o&&(m.add(e),m.add(t)),m}(e,t,g):G===o.G.enumPoint&&x===o.G.enumMultiPoint?m(t,e,g):G===o.G.enumMultiPoint&&x===o.G.enumPoint?m(e,t,g):(0,c.ak)(e,t,n,r)}(e,this.m_rightGeom,this.m_spatialReference,this.m_progressTracker)):null}getGeometryID(){return this.m_index}}const f=new class{getOperatorType(){return 10003}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,r){return new l(e,t,n,r)}execute(e,t,n,s){const i=new r.S([e]),a=new r.S([t]),u=this.executeMany(i,a,n,s).next();return u||(0,o.c)("null output"),u}};function h(e,t,n){return f.execute(e,t,n,null)}function p(e,t,n){const o=f.executeMany(new r.S(e),new r.S([t]),n,null);return Array.from(o)}function y(){return f.supportsCurves()}},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>o});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class o extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>d,fromGeometry:()=>x,fromMultipoint:()=>C,fromPoint:()=>v,fromPolygon:()=>M,fromPolyline:()=>w,fromSpatialReference:()=>P,getSpatialReference:()=>G,toExtent:()=>R,toGeometry:()=>_,toMultipoint:()=>E,toPoint:()=>V,toPolygon:()=>S,toPolyline:()=>D});var r=n(83661),o=(n(79187),n(55537)),s=n(95213),i=n(35368),a=n(12189),u=n(5443),c=n(48526),m=n(86738),l=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",y=2,g=1;function G(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function x(e){switch(e.type){case"point":return v(e);case"multipoint":return C(e);case"polyline":return w(e);case"polygon":return M(e);case"extent":return d(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function d(e){if(!e.getCacheValue(p)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function C(e){if(!e.getCacheValue(p)){const t=new i.M,n=new s.P,r=e.points,o=e.hasM,a=e.hasZ,u=a?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),a&&n.setZ(s[2]??0),o&&n.setM(s[u]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:o}=e,s=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:o});e.setCacheValue(p,s)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:o}=e,s=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:o});e.setCacheValue(p,s)}return e.getCacheValue(p)}function P(e){if(e.wkid)return(0,a.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,a.a)(t):null}function _(e,t){if(e)switch(e.getGeometryType()){case o.G.enumPoint:return V(e,t);case o.G.enumEnvelope:return R(e,t);case o.G.enumMultiPoint:return E(e,t);case o.G.enumPolyline:return D(e,t);case o.G.enumPolygon:return S(e,t)}return null}function R(e,t){if(e.isEmpty())return null;const n=new u.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(g,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function E(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),o=n.hasZ(),i=[],a=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,a);const n=[a.getX(),a.getY()];o&&n.push(a.getZ()),r&&n.push(a.getM()),i.push(n)}const u=new c.A({hasM:r,hasZ:o,points:i,spatialReference:t});return u.setCacheValue(p,e),u}function V(e,t){if(e instanceof r.P)return new m.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new m.A({x:e.getX(),y:e.getY(),spatialReference:t}),o=e.getDescription();return o.hasM()&&(n.m=e.getM()),o.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function S(e,t){if(e.isEmpty())return null;const n=l.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function D(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}},89041:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>r.e,executeMany:()=>r.a,supportsCurves:()=>r.b}),n(4576),n(68613),n(78125);var r=n(96957)},96957:(e,t,n)=>{n.d(t,{a:()=>a,b:()=>u,e:()=>i,s:()=>c});var r=n(4576),o=n(68613),s=n(78125);function i(e,t){const n=(0,s.getSpatialReference)(e);return(0,s.toGeometry)((0,o.g7)((0,s.fromGeometry)(e),(0,s.fromGeometry)(t),(0,s.fromSpatialReference)(n)),n)}function a(e,t){const n=e.map(s.fromGeometry),i=(0,s.getSpatialReference)(e);return(0,o.zo)(n,(0,s.fromGeometry)(t),(0,s.fromSpatialReference)(i)).map((e=>(0,s.toGeometry)(e,i))).filter(r.Ru)}const u=(0,o.fz)(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:i,executeMany:a,supportsCurves:u},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6061,6339],{28298:(e,t,n)=>{n.d(t,{fz:()=>i,g7:()=>m,zo:()=>u});var r=n(76061),o=(n(55537),n(83661),n(35368),n(79187),n(12189));n(95213);const s=new o.h;function m(e,t,n){return s.execute(e,t,n,null)}function u(e,t){return s.executeMany(new r.S(e),t,null).next()}function i(){return s.supportsCurves()}},56339:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>s,executeMany:()=>m});var r=n(28298),o=n(83299);function s(e,t){const n=(0,o.fromGeometry)(e),s=n.getSpatialReference();return(0,o.toGeometry)((0,r.g7)(n.getGeometry(),(0,o.fromGeometryToGXGeometry)(t),s),s)}function m(e){const[t,n]=(0,o.fromGeometries)(e);return(0,o.toGeometry)((0,r.zo)(t,n),n)}},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>o});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class o extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6061,6339],{28298:(e,t,n)=>{n.d(t,{fz:()=>i,g7:()=>m,zo:()=>u});var r=n(76061),o=(n(55537),n(83661),n(35368),n(79187),n(12189));n(95213);const s=new o.j;function m(e,t,n){return s.execute(e,t,n,null)}function u(e,t){return s.executeMany(new r.S(e),t,null).next()}function i(){return s.supportsCurves()}},56339:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>s,executeMany:()=>m});var r=n(28298),o=n(83299);function s(e,t){const n=(0,o.fromGeometry)(e),s=n.getSpatialReference();return(0,o.toGeometry)((0,r.g7)(n.getGeometry(),(0,o.fromGeometryToGXGeometry)(t),s),s)}function m(e){const[t,n]=(0,o.fromGeometries)(e);return(0,o.toGeometry)((0,r.zo)(t,n),n)}},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>o});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class o extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5356,5613],{4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(1449)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(6213),r.e(2944),r.e(8947),r.e(958),r.e(4654),r.e(2921),r.e(1999)]).then(r.bind(r,88303))).default,CSVLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(9070)]).then(r.bind(r,72256))).default,CatalogLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(4796),r.e(4111),r.e(8506),r.e(364),r.e(8628),r.e(2593),r.e(2696),r.e(4178)]).then(r.bind(r,79003))).default,DimensionLayer:async()=>(await Promise.all([r.e(6131),r.e(3813)]).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(6131),r.e(9953),r.e(9186),r.e(6976)]).then(r.bind(r,68611))).default,FeatureLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(5483)]).then(r.bind(r,13600))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(4927)]).then(r.bind(r,17625))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8389)]).then(r.bind(r,63201))).default,GroupLayer:async()=>(await Promise.all([r.e(6131),r.e(3562),r.e(8256)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1956),r.e(9953),r.e(364),r.e(984),r.e(2439),r.e(272)]).then(r.bind(r,58434))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(9953),r.e(984),r.e(6049),r.e(2439),r.e(7677),r.e(5943)]).then(r.bind(r,35943))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(6131),r.e(9172),r.e(132)]).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(6131),r.e(8947),r.e(9172),r.e(3642)]).then(r.bind(r,74660))).default,KMLLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(5026)]).then(r.bind(r,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(6760),r.e(1806),r.e(7475),r.e(2083),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(6131),r.e(6213),r.e(8596),r.e(9695)]).then(r.bind(r,49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(6760),r.e(1806),r.e(7475),r.e(2083),r.e(1728)]).then(r.bind(r,71728))).default,MapImageLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(4796),r.e(4111),r.e(364),r.e(4341),r.e(7656),r.e(6928)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(7475),r.e(2936)]).then(r.bind(r,96953))).default,MediaLayer:async()=>(await Promise.all([r.e(6131),r.e(2763)]).then(r.bind(r,19647))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(4796),r.e(3029),r.e(2905),r.e(4934)]).then(r.bind(r,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(1010),r.e(349)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(9835)]).then(r.bind(r,97927))).default,PointCloudLayer:async()=>(await Promise.all([r.e(6131),r.e(8948),r.e(8947),r.e(7984),r.e(6528)]).then(r.bind(r,76742))).default,RouteLayer:async()=>(await Promise.all([r.e(6131),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(7634)]).then(r.bind(r,64185))).default,SceneLayer:async()=>(await Promise.all([r.e(6131),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(4796),r.e(6213),r.e(2944),r.e(8947),r.e(958),r.e(4654),r.e(2921),r.e(1737)]).then(r.bind(r,13899))).default,StreamLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(4796),r.e(3029),r.e(505)]).then(r.bind(r,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1956),r.e(4796),r.e(4111),r.e(8506),r.e(1162)]).then(r.bind(r,59929))).default,TileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(4796),r.e(4111),r.e(364),r.e(9186),r.e(4341),r.e(8535)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(9186),r.e(9949),r.e(5013),r.e(5314)]).then(r.bind(r,48757))).default,VideoLayer:async()=>(await r.e(6875).then(r.bind(r,86875))).default,ViewshedLayer:async()=>(await Promise.all([r.e(6131),r.e(6213),r.e(8596),r.e(6650)]).then(r.bind(r,96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(6131),r.e(8948),r.e(8947),r.e(1389)]).then(r.bind(r,16183))).default,WCSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(9953),r.e(984),r.e(6049),r.e(2439),r.e(7677),r.e(9547)]).then(r.bind(r,19547))).default,WFSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(13),r.e(2106),r.e(5055),r.e(6728),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(7396)]).then(r.bind(r,16350))).default,WMSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(8948),r.e(2106),r.e(6728),r.e(1904)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(1010),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(6131),r.e(8219),r.e(1010)]).then(r.bind(r,47314))).default}},8947:(e,a,r)=>{r.d(a,{L:()=>s});var t=r(60999),n=r(74887),i=r(67076);async function s(e,a,r){const s=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(s&&"unique-value"===s.type&&s.styleOrigin){const l=await(0,t.Ke)(s.populateFromStyle());if((0,n.Te)(r),!1===l.ok){const r=l.error;a?.messages&&a.messages.push(new i.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:a})),e.clear("renderer",a?.origin)}}}},10407:(e,a,r)=>{r.d(a,{It:()=>L,LG:()=>s,OM:()=>y,Sm:()=>o,Y:()=>l,bK:()=>c,mm:()=>d,sQ:()=>u});var t=r(80586),n=r(16930),i=r(28735);function s(e,a){if(!l(e,a)){const r=e.typeKeywords;r?r.push(a):e.typeKeywords=[a]}}function l(e,a){return!!e.typeKeywords?.includes(a)}function c(e){return l(e,d.HOSTED_SERVICE)}function y(e,a){const r=e.typeKeywords;if(r){const e=r.indexOf(a);e>-1&&r.splice(e,1)}}function o(e,a,r){r?s(e,a):y(e,a)}async function u(e){const a=e.clone().normalize();let r;if(a.length>1)for(const e of a)r?e.width>r.width&&(r=e):r=e;else r=a[0];return async function(e){const a=e.spatialReference;if(a.isWGS84)return e.clone();if(a.isWebMercator)return(0,i.ci)(e);const r=n.A.WGS84;return await(0,t.initializeProjection)(a,r),(0,t.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function L(e){const{portal:a,isOrgItem:r,itemControl:t}=e,n=a.user?.privileges;let i=!n||n.includes("features:user:edit"),s=!!r&&!!n?.includes("features:user:fullEdit");const l="update"===t||"admin"===t;return l?s=i=!0:s&&(i=!0),{features:{edit:i,fullEdit:s},content:{updateItem:l}}}},22429:(e,a,r)=>{r.d(a,{v:()=>n});var t=r(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const r=this._serviceMetadatas.get(e);if(r)return r;const n=await(0,t.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:r}=this;if(r.has(a))return r.get(a);const t=await e.fetchData();return r.set(a,t),t}async fetchCustomParameters(e,a){const r=await this.fetchItemData(e);return r&&"object"==typeof r&&(a?a(r):r.customParameters)||null}}},23154:(e,a,r)=>{r.d(a,{K:()=>d,Q:()=>i});var t=r(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:r,...n}=a||{},i=r?await r.fetchServiceMetadata(e,n):await(0,t.V)(e,n);u(i),c(i);const s={serviceJSON:i};if((i.currentVersion??0)<10.5)return s;const l=`${e}/layers`,y=r?await r.fetchServiceMetadata(l,n):await(0,t.V)(l,n);return u(y),c(y),s.layersJSON={layers:y.layers,tables:y.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(l)}function y(e){e.type||="Feature Layer"}function o(e){e.type||="Table"}function u(e){e.layers?.forEach(y),e.tables?.forEach(o)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},24183:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(78888);async function n(e,a){const{data:r}=await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}},45613:(e,a,r)=>{r.d(a,{fromItem:()=>d,n:()=>L});var t=r(49186),n=r(92009),i=r(23154),s=r(22429),l=r(77548),c=r(4513),y=r(80812),o=r(66964),u=r(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof y.default||(a=new y.default(a));const r=await async function(e){await e.load();const a=new s.v;return async function(e){const a=e.className,r=c.S[a];return{constructor:await r(),properties:e.properties}}(await L(e,a))}(a);return new(0,r.constructor)({portalItem:a,...r.properties})}async function L(e,a){switch(e.type){case"3DTiles Service":return e.typeKeywords.includes("3DObject")?{className:"UnsupportedLayer"}:{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,u.Y)(e,"Map Notes"),r=(0,u.Y)(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if((0,u.Y)(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===(0,o.XH)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const r=await f(e,a);if("object"==typeof r){const{sourceJSON:e,className:a}=r,t={sourceJSON:e};return null!=r.id&&(t.layerId=r.id),{className:a||"FeatureLayer",properties:t}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const r=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await a.fetchItemData(e),n=t?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),s=i.cacheType?.toLowerCase(),l=i.capabilities?.toLowerCase().includes("tilesonly"),c=i.tileInfo?.format?.toLowerCase()??"",y=null==s&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(c);return"map"===s||y||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:r}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return r}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const r=await f(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:r}=await(0,n.L)(e.url,{sceneLayerItem:e}),t=await a.fetchServiceMetadata(r);return t?.tables??[]}catch{return[]}}));if("object"==typeof r){const t={};let n;if(null!=r.id?(t.layerId=r.id,n=`${e.url}/layers/${r.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const i=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{className:l.XX[i?.layerType]||"SceneLayer",properties:t}}if(!1===r){const r=await a.fetchServiceMetadata(e.url);if("Voxel"===r?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new t.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function f(e,a,r){const{url:t,type:n}=e,s="Feature Service"===n;if(!t)return{};if(/\/\d+$/.test(t)){if(s){const r=await a.fetchServiceMetadata(t,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{id:r.id,className:(0,i.K)(r.type),sourceJSON:r}}return{}}await e.load();let l=await a.fetchItemData(e);if(s){const e=await(0,o.bO)(l,t,a),r=m(e);if("object"==typeof r){const a=(0,o.rc)(e,r.id);r.className=(0,o.K8)(a?.layerType)}return r}if("Scene Service"===n&&(l=await(0,o.nu)(e,l,a)),(0,o.XH)(l)>0)return m(l);const c=await a.fetchServiceMetadata(t);return r&&(c.tables=await r()),m(c)}function m(e){return 1===(0,o.XH)(e)&&{id:(0,o.pJ)(e)?.id}}},66964:(e,a,r)=>{r.d(a,{Ju:()=>y,K8:()=>d,XH:()=>o,_r:()=>i,bO:()=>s,l:()=>u,nu:()=>L,pJ:()=>l,rc:()=>c});var t=r(92009),n=r(23154);function i(e){const a={id:e.id,name:e.name},r=(0,n.K)(e.type);return"FeatureLayer"!==r&&(a.layerType=r),a}async function s(e,a,r){if(null==e?.layers||null==e?.tables){const t=await r.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||t?.layers?.map(i),e.tables=e.tables||t?.tables?.map(i)}return e}function l(e){if(!e)return null;const{layers:a,tables:r}=e;return a?.length?a[0]:r?.length?r[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function y(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>e?a.includes(e):a.includes("ArcGISFeatureLayer")))}function o(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function u(e){switch(e){case"catalog":return["CatalogLayer"];case"feature":return["ArcGISFeatureLayer"];case"oriented-imagery":return["OrientedImageryLayer"];case"subtype-group":return["SubtypeGroupLayer","SubtypeGroupTable"]}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":case"SubtypeGroupTable":return"SubtypeGroupLayer"}return"FeatureLayer"}async function L(e,a,r){if(!e?.url)return a??{};if(a??={},!a.layers){const t=await r.fetchServiceMetadata(e.url);a.layers=t.layers?.map(i)}const{serverUrl:n,portalItem:s}=await(0,t.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&s){const e=await s.fetchData().catch((()=>null));if(e?.tables)a.tables=e.tables.map(i);else{const t=await r.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters}).catch((()=>null));a.tables=t?.tables?.map(i)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},75356:(e,a,r)=>{r.d(a,{N:()=>M,populateOperationalLayers:()=>o});var t=r(5503),n=(r(44208),r(22429)),i=r(4513),s=r(80812);function l(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var c=r(45613),y=r(8947);async function o(e,a,r){if(!a)return;const t=a.map((e=>async function(e,a){return async function(e,a,r){const t=new e;return t.read(a,r.context),"group"===t.type&&("GroupLayer"===a.layerType?await M(t,a,r):v(a)?function(e,a,r){a.itemId&&(e.portalItem=new s.default({id:a.itemId,portal:r?.portal}),e.when((()=>{const t=t=>{const n=t.layerId;G(t,e,a,n,r);const i=a.featureCollection?.layers?.[n];i&&t.read(i,r)};e.layers?.forEach(t),e.tables?.forEach(t)})))}(t,a,r.context):b(a)&&await async function(e,a,r){const t=i.S.FeatureLayer,n=await t(),s=a.featureCollection,l=s?.showLegend,c=s?.layers?.map(((t,i)=>{const s=new n;s.read(t,r);const c={...r,ignoreDefaults:!0};return G(s,e,a,i,c),null!=l&&s.read({showLegend:l},c),s}));e.layers.addMany(c??[])}(t,a,r.context)),await(0,y.L)(t,r.context),t}(await I(e,a),e,a)}(e,r))),n=await Promise.allSettled(t);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},d={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},L={ArcGISFeatureLayer:"FeatureLayer"},f={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},m={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},p={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},S={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",DefaultTileLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},w={...m,LinkChartLayer:"LinkChartLayer"},h={...p},g={...S};async function I(e,a){const r=a.context,t=T(r);let y=e.layerType||e.type;!y&&a?.defaultLayerType&&(y=a.defaultLayerType);const o=t[y];let u=o?i.S[o]:i.S.UnknownLayer;if(v(e)){const a=r?.portal;if(e.itemId){const r=new s.default({id:e.itemId,portal:a});await r.load();const t=(await(0,c.n)(r,new n.v)).className||"UnknownLayer";u=i.S[t]}}else"ArcGISFeatureLayer"===y?function(e){return l(e,"notes")}(e)||function(e){return l(e,"markup")}(e)?u=i.S.MapNotesLayer:function(e){return l(e,"route")}(e)?u=i.S.RouteLayer:b(e)&&(u=i.S.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?u=i.S.WMTSLayer:"WFS"===y&&"2.0.0"!==e.wfsInfo?.version&&(u=i.S.UnsupportedLayer);return u()}function b(e){return"ArcGISFeatureLayer"===e.layerType&&!v(e)&&(e.featureCollection?.layers?.length??0)>1}function v(e){return"Feature Collection"===e.type}function T(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":a=f;break;case"ground":a=d;break;case"tables":a=L;break;default:a=u}break;case"link-chart":switch(e.layerContainerType){case"basemap":a=g;break;case"tables":a=h;break;default:a=w}break;default:switch(e.layerContainerType){case"basemap":a=S;break;case"tables":a=p;break;default:a=m}}return a}async function M(e,a,r){const n=new t.A,i=o(n,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function G(e,a,r,t,n){e.read({id:`${a.id}-sublayer-${t}`,visibility:r.visibleLayers?.includes(t)??!0},n)}},92009:(e,a,r)=>{r.d(a,{L:()=>o});var t=r(70333),n=r(78888),i=r(49186),s=r(74887),l=r(60694),c=r(20655),y=r(80812);async function o(e,a){const r=(0,l.qg)(e);if(!r)throw new i.A("invalid-url","Invalid scene service url");const o={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const r=new y.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=i&&(r.portal=new c.A({url:i}));try{return await r.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(o),null==o.sceneLayerItem)return d(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);const L=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new y.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.QP)(e),null}}(o);if(!L?.url)throw new i.A("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=L;const f=await d(L.url,o);return f.portalItem=L,f}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,l.qg)(e);if(!r)throw new i.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const c=u(a),y=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(y?.layers?.[0]||y?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},L=d("anonymous").catch((()=>d("no-prompt"))),[f,m]=await Promise.all([L,c]),p=m?.layers,S=f.data&&f.data.layers;if(!Array.isArray(S))throw new Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,S.length);e++)if(p[e].id===s)return{serverUrl:t,layerId:S[e].id}}else if(null!=s&&s<S.length)return{serverUrl:t,layerId:S[s].id};throw new Error("could not find matching associated sublayer")}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[591,3169,6061,8125],{60591:(e,t,s)=>{s.r(t),s.d(t,{execute:()=>n.e,executeMany:()=>n.a,supportsCurves:()=>n.s}),s(4576),s(83047),s(70787),s(78125);var n=s(92523)},64523:(e,t,s)=>{s.d(t,{O:()=>c});var n=s(90237),r=s(76061),i=s(55537),a=s(35368),o=s(95213),l=s(83661),u=s(5247);class c{getOperatorType(){return 10204}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,n){return new m(e,t,s,n)}execute(e,t,s,n){return e||(0,i.t)("null param is not allowed."),new m(null,t,s,n).generalize(e)}}class m extends r.G{constructor(e,t,s,n){super(),this.m_pline=null,this.m_point=new o.P,this.m_stack=[],this.m_resultstack=[],this.m_callCount=0,this.m_progressTracker=n,this.m_geoms=e,this.m_maxDeviation=t,this.m_bRemoveDegenerateParts=s}tock(){return!0}getRank(){return 1}next(){const e=this.m_geoms.next();return null===e?null:((0,i.d)(e),this.generalize(e))}getGeometryID(){return this.m_geoms.getGeometryID()}generalize(e){const t=e.getGeometryType();if((0,i.e)(t))return e;if(t===i.G.enumEnvelope){const t=new a.a({vd:e.getDescription()});return t.addEnvelope(e,!1),this.generalize(t)}if((0,i.f)(t)){const t=new a.P({vd:e.getDescription()});return t.addSegment(e,!0),this.generalize(t)}if((0,i.h)(t)||(0,i.b)(""),e.isEmpty()||this.m_maxDeviation<=0)return e;const s=(new u.O).execute(e,0,.05*this.m_maxDeviation,0,this.m_progressTracker);e.hasNonLinearSegments()&&(this.m_maxDeviation*=.95);const r=s,o=e.createInstance();o.getGeometryType()===i.G.enumPolygon&&o.setFillRule(e.getFillRule()),this.m_xy=r.getAttributeStreamRef(0);{const e={stack:[],error:void 0,hasError:!1};try{const t=new a.L;this.m_pline=t,(0,n.b)(e,(0,l.h)((()=>{this.m_pline=null}),!1),!1);for(let e=0,t=r.getPathCount();e<t;e++)this.generalizePath(r.getImpl(),e,o.getImpl())}catch(t){e.error=t,e.hasError=!0}finally{(0,n.c)(e)}}return this.m_resultstack.length=0,this.m_stack.length=0,o}generalizePath(e,t,s){if(e.getPathSize(t)<2)return;this.m_resultstack.length=0,this.m_stack.length=0;const n=e.getPathStart(t),r=e.getPathEnd(t)-1,i=e.isClosedPath(t),a=e.isClosedPathInXYPlane(t);let o=0,u=-1;this.m_stack.push(i?n:r),this.m_stack.push(n);let c=!1,m=!1;for(!this.m_bRemoveDegenerateParts&&a&&(c=!0,m=!0);this.m_stack.length>1;){const t=this.m_stack.at(-1);this.m_stack.pop();const s=this.m_stack.at(-1);let n=e.getXY(t);this.m_pline.setStartXY(n),n=e.getXY(s),this.m_pline.setEndXY(n);const i=[Number.NaN];let a=this.findGreatestDistance(t,s,r,i);a>=0&&(c?c=!1:(m&&i[0]>o&&(o=i[0],u=a),i[0]<=this.m_maxDeviation&&(a=-1))),a>=0?(this.m_stack.push(a),this.m_stack.push(t)):this.m_resultstack.push(t)}i||this.m_resultstack.push(this.m_stack[0]);const h=this.m_resultstack.length;if(h===e.getPathSize(t)&&h===this.m_stack.length)s.addPath(e,t,!0);else if(this.m_resultstack.length>0){if(this.m_bRemoveDegenerateParts&&this.m_resultstack.length<=2){if(i||1===this.m_resultstack.length)return;if(l.P.distance(e.getXY(this.m_resultstack[0]),e.getXY(this.m_resultstack[1]))<=this.m_maxDeviation)return}if(m&&u>=0&&o<=this.m_maxDeviation){const e=this.m_resultstack.at(-1)>u;this.m_resultstack.push(u),e&&(this.m_resultstack[this.m_resultstack.length-2]=(0,l.b)(this.m_resultstack[this.m_resultstack.length-1],this.m_resultstack[this.m_resultstack.length-1]=this.m_resultstack[this.m_resultstack.length-2]))}for(let t=0,n=this.m_resultstack.length;t<n;t++)e.getPointByVal(this.m_resultstack[t],this.m_point),0===t?s.startPathPoint(this.m_point):s.lineToPoint(this.m_point);if(i){for(let e=this.m_resultstack.length;e<3;e++)s.lineToPoint(this.m_point);s.closePathWithLine()}}}findGreatestDistance(e,t,s,n){let r=t-1;t<=e&&(r=s);let i=-1,a=0;const o=new l.P;for(let t=e+1;t<=r;t++){this.m_xy.queryPoint2D(2*t,o);const e=o.x,s=o.y,n=this.m_pline.getClosestCoordinate(o,!1);o.assign(this.m_pline.getCoord2D(n)),o.x-=e,o.y-=s;const r=o.length();r>a&&(i=t,a=r),this.m_callCount++}return n[0]=a,i}}},70787:(e,t,s)=>{s.d(t,{fz:()=>o,g7:()=>i,zo:()=>a});var n=s(76061);const r=new(s(64523).O);function i(e,t,s){return r.execute(e,t,s,null)}function a(e,t,s){const i=r.executeMany(new n.S(e),t,s,null);return Array.from(i)}function o(){return r.supportsCurves()}},76061:(e,t,s)=>{s.d(t,{G:()=>n,S:()=>r});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class r extends n{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,s)=>{s.r(t),s.d(t,{fromExtent:()=>x,fromGeometry:()=>k,fromMultipoint:()=>P,fromPoint:()=>G,fromPolygon:()=>d,fromPolyline:()=>v,fromSpatialReference:()=>C,getSpatialReference:()=>y,toExtent:()=>M,toGeometry:()=>w,toMultipoint:()=>R,toPoint:()=>D,toPolygon:()=>V,toPolyline:()=>z});var n=s(83661),r=(s(79187),s(55537)),i=s(95213),a=s(35368),o=s(12189),l=s(5443),u=s(48526),c=s(86738),m=s(39829),h=s(82799),g=(s(90293),s(83299));const f="_gxVersion",p=2,_=1;function y(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function k(e){switch(e.type){case"point":return G(e);case"multipoint":return P(e);case"polyline":return v(e);case"polygon":return d(e);case"extent":return x(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(f)){const t=new i.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(p,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(_,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function P(e){if(!e.getCacheValue(f)){const t=new a.M,s=new i.P,n=e.points,r=e.hasM,o=e.hasZ,l=o?3:2;for(let e=0,i=n.length;e<i;e++){const i=n[e];s.setXYCoords(i[0],i[1]),o&&s.setZ(i[2]??0),r&&s.setM(i[l]??NaN),t.add(s)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function G(e){if(!e.getCacheValue(f)){const t=new i.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function d(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:s,hasZ:n,rings:r}=e,i=(0,g.fromGeometryToGXGeometry)({curveRings:t,hasM:s,hasZ:n,rings:r});e.setCacheValue(f,i)}return e.getCacheValue(f)}function v(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:s,hasZ:n,paths:r}=e,i=(0,g.fromGeometryToGXGeometry)({curvePaths:t,hasM:s,hasZ:n,paths:r});e.setCacheValue(f,i)}return e.getCacheValue(f)}function C(e){if(e.wkid)return(0,o.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,o.b)(t):null}function w(e,t){if(e)switch(e.getGeometryType()){case r.G.enumPoint:return D(e,t);case r.G.enumEnvelope:return M(e,t);case r.G.enumMultiPoint:return R(e,t);case r.G.enumPolyline:return z(e,t);case r.G.enumPolygon:return V(e,t)}return null}function M(e,t){if(e.isEmpty())return null;const s=new l.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),n=e.getDescription();if(n.hasM()){const t=e.queryInterval(p,0);s.mmin=t.vmin,s.mmax=t.vmax}if(n.hasZ()){const t=e.queryInterval(_,0);s.zmin=t.vmin,s.zmax=t.vmax}return s.setCacheValue(f,e),s}function R(e,t){if(e.isEmpty())return null;const s=e.getDescription(),n=s.hasM(),r=s.hasZ(),a=[],o=new i.P;for(let t=0,s=e.getPointCount();t<s;t++){e.getPointByVal(t,o);const s=[o.getX(),o.getY()];r&&s.push(o.getZ()),n&&s.push(o.getM()),a.push(s)}const l=new u.A({hasM:n,hasZ:r,points:a,spatialReference:t});return l.setCacheValue(f,e),l}function D(e,t){if(e instanceof n.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const s=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),r=e.getDescription();return r.hasM()&&(s.m=e.getM()),r.hasZ()&&(s.z=e.getZ()),s.setCacheValue(f,e),s}function V(e,t){if(e.isEmpty())return null;const s=m.A.fromJSON({spatialReference:t,...(0,g.toGeometry)(e,null)});return s.setCacheValue(f,e),s}function z(e,t){if(e.isEmpty())return null;const s=h.A.fromJSON({spatialReference:t,...(0,g.toGeometry)(e,null)});return s.setCacheValue(f,e),s}},92523:(e,t,s)=>{s.d(t,{a:()=>l,e:()=>o,g:()=>c,s:()=>u});var n=s(4576),r=s(83047),i=s(70787),a=s(78125);function o(e,t,s={}){const{removeDegenerateParts:n=!1,unit:o}=s,l=(0,a.getSpatialReference)(e);return o&&(t=(0,r.UW)(t,o,l)),(0,a.toGeometry)((0,i.g7)((0,a.fromGeometry)(e),t,n),l)}function l(e,t,s={}){const{removeDegenerateParts:o=!1,unit:l}=s,u=e.map(a.fromGeometry),c=(0,a.getSpatialReference)(e);return l&&(t=(0,r.UW)(t,l,c)),(0,i.zo)(u,t,o).map((e=>(0,a.toGeometry)(e,c))).filter(n.Ru)}const u=(0,i.fz)(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:o,executeMany:l,supportsCurves:u},Symbol.toStringTag,{value:"Module"}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[591,3169,6061,8125],{60591:(e,t,s)=>{s.r(t),s.d(t,{execute:()=>n.e,executeMany:()=>n.a,supportsCurves:()=>n.s}),s(4576),s(83047),s(70787),s(78125);var n=s(92523)},64523:(e,t,s)=>{s.d(t,{O:()=>c});var n=s(90237),r=s(76061),i=s(55537),a=s(35368),o=s(95213),l=s(83661),u=s(5247);class c{getOperatorType(){return 10204}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,n){return new m(e,t,s,n)}execute(e,t,s,n){return e||(0,i.a)("null param is not allowed."),new m(null,t,s,n).generalize(e)}}class m extends r.G{constructor(e,t,s,n){super(),this.m_pline=null,this.m_point=new o.P,this.m_stack=[],this.m_resultstack=[],this.m_callCount=0,this.m_progressTracker=n,this.m_geoms=e,this.m_maxDeviation=t,this.m_bRemoveDegenerateParts=s}tock(){return!0}getRank(){return 1}next(){const e=this.m_geoms.next();return null===e?null:((0,i.d)(e),this.generalize(e))}getGeometryID(){return this.m_geoms.getGeometryID()}generalize(e){const t=e.getGeometryType();if((0,i.e)(t))return e;if(t===i.G.enumEnvelope){const t=new a.a({vd:e.getDescription()});return t.addEnvelope(e,!1),this.generalize(t)}if((0,i.f)(t)){const t=new a.P({vd:e.getDescription()});return t.addSegment(e,!0),this.generalize(t)}if((0,i.h)(t)||(0,i.t)(""),e.isEmpty()||this.m_maxDeviation<=0)return e;const s=(new u.O).execute(e,0,.05*this.m_maxDeviation,0,this.m_progressTracker);e.hasNonLinearSegments()&&(this.m_maxDeviation*=.95);const r=s,o=e.createInstance();o.getGeometryType()===i.G.enumPolygon&&o.setFillRule(e.getFillRule()),this.m_xy=r.getAttributeStreamRef(0);{const e={stack:[],error:void 0,hasError:!1};try{const t=new a.L;this.m_pline=t,(0,n.b)(e,(0,l.h)((()=>{this.m_pline=null}),!1),!1);for(let e=0,t=r.getPathCount();e<t;e++)this.generalizePath(r.getImpl(),e,o.getImpl())}catch(t){e.error=t,e.hasError=!0}finally{(0,n.c)(e)}}return this.m_resultstack.length=0,this.m_stack.length=0,o}generalizePath(e,t,s){if(e.getPathSize(t)<2)return;this.m_resultstack.length=0,this.m_stack.length=0;const n=e.getPathStart(t),r=e.getPathEnd(t)-1,i=e.isClosedPath(t),a=e.isClosedPathInXYPlane(t);let o=0,u=-1;this.m_stack.push(i?n:r),this.m_stack.push(n);let c=!1,m=!1;for(!this.m_bRemoveDegenerateParts&&a&&(c=!0,m=!0);this.m_stack.length>1;){const t=this.m_stack.at(-1);this.m_stack.pop();const s=this.m_stack.at(-1);let n=e.getXY(t);this.m_pline.setStartXY(n),n=e.getXY(s),this.m_pline.setEndXY(n);const i=[Number.NaN];let a=this.findGreatestDistance(t,s,r,i);a>=0&&(c?c=!1:(m&&i[0]>o&&(o=i[0],u=a),i[0]<=this.m_maxDeviation&&(a=-1))),a>=0?(this.m_stack.push(a),this.m_stack.push(t)):this.m_resultstack.push(t)}i||this.m_resultstack.push(this.m_stack[0]);const h=this.m_resultstack.length;if(h===e.getPathSize(t)&&h===this.m_stack.length)s.addPath(e,t,!0);else if(this.m_resultstack.length>0){if(this.m_bRemoveDegenerateParts&&this.m_resultstack.length<=2){if(i||1===this.m_resultstack.length)return;if(l.P.distance(e.getXY(this.m_resultstack[0]),e.getXY(this.m_resultstack[1]))<=this.m_maxDeviation)return}if(m&&u>=0&&o<=this.m_maxDeviation){const e=this.m_resultstack.at(-1)>u;this.m_resultstack.push(u),e&&(this.m_resultstack[this.m_resultstack.length-2]=(0,l.c)(this.m_resultstack[this.m_resultstack.length-1],this.m_resultstack[this.m_resultstack.length-1]=this.m_resultstack[this.m_resultstack.length-2]))}for(let t=0,n=this.m_resultstack.length;t<n;t++)e.getPointByVal(this.m_resultstack[t],this.m_point),0===t?s.startPathPoint(this.m_point):s.lineToPoint(this.m_point);if(i){for(let e=this.m_resultstack.length;e<3;e++)s.lineToPoint(this.m_point);s.closePathWithLine()}}}findGreatestDistance(e,t,s,n){let r=t-1;t<=e&&(r=s);let i=-1,a=0;const o=new l.P;for(let t=e+1;t<=r;t++){this.m_xy.queryPoint2D(2*t,o);const e=o.x,s=o.y,n=this.m_pline.getClosestCoordinate(o,!1);o.assign(this.m_pline.getCoord2D(n)),o.x-=e,o.y-=s;const r=o.length();r>a&&(i=t,a=r),this.m_callCount++}return n[0]=a,i}}},70787:(e,t,s)=>{s.d(t,{fz:()=>o,g7:()=>i,zo:()=>a});var n=s(76061);const r=new(s(64523).O);function i(e,t,s){return r.execute(e,t,s,null)}function a(e,t,s){const i=r.executeMany(new n.S(e),t,s,null);return Array.from(i)}function o(){return r.supportsCurves()}},76061:(e,t,s)=>{s.d(t,{G:()=>n,S:()=>r});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class r extends n{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,s)=>{s.r(t),s.d(t,{fromExtent:()=>x,fromGeometry:()=>k,fromMultipoint:()=>P,fromPoint:()=>G,fromPolygon:()=>d,fromPolyline:()=>v,fromSpatialReference:()=>C,getSpatialReference:()=>y,toExtent:()=>M,toGeometry:()=>w,toMultipoint:()=>R,toPoint:()=>D,toPolygon:()=>V,toPolyline:()=>z});var n=s(83661),r=(s(79187),s(55537)),i=s(95213),a=s(35368),o=s(12189),l=s(5443),u=s(48526),c=s(86738),m=s(39829),h=s(82799),g=(s(90293),s(83299));const f="_gxVersion",p=2,_=1;function y(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function k(e){switch(e.type){case"point":return G(e);case"multipoint":return P(e);case"polyline":return v(e);case"polygon":return d(e);case"extent":return x(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(f)){const t=new i.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(p,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(_,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function P(e){if(!e.getCacheValue(f)){const t=new a.M,s=new i.P,n=e.points,r=e.hasM,o=e.hasZ,l=o?3:2;for(let e=0,i=n.length;e<i;e++){const i=n[e];s.setXYCoords(i[0],i[1]),o&&s.setZ(i[2]??0),r&&s.setM(i[l]??NaN),t.add(s)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function G(e){if(!e.getCacheValue(f)){const t=new i.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function d(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:s,hasZ:n,rings:r}=e,i=(0,g.fromGeometryToGXGeometry)({curveRings:t,hasM:s,hasZ:n,rings:r});e.setCacheValue(f,i)}return e.getCacheValue(f)}function v(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:s,hasZ:n,paths:r}=e,i=(0,g.fromGeometryToGXGeometry)({curvePaths:t,hasM:s,hasZ:n,paths:r});e.setCacheValue(f,i)}return e.getCacheValue(f)}function C(e){if(e.wkid)return(0,o.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,o.a)(t):null}function w(e,t){if(e)switch(e.getGeometryType()){case r.G.enumPoint:return D(e,t);case r.G.enumEnvelope:return M(e,t);case r.G.enumMultiPoint:return R(e,t);case r.G.enumPolyline:return z(e,t);case r.G.enumPolygon:return V(e,t)}return null}function M(e,t){if(e.isEmpty())return null;const s=new l.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),n=e.getDescription();if(n.hasM()){const t=e.queryInterval(p,0);s.mmin=t.vmin,s.mmax=t.vmax}if(n.hasZ()){const t=e.queryInterval(_,0);s.zmin=t.vmin,s.zmax=t.vmax}return s.setCacheValue(f,e),s}function R(e,t){if(e.isEmpty())return null;const s=e.getDescription(),n=s.hasM(),r=s.hasZ(),a=[],o=new i.P;for(let t=0,s=e.getPointCount();t<s;t++){e.getPointByVal(t,o);const s=[o.getX(),o.getY()];r&&s.push(o.getZ()),n&&s.push(o.getM()),a.push(s)}const l=new u.A({hasM:n,hasZ:r,points:a,spatialReference:t});return l.setCacheValue(f,e),l}function D(e,t){if(e instanceof n.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const s=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),r=e.getDescription();return r.hasM()&&(s.m=e.getM()),r.hasZ()&&(s.z=e.getZ()),s.setCacheValue(f,e),s}function V(e,t){if(e.isEmpty())return null;const s=m.A.fromJSON({spatialReference:t,...(0,g.toGeometry)(e,null)});return s.setCacheValue(f,e),s}function z(e,t){if(e.isEmpty())return null;const s=h.A.fromJSON({spatialReference:t,...(0,g.toGeometry)(e,null)});return s.setCacheValue(f,e),s}},92523:(e,t,s)=>{s.d(t,{a:()=>l,e:()=>o,g:()=>c,s:()=>u});var n=s(4576),r=s(83047),i=s(70787),a=s(78125);function o(e,t,s={}){const{removeDegenerateParts:n=!1,unit:o}=s,l=(0,a.getSpatialReference)(e);return o&&(t=(0,r.UW)(t,o,l)),(0,a.toGeometry)((0,i.g7)((0,a.fromGeometry)(e),t,n),l)}function l(e,t,s={}){const{removeDegenerateParts:o=!1,unit:l}=s,u=e.map(a.fromGeometry),c=(0,a.getSpatialReference)(e);return l&&(t=(0,r.UW)(t,l,c)),(0,i.zo)(u,t,o).map((e=>(0,a.toGeometry)(e,c))).filter(n.Ru)}const u=(0,i.fz)(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:o,executeMany:l,supportsCurves:u},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4167,6061],{28879:(e,t,n)=>{n.r(t),n.d(t,{OperatorGeodeticLength:()=>m});var s=n(90237),o=n(55537),r=n(47591),a=n(35368),i=n(83661),c=n(12189),g=n(5247);class m{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,s){if(4===n)return(new r.O).execute(e,t,s);if(0===t.getCoordinateSystemType()&&(0,o.a)(""),(0,o.d)(e),e.isEmpty()||e.getDimension()<1)return 0;const m=t.getGCS(),u=(0,c.J)();m.querySpheroidData(u);const l=u.majorSemiAxis,h=u.e2,y=m.getUnit().getUnitToBaseFactor();let x;const p=e.getGeometryType();if(p===o.G.enumPolygon?x=e.getBoundary():p===o.G.enumEnvelope?x=(0,a.c)(e):(0,o.f)(p)?(x=new a.P({vd:e.getDescription()}),x.addSegment(e,!0)):x=e,x.hasNonLinearSegments()&&(x=(new g.O).execute(x,0,t.getTolerance(0),0,s)),m!==t){const n=t.getSRToGCSTransform();if(t.isPannable()){x=(0,c.F)(x,t),p===o.G.enumPolyline&&x===e&&(x=e.clone());const n=new i.E;t.getPannableExtent().queryIntervalX(n);for(let e=0,t=x.getPointCount();e<t;e++){const t=x.getXY(e);t.x=(0,c.M)(t.x,n),x.setXY(e,t)}}const r=x.createInstance();x=(0,c.N)(n,x,r,s)?r:(new c.v).execute(x,n,s)}return this._ExecuteMultiPathGeodeticLength(x,n,l,h,y)}_ExecuteMultiPathGeodeticLength(e,t,n,o,r){const a={stack:[],error:void 0,hasError:!1};try{const i=(0,s.b)(a,new c.P,!1);let g=0;const m=e.querySegmentIterator();for(;m.nextPath();)for(;m.hasNextSegment();){const e=m.nextSegment(),s=e.getStartXY(),a=e.getEndXY();s.scale(r),a.scale(r),c.x.geodeticDistance(n,o,s.x,s.y,a.x,a.y,i,null,null,t),g+=i.val}return g}catch(e){a.error=e,a.hasError=!0}finally{(0,s.c)(a)}}}},47591:(e,t,n)=>{n.d(t,{O:()=>x});var s=n(55537),o=n(12189),r=n(35368),a=n(83661),i=n(95213),c=n(79187),g=n(5247),m=n(31139);function u(){return{m_pGcs:new a.P,m_xyz:new i.d,m_factor:Number.NaN,m_geoLength:Number.NaN,setValues:l,setLength:h,assign:y}}function l(e,t,n,s){this.m_factor=e,this.m_pGcs.assign(t),this.m_xyz.assign(s),this.m_geoLength=n}function h(e){this.m_geoLength=e}function y(e){this.m_pGcs.assign(e.m_pGcs),this.m_xyz.assign(e.m_xyz),this.m_factor=e.m_factor,this.m_geoLength=e.m_geoLength}class x{getOperatorType(){return 10315}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}_ExecuteShapePreservingLength(e,t,n,s,r){if(e.hasNonLinearSegments()&&(e=(new g.O).execute(e,0,t.getTolerance(0),0,r)),t.isPannable()){let s=90,a=-90;if(1===n.getUnit().getUnitToBaseFactor()&&(s*=Math.PI/180,a*=Math.PI/180),2===t.getCoordinateSystemType()){let e=null;const n=[0,0,0,0];e=t.getPECoordSys(),n[0]=0,n[1]=s,n[2]=0,n[3]=a,o.K.geogToProj(e,2,n),s=n[1],a=n[3]}const i=new c.Envelope2D;e.queryEnvelope(i),i.ymin=a,i.ymax=s,e=(new m.O).execute(e,i,t,r)}else{const n=t.getPCSHorizon();if((e=(new o.g).execute(e,n,t,r))===n){const t=e.clone();e=t}}return e.isEmpty()?0:this._ExecuteIterativeApproach(e,t,n,s,1,r)}_ExecuteIterativeApproach(e,t,n,r,c,g){const m=(0,o.J)();n.querySpheroidData(m);const l=m.majorSemiAxis,h=m.e2,y=n.getUnit().getUnitToBaseFactor(),x=(0,a.n)(u,40),_=(0,a.d)(40,Number.NaN),f=u(),G=u();let S;const P=[0,0,0,0],w=t.getPECoordSys(),C=new a.P,E=new a.P,v=new a.P,N=new a.P,T=new a.P;let L=0;const b=e.querySegmentIterator();for(;b.nextPath();)for(;b.hasNextSegment();){const e=b.nextSegment();C.assign(e.getStartXY()),E.assign(e.getEndXY()),2===t.getCoordinateSystemType()?(P[0]=C.x,P[1]=C.y,P[2]=E.x,P[3]=E.y,o.K.projToGeog(w,2,P),v.x=P[0]*y,v.y=P[1]*y,N.x=P[2]*y,N.y=P[3]*y):(v.setCoordsPoint2D(C),N.setCoordsPoint2D(E),v.scale(y),N.scale(y));const n=new i.d,r=new i.d;p(l,h,v,n),p(l,h,N,r);let a=d(l,n,r);f.setValues(0,v,Number.NaN,n),G.setValues(1,N,a,r),S=c,x[0].assign(G),_[0]=c;let g=0;for(;;){g>128&&(0,s.c)("iterations exceeded");const n=.5*(f.m_factor+G.m_factor),r=e.getCoord2D(n);2===t.getCoordinateSystemType()?(P[0]=r.x,P[1]=r.y,o.K.projToGeog(w,1,P),T.x=P[0]*y,T.y=P[1]*y):(T.setCoordsPoint2D(r),T.scale(y)),v.setCoordsPoint2D(f.m_pGcs),N.setCoordsPoint2D(G.m_pGcs);const m=new i.d;p(l,h,T,m);const u=d(l,f.m_xyz,m),C=d(l,G.m_xyz,m);a=G.m_geoLength,Number.isNaN(a)&&(a=d(l,f.m_xyz,G.m_xyz));const E=u+C,b=S===c&&E>=20&&Math.abs(E-a)>1e-8*(a+E);if(g+2<40&&(b||Math.abs(E-a)>0&&S>0))G.setLength(C),x[g].assign(G),G.setValues(n,T,u,m),x[++g].assign(G),b?(S=c,_[g]=c):(S--,_[g-1]=S,_[g]=S);else{if(L+=E,0===g)break;f.assign(G),G.assign(x[--g]),S=_[g]}}}return L}execute(e,t,n){if(t&&0!==t.getCoordinateSystemType()||(0,s.a)(""),e.isEmpty()||e.getDimension()<1)return 0;let a=null;const i=t.getGCS();i!==t&&(a=(0,o.w)(t,i,null));const c=e.getGeometryType();if(c===s.G.enumEnvelope){const s=new r.a;return s.addEnvelope(e,!1),this._ExecuteShapePreservingLength(s,t,i,a,n)}if((0,s.f)(c)){const s=new r.P;return s.addSegment(e,!0),this._ExecuteShapePreservingLength(s,t,i,a,n)}return this._ExecuteShapePreservingLength(e,t,i,a,n)}}function p(e,t,n,s){s.assign((0,o.y)(e,t,n))}function d(e,t,n){const s=e,o=new i.d;o.setSub(t,n);const r=o.length();return 2*s*Math.asin(r/(2*s))}},76061:(e,t,n)=>{n.d(t,{G:()=>s,S:()=>o});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class o extends s{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8125],{78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>M,fromGeometry:()=>x,fromMultipoint:()=>V,fromPoint:()=>w,fromPolygon:()=>P,fromPolyline:()=>G,fromSpatialReference:()=>Z,getSpatialReference:()=>C,toExtent:()=>R,toGeometry:()=>v,toMultipoint:()=>d,toPoint:()=>E,toPolygon:()=>k,toPolyline:()=>A});var r=n(83661),a=(n(79187),n(55537)),s=n(95213),o=n(35368),u=n(12189),i=n(5443),c=n(48526),l=n(86738),m=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",g=2,y=1;function C(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function x(e){switch(e.type){case"point":return w(e);case"multipoint":return V(e);case"polyline":return G(e);case"polygon":return P(e);case"extent":return M(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function M(e){if(!e.getCacheValue(p)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(g,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new o.M,n=new s.P,r=e.points,a=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),u&&n.setZ(s[2]??0),a&&n.setM(s[i]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function P(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,s=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function G(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,s=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function Z(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.b)(t):null}function v(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return E(e,t);case a.G.enumEnvelope:return R(e,t);case a.G.enumMultiPoint:return d(e,t);case a.G.enumPolyline:return A(e,t);case a.G.enumPolygon:return k(e,t)}return null}function R(e,t){if(e.isEmpty())return null;const n=new i.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(g,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(y,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function d(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],u=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];a&&n.push(u.getZ()),r&&n.push(u.getM()),o.push(n)}const i=new c.A({hasM:r,hasZ:a,points:o,spatialReference:t});return i.setCacheValue(p,e),i}function E(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),a=e.getDescription();return a.hasM()&&(n.m=e.getM()),a.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function k(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function A(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8125],{78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>M,fromGeometry:()=>x,fromMultipoint:()=>V,fromPoint:()=>w,fromPolygon:()=>P,fromPolyline:()=>G,fromSpatialReference:()=>Z,getSpatialReference:()=>C,toExtent:()=>R,toGeometry:()=>v,toMultipoint:()=>d,toPoint:()=>E,toPolygon:()=>k,toPolyline:()=>A});var r=n(83661),a=(n(79187),n(55537)),s=n(95213),o=n(35368),u=n(12189),i=n(5443),c=n(48526),l=n(86738),m=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",g=2,y=1;function C(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function x(e){switch(e.type){case"point":return w(e);case"multipoint":return V(e);case"polyline":return G(e);case"polygon":return P(e);case"extent":return M(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function M(e){if(!e.getCacheValue(p)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(g,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new o.M,n=new s.P,r=e.points,a=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),u&&n.setZ(s[2]??0),a&&n.setM(s[i]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function P(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,s=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function G(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,s=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function Z(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.a)(t):null}function v(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return E(e,t);case a.G.enumEnvelope:return R(e,t);case a.G.enumMultiPoint:return d(e,t);case a.G.enumPolyline:return A(e,t);case a.G.enumPolygon:return k(e,t)}return null}function R(e,t){if(e.isEmpty())return null;const n=new i.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(g,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(y,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function d(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],u=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];a&&n.push(u.getZ()),r&&n.push(u.getM()),o.push(n)}const i=new c.A({hasM:r,hasZ:a,points:o,spatialReference:t});return i.setCacheValue(p,e),i}function E(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),a=e.getDescription();return a.hasM()&&(n.m=e.getM()),a.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function k(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function A(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6061,9700],{29821:(e,t,r)=>{r.d(t,{O:()=>n});var s=r(12189);class n extends s.d{getOperatorType(){return 6}execute(e,t,r,n){return(0,s.r)(e,t,r,16,n)}}},76061:(e,t,r)=>{r.d(t,{G:()=>s,S:()=>n});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class n extends s{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},85672:(e,t,r)=>{r.r(t),r.d(t,{execute:()=>m});var s=r(29821),n=r(83299);const o=new s.O;function m(e,t){const r=(0,n.fromGeometry)(e);return o.execute(r.getGeometry(),(0,n.fromGeometryToGXGeometry)(t),r.getSpatialReference(),null)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6061,9700],{29821:(e,t,r)=>{r.d(t,{O:()=>n});var s=r(12189);class n extends s.e{getOperatorType(){return 6}execute(e,t,r,n){return(0,s.r)(e,t,r,16,n)}}},76061:(e,t,r)=>{r.d(t,{G:()=>s,S:()=>n});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class n extends s{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},85672:(e,t,r)=>{r.r(t),r.d(t,{execute:()=>m});var s=r(29821),n=r(83299);const o=new s.O;function m(e,t){const r=(0,n.fromGeometry)(e);return o.execute(r.getGeometry(),(0,n.fromGeometryToGXGeometry)(t),r.getSpatialReference(),null)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,6061,6468,8125],{36633:(e,t,n)=>{n.d(t,{O:()=>g});var r=n(55537),s=n(79187),o=n(83661),i=n(12189);function a(){return u(new o.P,-1,Number.NaN)}function u(e,t,n){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:n,m_bRightSide:!1,isEmpty:c}}function c(){return Number.isNaN(this.m_distance)}function m(e,t,n=-1,a=-1){if(e.isEmpty())return 3;const u=e.getGeometryType();if((0,r.f)(u))return function(e,t,n,s){if(n>=0||s>=0)return(0,r.t)("");if(e.isDegenerate(0))return e.getStartXY().equals(t)?2:3;if(!e.isCurve()){const n=o.P.orientationRobust(t,e.getStartXY(),e.getEndXY());return n<0?1:n>0?0:2}const i=e.getClosestCoordinate(t,!1),a=e.getTangent(i),u=e.getCoord2D(i),c=o.P.orientationRobust(t,u,u.add(a));return c<0?1:c>0?0:2}(e,t,n,a);if(u===r.G.enumPolygon)return function(e,t,n,o){(n>=0||o>=0)&&(0,r.t)("");const a=new s.Envelope2D;e.queryEnvelope(a);const u=(0,i.i)(e,t,0);return 0===u?0:1===u?1:2}(e,t,n,a);if(u===r.G.enumPolyline)return function(e,t,n,s){(n<0&&s>=0||n>=0&&s<0)&&(0,r.t)("");const i=e.querySegmentIterator();if(n<0){let e=Number.MAX_VALUE,r=0;for(;i.nextPath();)for(;i.hasNextSegment();){const a=i.nextSegment(),u=a.getClosestCoordinate(t,!1),c=a.getCoord2D(u),m=o.P.sqrDistance(c,t);m<e?(r=1,n=i.getStartPointIndex(),s=i.getPathIndex(),e=m):m===e&&r++}if(0===r)return 3;if(1===r)return i.resetToVertex(n,s),m(i.nextSegment(),t)}const a=function(e,t,n,r){const s={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(s.i1=function(e,t,n){for(e.resetToVertex(t,n);e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();for(e.resetToVertex(t,n);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,n,r),-1!==s.i1){t.resetToVertex(s.i1,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r),a=o.P.sqrDistance(i,e);{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),s.bRight1=t.crossProduct(r)<0}if(s.i2=function(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2){t.resetToVertex(s.i2,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r);if(o.P.sqrDistance(i,e)>a)s.i2=-1;else{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),s.bRight2=t.crossProduct(r)<0}}if(-1===s.i2&&(s.i2=function(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2)){t.resetToVertex(s.i2,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r);if(o.P.sqrDistance(i,e)>a)s.i2=-1;else{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),s.bRight2=t.crossProduct(r)<0;const o=s.i1;s.i1=s.i2,s.i2=o;const a=s.bRight1;s.bRight1=s.bRight2,s.bRight2=a}}}return s}(t,i,n,s);if(-1!==a.i1&&-1===a.i2)return a.bRight1?1:0;if(-1!==a.i1&&-1!==a.i2){if(a.bRight1===a.bRight2)return a.bRight1?1:0;{i.resetToVertex(a.i1,-1);const e=i.nextSegment().getTangent(1);i.resetToVertex(a.i2,-1);const t=i.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}return i.resetToVertex(n,s),m(i.nextSegment(),t)}(e,t,n,a);if(u===r.G.enumEnvelope){const n=new s.Envelope2D;return e.queryEnvelope(n),n.contains(t)?n.containsExclusive(t)?1:2:0}return 3}var l=n(95213);class g{getOperatorType(){return 10500}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}getNearestCoordinate(e,t,n,s){if(t.isNAN()&&(0,r.t)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case r.G.enumPoint:return this.pointGetNearestVertex(e,t);case r.G.enumMultiPoint:return this.multiVertexGetNearestVertex(e,t);case r.G.enumPolyline:case r.G.enumPolygon:return this.multiPathGetNearestCoordinate(e,t,n,s);default:(0,r.b)("")}}getNearestVertex(e,t){if(t.isNAN()&&(0,r.t)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case r.G.enumPoint:return this.pointGetNearestVertex(e,t);case r.G.enumMultiPoint:case r.G.enumPolyline:case r.G.enumPolygon:return this.multiVertexGetNearestVertex(e,t);default:(0,r.b)("")}}getNearestVertices(e,t,n,s){if(0===s&&(0,r.t)(""),t.isNAN()&&(0,r.t)("NAN xy coordinates are not allowed"),e.isEmpty())return[];switch(e.getGeometryType()){case r.G.enumPoint:return this.pointGetNearestVertices(e,t,n,s);case r.G.enumMultiPoint:case r.G.enumPolyline:case r.G.enumPolygon:return this.multiVertexGetNearestVertices(e,t,n,s);default:(0,r.b)("")}}multiPathGetNearestCoordinate(e,t,n,a){if(e.getGeometryType()===r.G.enumPolygon&&n){const n=new s.Envelope2D;e.queryEnvelope(n);const r=(0,l.c)(null,n,!1);let o;if(o=(0,i.i)(e,t,a?0:r),0!==o){const e=u(t,-1,0);return a&&(e.m_bRightSide=!0),e}}const c=e.querySegmentIterator(),g=new o.P;let f=-1,h=-1,x=Number.MAX_VALUE,d=0;for(;c.nextPath();)for(;c.hasNextSegment();){const e=c.nextSegment(),n=e.getClosestCoordinate(t,!1),r=e.getCoord2D(n),s=o.P.sqrDistance(r,t);s<x?(d=1,g.assign(r),f=c.getStartPointIndex(),h=c.getPathIndex(),x=s):s===x&&d++}-1===f&&(0,r.t)("");const y=u(g,f,Math.sqrt(x));if(a)if(e.getGeometryType()!==r.G.enumPolygon){let n=!1;if(d>1){const r=m(e,t,f,h);n=0!==r&&3!==r}else c.resetToVertex(f,h),n=0!==m(c.nextSegment(),t);y.m_bRightSide=n}else n||0!==(0,i.i)(e,t,0)&&(y.m_bRightSide=!0);return y}pointGetNearestVertex(e,t){const n=e.getXY();return u(n,0,o.P.distance(n,t))}multiVertexGetNearestVertex(e,t){const n=e.getAttributeStreamRef(0),r=e.getPointCount();let s=-1;const i=new o.P;let a=Number.MAX_VALUE;const c=new o.P;for(let e=0;e<r;e++){n.queryPoint2D(2*e,c);const r=o.P.sqrDistance(c,t);r<a&&(i.assign(c),s=e,a=r)}return u(i,s,Math.sqrt(a))}pointGetNearestVertices(e,t,n,r){const s=[];if(0!==r){const r=n*n,i=e.getXY(),a=o.P.sqrDistance(i,t);a<=r&&s.push(u(i,0,Math.sqrt(a)))}return s}multiVertexGetNearestVertices(e,t,n,r){const s=[];if(0!==r){const i=e.getAttributeStreamRef(0),a=e.getPointCount();s.length=r+1;const c=n*n;for(let e=0;e<a;e++){const n=i.read(2*e),r=i.read(2*e+1),a=t.x-n,m=t.y-r,l=a*a+m*m;l<=c&&s.push(u(o.P.construct(n,r),e,Math.sqrt(l)))}s.sort(((e,t)=>e.m_distance-t.m_distance))}return s.slice(0,r)}}},48032:(e,t,n)=>{n.r(t),n.d(t,{getNearestCoordinate:()=>r.g,getNearestVertex:()=>r.a,getNearestVertices:()=>r.b,supportsCurves:()=>r.s}),n(36633),n(83047),n(78125),n(79533);var r=n(59260)},59260:(e,t,n)=>{n.d(t,{a:()=>c,b:()=>m,g:()=>u,p:()=>g,s:()=>l});var r=n(36633),s=n(83047),o=n(78125),i=n(79533);const a=new r.O;function u(e,t,n={}){const{calculateLeftRightSide:r=!1,testPolygonInterior:u=!0,unit:c}=n,m=a.getNearestCoordinate((0,o.fromGeometry)(e),(0,o.fromPoint)(t).getXY(),u,r);if(c&&m.m_distance){const t=(0,o.getSpatialReference)(e);m.m_distance=(0,s.PQ)(m.m_distance,t,c)}return(0,i.C)(m,e,r)}function c(e,t,n={}){const{unit:r}=n,u=a.getNearestVertex((0,o.fromGeometry)(e),(0,o.fromPoint)(t).getXY());if(r&&u.m_distance){const t=(0,o.getSpatialReference)(e);u.m_distance=(0,s.PQ)(u.m_distance,t,r)}return(0,i.C)(u,e)}function m(e,t,n,r,u={}){const{unit:c}=u,m=(0,o.getSpatialReference)(e);return c&&n&&(n=(0,s.UW)(n,c,m)),a.getNearestVertices((0,o.fromGeometry)(e),(0,o.fromPoint)(t).getXY(),n,r).map((t=>(c&&t.m_distance&&(t.m_distance=(0,s.PQ)(t.m_distance,m,c)),(0,i.C)(t,e))))}const l=a.supportsCurves(),g=Object.freeze(Object.defineProperty({__proto__:null,getNearestCoordinate:u,getNearestVertex:c,getNearestVertices:m,supportsCurves:l},Symbol.toStringTag,{value:"Module"}))},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>s});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class s extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>P,fromGeometry:()=>p,fromMultipoint:()=>G,fromPoint:()=>C,fromPolygon:()=>V,fromPolyline:()=>S,fromSpatialReference:()=>N,getSpatialReference:()=>y,toExtent:()=>R,toGeometry:()=>b,toMultipoint:()=>_,toPoint:()=>v,toPolygon:()=>M,toPolyline:()=>w});var r=n(83661),s=(n(79187),n(55537)),o=n(95213),i=n(35368),a=n(12189),u=n(5443),c=n(48526),m=n(86738),l=n(39829),g=n(82799),f=(n(90293),n(83299));const h="_gxVersion",x=2,d=1;function y(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function p(e){switch(e.type){case"point":return C(e);case"multipoint":return G(e);case"polyline":return S(e);case"polygon":return V(e);case"extent":return P(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function P(e){if(!e.getCacheValue(h)){const t=new o.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(x,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(d,0,e.zmin,e.zmax),e.setCacheValue(h,t)}return e.getCacheValue(h)}function G(e){if(!e.getCacheValue(h)){const t=new i.M,n=new o.P,r=e.points,s=e.hasM,a=e.hasZ,u=a?3:2;for(let e=0,o=r.length;e<o;e++){const o=r[e];n.setXYCoords(o[0],o[1]),a&&n.setZ(o[2]??0),s&&n.setM(o[u]??NaN),t.add(n)}e.setCacheValue(h,t)}return e.getCacheValue(h)}function C(e){if(!e.getCacheValue(h)){const t=new o.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(h,t)}return e.getCacheValue(h)}function V(e){if(!e.getCacheValue(h)){const{curveRings:t,hasM:n,hasZ:r,rings:s}=e,o=(0,f.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(h,o)}return e.getCacheValue(h)}function S(e){if(!e.getCacheValue(h)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,o=(0,f.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(h,o)}return e.getCacheValue(h)}function N(e){if(e.wkid)return(0,a.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,a.b)(t):null}function b(e,t){if(e)switch(e.getGeometryType()){case s.G.enumPoint:return v(e,t);case s.G.enumEnvelope:return R(e,t);case s.G.enumMultiPoint:return _(e,t);case s.G.enumPolyline:return w(e,t);case s.G.enumPolygon:return M(e,t)}return null}function R(e,t){if(e.isEmpty())return null;const n=new u.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(x,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(d,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(h,e),n}function _(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),s=n.hasZ(),i=[],a=new o.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,a);const n=[a.getX(),a.getY()];s&&n.push(a.getZ()),r&&n.push(a.getM()),i.push(n)}const u=new c.A({hasM:r,hasZ:s,points:i,spatialReference:t});return u.setCacheValue(h,e),u}function v(e,t){if(e instanceof r.P)return new m.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new m.A({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(n.m=e.getM()),s.hasZ()&&(n.z=e.getZ()),n.setCacheValue(h,e),n}function M(e,t){if(e.isEmpty())return null;const n=l.A.fromJSON({spatialReference:t,...(0,f.toGeometry)(e,null)});return n.setCacheValue(h,e),n}function w(e,t){if(e.isEmpty())return null;const n=g.A.fromJSON({spatialReference:t,...(0,f.toGeometry)(e,null)});return n.setCacheValue(h,e),n}},79533:(e,t,n)=>{n.d(t,{C:()=>s});var r=n(78125);function s(e,t,n=!1){const s=(0,r.toPoint)(e.m_coordinate,(0,r.getSpatialReference)(t)),o=e.m_distance,i=e.isEmpty(),a=e.m_bRightSide;return{coordinate:s,distance:o,isEmpty:i,...n&&{isRightSide:a},vertexIndex:e.m_vertexIndex}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,6061,6468,8125],{36633:(e,t,n)=>{n.d(t,{O:()=>g});var r=n(55537),s=n(79187),o=n(83661),i=n(12189);function a(){return u(new o.P,-1,Number.NaN)}function u(e,t,n){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:n,m_bRightSide:!1,isEmpty:c}}function c(){return Number.isNaN(this.m_distance)}function m(e,t,n=-1,a=-1){if(e.isEmpty())return 3;const u=e.getGeometryType();if((0,r.f)(u))return function(e,t,n,s){if(n>=0||s>=0)return(0,r.a)("");if(e.isDegenerate(0))return e.getStartXY().equals(t)?2:3;if(!e.isCurve()){const n=o.P.orientationRobust(t,e.getStartXY(),e.getEndXY());return n<0?1:n>0?0:2}const i=e.getClosestCoordinate(t,!1),a=e.getTangent(i),u=e.getCoord2D(i),c=o.P.orientationRobust(t,u,u.add(a));return c<0?1:c>0?0:2}(e,t,n,a);if(u===r.G.enumPolygon)return function(e,t,n,o){(n>=0||o>=0)&&(0,r.a)("");const a=new s.Envelope2D;e.queryEnvelope(a);const u=(0,i.h)(e,t,0);return 0===u?0:1===u?1:2}(e,t,n,a);if(u===r.G.enumPolyline)return function(e,t,n,s){(n<0&&s>=0||n>=0&&s<0)&&(0,r.a)("");const i=e.querySegmentIterator();if(n<0){let e=Number.MAX_VALUE,r=0;for(;i.nextPath();)for(;i.hasNextSegment();){const a=i.nextSegment(),u=a.getClosestCoordinate(t,!1),c=a.getCoord2D(u),m=o.P.sqrDistance(c,t);m<e?(r=1,n=i.getStartPointIndex(),s=i.getPathIndex(),e=m):m===e&&r++}if(0===r)return 3;if(1===r)return i.resetToVertex(n,s),m(i.nextSegment(),t)}const a=function(e,t,n,r){const s={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(s.i1=function(e,t,n){for(e.resetToVertex(t,n);e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();for(e.resetToVertex(t,n);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,n,r),-1!==s.i1){t.resetToVertex(s.i1,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r),a=o.P.sqrDistance(i,e);{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),s.bRight1=t.crossProduct(r)<0}if(s.i2=function(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2){t.resetToVertex(s.i2,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r);if(o.P.sqrDistance(i,e)>a)s.i2=-1;else{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),s.bRight2=t.crossProduct(r)<0}}if(-1===s.i2&&(s.i2=function(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2)){t.resetToVertex(s.i2,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r);if(o.P.sqrDistance(i,e)>a)s.i2=-1;else{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),s.bRight2=t.crossProduct(r)<0;const o=s.i1;s.i1=s.i2,s.i2=o;const a=s.bRight1;s.bRight1=s.bRight2,s.bRight2=a}}}return s}(t,i,n,s);if(-1!==a.i1&&-1===a.i2)return a.bRight1?1:0;if(-1!==a.i1&&-1!==a.i2){if(a.bRight1===a.bRight2)return a.bRight1?1:0;{i.resetToVertex(a.i1,-1);const e=i.nextSegment().getTangent(1);i.resetToVertex(a.i2,-1);const t=i.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}return i.resetToVertex(n,s),m(i.nextSegment(),t)}(e,t,n,a);if(u===r.G.enumEnvelope){const n=new s.Envelope2D;return e.queryEnvelope(n),n.contains(t)?n.containsExclusive(t)?1:2:0}return 3}var l=n(95213);class g{getOperatorType(){return 10500}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}getNearestCoordinate(e,t,n,s){if(t.isNAN()&&(0,r.a)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case r.G.enumPoint:return this.pointGetNearestVertex(e,t);case r.G.enumMultiPoint:return this.multiVertexGetNearestVertex(e,t);case r.G.enumPolyline:case r.G.enumPolygon:return this.multiPathGetNearestCoordinate(e,t,n,s);default:(0,r.t)("")}}getNearestVertex(e,t){if(t.isNAN()&&(0,r.a)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case r.G.enumPoint:return this.pointGetNearestVertex(e,t);case r.G.enumMultiPoint:case r.G.enumPolyline:case r.G.enumPolygon:return this.multiVertexGetNearestVertex(e,t);default:(0,r.t)("")}}getNearestVertices(e,t,n,s){if(0===s&&(0,r.a)(""),t.isNAN()&&(0,r.a)("NAN xy coordinates are not allowed"),e.isEmpty())return[];switch(e.getGeometryType()){case r.G.enumPoint:return this.pointGetNearestVertices(e,t,n,s);case r.G.enumMultiPoint:case r.G.enumPolyline:case r.G.enumPolygon:return this.multiVertexGetNearestVertices(e,t,n,s);default:(0,r.t)("")}}multiPathGetNearestCoordinate(e,t,n,a){if(e.getGeometryType()===r.G.enumPolygon&&n){const n=new s.Envelope2D;e.queryEnvelope(n);const r=(0,l.a)(null,n,!1);let o;if(o=(0,i.h)(e,t,a?0:r),0!==o){const e=u(t,-1,0);return a&&(e.m_bRightSide=!0),e}}const c=e.querySegmentIterator(),g=new o.P;let f=-1,h=-1,x=Number.MAX_VALUE,d=0;for(;c.nextPath();)for(;c.hasNextSegment();){const e=c.nextSegment(),n=e.getClosestCoordinate(t,!1),r=e.getCoord2D(n),s=o.P.sqrDistance(r,t);s<x?(d=1,g.assign(r),f=c.getStartPointIndex(),h=c.getPathIndex(),x=s):s===x&&d++}-1===f&&(0,r.a)("");const y=u(g,f,Math.sqrt(x));if(a)if(e.getGeometryType()!==r.G.enumPolygon){let n=!1;if(d>1){const r=m(e,t,f,h);n=0!==r&&3!==r}else c.resetToVertex(f,h),n=0!==m(c.nextSegment(),t);y.m_bRightSide=n}else n||0!==(0,i.h)(e,t,0)&&(y.m_bRightSide=!0);return y}pointGetNearestVertex(e,t){const n=e.getXY();return u(n,0,o.P.distance(n,t))}multiVertexGetNearestVertex(e,t){const n=e.getAttributeStreamRef(0),r=e.getPointCount();let s=-1;const i=new o.P;let a=Number.MAX_VALUE;const c=new o.P;for(let e=0;e<r;e++){n.queryPoint2D(2*e,c);const r=o.P.sqrDistance(c,t);r<a&&(i.assign(c),s=e,a=r)}return u(i,s,Math.sqrt(a))}pointGetNearestVertices(e,t,n,r){const s=[];if(0!==r){const r=n*n,i=e.getXY(),a=o.P.sqrDistance(i,t);a<=r&&s.push(u(i,0,Math.sqrt(a)))}return s}multiVertexGetNearestVertices(e,t,n,r){const s=[];if(0!==r){const i=e.getAttributeStreamRef(0),a=e.getPointCount();s.length=r+1;const c=n*n;for(let e=0;e<a;e++){const n=i.read(2*e),r=i.read(2*e+1),a=t.x-n,m=t.y-r,l=a*a+m*m;l<=c&&s.push(u(o.P.construct(n,r),e,Math.sqrt(l)))}s.sort(((e,t)=>e.m_distance-t.m_distance))}return s.slice(0,r)}}},48032:(e,t,n)=>{n.r(t),n.d(t,{getNearestCoordinate:()=>r.g,getNearestVertex:()=>r.a,getNearestVertices:()=>r.b,supportsCurves:()=>r.s}),n(36633),n(83047),n(78125),n(79533);var r=n(59260)},59260:(e,t,n)=>{n.d(t,{a:()=>c,b:()=>m,g:()=>u,p:()=>g,s:()=>l});var r=n(36633),s=n(83047),o=n(78125),i=n(79533);const a=new r.O;function u(e,t,n={}){const{calculateLeftRightSide:r=!1,testPolygonInterior:u=!0,unit:c}=n,m=a.getNearestCoordinate((0,o.fromGeometry)(e),(0,o.fromPoint)(t).getXY(),u,r);if(c&&m.m_distance){const t=(0,o.getSpatialReference)(e);m.m_distance=(0,s.PQ)(m.m_distance,t,c)}return(0,i.C)(m,e,r)}function c(e,t,n={}){const{unit:r}=n,u=a.getNearestVertex((0,o.fromGeometry)(e),(0,o.fromPoint)(t).getXY());if(r&&u.m_distance){const t=(0,o.getSpatialReference)(e);u.m_distance=(0,s.PQ)(u.m_distance,t,r)}return(0,i.C)(u,e)}function m(e,t,n,r,u={}){const{unit:c}=u,m=(0,o.getSpatialReference)(e);return c&&n&&(n=(0,s.UW)(n,c,m)),a.getNearestVertices((0,o.fromGeometry)(e),(0,o.fromPoint)(t).getXY(),n,r).map((t=>(c&&t.m_distance&&(t.m_distance=(0,s.PQ)(t.m_distance,m,c)),(0,i.C)(t,e))))}const l=a.supportsCurves(),g=Object.freeze(Object.defineProperty({__proto__:null,getNearestCoordinate:u,getNearestVertex:c,getNearestVertices:m,supportsCurves:l},Symbol.toStringTag,{value:"Module"}))},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>s});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class s extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>P,fromGeometry:()=>p,fromMultipoint:()=>G,fromPoint:()=>C,fromPolygon:()=>V,fromPolyline:()=>S,fromSpatialReference:()=>N,getSpatialReference:()=>y,toExtent:()=>b,toGeometry:()=>R,toMultipoint:()=>_,toPoint:()=>v,toPolygon:()=>M,toPolyline:()=>w});var r=n(83661),s=(n(79187),n(55537)),o=n(95213),i=n(35368),a=n(12189),u=n(5443),c=n(48526),m=n(86738),l=n(39829),g=n(82799),f=(n(90293),n(83299));const h="_gxVersion",x=2,d=1;function y(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function p(e){switch(e.type){case"point":return C(e);case"multipoint":return G(e);case"polyline":return S(e);case"polygon":return V(e);case"extent":return P(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function P(e){if(!e.getCacheValue(h)){const t=new o.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(x,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(d,0,e.zmin,e.zmax),e.setCacheValue(h,t)}return e.getCacheValue(h)}function G(e){if(!e.getCacheValue(h)){const t=new i.M,n=new o.P,r=e.points,s=e.hasM,a=e.hasZ,u=a?3:2;for(let e=0,o=r.length;e<o;e++){const o=r[e];n.setXYCoords(o[0],o[1]),a&&n.setZ(o[2]??0),s&&n.setM(o[u]??NaN),t.add(n)}e.setCacheValue(h,t)}return e.getCacheValue(h)}function C(e){if(!e.getCacheValue(h)){const t=new o.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(h,t)}return e.getCacheValue(h)}function V(e){if(!e.getCacheValue(h)){const{curveRings:t,hasM:n,hasZ:r,rings:s}=e,o=(0,f.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(h,o)}return e.getCacheValue(h)}function S(e){if(!e.getCacheValue(h)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,o=(0,f.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(h,o)}return e.getCacheValue(h)}function N(e){if(e.wkid)return(0,a.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,a.a)(t):null}function R(e,t){if(e)switch(e.getGeometryType()){case s.G.enumPoint:return v(e,t);case s.G.enumEnvelope:return b(e,t);case s.G.enumMultiPoint:return _(e,t);case s.G.enumPolyline:return w(e,t);case s.G.enumPolygon:return M(e,t)}return null}function b(e,t){if(e.isEmpty())return null;const n=new u.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(x,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(d,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(h,e),n}function _(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),s=n.hasZ(),i=[],a=new o.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,a);const n=[a.getX(),a.getY()];s&&n.push(a.getZ()),r&&n.push(a.getM()),i.push(n)}const u=new c.A({hasM:r,hasZ:s,points:i,spatialReference:t});return u.setCacheValue(h,e),u}function v(e,t){if(e instanceof r.P)return new m.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new m.A({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(n.m=e.getM()),s.hasZ()&&(n.z=e.getZ()),n.setCacheValue(h,e),n}function M(e,t){if(e.isEmpty())return null;const n=l.A.fromJSON({spatialReference:t,...(0,f.toGeometry)(e,null)});return n.setCacheValue(h,e),n}function w(e,t){if(e.isEmpty())return null;const n=g.A.fromJSON({spatialReference:t,...(0,f.toGeometry)(e,null)});return n.setCacheValue(h,e),n}},79533:(e,t,n)=>{n.d(t,{C:()=>s});var r=n(78125);function s(e,t,n=!1){const s=(0,r.toPoint)(e.m_coordinate,(0,r.getSpatialReference)(t)),o=e.m_distance,i=e.isEmpty(),a=e.m_bRightSide;return{coordinate:s,distance:o,isEmpty:i,...n&&{isRightSide:a},vertexIndex:e.m_vertexIndex}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1878],{11878:(t,s,i)=>{i.d(s,{T:()=>a});var o=i(55537),e=i(83661);class h{constructor(t,s,i){if(t instanceof h)return this.data=t.data,this.N=t.N,this.M=t.M,t.data=null,t.N=0,void(t.M=0);this.data=t,this.N=s,this.M=i}assignCopy(t){return this===t||((0,o.g)(this.N*this.M==t.N*t.M),this.data.set(t.data),this.N=t.N,this.M=t.M),this}setZero(){return this.data?.fill(0),this}setIdentity(){for(let t=0;t<this.N;t++)for(let s=0;s<this.M;s++)this.setRowCol(t,s,t===s?1:0);return this}rows(){return this.N}cols(){return this.M}row(t){return(0,o.g)(0),{}}set(t,s){return this.data[t]=s,this}setRowCol(t,s,i){return this.data[t*this.M+s]=i,this}at(t){return this.data[t]}atRowCol(t,s){return this.data[t*this.M+s]}mulScalar(t,s){(0,o.g)(0)}mul(t,s){if((0,o.g)(this.M===t.rows()),(0,o.g)(this.N===s.rows()),(0,o.g)(t.cols()===s.cols()),s===this){const i=new Float64Array(this.N*this.M),o=new h(i,this.N,this.M);return this.mul(t,o),void s.assignCopy(o)}if(s===t){const i=new Float64Array(t.N*t.M),o=new h(i,t.N,t.M);return this.mul(t,o),void s.assignCopy(o)}const i=t.cols();for(let o=0;o<this.N;o++)for(let e=0;e<i;e++){let i=0;for(let s=0;s<this.M;s++)i+=this.atRowCol(o,s)*t.atRowCol(s,e);s.setRowCol(o,e,i)}}mulTranspose(t,s){if((0,o.g)(this.M===t.cols()),(0,o.g)(this.N===s.rows()),(0,o.g)(t.rows()===s.cols()),s===this){const i=new Float64Array(this.N*this.M),o=new h(i,this.N,this.M);return this.mulTranspose(t,o),void s.assignCopy(o)}if(s===t){const i=new Float64Array(t.N*t.M),o=new h(i,t.N,t.M);return this.mulTranspose(t,o),void s.assignCopy(o)}const i=t.rows();for(let o=0;o<this.N;o++)for(let e=0;e<i;e++){let i=0;for(let s=0;s<this.M;s++)i+=this.atRowCol(o,s)*t.atRowCol(e,s);s.setRowCol(o,e,i)}}mulLeft(t,s){(0,o.g)(0)}mulLeftTranspose(t,s){(0,o.g)(0)}mulDiag(t,s){if((0,o.g)(this.M===t.N*t.M),(0,o.g)(this.N===s.rows()),(0,o.g)(this.M===s.cols()),s===this){const i=new Float64Array(this.N*this.M),o=new h(i,this.N,this.M);return this.mulDiag(t,o),void s.assignCopy(o)}const i=this.M;for(let o=0;o<this.N;o++)for(let e=0;e<i;e++)s.setRowCol(o,e,this.atRowCol(o,e)*t.at(e))}transposeInPlace(){if(this.N===this.M){for(let t=0;t<this.N;t++)for(let s=t+1;s<this.M;s++){const i=this.atRowCol(t,s);this.setRowCol(t,s,this.atRowCol(s,t)),this.setRowCol(s,t,i)}return this}const t=new Float64Array(this.N*this.M),s=new h(t,this.N,this.M);return s.assignCopy(this),this.M=(0,e.b)(this.N,this.N=this.M),s.transpose(this),this}transpose(t){if(this!==t){h.checkDims(t,this.M,this.N);for(let s=0;s<this.N;s++)for(let i=0;i<this.M;i++)t.setRowCol(i,s,this.atRowCol(s,i))}else t.transposeInPlace()}add(t,s){}svd(t,s,i,e=!1){if(h.checkDims(t,this.N,this.M),h.checkDims(s,this.M,1),h.checkDims(i,this.M,this.M),e){if((0,o.g)(this.N===this.M),!this.symmetricEigen(s,i))return!1;for(let t=0;t<this.M;++t)s.at(t)<0&&s.set(t,0);return t.assignCopy(i),!0}let r,a,l,y,n,x,w,u=0,C=0,f=0,R=0,d=0;const c=this.M,M=this.N;t.assignCopy(this);const m=new Float64Array(c),N=new h(m,c,1),g=(t,s)=>s>=0?Math.abs(t):-Math.abs(t),b=(t,s)=>{if((t=Math.abs(t))>(s=Math.abs(s))){const i=s/t;return t*Math.sqrt(i*i+1)}if(s>0){const i=t/s;return s*Math.sqrt(i*i+1)}return 0};for(let i=0;i<c;i++){if(u=i+1,N.set(i,R*f),f=y=R=0,i<M){for(let s=i;s<M;s++)R+=Math.abs(t.atRowCol(s,i));if(R){for(let s=i;s<M;s++)t.setRowCol(s,i,t.atRowCol(s,i)/R),y+=t.atRowCol(s,i)*t.atRowCol(s,i);a=t.atRowCol(i,i),f=-g(Math.sqrt(y),a),l=a*f-y,t.setRowCol(i,i,a-f);for(let s=u;s<c;s++){y=0;for(let o=i;o<M;o++)y+=t.atRowCol(o,i)*t.atRowCol(o,s);a=y/l;for(let o=i;o<M;o++)t.setRowCol(o,s,t.atRowCol(o,s)+a*t.atRowCol(o,i))}for(let s=i;s<M;s++)t.setRowCol(s,i,t.atRowCol(s,i)*R)}}if(s.set(i,R*f),f=y=R=0,i<M&&i!==c-1){for(let s=u;s<c;s++)R+=Math.abs(t.atRowCol(i,s));if(R){for(let s=u;s<c;s++)t.setRowCol(i,s,t.atRowCol(i,s)/R),y+=t.atRowCol(i,s)*t.atRowCol(i,s);a=t.atRowCol(i,u),f=-g(Math.sqrt(y),a),l=a*f-y,t.setRowCol(i,u,a-f);for(let s=u;s<c;s++)N.set(s,t.atRowCol(i,s)/l);for(let s=u;s<M;s++){y=0;for(let o=u;o<c;o++)y+=t.atRowCol(s,o)*t.atRowCol(i,o);for(let i=u;i<c;i++)t.setRowCol(s,i,t.atRowCol(s,i)+y*N.at(i))}for(let s=u;s<c;s++)t.setRowCol(i,s,t.atRowCol(i,s)*R)}}const o=Math.abs(s.at(i))+Math.abs(N.at(i));d=o>d?o:d}for(let s=c-1;s>=0;s--){if(s<c-1){if(f){for(let o=u;o<c;o++)i.setRowCol(o,s,t.atRowCol(s,o)/t.atRowCol(s,u)/f);for(let o=u;o<c;o++){y=0;for(let e=u;e<c;e++)y+=t.atRowCol(s,e)*i.atRowCol(e,o);for(let t=u;t<c;t++)i.setRowCol(t,o,i.atRowCol(t,o)+y*i.atRowCol(t,s))}}for(let t=u;t<c;t++)i.setRowCol(s,t,0),i.setRowCol(t,s,0)}i.setRowCol(s,s,1),f=N.at(s),u=s}for(let i=(M<c?M:c)-1;i>=0;i--){u=i+1,f=s.at(i);for(let s=u;s<c;s++)t.setRowCol(i,s,0);if(f){f=1/f;for(let s=u;s<c;s++){y=0;for(let o=u;o<M;o++)y+=t.atRowCol(o,i)*t.atRowCol(o,s);a=y/t.atRowCol(i,i)*f;for(let o=i;o<M;o++)t.setRowCol(o,s,t.atRowCol(o,s)+a*t.atRowCol(o,i))}for(let s=i;s<M;s++)t.setRowCol(s,i,t.atRowCol(s,i)*f)}else for(let s=i;s<M;s++)t.setRowCol(s,i,0);t.setRowCol(i,i,t.atRowCol(i,i)+1)}for(let o=c-1;o>=0;o--)for(let e=1;;e++){let h=1;for(u=o;u>=0;u--){if(C=u-1,Math.abs(N.at(u))+d===d){h=0;break}if(Math.abs(s.at(C))+d===d)break}if(h){r=0,y=1;for(let i=u;i<=o&&(a=y*N.at(i),N.set(i,N.at(i)*r),Math.abs(a)+d!==d);i++){f=s.at(i),l=b(a,f),s.set(i,l),l=1/l,r=f*l,y=-a*l;for(let s=0;s<M;s++)x=t.atRowCol(s,C),w=t.atRowCol(s,i),t.setRowCol(s,C,x*r+w*y),t.setRowCol(s,i,w*r-x*y)}}if(w=s.at(o),u===o){if(w<0){s.set(o,-w);for(let t=0;t<c;t++)i.setRowCol(t,o,-i.atRowCol(t,o))}break}if(100===e)return!1;n=s.at(u),C=o-1,x=s.at(C),f=N.at(C),l=N.at(o),a=((x-w)*(x+w)+(f-l)*(f+l))/(2*l*x),f=b(a,1),a=((n-w)*(n+w)+l*(x/(a+g(f,a))-l))/n,r=y=1;for(let o=u;o<=C;o++){const e=o+1;f=N.at(e),x=s.at(e),l=y*f,f*=r,w=b(a,l),N.set(o,w),r=a/w,y=l/w,a=n*r+f*y,f=f*r-n*y,l=x*y,x*=r;for(let t=0;t<c;t++)n=i.atRowCol(t,o),w=i.atRowCol(t,e),i.setRowCol(t,o,n*r+w*y),i.setRowCol(t,e,w*r-n*y);w=b(a,l),s.set(o,w),w&&(w=1/w,r=a*w,y=l*w),a=r*f+y*x,n=r*x-y*f;for(let s=0;s<M;s++)x=t.atRowCol(s,o),w=t.atRowCol(s,e),t.setRowCol(s,o,x*r+w*y),t.setRowCol(s,e,w*r-x*y)}N.set(u,0),N.set(o,a),s.set(o,n)}const p=new Float64Array(this.N),P=new Float64Array(this.M),v=new h(p,this.N,1),T=new h(P,this.M,1);let I=1;do{I*=3,I++}while(I<=this.M);do{I/=3,I=Math.trunc(I);for(let o=I;o<this.M;o++){const e=s.at(o);for(let s=0;s<this.N;s++)v.set(s,t.atRowCol(s,o));for(let t=0;t<this.M;t++)T.set(t,i.atRowCol(t,o));let h=o;for(;s.at(h-I)<e;){s.set(h,s.at(h-I));for(let s=0;s<this.N;s++)t.setRowCol(s,h,t.atRowCol(s,h-I));for(let t=0;t<this.M;t++)i.setRowCol(t,h,i.atRowCol(t,h-I));if(h-=I,h<I)break}s.set(h,e);for(let s=0;s<this.N;s++)t.setRowCol(s,h,v.at(s));for(let t=0;t<this.M;t++)i.setRowCol(t,h,T.at(t))}}while(I>1);for(let s=0;s<this.M;s++){let o=0;for(let i=0;i<this.N;i++)t.atRowCol(i,s)<0&&o++;for(let t=0;t<this.M;t++)i.atRowCol(t,s)<0&&o++;if(o>Math.trunc((this.N+this.M)/2)){for(let i=0;i<this.N;i++)t.setRowCol(i,s,-t.atRowCol(i,s));for(let t=0;t<this.M;t++)i.setRowCol(t,s,-i.atRowCol(t,s))}}return!0}isSymmetric(){if(this.N!==this.M)return!1;for(let t=0;t<this.N;t++)for(let s=t+1;s<this.M;s++)if(this.atRowCol(t,s)!==this.atRowCol(s,t))return!1;return!0}isZero(){return(0,o.g)(0),!1}isIdentity(){return(0,o.g)(0),!1}equals(t,s){if(void 0!==s&&(0,o.g)(0),this.N!==t.N||this.M!==t.M)return!1;for(let s=0;s<this.N*this.M;s++)if(this.data[s]!==t.data[s])return!1;return!0}maxElement(){return(0,o.g)(0),0}minElement(){return(0,o.g)(0),0}determinant(){if((0,o.g)(this.N===this.M),1===this.N)return this.data[0];if(2===this.N)return this.data[0]*this.data[3]-this.data[1]*this.data[2];if(3===this.N){const t=this;return t.atRowCol(0,0)*(t.atRowCol(1,1)*t.atRowCol(2,2)-t.atRowCol(1,2)*t.atRowCol(2,1))-t.atRowCol(0,1)*(t.atRowCol(1,0)*t.atRowCol(2,2)-t.atRowCol(2,0)*t.atRowCol(1,2))+t.atRowCol(0,2)*(t.atRowCol(1,0)*t.atRowCol(2,1)-t.atRowCol(1,1)*t.atRowCol(2,0))}const t=new Float64Array(this.N*this.N),s=new h(t,this.N,this.N),i=new Float64Array(this.N);if(!this.luDecomposition(s,i))return 0;let e=1;for(let t=0;t<this.N;t++)e*=s.atRowCol(t,t),i[t]!==t&&(e=-e);return e}submatrix(t,s,i){(0,o.g)(0)}inverse(t){(0,o.g)(0)}pseudoInverse(t,s=!1,i=2220446049250313e-31){if(t.setZero(),1===this.N&&1===this.M)return 0!==this.atRowCol(0,0)?t.setRowCol(0,0,1/this.atRowCol(0,0)):t.setRowCol(0,0,0),!0;if(2===this.N&&2===this.M){const s=this.atRowCol(0,0)*this.atRowCol(1,1)-this.atRowCol(0,1)*this.atRowCol(1,0),i=1e-5*(Math.abs(this.atRowCol(0,0)*this.atRowCol(1,1))+Math.abs(this.atRowCol(0,1)*this.atRowCol(1,0)));if(Math.abs(s)>i)return t.setRowCol(0,0,this.atRowCol(1,1)/s),t.setRowCol(0,1,-this.atRowCol(0,1)/s),t.setRowCol(1,0,-this.atRowCol(1,0)/s),t.setRowCol(1,1,this.atRowCol(0,0)/s),!0}const o=new Float64Array(this.N*this.M),e=new h(o,this.N,this.M),r=new Float64Array(this.M),a=new h(r,this.M,1),l=new Float64Array(this.M*this.M),y=new h(l,this.M,this.M);if(!this.svd(e,a,y,s))return!1;const n=Math.max(this.N,this.M),x=i*Math.abs(a.at(0))*n;for(let t=0;t<this.M;t++)a.at(t)>x?a.set(t,1/a.at(t)):a.set(t,0);return y.mulDiag(a,t),t.mulTranspose(e,t),!0}luDecomposition(t,s){return(0,o.g)(0),!1}symmetricEigen(t,s){(0,o.g)(this.rows()===this.cols()),(0,o.g)(this.rows()===t.rows()),(0,o.g)(s.rows()===s.cols()&&s.rows()===this.rows()),(0,o.g)(this.isSymmetric());const i=new Float64Array(this.N*this.M),e=new h(i,this.N,this.M);e.assignCopy(this);const r=100/Number.EPSILON,a=this.rows(),l=new Float64Array(a),y=new Float64Array(a),n=new h(l,a,1),x=new h(y,a,1);for(let s=0;s<a;s++)n.set(s,e.atRowCol(s,s)),t.set(s,e.atRowCol(s,s)),x.set(s,0);s.setIdentity();const w=()=>{const i=n;s.transposeInPlace();let o=1;do{o*=3,o++}while(o<=a);do{o/=3,o=Math.trunc(o);for(let e=o;e<a;e++){const h=t.at(e),r=Math.abs(h);for(let t=0;t<this.M;t++)i.set(t,s.atRowCol(t,e));let a=e;for(;Math.abs(t.at(a-o))<r;){t.set(a,t.at(a-o));for(let t=0;t<this.M;t++)s.setRowCol(t,a,s.atRowCol(t,a-o));if(a-=o,a<o)break}if(a!==e){t.set(a,h);for(let t=0;t<this.M;t++)s.setRowCol(t,a,i.at(t))}}}while(o>1)};for(let i=1;;i++){let o=0;for(let t=1;t<a;t++)for(let s=0;s<t;s++)o+=Math.abs(e.atRowCol(t,s));if(0===o)return w(),!0;const h=i<4?.2*o/(a*a):0;for(let o=0;o<a;o++)for(let l=o+1;l<a;l++){let y=r*Math.abs(e.atRowCol(l,o));if(i>4&&y<=Math.abs(t.at(o))&&y<=Math.abs(t.at(l)))e.setRowCol(l,o,0);else if(Math.abs(e.atRowCol(l,o))>h){let i,h=t.at(l)-t.at(o);if(y<Math.abs(h))i=e.atRowCol(l,o)/h;else{const t=.5*h/e.atRowCol(l,o);i=1/(Math.abs(t)+Math.sqrt(1+t*t)),t<0&&(i=-i)}const r=1/Math.sqrt(1+i*i),n=i*r,w=n/(1+r);h=i*e.atRowCol(l,o),x.set(o,x.at(o)-h),x.set(l,x.at(l)+h),t.set(o,t.at(o)-h),t.set(l,t.at(l)+h),e.setRowCol(l,o,0);let u=0;for(;u<o;u++)y=e.atRowCol(o,u),h=e.atRowCol(l,u),e.setRowCol(o,u,y-n*(h+y*w)),e.setRowCol(l,u,h+n*(y-h*w));for(u++;u<l;u++)y=e.atRowCol(u,o),h=e.atRowCol(l,u),e.setRowCol(u,o,y-n*(h+y*w)),e.setRowCol(l,u,h+n*(y-h*w));for(u++;u<a;u++)y=e.atRowCol(u,o),h=e.atRowCol(u,l),e.setRowCol(u,o,y-n*(h+y*w)),e.setRowCol(u,l,h+n*(y-h*w));for(u=0;u<a;u++)y=s.atRowCol(o,u),h=s.atRowCol(l,u),s.setRowCol(o,u,y-n*(h+y*w)),s.setRowCol(l,u,h+n*(y-h*w))}}for(let s=0;s<a;s++)n.set(s,n.at(s)+x.at(s)),t.set(s,n.at(s)),x.set(s,0)}}static checkDims(t,s,i){(0,o.g)(t.rows()===s&&t.cols()===i)}}class r extends h{constructor(t){if(t.copy){const s=new Float64Array(t.copy.N*t.copy.M);return super(s,t.copy.N,t.copy.M),this.buffer=s,void this.assignCopy(t.copy)}const s=new Float64Array(t.NN*t.MM);super(s,t.NN,t.MM),this.buffer=s,t.initializerList&&(0,e.a)(this.buffer,t.initializerList,0,0,t.initializerList.length)}assignCopy(t){return this===t||super.assignCopy(t),this}}class a{constructor(t){this.m_TransformationType=1,void 0===t?this.setIdentity():t instanceof a?this.set(t):this.setScale(t)}set(t){return this.xx=t.xx,this.xy=t.xy,this.xd=t.xd,this.yx=t.yx,this.yy=t.yy,this.yd=t.yd,this}clone(){return(new a).set(this)}setZero(){this.xx=0,this.yy=0,this.xy=0,this.yx=0,this.xd=0,this.yd=0}isEqual(t){return this===t||this.xx===t.xx&&this.xy===t.xy&&this.xd===t.xd&&this.yx===t.yx&&this.yy===t.yy&&this.yd===t.yd}transformInPlace(t){const s=this.xx*t.x+this.xy*t.y+this.xd,i=this.yx*t.x+this.yy*t.y+this.yd;t.x=s,t.y=i}transform(t){const s=t.clone();return this.transformInPlace(s),s}queryTransform(t,s){const i=this.xx*t.x+this.xy*t.y+this.xd,o=this.yx*t.x+this.yy*t.y+this.yd;s.setCoords(i,o)}transformEnvInPlace(t){if(t.isEmpty())return;const s=(0,e.m)(e.P,4);t.queryCorners(s),this.transformPoints2D(s,4,s),t.setFromPoints(s,4)}queryTransformEnv(t,s){(0,o.g)(0)}transformPoints2D(t,s,i){for(let o=0;o<s;++o)this.queryTransform(t[o],i[o])}transformInterleavedPoints(t,s,i){s*=2;const o=e.P.getNAN();for(let e=0;e<s;e+=2)o.x=t[e],o.y=t[e+1],this.transformInPlace(o),i[e]=o.x,i[e+1]=o.y}multiply(t){return a.st_multiply(this,t,this),this}mulLeft(t){return(0,o.g)(0),this}static st_multiply(t,s,i){const o=t.xx*s.xx+t.yx*s.xy,e=t.xy*s.xx+t.yy*s.xy,h=t.xd*s.xx+t.yd*s.xy+s.xd,r=t.xx*s.yx+t.yx*s.yy,a=t.xy*s.yx+t.yy*s.yy,l=t.xd*s.yx+t.yd*s.yy+s.yd;i.xx=o,i.xy=e,i.xd=h,i.yx=r,i.yy=a,i.yd=l}getCoefficients(t){(0,o.g)(t.length>=6),t[0]=this.xx,t[1]=this.xy,t[2]=this.xd,t[3]=this.yx,t[4]=this.yy,t[5]=this.yd}setCoefficients(t){(0,o.g)(t.length>=6),this.xx=t[0],this.xy=t[1],this.xd=t[2],this.yx=t[3],this.yy=t[4],this.yd=t[5]}copyTo(t){(0,o.g)(0)}initializeFromRect(t,s){t.isEmpty()||s.isEmpty()||!t.width()||!t.height()?this.setZero():(this.xy=this.yx=0,this.xx=s.width()/t.width(),this.yy=s.height()/t.height(),this.xd=s.xmin-t.xmin*this.xx,this.yd=s.ymin-t.ymin*this.yy)}initializeFromRectIsotropic(t,s){if(t.isEmpty()||!t.width()||!t.height()||s.isEmpty())this.setZero();else{this.yx=0,this.xy=0,this.xx=s.width()/t.width(),this.yy=s.height()/t.height(),this.xx>this.yy?this.xx=this.yy:this.yy=this.xx;const i=s.getCenter(),o=t.getCenter();this.xd=i.x-o.x*this.xx,this.yd=i.y-o.y*this.yy}}initializeFromTwoPointsArray(t,s){if(t[0].equals(s[0])&&t[1].equals(s[1]))return void this.setIdentity();if(t[0].equals(t[1])){if(s[0].equals(s[1]))return void this.setShift(s[0].sub(t[0]));(0,o.t)("")}if(!t[0].equals(t[1])&&s[0].equals(s[1]))return this.setZero(),void this.shift(s[0]);this.setShiftCoords(-t[0].x,-t[0].y);const i=e.P.distance(t[0],t[1]),h=e.P.distance(s[0],s[1]),r=h/i;this.scale(r,r);const a=t[1].sub(t[0]);a.divThis(i);const l=s[1].sub(s[0]);l.divThis(h);const y=a.crossProduct(l),n=a.dotProduct(l);this.rotate(n,y),this.shiftCoords(s[0].x,s[0].y)}initializeFromTwoPoints(t,s,i,o){const e=[t,s],h=[i,o];this.initializeFromTwoPointsArray(e,h)}transformSizeInPlace(t){(0,o.g)(0)}transformSize(t,s){(0,o.g)(0)}transformTol(t){return(0,o.g)(0),0}transformWithoutTranslateArray(t,s,i){for(let o=0;o<s;++o)this.transformWithoutTranslate(t[o],i[o])}transformWithoutTranslateInPlace(t){const s=this.xx*t.x+this.xy*t.y,i=this.yx*t.x+this.yy*t.y;t.setCoords(s,i)}transformWithoutTranslate(t,s){const i=this.xx*t.x+this.xy*t.y,o=this.yx*t.x+this.yy*t.y;s.setCoords(i,o)}setIdentity(){this.xx=1,this.xy=0,this.xd=0,this.yx=0,this.yy=1,this.yd=0}isIdentity(){return!(1!==this.xx||1!==this.yy||this.xy||this.xd||this.yx||this.yd)}isIdentityTol(t){const s=t*t;return!((0,e.s)(this.xd)+(0,e.s)(this.yd)>s||(0,e.s)(this.xy+this.xd)+(0,e.s)(this.yy+this.yd-1)>s||(0,e.s)(this.xx+this.xd-1)+(0,e.s)(this.yx+this.yd)>s)}isReflective(){return this.xx*this.yy-this.yx*this.xy<0}isUniform(t){const s=this.xx*this.xx+this.yx*this.yx,i=this.xy*this.xy+this.yy*this.yy,o=(s+i)*t;return Math.abs(s-i)<=o&&Math.abs(this.xx*this.xy+this.yx*this.yy)<=o}isUniformNoRotation(){return 0!==this.xx&&Math.abs(this.xx)===Math.abs(this.yy)&&0===this.xy&&0===this.yx}isTranslate(){return 1===this.xx&&1===this.yy&&!this.xy&&!this.yx}isTranslateTol(t){const s=new e.P;return s.setCoords(0,1),this.transformWithoutTranslateInPlace(s),s.y-=1,!(s.sqrLength()>t*t)&&(s.setCoords(1,0),this.transformWithoutTranslateInPlace(s),s.x-=1,s.sqrLength()<=t*t)}isOrthonormal(t){const s=new a;return s.xx=this.xx*this.xx+this.xy*this.xy,s.xy=this.xx*this.yx+this.xy*this.yy,s.yx=this.yx*this.xx+this.yy*this.xy,s.yy=this.yx*this.yx+this.yy*this.yy,s.xd=0,s.yd=0,s.isIdentityTol(t)}isDegenerate(t){return Math.abs(this.xx*this.yy-this.yx*this.xy)<=2*t*(Math.abs(this.xx*this.yy)+Math.abs(this.yx*this.xy))}isZero(){return 0===this.xx&&0===this.yy&&0===this.xy&&0===this.yx&&0===this.xd&&0===this.yd}isScaleAndTranslateTol(t){return this.xy*this.xy+this.yx*this.yx<=(this.xx*this.xx+this.yy*this.yy)*t}setTranslate(t,s){return this.xx=1,this.xy=0,this.xd=t,this.yx=0,this.yy=1,this.yd=s,this}setShiftCoords(t,s){return this.xx=1,this.xy=0,this.xd=t,this.yx=0,this.yy=1,this.yd=s,this}setShift(t){return this.xx=1,this.xy=0,this.xd=t.x,this.yx=0,this.yy=1,this.yd=t.y,this}setScaleCoords(t,s){return this.xx=t,this.xy=0,this.xd=0,this.yx=0,this.yy=s,this.yd=0,this}setScale(t){return this.setScaleCoords(t,t),this}setFlipX(t,s){return this.xx=-1,this.xy=0,this.xd=t+s,this.yx=0,this.yy=1,this.yd=0,this}setFlipY(t,s){return this.xx=1,this.xy=0,this.xd=0,this.yx=0,this.yy=-1,this.yd=t+s,this}setShear(t,s){return this.xx=1,this.xy=t,this.xd=0,this.yx=s,this.yy=1,this.yd=0,this}scale(t,s){return this.xx*=t,this.xy*=t,this.xd*=t,this.yx*=s,this.yy*=s,this.yd*=s,this}setRotateAngle(t){return this.setRotate(Math.cos(t),Math.sin(t))}setRotate(t,s){return this.xx=t,this.xy=-s,this.xd=0,this.yx=s,this.yy=t,this.yd=0,this}setRotateAngleAbout(t,s){return this.setRotateAbout(Math.cos(t),Math.sin(t),s)}setRotateAbout(t,s,i){return this.setTranslate(-i.x,-i.y),this.rotate(t,s),this.translate(i.x,i.y)}setSwapCoordinates(){return this.xx=0,this.xy=1,this.xd=0,this.yx=1,this.yy=0,this.yd=0,this}setRotateCw90(){return this.xx=0,this.xy=1,this.xd=0,this.yx=-1,this.yy=0,this.yd=0,this}setRotateCcw90(){return this.xx=0,this.xy=-1,this.xd=0,this.yx=1,this.yy=0,this.yd=0,this}shiftCoords(t,s){return this.xd+=t,this.yd+=s,this}shift(t){return this.xd+=t.x,this.yd+=t.y,this}translate(t,s){return this.xd+=t,this.yd+=s,this}flipX(t,s){return this.xx=-this.xx,this.xy=-this.xy,this.xd=t+s-this.xd,this}flipY(t,s){return this.yx=-this.yx,this.yy=-this.yy,this.yd=t+s-this.yd,this}shear(t,s){const i=new a;return i.setShear(t,s),this.multiply(i)}rotateAngle(t){const s=new a;return s.setRotateAngle(t),this.multiply(s)}rotate(t,s){const i=new a;return i.setRotate(t,s),this.multiply(i)}rotateAbout(t,s,i){return this.translate(-i.x,-i.y),this.rotate(t,s),this.translate(i.x,i.y)}rotateAngleAbout(t,s){return this.rotateAbout(Math.cos(t),Math.sin(t),s)}setInvert(t){return this.set(t),this.invertThis()}invertThis(){let t=this.xx*this.yy-this.xy*this.yx;if(0===t)return this.setZero(),this;t=1/t;const s=(this.xy*this.yd-this.xd*this.yy)*t,i=(this.xd*this.yx-this.xx*this.yd)*t,o=this.yy*t,e=-this.xy*t,h=-this.yx*t,r=this.xx*t;return this.xd=s,this.yd=i,this.xx=o,this.yy=r,this.xy=e,this.yx=h,this}invertPrecise(t){return this.set(t),this.invertPreciseThis()}invertPreciseThis(){const t=e.M.constructDouble(this.xy),s=e.M.constructDouble(this.xx),i=s.mulDouble(this.yy).sub(t.mulDouble(this.yx));if(i.isZero())return this.setZero(),this;const o=i.clone();o.invertThis();const h=e.M.constructDouble(this.xd),r=t.mulDouble(this.yd).sub(h.mulDouble(this.yy)).mul(o).toDouble(),a=h.mulDouble(this.yx).sub(s.mulDouble(this.yd)).mul(o).toDouble(),l=o.mulDouble(this.yy).toDouble(),y=o.mulDouble(-this.xy).toDouble(),n=o.mulDouble(-this.yx).toDouble(),x=o.mulDouble(this.xx).toDouble();return this.xd=r,this.yd=a,this.xx=l,this.yy=x,this.xy=y,this.yx=n,this}extractScaleTransform(t,s){const i=Math.sqrt(this.xx*this.xx+this.xy*this.xy),o=Math.sqrt(this.yx*this.yx+this.yy*this.yy);s.setScaleCoords(1/i,1/o),s.multiply(this),t.setScaleCoords(i,o)}setFromTwoTriangles(t,s){let i=!0;for(let o=0;o<3;++o)i=i&&t[o].equals(s[o]);if(i)return this.setIdentity(),!0;const o=new e.P;o.setSub(t[0],t[1]);const h=new e.P;h.setSub(t[0],t[2]);const r=new e.P;r.setSub(s[0],s[1]);const a=new e.P;a.setSub(s[0],s[2]);const l=4*Number.EPSILON*(Math.abs(o.x*h.y)+Math.abs(h.x*o.y));let y=o.x*h.y-o.y*h.x;return Math.abs(y)>l?(y=1/y,this.xx=(r.x*h.y-o.y*a.x)*y,this.xy=(o.x*a.x-r.x*h.x)*y,this.yx=(r.y*h.y-o.y*a.y)*y,this.yy=(o.x*a.y-r.y*h.x)*y,this.xd=s[0].x-(this.xx*t[0].x+this.xy*t[0].y),this.yd=s[0].y-(this.yx*t[0].x+this.yy*t[0].y),!0):(this.setZero(),!1)}initializeFromControlPoints(t,s,i,h,n=null){return 0===s?(this.setIdentity(),void(n&&n.setIdentity())):1===s?(this.setShift(h[0].sub(i[0])),void(n&&n.setShift(i[0].sub(h[0])))):(s<3&&(t=1),void(4===t&&s>2?function(t,s,i,h,a){const l=e.P.average(i,s),n=e.P.average(h,s),x=new r({NN:2,MM:2});x.setZero();const w=new r({NN:2,MM:2});w.setZero();for(let t=0;t<s;++t)x.setRowCol(0,0,x.atRowCol(0,0)+(i[t].x-l.x)*(i[t].x-l.x)),x.setRowCol(0,1,x.atRowCol(0,1)+(i[t].x-l.x)*(i[t].y-l.y)),x.setRowCol(1,1,x.atRowCol(1,1)+(i[t].y-l.y)*(i[t].y-l.y)),w.setRowCol(0,0,w.atRowCol(0,0)+(h[t].x-n.x)*(i[t].x-l.x)),w.setRowCol(0,1,w.atRowCol(0,1)+(h[t].x-n.x)*(i[t].y-l.y)),w.setRowCol(1,0,w.atRowCol(1,0)+(h[t].y-n.y)*(i[t].x-l.x)),w.setRowCol(1,1,w.atRowCol(1,1)+(h[t].y-n.y)*(i[t].y-l.y));x.setRowCol(1,0,x.atRowCol(0,1));const u=new r({NN:2,MM:2});x.pseudoInverse(u,!0)||(0,o.a)("Failed to compute pseudo inverse"),w.mul(u,w),y(t,w);const C=l.clone();t.transformInPlace(C),t.xd=n.x-C.x,t.yd=n.y-C.y,a&&(w.pseudoInverse(u,!1)||(0,o.a)("Failed to compute pseudo inverse"),y(a,u),a.transformInPlace(n),a.xd=l.x-n.x,a.yd=l.y-n.y)}(this,s,i,h,n):function(t,s,i,h,n,x){(0,o.g)(1===t||0===t||2===t||3===t),s.setIdentity();const w=e.P.average(h,i),u=e.P.average(n,i);if((0,o.g)(t<l.length&&t>0),8&l[t]){const e=new r({NN:2,MM:2});e.setZero();for(let t=0;t<i;++t)e.setRowCol(0,0,e.atRowCol(0,0)+(n[t].x-u.x)*(h[t].x-w.x)),e.setRowCol(1,0,e.atRowCol(1,0)+(n[t].x-u.x)*(h[t].y-w.y)),e.setRowCol(0,1,e.atRowCol(0,1)+(n[t].y-u.y)*(h[t].x-w.x)),e.setRowCol(1,1,e.atRowCol(1,1)+(n[t].y-u.y)*(h[t].y-w.y));const x=new r({NN:2,MM:2}),C=new r({NN:2,MM:1}),f=new r({NN:2,MM:2});e.svd(x,C,f)||(0,o.a)("Failed to compute svd");const R=new r({NN:2,MM:2});x.transpose(R);const d=new r({NN:2,MM:2});f.mul(R,d),32&l[t]||d.determinant()<0&&(R.setRowCol(1,0,-R.atRowCol(1,0)),R.setRowCol(1,1,-R.atRowCol(1,1)),f.mul(R,d));const c=new a;y(c,d),s.set(c)}if(2&l[t]){let t=0,o=0;for(let e=0;e<i;++e){const i=h[e].sub(w);t+=i.sqrLength(),s.transformInPlace(i),o+=i.dotProduct(n[e].sub(u))}if(0===t)0===o?s.setIdentity():s.setZero();else{const i=o/t;s.scale(i,i)}}else(0,o.g)(!(4&l[t]));const C=w.clone();s.transformInPlace(C),s.xd=u.x-C.x,s.yd=u.y-C.y,x&&(x.set(s),x.invertThis(),x.isZero()&&(x.xd=w.x,x.yd=w.y))}(t,this,s,i,h,n)))}calculateErrors(t,s,i,h){(0,o.g)(t>0&&null!==s&&null!==i);let r=0;for(let o=0;o<t;++o){const t=this.transform(s[o]),a=e.P.sqrDistance(i[o],t);r+=a,h&&(h[o]=Math.sqrt(a))}return Math.sqrt(r/t)}}const l=[43,11,41,9,61];function y(t,s){(0,o.g)(!(2!==s.rows()&&3!==s.rows()||2!==s.cols()&&3!==s.rows())),t.xx=s.atRowCol(0,0),t.xy=s.atRowCol(0,1),t.yx=s.atRowCol(1,0),t.yy=s.atRowCol(1,1),3===s.cols()?(t.xd=s.atRowCol(0,2),t.yd=s.atRowCol(1,2)):(t.xd=0,t.yd=0)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1878],{11878:(t,s,i)=>{i.d(s,{T:()=>a});var o=i(55537),e=i(83661);class h{constructor(t,s,i){if(t instanceof h)return this.data=t.data,this.N=t.N,this.M=t.M,t.data=null,t.N=0,void(t.M=0);this.data=t,this.N=s,this.M=i}assignCopy(t){return this===t||((0,o.g)(this.N*this.M==t.N*t.M),this.data.set(t.data),this.N=t.N,this.M=t.M),this}setZero(){return this.data?.fill(0),this}setIdentity(){for(let t=0;t<this.N;t++)for(let s=0;s<this.M;s++)this.setRowCol(t,s,t===s?1:0);return this}rows(){return this.N}cols(){return this.M}row(t){return(0,o.g)(0),{}}set(t,s){return this.data[t]=s,this}setRowCol(t,s,i){return this.data[t*this.M+s]=i,this}at(t){return this.data[t]}atRowCol(t,s){return this.data[t*this.M+s]}mulScalar(t,s){(0,o.g)(0)}mul(t,s){if((0,o.g)(this.M===t.rows()),(0,o.g)(this.N===s.rows()),(0,o.g)(t.cols()===s.cols()),s===this){const i=new Float64Array(this.N*this.M),o=new h(i,this.N,this.M);return this.mul(t,o),void s.assignCopy(o)}if(s===t){const i=new Float64Array(t.N*t.M),o=new h(i,t.N,t.M);return this.mul(t,o),void s.assignCopy(o)}const i=t.cols();for(let o=0;o<this.N;o++)for(let e=0;e<i;e++){let i=0;for(let s=0;s<this.M;s++)i+=this.atRowCol(o,s)*t.atRowCol(s,e);s.setRowCol(o,e,i)}}mulTranspose(t,s){if((0,o.g)(this.M===t.cols()),(0,o.g)(this.N===s.rows()),(0,o.g)(t.rows()===s.cols()),s===this){const i=new Float64Array(this.N*this.M),o=new h(i,this.N,this.M);return this.mulTranspose(t,o),void s.assignCopy(o)}if(s===t){const i=new Float64Array(t.N*t.M),o=new h(i,t.N,t.M);return this.mulTranspose(t,o),void s.assignCopy(o)}const i=t.rows();for(let o=0;o<this.N;o++)for(let e=0;e<i;e++){let i=0;for(let s=0;s<this.M;s++)i+=this.atRowCol(o,s)*t.atRowCol(e,s);s.setRowCol(o,e,i)}}mulLeft(t,s){(0,o.g)(0)}mulLeftTranspose(t,s){(0,o.g)(0)}mulDiag(t,s){if((0,o.g)(this.M===t.N*t.M),(0,o.g)(this.N===s.rows()),(0,o.g)(this.M===s.cols()),s===this){const i=new Float64Array(this.N*this.M),o=new h(i,this.N,this.M);return this.mulDiag(t,o),void s.assignCopy(o)}const i=this.M;for(let o=0;o<this.N;o++)for(let e=0;e<i;e++)s.setRowCol(o,e,this.atRowCol(o,e)*t.at(e))}transposeInPlace(){if(this.N===this.M){for(let t=0;t<this.N;t++)for(let s=t+1;s<this.M;s++){const i=this.atRowCol(t,s);this.setRowCol(t,s,this.atRowCol(s,t)),this.setRowCol(s,t,i)}return this}const t=new Float64Array(this.N*this.M),s=new h(t,this.N,this.M);return s.assignCopy(this),this.M=(0,e.c)(this.N,this.N=this.M),s.transpose(this),this}transpose(t){if(this!==t){h.checkDims(t,this.M,this.N);for(let s=0;s<this.N;s++)for(let i=0;i<this.M;i++)t.setRowCol(i,s,this.atRowCol(s,i))}else t.transposeInPlace()}add(t,s){}svd(t,s,i,e=!1){if(h.checkDims(t,this.N,this.M),h.checkDims(s,this.M,1),h.checkDims(i,this.M,this.M),e){if((0,o.g)(this.N===this.M),!this.symmetricEigen(s,i))return!1;for(let t=0;t<this.M;++t)s.at(t)<0&&s.set(t,0);return t.assignCopy(i),!0}let r,a,l,y,n,x,w,u=0,C=0,f=0,R=0,d=0;const c=this.M,M=this.N;t.assignCopy(this);const m=new Float64Array(c),N=new h(m,c,1),b=(t,s)=>s>=0?Math.abs(t):-Math.abs(t),g=(t,s)=>{if((t=Math.abs(t))>(s=Math.abs(s))){const i=s/t;return t*Math.sqrt(i*i+1)}if(s>0){const i=t/s;return s*Math.sqrt(i*i+1)}return 0};for(let i=0;i<c;i++){if(u=i+1,N.set(i,R*f),f=y=R=0,i<M){for(let s=i;s<M;s++)R+=Math.abs(t.atRowCol(s,i));if(R){for(let s=i;s<M;s++)t.setRowCol(s,i,t.atRowCol(s,i)/R),y+=t.atRowCol(s,i)*t.atRowCol(s,i);a=t.atRowCol(i,i),f=-b(Math.sqrt(y),a),l=a*f-y,t.setRowCol(i,i,a-f);for(let s=u;s<c;s++){y=0;for(let o=i;o<M;o++)y+=t.atRowCol(o,i)*t.atRowCol(o,s);a=y/l;for(let o=i;o<M;o++)t.setRowCol(o,s,t.atRowCol(o,s)+a*t.atRowCol(o,i))}for(let s=i;s<M;s++)t.setRowCol(s,i,t.atRowCol(s,i)*R)}}if(s.set(i,R*f),f=y=R=0,i<M&&i!==c-1){for(let s=u;s<c;s++)R+=Math.abs(t.atRowCol(i,s));if(R){for(let s=u;s<c;s++)t.setRowCol(i,s,t.atRowCol(i,s)/R),y+=t.atRowCol(i,s)*t.atRowCol(i,s);a=t.atRowCol(i,u),f=-b(Math.sqrt(y),a),l=a*f-y,t.setRowCol(i,u,a-f);for(let s=u;s<c;s++)N.set(s,t.atRowCol(i,s)/l);for(let s=u;s<M;s++){y=0;for(let o=u;o<c;o++)y+=t.atRowCol(s,o)*t.atRowCol(i,o);for(let i=u;i<c;i++)t.setRowCol(s,i,t.atRowCol(s,i)+y*N.at(i))}for(let s=u;s<c;s++)t.setRowCol(i,s,t.atRowCol(i,s)*R)}}const o=Math.abs(s.at(i))+Math.abs(N.at(i));d=o>d?o:d}for(let s=c-1;s>=0;s--){if(s<c-1){if(f){for(let o=u;o<c;o++)i.setRowCol(o,s,t.atRowCol(s,o)/t.atRowCol(s,u)/f);for(let o=u;o<c;o++){y=0;for(let e=u;e<c;e++)y+=t.atRowCol(s,e)*i.atRowCol(e,o);for(let t=u;t<c;t++)i.setRowCol(t,o,i.atRowCol(t,o)+y*i.atRowCol(t,s))}}for(let t=u;t<c;t++)i.setRowCol(s,t,0),i.setRowCol(t,s,0)}i.setRowCol(s,s,1),f=N.at(s),u=s}for(let i=(M<c?M:c)-1;i>=0;i--){u=i+1,f=s.at(i);for(let s=u;s<c;s++)t.setRowCol(i,s,0);if(f){f=1/f;for(let s=u;s<c;s++){y=0;for(let o=u;o<M;o++)y+=t.atRowCol(o,i)*t.atRowCol(o,s);a=y/t.atRowCol(i,i)*f;for(let o=i;o<M;o++)t.setRowCol(o,s,t.atRowCol(o,s)+a*t.atRowCol(o,i))}for(let s=i;s<M;s++)t.setRowCol(s,i,t.atRowCol(s,i)*f)}else for(let s=i;s<M;s++)t.setRowCol(s,i,0);t.setRowCol(i,i,t.atRowCol(i,i)+1)}for(let o=c-1;o>=0;o--)for(let e=1;;e++){let h=1;for(u=o;u>=0;u--){if(C=u-1,Math.abs(N.at(u))+d===d){h=0;break}if(Math.abs(s.at(C))+d===d)break}if(h){r=0,y=1;for(let i=u;i<=o&&(a=y*N.at(i),N.set(i,N.at(i)*r),Math.abs(a)+d!==d);i++){f=s.at(i),l=g(a,f),s.set(i,l),l=1/l,r=f*l,y=-a*l;for(let s=0;s<M;s++)x=t.atRowCol(s,C),w=t.atRowCol(s,i),t.setRowCol(s,C,x*r+w*y),t.setRowCol(s,i,w*r-x*y)}}if(w=s.at(o),u===o){if(w<0){s.set(o,-w);for(let t=0;t<c;t++)i.setRowCol(t,o,-i.atRowCol(t,o))}break}if(100===e)return!1;n=s.at(u),C=o-1,x=s.at(C),f=N.at(C),l=N.at(o),a=((x-w)*(x+w)+(f-l)*(f+l))/(2*l*x),f=g(a,1),a=((n-w)*(n+w)+l*(x/(a+b(f,a))-l))/n,r=y=1;for(let o=u;o<=C;o++){const e=o+1;f=N.at(e),x=s.at(e),l=y*f,f*=r,w=g(a,l),N.set(o,w),r=a/w,y=l/w,a=n*r+f*y,f=f*r-n*y,l=x*y,x*=r;for(let t=0;t<c;t++)n=i.atRowCol(t,o),w=i.atRowCol(t,e),i.setRowCol(t,o,n*r+w*y),i.setRowCol(t,e,w*r-n*y);w=g(a,l),s.set(o,w),w&&(w=1/w,r=a*w,y=l*w),a=r*f+y*x,n=r*x-y*f;for(let s=0;s<M;s++)x=t.atRowCol(s,o),w=t.atRowCol(s,e),t.setRowCol(s,o,x*r+w*y),t.setRowCol(s,e,w*r-x*y)}N.set(u,0),N.set(o,a),s.set(o,n)}const p=new Float64Array(this.N),P=new Float64Array(this.M),v=new h(p,this.N,1),T=new h(P,this.M,1);let I=1;do{I*=3,I++}while(I<=this.M);do{I/=3,I=Math.trunc(I);for(let o=I;o<this.M;o++){const e=s.at(o);for(let s=0;s<this.N;s++)v.set(s,t.atRowCol(s,o));for(let t=0;t<this.M;t++)T.set(t,i.atRowCol(t,o));let h=o;for(;s.at(h-I)<e;){s.set(h,s.at(h-I));for(let s=0;s<this.N;s++)t.setRowCol(s,h,t.atRowCol(s,h-I));for(let t=0;t<this.M;t++)i.setRowCol(t,h,i.atRowCol(t,h-I));if(h-=I,h<I)break}s.set(h,e);for(let s=0;s<this.N;s++)t.setRowCol(s,h,v.at(s));for(let t=0;t<this.M;t++)i.setRowCol(t,h,T.at(t))}}while(I>1);for(let s=0;s<this.M;s++){let o=0;for(let i=0;i<this.N;i++)t.atRowCol(i,s)<0&&o++;for(let t=0;t<this.M;t++)i.atRowCol(t,s)<0&&o++;if(o>Math.trunc((this.N+this.M)/2)){for(let i=0;i<this.N;i++)t.setRowCol(i,s,-t.atRowCol(i,s));for(let t=0;t<this.M;t++)i.setRowCol(t,s,-i.atRowCol(t,s))}}return!0}isSymmetric(){if(this.N!==this.M)return!1;for(let t=0;t<this.N;t++)for(let s=t+1;s<this.M;s++)if(this.atRowCol(t,s)!==this.atRowCol(s,t))return!1;return!0}isZero(){return(0,o.g)(0),!1}isIdentity(){return(0,o.g)(0),!1}equals(t,s){if(void 0!==s&&(0,o.g)(0),this.N!==t.N||this.M!==t.M)return!1;for(let s=0;s<this.N*this.M;s++)if(this.data[s]!==t.data[s])return!1;return!0}maxElement(){return(0,o.g)(0),0}minElement(){return(0,o.g)(0),0}determinant(){if((0,o.g)(this.N===this.M),1===this.N)return this.data[0];if(2===this.N)return this.data[0]*this.data[3]-this.data[1]*this.data[2];if(3===this.N){const t=this;return t.atRowCol(0,0)*(t.atRowCol(1,1)*t.atRowCol(2,2)-t.atRowCol(1,2)*t.atRowCol(2,1))-t.atRowCol(0,1)*(t.atRowCol(1,0)*t.atRowCol(2,2)-t.atRowCol(2,0)*t.atRowCol(1,2))+t.atRowCol(0,2)*(t.atRowCol(1,0)*t.atRowCol(2,1)-t.atRowCol(1,1)*t.atRowCol(2,0))}const t=new Float64Array(this.N*this.N),s=new h(t,this.N,this.N),i=new Float64Array(this.N);if(!this.luDecomposition(s,i))return 0;let e=1;for(let t=0;t<this.N;t++)e*=s.atRowCol(t,t),i[t]!==t&&(e=-e);return e}submatrix(t,s,i){(0,o.g)(0)}inverse(t){(0,o.g)(0)}pseudoInverse(t,s=!1,i=2220446049250313e-31){if(t.setZero(),1===this.N&&1===this.M)return 0!==this.atRowCol(0,0)?t.setRowCol(0,0,1/this.atRowCol(0,0)):t.setRowCol(0,0,0),!0;if(2===this.N&&2===this.M){const s=this.atRowCol(0,0)*this.atRowCol(1,1)-this.atRowCol(0,1)*this.atRowCol(1,0),i=1e-5*(Math.abs(this.atRowCol(0,0)*this.atRowCol(1,1))+Math.abs(this.atRowCol(0,1)*this.atRowCol(1,0)));if(Math.abs(s)>i)return t.setRowCol(0,0,this.atRowCol(1,1)/s),t.setRowCol(0,1,-this.atRowCol(0,1)/s),t.setRowCol(1,0,-this.atRowCol(1,0)/s),t.setRowCol(1,1,this.atRowCol(0,0)/s),!0}const o=new Float64Array(this.N*this.M),e=new h(o,this.N,this.M),r=new Float64Array(this.M),a=new h(r,this.M,1),l=new Float64Array(this.M*this.M),y=new h(l,this.M,this.M);if(!this.svd(e,a,y,s))return!1;const n=Math.max(this.N,this.M),x=i*Math.abs(a.at(0))*n;for(let t=0;t<this.M;t++)a.at(t)>x?a.set(t,1/a.at(t)):a.set(t,0);return y.mulDiag(a,t),t.mulTranspose(e,t),!0}luDecomposition(t,s){return(0,o.g)(0),!1}symmetricEigen(t,s){(0,o.g)(this.rows()===this.cols()),(0,o.g)(this.rows()===t.rows()),(0,o.g)(s.rows()===s.cols()&&s.rows()===this.rows()),(0,o.g)(this.isSymmetric());const i=new Float64Array(this.N*this.M),e=new h(i,this.N,this.M);e.assignCopy(this);const r=100/Number.EPSILON,a=this.rows(),l=new Float64Array(a),y=new Float64Array(a),n=new h(l,a,1),x=new h(y,a,1);for(let s=0;s<a;s++)n.set(s,e.atRowCol(s,s)),t.set(s,e.atRowCol(s,s)),x.set(s,0);s.setIdentity();const w=()=>{const i=n;s.transposeInPlace();let o=1;do{o*=3,o++}while(o<=a);do{o/=3,o=Math.trunc(o);for(let e=o;e<a;e++){const h=t.at(e),r=Math.abs(h);for(let t=0;t<this.M;t++)i.set(t,s.atRowCol(t,e));let a=e;for(;Math.abs(t.at(a-o))<r;){t.set(a,t.at(a-o));for(let t=0;t<this.M;t++)s.setRowCol(t,a,s.atRowCol(t,a-o));if(a-=o,a<o)break}if(a!==e){t.set(a,h);for(let t=0;t<this.M;t++)s.setRowCol(t,a,i.at(t))}}}while(o>1)};for(let i=1;;i++){let o=0;for(let t=1;t<a;t++)for(let s=0;s<t;s++)o+=Math.abs(e.atRowCol(t,s));if(0===o)return w(),!0;const h=i<4?.2*o/(a*a):0;for(let o=0;o<a;o++)for(let l=o+1;l<a;l++){let y=r*Math.abs(e.atRowCol(l,o));if(i>4&&y<=Math.abs(t.at(o))&&y<=Math.abs(t.at(l)))e.setRowCol(l,o,0);else if(Math.abs(e.atRowCol(l,o))>h){let i,h=t.at(l)-t.at(o);if(y<Math.abs(h))i=e.atRowCol(l,o)/h;else{const t=.5*h/e.atRowCol(l,o);i=1/(Math.abs(t)+Math.sqrt(1+t*t)),t<0&&(i=-i)}const r=1/Math.sqrt(1+i*i),n=i*r,w=n/(1+r);h=i*e.atRowCol(l,o),x.set(o,x.at(o)-h),x.set(l,x.at(l)+h),t.set(o,t.at(o)-h),t.set(l,t.at(l)+h),e.setRowCol(l,o,0);let u=0;for(;u<o;u++)y=e.atRowCol(o,u),h=e.atRowCol(l,u),e.setRowCol(o,u,y-n*(h+y*w)),e.setRowCol(l,u,h+n*(y-h*w));for(u++;u<l;u++)y=e.atRowCol(u,o),h=e.atRowCol(l,u),e.setRowCol(u,o,y-n*(h+y*w)),e.setRowCol(l,u,h+n*(y-h*w));for(u++;u<a;u++)y=e.atRowCol(u,o),h=e.atRowCol(u,l),e.setRowCol(u,o,y-n*(h+y*w)),e.setRowCol(u,l,h+n*(y-h*w));for(u=0;u<a;u++)y=s.atRowCol(o,u),h=s.atRowCol(l,u),s.setRowCol(o,u,y-n*(h+y*w)),s.setRowCol(l,u,h+n*(y-h*w))}}for(let s=0;s<a;s++)n.set(s,n.at(s)+x.at(s)),t.set(s,n.at(s)),x.set(s,0)}}static checkDims(t,s,i){(0,o.g)(t.rows()===s&&t.cols()===i)}}class r extends h{constructor(t){if(t.copy){const s=new Float64Array(t.copy.N*t.copy.M);return super(s,t.copy.N,t.copy.M),this.buffer=s,void this.assignCopy(t.copy)}const s=new Float64Array(t.NN*t.MM);super(s,t.NN,t.MM),this.buffer=s,t.initializerList&&(0,e.b)(this.buffer,t.initializerList,0,0,t.initializerList.length)}assignCopy(t){return this===t||super.assignCopy(t),this}}class a{constructor(t){this.m_TransformationType=1,void 0===t?this.setIdentity():t instanceof a?this.set(t):this.setScale(t)}set(t){return this.xx=t.xx,this.xy=t.xy,this.xd=t.xd,this.yx=t.yx,this.yy=t.yy,this.yd=t.yd,this}clone(){return(new a).set(this)}setZero(){this.xx=0,this.yy=0,this.xy=0,this.yx=0,this.xd=0,this.yd=0}isEqual(t){return this===t||this.xx===t.xx&&this.xy===t.xy&&this.xd===t.xd&&this.yx===t.yx&&this.yy===t.yy&&this.yd===t.yd}transformInPlace(t){const s=this.xx*t.x+this.xy*t.y+this.xd,i=this.yx*t.x+this.yy*t.y+this.yd;t.x=s,t.y=i}transform(t){const s=t.clone();return this.transformInPlace(s),s}queryTransform(t,s){const i=this.xx*t.x+this.xy*t.y+this.xd,o=this.yx*t.x+this.yy*t.y+this.yd;s.setCoords(i,o)}transformEnvInPlace(t){if(t.isEmpty())return;const s=(0,e.m)(e.P,4);t.queryCorners(s),this.transformPoints2D(s,4,s),t.setFromPoints(s,4)}queryTransformEnv(t,s){(0,o.g)(0)}transformPoints2D(t,s,i){for(let o=0;o<s;++o)this.queryTransform(t[o],i[o])}transformInterleavedPoints(t,s,i){s*=2;const o=e.P.getNAN();for(let e=0;e<s;e+=2)o.x=t[e],o.y=t[e+1],this.transformInPlace(o),i[e]=o.x,i[e+1]=o.y}multiply(t){return a.st_multiply(this,t,this),this}mulLeft(t){return(0,o.g)(0),this}static st_multiply(t,s,i){const o=t.xx*s.xx+t.yx*s.xy,e=t.xy*s.xx+t.yy*s.xy,h=t.xd*s.xx+t.yd*s.xy+s.xd,r=t.xx*s.yx+t.yx*s.yy,a=t.xy*s.yx+t.yy*s.yy,l=t.xd*s.yx+t.yd*s.yy+s.yd;i.xx=o,i.xy=e,i.xd=h,i.yx=r,i.yy=a,i.yd=l}getCoefficients(t){(0,o.g)(t.length>=6),t[0]=this.xx,t[1]=this.xy,t[2]=this.xd,t[3]=this.yx,t[4]=this.yy,t[5]=this.yd}setCoefficients(t){(0,o.g)(t.length>=6),this.xx=t[0],this.xy=t[1],this.xd=t[2],this.yx=t[3],this.yy=t[4],this.yd=t[5]}copyTo(t){(0,o.g)(0)}initializeFromRect(t,s){t.isEmpty()||s.isEmpty()||!t.width()||!t.height()?this.setZero():(this.xy=this.yx=0,this.xx=s.width()/t.width(),this.yy=s.height()/t.height(),this.xd=s.xmin-t.xmin*this.xx,this.yd=s.ymin-t.ymin*this.yy)}initializeFromRectIsotropic(t,s){if(t.isEmpty()||!t.width()||!t.height()||s.isEmpty())this.setZero();else{this.yx=0,this.xy=0,this.xx=s.width()/t.width(),this.yy=s.height()/t.height(),this.xx>this.yy?this.xx=this.yy:this.yy=this.xx;const i=s.getCenter(),o=t.getCenter();this.xd=i.x-o.x*this.xx,this.yd=i.y-o.y*this.yy}}initializeFromTwoPointsArray(t,s){if(t[0].equals(s[0])&&t[1].equals(s[1]))return void this.setIdentity();if(t[0].equals(t[1])){if(s[0].equals(s[1]))return void this.setShift(s[0].sub(t[0]));(0,o.a)("")}if(!t[0].equals(t[1])&&s[0].equals(s[1]))return this.setZero(),void this.shift(s[0]);this.setShiftCoords(-t[0].x,-t[0].y);const i=e.P.distance(t[0],t[1]),h=e.P.distance(s[0],s[1]),r=h/i;this.scale(r,r);const a=t[1].sub(t[0]);a.divThis(i);const l=s[1].sub(s[0]);l.divThis(h);const y=a.crossProduct(l),n=a.dotProduct(l);this.rotate(n,y),this.shiftCoords(s[0].x,s[0].y)}initializeFromTwoPoints(t,s,i,o){const e=[t,s],h=[i,o];this.initializeFromTwoPointsArray(e,h)}transformSizeInPlace(t){(0,o.g)(0)}transformSize(t,s){(0,o.g)(0)}transformTol(t){return(0,o.g)(0),0}transformWithoutTranslateArray(t,s,i){for(let o=0;o<s;++o)this.transformWithoutTranslate(t[o],i[o])}transformWithoutTranslateInPlace(t){const s=this.xx*t.x+this.xy*t.y,i=this.yx*t.x+this.yy*t.y;t.setCoords(s,i)}transformWithoutTranslate(t,s){const i=this.xx*t.x+this.xy*t.y,o=this.yx*t.x+this.yy*t.y;s.setCoords(i,o)}setIdentity(){this.xx=1,this.xy=0,this.xd=0,this.yx=0,this.yy=1,this.yd=0}isIdentity(){return!(1!==this.xx||1!==this.yy||this.xy||this.xd||this.yx||this.yd)}isIdentityTol(t){const s=t*t;return!((0,e.a)(this.xd)+(0,e.a)(this.yd)>s||(0,e.a)(this.xy+this.xd)+(0,e.a)(this.yy+this.yd-1)>s||(0,e.a)(this.xx+this.xd-1)+(0,e.a)(this.yx+this.yd)>s)}isReflective(){return this.xx*this.yy-this.yx*this.xy<0}isUniform(t){const s=this.xx*this.xx+this.yx*this.yx,i=this.xy*this.xy+this.yy*this.yy,o=(s+i)*t;return Math.abs(s-i)<=o&&Math.abs(this.xx*this.xy+this.yx*this.yy)<=o}isUniformNoRotation(){return 0!==this.xx&&Math.abs(this.xx)===Math.abs(this.yy)&&0===this.xy&&0===this.yx}isTranslate(){return 1===this.xx&&1===this.yy&&!this.xy&&!this.yx}isTranslateTol(t){const s=new e.P;return s.setCoords(0,1),this.transformWithoutTranslateInPlace(s),s.y-=1,!(s.sqrLength()>t*t)&&(s.setCoords(1,0),this.transformWithoutTranslateInPlace(s),s.x-=1,s.sqrLength()<=t*t)}isOrthonormal(t){const s=new a;return s.xx=this.xx*this.xx+this.xy*this.xy,s.xy=this.xx*this.yx+this.xy*this.yy,s.yx=this.yx*this.xx+this.yy*this.xy,s.yy=this.yx*this.yx+this.yy*this.yy,s.xd=0,s.yd=0,s.isIdentityTol(t)}isDegenerate(t){return Math.abs(this.xx*this.yy-this.yx*this.xy)<=2*t*(Math.abs(this.xx*this.yy)+Math.abs(this.yx*this.xy))}isZero(){return 0===this.xx&&0===this.yy&&0===this.xy&&0===this.yx&&0===this.xd&&0===this.yd}isScaleAndTranslateTol(t){return this.xy*this.xy+this.yx*this.yx<=(this.xx*this.xx+this.yy*this.yy)*t}setTranslate(t,s){return this.xx=1,this.xy=0,this.xd=t,this.yx=0,this.yy=1,this.yd=s,this}setShiftCoords(t,s){return this.xx=1,this.xy=0,this.xd=t,this.yx=0,this.yy=1,this.yd=s,this}setShift(t){return this.xx=1,this.xy=0,this.xd=t.x,this.yx=0,this.yy=1,this.yd=t.y,this}setScaleCoords(t,s){return this.xx=t,this.xy=0,this.xd=0,this.yx=0,this.yy=s,this.yd=0,this}setScale(t){return this.setScaleCoords(t,t),this}setFlipX(t,s){return this.xx=-1,this.xy=0,this.xd=t+s,this.yx=0,this.yy=1,this.yd=0,this}setFlipY(t,s){return this.xx=1,this.xy=0,this.xd=0,this.yx=0,this.yy=-1,this.yd=t+s,this}setShear(t,s){return this.xx=1,this.xy=t,this.xd=0,this.yx=s,this.yy=1,this.yd=0,this}scale(t,s){return this.xx*=t,this.xy*=t,this.xd*=t,this.yx*=s,this.yy*=s,this.yd*=s,this}setRotateAngle(t){return this.setRotate(Math.cos(t),Math.sin(t))}setRotate(t,s){return this.xx=t,this.xy=-s,this.xd=0,this.yx=s,this.yy=t,this.yd=0,this}setRotateAngleAbout(t,s){return this.setRotateAbout(Math.cos(t),Math.sin(t),s)}setRotateAbout(t,s,i){return this.setTranslate(-i.x,-i.y),this.rotate(t,s),this.translate(i.x,i.y)}setSwapCoordinates(){return this.xx=0,this.xy=1,this.xd=0,this.yx=1,this.yy=0,this.yd=0,this}setRotateCw90(){return this.xx=0,this.xy=1,this.xd=0,this.yx=-1,this.yy=0,this.yd=0,this}setRotateCcw90(){return this.xx=0,this.xy=-1,this.xd=0,this.yx=1,this.yy=0,this.yd=0,this}shiftCoords(t,s){return this.xd+=t,this.yd+=s,this}shift(t){return this.xd+=t.x,this.yd+=t.y,this}translate(t,s){return this.xd+=t,this.yd+=s,this}flipX(t,s){return this.xx=-this.xx,this.xy=-this.xy,this.xd=t+s-this.xd,this}flipY(t,s){return this.yx=-this.yx,this.yy=-this.yy,this.yd=t+s-this.yd,this}shear(t,s){const i=new a;return i.setShear(t,s),this.multiply(i)}rotateAngle(t){const s=new a;return s.setRotateAngle(t),this.multiply(s)}rotate(t,s){const i=new a;return i.setRotate(t,s),this.multiply(i)}rotateAbout(t,s,i){return this.translate(-i.x,-i.y),this.rotate(t,s),this.translate(i.x,i.y)}rotateAngleAbout(t,s){return this.rotateAbout(Math.cos(t),Math.sin(t),s)}setInvert(t){return this.set(t),this.invertThis()}invertThis(){let t=this.xx*this.yy-this.xy*this.yx;if(0===t)return this.setZero(),this;t=1/t;const s=(this.xy*this.yd-this.xd*this.yy)*t,i=(this.xd*this.yx-this.xx*this.yd)*t,o=this.yy*t,e=-this.xy*t,h=-this.yx*t,r=this.xx*t;return this.xd=s,this.yd=i,this.xx=o,this.yy=r,this.xy=e,this.yx=h,this}invertPrecise(t){return this.set(t),this.invertPreciseThis()}invertPreciseThis(){const t=e.M.constructDouble(this.xy),s=e.M.constructDouble(this.xx),i=s.mulDouble(this.yy).sub(t.mulDouble(this.yx));if(i.isZero())return this.setZero(),this;const o=i.clone();o.invertThis();const h=e.M.constructDouble(this.xd),r=t.mulDouble(this.yd).sub(h.mulDouble(this.yy)).mul(o).toDouble(),a=h.mulDouble(this.yx).sub(s.mulDouble(this.yd)).mul(o).toDouble(),l=o.mulDouble(this.yy).toDouble(),y=o.mulDouble(-this.xy).toDouble(),n=o.mulDouble(-this.yx).toDouble(),x=o.mulDouble(this.xx).toDouble();return this.xd=r,this.yd=a,this.xx=l,this.yy=x,this.xy=y,this.yx=n,this}extractScaleTransform(t,s){const i=Math.sqrt(this.xx*this.xx+this.xy*this.xy),o=Math.sqrt(this.yx*this.yx+this.yy*this.yy);s.setScaleCoords(1/i,1/o),s.multiply(this),t.setScaleCoords(i,o)}setFromTwoTriangles(t,s){let i=!0;for(let o=0;o<3;++o)i=i&&t[o].equals(s[o]);if(i)return this.setIdentity(),!0;const o=new e.P;o.setSub(t[0],t[1]);const h=new e.P;h.setSub(t[0],t[2]);const r=new e.P;r.setSub(s[0],s[1]);const a=new e.P;a.setSub(s[0],s[2]);const l=4*Number.EPSILON*(Math.abs(o.x*h.y)+Math.abs(h.x*o.y));let y=o.x*h.y-o.y*h.x;return Math.abs(y)>l?(y=1/y,this.xx=(r.x*h.y-o.y*a.x)*y,this.xy=(o.x*a.x-r.x*h.x)*y,this.yx=(r.y*h.y-o.y*a.y)*y,this.yy=(o.x*a.y-r.y*h.x)*y,this.xd=s[0].x-(this.xx*t[0].x+this.xy*t[0].y),this.yd=s[0].y-(this.yx*t[0].x+this.yy*t[0].y),!0):(this.setZero(),!1)}initializeFromControlPoints(t,s,i,h,n=null){return 0===s?(this.setIdentity(),void(n&&n.setIdentity())):1===s?(this.setShift(h[0].sub(i[0])),void(n&&n.setShift(i[0].sub(h[0])))):(s<3&&(t=1),void(4===t&&s>2?function(t,s,i,h,a){const l=e.P.average(i,s),n=e.P.average(h,s),x=new r({NN:2,MM:2});x.setZero();const w=new r({NN:2,MM:2});w.setZero();for(let t=0;t<s;++t)x.setRowCol(0,0,x.atRowCol(0,0)+(i[t].x-l.x)*(i[t].x-l.x)),x.setRowCol(0,1,x.atRowCol(0,1)+(i[t].x-l.x)*(i[t].y-l.y)),x.setRowCol(1,1,x.atRowCol(1,1)+(i[t].y-l.y)*(i[t].y-l.y)),w.setRowCol(0,0,w.atRowCol(0,0)+(h[t].x-n.x)*(i[t].x-l.x)),w.setRowCol(0,1,w.atRowCol(0,1)+(h[t].x-n.x)*(i[t].y-l.y)),w.setRowCol(1,0,w.atRowCol(1,0)+(h[t].y-n.y)*(i[t].x-l.x)),w.setRowCol(1,1,w.atRowCol(1,1)+(h[t].y-n.y)*(i[t].y-l.y));x.setRowCol(1,0,x.atRowCol(0,1));const u=new r({NN:2,MM:2});x.pseudoInverse(u,!0)||(0,o.b)("Failed to compute pseudo inverse"),w.mul(u,w),y(t,w);const C=l.clone();t.transformInPlace(C),t.xd=n.x-C.x,t.yd=n.y-C.y,a&&(w.pseudoInverse(u,!1)||(0,o.b)("Failed to compute pseudo inverse"),y(a,u),a.transformInPlace(n),a.xd=l.x-n.x,a.yd=l.y-n.y)}(this,s,i,h,n):function(t,s,i,h,n,x){(0,o.g)(1===t||0===t||2===t||3===t),s.setIdentity();const w=e.P.average(h,i),u=e.P.average(n,i);if((0,o.g)(t<l.length&&t>0),8&l[t]){const e=new r({NN:2,MM:2});e.setZero();for(let t=0;t<i;++t)e.setRowCol(0,0,e.atRowCol(0,0)+(n[t].x-u.x)*(h[t].x-w.x)),e.setRowCol(1,0,e.atRowCol(1,0)+(n[t].x-u.x)*(h[t].y-w.y)),e.setRowCol(0,1,e.atRowCol(0,1)+(n[t].y-u.y)*(h[t].x-w.x)),e.setRowCol(1,1,e.atRowCol(1,1)+(n[t].y-u.y)*(h[t].y-w.y));const x=new r({NN:2,MM:2}),C=new r({NN:2,MM:1}),f=new r({NN:2,MM:2});e.svd(x,C,f)||(0,o.b)("Failed to compute svd");const R=new r({NN:2,MM:2});x.transpose(R);const d=new r({NN:2,MM:2});f.mul(R,d),32&l[t]||d.determinant()<0&&(R.setRowCol(1,0,-R.atRowCol(1,0)),R.setRowCol(1,1,-R.atRowCol(1,1)),f.mul(R,d));const c=new a;y(c,d),s.set(c)}if(2&l[t]){let t=0,o=0;for(let e=0;e<i;++e){const i=h[e].sub(w);t+=i.sqrLength(),s.transformInPlace(i),o+=i.dotProduct(n[e].sub(u))}if(0===t)0===o?s.setIdentity():s.setZero();else{const i=o/t;s.scale(i,i)}}else(0,o.g)(!(4&l[t]));const C=w.clone();s.transformInPlace(C),s.xd=u.x-C.x,s.yd=u.y-C.y,x&&(x.set(s),x.invertThis(),x.isZero()&&(x.xd=w.x,x.yd=w.y))}(t,this,s,i,h,n)))}calculateErrors(t,s,i,h){(0,o.g)(t>0&&null!==s&&null!==i);let r=0;for(let o=0;o<t;++o){const t=this.transform(s[o]),a=e.P.sqrDistance(i[o],t);r+=a,h&&(h[o]=Math.sqrt(a))}return Math.sqrt(r/t)}}const l=[43,11,41,9,61];function y(t,s){(0,o.g)(!(2!==s.rows()&&3!==s.rows()||2!==s.cols()&&3!==s.rows())),t.xx=s.atRowCol(0,0),t.xy=s.atRowCol(0,1),t.yx=s.atRowCol(1,0),t.yy=s.atRowCol(1,1),3===s.cols()?(t.xd=s.atRowCol(0,2),t.yd=s.atRowCol(1,2)):(t.xd=0,t.yd=0)}}}]);