@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([[3661],{55537:(t,s,e)=>{function i(t,s){try{if(!t)throw new Error(s)}catch(t){throw t}}e.d(s,{A:()=>f,B:()=>k,C:()=>G,D:()=>Z,G:()=>m,a:()=>w,b:()=>A,c:()=>z,d:()=>R,e:()=>_,f:()=>d,g:()=>i,h:()=>x,i:()=>p,j:()=>N,k:()=>b,l:()=>v,m:()=>g,n:()=>E,o:()=>B,p:()=>D,q:()=>q,r:()=>T,s:()=>C,t:()=>M,u:()=>P,v:()=>y,w:()=>F,x:()=>I,y:()=>S,z:()=>L});class n extends Error{constructor(t,s){super(s),this.m_AdditionalMessage=s,this.m_ErrorType=t,this.name="GeometryError"}what(){return function(t){switch(t){case 1:return"Unknown error";case 2:return"Corrupted geometry";case 3:return"Empty geometry";case 4:return"Math singularity";case 5:return"Buffer is too small";case 6:return"Invalid shape type";case 7:return"Projection out of supported range";case 8:return"Non simple geometry";case 9:return"Cannot calculate geodesic";case 10:return"Notation conversion";case 11:return"Missing grid file";case 12:return"Invalid call";case 13:return"Internal error";case 14:return"Not implemented";case 15:return"IO error";case 16:return"Invalid 3D";case 17:return"An ambiguous geography edge with antipodal points";case 18:return"Geocentric coordinates require ellipsoidal height";case 19:return"Geography cannot be projected into a gnomonic plane or a result of an operation cannot fit into a gnomonic plane";case 20:return"Geometry is too large to be exported in to a given format";case 22:return"Operation is canceled by the user";case 21:return"The operation, such as projection or geodetic computation, cannot be performed without pe-wasm loaded";default:return"unknown error"}}(this.m_ErrorType)}additionalMessage(){return this.m_AdditionalMessage?this.m_AdditionalMessage:""}code(){return this.m_ErrorType}}class r extends n{constructor(t){super(2,t),this.name="CorruptedGeometryError"}}class u extends n{constructor(t){super(3,t),this.name="EmptyGeometryError"}}class h extends n{constructor(t){super(4,t),this.name="MathSingularityError"}}class o extends n{constructor(t){super(21,t),this.name="ProjectionEngineNotLoadedError"}}class a extends n{constructor(t){super(8,t),this.name="NonSimpleGeometryError"}}var m,c;(c=m||(m={}))[c.enumUnknown=0]="enumUnknown",c[c.enumPoint=513]="enumPoint",c[c.enumLine=5122]="enumLine",c[c.enumBezier=5123]="enumBezier",c[c.enumEllipticArc=5124]="enumEllipticArc",c[c.enumEnvelope=3077]="enumEnvelope",c[c.enumMultiPoint=8710]="enumMultiPoint",c[c.enumPolyline=25607]="enumPolyline",c[c.enumPolygon=27656]="enumPolygon",c[c.enumMultipatch=40969]="enumMultipatch",c[c.enumGeometryCollection=3594]="enumGeometryCollection",c[c.enumRationalBezier2=5134]="enumRationalBezier2",c[c.enumBezier2=5135]="enumBezier2",c[c.enumRationalBezier23d=5392]="enumRationalBezier23d",c[c.enumGreatArc3d=5393]="enumGreatArc3d";const l=[0,0,1,1,1,2,0,1,2,3,-1,-1,-1,-1,1,1];function f(t){return l[15&t]}function _(t){return!!(512&t)}function v(t){return!!(1024&t)}function b(t){return!!(2048&t)}function d(t){return!!(4096&t)}function p(t){return!!(8192&t)}function x(t){return!!(16384&t)}function N(t){return!!(32768&t)}function y(t){const s=t.getGeometryType();return p(s)?t.getPointCount():t.isEmpty()?0:s===m.enumEnvelope?4:s===m.enumPoint?1:d(s)?2:void z("missing type")}function g(t){const s=t.getGeometryType();if(x(s))return t.hasNonLinearSegments();if(s===m.enumGeometryCollection){const s=t;for(let t=0,e=s.getGeometryCount();t<e;t++)if(g(s.getGeometry(t)))return!0;return!1}return!!d(s)&&s!==m.enumLine}function T(t){throw new o(t)}function E(t){throw new r(t)}function M(t){throw new Error(t)}function w(t){throw new h(t)}function I(){M("Geometry type is not supported for 3D operations.")}function D(t){throw new n(12,t)}function P(t){throw new u(t)}function A(t){throw new n(14,t)}function q(t){throw new Error(t)}function z(t){throw new n(13,t)}function C(t){throw new Error(t)}function Z(t){throw new a(t)}function B(t){t&&g(t)&&A("Operation does not support curves.")}function R(t){t&&N(t.getGeometryType())&&A("Unsupported geometry type.")}function G(t){t===m.enumGeometryCollection&&M("Geometry_collection instances are not supported in this operation")}function k(t){G(t.getGeometryType())}function S(t){M(`bad wkid: ${t}`)}function L(t){let s="bad wkt: ";s+=t,s+="...",M(s)}function F(t,s){t||M(s)}},83661:(t,s,e)=>{e.d(s,{$:()=>y,A:()=>fs,B:()=>at,C:()=>vt,D:()=>ps,E:()=>a,F:()=>c,G:()=>p,H:()=>d,I:()=>jt,J:()=>Ns,K:()=>n,L:()=>Mt,M:()=>qs,N:()=>xs,O:()=>Pt,P:()=>ks,Q:()=>Z,R:()=>B,S:()=>At,T:()=>ot,U:()=>_t,V:()=>D,W:()=>P,X:()=>bt,Y:()=>Yt,Z:()=>R,_:()=>N,a:()=>mt,a0:()=>A,a1:()=>q,a2:()=>z,a3:()=>Vt,a4:()=>zt,a5:()=>Es,a6:()=>Ds,a7:()=>ws,a8:()=>Ms,a9:()=>it,aA:()=>Bs,aB:()=>Gs,aC:()=>M,aD:()=>hs,aE:()=>Wt,aF:()=>Lt,aG:()=>as,aH:()=>os,aa:()=>nt,ab:()=>Bt,ac:()=>gt,ad:()=>x,ae:()=>Cs,af:()=>zs,ag:()=>S,ah:()=>Ts,ai:()=>et,aj:()=>V,ak:()=>L,al:()=>Ps,am:()=>dt,an:()=>ds,ao:()=>Jt,ap:()=>ct,aq:()=>us,ar:()=>ms,as:()=>wt,at:()=>ls,au:()=>Et,av:()=>I,aw:()=>rs,ax:()=>gs,ay:()=>xt,az:()=>Rs,b:()=>lt,c:()=>ys,d:()=>Dt,e:()=>F,f:()=>w,g:()=>bs,h:()=>Nt,i:()=>Xt,j:()=>Ht,k:()=>Ct,l:()=>Zt,m:()=>Tt,n:()=>qt,o:()=>st,p:()=>It,q:()=>C,r:()=>$t,s:()=>k,t:()=>O,u:()=>pt,v:()=>ft,w:()=>yt,x:()=>G,y:()=>g,z:()=>E});var i=e(55537);class n{constructor(t){this.sum=t,this.compensation=0}assign(t){return this.compensation=t.compensation,this.sum=t.sum,this}reset(){this.sum=this.compensation=0}resetToStart(t){this.sum=t,this.compensation=0}normalize(){const t=[Number.NaN];this.sum=tt(this.sum,this.compensation,t),this.compensation=t[0]}add(t){const s=this.sum+t;let e;if(Math.abs(this.sum)>=Math.abs(t)){const i=this.sum-s+t;e=this.compensation+i}else{const i=t-s+this.sum;e=this.compensation+i}this.sum=s,this.compensation=e}sub(t){this.add(-t)}addProduct(t,s){const e=[0],i=W(t,s,e);this.add(i),this.add(e[0])}mul(t){const s=new n(0);s.addProduct(this.sum,t),s.addProduct(this.compensation,t),this.assign(s)}getResult(){return this.sum+this.compensation}pe(t){return this.add(t),this}me(t){return this.add(-t),this}}const r=[5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1],u=[-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3];function h(t){let s=0;return 65535n&t||(s+=16,t>>=16n),255n&t||(s+=8,t>>=8n),15n&t||(s+=4,t>>=4n),s+r[Number(BigInt.asUintN(4,t))]}function o(t){let s=0;return 4294967295n&t||(s=32,t>>=32n),s+h(BigInt.asUintN(32,t))}class a{constructor(t,s){if(this.m_EnvelopeType=1,void 0!==t){if(t instanceof a)return this.vmin=t.vmin,void(this.vmax=t.vmax);this.vmin=t,this.vmax=s,this.normalize()}else this.setEmpty()}static construct(t,s){return new a(t,s)}static constructEmpty(){return new a}setCoords(t,s){this.vmin=t,this.vmax=s,this.normalize()}setCoordsFromEnvelope(t){this.vmin=t.vmin,this.vmax=t.vmax}setEmpty(){this.vmin=Number.NaN,this.vmax=Number.NaN}getCenter(){return.5*(this.vmin+this.vmax)}equalsRange(t,s){return Vt(this.vmin,t)&&Vt(this.vmax,s)}equals(t,s){return!(!this.isEmpty()||!t.isEmpty())||(void 0!==s?Math.abs(this.vmin-t.vmin)<=s&&Math.abs(this.vmax-t.vmax)<=s:this.vmin===t.vmin&&this.vmax===t.vmax)}width(){return this.vmax-this.vmin}isEmpty(){return Number.isNaN(this.vmin)||Number.isNaN(this.vmax)}isZero(){return this.vmin===this.vmax}setInfinite(){this.vmin=Number.NEGATIVE_INFINITY,this.vmax=Number.POSITIVE_INFINITY}move(t){this.isEmpty()||(this.vmin+=t,this.vmax+=t)}contains(t){return t.vmin>=this.vmin&&t.vmax<=this.vmax}containsCoordinate(t){return t>=this.vmin&&t<=this.vmax}containsRightExclusive(t){return t>=this.vmin&&t<this.vmax}containsExclusiveCoordinate(t){return t>this.vmin&&t<this.vmax}containsExclusive(t){return t.vmin>this.vmin&&t.vmax<this.vmax}isIntersecting(t){return this.vmin<=t.vmin?this.vmax>=t.vmin:t.vmax>=this.vmin}mergeCoordinate(t){if(this.isEmpty())return this.vmin=t,void(this.vmax=t);this.mergeNeCoordinate(t)}merge(t){if(t.isEmpty())return;const s=t.vmin,e=t.vmax;this.mergeCoordinate(s),this.mergeCoordinate(e)}mergeNe(t){const s=t.vmin,e=t.vmax;this.mergeNeCoordinate(s),this.mergeNeCoordinate(e)}mergeNeCoordinate(t){t<this.vmin?this.vmin=t:t>this.vmax&&(this.vmax=t)}intersect(t){this.isEmpty()||t.isEmpty()?this.setEmpty():(this.vmin<t.vmin&&(this.vmin=t.vmin),this.vmax>t.vmax&&(this.vmax=t.vmax),this.vmin>this.vmax&&this.setEmpty())}inflate(t){this.isEmpty()||(this.vmin-=t,this.vmax+=t,this.vmax<this.vmin&&this.setEmpty())}normalize(){this.vmin<=this.vmax||(this.vmin>this.vmax?this.vmax=lt(this.vmin,this.vmin=this.vmax):this.setEmpty())}isValid(){return this.isEmpty()||this.vmin<=this.vmax}snapClip(t){return ys(t,this.vmin,this.vmax)}calculateToleranceFromEnvelope(){return this.isEmpty()?bs():(Math.abs(this.vmin)+Math.abs(this.vmax)+1)*bs()}static unit(){return m}normalizeNoNAN(){this.vmin>this.vmax&&(this.vmax=lt(this.vmin,this.vmin=this.vmax))}setCoordsNoNAN(t,s){this.vmin=t,this.vmax=s,this.normalizeNoNAN()}clone(){return new a(this.vmin,this.vmax)}}const m=new a(0,1);class c{static getNAN(){return new c(Number.NaN)}constructor(t,s){this.m_value=t??0,this.m_eps=s??0}[Symbol.toPrimitive](t){return this}clone(){return new c(this.m_value,this.m_eps)}assign(t){return this.m_value=t.m_value,this.m_eps=t.m_eps,this}scaleError(t){this.m_eps*=t}setError(t){this.m_eps=t}set(t,s){return this.m_value=t,this.m_eps=s??0,this}setWithEps(t,s){return void 0===s&&(s=1),this.m_value=t,this.m_eps=c.ulp(t)*s,this}setE(t){return this.m_value=t.m_value,this.m_eps=t.m_eps,this}precise(){return new c(this.m_value)}value(){return this.m_value}toDouble(){return this.m_value}eps(){return this.m_eps}resetError(){return this.m_eps=0,this}absThis(){return this.m_value=Math.abs(this.m_value),this}add(t){return this.clone().addThis(t)}addE(t){return this.clone().addThisE(t)}addThisE(t){const s=this.m_value+t.m_value,e=this.m_eps+t.m_eps+c.ulp(s);return this.m_value=s,this.m_eps=e,this}addThis(t){const s=this.m_value+t,e=this.m_eps+c.ulp(s);return this.m_value=s,this.m_eps=e,this}subE(t){return this.clone().subThisE(t)}sub(t){return this.clone().subThis(t)}subThisE(t){const s=this.m_value-t.m_value,e=this.m_eps+t.m_eps+c.ulp(s);return this.m_value=s,this.m_eps=e,this}subThis(t){const s=this.m_value-t,e=this.m_eps+c.ulp(s);return this.m_value=s,this.m_eps=e,this}setAddE(t,s){return this.m_value=t.m_value+s.m_value,this.m_eps=t.m_eps+s.m_eps+c.ulp(this.m_value),this}setAdd(t,s){return this.m_value=t+s,this.m_eps=c.ulp(this.m_value),this}setAddEN(t,s){return this.m_value=t.m_value+s,this.m_eps=t.m_eps+c.ulp(this.m_value),this}setAddNE(t,s){return this.m_value=t+s.m_value,this.m_eps=s.m_eps+c.ulp(this.m_value),this}setSubE(t,s){return this.m_value=t.m_value-s.m_value,this.m_eps=t.m_eps+s.m_eps+c.ulp(this.m_value),this}setSub(t,s){return this.m_value=t-s,this.m_eps=c.ulp(this.m_value),this}setSubEN(t,s){return this.m_value=t.m_value-s,this.m_eps=t.m_eps+c.ulp(this.m_value),this}setSubNE(t,s){return this.m_value=t-s.m_value,this.m_eps=s.m_eps+c.ulp(this.m_value),this}mulThisE(t){const s=this.m_value*t.m_value;return this.m_eps=this.m_eps*Math.abs(t.m_value)+t.m_eps*Math.abs(this.m_value)+this.m_eps*t.m_eps+c.ulp(s),this.m_value=s,this}mulThis(t){const s=this.m_value*t;return this.m_eps=this.m_eps*Math.abs(t)+c.ulp(s),this.m_value=s,this}mul(t){return this.clone().mulThis(t)}mulE(t){return this.clone().mulThisE(t)}setMulE(t,s){const e=t.m_value*s.m_value;return this.m_eps=t.m_eps*Math.abs(s.m_value)+s.m_eps*Math.abs(t.m_value)+t.m_eps*s.m_eps+c.ulp(e),this.m_value=e,this}setMul(t,s){return this.m_value=t*s,this.m_eps=c.ulp(this.m_value),this}setMulEN(t,s){return this.setE(t),this.mulThis(s)}setMulNE(t,s){return this.setE(s),this.mulThis(t)}mulThisByPower2(t){return this.m_value*=t,this.m_eps*=Math.abs(t),this}static st_mulByPower2(t,s){return new c(t.m_value,t.m_eps).mulThisByPower2(s)}divE(t){return this.clone().divThisE(t)}divThisE(t){const s=Math.abs(t.m_value),e=this.m_value/t.m_value;let i=(this.m_eps+Math.abs(e)*t.m_eps)/s;if(t.m_eps>.01*s){const e=t.m_eps/s;i*=1+(1+e)*e}return this.m_value=e,this.m_eps=i+c.ulp(e),this}divThis(t){const s=Math.abs(t);return this.m_value/=t,this.m_eps=this.m_eps/s+c.ulp(this.m_value),this}setDivE(t,s){return this.setE(t),this.divThisE(s)}setDiv(t,s){return this.m_value=t/s,this.m_eps=c.ulp(this.m_value),this}setDivEN(t,s){return this.setE(t),this.divThis(s)}setDivNE(t,s){return this.set(t),this.divThisE(s)}divThisByPower2(t){return this.m_value/=t,this.m_eps/=Math.abs(t),this}invThis(){return this.setE(p.clone().divThisE(this)),this}sqrt(){return this.clone().sqrtThis()}sqrtThis(){let t,s;return this.m_value>=0?(t=Math.sqrt(this.m_value),s=this.m_value>10*this.m_eps?.5*this.m_eps/t:this.m_value>this.m_eps?t-Math.sqrt(this.m_value-this.m_eps):Math.max(t,Math.sqrt(this.m_value+this.m_eps)-t),s+=c.ulp(t)):this.m_value<-this.m_eps?(t=Number.NaN,s=Number.NaN):(t=0,s=Math.sqrt(this.m_eps)),this.m_value=t,this.m_eps=s,this}sqr(){return this.clone().sqrThis()}sqrThis(){const t=this.m_value*this.m_value;return this.m_eps=2*this.m_eps*Math.abs(this.m_value)+this.m_eps*this.m_eps+c.ulp(t),this.m_value=t,this}setSin(t){const s=Math.sin(t.m_value),e=Math.cos(t.m_value);this.m_value=s;const i=Math.abs(s),n=Math.abs(t.value());return this.m_eps=(Math.abs(e)+.5*i*t.m_eps)*t.m_eps+c.ulp(i+n),this}static ulp(t){let s=Ft(t);const e=((0x7ff0000000000000n&s)>>52n)-1075n;return e>-1023n?(s=e+0x3ffn<<52n,function(t){return kt[0]=t,Gt[0]}(s)):0===t?0:Number.MIN_VALUE}setCos(t){const s=Math.sin(t.m_value),e=Math.cos(t.m_value);this.m_value=e;const i=Math.abs(e),n=Math.abs(t.value());return this.m_eps=(Math.abs(s)+.5*i*t.m_eps)*t.m_eps+c.ulp(i+n),this}static st_cosAndSin(t,s,e){const i=Math.sin(t.m_value),n=Math.cos(t.m_value);e.m_value=i,s.m_value=n;const r=Math.abs(i),u=Math.abs(n),h=Math.abs(t.value());e.m_eps=(Math.abs(n)+.5*r*t.m_eps)*t.m_eps+c.ulp(r+h),s.m_eps=(Math.abs(i)+.5*u*t.m_eps)*t.m_eps+c.ulp(u+h)}negate(){return this.clone().negateThis()}negateThis(){return this.m_value=-this.m_value,this}setAbs(){return this.m_value=Math.abs(this.m_value),this}isInInterval(t){return a.construct(this.m_value-this.m_eps,this.m_value+this.m_eps).isIntersecting(t)}eq(t){return Math.abs(this.m_value-t.m_value)<=this.m_eps+t.m_eps}ne(t){return!this.eq(t)}gt(t){return this.m_value-t.m_value>this.m_eps+t.m_eps}lt(t){return t.m_value-this.m_value>this.m_eps+t.m_eps}ge(t){return!this.lt(t)}le(t){return!this.gt(t)}tolEQ(t,s){return Math.abs(this.m_value-t.m_value)<=s||this.eq(t)}tolNE(t,s){return!this.tolEQ(t,s)}tolGT(t,s){return this.m_value-t.m_value>s&&this.gt(t)}tolLT(t,s){return t.m_value-this.m_value>s&&this.lt(t)}tolGE(t,s){return!this.tolLT(t,s)}tolLE(t,s){return!this.tolGT(t,s)}isZero(){return Math.abs(this.m_value)<=this.m_eps}isFuzzyZero(){return this.isZero()&&0!==this.m_eps}tolIsZero(t){return Math.abs(this.m_value)<=Math.max(this.m_eps,t)}setPi(){this.setE(b)}setEuler(){this.set(2.718281828459045,v())}static size(){return 1}}function l(t,s){const e=Ot(t),i=Ot(s),n=53-o(e),r=53-o(i);return(n>=0?n:0)+(r>=0?r:0)<=52}function f(t,s){const e=t+s;return e-t===s&&e-s===t}function _(t,s){const e=t-s;return t-e===s&&s+e===t}function v(){return xs()}c.dimensions=1;const b=new c(Math.PI,.5*v()),d=new c(0,0),p=new c(1,0),x=new c(4,0);function N(t,s,e){return t.addE(s.subE(t).mulE(e))}function y(t,s,e){return s.subE(s.subE(t).mulE(p.subE(e)))}function g(t){let s;if(0===t)s=1;else if(Math.abs(t)>.01)s=function(t){return Math.atanh(t)}(t)/t;else{let e;const i=-36.841361487904734;s=0;const n=t*t;for(let t=2*Math.trunc(i/Math.log(n)+2.5)-1;t>1;t-=2)e=1/t,s=(s+e)*n;s+=1}return s}function T(t){const s=Math.PI*Math.PI/6;let e;if(1===t)e=s;else if(t>1)e=s;else if(0===t)e=t;else if(t<0){const s=1+(t=Math.abs(t)),i=Math.log(s);e=i*i/-2-T(t/s)}else if(t>.5){const i=1-t,n=Math.log(t)*Math.log(i);e=s-T(i)-n}else{e=0;const s=1+Math.trunc(-16*Math.log(10)/Math.log(t)+1.5);let i=s;for(let n=s;n>0;n--,i-=1)e*=t,e+=1/(i*i);e*=t}return e}function E(t,s){const e=s*t;if(Math.abs(s)<.1){let s=0;for(let t=60;t>=1;t--)s*=e,s+=1/t/t;return s*=t,s}return T(e)/s}function M(t,s){return t<s?qt(t,s):qt(s,t)}function w(t,s){const e=Math.abs(t);return s>=0?e:-e}function I(t){return Math.round(t)}function D(t,s,e,i,n){n[0]=s[0]+(e[0]-s[0])*i,n[1]=s[1]+(e[1]-s[1])*i,3===t&&(n[2]=s[2]+(e[2]-s[2])*i)}function P(t,s,e,i,n){n[0]=e[0]-(e[0]-s[0])*(1-i),n[1]=e[1]-(e[1]-s[1])*(1-i),3===t&&(n[2]=e[2]-(e[2]-s[2])*(1-i))}function A(t,s,e,i,n){i<=.5?D(t,s,e,i,n):P(t,s,e,i,n)}function q(t,s,e,i,n){n[0]=s[0].addE(e[0].subE(s[0]).mulE(i)),n[1]=s[1].addE(e[1].subE(s[1]).mulE(i))}function z(t,s,e,i,n){n[0]=e[0].subE(e[0].subE(s[0]).mulE(p.subE(i))),n[1]=e[1].subE(e[1].subE(s[1]).mulE(p.subE(i)))}function C(t,s,e){let i;return i=e<=.5?t+(s-t)*e:s-(s-t)*(1-e),i}function Z(t,s,e){return t+(s-t)*e}function B(t,s,e){return s-(s-t)*(1-e)}function R(t,s,e,i){e<=.5?(i.x=t.x+(s.x-t.x)*e,i.y=t.y+(s.y-t.y)*e):(i.x=s.x-(s.x-t.x)*(1-e),i.y=s.y-(s.y-t.y)*(1-e))}function G(t,s,e,i){e<=.5?(i.x=t.x+(s.x-t.x)*e,i.y=t.y+(s.y-t.y)*e,i.z=t.z+(s.z-t.z)*e):(i.x=s.x-(s.x-t.x)*(1-e),i.y=s.y-(s.y-t.y)*(1-e),i.z=s.z-(s.z-t.z)*(1-e))}function k(t){return t*t}function S(t){return t*t*t}function L(t){return 1/Math.sqrt(t)}function F(t){return t<0?-1:t>0?1:0}function O(t,s,e,i){const n=[0],r=[0],u=[0];return tt(W(t,e,n),W(s,i,r),u)+(n[0]+r[0]+u[0])}const Q=[0],U=[0];function V(t,s,e){return function(t,s,e,i){const n=tt(t,s,J),r=tt(n,e,K);return tt(r,J[0]+K[0],i)}(W(t,s,Q),e,Q[0],U)}const j=[0],Y=[0],$=[0],H=[0];function W(t,s,e){const i=t*s;return X(t,j,Y),X(s,$,H),e[0]=Y[0]*H[0]-(i-j[0]*$[0]-Y[0]*$[0]-j[0]*H[0]),i}function X(t,s,e){const i=134217729*t;s[0]=i-(i-t),e[0]=t-s[0]}const J=[0],K=[0];function tt(t,s,e){const i=t+s;return Math.abs(t)>Math.abs(s)?e[0]=t-i+s:e[0]=s-i+t,i}function st(t,s){return t%s}function et(t){const s=1-t;if(0===s)return 1;let e;if(s<=.01){const t=s,i=Math.log(t);e=1+t*(.4431471805599453-.25*i+t*(.05680519270997949-.09375*i+t*(.02183137044373718-.05859375*i+t*(.011544521417308362-.042724609375*i+t*(.00714200031339596-.0336456298828125*i+t*(.004854743337164948-.027757644653320312*i+t*(.003514687963781376-.023627042770385742*i)))))))}else{if(t<.016){const s=t,e=.25,i=.046875,n=.01953125,r=.01068115234375,u=.0067291259765625,h=.004626274108886719,o=.0033752918243408203,a=.0025710230693221092;return ws()*(1-s*(e+s*(i+s*(n+s*(r+s*(u+s*(h+s*(o+s*a))))))))}e=rt(0,s,1)-t*ut(0,s,1)/3}return ys(e,1,ws())}function it(t,s,e=Number.NaN){if((0,i.g)(s>=0&&s<=1),0===s)return t;let n=1,r=t;if(r<0&&(r=-r,n=-1),1===s){const t=Math.round(r/Es()),s=r-t*Es();return n*(2*t+Math.sin(s))}const u=ws(),h=Math.floor(r/u);1&h?r=(h+1)*u-r:r-=h*u;const o=Math.sin(r),a=Number.isNaN(e)?et(s):e;let m;if(1===o)m=a+Math.sqrt(1-s)*(r-u);else{const t=r*r;if(.01424*Math.pow(t,4)<=2*xs())m=r*(1+t*s*(-1/6+t*((4-3*s)/120-(16+(45*s-60)*s)/5040*t)));else if(s<=.01){const t=Math.sin(2*r),e=Math.sin(4*r),i=Math.sin(6*r),n=Math.sin(8*r),u=Math.sin(10*r);m=r+s*((2*-r+t)/8+s*((-3*r+2*t-.25*e)/64+s*((-20*r+15*t-3*e+i/3)/1024+s*(5*(-140*r+112*t-28*e+16/3*i-.5*n)/65536+7*s*((-63*r+52.5*t-15*e+3.75*i-.625*n+.05*u)/65536+s*(-693*r+594*t-185.625*e+1.375*i-12.375*n+1.8*u-.125*Math.sin(12*r))/1048576)))))}else{const t=o*o,e=Math.cos(r),i=e*e,n=ht(o,e,s);m=o*(rt(i,n,1)-s*t*ut(i,n,1)/3)}}return 1&h?m=a*(h+1)-m:m+=a*h,n*m}function nt(t,s,e=Number.NaN){if(0===t)return 0;let i=1,n=t;t<0&&(n=-n,i=-1);const r=Number.isNaN(e)?et(s):e,u=Math.floor(n/r);1&u?n=(u+1)*r-n:n-=u*r;let h=n<=0?0:n>=r?ws():function(t,s,e){if(0===s)return t;if(1===s)return Math.asin(t);let i=0,n=!0;if(t<.2){const e=t*t,r=t*(1+e*s*(1/6+e*((13*s-4)/120+(16-284*s+493*s*s)/5040*e))),u=Math.abs(s*(4944*s-64-31224*s*s+37369*s*s*s)/362880*Math.pow(t,9));if(u<Math.abs(r)*xs())return r;i=r,n=u>.1*r}if(n){const n=1-s,r=1-t/e,u=Math.sqrt(r*r+n*n),h=Math.atan2(n,t+xs());i=ws()+Math.sqrt(u)*(h-ws())}let r=0;for(let n=0;n<7;n++){r=it(i,s,e);const u=ht(Math.sin(i),Math.cos(i),s);if(i-=(r-t)/Math.sqrt(u),n>0&&Math.abs(r-t)<=4*xs()*t)break}return i}(n,s,r);return 1&u?h=ws()*(u+1)-h:h+=ws()*u,i*h}function rt(t,s,e){(0,i.g)((0!==t?1:0)+(0!==s?1:0)+1>1);let n=t,r=s,u=e;for(;;){const t=Math.sqrt(n*r)+Math.sqrt(r*u)+Math.sqrt(u*n);n=.25*(n+t),r=.25*(r+t),u=.25*(u+t);const s=(n+r+u)/3,e=(s-n)/s,i=(s-r)/s,h=(s-u)/s;if(Math.abs(e)<=.0024&&Math.abs(i)<=.0024&&Math.abs(h)<=.0024){const t=e*i-h*h,n=e*i*h;return(1+(1/24*t-.1-3/44*n-5*t*t/208+t*n/16)*t+(1/14+3*n/104)*n)/Math.sqrt(s)}}}function ut(t,s,e){(0,i.g)(0!==t||0!==s);let r=t,u=s,h=e;const o=new n(0);let a=1;for(;;){const t=.2*(r+u+3*h),s=(t-r)/t,e=(t-u)/t,i=(t-h)/t;if(Math.abs(s)<=.0015&&Math.abs(e)<=.0015&&Math.abs(i)<=.0015){const n=s*e,r=i*i,u=n-r,h=n-6*r,m=h+u+u,c=3/26,l=h*(9/22*.25*h-.21428571428571427-1.5*c*i*m),f=i*(1/6*m+i*(-.4090909090909091*u+i*c*n));return 3*o.getResult()+a*(1+l+f)/(t*Math.sqrt(t))}const n=Math.sqrt(r),m=Math.sqrt(u),c=Math.sqrt(h),l=n*(m+c)+m*c;o.add(a/(c*(h+l))),a*=.25,r=.25*(r+l),u=.25*(u+l),h=.25*(h+l)}}function ht(t,s,e){return t<.999?1-e*k(t):1-e+e*k(s)}function ot(t,s,e,n,r){return 0===t?0===n?s:1===n?e:r:1===t?0===n?s:1===n?e:C(s,e,n):(2===t&&(0,i.b)("angular interpolation"),void(0,i.b)(""))}function at(t,s,e,n,r,u,h,o){if(0===t)for(let t=0;t<u;++t)n[t+r]=0===h?s[t]:1===h?e[t]:o;else if(1===t)if(0===h)mt(n,s,r,0,u);else if(1===h)mt(n,e,r,0,u);else for(let t=0;t<u;++t)n[t+r]=C(s[t],e[t],h);else if(2===t)if(0===h)mt(n,s,r,0,u);else if(1===h)mt(n,e,r,0,u);else{let t=0;for(let i=0,o=r;i<u;++i,++o)n[o]=C(s[i],e[i],h),t+=n[o]*n[o];if(t>0){t=Math.sqrt(t);for(let s=r;s<r+u;++s)n[s]/=t}else{for(let t=r;t<r+u;++t)n[t]=0;n[r]=1}}else(0,i.b)("")}function mt(t,s,e,i,n){if(0===n)return;let r=0,u=e,h=i;for(;r++<n;)t[u++]=s[h++]}function ct(t,s,e){let i=0;for(let n=0;!i&&n<e;++n)i=t[n]-s[n];return i}function lt(t,s){return t}function ft(t){t.sort(((t,s)=>t<s?-1:t>s?1:0))}function _t(t,s){const e=t.slice(0,s);ft(e),mt(t,e,0,0,s)}function vt(t,s,e,i){const n=t.slice(s,s+e);n.sort(i),mt(t,n,s,0,e)}function bt(t,s){return t<s?-1:t>s?1:0}function dt(t,s,e,i){return t<e?-1:t>e?1:s<i?-1:s>i?1:0}function pt(t,s){if(t.length<2)return t.length;let e=0;for(let i=1;i<t.length;++i)s(t[i],t[e])||(e++,t[i]=lt(t[e],t[e]=t[i]));return 1+e}function xt(t,s){t[s]=t.at(-1),t.pop()}function Nt(t,s=!1){return{[Symbol.dispose](){this.bForget||t()},bForget:s}}function yt(t,s,e){t.length=s,t.fill(e)}function gt(t,s,e){t.length=e;for(let i=0;i<e;++i)t[i]=new s}function Tt(t,s){const e=new Array(s);for(let i=0;i<s;++i)e[i]=new t;return e}function Et(t,s,e){for(let i=0;i<e;++i)t[i].assign(s[i]);return e}function Mt(t,s){const e=t.slice(0,s);for(let t=0;t<s;++t)e[t]=e[t].clone();return e}function wt(t){return Array.from({length:t},(()=>null))}function It(t,s){return Array.from({length:s},(()=>t()))}function Dt(t,s){const e=new Array(t);return e.fill(s),e}function Pt(t,s){return s in t&&1===Object.getOwnPropertyNames(t).length}class At{constructor(...t){this.m_elts=t}get length(){return this.m_elts.length}at(t){return this.m_elts[t]}[Symbol.dispose](){for(const t of this.m_elts)t[Symbol.dispose]()}}function qt(t,s){return{first:t,second:s}}const zt=Math.PI,Ct=2*Math.PI,Zt=.5*Math.PI;class Bt{constructor(t,s){this.m_cr=t,this.m_cc=s,this.m_v=Dt(t*s,0)}get(t,s){return this.m_v[t*this.m_cc+s]}set(t,s,e){this.m_v[t*this.m_cc+s]=e}inc(t,s){return++this.m_v[t*this.m_cc+s]}}const Rt=new ArrayBuffer(8),Gt=new Float64Array(Rt),kt=new BigUint64Array(Rt),St=0x0fffffffffffffn;function Lt(){return Number.EPSILON*vs}function Ft(t){return Gt[0]=t,kt[0]}function Ot(t){return Ft(t)&St}function Qt(t){return Number((9218868437227405312n&Ft(t))>>52n)}function Ut(t){if(0n===t)return-1n;if(1n===t||-1n===t)return 0n;t<0n&&(t=-t);let s=0n,e=512n,i=1n<<s+e;for(;t>=i;)s+=e,e<<=1n,i<<=e;let n=s;e>>=1n;let r=n+e;for(;e>0n;)t<1n<<r||(n=r),e>>=1n,r=n+e;return n}function Vt(t,s){return t===s||Number.isNaN(t)&&Number.isNaN(s)}function jt(t,s,e){return t===s||Math.abs(t-s)<=e||Number.isNaN(t)&&Number.isNaN(s)}function Yt(t,s){return t<s?-1:t>s?1:0}function $t(t,s){if(t<s)return-1;if(t>s)return 1;if(t===s)return 0;{const e=Number.isNaN(t),i=Number.isNaN(s);return e<i?-1:e>i?1:0}}function Ht(){return 2147483647}function Wt(){return 32767}function Xt(){return 2147483647}function Jt(){return-2147483648}const Kt=2147483647,ts=BigInt(Kt),ss=2166136261,es=16777619,is=14695981039346656037n,ns=1099511628211n;function rs(t){let s=ss;for(let e=0,i=t.length;e<i;++e)s=(s^t.charCodeAt(e))*es;return s&Kt}function us(t,s){return s+2654435769+(t<<6)+(t>>2)&Kt}function hs(t,s){return us(t,cs(s))}function os(t){return us(3735928559,t)}function as(t,s){return us(t,os(s))}function ms(t){return function(t){let s=ss,e=t;return s=(s^255&e)*es,e>>=8,s=(s^255&e)*es,e>>=8,s=(s^255&e)*es,e>>=8,s=(s^255&e)*es,s&Kt}(t)}function cs(t){return Number(function(t){let s=is,e=t;return s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,s&ts}(t))}function ls(t){return cs(Ft(function(t){return Ps(t)}(t)))}function fs(t){return function(t){return 1103515245*t+12345&2147483647}(t)}const _s=100,vs=100;function bs(){return Number.EPSILON*_s}function ds(){return.38196601125010515}function ps(){return 1.4142135623730951}function xs(){return Number.EPSILON}function Ns(t,s,e){return t===s||t===e}function ys(t,s,e){return t>=s?t<=e?t:e:s}function gs(t,s,e){const i=t[0];if(i>=s){if(i<=e)return!1;t[0]=e}else t[0]=s;return!0}function Ts(t,s){return t>=s?s:t<-s?-s:t}function Es(){return zt}function Ms(){return Ct}function ws(){return Zt}const Is=3*ws();function Ds(){return Is}function Ps(t){return t+0}function As(t){return{v:t}}class qs{constructor(){this.m_rn=As(0n),this.m_rd=As(1n),this.m_bNaN=!1,this.m_bNormalized=!1,this.m_power=0,this.m_sign=0}static constructAssign(t,s){const e=t.clone();return void 0!==s&&e.limitPrecisionThis(s),e}static constructDouble(t){return(new qs).setDouble(t)}static constructInt64(t){return(new qs).setInt64(t)}static constructRational(t,s){return(new qs).setRational(t,s)}static constructInt32(t){return this.constructInt64(BigInt(Math.trunc(t)))}[Symbol.toPrimitive](t){return this}compare(t){return this.lt(t)?-1:this.gt(t)?1:0}assignCopy(t){return this.setThis(t)}abs(){return this.clone().absThis()}absThis(){return this.isNAN()||(this.m_sign*=this.m_sign),this}clone(){return(new qs).setThis(this)}setThis(t){return this.m_bNaN=t.m_bNaN,this.m_bNormalized=t.m_bNormalized,this.m_rn.v=t.m_rn.v,this.m_rd.v=t.m_rd.v,this.m_power=t.m_power,this.m_sign=t.m_sign,this}setZero(){return this.m_rn.v=0n,this.m_rd.v=1n,this.m_bNaN=!1,this.m_power=0,this.m_bNormalized=!0,this.m_sign=0,this}setDouble(t){if(this.setZero(),0===t)return this;if(Number.isInteger(t)&&Math.abs(t)<2147483647)return this.setInt32(t);const s=Ft(t),e=(s&qs.s_em)>>52n,n=!!(s&qs.s_sm),r=s&qs.s_fm;if(e===qs.s_emax)return r?(this.m_rn.v=this.m_rd.v=0n,this.m_bNaN=!0,this):(this.m_rn.v=n?-1n:1n,this.m_rd.v=0n,this);0n===e&&(0,i.b)("denormalized numbers not yet implemented");const u=e-1023n,h=u>=0n?u:0n,o=u<0n?-u:0n;return this.m_rn.v=(1n<<52n|r)<<h,this.m_rd.v=1n<<52n+o,this.m_sign=n?-1:1,this.m_bNormalized=!1,this.normalizeThis()}setInt64(t){return 0n===t?this.setZero():(this.m_bNaN=!1,this.m_sign=t>0n?1:-1,this.m_rn.v=t>0n?t:-t,this.m_rd.v=1n,this.m_power=0,this.m_bNormalized=!1,this.normalizeThis())}setRational(t,s){return 0n===t?0n===s?this.setNAN():this.setZero():0n===s?t>0n?this.setPositiveInf():this.setNegativeInf():(this.m_sign=(t>0n?1:-1)*(s>0n?1:-1),this.m_rn.v=t>0n?t:-t,this.m_rd.v=s>0n?s:-s,this.m_power=0,this.m_bNormalized=!1,this.normalizeThis())}setInt32(t){return this.setInt64(BigInt(Math.trunc(t)))}getDouble(){return this.convertToDouble()}toDouble(){return this.convertToDouble()}value(){return this.convertToDouble()}isNAN(){return this.m_bNaN}isPositiveInf(){return!this.isNAN()&&0n===this.m_rd.v&&1===this.m_sign}isNegativeInf(){return!this.isNAN()&&0n===this.m_rd.v&&-1===this.m_sign}isFinite(){return!this.isNAN()&&0n!==this.m_rd.v}setNAN(){return this.m_bNaN=!0,this.m_rn.v=0n,this.m_rd.v=0n,this.m_power=0,this.m_bNormalized=!0,this}setPositiveInf(){return this.m_rn.v=1n,this.m_rd.v=0n,this.m_bNaN=!1,this.m_bNormalized=!0,this.m_sign=1,this.m_power=0,this}setNegativeInf(){return this.m_rn.v=1n,this.m_rd.v=0n,this.m_bNaN=!1,this.m_bNormalized=!0,this.m_sign=-1,this.m_power=0,this}subThis(t){if(t.isNAN()&&this.setNAN(),this.isPositiveInf()&&t.isPositiveInf())this.setNAN();else{if(this.isPositiveInf()&&t.isNegativeInf())return this.setPositiveInf(),this;if(this.isNegativeInf()&&t.isNegativeInf())this.setNAN();else if(this.isNegativeInf()&&t.isPositiveInf())return this.setNegativeInf(),this}return this.isNAN()?this:this.opPlusMinus(t,!1)}thisSubAbs(t){return(0,i.g)(0),this}mulThis(t){return t.isNAN()&&this.setNAN(),this.isNAN()?this:(this.m_sign*=t.m_sign,0===this.m_sign?this.setZero():(this.m_rn.v*=t.m_rn.v,this.m_rd.v*=t.m_rd.v,this.m_power+=t.m_power,this.m_bNormalized=!1,this.normalizeThis(),this))}mulDoubleThis(t){return this.mulThis(qs.constructDouble(t))}thisMulInt64(t){return(0,i.g)(0),this}thisMulInt32(t){return(0,i.g)(0),this}divThis(t){return this.mulThis(t.clone().invertThis())}divDoubleThis(t){return this.divThis(qs.constructDouble(t))}addDoubleThis(t){return this.addThis(qs.constructDouble(t))}subDoubleThis(t){return this.subThis(qs.constructDouble(t))}mul(t){return this.clone().mulThis(t)}mulBigIntThis(t){return this.mulThis(qs.constructInt64(t))}mulDouble(t){return this.clone().mulThis(qs.constructDouble(t))}div(t){return this.clone().divThis(t)}divDouble(t){return this.clone().divDoubleThis(t)}add(t){return this.clone().addThis(t)}fmSubThis(t,s){return this.subThis(t.clone().mulThis(s))}fmAddThis(t,s){return this.addThis(t.clone().mulThis(s))}addThis(t){if(t.isNAN()&&this.setNAN(),this.isPositiveInf()&&t.isPositiveInf())return this.setPositiveInf(),this;if(this.isPositiveInf()&&t.isNegativeInf())this.setNAN();else{if(this.isNegativeInf()&&t.isNegativeInf())return this.setNegativeInf(),this;this.isNegativeInf()&&t.isPositiveInf()&&this.setNAN()}return this.isNAN()?this:this.opPlusMinus(t,!0)}addDouble(t){return this.clone().addThis(qs.constructDouble(t))}sub(t){return this.clone().subThis(t)}subDouble(t){return this.clone().subThis(qs.constructDouble(t))}isZero(){return 0===this.m_sign}equals(t){return this.clone().subThis(t).isZero()}lt(t){return!this.isNAN()&&!t.isNAN()&&!(this.isPositiveInf()&&t.isPositiveInf()||this.isNegativeInf()&&t.isNegativeInf())&&!this.isPositiveInf()&&(!!t.isPositiveInf()||this.clone().sub(t).LZ())}absLessAbs(t){return this.abs().lt(t.abs())}gt(t){return this.clone().sub(t).GZ()}lte(t){return this.sub(t).LEZ()}gte(t){return this.sub(t).GEZ()}normalizeThis(){if(this.m_bNormalized)return this;if(0n===this.m_rn.v)return this.setZero();let t=0,s=0xffffffffn;for(;0n===(this.m_rn.v&s)&&s<=this.m_rn.v;)s<<=32n,t+=32;s&=this.m_rn.v,s>>=BigInt(t),t+=h(BigInt.asUintN(32,s))-1;let e=0;for(s=0xffffffffn;0n===(this.m_rd.v&s)&&s<=this.m_rd.v;)s<<=32n,e+=32;return s&=this.m_rd.v,s>>=BigInt(e),e+=h(BigInt.asUintN(32,s))-1,this.m_rn.v>>=BigInt(t),this.m_rd.v>>=BigInt(e),this.m_power+=t-e,this.m_rn.v>1n&&this.m_rd.v>1n&&(this.m_rn.v%this.m_rd.v===0n?(this.m_rn.v/=this.m_rd.v,this.m_rd.v=1n):this.m_rd.v%this.m_rn.v===0n&&(this.m_rd.v/=this.m_rn.v,this.m_rn.v=1n)),this.m_bNormalized=!0,this}negateThis(){return this.isNAN()||(this.m_sign*=-1),this}negate(){return this.clone().negateThis()}invertThis(){return this.isNAN()?this:this.isPositiveInf()||this.isNegativeInf()?(this.setZero(),this):0n===this.m_rn.v?(this.setPositiveInf(),this):(this.m_rd=lt(this.m_rn,this.m_rn=this.m_rd),this.m_power=-this.m_power,this)}limitPrecisionThis(t){if(0===t)return this;if(this.isZero())return this.setZero();if(!this.isFinite())return this;this.normalizeThis();let s=Number(Ut(this.m_rn.v));if(s>t){const e=s-t;this.m_rn.v>>=BigInt(s-t),this.m_power+=e}if(s=Number(Ut(this.m_rd.v)),s>t){const e=s-t;this.m_rd.v>>=BigInt(s-t),this.m_power-=e}return this}hiBitIndex(){return Math.max(Number(Ut(this.m_rn.v)),Number(Ut(this.m_rd.v)))}ldexp(t){return this.clone().ldexpThis(t)}ldexpThis(t){return t&&(this.m_bNormalized=!1,this.m_power+=t,this.normalizeThis()),this}LZ(){return!this.isNAN()&&-1===this.m_sign}GZ(){return!this.isNAN()&&1===this.m_sign}LEZ(){return!this.isNAN()&&this.m_sign<=0}GEZ(){return!this.isNAN()&&this.m_sign>=0}toString(){return this.toDouble().toString()}sqr(){return this.clone().sqrThis()}sqrThis(){return this.mulThis(this.clone())}static sqrt(t,s){if(t.m_sign<0n&&(0,i.q)("MP_value: sqrt(-1)"),t.isZero())return t.clone();let e=52,n=2220446049250313e-31;for(;e<s;)2*e<=s?(n*=n,e*=2):(n*=2220446049250313e-31,e+=52);e+=52;const r=Ut(t.m_rn.v),u=Ut(t.m_rd.v);let h,o=t.m_power+Number(r-u);const a=new qs;Math.abs(o)>200?(1&Math.abs(o)&&(o+=1),h=qs.constructAssign(t,53).ldexpThis(-o).value(),a.setThis(t).ldexpThis(-o),(0,i.g)(Number.isFinite(h))):(a.setThis(t),h=a.value(),(0,i.g)(Number.isFinite(h)),o=0),h=Math.sqrt(h);const m=qs.constructDouble(h),c=qs.constructDouble(n);c.mulThis(m).ldexpThis(1);const l=n*h*2,f=m.clone(),_=new qs;let v;for(let t=0;t<10;++t){f.mulThis(m),_.setThis(a).subThis(f).absThis();let t=_.value();if(v=1,t<.9)for(;t>l;)t*=t,++v;else v=4;if(_.lte(c))break;for(let t=0;t<v;t++)f.setThis(m).divThis(a).invertThis().addThis(m).ldexpThis(-1).limitPrecisionThis(e),m.setThis(f)}return m.ldexpThis(o/2)}static cubicRoot(t,s){if(t.isZero())return t.clone();let e=52,i=2220446049250313e-31;for(;e<s;)2*e<=s?(i*=i,e*=2):(i*=2220446049250313e-31,e+=52);e+=52;const n=Math.pow(Math.abs(t.value()),1/3),r=qs.constructDouble(n),u=r.clone();u.sqrThis().mulDoubleThis(3).mulDoubleThis(i),u.limitPrecisionThis(32),t.LZ()&&r.negateThis();for(let s=0;s<10;++s){const s=r.clone();s.sqrThis().mulThis(r);const i=s.clone();if(i.subThis(t),i.absThis().limitPrecisionThis(32),i.lte(u))break;i.setThis(t),i.ldexpThis(1),i.addThis(s);const n=s.clone();n.ldexpThis(1),n.addThis(t),i.divThis(n),r.mulThis(i),r.limitPrecisionThis(e)}return r}isInTheRangeOfDouble(){return(0,i.g)(0),!1}sign(){return this.m_sign}cosAndSin(t,s){(0,i.g)(0)}static nan(){return(0,i.g)(0),new qs}convertToDouble(){if(this.m_bNaN)return Number.NaN;if(this.isZero())return 0;if(0n===this.m_rd.v)return 1===this.m_sign?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;const t=-1===this.m_sign,s=this.m_rn.v<<(this.m_power>=0?BigInt(this.m_power):0n);let e=this.m_rd.v<<(this.m_power<0?BigInt(-this.m_power):0n);const i=s/e;let n=Number(i);if(BigInt(n)!==i)return t?-n:n;let r=s-i*e;if(r){let t=Ut(e)-1023n;t>0n&&(e>>=t,r<<=52n,r>>=t);let s=Number(r);Number.isFinite(s)||(r>>=52n,s=Number(r),t=0n),t>0n&&(s/=Math.pow(2,52)),n+=s/Number(e)}return t?-n:n}signVal(){return 1===this.m_sign?1n:-1===this.m_sign?-1n:0n}opPlusMinus(t,s){const e=Math.min(this.m_power,t.m_power);let i,n;this.m_power>e?(i=BigInt(this.m_power-e),n=0n):(i=0n,n=BigInt(t.m_power-e));const r=this.signVal()*this.m_rn.v*t.m_rd.v<<i,u=t.signVal()*t.m_rn.v*this.m_rd.v<<n;return this.m_rn.v=s?r+u:r-u,this.m_rd.v*=t.m_rd.v,this.m_power=e,this.m_sign=1,this.m_rn.v<0n&&(this.m_sign=-1,this.m_rn.v=-this.m_rn.v),this.m_bNormalized=!1,this.normalizeThis(),this}}qs.s_sm=0x8000000000000000n,qs.s_em=0x7ff0000000000000n,qs.s_fm=0x000fffffffffffffn,qs.s_emax=0x7ffn;const zs=qs.constructInt32(1),Cs=qs.constructInt32(0);function Zs(t,s){let e=Qt(t);const i=Qt(s);return e===i?(e-=53-function(t,s){return function(t){let s=0;return 0xffffffff00000000n&t&&(s=32,t>>=32n),s+function(t){let s=0;return 4294901760n&t&&(s+=16,t>>=16n),65280n&t&&(s+=8,t>>=8n),240n&t&&(s+=4,t>>=4n),s+u[Number(BigInt.asUintN(4,t))]+1}(t)}(t^s)}(Ot(t),Ot(s)),e):e>i?e:i}function Bs(t,s){for(let e=0,i=0,n=t.length;e<n;e+=2,i++)s[i].x=t[e],s[i].y=t[e+1]}function Rs(t){const s=new Float64Array(2*t.length);for(let e=0,i=t.length;e<i;++e){const i=e<<1;s[i]=t[e].x,s[i+1]=t[e].y}return s}function Gs(t){const s=Tt(ks,t.length);for(let e=0,i=t.length;e<i;++e)s[e].setCoords(t[e][0],t[e][1]);return s}class ks{static construct(t,s){return new ks(t,s)}constructor(t,s){void 0!==t?(this.x=t,this.y=s):this.x=this.y=Number.NaN}clone(){return new ks(this.x,this.y)}assign(t){this.setCoordsPoint2D(t)}setCoords(t,s){return this.x=t,this.y=s,this}setCoordsPoint2D(t){this.x=t.x,this.y=t.y}isEqualPoint2D(t,s){return void 0!==s?Math.abs(this.x-t.x)<=s&&Math.abs(this.y-t.y)<=s:this.x===t.x&&this.y===t.y}isEqual(t,s,e){return void 0!==e?Math.abs(this.x-t)<=e&&Math.abs(this.y-s)<=e:this.x===t&&this.y===s}equalsPoint2D(t,s){return this.isEqualPoint2D(t,s)}setSub(t,s){this.x=t.x-s.x,this.y=t.y-s.y}addThis(t){return this.x+=t.x,this.y+=t.y,this}setAdd(t,s){return this.x=t.x+s.x,this.y=t.y+s.y,this}absoluteOther(t){}absolute(){return(0,i.g)(0),this}setNegate(){this.x=-this.x,this.y=-this.y}setNegateOther(t){this.x=-t.x,this.y=-t.y}interpolateThis(t,s){}interpolate(t,s,e){(0,i.g)(0)}scaleAddThis(t,s){this.x=this.x*t+s.x,this.y=this.y*t+s.y}setScaleAdd(t,s,e){this.x=s.x*t+e.x,this.y=s.y*t+e.y}scaleOther(t,s){(0,i.g)(0)}scale(t){this.x*=t,this.y*=t}compare(t){return this.y<t.y?-1:this.y>t.y?1:this.x<t.x?-1:this.x>t.x?1:0}compareX(t){return this.x<t.x?-1:this.x>t.x?1:this.y<t.y?-1:this.y>t.y?1:0}normalizeOther(t){(0,i.g)(0)}normalize(){const t=this.length();return t?(this.x/=t,this.y/=t):(this.x=1,this.y=0),this}getUnitVector(){return this.clone().normalize()}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}sqrLength(){return this.x*this.x+this.y*this.y}static averageFast(t,s){return(0,i.g)(0),{}}static average(t,s){const e=new ks;if(0===s)return e.setNAN(),e;if(1===s)return e.assign(t[0]),e;const i=new n(t[0].x),r=new n(t[0].y);for(let e=1;e<s;e++)i.add(t[e].x),r.add(t[e].y),255&e||(i.normalize(),r.normalize());return e.x=i.getResult()/s,e.y=r.getResult()/s,e}static calculateLength(t,s){const e=new n(0);for(let i=1;i<s;i++)e.add(ks.distance(t[i],t[i-1]));return e.getResult()}offset(t,s){const e=ks.distance(t,s),i=ks.construct(this.x,this.y);if(0===e)return ks.distance(i,t);const n=s.clone();return n.subThis(t),i.subThis(t),i.crossProduct(n)/e}side(t,s){return t.equals(s)?this.equals(t)?0:1:ks.orientationRobust(s,t,this)}static sqrDistance(t,s){const e=t.x-s.x,i=t.y-s.y;return e*e+i*i}static sqrDistanceCoords(t,s,e,i){const n=e-t,r=i-s;return n*n+r*r}static distance(t,s){return Math.sqrt(ks.sqrDistance(t,s))}dotProduct(t){return this.x*t.x+this.y*t.y}dotProductAbs(t){return Math.abs(this.x*t.x)+Math.abs(this.y*t.y)}crossProduct(t){return this.x*t.y-this.y*t.x}crossProductAbs(t){return(0,i.g)(0),0}rotateDirect(t,s){const e=this.x*t-this.y*s,i=this.x*s+this.y*t;this.x=e,this.y=i}rotateReverse(t,s){const e=this.x*t+this.y*s,i=-this.x*s+this.y*t;this.x=e,this.y=i}leftPerpendicularThis(){const t=this.x;this.x=-this.y,this.y=t}leftPerpendicularOther(t){const s=t.x;this.x=-t.y,this.y=s}rightPerpendicularThis(){const t=this.x;this.x=this.y,this.y=-t}rightPerpendicularOther(t){const s=t.x;this.x=t.y,this.y=-s}equals(t){return this.x===t.x&&this.y===t.y}notequals(t){return this.x!==t.x||this.y!==t.y}not(){return!this.x&&!this.y}gt(t){return this.y>t.y||this.y===t.y&&this.x>t.x}gte(t){return!this.lt(t)}lt(t){return this.y<t.y||this.y===t.y&&this.x<t.x}lte(t){return!this.gt(t)}subThis(t){return this.x-=t.x,this.y-=t.y,this}divThis(t){return this.x/=t,this.y/=t,this}add(t){return new ks(this.x+t.x,this.y+t.y)}sub(t){return new ks(this.x-t.x,this.y-t.y)}negateThis(){return this.x=-this.x,this.y=-this.y,this}negate(){return new ks(-this.x,-this.y)}mul(t){return new ks(this.x*t,this.y*t)}mulThis(t){return this.x*=t,this.y*=t,this}divide(t){return new ks(this.x/t,this.y/t)}setNAN(){this.x=this.y=Number.NaN}isNAN(){return Number.isNaN(this.x)||Number.isNaN(this.y)}static getNAN(){return new ks(Number.NaN,Number.NaN)}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)}isZero(){return 0===this.x&&0===this.y}norm(t){switch(t){case 0:{const t=Math.abs(this.x),s=Math.abs(this.y),e=t-s;return e>=0?t:e<=0?s:Number.NaN}case 1:return Math.abs(this.x)+Math.abs(this.y);case 2:return Math.sqrt(this.x*this.x+this.y*this.y);default:(0,i.t)("norm")}}getQuarter(){return ks.getQuarterCoords(this.x,this.y)}static getQuarterCoords(t,s){return t>0?s>=0?1:4:s>0?2:0===t?4:3}static compareVectors(t,s){const e=t.getQuarter(),i=s.getQuarter();return i===e?ks.orientationRobustImpl(ks.construct(0,0),s,t,!0):e<i?-1:1}static compareVectorsOrigin(t,s,e){const i=s.sub(t),n=e.sub(t),r=i.getQuarter(),u=n.getQuarter();return u===r?ks.orientationRobustImpl(t,e,s,!0):r<u?-1:1}static orientationRobust(t,s,e){return ks.orientationRobustImpl(t,s,e,!1)}static orientationRobustEx(t,s,e,i){if(t.equals(s)||e.equals(i))return 0;const n=s.x-t.x,r=s.y-t.y,u=i.x-e.x,h=i.y-e.y;{const t=ks.getQuarterCoords(n,r)-1,s=ks.getQuarterCoords(u,h)-1,e=ks.d[t][s];if(0!==e)return e}const o=n*h,a=r*u,m=4*xs()*(Math.abs(o)+Math.abs(a)),c=o-a;return Math.abs(c)>=m?c<0?-1:c>0?1:0:ks.orientationRobustExMp(t,s,e,i)}static orientationRobustExMp(t,s,e,i){const n=qs.constructDouble(s.x),r=qs.constructDouble(i.x);n.subThis(qs.constructDouble(t.x)),r.subThis(qs.constructDouble(e.x));const u=qs.constructDouble(s.y),h=qs.constructDouble(i.y);return u.subThis(qs.constructDouble(t.y)),h.subThis(qs.constructDouble(e.y)),n.mulThis(h),u.mulThis(r),n.subThis(u),n.LZ()?-1:n.GZ()?1:0}static orientationNonRobust(t,s,e){const i=s.sub(t).crossProduct(e.sub(t));return i<0?-1:i>0?1:0}static orientationRobustImpl(t,s,e,i){if(s.isEqualPoint2D(t)||e.isEqualPoint2D(t)||s.isEqualPoint2D(e))return 0;const n=s.x-t.x,r=s.y-t.y,u=e.x-t.x,h=e.y-t.y;if(!i){const t=ks.getQuarterCoords(n,r)-1,s=ks.getQuarterCoords(u,h)-1,e=ks.d[t][s];if(0!==e)return e}const o=(Math.abs(n)+Math.abs(r)+Math.abs(u)+Math.abs(h))*(Math.abs(s.x)+Math.abs(s.y)+Math.abs(e.x)+Math.abs(e.y))*8*v(),a=n*h-r*u;if(Math.abs(a)>o)return a<0?-1:1;if(_(s.x,t.x)&&_(e.y,t.y)&&_(s.y,t.y)&&_(e.x,t.x)&&l(n,h)&&l(r,u)){const t=n*h,s=r*u;if(_(t,s)){const e=t-s;return e<0?-1:e>0?1:0}}return ks.orientationRobustMp(t,s,e)}static orientationRobustMp(t,s,e){const i=qs.constructDouble(s.x),n=qs.constructDouble(e.x);{const s=qs.constructDouble(t.x);i.subThis(s),n.subThis(s)}const r=qs.constructDouble(e.y),u=qs.constructDouble(s.y);{const s=qs.constructDouble(t.y);r.subThis(s),u.subThis(s)}return i.mulThis(r),u.mulThis(n),i.subThis(u),i.LZ()?-1:i.GZ()?1:0}static inCircleRobust(t,s,e,i){const n=new c,r=new c;n.set(t.x),n.subThis(i.x),r.set(t.y),r.subThis(i.y);const u=new c,h=new c;u.set(s.x),u.subThis(i.x),h.set(s.y),h.subThis(i.y);const o=new c,a=new c;o.set(e.x),o.subThis(i.x),a.set(e.y),a.subThis(i.y);const m=n.mulE(h).subE(r.mulE(u)),l=u.mulE(a).subE(h.mulE(o)),f=n.mulE(a).subE(r.mulE(o)),_=n.mulE(n).addE(r.mulE(r)),v=u.mulE(u).addE(h.mulE(h)),b=o.mulE(o).addE(a.mulE(a)),d=_.mulE(l).subE(v.mulE(f)).addE(b.mulE(m));if(!d.isFuzzyZero()){const t=d.value();return t<0?-1:t>0?1:0}return ks.inCircleRobustMp(t,s,e,i)}static inCircleRobustMp(t,s,e,i){do{if(!_(t.x,i.x)||!_(t.y,i.y))break;if(!_(s.x,i.x)||!_(s.y,i.y))break;if(!_(e.x,i.x)||!_(e.y,i.y))break;const n=t.x-i.x,r=t.y-i.y,u=s.x-i.x,h=s.y-i.y,o=e.x-i.x,a=e.y-i.y;if(!l(n,h)||!l(r,u))break;if(!l(u,a)||!l(h,o))break;if(!l(n,a)||!l(r,o))break;if(!l(n,n)||!l(r,r))break;if(!l(u,u)||!l(h,h))break;if(!l(o,o)||!l(a,a))break;const m=n*h,c=r*u,v=u*a,b=h*o,d=n*a,p=r*o,x=n*n,N=r*r,y=u*u,g=h*h,T=o*o,E=a*a;if(!_(m,c))break;if(!_(v,b))break;if(!_(d,p))break;if(!f(x,N))break;if(!f(y,g))break;if(!f(T,E))break;const M=m-c,w=v-b,I=d-p,D=x+N,P=y+g,A=T+E;if(!l(D,w))break;if(!l(P,I))break;if(!l(A,M))break;const q=D*w,z=P*I,C=A*M;if(!_(q,z))break;const Z=q-z;if(!f(Z,C))break;const B=Z+C;return B<0?-1:B>0?1:0}while(0);const n=qs.constructDouble(i.x),r=qs.constructDouble(i.y),u=qs.constructDouble(t.x),h=qs.constructDouble(t.y);u.subThis(n),h.subThis(r);const o=qs.constructDouble(s.x),a=qs.constructDouble(s.y);o.subThis(n),a.subThis(r);const m=qs.constructDouble(e.x),c=qs.constructDouble(e.y);m.subThis(n),c.subThis(r);const v=u.mul(a).sub(h.mul(o)),b=o.mul(c).sub(a.mul(m)),d=u.mul(c).sub(h.mul(m)),p=u.mul(u).add(h.mul(h)),x=o.mul(o).add(a.mul(a)),N=m.mul(m).add(c.mul(c)),y=p.mul(b).sub(x.mul(d)).add(N.mul(v));return y.LZ()?-1:y.GZ()?1:0}static inCircleRobustMp3Point(t,s,e){const i=qs.constructDouble(t.x),n=qs.constructDouble(t.y),r=qs.constructDouble(s.x),u=qs.constructDouble(s.y),h=qs.constructDouble(e.x),o=qs.constructDouble(e.y),a=h.mul(h).add(o.mul(o)).sub(h.mul(i).add(o.mul(n)).add(h.mul(r)).add(o.mul(u))).add(i.mul(r).add(n.mul(u)));return a.LZ()?-1:a.GZ()?1:0}static inCircleRobust3Point(t,s,e){const i=new c(t.x),n=new c(t.y),r=new c(s.x),u=new c(s.y),h=new c(e.x),o=new c(e.y),a=h.mulE(h).addE(o.mulE(o)).subE(h.mulE(i).addE(o.mulE(n)).addE(h.mulE(r)).addE(o.mulE(u))).addE(i.mulE(r).addE(n.mulE(u)));if(!a.isFuzzyZero()){const t=a.value();return t<0?-1:t>0?1:0}return ks.inCircleRobustMp3Point(t,s,e)}static calculateCircleCenterFromThreePoints(t,s,e){if(t.equals(e)||t.equals(s)||e.equals(s))return ks.getNAN();const i=function(t,s,e){const i=new c(s.x);i.subThis(t.x);const n=new c(s.y);n.subThis(t.y);const r=new c(e.x);r.subThis(t.x);const u=new c(e.y);u.subThis(t.y);const h=i.clone();h.mulThisE(u);let o=n.clone();if(o.mulThisE(r),h.subThisE(o),0===h.value())return ks.getNAN();h.mulThis(2);const a=i.clone();a.mulThisE(i);const m=n.clone();m.mulThisE(n);const l=a.clone();l.addThisE(m);const f=r.clone();f.mulThisE(r);const _=u.clone();_.mulThisE(u);const v=f.clone();v.addThisE(_);const b=n.clone();b.mulThisE(v),o=u.clone(),o.mulThisE(l),b.subThisE(o),b.divThisE(h);const d=i.clone();d.mulThisE(v),o=r.clone(),o.mulThisE(l),d.subThisE(o),d.divThisE(h);const p=ks.construct(t.x-b.value(),t.y+d.value()),x=t.sub(p).length(),N=s.sub(p).length(),y=e.sub(p).length(),g=1e-15*(x+Math.abs(t.x)+Math.abs(s.x)+Math.abs(e.x)+Math.abs(t.y)+Math.abs(s.y)+Math.abs(e.y));return Math.abs(x-N)<=g&&Math.abs(x-y)<=g&&b.eps()<g&&d.eps()<g?p:ks.getNAN()}(t,s,e);return i.isNAN()?function(t,s,e){const i=qs.constructDouble(s.x);i.subDoubleThis(t.x);const n=qs.constructDouble(s.y);n.subDoubleThis(t.y);const r=qs.constructDouble(e.x);r.subDoubleThis(t.x);const u=qs.constructDouble(e.y);u.subDoubleThis(t.y);const h=i.clone();h.mulThis(u);let o=n.clone();if(o.mulThis(r),h.subThis(o),h.isZero())return ks.getNAN();h.mulDoubleThis(2);const a=i.clone();a.mulThis(i);const m=n.clone();m.mulThis(n);const c=a.clone();c.addThis(m);const l=r.clone();l.mulThis(r);const f=u.clone();f.mulThis(u);const _=l.clone();_.addThis(f);const v=n.clone();v.mulThis(_),o=u.clone(),o.mulThis(c),v.subThis(o),v.divThis(h);const b=i.clone();return b.mulThis(_),o=r.clone(),o.mulThis(c),b.subThis(o),b.divThis(h),ks.construct(t.x-v.value(),t.y+b.value())}(t,s,e):i}static calculateAngle(t,s){return Math.atan2(t.crossProduct(s),t.dotProduct(s))}static isBisectorRobust(t,s,e){return(0,i.g)(0),!1}static size(){return 2}get 0(){return this.x}get 1(){return this.y}set 0(t){this.x=t}set 1(t){this.y=t}static compareZorder(t,s){const e=ks.c_compare_zorder_xx[t.x<0?1:0]|ks.c_compare_zorder_yy[t.y<0?1:0],i=ks.c_compare_zorder_xx[s.x<0?1:0]|ks.c_compare_zorder_yy[s.y<0?1:0];if(e===i){let e=0,i=0;for(let n=0;n<2;++n){const r=Zs(t[n],s[n]);r>e&&(e=r,i=n)}return t[i]<s[i]}return e<i}static lerp(t,s,e){const i=new ks;return R(t,s,e,i),i}static getClosestCoordinate(t,s,e,i=!1){const n=ks.getNAN();n.setSub(s,t);const r=n.sqrLength();if(0===r)return.5;if(s.isEqualPoint2D(e))return 1;const u=ks.getNAN();u.setSub(e,t);let h=u.dotProduct(n)/r;return i||(h<0?h=0:h>1&&(h=1)),h}static intersectLinesAtOnePoint(t,s,e,i){if(t.equals(s)||e.equals(i))return ks.getNAN();const n=s.x-t.x,r=e.x-i.x,u=s.y-t.y,h=e.y-i.y,o=n*h-r*u;if(!o)return ks.getNAN();const a=o;if(0===a)return ks.getNAN();let m=(e.x-t.x)*h-(e.y-t.y)*r;m/=a;const c=new ks;return R(t,s,m,c),c.isFinite()?c:ks.getNAN()}toString(){return`[${this.x},${this.y}]`}}ks.dimensions=2,ks.d=[[0,1,0,-1],[-1,0,1,0],[0,-1,0,1],[1,0,-1,0]],ks.c_compare_zorder_xx=[2,0],ks.c_compare_zorder_yy=[1,0]}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3661],{55537:(t,s,e)=>{function i(t,s){try{if(!t)throw new Error(s)}catch(t){throw t}}e.d(s,{A:()=>f,B:()=>k,C:()=>G,D:()=>Z,G:()=>m,a:()=>M,b:()=>w,c:()=>z,d:()=>R,e:()=>_,f:()=>d,g:()=>i,h:()=>x,i:()=>p,j:()=>N,k:()=>b,l:()=>v,m:()=>g,n:()=>E,o:()=>B,p:()=>D,q:()=>q,r:()=>T,s:()=>C,t:()=>A,u:()=>P,v:()=>y,w:()=>F,x:()=>I,y:()=>S,z:()=>L});class n extends Error{constructor(t,s){super(s),this.m_AdditionalMessage=s,this.m_ErrorType=t,this.name="GeometryError"}what(){return function(t){switch(t){case 1:return"Unknown error";case 2:return"Corrupted geometry";case 3:return"Empty geometry";case 4:return"Math singularity";case 5:return"Buffer is too small";case 6:return"Invalid shape type";case 7:return"Projection out of supported range";case 8:return"Non simple geometry";case 9:return"Cannot calculate geodesic";case 10:return"Notation conversion";case 11:return"Missing grid file";case 12:return"Invalid call";case 13:return"Internal error";case 14:return"Not implemented";case 15:return"IO error";case 16:return"Invalid 3D";case 17:return"An ambiguous geography edge with antipodal points";case 18:return"Geocentric coordinates require ellipsoidal height";case 19:return"Geography cannot be projected into a gnomonic plane or a result of an operation cannot fit into a gnomonic plane";case 20:return"Geometry is too large to be exported in to a given format";case 22:return"Operation is canceled by the user";case 21:return"The operation, such as projection or geodetic computation, cannot be performed without pe-wasm loaded";default:return"unknown error"}}(this.m_ErrorType)}additionalMessage(){return this.m_AdditionalMessage?this.m_AdditionalMessage:""}code(){return this.m_ErrorType}}class r extends n{constructor(t){super(2,t),this.name="CorruptedGeometryError"}}class u extends n{constructor(t){super(3,t),this.name="EmptyGeometryError"}}class h extends n{constructor(t){super(4,t),this.name="MathSingularityError"}}class o extends n{constructor(t){super(21,t),this.name="ProjectionEngineNotLoadedError"}}class a extends n{constructor(t){super(8,t),this.name="NonSimpleGeometryError"}}var m,c;(c=m||(m={}))[c.enumUnknown=0]="enumUnknown",c[c.enumPoint=513]="enumPoint",c[c.enumLine=5122]="enumLine",c[c.enumBezier=5123]="enumBezier",c[c.enumEllipticArc=5124]="enumEllipticArc",c[c.enumEnvelope=3077]="enumEnvelope",c[c.enumMultiPoint=8710]="enumMultiPoint",c[c.enumPolyline=25607]="enumPolyline",c[c.enumPolygon=27656]="enumPolygon",c[c.enumMultipatch=40969]="enumMultipatch",c[c.enumGeometryCollection=3594]="enumGeometryCollection",c[c.enumRationalBezier2=5134]="enumRationalBezier2",c[c.enumBezier2=5135]="enumBezier2",c[c.enumRationalBezier23d=5392]="enumRationalBezier23d",c[c.enumGreatArc3d=5393]="enumGreatArc3d";const l=[0,0,1,1,1,2,0,1,2,3,-1,-1,-1,-1,1,1];function f(t){return l[15&t]}function _(t){return!!(512&t)}function v(t){return!!(1024&t)}function b(t){return!!(2048&t)}function d(t){return!!(4096&t)}function p(t){return!!(8192&t)}function x(t){return!!(16384&t)}function N(t){return!!(32768&t)}function y(t){const s=t.getGeometryType();return p(s)?t.getPointCount():t.isEmpty()?0:s===m.enumEnvelope?4:s===m.enumPoint?1:d(s)?2:void z("missing type")}function g(t){const s=t.getGeometryType();if(x(s))return t.hasNonLinearSegments();if(s===m.enumGeometryCollection){const s=t;for(let t=0,e=s.getGeometryCount();t<e;t++)if(g(s.getGeometry(t)))return!0;return!1}return!!d(s)&&s!==m.enumLine}function T(t){throw new o(t)}function E(t){throw new r(t)}function M(t){throw new Error(t)}function w(t){throw new h(t)}function I(){M("Geometry type is not supported for 3D operations.")}function D(t){throw new n(12,t)}function P(t){throw new u(t)}function A(t){throw new n(14,t)}function q(t){throw new Error(t)}function z(t){throw new n(13,t)}function C(t){throw new Error(t)}function Z(t){throw new a(t)}function B(t){t&&g(t)&&A("Operation does not support curves.")}function R(t){t&&N(t.getGeometryType())&&A("Unsupported geometry type.")}function G(t){t===m.enumGeometryCollection&&M("Geometry_collection instances are not supported in this operation")}function k(t){G(t.getGeometryType())}function S(t){M(`bad wkid: ${t}`)}function L(t){let s="bad wkt: ";s+=t,s+="...",M(s)}function F(t,s){t||M(s)}},83661:(t,s,e)=>{e.d(s,{$:()=>y,A:()=>fs,B:()=>at,C:()=>vt,D:()=>ps,E:()=>a,F:()=>c,G:()=>p,H:()=>d,I:()=>jt,J:()=>Ns,K:()=>n,L:()=>Mt,M:()=>qs,N:()=>xs,O:()=>Pt,P:()=>ks,Q:()=>Z,R:()=>B,S:()=>At,T:()=>ot,U:()=>_t,V:()=>D,W:()=>P,X:()=>bt,Y:()=>Yt,Z:()=>R,_:()=>N,a:()=>k,a0:()=>A,a1:()=>q,a2:()=>z,a3:()=>Vt,a4:()=>zt,a5:()=>Es,a6:()=>Ds,a7:()=>ws,a8:()=>Ms,a9:()=>it,aA:()=>Bs,aB:()=>Gs,aC:()=>M,aD:()=>hs,aE:()=>Wt,aF:()=>Lt,aG:()=>as,aH:()=>os,aa:()=>nt,ab:()=>Bt,ac:()=>gt,ad:()=>x,ae:()=>Cs,af:()=>zs,ag:()=>S,ah:()=>Ts,ai:()=>et,aj:()=>V,ak:()=>L,al:()=>Ps,am:()=>dt,an:()=>ds,ao:()=>Jt,ap:()=>ct,aq:()=>us,ar:()=>ms,as:()=>wt,at:()=>ls,au:()=>Et,av:()=>I,aw:()=>rs,ax:()=>gs,ay:()=>xt,az:()=>Rs,b:()=>mt,c:()=>lt,d:()=>Dt,e:()=>F,f:()=>w,g:()=>bs,h:()=>Nt,i:()=>Xt,j:()=>Ht,k:()=>qt,l:()=>st,m:()=>Tt,n:()=>It,o:()=>Ct,p:()=>Zt,q:()=>C,r:()=>$t,s:()=>ys,t:()=>O,u:()=>pt,v:()=>ft,w:()=>yt,x:()=>G,y:()=>g,z:()=>E});var i=e(55537);class n{constructor(t){this.sum=t,this.compensation=0}assign(t){return this.compensation=t.compensation,this.sum=t.sum,this}reset(){this.sum=this.compensation=0}resetToStart(t){this.sum=t,this.compensation=0}normalize(){const t=[Number.NaN];this.sum=tt(this.sum,this.compensation,t),this.compensation=t[0]}add(t){const s=this.sum+t;let e;if(Math.abs(this.sum)>=Math.abs(t)){const i=this.sum-s+t;e=this.compensation+i}else{const i=t-s+this.sum;e=this.compensation+i}this.sum=s,this.compensation=e}sub(t){this.add(-t)}addProduct(t,s){const e=[0],i=W(t,s,e);this.add(i),this.add(e[0])}mul(t){const s=new n(0);s.addProduct(this.sum,t),s.addProduct(this.compensation,t),this.assign(s)}getResult(){return this.sum+this.compensation}pe(t){return this.add(t),this}me(t){return this.add(-t),this}}const r=[5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1],u=[-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3];function h(t){let s=0;return 65535n&t||(s+=16,t>>=16n),255n&t||(s+=8,t>>=8n),15n&t||(s+=4,t>>=4n),s+r[Number(BigInt.asUintN(4,t))]}function o(t){let s=0;return 4294967295n&t||(s=32,t>>=32n),s+h(BigInt.asUintN(32,t))}class a{constructor(t,s){if(this.m_EnvelopeType=1,void 0!==t){if(t instanceof a)return this.vmin=t.vmin,void(this.vmax=t.vmax);this.vmin=t,this.vmax=s,this.normalize()}else this.setEmpty()}static construct(t,s){return new a(t,s)}static constructEmpty(){return new a}setCoords(t,s){this.vmin=t,this.vmax=s,this.normalize()}setCoordsFromEnvelope(t){this.vmin=t.vmin,this.vmax=t.vmax}setEmpty(){this.vmin=Number.NaN,this.vmax=Number.NaN}getCenter(){return.5*(this.vmin+this.vmax)}equalsRange(t,s){return Vt(this.vmin,t)&&Vt(this.vmax,s)}equals(t,s){return!(!this.isEmpty()||!t.isEmpty())||(void 0!==s?Math.abs(this.vmin-t.vmin)<=s&&Math.abs(this.vmax-t.vmax)<=s:this.vmin===t.vmin&&this.vmax===t.vmax)}width(){return this.vmax-this.vmin}isEmpty(){return Number.isNaN(this.vmin)||Number.isNaN(this.vmax)}isZero(){return this.vmin===this.vmax}setInfinite(){this.vmin=Number.NEGATIVE_INFINITY,this.vmax=Number.POSITIVE_INFINITY}move(t){this.isEmpty()||(this.vmin+=t,this.vmax+=t)}contains(t){return t.vmin>=this.vmin&&t.vmax<=this.vmax}containsCoordinate(t){return t>=this.vmin&&t<=this.vmax}containsRightExclusive(t){return t>=this.vmin&&t<this.vmax}containsExclusiveCoordinate(t){return t>this.vmin&&t<this.vmax}containsExclusive(t){return t.vmin>this.vmin&&t.vmax<this.vmax}isIntersecting(t){return this.vmin<=t.vmin?this.vmax>=t.vmin:t.vmax>=this.vmin}mergeCoordinate(t){if(this.isEmpty())return this.vmin=t,void(this.vmax=t);this.mergeNeCoordinate(t)}merge(t){if(t.isEmpty())return;const s=t.vmin,e=t.vmax;this.mergeCoordinate(s),this.mergeCoordinate(e)}mergeNe(t){const s=t.vmin,e=t.vmax;this.mergeNeCoordinate(s),this.mergeNeCoordinate(e)}mergeNeCoordinate(t){t<this.vmin?this.vmin=t:t>this.vmax&&(this.vmax=t)}intersect(t){this.isEmpty()||t.isEmpty()?this.setEmpty():(this.vmin<t.vmin&&(this.vmin=t.vmin),this.vmax>t.vmax&&(this.vmax=t.vmax),this.vmin>this.vmax&&this.setEmpty())}inflate(t){this.isEmpty()||(this.vmin-=t,this.vmax+=t,this.vmax<this.vmin&&this.setEmpty())}normalize(){this.vmin<=this.vmax||(this.vmin>this.vmax?this.vmax=lt(this.vmin,this.vmin=this.vmax):this.setEmpty())}isValid(){return this.isEmpty()||this.vmin<=this.vmax}snapClip(t){return ys(t,this.vmin,this.vmax)}calculateToleranceFromEnvelope(){return this.isEmpty()?bs():(Math.abs(this.vmin)+Math.abs(this.vmax)+1)*bs()}static unit(){return m}normalizeNoNAN(){this.vmin>this.vmax&&(this.vmax=lt(this.vmin,this.vmin=this.vmax))}setCoordsNoNAN(t,s){this.vmin=t,this.vmax=s,this.normalizeNoNAN()}clone(){return new a(this.vmin,this.vmax)}}const m=new a(0,1);class c{static getNAN(){return new c(Number.NaN)}constructor(t,s){this.m_value=t??0,this.m_eps=s??0}[Symbol.toPrimitive](t){return this}clone(){return new c(this.m_value,this.m_eps)}assign(t){return this.m_value=t.m_value,this.m_eps=t.m_eps,this}scaleError(t){this.m_eps*=t}setError(t){this.m_eps=t}set(t,s){return this.m_value=t,this.m_eps=s??0,this}setWithEps(t,s){return void 0===s&&(s=1),this.m_value=t,this.m_eps=c.ulp(t)*s,this}setE(t){return this.m_value=t.m_value,this.m_eps=t.m_eps,this}precise(){return new c(this.m_value)}value(){return this.m_value}toDouble(){return this.m_value}eps(){return this.m_eps}resetError(){return this.m_eps=0,this}absThis(){return this.m_value=Math.abs(this.m_value),this}add(t){return this.clone().addThis(t)}addE(t){return this.clone().addThisE(t)}addThisE(t){const s=this.m_value+t.m_value,e=this.m_eps+t.m_eps+c.ulp(s);return this.m_value=s,this.m_eps=e,this}addThis(t){const s=this.m_value+t,e=this.m_eps+c.ulp(s);return this.m_value=s,this.m_eps=e,this}subE(t){return this.clone().subThisE(t)}sub(t){return this.clone().subThis(t)}subThisE(t){const s=this.m_value-t.m_value,e=this.m_eps+t.m_eps+c.ulp(s);return this.m_value=s,this.m_eps=e,this}subThis(t){const s=this.m_value-t,e=this.m_eps+c.ulp(s);return this.m_value=s,this.m_eps=e,this}setAddE(t,s){return this.m_value=t.m_value+s.m_value,this.m_eps=t.m_eps+s.m_eps+c.ulp(this.m_value),this}setAdd(t,s){return this.m_value=t+s,this.m_eps=c.ulp(this.m_value),this}setAddEN(t,s){return this.m_value=t.m_value+s,this.m_eps=t.m_eps+c.ulp(this.m_value),this}setAddNE(t,s){return this.m_value=t+s.m_value,this.m_eps=s.m_eps+c.ulp(this.m_value),this}setSubE(t,s){return this.m_value=t.m_value-s.m_value,this.m_eps=t.m_eps+s.m_eps+c.ulp(this.m_value),this}setSub(t,s){return this.m_value=t-s,this.m_eps=c.ulp(this.m_value),this}setSubEN(t,s){return this.m_value=t.m_value-s,this.m_eps=t.m_eps+c.ulp(this.m_value),this}setSubNE(t,s){return this.m_value=t-s.m_value,this.m_eps=s.m_eps+c.ulp(this.m_value),this}mulThisE(t){const s=this.m_value*t.m_value;return this.m_eps=this.m_eps*Math.abs(t.m_value)+t.m_eps*Math.abs(this.m_value)+this.m_eps*t.m_eps+c.ulp(s),this.m_value=s,this}mulThis(t){const s=this.m_value*t;return this.m_eps=this.m_eps*Math.abs(t)+c.ulp(s),this.m_value=s,this}mul(t){return this.clone().mulThis(t)}mulE(t){return this.clone().mulThisE(t)}setMulE(t,s){const e=t.m_value*s.m_value;return this.m_eps=t.m_eps*Math.abs(s.m_value)+s.m_eps*Math.abs(t.m_value)+t.m_eps*s.m_eps+c.ulp(e),this.m_value=e,this}setMul(t,s){return this.m_value=t*s,this.m_eps=c.ulp(this.m_value),this}setMulEN(t,s){return this.setE(t),this.mulThis(s)}setMulNE(t,s){return this.setE(s),this.mulThis(t)}mulThisByPower2(t){return this.m_value*=t,this.m_eps*=Math.abs(t),this}static st_mulByPower2(t,s){return new c(t.m_value,t.m_eps).mulThisByPower2(s)}divE(t){return this.clone().divThisE(t)}divThisE(t){const s=Math.abs(t.m_value),e=this.m_value/t.m_value;let i=(this.m_eps+Math.abs(e)*t.m_eps)/s;if(t.m_eps>.01*s){const e=t.m_eps/s;i*=1+(1+e)*e}return this.m_value=e,this.m_eps=i+c.ulp(e),this}divThis(t){const s=Math.abs(t);return this.m_value/=t,this.m_eps=this.m_eps/s+c.ulp(this.m_value),this}setDivE(t,s){return this.setE(t),this.divThisE(s)}setDiv(t,s){return this.m_value=t/s,this.m_eps=c.ulp(this.m_value),this}setDivEN(t,s){return this.setE(t),this.divThis(s)}setDivNE(t,s){return this.set(t),this.divThisE(s)}divThisByPower2(t){return this.m_value/=t,this.m_eps/=Math.abs(t),this}invThis(){return this.setE(p.clone().divThisE(this)),this}sqrt(){return this.clone().sqrtThis()}sqrtThis(){let t,s;return this.m_value>=0?(t=Math.sqrt(this.m_value),s=this.m_value>10*this.m_eps?.5*this.m_eps/t:this.m_value>this.m_eps?t-Math.sqrt(this.m_value-this.m_eps):Math.max(t,Math.sqrt(this.m_value+this.m_eps)-t),s+=c.ulp(t)):this.m_value<-this.m_eps?(t=Number.NaN,s=Number.NaN):(t=0,s=Math.sqrt(this.m_eps)),this.m_value=t,this.m_eps=s,this}sqr(){return this.clone().sqrThis()}sqrThis(){const t=this.m_value*this.m_value;return this.m_eps=2*this.m_eps*Math.abs(this.m_value)+this.m_eps*this.m_eps+c.ulp(t),this.m_value=t,this}setSin(t){const s=Math.sin(t.m_value),e=Math.cos(t.m_value);this.m_value=s;const i=Math.abs(s),n=Math.abs(t.value());return this.m_eps=(Math.abs(e)+.5*i*t.m_eps)*t.m_eps+c.ulp(i+n),this}static ulp(t){let s=Ft(t);const e=((0x7ff0000000000000n&s)>>52n)-1075n;return e>-1023n?(s=e+0x3ffn<<52n,function(t){return kt[0]=t,Gt[0]}(s)):0===t?0:Number.MIN_VALUE}setCos(t){const s=Math.sin(t.m_value),e=Math.cos(t.m_value);this.m_value=e;const i=Math.abs(e),n=Math.abs(t.value());return this.m_eps=(Math.abs(s)+.5*i*t.m_eps)*t.m_eps+c.ulp(i+n),this}static st_cosAndSin(t,s,e){const i=Math.sin(t.m_value),n=Math.cos(t.m_value);e.m_value=i,s.m_value=n;const r=Math.abs(i),u=Math.abs(n),h=Math.abs(t.value());e.m_eps=(Math.abs(n)+.5*r*t.m_eps)*t.m_eps+c.ulp(r+h),s.m_eps=(Math.abs(i)+.5*u*t.m_eps)*t.m_eps+c.ulp(u+h)}negate(){return this.clone().negateThis()}negateThis(){return this.m_value=-this.m_value,this}setAbs(){return this.m_value=Math.abs(this.m_value),this}isInInterval(t){return a.construct(this.m_value-this.m_eps,this.m_value+this.m_eps).isIntersecting(t)}eq(t){return Math.abs(this.m_value-t.m_value)<=this.m_eps+t.m_eps}ne(t){return!this.eq(t)}gt(t){return this.m_value-t.m_value>this.m_eps+t.m_eps}lt(t){return t.m_value-this.m_value>this.m_eps+t.m_eps}ge(t){return!this.lt(t)}le(t){return!this.gt(t)}tolEQ(t,s){return Math.abs(this.m_value-t.m_value)<=s||this.eq(t)}tolNE(t,s){return!this.tolEQ(t,s)}tolGT(t,s){return this.m_value-t.m_value>s&&this.gt(t)}tolLT(t,s){return t.m_value-this.m_value>s&&this.lt(t)}tolGE(t,s){return!this.tolLT(t,s)}tolLE(t,s){return!this.tolGT(t,s)}isZero(){return Math.abs(this.m_value)<=this.m_eps}isFuzzyZero(){return this.isZero()&&0!==this.m_eps}tolIsZero(t){return Math.abs(this.m_value)<=Math.max(this.m_eps,t)}setPi(){this.setE(b)}setEuler(){this.set(2.718281828459045,v())}static size(){return 1}}function l(t,s){const e=Ot(t),i=Ot(s),n=53-o(e),r=53-o(i);return(n>=0?n:0)+(r>=0?r:0)<=52}function f(t,s){const e=t+s;return e-t===s&&e-s===t}function _(t,s){const e=t-s;return t-e===s&&s+e===t}function v(){return xs()}c.dimensions=1;const b=new c(Math.PI,.5*v()),d=new c(0,0),p=new c(1,0),x=new c(4,0);function N(t,s,e){return t.addE(s.subE(t).mulE(e))}function y(t,s,e){return s.subE(s.subE(t).mulE(p.subE(e)))}function g(t){let s;if(0===t)s=1;else if(Math.abs(t)>.01)s=function(t){return Math.atanh(t)}(t)/t;else{let e;const i=-36.841361487904734;s=0;const n=t*t;for(let t=2*Math.trunc(i/Math.log(n)+2.5)-1;t>1;t-=2)e=1/t,s=(s+e)*n;s+=1}return s}function T(t){const s=Math.PI*Math.PI/6;let e;if(1===t)e=s;else if(t>1)e=s;else if(0===t)e=t;else if(t<0){const s=1+(t=Math.abs(t)),i=Math.log(s);e=i*i/-2-T(t/s)}else if(t>.5){const i=1-t,n=Math.log(t)*Math.log(i);e=s-T(i)-n}else{e=0;const s=1+Math.trunc(-16*Math.log(10)/Math.log(t)+1.5);let i=s;for(let n=s;n>0;n--,i-=1)e*=t,e+=1/(i*i);e*=t}return e}function E(t,s){const e=s*t;if(Math.abs(s)<.1){let s=0;for(let t=60;t>=1;t--)s*=e,s+=1/t/t;return s*=t,s}return T(e)/s}function M(t,s){return t<s?qt(t,s):qt(s,t)}function w(t,s){const e=Math.abs(t);return s>=0?e:-e}function I(t){return Math.round(t)}function D(t,s,e,i,n){n[0]=s[0]+(e[0]-s[0])*i,n[1]=s[1]+(e[1]-s[1])*i,3===t&&(n[2]=s[2]+(e[2]-s[2])*i)}function P(t,s,e,i,n){n[0]=e[0]-(e[0]-s[0])*(1-i),n[1]=e[1]-(e[1]-s[1])*(1-i),3===t&&(n[2]=e[2]-(e[2]-s[2])*(1-i))}function A(t,s,e,i,n){i<=.5?D(t,s,e,i,n):P(t,s,e,i,n)}function q(t,s,e,i,n){n[0]=s[0].addE(e[0].subE(s[0]).mulE(i)),n[1]=s[1].addE(e[1].subE(s[1]).mulE(i))}function z(t,s,e,i,n){n[0]=e[0].subE(e[0].subE(s[0]).mulE(p.subE(i))),n[1]=e[1].subE(e[1].subE(s[1]).mulE(p.subE(i)))}function C(t,s,e){let i;return i=e<=.5?t+(s-t)*e:s-(s-t)*(1-e),i}function Z(t,s,e){return t+(s-t)*e}function B(t,s,e){return s-(s-t)*(1-e)}function R(t,s,e,i){e<=.5?(i.x=t.x+(s.x-t.x)*e,i.y=t.y+(s.y-t.y)*e):(i.x=s.x-(s.x-t.x)*(1-e),i.y=s.y-(s.y-t.y)*(1-e))}function G(t,s,e,i){e<=.5?(i.x=t.x+(s.x-t.x)*e,i.y=t.y+(s.y-t.y)*e,i.z=t.z+(s.z-t.z)*e):(i.x=s.x-(s.x-t.x)*(1-e),i.y=s.y-(s.y-t.y)*(1-e),i.z=s.z-(s.z-t.z)*(1-e))}function k(t){return t*t}function S(t){return t*t*t}function L(t){return 1/Math.sqrt(t)}function F(t){return t<0?-1:t>0?1:0}function O(t,s,e,i){const n=[0],r=[0],u=[0];return tt(W(t,e,n),W(s,i,r),u)+(n[0]+r[0]+u[0])}const Q=[0],U=[0];function V(t,s,e){return function(t,s,e,i){const n=tt(t,s,J),r=tt(n,e,K);return tt(r,J[0]+K[0],i)}(W(t,s,Q),e,Q[0],U)}const j=[0],Y=[0],$=[0],H=[0];function W(t,s,e){const i=t*s;return X(t,j,Y),X(s,$,H),e[0]=Y[0]*H[0]-(i-j[0]*$[0]-Y[0]*$[0]-j[0]*H[0]),i}function X(t,s,e){const i=134217729*t;s[0]=i-(i-t),e[0]=t-s[0]}const J=[0],K=[0];function tt(t,s,e){const i=t+s;return Math.abs(t)>Math.abs(s)?e[0]=t-i+s:e[0]=s-i+t,i}function st(t,s){return t%s}function et(t){const s=1-t;if(0===s)return 1;let e;if(s<=.01){const t=s,i=Math.log(t);e=1+t*(.4431471805599453-.25*i+t*(.05680519270997949-.09375*i+t*(.02183137044373718-.05859375*i+t*(.011544521417308362-.042724609375*i+t*(.00714200031339596-.0336456298828125*i+t*(.004854743337164948-.027757644653320312*i+t*(.003514687963781376-.023627042770385742*i)))))))}else{if(t<.016){const s=t,e=.25,i=.046875,n=.01953125,r=.01068115234375,u=.0067291259765625,h=.004626274108886719,o=.0033752918243408203,a=.0025710230693221092;return ws()*(1-s*(e+s*(i+s*(n+s*(r+s*(u+s*(h+s*(o+s*a))))))))}e=rt(0,s,1)-t*ut(0,s,1)/3}return ys(e,1,ws())}function it(t,s,e=Number.NaN){if((0,i.g)(s>=0&&s<=1),0===s)return t;let n=1,r=t;if(r<0&&(r=-r,n=-1),1===s){const t=Math.round(r/Es()),s=r-t*Es();return n*(2*t+Math.sin(s))}const u=ws(),h=Math.floor(r/u);1&h?r=(h+1)*u-r:r-=h*u;const o=Math.sin(r),a=Number.isNaN(e)?et(s):e;let m;if(1===o)m=a+Math.sqrt(1-s)*(r-u);else{const t=r*r;if(.01424*Math.pow(t,4)<=2*xs())m=r*(1+t*s*(-1/6+t*((4-3*s)/120-(16+(45*s-60)*s)/5040*t)));else if(s<=.01){const t=Math.sin(2*r),e=Math.sin(4*r),i=Math.sin(6*r),n=Math.sin(8*r),u=Math.sin(10*r);m=r+s*((2*-r+t)/8+s*((-3*r+2*t-.25*e)/64+s*((-20*r+15*t-3*e+i/3)/1024+s*(5*(-140*r+112*t-28*e+16/3*i-.5*n)/65536+7*s*((-63*r+52.5*t-15*e+3.75*i-.625*n+.05*u)/65536+s*(-693*r+594*t-185.625*e+1.375*i-12.375*n+1.8*u-.125*Math.sin(12*r))/1048576)))))}else{const t=o*o,e=Math.cos(r),i=e*e,n=ht(o,e,s);m=o*(rt(i,n,1)-s*t*ut(i,n,1)/3)}}return 1&h?m=a*(h+1)-m:m+=a*h,n*m}function nt(t,s,e=Number.NaN){if(0===t)return 0;let i=1,n=t;t<0&&(n=-n,i=-1);const r=Number.isNaN(e)?et(s):e,u=Math.floor(n/r);1&u?n=(u+1)*r-n:n-=u*r;let h=n<=0?0:n>=r?ws():function(t,s,e){if(0===s)return t;if(1===s)return Math.asin(t);let i=0,n=!0;if(t<.2){const e=t*t,r=t*(1+e*s*(1/6+e*((13*s-4)/120+(16-284*s+493*s*s)/5040*e))),u=Math.abs(s*(4944*s-64-31224*s*s+37369*s*s*s)/362880*Math.pow(t,9));if(u<Math.abs(r)*xs())return r;i=r,n=u>.1*r}if(n){const n=1-s,r=1-t/e,u=Math.sqrt(r*r+n*n),h=Math.atan2(n,t+xs());i=ws()+Math.sqrt(u)*(h-ws())}let r=0;for(let n=0;n<7;n++){r=it(i,s,e);const u=ht(Math.sin(i),Math.cos(i),s);if(i-=(r-t)/Math.sqrt(u),n>0&&Math.abs(r-t)<=4*xs()*t)break}return i}(n,s,r);return 1&u?h=ws()*(u+1)-h:h+=ws()*u,i*h}function rt(t,s,e){(0,i.g)((0!==t?1:0)+(0!==s?1:0)+1>1);let n=t,r=s,u=e;for(;;){const t=Math.sqrt(n*r)+Math.sqrt(r*u)+Math.sqrt(u*n);n=.25*(n+t),r=.25*(r+t),u=.25*(u+t);const s=(n+r+u)/3,e=(s-n)/s,i=(s-r)/s,h=(s-u)/s;if(Math.abs(e)<=.0024&&Math.abs(i)<=.0024&&Math.abs(h)<=.0024){const t=e*i-h*h,n=e*i*h;return(1+(1/24*t-.1-3/44*n-5*t*t/208+t*n/16)*t+(1/14+3*n/104)*n)/Math.sqrt(s)}}}function ut(t,s,e){(0,i.g)(0!==t||0!==s);let r=t,u=s,h=e;const o=new n(0);let a=1;for(;;){const t=.2*(r+u+3*h),s=(t-r)/t,e=(t-u)/t,i=(t-h)/t;if(Math.abs(s)<=.0015&&Math.abs(e)<=.0015&&Math.abs(i)<=.0015){const n=s*e,r=i*i,u=n-r,h=n-6*r,m=h+u+u,c=3/26,l=h*(9/22*.25*h-.21428571428571427-1.5*c*i*m),f=i*(1/6*m+i*(-.4090909090909091*u+i*c*n));return 3*o.getResult()+a*(1+l+f)/(t*Math.sqrt(t))}const n=Math.sqrt(r),m=Math.sqrt(u),c=Math.sqrt(h),l=n*(m+c)+m*c;o.add(a/(c*(h+l))),a*=.25,r=.25*(r+l),u=.25*(u+l),h=.25*(h+l)}}function ht(t,s,e){return t<.999?1-e*k(t):1-e+e*k(s)}function ot(t,s,e,n,r){return 0===t?0===n?s:1===n?e:r:1===t?0===n?s:1===n?e:C(s,e,n):(2===t&&(0,i.t)("angular interpolation"),void(0,i.t)(""))}function at(t,s,e,n,r,u,h,o){if(0===t)for(let t=0;t<u;++t)n[t+r]=0===h?s[t]:1===h?e[t]:o;else if(1===t)if(0===h)mt(n,s,r,0,u);else if(1===h)mt(n,e,r,0,u);else for(let t=0;t<u;++t)n[t+r]=C(s[t],e[t],h);else if(2===t)if(0===h)mt(n,s,r,0,u);else if(1===h)mt(n,e,r,0,u);else{let t=0;for(let i=0,o=r;i<u;++i,++o)n[o]=C(s[i],e[i],h),t+=n[o]*n[o];if(t>0){t=Math.sqrt(t);for(let s=r;s<r+u;++s)n[s]/=t}else{for(let t=r;t<r+u;++t)n[t]=0;n[r]=1}}else(0,i.t)("")}function mt(t,s,e,i,n){if(0===n)return;let r=0,u=e,h=i;for(;r++<n;)t[u++]=s[h++]}function ct(t,s,e){let i=0;for(let n=0;!i&&n<e;++n)i=t[n]-s[n];return i}function lt(t,s){return t}function ft(t){t.sort(((t,s)=>t<s?-1:t>s?1:0))}function _t(t,s){const e=t.slice(0,s);ft(e),mt(t,e,0,0,s)}function vt(t,s,e,i){const n=t.slice(s,s+e);n.sort(i),mt(t,n,s,0,e)}function bt(t,s){return t<s?-1:t>s?1:0}function dt(t,s,e,i){return t<e?-1:t>e?1:s<i?-1:s>i?1:0}function pt(t,s){if(t.length<2)return t.length;let e=0;for(let i=1;i<t.length;++i)s(t[i],t[e])||(e++,t[i]=lt(t[e],t[e]=t[i]));return 1+e}function xt(t,s){t[s]=t.at(-1),t.pop()}function Nt(t,s=!1){return{[Symbol.dispose](){this.bForget||t()},bForget:s}}function yt(t,s,e){t.length=s,t.fill(e)}function gt(t,s,e){t.length=e;for(let i=0;i<e;++i)t[i]=new s}function Tt(t,s){const e=new Array(s);for(let i=0;i<s;++i)e[i]=new t;return e}function Et(t,s,e){for(let i=0;i<e;++i)t[i].assign(s[i]);return e}function Mt(t,s){const e=t.slice(0,s);for(let t=0;t<s;++t)e[t]=e[t].clone();return e}function wt(t){return Array.from({length:t},(()=>null))}function It(t,s){return Array.from({length:s},(()=>t()))}function Dt(t,s){const e=new Array(t);return e.fill(s),e}function Pt(t,s){return s in t&&1===Object.getOwnPropertyNames(t).length}class At{constructor(...t){this.m_elts=t}get length(){return this.m_elts.length}at(t){return this.m_elts[t]}[Symbol.dispose](){for(const t of this.m_elts)t[Symbol.dispose]()}}function qt(t,s){return{first:t,second:s}}const zt=Math.PI,Ct=2*Math.PI,Zt=.5*Math.PI;class Bt{constructor(t,s){this.m_cr=t,this.m_cc=s,this.m_v=Dt(t*s,0)}get(t,s){return this.m_v[t*this.m_cc+s]}set(t,s,e){this.m_v[t*this.m_cc+s]=e}inc(t,s){return++this.m_v[t*this.m_cc+s]}}const Rt=new ArrayBuffer(8),Gt=new Float64Array(Rt),kt=new BigUint64Array(Rt),St=0x0fffffffffffffn;function Lt(){return Number.EPSILON*vs}function Ft(t){return Gt[0]=t,kt[0]}function Ot(t){return Ft(t)&St}function Qt(t){return Number((9218868437227405312n&Ft(t))>>52n)}function Ut(t){if(0n===t)return-1n;if(1n===t||-1n===t)return 0n;t<0n&&(t=-t);let s=0n,e=512n,i=1n<<s+e;for(;t>=i;)s+=e,e<<=1n,i<<=e;let n=s;e>>=1n;let r=n+e;for(;e>0n;)t<1n<<r||(n=r),e>>=1n,r=n+e;return n}function Vt(t,s){return t===s||Number.isNaN(t)&&Number.isNaN(s)}function jt(t,s,e){return t===s||Math.abs(t-s)<=e||Number.isNaN(t)&&Number.isNaN(s)}function Yt(t,s){return t<s?-1:t>s?1:0}function $t(t,s){if(t<s)return-1;if(t>s)return 1;if(t===s)return 0;{const e=Number.isNaN(t),i=Number.isNaN(s);return e<i?-1:e>i?1:0}}function Ht(){return 2147483647}function Wt(){return 32767}function Xt(){return 2147483647}function Jt(){return-2147483648}const Kt=2147483647,ts=BigInt(Kt),ss=2166136261,es=16777619,is=14695981039346656037n,ns=1099511628211n;function rs(t){let s=ss;for(let e=0,i=t.length;e<i;++e)s=(s^t.charCodeAt(e))*es;return s&Kt}function us(t,s){return s+2654435769+(t<<6)+(t>>2)&Kt}function hs(t,s){return us(t,cs(s))}function os(t){return us(3735928559,t)}function as(t,s){return us(t,os(s))}function ms(t){return function(t){let s=ss,e=t;return s=(s^255&e)*es,e>>=8,s=(s^255&e)*es,e>>=8,s=(s^255&e)*es,e>>=8,s=(s^255&e)*es,s&Kt}(t)}function cs(t){return Number(function(t){let s=is,e=t;return s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,e>>=8n,s=(s^0xffn&e)*ns,s&ts}(t))}function ls(t){return cs(Ft(function(t){return Ps(t)}(t)))}function fs(t){return function(t){return 1103515245*t+12345&2147483647}(t)}const _s=100,vs=100;function bs(){return Number.EPSILON*_s}function ds(){return.38196601125010515}function ps(){return 1.4142135623730951}function xs(){return Number.EPSILON}function Ns(t,s,e){return t===s||t===e}function ys(t,s,e){return t>=s?t<=e?t:e:s}function gs(t,s,e){const i=t[0];if(i>=s){if(i<=e)return!1;t[0]=e}else t[0]=s;return!0}function Ts(t,s){return t>=s?s:t<-s?-s:t}function Es(){return zt}function Ms(){return Ct}function ws(){return Zt}const Is=3*ws();function Ds(){return Is}function Ps(t){return t+0}function As(t){return{v:t}}class qs{constructor(){this.m_rn=As(0n),this.m_rd=As(1n),this.m_bNaN=!1,this.m_bNormalized=!1,this.m_power=0,this.m_sign=0}static constructAssign(t,s){const e=t.clone();return void 0!==s&&e.limitPrecisionThis(s),e}static constructDouble(t){return(new qs).setDouble(t)}static constructInt64(t){return(new qs).setInt64(t)}static constructRational(t,s){return(new qs).setRational(t,s)}static constructInt32(t){return this.constructInt64(BigInt(Math.trunc(t)))}[Symbol.toPrimitive](t){return this}compare(t){return this.lt(t)?-1:this.gt(t)?1:0}assignCopy(t){return this.setThis(t)}abs(){return this.clone().absThis()}absThis(){return this.isNAN()||(this.m_sign*=this.m_sign),this}clone(){return(new qs).setThis(this)}setThis(t){return this.m_bNaN=t.m_bNaN,this.m_bNormalized=t.m_bNormalized,this.m_rn.v=t.m_rn.v,this.m_rd.v=t.m_rd.v,this.m_power=t.m_power,this.m_sign=t.m_sign,this}setZero(){return this.m_rn.v=0n,this.m_rd.v=1n,this.m_bNaN=!1,this.m_power=0,this.m_bNormalized=!0,this.m_sign=0,this}setDouble(t){if(this.setZero(),0===t)return this;if(Number.isInteger(t)&&Math.abs(t)<2147483647)return this.setInt32(t);const s=Ft(t),e=(s&qs.s_em)>>52n,n=!!(s&qs.s_sm),r=s&qs.s_fm;if(e===qs.s_emax)return r?(this.m_rn.v=this.m_rd.v=0n,this.m_bNaN=!0,this):(this.m_rn.v=n?-1n:1n,this.m_rd.v=0n,this);0n===e&&(0,i.t)("denormalized numbers not yet implemented");const u=e-1023n,h=u>=0n?u:0n,o=u<0n?-u:0n;return this.m_rn.v=(1n<<52n|r)<<h,this.m_rd.v=1n<<52n+o,this.m_sign=n?-1:1,this.m_bNormalized=!1,this.normalizeThis()}setInt64(t){return 0n===t?this.setZero():(this.m_bNaN=!1,this.m_sign=t>0n?1:-1,this.m_rn.v=t>0n?t:-t,this.m_rd.v=1n,this.m_power=0,this.m_bNormalized=!1,this.normalizeThis())}setRational(t,s){return 0n===t?0n===s?this.setNAN():this.setZero():0n===s?t>0n?this.setPositiveInf():this.setNegativeInf():(this.m_sign=(t>0n?1:-1)*(s>0n?1:-1),this.m_rn.v=t>0n?t:-t,this.m_rd.v=s>0n?s:-s,this.m_power=0,this.m_bNormalized=!1,this.normalizeThis())}setInt32(t){return this.setInt64(BigInt(Math.trunc(t)))}getDouble(){return this.convertToDouble()}toDouble(){return this.convertToDouble()}value(){return this.convertToDouble()}isNAN(){return this.m_bNaN}isPositiveInf(){return!this.isNAN()&&0n===this.m_rd.v&&1===this.m_sign}isNegativeInf(){return!this.isNAN()&&0n===this.m_rd.v&&-1===this.m_sign}isFinite(){return!this.isNAN()&&0n!==this.m_rd.v}setNAN(){return this.m_bNaN=!0,this.m_rn.v=0n,this.m_rd.v=0n,this.m_power=0,this.m_bNormalized=!0,this}setPositiveInf(){return this.m_rn.v=1n,this.m_rd.v=0n,this.m_bNaN=!1,this.m_bNormalized=!0,this.m_sign=1,this.m_power=0,this}setNegativeInf(){return this.m_rn.v=1n,this.m_rd.v=0n,this.m_bNaN=!1,this.m_bNormalized=!0,this.m_sign=-1,this.m_power=0,this}subThis(t){if(t.isNAN()&&this.setNAN(),this.isPositiveInf()&&t.isPositiveInf())this.setNAN();else{if(this.isPositiveInf()&&t.isNegativeInf())return this.setPositiveInf(),this;if(this.isNegativeInf()&&t.isNegativeInf())this.setNAN();else if(this.isNegativeInf()&&t.isPositiveInf())return this.setNegativeInf(),this}return this.isNAN()?this:this.opPlusMinus(t,!1)}thisSubAbs(t){return(0,i.g)(0),this}mulThis(t){return t.isNAN()&&this.setNAN(),this.isNAN()?this:(this.m_sign*=t.m_sign,0===this.m_sign?this.setZero():(this.m_rn.v*=t.m_rn.v,this.m_rd.v*=t.m_rd.v,this.m_power+=t.m_power,this.m_bNormalized=!1,this.normalizeThis(),this))}mulDoubleThis(t){return this.mulThis(qs.constructDouble(t))}thisMulInt64(t){return(0,i.g)(0),this}thisMulInt32(t){return(0,i.g)(0),this}divThis(t){return this.mulThis(t.clone().invertThis())}divDoubleThis(t){return this.divThis(qs.constructDouble(t))}addDoubleThis(t){return this.addThis(qs.constructDouble(t))}subDoubleThis(t){return this.subThis(qs.constructDouble(t))}mul(t){return this.clone().mulThis(t)}mulBigIntThis(t){return this.mulThis(qs.constructInt64(t))}mulDouble(t){return this.clone().mulThis(qs.constructDouble(t))}div(t){return this.clone().divThis(t)}divDouble(t){return this.clone().divDoubleThis(t)}add(t){return this.clone().addThis(t)}fmSubThis(t,s){return this.subThis(t.clone().mulThis(s))}fmAddThis(t,s){return this.addThis(t.clone().mulThis(s))}addThis(t){if(t.isNAN()&&this.setNAN(),this.isPositiveInf()&&t.isPositiveInf())return this.setPositiveInf(),this;if(this.isPositiveInf()&&t.isNegativeInf())this.setNAN();else{if(this.isNegativeInf()&&t.isNegativeInf())return this.setNegativeInf(),this;this.isNegativeInf()&&t.isPositiveInf()&&this.setNAN()}return this.isNAN()?this:this.opPlusMinus(t,!0)}addDouble(t){return this.clone().addThis(qs.constructDouble(t))}sub(t){return this.clone().subThis(t)}subDouble(t){return this.clone().subThis(qs.constructDouble(t))}isZero(){return 0===this.m_sign}equals(t){return this.clone().subThis(t).isZero()}lt(t){return!this.isNAN()&&!t.isNAN()&&!(this.isPositiveInf()&&t.isPositiveInf()||this.isNegativeInf()&&t.isNegativeInf())&&!this.isPositiveInf()&&(!!t.isPositiveInf()||this.clone().sub(t).LZ())}absLessAbs(t){return this.abs().lt(t.abs())}gt(t){return this.clone().sub(t).GZ()}lte(t){return this.sub(t).LEZ()}gte(t){return this.sub(t).GEZ()}normalizeThis(){if(this.m_bNormalized)return this;if(0n===this.m_rn.v)return this.setZero();let t=0,s=0xffffffffn;for(;0n===(this.m_rn.v&s)&&s<=this.m_rn.v;)s<<=32n,t+=32;s&=this.m_rn.v,s>>=BigInt(t),t+=h(BigInt.asUintN(32,s))-1;let e=0;for(s=0xffffffffn;0n===(this.m_rd.v&s)&&s<=this.m_rd.v;)s<<=32n,e+=32;return s&=this.m_rd.v,s>>=BigInt(e),e+=h(BigInt.asUintN(32,s))-1,this.m_rn.v>>=BigInt(t),this.m_rd.v>>=BigInt(e),this.m_power+=t-e,this.m_rn.v>1n&&this.m_rd.v>1n&&(this.m_rn.v%this.m_rd.v===0n?(this.m_rn.v/=this.m_rd.v,this.m_rd.v=1n):this.m_rd.v%this.m_rn.v===0n&&(this.m_rd.v/=this.m_rn.v,this.m_rn.v=1n)),this.m_bNormalized=!0,this}negateThis(){return this.isNAN()||(this.m_sign*=-1),this}negate(){return this.clone().negateThis()}invertThis(){return this.isNAN()?this:this.isPositiveInf()||this.isNegativeInf()?(this.setZero(),this):0n===this.m_rn.v?(this.setPositiveInf(),this):(this.m_rd=lt(this.m_rn,this.m_rn=this.m_rd),this.m_power=-this.m_power,this)}limitPrecisionThis(t){if(0===t)return this;if(this.isZero())return this.setZero();if(!this.isFinite())return this;this.normalizeThis();let s=Number(Ut(this.m_rn.v));if(s>t){const e=s-t;this.m_rn.v>>=BigInt(s-t),this.m_power+=e}if(s=Number(Ut(this.m_rd.v)),s>t){const e=s-t;this.m_rd.v>>=BigInt(s-t),this.m_power-=e}return this}hiBitIndex(){return Math.max(Number(Ut(this.m_rn.v)),Number(Ut(this.m_rd.v)))}ldexp(t){return this.clone().ldexpThis(t)}ldexpThis(t){return t&&(this.m_bNormalized=!1,this.m_power+=t,this.normalizeThis()),this}LZ(){return!this.isNAN()&&-1===this.m_sign}GZ(){return!this.isNAN()&&1===this.m_sign}LEZ(){return!this.isNAN()&&this.m_sign<=0}GEZ(){return!this.isNAN()&&this.m_sign>=0}toString(){return this.toDouble().toString()}sqr(){return this.clone().sqrThis()}sqrThis(){return this.mulThis(this.clone())}static sqrt(t,s){if(t.m_sign<0n&&(0,i.q)("MP_value: sqrt(-1)"),t.isZero())return t.clone();let e=52,n=2220446049250313e-31;for(;e<s;)2*e<=s?(n*=n,e*=2):(n*=2220446049250313e-31,e+=52);e+=52;const r=Ut(t.m_rn.v),u=Ut(t.m_rd.v);let h,o=t.m_power+Number(r-u);const a=new qs;Math.abs(o)>200?(1&Math.abs(o)&&(o+=1),h=qs.constructAssign(t,53).ldexpThis(-o).value(),a.setThis(t).ldexpThis(-o),(0,i.g)(Number.isFinite(h))):(a.setThis(t),h=a.value(),(0,i.g)(Number.isFinite(h)),o=0),h=Math.sqrt(h);const m=qs.constructDouble(h),c=qs.constructDouble(n);c.mulThis(m).ldexpThis(1);const l=n*h*2,f=m.clone(),_=new qs;let v;for(let t=0;t<10;++t){f.mulThis(m),_.setThis(a).subThis(f).absThis();let t=_.value();if(v=1,t<.9)for(;t>l;)t*=t,++v;else v=4;if(_.lte(c))break;for(let t=0;t<v;t++)f.setThis(m).divThis(a).invertThis().addThis(m).ldexpThis(-1).limitPrecisionThis(e),m.setThis(f)}return m.ldexpThis(o/2)}static cubicRoot(t,s){if(t.isZero())return t.clone();let e=52,i=2220446049250313e-31;for(;e<s;)2*e<=s?(i*=i,e*=2):(i*=2220446049250313e-31,e+=52);e+=52;const n=Math.pow(Math.abs(t.value()),1/3),r=qs.constructDouble(n),u=r.clone();u.sqrThis().mulDoubleThis(3).mulDoubleThis(i),u.limitPrecisionThis(32),t.LZ()&&r.negateThis();for(let s=0;s<10;++s){const s=r.clone();s.sqrThis().mulThis(r);const i=s.clone();if(i.subThis(t),i.absThis().limitPrecisionThis(32),i.lte(u))break;i.setThis(t),i.ldexpThis(1),i.addThis(s);const n=s.clone();n.ldexpThis(1),n.addThis(t),i.divThis(n),r.mulThis(i),r.limitPrecisionThis(e)}return r}isInTheRangeOfDouble(){return(0,i.g)(0),!1}sign(){return this.m_sign}cosAndSin(t,s){(0,i.g)(0)}static nan(){return(0,i.g)(0),new qs}convertToDouble(){if(this.m_bNaN)return Number.NaN;if(this.isZero())return 0;if(0n===this.m_rd.v)return 1===this.m_sign?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;const t=-1===this.m_sign,s=this.m_rn.v<<(this.m_power>=0?BigInt(this.m_power):0n);let e=this.m_rd.v<<(this.m_power<0?BigInt(-this.m_power):0n);const i=s/e;let n=Number(i);if(BigInt(n)!==i)return t?-n:n;let r=s-i*e;if(r){let t=Ut(e)-1023n;t>0n&&(e>>=t,r<<=52n,r>>=t);let s=Number(r);Number.isFinite(s)||(r>>=52n,s=Number(r),t=0n),t>0n&&(s/=Math.pow(2,52)),n+=s/Number(e)}return t?-n:n}signVal(){return 1===this.m_sign?1n:-1===this.m_sign?-1n:0n}opPlusMinus(t,s){const e=Math.min(this.m_power,t.m_power);let i,n;this.m_power>e?(i=BigInt(this.m_power-e),n=0n):(i=0n,n=BigInt(t.m_power-e));const r=this.signVal()*this.m_rn.v*t.m_rd.v<<i,u=t.signVal()*t.m_rn.v*this.m_rd.v<<n;return this.m_rn.v=s?r+u:r-u,this.m_rd.v*=t.m_rd.v,this.m_power=e,this.m_sign=1,this.m_rn.v<0n&&(this.m_sign=-1,this.m_rn.v=-this.m_rn.v),this.m_bNormalized=!1,this.normalizeThis(),this}}qs.s_sm=0x8000000000000000n,qs.s_em=0x7ff0000000000000n,qs.s_fm=0x000fffffffffffffn,qs.s_emax=0x7ffn;const zs=qs.constructInt32(1),Cs=qs.constructInt32(0);function Zs(t,s){let e=Qt(t);const i=Qt(s);return e===i?(e-=53-function(t,s){return function(t){let s=0;return 0xffffffff00000000n&t&&(s=32,t>>=32n),s+function(t){let s=0;return 4294901760n&t&&(s+=16,t>>=16n),65280n&t&&(s+=8,t>>=8n),240n&t&&(s+=4,t>>=4n),s+u[Number(BigInt.asUintN(4,t))]+1}(t)}(t^s)}(Ot(t),Ot(s)),e):e>i?e:i}function Bs(t,s){for(let e=0,i=0,n=t.length;e<n;e+=2,i++)s[i].x=t[e],s[i].y=t[e+1]}function Rs(t){const s=new Float64Array(2*t.length);for(let e=0,i=t.length;e<i;++e){const i=e<<1;s[i]=t[e].x,s[i+1]=t[e].y}return s}function Gs(t){const s=Tt(ks,t.length);for(let e=0,i=t.length;e<i;++e)s[e].setCoords(t[e][0],t[e][1]);return s}class ks{static construct(t,s){return new ks(t,s)}constructor(t,s){void 0!==t?(this.x=t,this.y=s):this.x=this.y=Number.NaN}clone(){return new ks(this.x,this.y)}assign(t){this.setCoordsPoint2D(t)}setCoords(t,s){return this.x=t,this.y=s,this}setCoordsPoint2D(t){this.x=t.x,this.y=t.y}isEqualPoint2D(t,s){return void 0!==s?Math.abs(this.x-t.x)<=s&&Math.abs(this.y-t.y)<=s:this.x===t.x&&this.y===t.y}isEqual(t,s,e){return void 0!==e?Math.abs(this.x-t)<=e&&Math.abs(this.y-s)<=e:this.x===t&&this.y===s}equalsPoint2D(t,s){return this.isEqualPoint2D(t,s)}setSub(t,s){this.x=t.x-s.x,this.y=t.y-s.y}addThis(t){return this.x+=t.x,this.y+=t.y,this}setAdd(t,s){return this.x=t.x+s.x,this.y=t.y+s.y,this}absoluteOther(t){}absolute(){return(0,i.g)(0),this}setNegate(){this.x=-this.x,this.y=-this.y}setNegateOther(t){this.x=-t.x,this.y=-t.y}interpolateThis(t,s){}interpolate(t,s,e){(0,i.g)(0)}scaleAddThis(t,s){this.x=this.x*t+s.x,this.y=this.y*t+s.y}setScaleAdd(t,s,e){this.x=s.x*t+e.x,this.y=s.y*t+e.y}scaleOther(t,s){(0,i.g)(0)}scale(t){this.x*=t,this.y*=t}compare(t){return this.y<t.y?-1:this.y>t.y?1:this.x<t.x?-1:this.x>t.x?1:0}compareX(t){return this.x<t.x?-1:this.x>t.x?1:this.y<t.y?-1:this.y>t.y?1:0}normalizeOther(t){(0,i.g)(0)}normalize(){const t=this.length();return t?(this.x/=t,this.y/=t):(this.x=1,this.y=0),this}getUnitVector(){return this.clone().normalize()}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}sqrLength(){return this.x*this.x+this.y*this.y}static averageFast(t,s){return(0,i.g)(0),{}}static average(t,s){const e=new ks;if(0===s)return e.setNAN(),e;if(1===s)return e.assign(t[0]),e;const i=new n(t[0].x),r=new n(t[0].y);for(let e=1;e<s;e++)i.add(t[e].x),r.add(t[e].y),255&e||(i.normalize(),r.normalize());return e.x=i.getResult()/s,e.y=r.getResult()/s,e}static calculateLength(t,s){const e=new n(0);for(let i=1;i<s;i++)e.add(ks.distance(t[i],t[i-1]));return e.getResult()}offset(t,s){const e=ks.distance(t,s),i=ks.construct(this.x,this.y);if(0===e)return ks.distance(i,t);const n=s.clone();return n.subThis(t),i.subThis(t),i.crossProduct(n)/e}side(t,s){return t.equals(s)?this.equals(t)?0:1:ks.orientationRobust(s,t,this)}static sqrDistance(t,s){const e=t.x-s.x,i=t.y-s.y;return e*e+i*i}static sqrDistanceCoords(t,s,e,i){const n=e-t,r=i-s;return n*n+r*r}static distance(t,s){return Math.sqrt(ks.sqrDistance(t,s))}dotProduct(t){return this.x*t.x+this.y*t.y}dotProductAbs(t){return Math.abs(this.x*t.x)+Math.abs(this.y*t.y)}crossProduct(t){return this.x*t.y-this.y*t.x}crossProductAbs(t){return(0,i.g)(0),0}rotateDirect(t,s){const e=this.x*t-this.y*s,i=this.x*s+this.y*t;this.x=e,this.y=i}rotateReverse(t,s){const e=this.x*t+this.y*s,i=-this.x*s+this.y*t;this.x=e,this.y=i}leftPerpendicularThis(){const t=this.x;this.x=-this.y,this.y=t}leftPerpendicularOther(t){const s=t.x;this.x=-t.y,this.y=s}rightPerpendicularThis(){const t=this.x;this.x=this.y,this.y=-t}rightPerpendicularOther(t){const s=t.x;this.x=t.y,this.y=-s}equals(t){return this.x===t.x&&this.y===t.y}notequals(t){return this.x!==t.x||this.y!==t.y}not(){return!this.x&&!this.y}gt(t){return this.y>t.y||this.y===t.y&&this.x>t.x}gte(t){return!this.lt(t)}lt(t){return this.y<t.y||this.y===t.y&&this.x<t.x}lte(t){return!this.gt(t)}subThis(t){return this.x-=t.x,this.y-=t.y,this}divThis(t){return this.x/=t,this.y/=t,this}add(t){return new ks(this.x+t.x,this.y+t.y)}sub(t){return new ks(this.x-t.x,this.y-t.y)}negateThis(){return this.x=-this.x,this.y=-this.y,this}negate(){return new ks(-this.x,-this.y)}mul(t){return new ks(this.x*t,this.y*t)}mulThis(t){return this.x*=t,this.y*=t,this}divide(t){return new ks(this.x/t,this.y/t)}setNAN(){this.x=this.y=Number.NaN}isNAN(){return Number.isNaN(this.x)||Number.isNaN(this.y)}static getNAN(){return new ks(Number.NaN,Number.NaN)}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)}isZero(){return 0===this.x&&0===this.y}norm(t){switch(t){case 0:{const t=Math.abs(this.x),s=Math.abs(this.y),e=t-s;return e>=0?t:e<=0?s:Number.NaN}case 1:return Math.abs(this.x)+Math.abs(this.y);case 2:return Math.sqrt(this.x*this.x+this.y*this.y);default:(0,i.a)("norm")}}getQuarter(){return ks.getQuarterCoords(this.x,this.y)}static getQuarterCoords(t,s){return t>0?s>=0?1:4:s>0?2:0===t?4:3}static compareVectors(t,s){const e=t.getQuarter(),i=s.getQuarter();return i===e?ks.orientationRobustImpl(ks.construct(0,0),s,t,!0):e<i?-1:1}static compareVectorsOrigin(t,s,e){const i=s.sub(t),n=e.sub(t),r=i.getQuarter(),u=n.getQuarter();return u===r?ks.orientationRobustImpl(t,e,s,!0):r<u?-1:1}static orientationRobust(t,s,e){return ks.orientationRobustImpl(t,s,e,!1)}static orientationRobustEx(t,s,e,i){if(t.equals(s)||e.equals(i))return 0;const n=s.x-t.x,r=s.y-t.y,u=i.x-e.x,h=i.y-e.y;{const t=ks.getQuarterCoords(n,r)-1,s=ks.getQuarterCoords(u,h)-1,e=ks.d[t][s];if(0!==e)return e}const o=n*h,a=r*u,m=4*xs()*(Math.abs(o)+Math.abs(a)),c=o-a;return Math.abs(c)>=m?c<0?-1:c>0?1:0:ks.orientationRobustExMp(t,s,e,i)}static orientationRobustExMp(t,s,e,i){const n=qs.constructDouble(s.x),r=qs.constructDouble(i.x);n.subThis(qs.constructDouble(t.x)),r.subThis(qs.constructDouble(e.x));const u=qs.constructDouble(s.y),h=qs.constructDouble(i.y);return u.subThis(qs.constructDouble(t.y)),h.subThis(qs.constructDouble(e.y)),n.mulThis(h),u.mulThis(r),n.subThis(u),n.LZ()?-1:n.GZ()?1:0}static orientationNonRobust(t,s,e){const i=s.sub(t).crossProduct(e.sub(t));return i<0?-1:i>0?1:0}static orientationRobustImpl(t,s,e,i){if(s.isEqualPoint2D(t)||e.isEqualPoint2D(t)||s.isEqualPoint2D(e))return 0;const n=s.x-t.x,r=s.y-t.y,u=e.x-t.x,h=e.y-t.y;if(!i){const t=ks.getQuarterCoords(n,r)-1,s=ks.getQuarterCoords(u,h)-1,e=ks.d[t][s];if(0!==e)return e}const o=(Math.abs(n)+Math.abs(r)+Math.abs(u)+Math.abs(h))*(Math.abs(s.x)+Math.abs(s.y)+Math.abs(e.x)+Math.abs(e.y))*8*v(),a=n*h-r*u;if(Math.abs(a)>o)return a<0?-1:1;if(_(s.x,t.x)&&_(e.y,t.y)&&_(s.y,t.y)&&_(e.x,t.x)&&l(n,h)&&l(r,u)){const t=n*h,s=r*u;if(_(t,s)){const e=t-s;return e<0?-1:e>0?1:0}}return ks.orientationRobustMp(t,s,e)}static orientationRobustMp(t,s,e){const i=qs.constructDouble(s.x),n=qs.constructDouble(e.x);{const s=qs.constructDouble(t.x);i.subThis(s),n.subThis(s)}const r=qs.constructDouble(e.y),u=qs.constructDouble(s.y);{const s=qs.constructDouble(t.y);r.subThis(s),u.subThis(s)}return i.mulThis(r),u.mulThis(n),i.subThis(u),i.LZ()?-1:i.GZ()?1:0}static inCircleRobust(t,s,e,i){const n=new c,r=new c;n.set(t.x),n.subThis(i.x),r.set(t.y),r.subThis(i.y);const u=new c,h=new c;u.set(s.x),u.subThis(i.x),h.set(s.y),h.subThis(i.y);const o=new c,a=new c;o.set(e.x),o.subThis(i.x),a.set(e.y),a.subThis(i.y);const m=n.mulE(h).subE(r.mulE(u)),l=u.mulE(a).subE(h.mulE(o)),f=n.mulE(a).subE(r.mulE(o)),_=n.mulE(n).addE(r.mulE(r)),v=u.mulE(u).addE(h.mulE(h)),b=o.mulE(o).addE(a.mulE(a)),d=_.mulE(l).subE(v.mulE(f)).addE(b.mulE(m));if(!d.isFuzzyZero()){const t=d.value();return t<0?-1:t>0?1:0}return ks.inCircleRobustMp(t,s,e,i)}static inCircleRobustMp(t,s,e,i){do{if(!_(t.x,i.x)||!_(t.y,i.y))break;if(!_(s.x,i.x)||!_(s.y,i.y))break;if(!_(e.x,i.x)||!_(e.y,i.y))break;const n=t.x-i.x,r=t.y-i.y,u=s.x-i.x,h=s.y-i.y,o=e.x-i.x,a=e.y-i.y;if(!l(n,h)||!l(r,u))break;if(!l(u,a)||!l(h,o))break;if(!l(n,a)||!l(r,o))break;if(!l(n,n)||!l(r,r))break;if(!l(u,u)||!l(h,h))break;if(!l(o,o)||!l(a,a))break;const m=n*h,c=r*u,v=u*a,b=h*o,d=n*a,p=r*o,x=n*n,N=r*r,y=u*u,g=h*h,T=o*o,E=a*a;if(!_(m,c))break;if(!_(v,b))break;if(!_(d,p))break;if(!f(x,N))break;if(!f(y,g))break;if(!f(T,E))break;const M=m-c,w=v-b,I=d-p,D=x+N,P=y+g,A=T+E;if(!l(D,w))break;if(!l(P,I))break;if(!l(A,M))break;const q=D*w,z=P*I,C=A*M;if(!_(q,z))break;const Z=q-z;if(!f(Z,C))break;const B=Z+C;return B<0?-1:B>0?1:0}while(0);const n=qs.constructDouble(i.x),r=qs.constructDouble(i.y),u=qs.constructDouble(t.x),h=qs.constructDouble(t.y);u.subThis(n),h.subThis(r);const o=qs.constructDouble(s.x),a=qs.constructDouble(s.y);o.subThis(n),a.subThis(r);const m=qs.constructDouble(e.x),c=qs.constructDouble(e.y);m.subThis(n),c.subThis(r);const v=u.mul(a).sub(h.mul(o)),b=o.mul(c).sub(a.mul(m)),d=u.mul(c).sub(h.mul(m)),p=u.mul(u).add(h.mul(h)),x=o.mul(o).add(a.mul(a)),N=m.mul(m).add(c.mul(c)),y=p.mul(b).sub(x.mul(d)).add(N.mul(v));return y.LZ()?-1:y.GZ()?1:0}static inCircleRobustMp3Point(t,s,e){const i=qs.constructDouble(t.x),n=qs.constructDouble(t.y),r=qs.constructDouble(s.x),u=qs.constructDouble(s.y),h=qs.constructDouble(e.x),o=qs.constructDouble(e.y),a=h.mul(h).add(o.mul(o)).sub(h.mul(i).add(o.mul(n)).add(h.mul(r)).add(o.mul(u))).add(i.mul(r).add(n.mul(u)));return a.LZ()?-1:a.GZ()?1:0}static inCircleRobust3Point(t,s,e){const i=new c(t.x),n=new c(t.y),r=new c(s.x),u=new c(s.y),h=new c(e.x),o=new c(e.y),a=h.mulE(h).addE(o.mulE(o)).subE(h.mulE(i).addE(o.mulE(n)).addE(h.mulE(r)).addE(o.mulE(u))).addE(i.mulE(r).addE(n.mulE(u)));if(!a.isFuzzyZero()){const t=a.value();return t<0?-1:t>0?1:0}return ks.inCircleRobustMp3Point(t,s,e)}static calculateCircleCenterFromThreePoints(t,s,e){if(t.equals(e)||t.equals(s)||e.equals(s))return ks.getNAN();const i=function(t,s,e){const i=new c(s.x);i.subThis(t.x);const n=new c(s.y);n.subThis(t.y);const r=new c(e.x);r.subThis(t.x);const u=new c(e.y);u.subThis(t.y);const h=i.clone();h.mulThisE(u);let o=n.clone();if(o.mulThisE(r),h.subThisE(o),0===h.value())return ks.getNAN();h.mulThis(2);const a=i.clone();a.mulThisE(i);const m=n.clone();m.mulThisE(n);const l=a.clone();l.addThisE(m);const f=r.clone();f.mulThisE(r);const _=u.clone();_.mulThisE(u);const v=f.clone();v.addThisE(_);const b=n.clone();b.mulThisE(v),o=u.clone(),o.mulThisE(l),b.subThisE(o),b.divThisE(h);const d=i.clone();d.mulThisE(v),o=r.clone(),o.mulThisE(l),d.subThisE(o),d.divThisE(h);const p=ks.construct(t.x-b.value(),t.y+d.value()),x=t.sub(p).length(),N=s.sub(p).length(),y=e.sub(p).length(),g=1e-15*(x+Math.abs(t.x)+Math.abs(s.x)+Math.abs(e.x)+Math.abs(t.y)+Math.abs(s.y)+Math.abs(e.y));return Math.abs(x-N)<=g&&Math.abs(x-y)<=g&&b.eps()<g&&d.eps()<g?p:ks.getNAN()}(t,s,e);return i.isNAN()?function(t,s,e){const i=qs.constructDouble(s.x);i.subDoubleThis(t.x);const n=qs.constructDouble(s.y);n.subDoubleThis(t.y);const r=qs.constructDouble(e.x);r.subDoubleThis(t.x);const u=qs.constructDouble(e.y);u.subDoubleThis(t.y);const h=i.clone();h.mulThis(u);let o=n.clone();if(o.mulThis(r),h.subThis(o),h.isZero())return ks.getNAN();h.mulDoubleThis(2);const a=i.clone();a.mulThis(i);const m=n.clone();m.mulThis(n);const c=a.clone();c.addThis(m);const l=r.clone();l.mulThis(r);const f=u.clone();f.mulThis(u);const _=l.clone();_.addThis(f);const v=n.clone();v.mulThis(_),o=u.clone(),o.mulThis(c),v.subThis(o),v.divThis(h);const b=i.clone();return b.mulThis(_),o=r.clone(),o.mulThis(c),b.subThis(o),b.divThis(h),ks.construct(t.x-v.value(),t.y+b.value())}(t,s,e):i}static calculateAngle(t,s){return Math.atan2(t.crossProduct(s),t.dotProduct(s))}static isBisectorRobust(t,s,e){return(0,i.g)(0),!1}static size(){return 2}get 0(){return this.x}get 1(){return this.y}set 0(t){this.x=t}set 1(t){this.y=t}static compareZorder(t,s){const e=ks.c_compare_zorder_xx[t.x<0?1:0]|ks.c_compare_zorder_yy[t.y<0?1:0],i=ks.c_compare_zorder_xx[s.x<0?1:0]|ks.c_compare_zorder_yy[s.y<0?1:0];if(e===i){let e=0,i=0;for(let n=0;n<2;++n){const r=Zs(t[n],s[n]);r>e&&(e=r,i=n)}return t[i]<s[i]}return e<i}static lerp(t,s,e){const i=new ks;return R(t,s,e,i),i}static getClosestCoordinate(t,s,e,i=!1){const n=ks.getNAN();n.setSub(s,t);const r=n.sqrLength();if(0===r)return.5;if(s.isEqualPoint2D(e))return 1;const u=ks.getNAN();u.setSub(e,t);let h=u.dotProduct(n)/r;return i||(h<0?h=0:h>1&&(h=1)),h}static intersectLinesAtOnePoint(t,s,e,i){if(t.equals(s)||e.equals(i))return ks.getNAN();const n=s.x-t.x,r=e.x-i.x,u=s.y-t.y,h=e.y-i.y,o=n*h-r*u;if(!o)return ks.getNAN();const a=o;if(0===a)return ks.getNAN();let m=(e.x-t.x)*h-(e.y-t.y)*r;m/=a;const c=new ks;return R(t,s,m,c),c.isFinite()?c:ks.getNAN()}toString(){return`[${this.x},${this.y}]`}}ks.dimensions=2,ks.d=[[0,1,0,-1],[-1,0,1,0],[0,-1,0,1],[1,0,-1,0]],ks.c_compare_zorder_xx=[2,0],ks.c_compare_zorder_yy=[1,0]}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1088,4163,6061],{31088:(e,t,n)=>{n.r(t),n.d(t,{OperatorGeodeticDensifyByLength:()=>r,OperatorGeodeticDensifyCursor:()=>o});var s=n(76061),i=n(55537),a=n(12189);class r{getOperatorType(){return 10310}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,s,i){return new o(e,n,s,t,-1,-1,i)}execute(e,t,n,a,r){const o=new s.S([e]),_=this.executeMany(o,t,n,a,r).next();return _||(0,i.c)("null output"),_}}class o extends s.G{constructor(e,t,n,s,a,r,o){super(),this.m_progressTracker=o,r>0&&(0,i.t)(""),4!==n&&a>0&&(0,i.t)(""),t||(0,i.a)(""),0===t.getCoordinateSystemType()&&(0,i.a)(""),s>0||a>0||(0,i.a)(""),this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=t,this.m_curveType=n,this.m_maxLengthMeters=s,this.m_maxDeviationMeters=a,this.m_maxAngle=r}next(){{let e;for(;e=this.m_inputGeoms.next();)return(0,i.d)(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.geodeticDensify(e);return null}}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}geodeticDensify(e){return(0,a.L)(e,this.m_spatialReference,this.m_curveType,this.m_maxLengthMeters,this.m_maxDeviationMeters,this.m_progressTracker)}}},47591:(e,t,n)=>{n.d(t,{O:()=>p});var s=n(55537),i=n(12189),a=n(35368),r=n(83661),o=n(95213),_=n(79187),h=n(5247),m=n(31139);function u(){return{m_pGcs:new r.P,m_xyz:new o.d,m_factor:Number.NaN,m_geoLength:Number.NaN,setValues:c,setLength:l,assign:g}}function c(e,t,n,s){this.m_factor=e,this.m_pGcs.assign(t),this.m_xyz.assign(s),this.m_geoLength=n}function l(e){this.m_geoLength=e}function g(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 p{getOperatorType(){return 10315}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}_ExecuteShapePreservingLength(e,t,n,s,a){if(e.hasNonLinearSegments()&&(e=(new h.O).execute(e,0,t.getTolerance(0),0,a)),t.isPannable()){let s=90,r=-90;if(1===n.getUnit().getUnitToBaseFactor()&&(s*=Math.PI/180,r*=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]=r,i.K.geogToProj(e,2,n),s=n[1],r=n[3]}const o=new _.Envelope2D;e.queryEnvelope(o),o.ymin=r,o.ymax=s,e=(new m.O).execute(e,o,t,a)}else{const n=t.getPCSHorizon();if((e=(new i.g).execute(e,n,t,a))===n){const t=e.clone();e=t}}return e.isEmpty()?0:this._ExecuteIterativeApproach(e,t,n,s,1,a)}_ExecuteIterativeApproach(e,t,n,a,_,h){const m=(0,i.J)();n.querySpheroidData(m);const c=m.majorSemiAxis,l=m.e2,g=n.getUnit().getUnitToBaseFactor(),p=(0,r.n)(u,40),P=(0,r.d)(40,Number.NaN),f=u(),E=u();let S;const x=[0,0,0,0],v=t.getPECoordSys(),N=new r.P,D=new r.P,A=new r.P,M=new r.P,C=new r.P;let T=0;const q=e.querySegmentIterator();for(;q.nextPath();)for(;q.hasNextSegment();){const e=q.nextSegment();N.assign(e.getStartXY()),D.assign(e.getEndXY()),2===t.getCoordinateSystemType()?(x[0]=N.x,x[1]=N.y,x[2]=D.x,x[3]=D.y,i.K.projToGeog(v,2,x),A.x=x[0]*g,A.y=x[1]*g,M.x=x[2]*g,M.y=x[3]*g):(A.setCoordsPoint2D(N),M.setCoordsPoint2D(D),A.scale(g),M.scale(g));const n=new o.d,a=new o.d;y(c,l,A,n),y(c,l,M,a);let r=d(c,n,a);f.setValues(0,A,Number.NaN,n),E.setValues(1,M,r,a),S=_,p[0].assign(E),P[0]=_;let h=0;for(;;){h>128&&(0,s.c)("iterations exceeded");const n=.5*(f.m_factor+E.m_factor),a=e.getCoord2D(n);2===t.getCoordinateSystemType()?(x[0]=a.x,x[1]=a.y,i.K.projToGeog(v,1,x),C.x=x[0]*g,C.y=x[1]*g):(C.setCoordsPoint2D(a),C.scale(g)),A.setCoordsPoint2D(f.m_pGcs),M.setCoordsPoint2D(E.m_pGcs);const m=new o.d;y(c,l,C,m);const u=d(c,f.m_xyz,m),N=d(c,E.m_xyz,m);r=E.m_geoLength,Number.isNaN(r)&&(r=d(c,f.m_xyz,E.m_xyz));const D=u+N,q=S===_&&D>=20&&Math.abs(D-r)>1e-8*(r+D);if(h+2<40&&(q||Math.abs(D-r)>0&&S>0))E.setLength(N),p[h].assign(E),E.setValues(n,C,u,m),p[++h].assign(E),q?(S=_,P[h]=_):(S--,P[h-1]=S,P[h]=S);else{if(T+=D,0===h)break;f.assign(E),E.assign(p[--h]),S=P[h]}}}return T}execute(e,t,n){if(t&&0!==t.getCoordinateSystemType()||(0,s.a)(""),e.isEmpty()||e.getDimension()<1)return 0;let r=null;const o=t.getGCS();o!==t&&(r=(0,i.w)(t,o,null));const _=e.getGeometryType();if(_===s.G.enumEnvelope){const s=new a.a;return s.addEnvelope(e,!1),this._ExecuteShapePreservingLength(s,t,o,r,n)}if((0,s.f)(_)){const s=new a.P;return s.addSegment(e,!0),this._ExecuteShapePreservingLength(s,t,o,r,n)}return this._ExecuteShapePreservingLength(e,t,o,r,n)}}function y(e,t,n,s){s.assign((0,i.y)(e,t,n))}function d(e,t,n){const s=e,i=new o.d;i.setSub(t,n);const a=i.length();return 2*s*Math.asin(a/(2*s))}},74163:(e,t,n)=>{n.r(t),n.d(t,{OperatorGeodeticArea:()=>q});var s=n(55537),i=n(35368),a=n(5247),r=n(12189),o=n(83661),_=n(79187),h=n(95213),m=n(31139),u=n(47591),c=n(90237),l=n(11878);n(90135),n(76061),n(31088),Symbol.dispose;class g{constructor(e,t,n,s,i=0,a=4){this.m_ptDistFrom=new o.P,this.m_segStartPt=new o.P,this.m_segEndPt=new o.P,this.m_geodeticLength=new r.P,this.m_az12=new r.P,this.m_minGeodeticDist=new r.P,this.m_segStartPt3d=new h.d,this.m_segEndPt3d=new h.d,this.m_sr=s,this.m_distCurveType=i,this.m_segCurveType=a,this.m_inputGCS=this.m_sr.getGCS(),this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_bIsPannablePcs=2===this.m_sr.getCoordinateSystemType()&&this.m_sr.isPannable();const _=(0,r.J)();this.m_inputGCS.querySpheroidData(_),this.m_a=_.majorSemiAxis,this.m_eSquared=_.e2,this.setPointDistFrom(e),this.setSegmentEndPoints(t,n)}setSegmentEndPoints(e,t){this.m_segStartPt.assign(e),this.m_segEndPt.assign(t),this.m_bIsPannablePcs||(this.m_segStartPt.mulThis(this.m_rpu),this.m_segEndPt.mulThis(this.m_rpu)),2===this.m_segCurveType&&(this.m_segStartPt3d.assign((0,r.y)(this.m_a,this.m_eSquared,this.m_segStartPt)),this.m_segEndPt3d.assign((0,r.y)(this.m_a,this.m_eSquared,this.m_segEndPt))),this.calculateAndUpdateSegmentLength()}setPointDistFrom(e){this.m_ptDistFrom.assign(e),this.m_ptDistFrom.scale(this.m_rpu)}setSegmentCurveType(e){this.m_segCurveType=e}setDistanceCurveType(e){this.m_distCurveType=e}makeFunctor(){return e=>{let t;switch(this.m_segCurveType){case 0:case 1:case 3:{const n={stack:[],error:void 0,hasError:!1};try{const s=(0,c.b)(n,new r.P,!1),i=(0,c.b)(n,new r.P,!1);r.x.geodeticCoordinate(this.m_a,this.m_eSquared,this.m_segStartPt.x,this.m_segStartPt.y,this.m_geodeticLength.val*e,this.m_az12.val,s,i,this.m_segCurveType),t=new o.P(s.val,i.val);break}catch(e){n.error=e,n.hasError=!0}finally{(0,c.c)(n)}}case 2:{const n=h.d.lerp(this.m_segStartPt3d,this.m_segEndPt3d,e);t=(0,r.I)(this.m_a,this.m_eSquared,n);break}case 4:t=o.P.lerp(this.m_segStartPt,this.m_segEndPt,e),this.m_bIsPannablePcs&&((0,r.A)(this.m_sr,0,[t],1),t.mulThis(this.m_rpu));break;default:(0,s.c)("Invalid curve type")}return r.x.geodeticDistance(this.m_a,this.m_eSquared,this.m_ptDistFrom.x,this.m_ptDistFrom.y,t.x,t.y,this.m_minGeodeticDist,null,null,this.m_distCurveType),this.m_minGeodeticDist.val}}calculateAndUpdateSegmentLength(){switch(this.m_segCurveType){case 0:case 2:case 1:case 3:r.x.geodeticDistance(this.m_a,this.m_eSquared,this.m_segStartPt.x,this.m_segStartPt.y,this.m_segEndPt.x,this.m_segEndPt.y,this.m_geodeticLength,this.m_az12,null,this.m_segCurveType);break;case 4:this.m_geodeticLength.val=o.P.distance(this.m_segStartPt,this.m_segEndPt);break;default:(0,s.c)("Invalid curve type")}}[Symbol.dispose](){this.m_geodeticLength[Symbol.dispose](),this.m_az12[Symbol.dispose](),this.m_minGeodeticDist[Symbol.dispose]()}}Symbol.dispose;class p{constructor(e,t,n,s,i=100){this.m_startPt=e.clone(),this.m_endPt=t.clone(),this.m_cE2=s,this.m_cE=Math.sqrt(this.m_cE2),this.m_c1By2e=1/(2*this.m_cE),this.m_cRpu=n.getGCS().getUnit().getUnitToBaseFactor(),this.isPcs=2===n.getCoordinateSystemType(),this.PEProjcs=n.getPECoordSys(),this.m_points=(0,o.d)(2*i,Number.NaN)}setSegmentEndPoints(e,t){this.m_startPt.assign(e),this.m_endPt.assign(t)}makeFunctor(){return e=>{const t=[0,0];t[0]=this.m_startPt.x*(1-e)+this.m_endPt.x*e,t[1]=this.m_startPt.y*(1-e)+this.m_endPt.y*e,this.isPcs&&r.K.projToGeogCenter(this.PEProjcs,1,t,0);const n=Math.sin(t[1]*this.m_cRpu);return 0===this.m_cE2?n:-Math.log((1-this.m_cE*n)/(1+this.m_cE*n))*this.m_c1By2e+n/(1-this.m_cE2*n*n)}}}function y(e,t,n,s,i){const o=(new a.O).execute(e,t,0,0,i);let h;h=s?(new r.v).execute(o,s,i):o;const m=1===n.getUnit().getUnitToBaseFactor()?Math.PI/180:1,u=new _.Envelope2D;h.queryEnvelope(u);const c=new _.Envelope2D,l=new _.Envelope2D,g=new _.Envelope2D;c.setCoords({xmin:u.xmin,ymin:75*m,xmax:u.xmax,ymax:90*m}),l.setCoords({xmin:u.xmin,ymin:-60*m,xmax:u.xmax,ymax:75*m}),g.setCoords({xmin:u.xmin,ymin:-90*m,xmax:u.xmax,ymax:-60*m}),c.inflateCoords(.01*c.width(),0),l.inflateCoords(.01*l.width(),0),g.inflateCoords(.01*g.width(),0);let p=0;return p+=d(h,c,n,i),p+=d(h,l,n,i),p+=d(h,g,n,i),p}function d(e,t,n,i){const a=(new m.O).execute(e,t,n,i);if(null!==a&&!a.isEmpty()){const e=new _.Envelope2D;a.queryEnvelope(e);const{first:t,second:h}=function(e,t){const n=function(e,t){const n=e.getUnit().getUnitToBaseFactor(),i=t.getCenter();i.scale(180*n/Math.PI);const a=new o.P;a.x=0,a.y=0;let _=0;if(0===_){i.y>45?(a.y=o.p,_=0):i.y<-45?(a.y=-o.p,_=1):i.x>=45&&i.x<135?(a.x=o.p,_=2):i.x>=135||i.x<-135?(a.x=o.p,_=3):i.x<-45&&i.x>=-135?(a.x=-o.p,_=4):(a.x=0,_=5);const e=n*Math.sqrt((0,o.a)(t.xmin-t.xmax)+(0,o.a)(t.ymin-t.ymax)),s=a.clone(),r=t.getCenter();if(r.scale(n),_<2&&(s.x=r.x),o.P.distance(s,r)+.5*e>o.p)return null}const h=P[_];if(null!==h&&h.getGCS().equalHorizontal(e))return h;const m=e.getText(),u=a.x,c=a.y;let l=0,g=-1;6!==_?g=r.a6.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:((0,s.g)(false),l=0,g=r.a6.PE_PRJ_CYLINDRICAL_EQAREA);const p=(0,r.aw)("EqualAreaPCS");let y;g===r.a6.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?y=`PROJCS["${p}",${m},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${u}],PARAMETER["Latitude_of_Origin",${c}],UNIT["Meter",1.0]]`:g===r.a6.PE_PRJ_CYLINDRICAL_EQAREA?y=`PROJCS["${p}",${m},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${u}],PARAMETER["Standard_Parallel_1",${l}],PARAMETER["Latitude_of_Origin",${c}],UNIT["Meter",1.0]]`:(0,s.c)("getEqualAreaPcsFixed");const d=(0,r.a)(y);return P[_]&&P[_].destroy(),P[_]=d,d}(e,t);if(null!==n)return(0,o.k)(n,!1);const i=e.getText(),a=e.getUnit().getUnitToBaseFactor(),_=(t.xmin+t.width()/2)*a,h=(t.ymin+t.height()/2)*a;let m=0,u=0,c=-1;t.ymin*a>=75*Math.PI/180||t.ymax*a<=-60*Math.PI/180?c=r.a6.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA:t.ymin>0||t.ymax<0?(m=(t.ymin+1/3*t.height())*a,u=(t.ymin+2/3*t.height())*a,c=r.a6.PE_PRJ_ALBERS):(m=(t.ymin+2/3*t.height())*a,c=r.a6.PE_PRJ_CYLINDRICAL_EQAREA);const l=(0,r.aw)("EqualAreaPCS");let g;return c===r.a6.PE_PRJ_LAMBERT_AZIMUTHAL_EQAREA?g=`PROJCS["${l}",${i},PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${_}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:c===r.a6.PE_PRJ_ALBERS?g=`PROJCS["${l}",${i},PROJECTION["Albers"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${_}],PARAMETER["Standard_Parallel_1",${m}],PARAMETER["Standard_Parallel_2",${u}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:c===r.a6.PE_PRJ_CYLINDRICAL_EQAREA?g=`PROJCS["${l}",${i},PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",${_}],PARAMETER["Standard_Parallel_1",${m}],PARAMETER["Latitude_of_Origin",${h}],UNIT["Meter",1.0]]`:(0,s.c)("getEqualAreaPCSInstance"),(0,o.k)((0,r.a)(g),!0)}(n,e),m=(0,r.w)(n,t,null),u=(new r.v).execute(a,m,i).calculateArea2D();return h&&t.destroy(),u}return 0}const P=[null,null,null,null,null,null,null];class f{getOperatorType(){return 10314}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n){if(0===t.getCoordinateSystemType()&&(0,s.a)(""),e.isEmpty()||e.getDimension()<2)return 0;if((0,s.d)(e),e.getGeometryType()===s.G.enumEnvelope){const s=new i.a;return s.addEnvelope(e,!1),this.execute(s,t,n)}let c=e;e.getDescription().getAttributeCount()>1&&(c=e.clone(),c.dropAllAttributes());const l=(new a.O).execute(c,0,t.getTolerance(0),0,n);let g=null;const d=t.getGCS();d!==t&&(g=(0,r.w)(t,d));let P=(new r.O).execute(l,t,!1,n);return P.isEmpty()?0:(P===e&&(P=e.clone()),t.isPannable()?function(e,t,n){const s=new _.Envelope2D;e.queryEnvelope(s);const a=(0,h.c)(t,s,!0).total(),u=t.getPannableExtent();u.xmin=s.xmin-10*a,u.xmax=s.xmax+10*a;const c=(new m.O).execute(e,u,t,n).getImpl().querySegmentIterator();c.stripAttributes();const l=(0,r.J)();t.querySpheroidData(l);const g=l.e2,y=0===g?2:1,d=new o.P(0,0),P=new o.P(0,0),f=new o.K(0),E=new p(d,P,t,g,100);for(;c.nextPath();)for(;c.hasNextSegment();){const e=c.nextSegment();d.assign(e.getStartXY()),P.assign(e.getEndXY()),E.setSegmentEndPoints(d,P);const t=(0,i.v)(6,0,1,1e-12,1e-15,E.makeFunctor());f.pe((P.x-d.x)*t)}const S=l.majorSemiAxis;return y*S*S*(1-g)*Math.PI*f.getResult()/t.getPannableExtent().width()}(P,t,n):function(e,t,n,s,i){const a=function(e,t,n){const s=e.calculateLength2D(),i=(new u.O).execute(e,t,n)/25e3,a=s/e.getSegmentCount()*2;let r=Math.min(a,s/i);return 0===r&&(r=1),(0,o.k)(r,s/r)}(e,t,i);let r=y(e,a.first,n,s,i),_=1,h=0,m=0;do{if(_++,a.first*=.5,a.first<50*t.getTolerance(0))return r;a.second*=2,m=y(e,a.first,n,s,i),h=Math.abs(m-r),r=m}while(Math.abs(r)>1&&h>1e-8*Math.abs(r)&&(a.second<65e3&&_<8||_<4));return m}(P,t,d,g,n))}}function E(){return{m_p_PCS:new o.P,m_factor:Number.NaN,setValues:S,assign:x}}function S(e,t){this.m_factor=e,this.m_p_PCS.assign(t)}function x(e){this.m_factor=e.m_factor,this.m_p_PCS.assign(e.m_p_PCS)}class v{constructor(e,t,n,s){this.m_ptStart=new h.d,this.m_ptEnd=new h.d,this.m_ptStart.assign(t),this.m_ptEnd.assign(n),this.m_deltaX=this.m_ptEnd.x-this.m_ptStart.x,this.m_deltaY=this.m_ptEnd.y-this.m_ptStart.y,this.m_e=Math.sqrt(e),this.m_e2=e,this.m_c1MinusE2=1-e;const i=Math.sin(s);let a;a=0===this.m_e2?2*i:i*((0,o.y)(this.m_e*i)+1/(1-this.m_e2*i*i)),this.m_baseA=a}setSegmentEndPoints(e,t){this.m_ptStart.assign(e),this.m_ptEnd.assign(t),this.m_deltaX=this.m_ptEnd.x-this.m_ptStart.x,this.m_deltaY=this.m_ptEnd.y-this.m_ptStart.y}makeFunctor(){return e=>{const t=1-e,n=t*this.m_ptStart.x+e*this.m_ptEnd.x,s=t*this.m_ptStart.y+e*this.m_ptEnd.y,i=t*this.m_ptStart.z+e*this.m_ptEnd.z,a=n*n+s*s,r=i/Math.sqrt(i*i+this.m_c1MinusE2*this.m_c1MinusE2*a);let _;return _=0===this.m_e2?2*r:r*((0,o.y)(this.m_e*r)+1/(1-this.m_e2*r*r)),(this.m_deltaY*n-this.m_deltaX*s)/a*(_-this.m_baseA)}}}function N(){return{sin_phi:Number.NaN,one_p_sin_phi:Number.NaN,one_m_sin_phi:Number.NaN,one_m_e_2_sin_2_phi:Number.NaN,sin_half_phi_pf:Number.NaN,sin_half_phi_pz:Number.NaN,sin_half_asin_e_sin_phi_pf:Number.NaN,sin_half_asin_e_sin_phi_pz:Number.NaN,atanh_sin_phi:Number.NaN,atanh_esin_phi:Number.NaN,make_negative:!1,initialize:D,changeSign:A,assign:M,clone:C}}function D(e,t,n,s){const i=.5*e;this.sin_phi=Math.sin(e);const a=t*this.sin_phi,r=.5*Math.asin(a);this.one_p_sin_phi=1+this.sin_phi,this.one_m_sin_phi=1-this.sin_phi,this.one_m_e_2_sin_2_phi=(1+a)*(1-a),this.sin_half_phi_pf=Math.sin(i+n),this.sin_half_phi_pz=Math.sin(i+s),this.sin_half_asin_e_sin_phi_pf=Math.sin(r+n),this.sin_half_asin_e_sin_phi_pz=Math.sin(r+s),this.atanh_sin_phi=Math.log(this.sin_half_phi_pf/this.sin_half_phi_pz),this.atanh_esin_phi=Math.log(this.sin_half_asin_e_sin_phi_pf/this.sin_half_asin_e_sin_phi_pz)}function A(){this.sin_phi=-this.sin_phi;let e=this.one_p_sin_phi;this.one_p_sin_phi=this.one_m_sin_phi,this.one_m_sin_phi=e,e=this.sin_half_phi_pf,this.sin_half_phi_pf=this.sin_half_phi_pz,this.sin_half_phi_pz=e,e=this.sin_half_asin_e_sin_phi_pf,this.sin_half_asin_e_sin_phi_pf=this.sin_half_asin_e_sin_phi_pz,this.sin_half_asin_e_sin_phi_pz=e,this.atanh_sin_phi=-this.atanh_sin_phi,this.atanh_esin_phi=-this.atanh_esin_phi}function M(e){this.sin_phi=e.sin_phi,this.one_p_sin_phi=e.one_p_sin_phi,this.one_m_sin_phi=e.one_m_sin_phi,this.one_m_e_2_sin_2_phi=e.one_m_e_2_sin_2_phi,this.sin_half_phi_pf=e.sin_half_phi_pf,this.sin_half_phi_pz=e.sin_half_phi_pz,this.sin_half_asin_e_sin_phi_pf=e.sin_half_asin_e_sin_phi_pf,this.sin_half_asin_e_sin_phi_pz=e.sin_half_asin_e_sin_phi_pz,this.atanh_sin_phi=e.atanh_sin_phi,this.atanh_esin_phi=e.atanh_esin_phi,this.make_negative=e.make_negative}function C(){return{...this}}class T{constructor(e,t,n){this.m_transformPCS2GCS=null,this.m_scaleToRadians=new l.T,this.m_scaleToDegrees=new l.T,this.m_progressTracker=n,(0,s.g)(4!==t),this.m_curveType=t,this.m_inputSR=e,e&&0!==e.getCoordinateSystemType()||(0,s.a)(""),this.m_inputGCS=e.getGCS(),this.m_a=0,this.m_eSquared=0,this.m_b=0,this.m_rpu=0}executePolygonGeodeticArea(e){let t,n=e.clone();if(n.dropAllAttributes(),e.hasNonLinearSegments()&&(n=(new a.O).execute(n,0,this.m_inputSR.getTolerance(0),0,this.m_progressTracker)),this.m_inputSR.isPannable()){const e=new _.Envelope2D;n.queryEnvelope(e);const t=this.m_inputSR.getPannableExtent();if(!t.containsEnvelope(e)){const s=t.getCenterX()-e.getCenterX(),i=new l.T;i.setShiftCoords(s,0),n.applyTransformation(i),e.move(s,0);const a=new o.E;t.queryIntervalX(a);const _=new o.E;e.queryIntervalX(_),n=a.contains(_)?(0,r.F)(n,this.m_inputSR):(new r.v).foldInto360RangeGeodetic(n,this.m_inputSR,this.m_curveType)}}if(this.m_transformPCS2GCS?(n=(new r.O).execute(n,this.m_inputSR,!1,this.m_progressTracker),t=n.createInstance(),(0,r.N)(this.m_transformPCS2GCS,n,t,this.m_progressTracker)||(t=(new r.v).execute(n,this.m_transformPCS2GCS,this.m_progressTracker))):t=(new r.O).execute(n,this.m_inputGCS,!1,this.m_progressTracker),t.isEmpty())return 0;if(1===this.m_curveType){const e=(0,r.J)();return this.m_inputGCS.querySpheroidData(e),this.m_a=e.majorSemiAxis,this.m_eSquared=e.e2,this.loxodromeArea(t)}const s=t.getImpl();this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_scaleToRadians.setScale(this.m_rpu),s.applyTransformation(this.m_scaleToRadians),this.m_scaleToDegrees=this.m_scaleToRadians,this.m_scaleToDegrees.invertThis();const i=(0,r.J)();if(this.m_inputGCS.querySpheroidData(i),this.m_a=i.majorSemiAxis,this.m_b=i.minorSemiAxis,this.m_eSquared=i.e2,2===this.m_curveType)return this.executeClippedPolygonGreatEllipticArea(t);{const e={stack:[],error:void 0,hasError:!1};try{const n=r.ax.unit(9101),s=this.m_inputGCS.getPECoordSys(),i=(0,c.b)(e,s.cloneAlterUnits(n),!1);let a,o,_=this.executeClippedPolygonGeodeticArea(t,i,0),h=0;do{h++,a=this.executeClippedPolygonGeodeticArea(t,i,h),o=Math.abs(a-_),_=a}while(Math.abs(a)>1&&o>1e-8*Math.abs(a)&&h<7);return a}catch(t){e.error=t,e.hasError=!0}finally{(0,c.c)(e)}}}executeClippedPolygonGeodeticArea(e,t,n){const s={stack:[],error:void 0,hasError:!1};try{const i=new _.Envelope2D;e.queryEnvelope(i);const a=(0,c.b)(s,this.getEqualAreaPCSInstance(t,i),!1),h=e.clone();(0,r.ay)(a,h);const m=50,u=h.getImpl().getAttributeStreamRef(0),l=e.getImpl().getAttributeStreamRef(0),g=(0,c.b)(s,new r.P,!1),p=(0,c.b)(s,new r.P,!1),y=40,d=[0,0],P=(0,o.n)(E,y),f=(0,o.d)(y,-1),S=E(),x=E();let v,N;const D=a;let A=h.calculateArea2D();const M=new o.K(0),C=.5*Math.PI,T=1e-10*Math.abs(A)+1e-6,q=e.getPathCount();let b,w,I,R;const G=new o.P,L=new o.P,B=new o.P,z=new o.P,O=new o.P,k=new o.P;let F,Y;for(w=e.getPathStart(0),b=0;b<q;b++,w=I)for(I=e.getPathEnd(b),u.queryPoint2D(I-1<<1,B),l.queryPoint2D(I-1<<1,G),Math.abs(G.y)>C&&(G.y=(0,o.f)(C,G.y)),R=w;R<I;R++,B.assign(z),G.assign(L)){if(u.queryPoint2D(R<<1,z),l.queryPoint2D(R<<1,L),Math.abs(L.y)>C&&(L.y=(0,o.f)(C,L.y)),F=o.P.distance(B,z),F<m||0===G.y&&0===L.y)continue;r.x.geodeticDistance(this.m_a,this.m_eSquared,G.x,G.y,L.x,L.y,g,p,null,this.m_curveType);const e=g.val,t=p.val;for(S.setValues(0,B),x.setValues(1,z),N=n,P[0].assign(x),f[0]=n,v=0;v>=0;){Y=.5*(S.m_factor+x.m_factor),r.x.geodeticCoordinate(this.m_a,this.m_eSquared,G.x,G.y,e*Y,t,g,p,this.m_curveType),O.x=g.val,O.y=p.val,d[0]=O.x,d[1]=O.y,r.K.geogToProj(D,1,d),k.x=d[0],k.y=d[1];const n=.5*-k.offset(S.m_p_PCS,x.m_p_PCS)*o.P.distance(S.m_p_PCS,x.m_p_PCS);if(M.pe(n),Math.abs(n)>T||Math.abs(n)>0&&N>0)x.setValues(Y,k),v++,P[v].assign(x),Math.abs(n)<=T?(N--,f[v-1]=N,f[v]=N):(N=f[v-1],f[v]=N);else{if(v<=0)break;S.assign(x),v--,x.assign(P[v]),N=f[v]}}}return A+=M.getResult(),Math.abs(A)}catch(e){s.error=e,s.hasError=!0}finally{(0,c.c)(s)}}executeClippedPolygonGreatEllipticArea(e){const t=[],n=[],s=new o.P,i=new o.P,a=(0,r.y)(1,this.m_eSquared,new o.P(0,.5*Math.PI)),m=new o.K(0),u=new o.K(0),c=new o.K(0),l=new h.d,g=new h.d,p=new _.Envelope2D;e.queryLooseEnvelope(p);let y=0;p.containsCoords(p.xmin,0)||(y=Math.abs(p.ymin)<Math.abs(p.ymax)?p.ymin:p.ymax);const d=new v(this.m_eSquared,l,g,y),P=this.m_a*this.m_a,f=e.getImpl().querySegmentIterator();for(f.stripAttributes();f.nextPath();)for(;f.hasNextSegment();){const e=f.nextSegment();s.assign(e.getStartXY()),i.assign(e.getEndXY()),i.x-s.x>Math.PI?s.x+=2*Math.PI:i.x-s.x<-Math.PI&&(i.x+=2*Math.PI),this.splitSegmentCrossingItegralThreshold(e,t,n);for(let e of t)l.assign((0,r.y)(this.m_a,this.m_eSquared,e.getStartXY())),g.assign((0,r.y)(this.m_a,this.m_eSquared,e.getEndXY())),d.setSegmentEndPoints(l,g),this.adaptiveIntegrationWithRomberg(d,m);for(let e of n){let t=e.getStartXY(),n=e.getEndXY(),s=y;t.y<0&&(n=(0,o.c)(t,t=n),t.y=-t.y,n.y=-n.y,s=-s);const i=(0,r.y)(1,this.m_eSquared,t),_=(0,r.y)(1,this.m_eSquared,n),m=Math.min(t.y,n.y),l=(0,r.az)(this.m_eSquared,t.x,n.x,s,m);u.pe(l);const g=Math.abs((0,r.az)(this.m_eSquared,t.x,n.x,m,o.p)),p=new h.d;p.setSub(i,a);const d=new h.d;d.setSub(_,a);const f=new h.d;f.setCrossProductVector(p,d);let E=P*(g-.5*f.length());E=(0,o.f)(E,n.x-t.x),c.pe(E)}t.length=0,n.length=0}return c.getResult()+P*(.5*(1-this.m_eSquared)*m.getResult()+u.getResult())}getEqualAreaPCSInstance(e,t){const n=t.getCenterX();let s,i;const a=t.height();let _,h;(_=t.ymin>45*Math.PI/180||t.ymax<45*-Math.PI/180)?s=(0,o.f)(.5*Math.PI,t.getCenterY()):(s=t.getCenterY(),i=t.ymin+a*(2/3));const m=(0,r.aw)("EqualAreaPCS"),u=e.toString();return h=_?r.ax.fromString(r.a6.PE_TYPE_PROJCS,`PROJCS["${m}", ${u}, PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0],PARAMETER["False_Northing", 0],PARAMETER["Central_Meridian", ${n}], PARAMETER["Latitude_of_Origin", ${s}], UNIT["Meter",1.0]]`):r.ax.fromString(r.a6.PE_TYPE_PROJCS,`PROJCS["${m}", ${u}, PROJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting", 0],PARAMETER["False_Northing", 0],PARAMETER["Central_Meridian", ${n}],PARAMETER["Standard_Parallel_1", ${i}],PARAMETER["Latitude_of_Origin", ${s}],UNIT["Meter",1.0]]`),h}splitSegmentCrossingItegralThreshold(e,t,n){const s=100,a=400,_=(0,r.y)(this.m_a,this.m_eSquared,new o.P(0,o.p)),m=(0,r.y)(this.m_a,this.m_eSquared,new o.P(0,-o.p)),u=this.splitSegmentPassingThroughPole(e);for(let e of u){const u=e.getStartXY(),c=e.getEndXY(),l=(0,r.y)(this.m_a,this.m_eSquared,u),g=(0,r.y)(this.m_a,this.m_eSquared,c),p=new o.P,y=new h.d;let d=h.d.sqrDistance(_,l),P=h.d.sqrDistance(l,g);if(d<=s){if(!(P>a)){n.push(new i.L({start:u,end:c}));continue}y.assign(g.sub(l)),y.normalizeThis(),y.assign(l.add(y.mul(20))),p.assign((0,r.I)(this.m_a,this.m_eSquared,y)),n.push(new i.L({start:u,end:p})),u.assign(p)}if(l.assign((0,r.y)(this.m_a,this.m_eSquared,u)),d=h.d.sqrDistance(_,g),P=h.d.sqrDistance(l,g),d<=s){if(!(P>a)){n.push(new i.L({start:u,end:c}));continue}y.assign(g.sub(l)),y.normalizeThis(),y.assign(g.sub(y.mul(20))),p.assign((0,r.I)(this.m_a,this.m_eSquared,y)),n.push(new i.L({start:p,end:c})),c.assign(p)}if(l.assign((0,r.y)(this.m_a,this.m_eSquared,u)),g.assign((0,r.y)(this.m_a,this.m_eSquared,c)),d=h.d.sqrDistance(m,l),P=h.d.sqrDistance(l,g),d<=s){if(!(P>a)){n.push(new i.L({start:u,end:c}));continue}y.assign(g.sub(l)),y.normalizeThis(),y.assign(l.add(y.mul(20))),p.assign((0,r.I)(this.m_a,this.m_eSquared,y)),n.push(new i.L({start:u,end:p})),u.assign(p)}if(l.assign((0,r.y)(this.m_a,this.m_eSquared,u)),g.assign((0,r.y)(this.m_a,this.m_eSquared,c)),d=h.d.sqrDistance(m,g),P=h.d.sqrDistance(l,g),d<=s){if(!(P>a)){n.push(new i.L({start:u,end:c}));continue}y.assign(g.sub(l)),y.normalizeThis(),y.assign(g.sub(y.mul(20))),p.assign((0,r.I)(this.m_a,this.m_eSquared,y)),n.push(new i.L({start:p,end:c})),c.assign(p)}t.push(new i.L({start:u,end:c}))}}splitSegmentPassingThroughPole(e){const t={stack:[],error:void 0,hasError:!1};try{const n=[],s=new h.d,a=new h.d,_=new h.d,m=new o.P,u=20,l=3.124139361,p=10,y=e.getStartXY(),d=e.getEndXY(),P=(0,c.b)(t,new r.P,!1);if(r.x.geodeticDistance(this.m_a,this.m_eSquared,y.x,y.y,d.x,d.y,P,null,null,2),Math.abs(d.x-y.x)>l&&P.val>u){const e=new g(new o.P(0,90),y.divide(this.m_rpu),d.divide(this.m_rpu),this.m_inputGCS,2,2);let t=(0,r.B)(e.makeFunctor(),0,1,1e-10);if(t.second<=p&&t.first>0&&t.first<1)return s.assign((0,r.y)(this.m_a,this.m_eSquared,y)),a.assign((0,r.y)(this.m_a,this.m_eSquared,d)),(0,o.x)(s,a,t.first,_),m.assign((0,r.I)(this.m_a,this.m_eSquared,_)),n.push(new i.L({start:y,end:m})),n.push(new i.L({start:m,end:d})),n;if(e.setPointDistFrom(new o.P(0,-90)),t=(0,r.B)(e.makeFunctor(),0,1,1e-10),t.second<=p&&t.first>0&&t.first<1)return s.assign((0,r.y)(this.m_a,this.m_eSquared,y)),a.assign((0,r.y)(this.m_a,this.m_eSquared,d)),(0,o.x)(s,a,t.first,_),m.assign((0,r.I)(this.m_a,this.m_eSquared,_)),n.push(new i.L({start:y,end:m})),n.push(new i.L({start:m,end:d})),n}return n.push(new i.L({start:y,end:d})),n}catch(e){t.error=e,t.hasError=!0}finally{(0,c.c)(t)}}adaptiveIntegrationWithRomberg(e,t){const n=e.makeFunctor();let s=0,a=1,r=n(s),o=n(a);const _=1e-17,h=1e-14;let m=(s+a)/2,u=n(m),c=Math.abs(u-r),l=Math.abs(o-u),g=0;for(;g++<32&&(c/l<.1||l/c<.1);)c<l?(t.pe((0,i.v)(5,s,m,h,_,n)),s=m,r=u):(t.pe((0,i.v)(5,m,a,h,_,n)),a=m,o=u),m=(s+a)/2,u=Math.abs(n(m)),c=Math.abs(u-r),l=Math.abs(o-u);t.pe((0,i.v)(5,s,a,h,_,n))}loxodromeAreaHemi(e,t,n,s,i){const a=n.clone(),r=i.clone();let _,h,m,u,c,l,g,p,y,d,P,f,E,S,x,v;return a.make_negative&&a.changeSign(),r.make_negative&&r.changeSign(),P=s-t,1===Math.abs(a.sin_phi)||1===Math.abs(r.sin_phi)?e.half_qp*P:a.sin_phi===r.sin_phi?(d=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+(0,o.y)(e.e*a.sin_phi))*P,d):(x=Math.log(r.sin_half_phi_pf*a.sin_half_phi_pz/(r.sin_half_phi_pz*a.sin_half_phi_pf)),v=Math.log(r.sin_half_asin_e_sin_phi_pf*a.sin_half_asin_e_sin_phi_pz/(r.sin_half_asin_e_sin_phi_pz*a.sin_half_asin_e_sin_phi_pf)),1===this.m_eSquared?(c=0,_=.5*(x+r.sin_phi/r.one_m_e_2_sin_2_phi-a.sin_phi/a.one_m_e_2_sin_2_phi),h=0):(c=-2*e.atanh_e_over_e*(Math.log(r.one_p_sin_phi/a.one_p_sin_phi)-e.e*v),_=(x-e.e*v)/e.one_m_e_2,h=(Math.log(r.one_m_e_2_sin_2_phi/a.one_m_e_2_sin_2_phi)+c/e.atanh_e_over_e)/e.one_m_e_2),m=-v*(a.atanh_esin_phi+r.atanh_esin_phi),u=1/a.one_m_e_2_sin_2_phi-1/r.one_m_e_2_sin_2_phi,l=(0,o.z)(r.one_m_sin_phi/e.one_p_e,e.e)-(0,o.z)(a.one_m_sin_phi/e.one_p_e,e.e),g=(0,o.z)(r.one_p_sin_phi/e.one_p_e,e.e)-(0,o.z)(a.one_p_sin_phi/e.one_p_e,e.e),p=(0,o.z)(a.one_m_sin_phi/-e.one_m_e,e.e)-(0,o.z)(r.one_m_sin_phi/-e.one_m_e,e.e),y=(0,o.z)(a.one_p_sin_phi/-e.one_m_e,e.e)-(0,o.z)(r.one_p_sin_phi/-e.one_m_e,e.e),d=.25/_*(h+m+u+c+.5*(l+g+p+y)),d+=e.half_qp,f=.5*e.one_m_e_2*a.sin_phi*(1/a.one_m_e_2_sin_2_phi+(0,o.y)(e.e*a.sin_phi)),E=.5*e.one_m_e_2*r.sin_phi*(1/r.one_m_e_2_sin_2_phi+(0,o.y)(e.e*r.sin_phi)),E<f&&(S=f,f=E,E=S),d<f&&(d=f),d>E&&(d=E),d*=P,d)}loxodromeArea(e){const t=Math.PI/180;let n=0;const s={e:Number.NaN,one_p_e:Number.NaN,one_m_e:Number.NaN,one_m_e_2:Number.NaN,atanh_e_over_e:Number.NaN,half_qp:Number.NaN,f:Number.NaN,z:Number.NaN},i=N(),a=N();s.e=Math.sqrt(this.m_eSquared),s.one_p_e=1+s.e,s.one_m_e=1-s.e,s.one_m_e_2=1-this.m_eSquared,s.atanh_e_over_e=(0,o.y)(s.e),this.m_eSquared>=1?s.half_qp=1:s.half_qp=.5*(1+s.atanh_e_over_e*s.one_m_e_2),s.f=.25*Math.PI,s.z=.75*Math.PI,a.initialize(0,s.e,s.f,s.z);const r=e.getPathCount(),_=new o.P,h=new o.P,m=e.getImpl().getAttributeStreamRef(0);for(let o=0;o<r;o++){const r=e.getPathStart(o),u=e.getPathEnd(o);if(!(u-r<=1)){m.queryPoint2D(2*(u-1),_);for(let e=r;e<u;e++){m.queryPoint2D(2*e,h);const o=_.y*t,u=h.y*t;if(e===r?(i.initialize(o,s.e,s.f,s.z),i.make_negative=!1):i.assign(a),a.initialize(u,s.e,s.f,s.z),a.make_negative=!1,_.y*h.y<0){if(_.y>=90&&h.y<=-90||h.y>=90&&_.y<=-90)return Number.NaN;const e=N();e.initialize(0,s.e,s.f,s.z),e.make_negative=!1;const r=i.atanh_sin_phi-s.e*i.atanh_esin_phi,m=a.atanh_sin_phi-s.e*a.atanh_esin_phi,u=(m*_.x-r*h.x)/(m-r);o<0?(i.make_negative=!0,n-=this.loxodromeAreaHemi(s,_.x*t,i,u*t,e),i.make_negative=!1,n+=this.loxodromeAreaHemi(s,u*t,e,h.x*t,a)):(n+=this.loxodromeAreaHemi(s,_.x*t,i,u*t,e),a.make_negative=!0,n-=this.loxodromeAreaHemi(s,u*t,e,h.x*t,a),a.make_negative=!1)}else _.y>=0?n+=this.loxodromeAreaHemi(s,_.x*t,i,h.x*t,a):(i.make_negative=!0,a.make_negative=!0,n-=this.loxodromeAreaHemi(s,_.x*t,i,h.x*t,a),i.make_negative=!1,a.make_negative=!1);_.assign(h)}}}return this.m_a*n*this.m_a}calculate(e){if(e.isEmpty()||e.getDimension()<2)return 0;if(e.getGeometryType()===s.G.enumEnvelope){const t=new i.a;return t.addEnvelope(e,!1),this.calculate(t)}return this.m_inputSR!==this.m_inputGCS&&null===this.m_transformPCS2GCS&&(this.m_transformPCS2GCS=(0,r.w)(this.m_inputSR,this.m_inputGCS,null)),this.executePolygonGeodeticArea(e)}}class q{getOperatorType(){return 10311}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,i){return(0,s.d)(e),4===n?(new f).execute(e,t,i):new T(t,n,i).calculate(e)}}},76061:(e,t,n)=>{n.d(t,{G:()=>s,S:()=>i});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class i 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}}},90135:(e,t,n)=>{n.d(t,{D:()=>E,m:()=>m,s:()=>d,w:()=>y});var s=n(90237),i=n(55537),a=n(35368),r=n(12189),o=n(83661),_=n(79187),h=n(95213);function m(){return{outPoint:new o.P,index:-1,t:Number.NaN}}function u(e,t,n){return{outPoint:e.clone(),index:t,t:n}}function c(e,t,n,s){e.outPoint.assign(t),e.index=n,e.t=s}function l(e,t){e.outPoint.assign(t.outPoint),e.index=t.index,e.t=t.t}function g(e,t,n,s){e.index=n,e.t=s,t.queryCoord2D(e.t,e.outPoint)}function p(e,t){const n=m();l(n,e),l(e,t),l(t,n)}function y(e,t,n,s,a,o){if(e.getGeometryType()===i.G.enumPolygon){for(;s.nextPath();)if(s.hasNextSegment()){const t=s.nextSegment();if(0!==(0,r.h)(e,t.getEndXY(),0))return c(a,t.getEndXY(),-1,Number.NaN),c(o,t.getEndXY(),-1,Number.NaN),!0}s.resetToFirstPath()}if(t.getGeometryType()===i.G.enumPolygon){for(;n.nextPath();)if(n.hasNextSegment()){const e=n.nextSegment();if(0!==(0,r.h)(t,e.getEndXY(),0))return c(a,e.getEndXY(),-1,Number.NaN),c(o,e.getEndXY(),-1,Number.NaN),!0}n.resetToFirstPath()}return!1}function d(e){const t=e.getPathCount(),n=(0,o.d)(e.getSegmentCount(),0);let s=0;for(let i=0;i<t;++i){const t=s+e.getSegmentCountPath(i);for(let a=s,r=e.getPathStart(i);a<t;++a,++r)n[a]=r;s=t}return(0,a.s)(e.getPointCount(),n),n}function P(e,t){return!!Number.isNaN(t)||e<=t}function f(e){const t=new a.a;return t.addEnvelope(e,!1),t}class E{constructor(e,t){if(this.m_env2DgeometryA=null,this.m_env2DgeometryB=null,this.m_progressCounter=0,this.m_progressTracker=t,this.m_maxSqrDistance=e*e,this.m_maxDistance=e,this.m_bIsNearCalc=!1,Number.isNaN(this.m_maxDistance)?this.m_maxDistance=Number.POSITIVE_INFINITY:this.m_maxDistance=e,this.m_maxSqrDistance=this.m_maxDistance*this.m_maxDistance,Number.isFinite(this.m_maxSqrDistance)){let e=Math.sqrt(this.m_maxSqrDistance);for(;e<this.m_maxDistance;)this.m_maxSqrDistance*=1+Number.EPSILON,e=Math.sqrt(this.m_maxSqrDistance)}}calculate(e,t,n,s){if((e.getGeometryType()!==h.P.type||t.getGeometryType()!==h.P.type)&&(this.m_env2DgeometryA=new _.Envelope2D,this.m_env2DgeometryB=new _.Envelope2D,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!P(this.m_env2DgeometryA.distanceFromEnvelope(this.m_env2DgeometryB),this.m_maxDistance)))return Number.POSITIVE_INFINITY;const i=u(new o.P,(0,o.j)(),Number.NaN),a=u(new o.P,(0,o.j)(),Number.NaN),r=this._ExecuteBruteForce(e,t,i,a);return P(r,this.m_maxDistance)?(null!==n&&l(n,i),null!==s&&l(s,a),r):Number.POSITIVE_INFINITY}isNear(e,t){if(this.m_bIsNearCalc=!0,e.isEmpty()||t.isEmpty())return!1;if(e===t)return!0;let n=!0;if(e.getGeometryType()!==h.P.type&&e.getGeometryType()!==h.E.type||t.getGeometryType()!==h.P.type&&t.getGeometryType()!==h.E.type||(n=!1),n){if(this.m_env2DgeometryA=new _.Envelope2D,this.m_env2DgeometryB=new _.Envelope2D,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!(this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)>this.m_maxSqrDistance))return!0;if(this.m_env2DgeometryA.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>this.m_maxSqrDistance)return!1}const s=u(new o.P,(0,o.j)(),Number.NaN),i=u(new o.P,(0,o.j)(),Number.NaN);return this._ExecuteBruteForce(e,t,s,i)<=this.m_maxDistance}progress_(e=!1){}_ExecuteBruteForce(e,t,n,s){switch(e.getGeometryType()){case i.G.enumPoint:return this.distancePointGeometry(e,t,n,s);case i.G.enumMultiPoint:return this.distanceMultipointGeometry(e,t,n,s);case i.G.enumEnvelope:return this.distanceEnvelopeGeometry(e,t,n,s);case i.G.enumPolyline:case i.G.enumPolygon:return this.distanceMultipathGeometry(e,t,n,s);default:return Number.NaN}}distancePointGeometry(e,t,n,s){switch(t.getGeometryType()){case i.G.enumPoint:return this.distancePointPoint(e,t,n,s);case i.G.enumMultiPoint:return this.distancePointMultipoint(e,t,n,s);case i.G.enumPolyline:case i.G.enumPolygon:return this.distancePointMultipath(e,t,n,s);case i.G.enumEnvelope:return this.distancePointEnvelope(e,t,n,s);default:return Number.NaN}}distancePointPoint(e,t,n,s){const i=e.getXY(),a=t.getXY();return c(n,i,0,0),c(s,a,0,0),Math.sqrt(o.P.sqrDistance(i,a))}distancePointMultipoint(e,t,n,s){const i=e.getXY();let a=this.m_maxSqrDistance,r=a,_=!1;const h=t.getPointCount(),m=new o.P;for(let e=0;e<h;++e)if(t.queryXY(e,m),r=o.P.sqrDistance(i,m),this.m_bIsNearCalc){if(r<=a)return 0}else if(!(r>a)&&(!_&&r===a||r<a)&&(a=r,c(n,i,0,0),c(s,m,e,0),_=!0,0===a))return 0;return _?Math.sqrt(a):Number.POSITIVE_INFINITY}distancePointMultipath(e,t,n,s){const a=!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB),h=e.getXY();if(!a&&t.getGeometryType()===i.G.enumPolygon&&0!==(0,r.h)(t,h,0))return c(n,h,0,0),c(s,h,-1,Number.NaN),0;t.getImpl().getAccelerators();let m=this.m_maxSqrDistance,u=m,l=-1;const g=new _.Envelope2D,p=t.querySegmentIterator();let y=!1;for(;p.nextPath();)for(;p.hasNextSegment();){const e=p.nextSegment();e.queryEnvelope(g);const t=g.sqrDistance(h);if(t>m)continue;if(!this.m_bIsNearCalc&&y&&t===m)continue;l=e.getClosestCoordinate(h,!1);const i=e.getCoord2D(l);if(u=o.P.sqrDistance(h,i),this.m_bIsNearCalc){if(u<=m)return 0}else if(!(u>m)&&(!y||u<m)&&(m=u,c(n,h,0,0),c(s,i,p.getStartPointIndex(),l),y=!0,0===m))return 0}return y?Math.sqrt(m):Number.POSITIVE_INFINITY}distancePointEnvelope(e,t,n,s){const i=e.getXY();c(n,i,0,0),c(s,i,-1,Number.NaN);const a=t.asEnvelope2D();return a.contains(i)?0:Math.sqrt(a.sqrDistance(i,s.outPoint))}distanceMultipointGeometry(e,t,n,s){switch(t.getGeometryType()){case i.G.enumPoint:{this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distancePointMultipoint(t,e,s,n);return this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case i.G.enumMultiPoint:return this.distanceMultipointMultipoint(e,t,n,s,1,1);case i.G.enumPolyline:case i.G.enumPolygon:return this.distanceMultipointMultipath(e,t,n,s);case i.G.enumEnvelope:return this.distanceMultipointMultipath(e,f(t),n,s);default:return Number.NaN}}distanceMultipointMultipoint(e,t,n,i,a,r){const _={stack:[],error:void 0,hasError:!1};try{if(this.m_bIsNearCalc&&1===a&&1===r){const s=Math.trunc((0,o.s)(Math.sqrt(e.getPointCount())+1,1,(0,o.i)())),a=Math.trunc((0,o.s)(Math.sqrt(t.getPointCount())+1,1,(0,o.i)()));if((s>=4||a>=4)&&this.distanceMultipointMultipoint(e,t,n,i,s,a)<=this.m_maxSqrDistance)return 0}let h=this.m_maxSqrDistance;const m=[e],u=[t],l=this.swapGeometriesIfBGtA(m,u);l&&(this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),r=(0,o.c)(a,a=r),p(n,i)),(0,s.b)(_,(0,o.h)((()=>{p(n,i),this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)}),!l),!1);const g=m[0].getImpl(),y=u[0].getImpl(),d=g.getPointCount(),P=y.getPointCount(),f=P>1;let E=!1;const S=new o.P,x=new o.P;for(let e=0;e<d;e+=a){if(g.queryXY(e,S),f){const e=this.m_env2DgeometryB.sqrDistance(S);if(this.m_bIsNearCalc){if(e>h)continue;if(this.m_env2DgeometryB.sqrMaxMinDistance(S)<=h)return 0}else if(e>=h)continue}for(let t=0;t<P;t+=r){y.queryXY(t,x);const s=o.P.sqrDistance(S,x);if(this.m_bIsNearCalc){if(s<=h)return 0}else if(!(s>h||E&&s===h)&&(!E||s<h)&&(c(n,S,e,0),c(i,x,t,0),E=!0,h=s,0===h))return E?Math.sqrt(h):Number.POSITIVE_INFINITY}}return E?Math.sqrt(h):Number.POSITIVE_INFINITY}catch(e){_.error=e,_.hasError=!0}finally{(0,s.c)(_)}}distanceMultipointMultipath(e,t,n,s){let a=!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)&&t.getGeometryType()===i.G.enumPolygon;const h=t.querySegmentIterator();h.stripAttributes();const m=new _.Envelope2D,u=new o.P;let l=this.m_maxSqrDistance;const g=e.getImpl(),p=g.getPointCount(),y=p>1;let d=!1;for(;h.nextPath();)for(;h.hasNextSegment();){const e=h.nextSegment();if(e.queryLooseEnvelope(m),y){const e=m.sqrDistanceEnvelope(this.m_env2DgeometryA,null,null);if(this.m_bIsNearCalc){if(e>l)continue}else if(e>l||d&&e===l)continue}for(let i=0;i<p;i++){if(g.queryXY(i,u),a&&0!==(0,r.h)(t,u,0))return c(n,u,-1,Number.NaN),c(s,u,i,0),0;{const e=m.sqrDistance(u);if(this.m_bIsNearCalc){if(e>l)continue}else if(e>l)continue}const o=e.getClosestCoordinate(u,!1),_=e.getCoord2D(o);u.subThis(_);const p=u.sqrLength();if(this.m_bIsNearCalc){if(p<=l)return 0}else if(!(p>l)&&(!d||p<l)&&(l=p,c(n,g.getXY(i),i,0),c(s,_,h.getStartPointIndex(),o),d=!0,0===l))return 0}a=!1}return d?Math.sqrt(l):Number.POSITIVE_INFINITY}distanceEnvelopeGeometry(e,t,n,s){switch(t.getGeometryType()){case i.G.enumPoint:return this.distancePointEnvelope(t,e,s,n);case i.G.enumMultiPoint:{this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distanceMultipointMultipath(t,f(e),s,n);return this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case i.G.enumPolyline:case i.G.enumPolygon:return this.distanceMultipathMultipath(f(e),t,n,s);case i.G.enumEnvelope:return this.distanceEnvelopeEnvelope(e,t,n,s);default:return Number.NaN}}distanceEnvelopeEnvelope(e,t,n,s){n.t=Number.NaN,n.index=-1,s.t=Number.NaN,s.index=-1;const i=e.asEnvelope2D(),a=t.asEnvelope2D();return Math.sqrt(i.sqrDistanceEnvelope(a,n.outPoint,s.outPoint))}distanceMultipathGeometry(e,t,n,s){switch(t.getGeometryType()){case i.G.enumPoint:{this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distancePointMultipath(t,e,s,n);return this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case i.G.enumMultiPoint:{this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distanceMultipointMultipath(t,e,s,n);return this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case i.G.enumPolyline:case i.G.enumPolygon:return this.distanceMultipathMultipath(e,t,n,s);case i.G.enumEnvelope:return this.distanceMultipathMultipath(e,f(t),n,s);default:return Number.NaN}}distanceMultipathMultipath(e,t,n,i){const r={stack:[],error:void 0,hasError:!1};try{const h=[e],u=[t],c=this.swapGeometriesIfAGtB(h,u);c&&(this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),p(n,i)),(0,s.b)(r,(0,o.h)((()=>{p(n,i),this.m_env2DgeometryB=(0,o.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)}),!c),!1);const P=h[0],f=u[0],E=P.querySegmentIterator();E.stripAttributes();const S=f.querySegmentIterator();if(S.stripAttributes(),this.m_bIsNearCalc&&this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)<=this.m_maxSqrDistance)return 0;if(this.m_bIsNearCalc){const e=Math.trunc((0,o.s)(Math.sqrt(P.getPointCount())+1,1,(0,o.i)())),t=Math.trunc((0,o.s)(Math.sqrt(P.getPointCount())+1,1,(0,o.i)()));if(this.distanceMultipointMultipoint(P,f,n,i,e,t)<=this.m_maxSqrDistance)return 0}if(this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)){const e=m(),t=m();if(y(P,f,E,S,e,t))return l(n,e),l(i,t),0}const x=d(P),v=[],N=new a.S,D=new _.Envelope2D,A=new _.Envelope2D,M=new _.Envelope2D;let C=this.m_maxSqrDistance,T=!0,q=!1;for(let e=0,t=x.length;e<t;++e){P.querySegment(x[e],N,!0);const t=N.get();if(t.queryEnvelope(D),!(D.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>C)){if(this.m_bIsNearCalc&&D.sqrMaxDistanceEnvelope(this.m_env2DgeometryB)<=C)return 0;for(;S.nextPath();){if(this.progress_(),T)f.queryPathEnvelope(S.getPathIndex(),M),v[S.getPathIndex()]=M.clone();else if(D.sqrDistanceEnvelope(v[S.getPathIndex()],null,null)>C)continue;for(;S.hasNextSegment();){const s=S.nextSegment();if(s.queryEnvelope(A),D.sqrDistanceEnvelope(A,null,null)<=C){const a=!D.isIntersecting(A),r=[0],o=[0];let _=t.distance(s,a,r,o);if(_*=_,this.m_bIsNearCalc&&_<=this.m_maxSqrDistance)return 0;if(_<C||_===C&&x[e]<n.index){if(q=!0,g(n,t,x[e],r[0]),g(i,s,S.getStartPointIndex(),o[0]),0===_)return 0;C=_}}}}S.resetToFirstPath(),T=!1}}return q?Math.sqrt(C):Number.POSITIVE_INFINITY}catch(e){r.error=e,r.hasError=!0}finally{(0,s.c)(r)}}swapGeometriesIfAGtB(e,t){return(0,i.v)(e[0])>(0,i.v)(t[0])&&(t[0]=(0,o.c)(e[0],e[0]=t[0]),!0)}swapGeometriesIfBGtA(e,t){return this.swapGeometriesIfAGtB(t,e)}}}}]);