x_ite 8.6.12 → 8.6.14

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 (423) hide show
  1. package/dist/LICENSE.md +4 -4
  2. package/dist/assets/components/Annotation.js +37 -13
  3. package/dist/assets/components/Annotation.min.js +1 -1
  4. package/dist/assets/components/CADGeometry.js +45 -21
  5. package/dist/assets/components/CADGeometry.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturing.js +39 -28
  7. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  8. package/dist/assets/components/DIS.js +37 -13
  9. package/dist/assets/components/DIS.min.js +1 -1
  10. package/dist/assets/components/EventUtilities.js +37 -9
  11. package/dist/assets/components/EventUtilities.min.js +1 -1
  12. package/dist/assets/components/Geometry2D.js +55 -23
  13. package/dist/assets/components/Geometry2D.min.js +1 -1
  14. package/dist/assets/components/Geospatial.js +84 -40
  15. package/dist/assets/components/Geospatial.min.js +1 -1
  16. package/dist/assets/components/HAnim.js +42 -18
  17. package/dist/assets/components/HAnim.min.js +1 -1
  18. package/dist/assets/components/KeyDeviceSensor.js +18 -10
  19. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  20. package/dist/assets/components/Layout.js +47 -27
  21. package/dist/assets/components/Layout.min.js +1 -1
  22. package/dist/assets/components/NURBS.js +84 -28
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +70 -30
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +42 -22
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +93 -37
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +35 -31
  31. package/dist/assets/components/Scripting.min.js +1 -1
  32. package/dist/assets/components/Text.js +33 -25
  33. package/dist/assets/components/Text.min.js +1 -1
  34. package/dist/assets/components/TextureProjector.js +22 -14
  35. package/dist/assets/components/TextureProjector.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +64 -32
  37. package/dist/assets/components/Texturing3D.min.js +1 -1
  38. package/dist/assets/components/VolumeRendering.js +80 -28
  39. package/dist/assets/components/VolumeRendering.min.js +1 -1
  40. package/dist/assets/components/X_ITE.js +13 -9
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.js +1697 -1080
  44. package/dist/x_ite.min.js +1 -1
  45. package/dist/x_ite.zip +0 -0
  46. package/docs/_config.yml +2 -2
  47. package/docs/_posts/components/Core/WorldInfo.md +1 -1
  48. package/docs/_posts/components/EnvironmentalEffects/Background.md +1 -1
  49. package/docs/_posts/components/EnvironmentalEffects/Fog.md +1 -1
  50. package/docs/_posts/components/EnvironmentalSensor/ProximitySensor.md +1 -1
  51. package/docs/_posts/components/EnvironmentalSensor/VisibilitySensor.md +1 -1
  52. package/docs/_posts/components/Geometry3D/Box.md +1 -1
  53. package/docs/_posts/components/Geometry3D/Cone.md +1 -1
  54. package/docs/_posts/components/Geometry3D/Cylinder.md +1 -1
  55. package/docs/_posts/components/Geometry3D/ElevationGrid.md +1 -1
  56. package/docs/_posts/components/Geometry3D/Extrusion.md +1 -1
  57. package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +1 -1
  58. package/docs/_posts/components/Geometry3D/Sphere.md +1 -1
  59. package/docs/_posts/components/Grouping/Group.md +1 -1
  60. package/docs/_posts/components/Grouping/Switch.md +1 -1
  61. package/docs/_posts/components/Grouping/Transform.md +1 -1
  62. package/docs/_posts/components/Interpolation/ColorInterpolator.md +1 -1
  63. package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +1 -1
  64. package/docs/_posts/components/Interpolation/NormalInterpolator.md +1 -1
  65. package/docs/_posts/components/Interpolation/OrientationInterpolator.md +1 -1
  66. package/docs/_posts/components/Interpolation/PositionInterpolator.md +1 -1
  67. package/docs/_posts/components/Interpolation/ScalarInterpolator.md +1 -1
  68. package/docs/_posts/components/Lighting/DirectionalLight.md +1 -1
  69. package/docs/_posts/components/Lighting/PointLight.md +1 -1
  70. package/docs/_posts/components/Lighting/SpotLight.md +1 -1
  71. package/docs/_posts/components/Navigation/Billboard.md +1 -1
  72. package/docs/_posts/components/Navigation/Collision.md +1 -1
  73. package/docs/_posts/components/Navigation/LOD.md +1 -1
  74. package/docs/_posts/components/Navigation/NavigationInfo.md +1 -1
  75. package/docs/_posts/components/Navigation/Viewpoint.md +1 -1
  76. package/docs/_posts/components/Networking/Anchor.md +1 -1
  77. package/docs/_posts/components/Networking/Inline.md +1 -1
  78. package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +1 -1
  79. package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +1 -1
  80. package/docs/_posts/components/PointingDeviceSensor/SphereSensor.md +1 -1
  81. package/docs/_posts/components/PointingDeviceSensor/TouchSensor.md +1 -1
  82. package/docs/_posts/components/Rendering/Color.md +1 -1
  83. package/docs/_posts/components/Rendering/Coordinate.md +1 -1
  84. package/docs/_posts/components/Rendering/IndexedLineSet.md +1 -1
  85. package/docs/_posts/components/Rendering/Normal.md +1 -1
  86. package/docs/_posts/components/Rendering/PointSet.md +1 -1
  87. package/docs/_posts/components/Scripting/Script.md +1 -1
  88. package/docs/_posts/components/Shape/Appearance.md +1 -1
  89. package/docs/_posts/components/Shape/Material.md +1 -9
  90. package/docs/_posts/components/Shape/PhysicalMaterial.md +0 -8
  91. package/docs/_posts/components/Shape/Shape.md +1 -1
  92. package/docs/_posts/components/Shape/UnlitMaterial.md +0 -8
  93. package/docs/_posts/components/Sound/AudioClip.md +1 -1
  94. package/docs/_posts/components/Sound/Sound.md +1 -1
  95. package/docs/_posts/components/Text/FontStyle.md +1 -1
  96. package/docs/_posts/components/Text/Text.md +1 -1
  97. package/docs/_posts/components/Texturing/ImageTexture.md +1 -5
  98. package/docs/_posts/components/Texturing/MovieTexture.md +1 -5
  99. package/docs/_posts/components/Texturing/PixelTexture.md +1 -1
  100. package/docs/_posts/components/Texturing/TextureCoordinate.md +1 -1
  101. package/docs/_posts/components/Texturing/TextureTransform.md +1 -1
  102. package/docs/_posts/components/Time/TimeSensor.md +1 -1
  103. package/docs/laboratory/gltf-sample-viewer.html +1 -1
  104. package/package.json +1 -1
  105. package/src/standard/Math/Numbers/Matrix2.js +3 -3
  106. package/src/standard/Math/Numbers/Vector4.js +1 -0
  107. package/src/tests.js +2 -0
  108. package/src/x_ite/Base/X3DBaseNode.js +58 -53
  109. package/src/x_ite/Browser/Core/BrowserOptions.js +2 -1
  110. package/src/x_ite/Browser/Core/X3DCoreContext.js +3 -6
  111. package/src/x_ite/Browser/Grouping/X3DGroupingContext.js +9 -15
  112. package/src/x_ite/Browser/Navigation/ExamineViewer.js +0 -3
  113. package/src/x_ite/Browser/Navigation/FlyViewer.js +0 -2
  114. package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +10 -12
  115. package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +40 -21
  116. package/src/x_ite/Browser/VERSION.js +1 -1
  117. package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +1 -1
  118. package/src/x_ite/Browser/X3DBrowser.js +19 -19
  119. package/src/x_ite/Components/Annotation/AnnotationLayer.js +4 -0
  120. package/src/x_ite/Components/Annotation/AnnotationTarget.js +4 -0
  121. package/src/x_ite/Components/Annotation/GroupAnnotation.js +4 -0
  122. package/src/x_ite/Components/Annotation/IconAnnotation.js +4 -0
  123. package/src/x_ite/Components/Annotation/TextAnnotation.js +4 -0
  124. package/src/x_ite/Components/Annotation/URLAnnotation.js +4 -0
  125. package/src/x_ite/Components/CADGeometry/CADAssembly.js +4 -0
  126. package/src/x_ite/Components/CADGeometry/CADFace.js +12 -8
  127. package/src/x_ite/Components/CADGeometry/CADLayer.js +4 -0
  128. package/src/x_ite/Components/CADGeometry/CADPart.js +4 -0
  129. package/src/x_ite/Components/CADGeometry/IndexedQuadSet.js +4 -0
  130. package/src/x_ite/Components/CADGeometry/QuadSet.js +4 -0
  131. package/src/x_ite/Components/Core/MetadataBoolean.js +8 -4
  132. package/src/x_ite/Components/Core/MetadataDouble.js +8 -4
  133. package/src/x_ite/Components/Core/MetadataFloat.js +8 -4
  134. package/src/x_ite/Components/Core/MetadataInteger.js +8 -4
  135. package/src/x_ite/Components/Core/MetadataSet.js +8 -4
  136. package/src/x_ite/Components/Core/MetadataString.js +8 -4
  137. package/src/x_ite/Components/Core/WorldInfo.js +4 -0
  138. package/src/x_ite/Components/Core/X3DNode.js +17 -16
  139. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +11 -14
  140. package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +4 -1
  141. package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +4 -0
  142. package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +6 -2
  143. package/src/x_ite/Components/DIS/DISEntityManager.js +4 -0
  144. package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +4 -0
  145. package/src/x_ite/Components/DIS/EspduTransform.js +4 -0
  146. package/src/x_ite/Components/DIS/ReceiverPdu.js +4 -0
  147. package/src/x_ite/Components/DIS/SignalPdu.js +4 -0
  148. package/src/x_ite/Components/DIS/TransmitterPdu.js +4 -0
  149. package/src/x_ite/Components/EnvironmentalEffects/Background.js +4 -0
  150. package/src/x_ite/Components/EnvironmentalEffects/Fog.js +4 -0
  151. package/src/x_ite/Components/EnvironmentalEffects/FogCoordinate.js +4 -0
  152. package/src/x_ite/Components/EnvironmentalEffects/LocalFog.js +4 -0
  153. package/src/x_ite/Components/EnvironmentalEffects/TextureBackground.js +4 -0
  154. package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +1 -1
  155. package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +4 -0
  156. package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +6 -2
  157. package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +4 -0
  158. package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +2 -2
  159. package/src/x_ite/Components/EventUtilities/BooleanFilter.js +4 -0
  160. package/src/x_ite/Components/EventUtilities/BooleanSequencer.js +4 -0
  161. package/src/x_ite/Components/EventUtilities/BooleanToggle.js +4 -0
  162. package/src/x_ite/Components/EventUtilities/BooleanTrigger.js +4 -0
  163. package/src/x_ite/Components/EventUtilities/IntegerSequencer.js +4 -0
  164. package/src/x_ite/Components/EventUtilities/IntegerTrigger.js +4 -0
  165. package/src/x_ite/Components/EventUtilities/TimeTrigger.js +4 -0
  166. package/src/x_ite/Components/Followers/ColorChaser.js +4 -0
  167. package/src/x_ite/Components/Followers/ColorDamper.js +4 -0
  168. package/src/x_ite/Components/Followers/CoordinateChaser.js +4 -0
  169. package/src/x_ite/Components/Followers/CoordinateDamper.js +4 -0
  170. package/src/x_ite/Components/Followers/OrientationChaser.js +4 -0
  171. package/src/x_ite/Components/Followers/OrientationDamper.js +4 -0
  172. package/src/x_ite/Components/Followers/PositionChaser.js +4 -0
  173. package/src/x_ite/Components/Followers/PositionChaser2D.js +4 -0
  174. package/src/x_ite/Components/Followers/PositionDamper.js +4 -0
  175. package/src/x_ite/Components/Followers/PositionDamper2D.js +4 -0
  176. package/src/x_ite/Components/Followers/ScalarChaser.js +4 -0
  177. package/src/x_ite/Components/Followers/ScalarDamper.js +4 -0
  178. package/src/x_ite/Components/Followers/TexCoordChaser2D.js +4 -0
  179. package/src/x_ite/Components/Followers/TexCoordDamper2D.js +4 -0
  180. package/src/x_ite/Components/Followers/X3DFollowerNode.js +2 -2
  181. package/src/x_ite/Components/Geometry2D/Arc2D.js +5 -1
  182. package/src/x_ite/Components/Geometry2D/ArcClose2D.js +5 -1
  183. package/src/x_ite/Components/Geometry2D/Circle2D.js +5 -1
  184. package/src/x_ite/Components/Geometry2D/Disk2D.js +5 -1
  185. package/src/x_ite/Components/Geometry2D/Polyline2D.js +4 -0
  186. package/src/x_ite/Components/Geometry2D/Polypoint2D.js +4 -0
  187. package/src/x_ite/Components/Geometry2D/Rectangle2D.js +4 -0
  188. package/src/x_ite/Components/Geometry2D/TriangleSet2D.js +4 -0
  189. package/src/x_ite/Components/Geometry3D/Box.js +4 -0
  190. package/src/x_ite/Components/Geometry3D/Cone.js +5 -1
  191. package/src/x_ite/Components/Geometry3D/Cylinder.js +5 -1
  192. package/src/x_ite/Components/Geometry3D/ElevationGrid.js +14 -10
  193. package/src/x_ite/Components/Geometry3D/Extrusion.js +4 -0
  194. package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +7 -3
  195. package/src/x_ite/Components/Geometry3D/Sphere.js +5 -1
  196. package/src/x_ite/Components/Geospatial/GeoCoordinate.js +4 -0
  197. package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +11 -7
  198. package/src/x_ite/Components/Geospatial/GeoLOD.js +4 -0
  199. package/src/x_ite/Components/Geospatial/GeoLocation.js +4 -0
  200. package/src/x_ite/Components/Geospatial/GeoMetadata.js +4 -0
  201. package/src/x_ite/Components/Geospatial/GeoOrigin.js +4 -0
  202. package/src/x_ite/Components/Geospatial/GeoPositionInterpolator.js +4 -0
  203. package/src/x_ite/Components/Geospatial/GeoProximitySensor.js +4 -0
  204. package/src/x_ite/Components/Geospatial/GeoTouchSensor.js +4 -0
  205. package/src/x_ite/Components/Geospatial/GeoTransform.js +4 -0
  206. package/src/x_ite/Components/Geospatial/GeoViewpoint.js +4 -0
  207. package/src/x_ite/Components/Grouping/Group.js +4 -0
  208. package/src/x_ite/Components/Grouping/StaticGroup.js +4 -0
  209. package/src/x_ite/Components/Grouping/Switch.js +11 -7
  210. package/src/x_ite/Components/Grouping/Transform.js +4 -0
  211. package/src/x_ite/Components/HAnim/HAnimDisplacer.js +4 -0
  212. package/src/x_ite/Components/HAnim/HAnimHumanoid.js +4 -0
  213. package/src/x_ite/Components/HAnim/HAnimJoint.js +4 -0
  214. package/src/x_ite/Components/HAnim/HAnimMotion.js +4 -0
  215. package/src/x_ite/Components/HAnim/HAnimSegment.js +4 -0
  216. package/src/x_ite/Components/HAnim/HAnimSite.js +4 -0
  217. package/src/x_ite/Components/Interpolation/ColorInterpolator.js +4 -0
  218. package/src/x_ite/Components/Interpolation/CoordinateInterpolator.js +4 -0
  219. package/src/x_ite/Components/Interpolation/CoordinateInterpolator2D.js +4 -0
  220. package/src/x_ite/Components/Interpolation/EaseInEaseOut.js +4 -0
  221. package/src/x_ite/Components/Interpolation/NormalInterpolator.js +4 -0
  222. package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +4 -0
  223. package/src/x_ite/Components/Interpolation/PositionInterpolator.js +4 -0
  224. package/src/x_ite/Components/Interpolation/PositionInterpolator2D.js +4 -0
  225. package/src/x_ite/Components/Interpolation/ScalarInterpolator.js +4 -0
  226. package/src/x_ite/Components/Interpolation/SplinePositionInterpolator.js +4 -0
  227. package/src/x_ite/Components/Interpolation/SplinePositionInterpolator2D.js +4 -0
  228. package/src/x_ite/Components/Interpolation/SplineScalarInterpolator.js +4 -0
  229. package/src/x_ite/Components/Interpolation/SquadOrientationInterpolator.js +4 -0
  230. package/src/x_ite/Components/KeyDeviceSensor/KeySensor.js +4 -0
  231. package/src/x_ite/Components/KeyDeviceSensor/StringSensor.js +4 -0
  232. package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +2 -2
  233. package/src/x_ite/Components/Layering/Layer.js +4 -0
  234. package/src/x_ite/Components/Layering/LayerSet.js +4 -0
  235. package/src/x_ite/Components/Layering/Viewport.js +4 -0
  236. package/src/x_ite/Components/Layering/X3DLayerNode.js +40 -49
  237. package/src/x_ite/Components/Layout/Layout.js +4 -0
  238. package/src/x_ite/Components/Layout/LayoutGroup.js +4 -0
  239. package/src/x_ite/Components/Layout/LayoutLayer.js +4 -0
  240. package/src/x_ite/Components/Layout/ScreenFontStyle.js +4 -0
  241. package/src/x_ite/Components/Layout/ScreenGroup.js +4 -0
  242. package/src/x_ite/Components/Lighting/DirectionalLight.js +4 -0
  243. package/src/x_ite/Components/Lighting/EnvironmentLight.js +4 -0
  244. package/src/x_ite/Components/Lighting/PointLight.js +4 -0
  245. package/src/x_ite/Components/Lighting/SpotLight.js +7 -9
  246. package/src/x_ite/Components/NURBS/Contour2D.js +4 -0
  247. package/src/x_ite/Components/NURBS/ContourPolyline2D.js +4 -0
  248. package/src/x_ite/Components/NURBS/CoordinateDouble.js +4 -0
  249. package/src/x_ite/Components/NURBS/NurbsCurve.js +4 -0
  250. package/src/x_ite/Components/NURBS/NurbsCurve2D.js +4 -0
  251. package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +4 -0
  252. package/src/x_ite/Components/NURBS/NurbsPatchSurface.js +4 -0
  253. package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +4 -0
  254. package/src/x_ite/Components/NURBS/NurbsSet.js +4 -0
  255. package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +4 -0
  256. package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +4 -0
  257. package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +4 -0
  258. package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +4 -0
  259. package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +4 -0
  260. package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +4 -4
  261. package/src/x_ite/Components/Navigation/Billboard.js +4 -0
  262. package/src/x_ite/Components/Navigation/Collision.js +8 -4
  263. package/src/x_ite/Components/Navigation/LOD.js +11 -7
  264. package/src/x_ite/Components/Navigation/NavigationInfo.js +4 -0
  265. package/src/x_ite/Components/Navigation/OrthoViewpoint.js +4 -0
  266. package/src/x_ite/Components/Navigation/Viewpoint.js +4 -0
  267. package/src/x_ite/Components/Navigation/ViewpointGroup.js +4 -0
  268. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +8 -0
  269. package/src/x_ite/Components/Networking/Anchor.js +4 -0
  270. package/src/x_ite/Components/Networking/Inline.js +6 -2
  271. package/src/x_ite/Components/Networking/LoadSensor.js +42 -29
  272. package/src/x_ite/Components/Networking/X3DUrlObject.js +2 -2
  273. package/src/x_ite/Components/ParticleSystems/BoundedPhysicsModel.js +4 -0
  274. package/src/x_ite/Components/ParticleSystems/ConeEmitter.js +4 -0
  275. package/src/x_ite/Components/ParticleSystems/ExplosionEmitter.js +4 -0
  276. package/src/x_ite/Components/ParticleSystems/ForcePhysicsModel.js +4 -0
  277. package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +12 -8
  278. package/src/x_ite/Components/ParticleSystems/PointEmitter.js +4 -0
  279. package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +4 -0
  280. package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +4 -0
  281. package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +4 -0
  282. package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +4 -0
  283. package/src/x_ite/Components/Picking/LinePickSensor.js +4 -0
  284. package/src/x_ite/Components/Picking/PickableGroup.js +4 -0
  285. package/src/x_ite/Components/Picking/PointPickSensor.js +4 -0
  286. package/src/x_ite/Components/Picking/PrimitivePickSensor.js +4 -0
  287. package/src/x_ite/Components/Picking/VolumePickSensor.js +4 -0
  288. package/src/x_ite/Components/Picking/X3DPickSensorNode.js +4 -4
  289. package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +4 -0
  290. package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +4 -0
  291. package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +4 -0
  292. package/src/x_ite/Components/PointingDeviceSensor/TouchSensor.js +4 -0
  293. package/src/x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode.js +28 -19
  294. package/src/x_ite/Components/Rendering/ClipPlane.js +4 -0
  295. package/src/x_ite/Components/Rendering/Color.js +4 -0
  296. package/src/x_ite/Components/Rendering/ColorRGBA.js +4 -0
  297. package/src/x_ite/Components/Rendering/Coordinate.js +4 -0
  298. package/src/x_ite/Components/Rendering/IndexedLineSet.js +15 -11
  299. package/src/x_ite/Components/Rendering/IndexedTriangleFanSet.js +4 -0
  300. package/src/x_ite/Components/Rendering/IndexedTriangleSet.js +4 -0
  301. package/src/x_ite/Components/Rendering/IndexedTriangleStripSet.js +4 -0
  302. package/src/x_ite/Components/Rendering/LineSet.js +16 -12
  303. package/src/x_ite/Components/Rendering/Normal.js +4 -0
  304. package/src/x_ite/Components/Rendering/PointSet.js +15 -11
  305. package/src/x_ite/Components/Rendering/TriangleFanSet.js +4 -0
  306. package/src/x_ite/Components/Rendering/TriangleSet.js +4 -0
  307. package/src/x_ite/Components/Rendering/TriangleStripSet.js +4 -0
  308. package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +14 -14
  309. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +6 -6
  310. package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +6 -6
  311. package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +4 -4
  312. package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +4 -0
  313. package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +11 -7
  314. package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +11 -7
  315. package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +4 -0
  316. package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +7 -3
  317. package/src/x_ite/Components/RigidBodyPhysics/CollisionSpace.js +4 -0
  318. package/src/x_ite/Components/RigidBodyPhysics/Contact.js +4 -0
  319. package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +4 -0
  320. package/src/x_ite/Components/RigidBodyPhysics/MotorJoint.js +4 -0
  321. package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +4 -0
  322. package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +6 -2
  323. package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +4 -0
  324. package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +4 -0
  325. package/src/x_ite/Components/RigidBodyPhysics/UniversalJoint.js +4 -0
  326. package/src/x_ite/Components/Scripting/Script.js +7 -3
  327. package/src/x_ite/Components/Shaders/ComposedShader.js +11 -9
  328. package/src/x_ite/Components/Shaders/FloatVertexAttribute.js +4 -0
  329. package/src/x_ite/Components/Shaders/Matrix3VertexAttribute.js +4 -0
  330. package/src/x_ite/Components/Shaders/Matrix4VertexAttribute.js +4 -0
  331. package/src/x_ite/Components/Shaders/PackagedShader.js +4 -0
  332. package/src/x_ite/Components/Shaders/ProgramShader.js +4 -0
  333. package/src/x_ite/Components/Shaders/ShaderPart.js +4 -2
  334. package/src/x_ite/Components/Shaders/ShaderProgram.js +4 -0
  335. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +3 -3
  336. package/src/x_ite/Components/Shape/AcousticProperties.js +4 -0
  337. package/src/x_ite/Components/Shape/Appearance.js +8 -4
  338. package/src/x_ite/Components/Shape/FillProperties.js +4 -0
  339. package/src/x_ite/Components/Shape/LineProperties.js +4 -0
  340. package/src/x_ite/Components/Shape/Material.js +5 -2
  341. package/src/x_ite/Components/Shape/PhysicalMaterial.js +5 -2
  342. package/src/x_ite/Components/Shape/PointProperties.js +4 -0
  343. package/src/x_ite/Components/Shape/Shape.js +4 -0
  344. package/src/x_ite/Components/Shape/TwoSidedMaterial.js +4 -0
  345. package/src/x_ite/Components/Shape/UnlitMaterial.js +5 -2
  346. package/src/x_ite/Components/Shape/X3DMaterialNode.js +1 -1
  347. package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +5 -7
  348. package/src/x_ite/Components/Shape/X3DShapeNode.js +1 -1
  349. package/src/x_ite/Components/Sound/Analyser.js +4 -0
  350. package/src/x_ite/Components/Sound/AudioClip.js +6 -2
  351. package/src/x_ite/Components/Sound/AudioDestination.js +4 -0
  352. package/src/x_ite/Components/Sound/BiquadFilter.js +4 -0
  353. package/src/x_ite/Components/Sound/BufferAudioSource.js +4 -0
  354. package/src/x_ite/Components/Sound/ChannelMerger.js +4 -0
  355. package/src/x_ite/Components/Sound/ChannelSelector.js +4 -0
  356. package/src/x_ite/Components/Sound/ChannelSplitter.js +4 -0
  357. package/src/x_ite/Components/Sound/Convolver.js +4 -0
  358. package/src/x_ite/Components/Sound/Delay.js +4 -0
  359. package/src/x_ite/Components/Sound/DynamicsCompressor.js +4 -0
  360. package/src/x_ite/Components/Sound/Gain.js +4 -0
  361. package/src/x_ite/Components/Sound/ListenerPointSource.js +4 -0
  362. package/src/x_ite/Components/Sound/MicrophoneSource.js +4 -0
  363. package/src/x_ite/Components/Sound/OscillatorSource.js +4 -0
  364. package/src/x_ite/Components/Sound/PeriodicWave.js +4 -0
  365. package/src/x_ite/Components/Sound/Sound.js +6 -2
  366. package/src/x_ite/Components/Sound/SpatialSound.js +4 -0
  367. package/src/x_ite/Components/Sound/StreamAudioDestination.js +4 -0
  368. package/src/x_ite/Components/Sound/StreamAudioSource.js +4 -0
  369. package/src/x_ite/Components/Sound/WaveShaper.js +4 -0
  370. package/src/x_ite/Components/Text/FontStyle.js +4 -0
  371. package/src/x_ite/Components/Text/Text.js +5 -1
  372. package/src/x_ite/Components/TextureProjector/TextureProjector.js +4 -0
  373. package/src/x_ite/Components/TextureProjector/TextureProjectorParallel.js +4 -0
  374. package/src/x_ite/Components/Texturing/ImageTexture.js +13 -13
  375. package/src/x_ite/Components/Texturing/MovieTexture.js +10 -7
  376. package/src/x_ite/Components/Texturing/MultiTexture.js +4 -0
  377. package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +4 -0
  378. package/src/x_ite/Components/Texturing/MultiTextureTransform.js +4 -0
  379. package/src/x_ite/Components/Texturing/PixelTexture.js +4 -0
  380. package/src/x_ite/Components/Texturing/TextureCoordinate.js +4 -0
  381. package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +4 -0
  382. package/src/x_ite/Components/Texturing/TextureProperties.js +4 -0
  383. package/src/x_ite/Components/Texturing/TextureTransform.js +4 -0
  384. package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +4 -0
  385. package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +4 -0
  386. package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +6 -2
  387. package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +4 -0
  388. package/src/x_ite/Components/Texturing3D/TextureCoordinate3D.js +4 -0
  389. package/src/x_ite/Components/Texturing3D/TextureCoordinate4D.js +4 -0
  390. package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +4 -0
  391. package/src/x_ite/Components/Texturing3D/TextureTransformMatrix3D.js +4 -0
  392. package/src/x_ite/Components/Time/TimeSensor.js +5 -1
  393. package/src/x_ite/Components/Time/X3DTimeDependentNode.js +6 -6
  394. package/src/x_ite/Components/VolumeRendering/BlendedVolumeStyle.js +4 -0
  395. package/src/x_ite/Components/VolumeRendering/BoundaryEnhancementVolumeStyle.js +4 -0
  396. package/src/x_ite/Components/VolumeRendering/CartoonVolumeStyle.js +4 -0
  397. package/src/x_ite/Components/VolumeRendering/ComposedVolumeStyle.js +4 -0
  398. package/src/x_ite/Components/VolumeRendering/EdgeEnhancementVolumeStyle.js +4 -0
  399. package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +4 -0
  400. package/src/x_ite/Components/VolumeRendering/OpacityMapVolumeStyle.js +4 -0
  401. package/src/x_ite/Components/VolumeRendering/ProjectionVolumeStyle.js +4 -0
  402. package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +4 -0
  403. package/src/x_ite/Components/VolumeRendering/ShadedVolumeStyle.js +4 -0
  404. package/src/x_ite/Components/VolumeRendering/SilhouetteEnhancementVolumeStyle.js +4 -0
  405. package/src/x_ite/Components/VolumeRendering/ToneMappedVolumeStyle.js +4 -0
  406. package/src/x_ite/Components/VolumeRendering/VolumeData.js +4 -0
  407. package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +8 -8
  408. package/src/x_ite/Components/X_ITE/BlendMode.js +4 -0
  409. package/src/x_ite/Execution/BindableList.js +16 -19
  410. package/src/x_ite/Execution/X3DExecutionContext.js +33 -11
  411. package/src/x_ite/Execution/X3DScene.js +4 -0
  412. package/src/x_ite/Fields/ArrayFields.js +42 -22
  413. package/src/x_ite/Fields/SFNode.js +3 -6
  414. package/src/x_ite/Fields/SFNodeCache.js +34 -19
  415. package/src/x_ite/InputOutput/FileLoader.js +22 -14
  416. package/src/x_ite/Parser/GLTF2Parser.js +72 -51
  417. package/src/x_ite/Parser/VRMLParser.js +66 -34
  418. package/src/x_ite/Parser/X3DParser.js +9 -36
  419. package/src/x_ite/Parser/XMLParser.js +8 -8
  420. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +2 -2
  421. package/src/x_ite/Prototype/X3DProtoDeclaration.js +1 -2
  422. package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +1 -1
  423. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
@@ -1 +1 @@
1
- /* X_ITE v8.6.12 */(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Components");var n=t.n(e);const i=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Fields");var o=t.n(i);const s=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Base/X3DFieldDefinition");var r=t.n(s);const u=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Base/FieldDefinitionArray");var l=t.n(u);const a=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Components/Core/X3DNode");var h=t.n(a);const d=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Base/X3DConstants");var c=t.n(d);const g=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Base/X3DCast");var f=t.n(g);const p=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Namespace");var _=t.n(p);function m(t){h().call(this,t),this.addType(c().Contour2D),this.childNodes=[]}function w(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}m.prototype=Object.assign(Object.create(h().prototype),{constructor:m,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().inputOnly,"addChildren",new(o().MFNode)),new(r())(c().inputOnly,"removeChildren",new(o().MFNode)),new(r())(c().inputOutput,"children",new(o().MFNode))]),getTypeName:function(){return"Contour2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"trimmingContour"},initialize:function(){h().prototype.initialize.call(this),this._addChildren.addInterest("set_addChildren__",this),this._removeChildren.addInterest("set_removeChildren__",this),this._children.addInterest("set_children__",this),this.set_children__()},set_addChildren__:function(){this._addChildren.setTainted(!0),this._addChildren.erase(w(this._addChildren,0,this._addChildren.length,this._children,0,this._children.length),this._addChildren.length);for(const t of this._addChildren)this._children.push(t);this._addChildren.length=0,this._addChildren.setTainted(!1)},set_removeChildren__:function(){this._removeChildren.setTainted(!0),this._children.erase(w(this._children,0,this._children.length,this._removeChildren,0,this._removeChildren.length),this._children.length),this._removeChildren.length=0,this._removeChildren.setTainted(!1)},set_children__:function(){const t=this.childNodes;t.length=0;for(const e of this._children){const n=f()(c().NurbsCurve2D,e);if(n)t.push(n);else{const n=f()(c().ContourPolyline2D,e);if(n){t.push(n);continue}}}},addTrimmingContour:function(t){for(const e of this.childNodes)t.push(e.tessellate(2))}});const y=m;_().set("x_ite/Components/NURBS/Contour2D",y);const v=y;function b(t){h().call(this,t),this.addType(c().X3DNurbsControlCurveNode)}b.prototype=Object.assign(Object.create(h().prototype),{constructor:b});const C=b;_().set("x_ite/Components/NURBS/X3DNurbsControlCurveNode",C);const N=C,S=window[Symbol.for("X_ITE.X3D-8.6.12")].require("standard/Math/Numbers/Vector3");var O=t.n(S);function D(t){N.call(this,t),this.addType(c().ContourPolyline2D),this.controlPoints=[]}D.prototype=Object.assign(Object.create(N.prototype),{constructor:D,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().inputOutput,"controlPoint",new(o().MFVec2d))]),getTypeName:function(){return"ContourPolyline2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},tessellate:function(t){switch(t){case 0:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i;e[n+0]=t[n+0],e[n+1]=t[n+1]}return e.length=2*n,e}case 1:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i,o=3*i;e[o+0]=t[n+0],e[o+1]=0,e[o+2]=t[n+1]}return e.length=3*n,e}case 3:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i;e[i]=new(O())(t[n+0],t[n+1],0)}return e.length=n,e}}}});const P=D;_().set("x_ite/Components/NURBS/ContourPolyline2D",P);const T=P,F=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Components/Rendering/X3DCoordinateNode");var I=t.n(F);function V(t){I().call(this,t),this.addType(c().CoordinateDouble)}V.prototype=Object.assign(Object.create(I().prototype),{constructor:V,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().inputOutput,"point",new(o().MFVec3d))]),getTypeName:function(){return"CoordinateDouble"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"coord"}});const x=V;_().set("x_ite/Components/NURBS/CoordinateDouble",x);const R=x,z=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Components/Rendering/X3DGeometryNode");var j=t.n(z);const k=window[Symbol.for("X_ITE.X3D-8.6.12")].require("standard/Math/Numbers/Vector2");var A=t.n(k);const B=window[Symbol.for("X_ITE.X3D-8.6.12")].require("standard/Math/Numbers/Vector4");var X=t.n(B);const E={getTessellation:function(t,e){return t>0?t+1:t<0?-t*e+1:2*e+1},getClosed2D:function(t,e,n,i){const o=i.length;return(!(n.length===o)||n[0]===n[o-1])&&(!!i[0].equals(i[o-1])&&!!this.isPeriodic(t,o,e))},getClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s){const r=s.getSize();return(!(o.length===r)||o[0]===o[r-1])&&(!!s.get1Point(0,t).equals(s.get1Point(r-1,e))&&!!this.isPeriodic(n,r,i))}}(),getUClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s,r,u){const l=r.length===u.getSize();for(let n=0,s=o;n<s;++n){const o=n*i,s=n*i+i-1;if(l&&r[o]!==r[s])return!1;if(!u.get1Point(o,t).equals(u.get1Point(s,e)))return!1}return!!this.isPeriodic(n,i,s)}}(),getVClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s,r,u){const l=r.length===u.getSize();for(let n=0,s=i;n<s;++n){const s=n,a=(o-1)*i+n;if(l&&r[s]!==r[a])return!1;if(!u.get1Point(s,t).equals(u.get1Point(a,e)))return!1}return!!this.isPeriodic(n,o,s)}}(),isPeriodic:function(t,e,n){if(n.length===e+t){{let e=1;for(let i=1,o=t;i<o;++i)e+=n[i]===n[0];if(e===t)return!1}{let e=1;for(let i=n.length-t,o=n.length-1;i<o;++i)e+=n[i]===n[o];if(e===t)return!1}}return!0},getKnots:function(t,e,n,i,o){const s=t||[];for(let t=0,e=o.length;t<e;++t)s[t]=o[t];s.length=o.length;let r=!0;if(s.length===i+n){r=!1;let t=0;for(let e=1,i=s.length;e<i;++e)s[e]==s[e-1]?++t:t=0,t>n-1&&(r=!0),s[e-1]>s[e]&&(r=!0)}if(r)for(let t=0,e=i+n;t<e;++t)s[t]=t/(e-1);if(e)for(let t=1,e=n-1;t<e;++t)s.push(s.at(-1)+(s[t]-s[t-1]));return s},getWeights:function(t,e,n){if(n.length!==e)return;const i=t||[];for(let t=0;t<e;++t)i[t]=n[t];return i.length=e,i},getUVWeights:function(t,e,n,i){const o=e*n;if(i.length!==o)return;const s=t||[];for(let t=0,o=0;t<e;++t)for(let t=0;t<n;++t,++o)s[o]=i[o];return s.length=o,s},getControlPoints2D:function(t,e,n,i,o){const s=t||[],r=o.getValue(),u=o.length,l=Boolean(i),a=l?O():A();s.haveWeights!==l&&(s.haveWeights=l,s.length=0);for(let t=0;t<u;++t){const e=2*t,n=s[t]||new a(0,0,0);s[t]=n.set(r[e+0],r[e+1],l?i[t]:0)}if(s.length=u,e)for(let t=1,e=n-1;t<e;++t)s.push(s[t]);return s},getControlPoints:function(t,e,n,i,o){const s=t||[],r=o.getSize(),u=Boolean(i),l=u?X():O();s.haveWeights!==u&&(s.haveWeights=u,s.length=0);for(let t=0;t<r;++t){const e=s[t]=o.get1Point(t,s[t]||new l(0,0,0,0));u&&(e.w=i[t])}if(s.length=r,e)for(let t=1,e=n-1;t<e;++t)s.push(s[t]);return s},getUVControlPoints:function(t,e,n,i,o,s,r,u,l){const a=t||[],h=Boolean(u),d=h?X():O();a.haveWeights!==h&&(a.haveWeights=h,a.length=0);for(let t=0;t<s;++t){let e=a[t];e||(e=a[t]=[]);for(let n=0;n<r;++n){const i=n*s+t;e[n]=l.get1Point(i,e[n]||new d(0,0,0,0)),h&&(e[n].w=u[i])}if(e.length=r,n)for(let t=1,n=o-1;t<n;++t)e.push(e[t])}if(a.length=s,e)for(let t=1,e=i-1;t<e;++t)a.push(a[t]);return a},getTexControlPoints:function(t,e,n,i,o,s,r,u){const l=t||[];for(let t=0;t<s;++t){let e=l[t];e||(e=l[t]=[]);for(let n=0;n<r;++n){const i=n*s+t;e[n]=u.get1Point(i,e[n]||new(X())(0,0,0,0))}if(e.length=r,n)for(let t=1,n=o-1;t<n;++t)e.push(e[t])}if(l.length=s,e)for(let t=1,e=i-1;t<e;++t)l.push(l[t]);return l}};_().set("x_ite/Browser/NURBS/NURBS",E);const q=E;function K(t){j().call(this,t),this.addType(c().X3DParametricGeometryNode)}K.prototype=Object.assign(Object.create(j().prototype),{constructor:K,getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)}});const M=K;_().set("x_ite/Components/NURBS/X3DParametricGeometryNode",M);const U=M,G=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Components/Rendering/X3DLineGeometryNode");var W=t.n(G);const Y=function(t){return!!t&&(!!t.dtype&&new RegExp("function View[0-9]+d(:?"+t.dtype+")+").test(String(t.constructor)))};_().set("lib/nurbs/src/utils/is-ndarray",Y);const J=Y,L=function(t){return!!t&&(void 0!==t.data&&Array.isArray(t.shape)&&void 0!==t.offset&&void 0!==t.stride)};_().set("lib/nurbs/src/utils/is-ndarray-like",L);const Z=L,H=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)||void 0!==t.length};_().set("lib/nurbs/src/utils/is-array-like",H);const Q=H;function $(t){if(t){if(J(t)||Z(t))return"generic"===t.dtype?$.GENERIC_NDARRAY:$.NDARRAY;if(Q(t)){for(var e=t;Q(e[0]);e=e[0]);return"x"in e?$.ARRAY_OF_OBJECTS:$.ARRAY_OF_ARRAYS}throw new Error("Unhandled data type. Got type: "+typeof t)}}$.ARRAY_OF_OBJECTS="Obj",$.ARRAY_OF_ARRAYS="Arr",$.NDARRAY="Nd",$.GENERIC_NDARRAY="GenNd",$.PACKED="PackArr";const tt=$;_().set("lib/nurbs/src/utils/infer-type",tt);const et=tt;const nt=function(t,e,n,i,o,s){var r,u,l=[],a=!1;for(r=0;r<t.splineDimension;r++){var h=Q(t.knots)&&Q(t.knots[r]);h&&(a=!0),l.push("Deg"+t.degree[r]+(h?"":"Uniform")+((u=t.boundary[r])[0].toUpperCase()+u.slice(1)))}var d=[[a?"NU":"",t.weights?"RBS":"BS"].join("")+t.dimension+"D",l.join("_")];return i&&d.push(i+"Pts"),o&&d.push(o+"Wts"),s&&d.push(s+"Kts"),e&&d.push("debug"),n&&d.push("chk"),d.join("_")};_().set("lib/nurbs/src/utils/cache-key",nt);const it=nt;var ot=function t(e,n){return function(n,i){void 0===n||Array.isArray(n)||(n=[n]);for(var o=[],s=0;s<n.length;s++)o.push(t.sum(n[s]));if(i)for(n=0;n<o.length;n++)void 0!==i[n]&&(o[n]="("+o[n]+" + "+i[n]+") % "+i[n]);return e+o.join("_")}};ot.sum=function(t){return 0===(t=(t=Array.isArray(t)?t:[t]).filter((function(t){return void 0!==t&&0!==t}))).length&&t.push(0),t.join(" + ")};const st=ot;_().set("lib/nurbs/src/utils/variable",st);const rt=st;var ut=[".x",".y",".z",".w"];function lt(t){return function(e,n){void 0===e||Array.isArray(e)||(e=[e]);for(var i=[],o=0;o<e.length;o++)i.push(rt.sum(e[o]));if(n)for(e=0;e<i.length;e++)void 0!==n[e]&&(i[e]="("+i[e]+" + "+n[e]+") % "+n[e]);return t(i)}}function at(t,e){if(e)switch(et(e)){case et.ARRAY_OF_OBJECTS:return lt((function(e){var n=e.pop();return t+"["+e.join("][")+"]"+ut[n]}));case et.ARRAY_OF_ARRAYS:return lt((function(e){return t+"["+e.join("][")+"]"}));case et.GENERIC_NDARRAY:return lt((function(e){return t+".get("+e.join(",")+")"}));case et.NDARRAY:return lt((function(e){for(var n=[t+"Offset"],i=0;i<e.length;i++)n.push(t+"Stride"+i+" * ("+e[i]+")");return t+"["+n.join(" + ")+"]"}));case et.PACKED:default:return}}const ht=function(t){var e,n={};return(e=at("x",t.points))&&(n.point=e),(e=at("w",t.weights))&&(n.weight=e),(e=at("k",t.knots))&&(n.knot=e),n};_().set("lib/nurbs/src/utils/create-accessors",ht);const dt=ht;var ct=[],gt=[];const ft=function(t,e,n){if(1!==e)throw new Error("Numerical derivative not implemented for order n = "+e+".");var i,o=void 0===arguments[this.splineDimension+3]?1e-4:arguments[this.splineDimension+3];for(ct.length=this.splineDimension,i=0;i<this.splineDimension;i++)ct[i+1]=arguments[i+3];var s,r,u,l=this.domain,a=l[n][0],h=l[n][1],d=ct[n+1],c=(h-a)*o;for("closed"===this.boundary[n]?(s=a+(d-a-c+(u=h-a))%u,r=a+(d-a+c+u)%u,c*=2):(s=Math.min(h,Math.max(a,d-c)),c=(r=Math.min(h,Math.max(a,d+c)))-s),ct[n+1]=s,ct[0]=gt,this.evaluate.apply(null,ct),ct[n+1]=r,ct[0]=t,this.evaluate.apply(null,ct),i=0;i<this.dimension;i++)t[i]=(t[i]-gt[i])/c;return t};_().set("lib/nurbs/src/numerical-derivative",ft);const pt=ft,_t=function(t,e){for(var n=1,i=0,o=[];i<t.length;i++)n*=Array.isArray(t[i])?t[i][1]-t[i][0]:t[i],o[i]=Array.isArray(t[i])?t[i][0]:0;for(var s=0;s<n;s++)for(e(o.slice()),i=t.length-1;i>=0;i--){if(o[i]!==(Array.isArray(t[i])?t[i][1]:t[i])-1){o[i]++;break}o[i]=Array.isArray(t[i])?t[i][0]:0}};_().set("lib/nurbs/src/utils/ndloop",_t);const mt=_t,wt=function(t,e,n,i){var o=[];switch(et(i)){case et.NDARRAY:o.push(" var "+e+" = "+n+".data;"),o.push(" var "+e+"Offset = "+n+".offset;");for(var s=0;s<i.dimension;s++)o.push(" var "+e+"Stride"+s+" = "+n+".stride["+s+"];");break;case et.ARRAY_OF_OBJECTS:case et.ARRAY_OF_ARRAYS:o.push(" var "+e+" = "+n+";")}return o.join("\n")};_().set("lib/nurbs/src/utils/accessor-preamble",wt);const yt=wt,vt=function(t,e,n){if(t){if(Z(t))return e+".shape["+n+"]";for(var i=e,o=0;o<n;o++)i+="[0]";return i+".length"}return"this.size["+n+"]"};_().set("lib/nurbs/src/utils/size-getter",vt);const bt=vt;var Ct={},Nt={};const St=function(t,e,n,i,o,s,r){var u,l,a,h,d,c,g=e.splineDimension,f=e.points,p=e.degree,_=e.weights,m=void 0!==_,w=e.knots,y=e.dimension,v=e.boundary;if(null!=r){Array.isArray(r)||(r=[r]);var b=0;for(u=0;u<g;u++)void 0===r[u]&&(r[u]=0),b+=r[u];if(m&&b>1)throw new Error("Analytical derivative not implemented for rational b-splines with order n = "+b+".")}s&&(t="Basis"+t),r&&(t="Der"+r.join("_")+"_"+t);var C=Ct[t];if(i)var N="function"==typeof i?i:console.log;if(C)return i&&N(Nt[t]),C.bind(e);var S=[],O="evaluate"+t,D=n.point;s&&(D=function(t,e){for(var n=[],i=0;i<t.length;i++){for(var o=t[i],s=[],r=0;r<o.length;r++)0!==o[r]&&s.push(o[r]);o=s.join(" + "),e[i]&&(o="("+o+" + "+e[i]+") % "+e[i]),n.push(o+" === "+x(i))}return"(("+n.join(" && ")+") ? 1 : 0)"});var P=n.weight,T=n.knot,F=rt("k"),I=rt("x"),V=rt("w"),x=rt("i"),R=rt("t"),z=i?"domain":"d",j=rt(i?"size":"s"),k=rt(i?"knotIndex":"j"),A=!0;for(d=0;d<g;d++)Q(w)&&Q(w[d])&&(A=!1);function B(t){S.push(" "+(t||""))}function X(t){i&&B(t)}if(s)var E=[];var q=[];for(u=0;u<g;u++)s&&E.push(x([u])),q.push(R([u]));for(S.push("function "+O+" ("+(s?"":"out, ")+q.join(", ")+(s?", "+E.join(", "):"")+") {"),B("var h, m, a, b;"),o&&(B("var "+z+" = this.domain;"),B("for (var i = 0; i < this.splineDimension; i++) {"),B(" a = arguments[i + 1];"),B(" if (a < "+z+"[i][0] || a > "+z+"[i][1] || a === undefined || isNaN(a)) {"),B(' throw new Error("Invalid Spline parameter in dimension "+i+". Valid domain is ["+'+z+'[i][0]+", "+'+z+'[i][1]+"]. but got t"+i+" = "+arguments[i + 1]+".");'),B(" }"),B("}")),d=0;d<g;d++)B("var "+j(d)+" = "+bt(f,"this.points",d)+";");function K(t,e,n){return"("+t+") ? ("+e+") : ("+n+")"}S.push(yt(e,"x","this.points",f)),m&&S.push(yt(e,"w","this.weights",_)),A||S.push(yt(e,"k","this.knots",w));var M=[];for(d=0;d<g;d++)switch(et(w)){case et.NDARRAY:M[d]=!0;break;case et.ARRAY_OF_ARRAYS:M[d]=Q(w[d])}for(d=0;d<g;d++)if(M[d])for(X("\n // Bisect to locate the knot interval in dimension "+d+"\n"),B("var "+k(d)+" = 0;"),B("h = "+j(d)+";"),B("while(h > "+k(d)+" + 1) {"),B(" m = 0.5 * (h + "+k(d)+") | 0;"),B(" if ("+T([d,"m"])+" > "+R(d)+") h = m;"),B(" else "+k(d)+" = m;"),B("}"),X("\n // Fetch knots for dimension "+d+"\n"),u=1-p[d];u<=p[d];u++)"closed"===v[d]?B(u<0?"var "+F([d,u+p[d]-1])+" = "+K(k(d)+" < "+-u,T([d,0])+" + "+T([d,[j(d),k(d),u]])+" - "+T([d,[j(d)]]),T([d,[k(d),u]]))+";":u>0?"var "+F([d,u+p[d]-1])+" = "+K(k(d)+" + "+u+" > "+j(d),T([d,j(d)])+" + "+T([d,u+" + "+k(d)+" - "+j(d)])+" - "+T([d,0]),T([d,[k(d),u]]))+";":"var "+F([d,u+p[d]-1])+" = "+T([d,[k(d),u]])+";"):B("var "+F([d,u+p[d]-1])+" = "+T([d,[k(d),u]])+";");else{for(X("\n // Directly compute knot interval for dimension "+d+"\n"),"closed"===v[d]?B(k(d)+" = ("+R(d)+" | 0) % "+j(d)+";"):(B(k(d)+" = ("+R(d)+" | 0);"),B("if ("+k(d)+" < "+p[d]+") "+k(d)+" = "+p[d]+";"),B("if ("+k(d)+" > "+j(d)+" - 1) "+k(d)+" = "+j(d)+" - 1;")),X("\n // Compute and clamp knots for dimension "+d+"\n"),u=1-p[d];u<=p[d];u++)B("var "+(c=F([d,u+p[d]-1]))+" = "+k(d)+" + "+u+";");if("clamped"===v[d])for(u=1-p[d];u<=p[d];u++)c=F([d,u+p[d]-1]),u<0&&B("if ("+c+" < "+p[d]+") "+c+" = "+p[d]+";"),u>0&&B("if ("+c+" > "+j(d)+") "+c+" = "+j(d)+";");"closed"===v[d]&&(X("\n // Wrap the B-Spline parameter for closed boundary"),B(R(d)+" %= "+j(d)+";"))}for(d=0,a=[];d<g;d++)a[d]=p[d]+1;for(m&&(X("\n // Fetch weights\n"),mt(a,(function(t){for(var e=[],n=[],i=0;i<g;i++)e[i]=[k(i),t[i]-p[i]],"closed"===v[i]&&t[i]-p[i]<0&&(n[i]=j(i));B("var "+V(t)+" = "+P(e,n)+";")}))),i&&B(m?"\n // Fetch points and project into homogeneous (weighted) coordinates\n":"\n // Fetch points\n"),mt(a,(function(t){for(var e=[],n=[],i=0;i<g;i++)e[i]=[k(i),t[i]-p[i]],"closed"===v[i]&&t[i]-p[i]<0&&(n[i]=j(i));if(s)B(m?"var "+I(t)+" = "+D(e,n)+" * "+V(t)+";":"var "+I(t)+" = "+D(e,n)+";");else for(i=0;i<y;i++){var o=t.concat(i);e[g]=i,B(m?"var "+I(o)+" = "+D(e,n)+" * "+V(t)+";":"var "+I(o)+" = "+D(e,n)+";")}})),X("\n"),X('// Perform De Boor"s algorithm'),d=a.length-1;d>=0;d--)for(a[d]=[p[d],p[d]+1],u=0;u<p[d];u++)for(X("\n // Degree "+p[d]+" evaluation in dimension "+d+", step "+(u+1)+"\n"),l=p[d];l>u;l--){var U=r&&p[d]-u-r[d]<=0;U?(B("m = 1 / ("+F([d,l-u+p[d]-1])+" - "+F([d,l-1])+");"),m&&(B("a = ("+R(d)+" - "+F([d,l-1])+") * m;"),B("b = 1 - a;"))):(B("a = ("+R(d)+" - "+F([d,l-1])+") / ("+F([d,l-u+p[d]-1])+" - "+F([d,l-1])+");"),B("b = 1 - a;")),m&&mt(a,(function(t){var e=t.slice(),n=t.slice();e[d]=l,n[d]=l-1,U&&m&&B("h = "+V(e)+";"),B(V(e)+" = b * "+V(n)+" + a * "+V(e)+";")})),mt(a,(function(t){var e,n,i,o=t.slice(),r=t.slice();if(o[d]=l,r[d]=l-1,U){var a=u+1;if(s)e=m?"h * "+V(r)+" / "+V(o)+" * ":"",n=I(o)+(m?" / h":""),i=I(r)+(m?" / "+V(r):""),B(I(o)+" = "+a+" * "+e+"("+n+" - "+i+") * m;");else{var c=o.slice(),f=r.slice();for(h=0;h<y;h++)c[g]=f[g]=h,e=m?"h * "+V(r)+" / "+V(o)+" * ":"",n=I(c)+(m?" / h":""),i=I(f)+(m?" / "+V(r):""),B(I(c)+" = "+a+" * "+e+"("+n+" - "+i+") * m;")}}else if(s)B(I(o)+" = b * "+I(r)+" + a * "+I(o)+";");else for(h=0;h<y;h++)o[g]=r[g]=h,B(I(o)+" = b * "+I(r)+" + a * "+I(o)+";")})),X("\n")}if(i&&B(m?"\n // Project back from homogeneous coordinates and return final output\n":"\n // Return final output\n"),s)B(m?"return "+I(p)+" / "+V(p)+";":"return "+I(p)+";");else for(d=0;d<y;d++)B(m?"out["+d+"] = "+I(p.concat([d]))+" / "+V(p)+";":"out["+d+"] = "+I(p.concat([d]))+";");if(s||B("return out;"),S.push("}"),i){var G=S.join("\n");N(G),Nt[t]=G}var W=new Function([S.join("\n"),"; return ",O].join(""))();return Ct[t]=W,W.bind(e)};_().set("lib/nurbs/src/evaluate",St);const Ot=St;var Dt={};const Pt=function(t,e,n,i){var o,s,r,u,l,a,h,d,c=Dt[t];if(c)return c.bind(e);var g=[],f="transform"+t;g.push("function "+f+"(m) {"),g.push("var i, w;"),g.push(yt(e,"x","this.points",e.points));var p=rt(i?"size":"s");for(o=0;o<e.splineDimension;o++)g.push("var "+p(o)+" = "+bt(e.points,"this.points",o)+";");for(u=[],o=0;o<e.splineDimension;o++)r="i"+o,u.push(r),g.push("for ("+r+" = "+p(o)+"- 1; "+r+" >= 0; "+r+"--) {");for(o=0;o<e.dimension;o++)g.push("x"+o+" = "+n.point(u.concat([o])));for(l=[],o=0;o<e.dimension;o++)l.push("m["+((e.dimension+1)*(o+1)-1)+"] * x"+o);for(l.push("m["+((e.dimension+1)*(e.dimension+1)-1)+"]"),g.push("var w = ("+l.join(" + ")+") || 1.0;"),o=0;o<e.dimension;o++){for(l=[],a=e.dimension,s=0;s<a;s++)l.push("m["+(s*(a+1)+o)+"] * x"+s);l.push("m["+(s*(a+1)+o)+"]"),d=n.point(u.concat([o])),h="("+l.join(" + ")+") / w",g.push(d+" = "+h+";")}for(o=e.splineDimension-1;o>=0;o--)g.push("}");g.push("return this;"),g.push("}");var _=new Function([g.join("\n"),"; return ",f].join(""))();return i&&console.log(g.join("\n")),Dt[t]=_,_.bind(e)};_().set("lib/nurbs/src/transform",Pt);const Tt=Pt;var Ft={};const It=function(t,e,n,i,o){var s=Ft[t];if(s)return s.bind(e);var r,u,l,a=e.degree,h=e.knots,d=e.splineDimension,c=e.boundary,g=[],f="support"+t,p=n.knot,_=rt("t"),m=i?"domain":"d",w=rt(i?"size":"s"),y=rt(i?"knotIndex":"i"),v=!0;for(l=0;l<d;l++)Q(h)&&Q(h[l])&&(v=!1);function b(t){g.push(" "+(t||""))}var C=[];for(r=0;r<d;r++)C.push(_([r]));g.push("function "+f+" (out, "+C.join(", ")+") {");var N=0;function S(t,e){b(void 0===e?"out["+N+++"] = "+t.join(" + ")+";":"out["+N+++"] = ("+t.join(" + ")+" + "+e+") % "+e+";")}for(b("var h, m;"),b("var c = 0;"),o&&(b("var "+m+" = this.domain;"),b("for (var i = 0; i < this.splineDimension; i++) {"),b(" a = arguments[i + 1];"),b(" if (a < "+m+"[i][0] || a > "+m+"[i][1] || a === undefined || isNaN(a)) {"),b(' throw new Error("Invalid Spline parameter in dimension "+i+". Valid domain is ["+'+m+'[i][0]+", "+'+m+'[i][1]+"]. but got t"+i+" = "+arguments[i + 1]+".");'),b(" }"),b("}")),l=0;l<d;l++)b("var "+w(l)+" = "+bt(e.points,"this.points",l)+";");v||g.push(yt(e,"k","this.knots",h));var O=[];for(l=0;l<d;l++)switch(et(h)){case et.NDARRAY:O[l]=!0;break;case et.ARRAY_OF_ARRAYS:O[l]=Q(h[l])}for(l=0;l<d;l++)O[l]?(b("var "+y(l)+" = 0;"),b("h = "+w(l)+";"),b("while(h > "+y(l)+" + 1) {"),b(" m = 0.5 * (h + "+y(l)+") | 0;"),b(" if ("+p([l,"m"])+" > "+_(l)+") h = m;"),b(" else "+y(l)+" = m;"),b("}")):"closed"===c[l]?b(y(l)+" = ("+_(l)+" | 0) % "+w(l)+";"):(b(y(l)+" = ("+_(l)+" | 0);"),b("if ("+y(l)+" < "+a[l]+") "+y(l)+" = "+a[l]+";"),b("if ("+y(l)+" > "+w(l)+" - 1) "+y(l)+" = "+w(l)+" - 1;"));for(l=0,u=[];l<d;l++)u[l]=a[l]+1;mt(u,(function(t){for(var e=[],n=[],i=0;i<d;i++)e[i]=[y(i),t[i]-a[i]],"closed"===c[i]&&t[i]-a[i]<0&&(n[i]=w(i));for(i=0;i<d;i++)S(e[i],n[i])})),b("out.length = "+N+";"),b("return out;"),g.push("}"),i&&console.log(g.join("\n"));var D=new Function([g.join("\n"),"; return ",f].join(""))();return Ft[t]=D,D.bind(e)};_().set("lib/nurbs/src/support",It);const Vt=It,xt=window[Symbol.for("X_ITE.X3D-8.6.12")].require("standard/Math/Geometry/Triangle3");var Rt=t.n(xt),zt=[];const jt=function(t,e,n){n=n||{};var i=(t=t||{}).points=t.points||[],o=t.faces=t.faces||[],s=n.haveWeights,r=e.dimension-s;if(Array.isArray(n.resolution))var u=n.resolution;else{var l=void 0===n.resolution?31:n.resolution;u=new Array(e.splineDimension).fill(l)}switch(e.splineDimension){case 1:for(var a=(_=(w=u[0])+!(v="closed"===e.boundary[0]))*r,h=(C=(m=n.domain||e.domain)[0])[1]-C[0],d=0;d<_;++d){var c=C[0]+h*d/w,g=d*r;if(e.evaluate(zt,c),s)for(var f=zt[r],p=0;p<r;++p)i[g+p]=zt[p]/f;else for(p=0;p<r;++p)i[g+p]=zt[p]}i.length=a;break;case 2:var _,m,w=u[0],y=u[1],v="closed"===e.boundary[0],b=y+!(P="closed"===e.boundary[1]),C=(a=(_=w+!v)*b*r,(m=n.domain||e.domain)[0]),N=m[1],S=(h=C[1]-C[0],N[1]-N[0]);for(d=0;d<_;++d){c=C[0]+h*d/w;for(var O=0;O<b;++O){var D=N[0]+S*O/y;g=(d+_*O)*r;if(e.evaluate(zt,c,D),s)for(f=zt[r],p=0;p<r;++p)i[g+p]=zt[p]/f;else for(p=0;p<r;++p)i[g+p]=zt[p]}}i.length=a;v=n.closed[0];var P=n.closed[1],T=0;for(d=0;d<w;++d){var F=d,I=d+1;v&&(I%=w);for(O=0;O<y;++O){var V=O,x=O+1;P&&(x%=y),o[T++]=F+_*V,o[T++]=I+_*V,o[T++]=I+_*x,o[T++]=F+_*V,o[T++]=I+_*x,o[T++]=F+_*x}}o.length=T;break;default:throw new Error("Can only sample contours and surfaces")}return t};_().set("lib/nurbs/extras/sample",jt);const kt=jt;var At={open:"open",closed:"closed",clamped:"clamped"};function Bt(t){return null==t}function Xt(t,e,n,i,o,s){var r,u;!t||Q(t)||J(t)?(s=s||{},this.weights=i,this.knots=n,this.degree=e,this.points=t,this.boundary=o,this.debug=s.debug,this.checkBounds=!!s.checkBounds,Object.defineProperty(this,"size",{value:s.size,writable:!0,configurable:!0})):(s=t,this.debug=t.debug,this.checkBounds=!!t.checkBounds,this.weights=t.weights,this.knots=t.knots,this.degree=t.degree,this.boundary=t.boundary,this.points=t.points,Object.defineProperty(this,"size",{value:s.size,writable:!0,configurable:!0}));var l=et(this.points),a=et(this.weights),h=et(this.knots);if(this.points)switch(l){case et.GENERIC_NDARRAY:case et.NDARRAY:Object.defineProperties(this,{splineDimension:{value:this.points.shape.length-1,writable:!1,configurable:!0},dimension:{value:this.points.shape[this.points.shape.length-1],writable:!1,configurable:!0},size:{get:function(){return this.points.shape.slice(0,this.points.shape.length-1)},set:function(){throw new Error("Cannot assign to read only property 'size'")},configurable:!0}});break;case et.ARRAY_OF_OBJECTS:case et.ARRAY_OF_ARRAYS:var d=0,c=this.size||[];c.length=0;for(var g=this.points;Q(g[0]);g=g[0])d++,c.push(g.length);if(0===d)throw new Error("Expected an array of points");Object.defineProperties(this,{splineDimension:{value:d,writable:!1,configurable:!0},dimension:{value:g.length,writable:!1,configurable:!0},size:{get:function(){var t=[];t.length=0;for(var e=0,n=this.points;e<this.splineDimension;e++,n=n[0])t[e]=n.length;return t},set:function(){throw new Error('Cannot assign to read only property "size"')},configurable:!0}});break;case et.PACKED:default:throw new Error("Expected either a packed array, array of arrays, or ndarray of points")}else{if(void 0===this.size||null===this.size)throw new Error("Either points or a control hull size must be provided.");if(Q(this.size)||Object.defineProperty(this,"size",{value:[this.size],writable:!0,configurable:!0}),0===this.size.length)throw new Error("`size` must be a number or an array of length at least one.");Object.defineProperties(this,{splineDimension:{value:this.size.length,writable:!1,configurable:!0},dimension:{value:0,writable:!1,configurable:!0}})}if(Q(this.degree)){for(r=0;r<this.splineDimension;r++)if(Bt(this.degree[r]))throw new Error("Missing degree in dimension "+(r+1))}else{var f=!Bt(this.degree),p=Bt(this.degree)?2:this.degree;for(this.degree=[],r=0;r<this.splineDimension;r++)if(this.size[r]<=p){if(f)throw new Error("Expected at least "+(p+1)+" points for degree "+p+" spline in dimension "+(r+1)+" but got only "+this.size[r]);this.degree[r]=this.size[r]-1}else this.degree[r]=p}if(u="string"!=typeof this.boundary?"open":this.boundary,!At[u])throw new Error("Boundary type must be one of "+Object.keys(At)+". Got "+u);for(this.boundary=Q(this.boundary)?this.boundary:[],this.boundary.length=this.splineDimension,r=0;r<this.splineDimension;r++)if(this.boundary[r]=Bt(this.boundary[r])?u:this.boundary[r],!At[u])throw new Error("Boundary type must be one of "+Object.keys(At)+". Got "+u+" for dimension "+(r+1));switch(h){case et.ARRAY_OF_ARRAYS:for(Q(this.knots)&&this.knots.length>0&&!Q(this.knots[0])&&(this.knots=[this.knots]),r=0;r<this.splineDimension;r++){if(this.size[r]<=this.degree[r])throw new Error("Expected at least "+(this.degree[r]+1)+" points in dimension "+(r+1)+" but got "+this.size[r]+".");if(Q(this.knots[r])){if("closed"!==this.boundary[r]&&this.knots[r].length!==this.degree[r]+this.size[r]+1)throw new Error("Expected "+(this.degree[r]+this.size[r]+1)+" knots in dimension "+(r+1)+" but got "+this.knots[r].length+".");if("closed"===this.boundary[r]&&this.knots[r].length!==this.size[r]+1&&!(this.knots[r].length===this.size[r]+this.degree[r]+1))throw new Error("Expected "+(this.size[r]+1)+" knots for closed spline in dimension "+(r+1)+" but got "+this.knots[r].length+".")}}case et.NDARRAY:}var _=it(this,this.debug,this.checkBounds,l,a,h);if(_!==this.__cacheKey){this.__cacheKey=_;var m=dt(this);this.evaluate=Ot(this.__cacheKey,this,m,this.debug,this.checkBounds,!1),this.transform=Tt(this.__cacheKey,this,m,this.debug),this.support=Vt(this.__cacheKey,this,m,this.debug,this.checkBounds),this.evaluator=function(t,e){return Ot(this.__cacheKey,this,m,this.debug,this.checkBounds,e,t)}}return this.numericalDerivative=pt.bind(this),this}function Et(){var t,e=[],n=this.points;n?Z(n)&&(t=n.shape):t=this.size;for(var i=0;i<this.splineDimension;i++){var o=t?t[i]:n.length,s=this.degree[i],r="closed"===this.boundary[i];if(this.knots&&this.knots[i]){var u=this.knots[i];e[i]=[u[r?0:s],u[o]]}else e[i]=[r?0:s,o];n&&(n=n[0])}return e}function qt(t,e,n,i,o,s){var r=function(t,e,n,i,o,s){return u(t,e,n,i,o,s),r},u=Xt.bind(r);return Object.defineProperty(r,"domain",{get:Et}),u(t,e,n,i,o,s),r}qt.sample=kt;const Kt=qt;_().set("lib/nurbs/nurbs",Kt);const Mt=Kt;function Ut(t){U.call(this,t),W().call(this,t),this.addType(c().NurbsCurve),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[]}}Ut.prototype=Object.assign(Object.create(U.prototype),W().prototype,{constructor:Ut,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().inputOutput,"tessellation",new(o().SFInt32)),new(r())(c().initializeOnly,"closed",new(o().SFBool)),new(r())(c().initializeOnly,"order",new(o().SFInt32)(3)),new(r())(c().initializeOnly,"knot",new(o().MFDouble)),new(r())(c().inputOutput,"weight",new(o().MFDouble)),new(r())(c().inputOutput,"controlPoint",new(o().SFNode))]),getTypeName:function(){return"NurbsCurve"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},initialize:function(){U.prototype.initialize.call(this),this._controlPoint.addInterest("set_controlPoint__",this),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(c().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this)},getTessellation:function(t){return q.getTessellation(this._tessellation.getValue(),t-this._order.getValue())},getClosed:function(t,e,n,i){return!!this._closed.getValue()&&q.getClosed(t,e,n,i)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},tessellate:function(){if(this._order.getValue()<2)return[];if(!this.controlPointNode)return[];if(this.controlPointNode.getSize()<this._order.getValue())return[];const t=this.getVertices(),e=[];if(t.length){const n=t.length;for(let i=0;i<n;i+=8)e.push(t[i],t[i+1],t[i+2]);e.push(t[n-4],t[n-3],t[n-2])}return e},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),o=(i.at(-1),i[0],this._order.getValue()-1),s=this.surface=(this.surface||Mt)({boundary:["open"],degree:[o],knots:[i],points:n,debug:!1});this.sampleOptions.resolution[0]=this.getTessellation(i.length),this.sampleOptions.haveWeights=Boolean(e);const r=Mt.sample(this.mesh,s,this.sampleOptions).points,u=this.getVertices();for(let t=3,e=r.length;t<e;t+=3){const e=t-3;u.push(r[e],r[e+1],r[e+2],1),u.push(r[t],r[t+1],r[t+2],1)}},dispose:function(){U.prototype.dispose.call(this)}});const Gt=Ut;_().set("x_ite/Components/NURBS/NurbsCurve",Gt);const Wt=Gt;function Yt(t){N.call(this,t),this.addType(c().NurbsCurve2D),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[]},this.array=[]}Yt.prototype=Object.assign(Object.create(N.prototype),{constructor:Yt,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().inputOutput,"tessellation",new(o().SFInt32)),new(r())(c().initializeOnly,"closed",new(o().SFBool)),new(r())(c().initializeOnly,"order",new(o().SFInt32)(3)),new(r())(c().initializeOnly,"knot",new(o().MFDouble)),new(r())(c().inputOutput,"weight",new(o().MFDouble)),new(r())(c().inputOutput,"controlPoint",new(o().MFVec2d))]),getTypeName:function(){return"NurbsCurve2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getTessellation:function(t){return q.getTessellation(this._tessellation.getValue(),t-this._order.getValue())},getClosed:function(t,e,n,i){return!!this._closed.getValue()&&q.getClosed2D(t,e,n,i)},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints2D(t,e,n,i,o)},tessellate:function(t){const e=this.array;if(e.length=0,this._order.getValue()<2)return e;if(this._controlPoint.length<this._order.getValue())return e;const n=this.getClosed(this._order.getValue(),this._knot,this._weight,this._controlPoint),i=this.getWeights(this.weights,this._controlPoint.length,this._weight),o=this.getControlPoints(this.controlPoints,n,this._order.getValue(),i,this._controlPoint),s=this.getKnots(this.knots,n,this._order.getValue(),this._controlPoint.length,this._knot),r=(s.at(-1),s[0],this._order.getValue()-1),u=this.surface=(this.surface||Mt)({boundary:["open"],degree:[r],knots:[s],points:o,debug:!1});this.sampleOptions.resolution[0]=this.getTessellation(s.length),this.sampleOptions.haveWeights=Boolean(i);const l=Mt.sample(this.mesh,u,this.sampleOptions).points;switch(t){case 0:for(let t=0,n=l.length;t<n;t+=2)e.push(l[t],l[t+1]);break;case 1:for(let t=0,n=l.length;t<n;t+=2)e.push(l[t],0,l[t+1]);break;case 2:for(let t=0,n=l.length;t<n;t+=2)e.push(new(O())(l[t],l[t+1],0))}return e}});const Jt=Yt;_().set("x_ite/Components/NURBS/NurbsCurve2D",Jt);const Lt=Jt,Zt=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Components/Core/X3DChildNode");var Ht=t.n(Zt);const Qt=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Components/Interpolation/OrientationInterpolator");var $t=t.n(Qt);const te=window[Symbol.for("X_ITE.X3D-8.6.12")].require("standard/Math/Numbers/Rotation4");var ee=t.n(te);function ne(t){Ht().call(this,t),this.addType(c().NurbsOrientationInterpolator),this.addChildObjects("rebuild",new(o().SFTime)),this.interpolator=new($t())(t),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[128]}}ne.prototype=Object.assign(Object.create(Ht().prototype),{constructor:ne,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().inputOnly,"set_fraction",new(o().SFFloat)),new(r())(c().inputOutput,"order",new(o().SFInt32)(3)),new(r())(c().inputOutput,"knot",new(o().MFDouble)),new(r())(c().inputOutput,"weight",new(o().MFDouble)),new(r())(c().inputOutput,"controlPoint",new(o().SFNode)),new(r())(c().outputOnly,"value_changed",new(o().SFRotation))]),getTypeName:function(){return"NurbsOrientationInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},initialize:function(){Ht().prototype.initialize.call(this),this._order.addInterest("requestRebuild",this),this._knot.addInterest("requestRebuild",this),this._weight.addInterest("requestRebuild",this),this._controlPoint.addInterest("set_controlPoint__",this),this._rebuild.addInterest("build",this),this._set_fraction.addFieldInterest(this.interpolator._set_fraction),this.interpolator._value_changed.addFieldInterest(this._value_changed),this.interpolator.setup(),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(c().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this),this.requestRebuild()},getClosed:function(t,e,n,i){return!1},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},requestRebuild:function(){this._rebuild.addEvent()},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),o=i.at(-1)-i[0],s=this._order.getValue()-1,r=this.surface=(this.surface||Mt)({boundary:["open"],degree:[s],knots:[i],points:n,debug:!1});this.sampleOptions.haveWeights=Boolean(e);const u=Mt.sample(this.mesh,r,this.sampleOptions).points,l=this.interpolator;l._key.length=0,l._keyValue.length=0;for(let e=0,n=u.length-3;e<n;e+=3){const s=new(O())(u[e+3]-u[e+0],u[e+4]-u[e+1],u[e+5]-u[e+2]);l._key.push(i[0]+e/(n-3+3*t)*o),l._keyValue.push(new(ee())(O().zAxis,s))}t&&(l._key.push(i[0]+o),l._keyValue.push(l._keyValue[0]))}});const ie=ne;_().set("x_ite/Components/NURBS/NurbsOrientationInterpolator",ie);const oe=ie,se=window[Symbol.for("X_ITE.X3D-8.6.12")].require("standard/Math/Algorithm");var re=t.n(se);function ue(t){U.call(this,t),this.addType(c().X3DNurbsSurfaceGeometryNode),this.tessellationScale=1,this.uKnots=[],this.vKnots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[],closed:[]},this.textUKnots=[],this.textVKnots=[],this.textWeights=[],this.texControlPoints=[],this.texMesh={}}ue.prototype=Object.assign(Object.create(U.prototype),{constructor:ue,initialize:function(){U.prototype.initialize.call(this),this._texCoord.addInterest("set_texCoord__",this),this._controlPoint.addInterest("set_controlPoint__",this),this.set_texCoord__(),this.set_controlPoint__()},set_texCoord__:function(){this.texCoordNode?.removeInterest("requestRebuild",this),this.nurbsTexCoordNode?.removeInterest("requestRebuild",this),this.texCoordNode=f()(c().X3DTextureCoordinateNode,this._texCoord),this.nurbsTexCoordNode=f()(c().NurbsTextureCoordinate,this._texCoord),this.texCoordNode?.addInterest("requestRebuild",this),this.nurbsTexCoordNode?.addInterest("requestRebuild",this)},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(c().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this)},setTessellationScale:function(t){this.tessellationScale=t,this.requestRebuild()},getUTessellation:function(t){return Math.floor(q.getTessellation(this._uTessellation.getValue(),t-this._uOrder.getValue())*this.tessellationScale)},getVTessellation:function(t){return Math.floor(q.getTessellation(this._vTessellation.getValue(),t-this._vOrder.getValue())*this.tessellationScale)},getUClosed:function(t,e,n,i,o,s){return!!this._uClosed.getValue()&&q.getUClosed(t,e,n,i,o,s)},getVClosed:function(t,e,n,i,o,s){return!!this._vClosed.getValue()&&q.getVClosed(t,e,n,i,o,s)},getUVWeights:function(t,e,n,i){return q.getUVWeights(t,e,n,i)},getTexControlPoints:function(t,e,n,i,o,s,r,u){return q.getTexControlPoints(t,e,n,i,o,s,r,u)},getUVControlPoints:function(t,e,n,i,o,s,r,u,l){return q.getUVControlPoints(t,e,n,i,o,s,r,u,l)},getTrimmingContours:function(){},build:function(){if(this._uOrder.getValue()<2)return;if(this._vOrder.getValue()<2)return;if(this._uDimension.getValue()<this._uOrder.getValue())return;if(this._vDimension.getValue()<this._vOrder.getValue())return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()!==this._uDimension.getValue()*this._vDimension.getValue())return;const t=this.getUClosed(this._uOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),this._uKnot,this._weight,this.controlPointNode),e=this.getVClosed(this._vOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),this._vKnot,this._weight,this.controlPointNode),n=this.getUVWeights(this.weights,this._uDimension.getValue(),this._vDimension.getValue(),this._weight),i=this.getUVControlPoints(this.controlPoints,t,e,this._uOrder.getValue(),this._vOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),n,this.controlPointNode),o=this.getKnots(this.uKnots,t,this._uOrder.getValue(),this._uDimension.getValue(),this._uKnot),s=this.getKnots(this.vKnots,e,this._vOrder.getValue(),this._vDimension.getValue(),this._vKnot),r=(o.at(-1),o[0],s.at(-1),s[0],this._uOrder.getValue()-1),u=this._vOrder.getValue()-1,l=this.surface=(this.surface||Mt)({boundary:["open","open"],degree:[r,u],knots:[o,s],points:i,debug:!1}),a=this.sampleOptions;a.resolution[0]=this.getUTessellation(o.length),a.resolution[1]=this.getVTessellation(s.length),a.closed[0]=t,a.closed[1]=e,a.domain=void 0,a.haveWeights=Boolean(n),a.trimmingContours=this.getTrimmingContours();const h=Mt.sample(this.mesh,l,a),d=h.faces,c=h.points,g=this.getVertices();for(let t=0,e=d.length;t<e;++t){const e=3*d[t];g.push(c[e],c[e+1],c[e+2],1)}this.buildNurbsTexCoords(t,e,this._uOrder.getValue(),this._vOrder.getValue(),o,s,this._uDimension.getValue(),this._vDimension.getValue(),l.domain),this.buildNormals(d,c),this.setSolid(this._solid.getValue()),this.setCCW(!0)},buildNurbsTexCoords:function(){const t=[],e=[],n=[[[0,0,0,1],[0,1,0,1]],[[1,0,0,1],[1,1,0,1]]];function i(t,e){return t[0]=t[1]=e[0],t[2]=t[3]=e.at(-1),t}return function(o,s,r,u,l,a,h,d,c){const g=this.sampleOptions;if(this.texCoordNode&&this.texCoordNode.getSize()===h*d)var f=r-1,p=u-1,_=l,m=a,w=this.getTexControlPoints(this.texControlPoints,o,s,r,u,h,d,this.texCoordNode);else if(this.nurbsTexCoordNode&&this.nurbsTexCoordNode.isValid()){var y=this.nurbsTexCoordNode,v=(f=y._uOrder.getValue()-1,p=y._vOrder.getValue()-1,_=this.getKnots(this.texUKnots,!1,y._uOrder.getValue(),y._uDimension.getValue(),y._uKnot),m=this.getKnots(this.texVKnots,!1,y._vOrder.getValue(),y._vDimension.getValue(),y._vKnot),this.getUVWeights(this.texWeights,y._uDimension.getValue(),y._vDimension.getValue(),y._weight));w=y.getControlPoints(v)}else{f=1,p=1,_=i(t,l),m=i(e,a),w=n;g.domain=c}const b=this.texSurface=(this.texSurface||Mt)({boundary:["open","open"],degree:[f,p],knots:[_,m],points:w});g.closed[0]=!1,g.closed[1]=!1,g.haveWeights=!1;const C=Mt.sample(this.texMesh,b,g),N=C.faces,S=C.points,O=this.getTexCoords();for(let t=0,e=N.length;t<e;++t){const e=4*N[t];O.push(S[e],S[e+1],S[e+2],S[e+3])}this.getMultiTexCoords().push(this.getTexCoords())}}(),buildNormals:function(t,e){const n=this.createNormals(t,e),i=this.getNormals();for(const t of n)i.push(t.x,t.y,t.z)},createNormals:function(t,e){const n=this.createFaceNormals(t,e),i=[];for(let e=0,n=t.length;e<n;++e){const n=t[e];let o=i[n];o||(o=i[n]=[]),o.push(e)}return this.refineNormals(i,n,re().radians(85))},createFaceNormals:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0),n=new(O())(0,0,0);return function(i,o){const s=this.faceNormals||[],r=i.length;for(let u=0;u<r;u+=3){const r=3*i[u],l=3*i[u+1],a=3*i[u+2];t.set(o[r],o[r+1],o[r+2]),e.set(o[l],o[l+1],o[l+2]),n.set(o[a],o[a+1],o[a+2]);const h=Rt().normal(t,e,n,s[u]||new(O())(0,0,0));s[u]=h,s[u+1]=h,s[u+2]=h}return s.length=r,s}}()});const le=ue;_().set("x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode",le);const ae=le;function he(t){ae.call(this,t),this.addType(c().NurbsPatchSurface)}he.prototype=Object.assign(Object.create(ae.prototype),{constructor:he,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(c().inputOutput,"uTessellation",new(o().SFInt32)),new(r())(c().inputOutput,"vTessellation",new(o().SFInt32)),new(r())(c().initializeOnly,"uClosed",new(o().SFBool)),new(r())(c().initializeOnly,"vClosed",new(o().SFBool)),new(r())(c().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(c().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(c().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(c().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(c().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(c().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(c().inputOutput,"weight",new(o().MFDouble)),new(r())(c().inputOutput,"texCoord",new(o().SFNode)),new(r())(c().inputOutput,"controlPoint",new(o().SFNode))]),getTypeName:function(){return"NurbsPatchSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"}});const de=he;_().set("x_ite/Components/NURBS/NurbsPatchSurface",de);const ce=de,ge=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Components/Interpolation/PositionInterpolator");var fe=t.n(ge);function pe(t){Ht().call(this,t),this.addType(c().NurbsPositionInterpolator),this.addChildObjects("rebuild",new(o().SFTime)),this.interpolator=new(fe())(t),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[128]}}pe.prototype=Object.assign(Object.create(Ht().prototype),{constructor:pe,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().inputOnly,"set_fraction",new(o().SFFloat)),new(r())(c().inputOutput,"order",new(o().SFInt32)(3)),new(r())(c().inputOutput,"knot",new(o().MFDouble)),new(r())(c().inputOutput,"weight",new(o().MFDouble)),new(r())(c().inputOutput,"controlPoint",new(o().SFNode)),new(r())(c().outputOnly,"value_changed",new(o().SFVec3f))]),getTypeName:function(){return"NurbsPositionInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},initialize:function(){Ht().prototype.initialize.call(this),this._order.addInterest("requestRebuild",this),this._knot.addInterest("requestRebuild",this),this._weight.addInterest("requestRebuild",this),this._controlPoint.addInterest("set_controlPoint__",this),this._rebuild.addInterest("build",this),this._set_fraction.addFieldInterest(this.interpolator._set_fraction),this.interpolator._value_changed.addFieldInterest(this._value_changed),this.interpolator.setup(),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(c().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this),this.requestRebuild()},getClosed:function(t,e,n,i){return!1},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},requestRebuild:function(){this._rebuild.addEvent()},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),s=i.at(-1)-i[0],r=this._order.getValue()-1,u=this.surface=(this.surface||Mt)({boundary:["open"],degree:[r],knots:[i],points:n,debug:!1});this.sampleOptions.haveWeights=Boolean(e);const l=Mt.sample(this.mesh,u,this.sampleOptions).points,a=this.interpolator;a._key.length=0,a._keyValue.length=0;for(let t=0,e=l.length;t<e;t+=3)a._key.push(i[0]+t/(e-3)*s),a._keyValue.push(new(o().SFVec3f)(l[t],l[t+1],l[t+2]))}});const _e=pe;_().set("x_ite/Components/NURBS/NurbsPositionInterpolator",_e);const me=_e,we=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Components/Grouping/X3DBoundedObject");var ye=t.n(we);function ve(t){Ht().call(this,t),ye().call(this,t),this.addType(c().NurbsSet),this.geometryNodes=[]}function be(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}ve.prototype=Object.assign(Object.create(Ht().prototype),ye().prototype,{constructor:ve,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().inputOutput,"tessellationScale",new(o().SFFloat)(1)),new(r())(c().inputOutput,"visible",new(o().SFBool)(!0)),new(r())(c().inputOutput,"bboxDisplay",new(o().SFBool)),new(r())(c().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(r())(c().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(r())(c().inputOnly,"addGeometry",new(o().MFNode)),new(r())(c().inputOnly,"removeGeometry",new(o().MFNode)),new(r())(c().inputOutput,"geometry",new(o().MFNode))]),getTypeName:function(){return"NurbsSet"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},initialize:function(){Ht().prototype.initialize.call(this),ye().prototype.initialize.call(this),this._tessellationScale.addInterest("set_tessellationScale__",this),this._addGeometry.addInterest("set_addGeometry__",this),this._removeGeometry.addInterest("set_removeGeometry__",this),this._geometry.addInterest("set_geometry__",this),this.set_geometry__()},getBBox:function(t,e){for(const e of this.geometryNodes)t.add(e.getBBox());return t},set_tessellationScale__:function(){const t=Math.max(0,this._tessellationScale.getValue());for(const e of this.geometryNodes)e.setTessellationScale(t)},set_addGeometry__:function(){this._addGeometry.setTainted(!0),this._addGeometry.erase(be(this._addGeometry,0,this._addGeometry.length,this._geometry,0,this._geometry.length),this._addGeometry.length);for(const t of this._addGeometry)this._geometry.push(t);this._addGeometry.length=0,this._addGeometry.setTainted(!1)},set_removeGeometry__:function(){this._removeGeometry.setTainted(!0),this._geometry.erase(be(this._geometry,0,this._geometry.length,this._removeGeometry,0,this._removeGeometry.length),this._geometry.length),this._removeGeometry.length=0,this._removeGeometry.setTainted(!1)},set_geometry__:function(){for(const t of this.geometryNodes)t.setTessellationScale(1);this.geometryNodes.length=0;for(const t of this._geometry){const e=f()(c().X3DNurbsSurfaceGeometryNode,t);e&&this.geometryNodes.push(e)}this.set_tessellationScale__()},dispose:function(){ye().prototype.dispose.call(this),Ht().prototype.dispose.call(this)}});const Ce=ve;_().set("x_ite/Components/NURBS/NurbsSet",Ce);const Ne=Ce,Se=window[Symbol.for("X_ITE.X3D-8.6.12")].require("standard/Math/Geometry/Line3");var Oe=t.n(Se);const De={isPointInTriangle:function(t,e,n,i){const o=(e.y-n.y)*(t.x-n.x)+(n.x-e.x)*(t.y-n.y);if(0==o)return!1;const s=((e.y-n.y)*(i.x-n.x)+(n.x-e.x)*(i.y-n.y))/o;if(s<0||s>1)return!1;const r=((n.y-t.y)*(i.x-n.x)+(t.x-n.x)*(i.y-n.y))/o;if(r<0||r>1)return!1;const u=1-s-r;return!(u<0||u>1)}};_().set("standard/Math/Geometry/Triangle2",De);const Pe=De;function Te(t){Ht().call(this,t),this.addType(c().NurbsSurfaceInterpolator),this.geometry=new ce(t)}Te.prototype=Object.assign(Object.create(Ht().prototype),{constructor:Te,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().inputOnly,"set_fraction",new(o().SFVec2f)),new(r())(c().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(c().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(c().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(c().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(c().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(c().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(c().inputOutput,"weight",new(o().MFDouble)),new(r())(c().inputOutput,"controlPoint",new(o().SFNode)),new(r())(c().outputOnly,"normal_changed",new(o().SFVec3f)),new(r())(c().outputOnly,"position_changed",new(o().SFVec3f))]),getTypeName:function(){return"NurbsSurfaceInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},initialize:function(){this._set_fraction.addInterest("set_fraction__",this),this._uOrder.addFieldInterest(this.geometry._uOrder),this._vOrder.addFieldInterest(this.geometry._vOrder),this._uDimension.addFieldInterest(this.geometry._uDimension),this._vDimension.addFieldInterest(this.geometry._vDimension),this._uKnot.addFieldInterest(this.geometry._uKnot),this._vKnot.addFieldInterest(this.geometry._vKnot),this._weight.addFieldInterest(this.geometry._weight),this._controlPoint.addFieldInterest(this.geometry._controlPoint),this.geometry._uTessellation=128,this.geometry._vTessellation=128,this.geometry._uOrder=this._uOrder,this.geometry._vOrder=this._vOrder,this.geometry._uDimension=this._uDimension,this.geometry._vDimension=this._vDimension,this.geometry._uKnot=this._uKnot,this.geometry._vKnot=this._vKnot,this.geometry._weight=this._weight,this.geometry._controlPoint=this._controlPoint,this.geometry.setup()},set_fraction__:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0),n=new(O())(0,0,0),i=new(O())(0,0,0),o=new(Oe())(O().Zero,O().zAxis),s={};return function(){const r=this._set_fraction.getValue(),u=this.geometry.getTexCoords(),l=this.geometry.getNormals(),a=this.geometry.getVertices();for(let h=0,d=0,c=u.length;h<c;h+=12,d+=9)if(t.set(u[h+0],u[h+1],0),e.set(u[h+4],u[h+5],0),n.set(u[h+7],u[h+9],0),Pe.isPointInTriangle(t,e,n,r)&&(o.set(i.set(r.x,r.y,0),O().zAxis),o.intersectsTriangle(t,e,n,s))){const t=s.u,e=s.v,n=s.t,i=new(O())(n*l[d+0]+t*l[d+3]+e*l[d+6],n*l[d+1]+t*l[d+4]+e*l[d+7],n*l[d+2]+t*l[d+5]+e*l[d+8]),o=new(O())(n*a[h+0]+t*a[h+4]+e*a[h+8],n*a[h+1]+t*a[h+5]+e*a[h+9],n*a[h+2]+t*a[h+6]+e*a[h+10]);this._normal_changed=i,this._position_changed=o}}}()});const Fe=Te;_().set("x_ite/Components/NURBS/NurbsSurfaceInterpolator",Fe);const Ie=Fe,Ve=window[Symbol.for("X_ITE.X3D-8.6.12")].require("x_ite/Components/Geometry3D/Extrusion");var xe=t.n(Ve);function Re(t){U.call(this,t),this.addType(c().NurbsSweptSurface),this.extrusion=new(xe())(t)}Re.prototype=Object.assign(Object.create(U.prototype),{constructor:Re,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(c().initializeOnly,"ccw",new(o().SFBool)(!0)),new(r())(c().inputOutput,"crossSectionCurve",new(o().SFNode)),new(r())(c().inputOutput,"trajectoryCurve",new(o().SFNode))]),getTypeName:function(){return"NurbsSweptSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},initialize:function(){U.prototype.initialize.call(this),this._crossSectionCurve.addInterest("set_crossSectionCurve__",this),this._trajectoryCurve.addInterest("set_trajectoryCurve__",this);const t=this.extrusion;t._beginCap=!1,t._endCap=!1,t._solid=!0,t._ccw=!0,t._convex=!0,t._creaseAngle=Math.PI,t.setup(),t._crossSection.setTainted(!0),t._spine.setTainted(!0),this.set_crossSectionCurve__(),this.set_trajectoryCurve__()},set_crossSectionCurve__:function(){this.crossSectionCurveNode&&this.crossSectionCurveNode.removeInterest("requestRebuild",this),this.crossSectionCurveNode=f()(c().X3DNurbsControlCurveNode,this._crossSectionCurve),this.crossSectionCurveNode&&this.crossSectionCurveNode.addInterest("requestRebuild",this)},set_trajectoryCurve__:function(){this.trajectoryCurveNode&&this.trajectoryCurveNode._rebuild.removeInterest("requestRebuild",this),this.trajectoryCurveNode=f()(c().NurbsCurve,this._trajectoryCurve),this.trajectoryCurveNode&&this.trajectoryCurveNode._rebuild.addInterest("requestRebuild",this)},build:function(){if(!this.crossSectionCurveNode)return;if(!this.trajectoryCurveNode)return;const t=this.extrusion;if(t._crossSection=this.crossSectionCurveNode.tessellate(0),t._spine=this.trajectoryCurveNode.tessellate(0),t.rebuild(),this.getColors().assign(t.getColors()),this.getTexCoords().assign(t.getTexCoords()),this.getNormals().assign(t.getNormals()),this.getVertices().assign(t.getVertices()),this.getMultiTexCoords().push(this.getTexCoords()),!this._ccw.getValue()){const t=this.getNormals();for(let e=0,n=t.length;e<n;++e)t[e]=-t[e]}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}});const ze=Re;_().set("x_ite/Components/NURBS/NurbsSweptSurface",ze);const je=ze;function ke(t){U.call(this,t),this.addType(c().NurbsSwungSurface),this.extrusion=new(xe())(t)}ke.prototype=Object.assign(Object.create(U.prototype),{constructor:ke,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(c().initializeOnly,"ccw",new(o().SFBool)(!0)),new(r())(c().inputOutput,"profileCurve",new(o().SFNode)),new(r())(c().inputOutput,"trajectoryCurve",new(o().SFNode))]),getTypeName:function(){return"NurbsSwungSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},initialize:function(){U.prototype.initialize.call(this),this._profileCurve.addInterest("set_profileCurve__",this),this._trajectoryCurve.addInterest("set_trajectoryCurve__",this);const t=this.extrusion;t._beginCap=!1,t._endCap=!1,t._solid=!0,t._ccw=!0,t._convex=!0,t._creaseAngle=Math.PI,t.setup(),t._crossSection.setTainted(!0),t._spine.setTainted(!0),this.set_profileCurve__(),this.set_trajectoryCurve__()},set_profileCurve__:function(){this.profileCurveNode&&this.profileCurveNode.removeInterest("requestRebuild",this),this.profileCurveNode=f()(c().X3DNurbsControlCurveNode,this._profileCurve),this.profileCurveNode&&this.profileCurveNode.addInterest("requestRebuild",this)},set_trajectoryCurve__:function(){this.trajectoryCurveNode&&this.trajectoryCurveNode.removeInterest("requestRebuild",this),this.trajectoryCurveNode=f()(c().X3DNurbsControlCurveNode,this._trajectoryCurve),this.trajectoryCurveNode&&this.trajectoryCurveNode.addInterest("requestRebuild",this)},build:function(){if(!this.profileCurveNode)return;if(!this.trajectoryCurveNode)return;const t=this.extrusion;if(t._crossSection=this.profileCurveNode.tessellate(0),t._spine=this.trajectoryCurveNode.tessellate(1),t.rebuild(),this.getColors().assign(t.getColors()),this.getTexCoords().assign(t.getTexCoords()),this.getNormals().assign(t.getNormals()),this.getVertices().assign(t.getVertices()),this.getMultiTexCoords().push(this.getTexCoords()),!this._ccw.getValue()){const t=this.getNormals();for(let e=0,n=t.length;e<n;++e)t[e]=-t[e]}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}});const Ae=ke;_().set("x_ite/Components/NURBS/NurbsSwungSurface",Ae);const Be=Ae;function Xe(t){h().call(this,t),this.addType(c().NurbsTextureCoordinate),this.controlPoints=[]}Xe.prototype=Object.assign(Object.create(h().prototype),{constructor:Xe,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(c().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(c().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(c().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(c().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(c().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(c().inputOutput,"weight",new(o().MFDouble)),new(r())(c().inputOutput,"controlPoint",new(o().MFVec2f))]),getTypeName:function(){return"NurbsTextureCoordinate"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"texCoord"},initialize:function(){h().prototype.initialize.call(this)},getControlPoints:function(t){const e=this._controlPoint.getValue(),n=this.controlPoints;for(let i=0,o=this._uDimension.getValue();i<o;++i){let s=n[i];s||(s=n[i]=[]);for(let n=0,r=this._vDimension.getValue();n<r;++n){const r=n*o+i,u=s[n]||new(X()),l=2*r;s[n]=u.set(e[l],e[l+1],0,t?t[r]:1)}}return n},isValid:function(){return!(this._uOrder.getValue()<2)&&(!(this._vOrder.getValue()<2)&&(!(this._uDimension.getValue()<this._uOrder.getValue())&&(!(this._vDimension.getValue()<this._vOrder.getValue())&&this._controlPoint.length===this._uDimension.getValue()*this._vDimension.getValue())))}});const Ee=Xe;_().set("x_ite/Components/NURBS/NurbsTextureCoordinate",Ee);const qe=Ee;function Ke(t){ae.call(this,t),this.addType(c().NurbsTrimmedSurface),this.trimmingContourNodes=[]}function Me(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}Ke.prototype=Object.assign(Object.create(ae.prototype),{constructor:Ke,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(c().inputOutput,"metadata",new(o().SFNode)),new(r())(c().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(c().inputOutput,"uTessellation",new(o().SFInt32)),new(r())(c().inputOutput,"vTessellation",new(o().SFInt32)),new(r())(c().initializeOnly,"uClosed",new(o().SFBool)),new(r())(c().initializeOnly,"vClosed",new(o().SFBool)),new(r())(c().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(c().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(c().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(c().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(c().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(c().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(c().inputOutput,"weight",new(o().MFDouble)),new(r())(c().inputOutput,"texCoord",new(o().SFNode)),new(r())(c().inputOutput,"controlPoint",new(o().SFNode)),new(r())(c().inputOnly,"addTrimmingContour",new(o().MFNode)),new(r())(c().inputOnly,"removeTrimmingContour",new(o().MFNode)),new(r())(c().inputOutput,"trimmingContour",new(o().MFNode))]),getTypeName:function(){return"NurbsTrimmedSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},initialize:function(){ae.prototype.initialize.call(this),this._addTrimmingContour.addInterest("set_addTrimmingContour__",this),this._removeTrimmingContour.addInterest("set_removeTrimmingContour__",this),this._trimmingContour.addInterest("set_trimmingContour__",this),this.set_trimmingContour__()},set_addTrimmingContour__:function(){this._addTrimmingContour.setTainted(!0),this._addTrimmingContour.erase(Me(this._addTrimmingContour,0,this._addTrimmingContour.length,this._trimmingContour,0,this._trimmingContour.length),this._addTrimmingContour.length);for(const t of this._addTrimmingContour)this._trimmingContour.push(t);this._addTrimmingContour.length=0,this._addTrimmingContour.setTainted(!1)},set_removeTrimmingContour__:function(){this._removeTrimmingContour.setTainted(!0),this._trimmingContour.erase(Me(this._trimmingContour,0,this._trimmingContour.length,this._removeTrimmingContour,0,this._removeTrimmingContour.length),this._trimmingContour.length),this._removeTrimmingContour.length=0,this._removeTrimmingContour.setTainted(!1)},set_trimmingContour__:function(){const t=this.trimmingContourNodes;t.length=0;for(const e of this._trimmingContour){const n=f()(c().Contour2D,e);n&&t.push(n)}},getTrimmingContours:function(){const t=this.trimmingContourNodes,e=[];for(const n of t)n.addTrimmingContour(e);return e}});const Ue=Ke;_().set("x_ite/Components/NURBS/NurbsTrimmedSurface",Ue);const Ge=Ue;n().addComponent({name:"NURBS",types:{Contour2D:v,ContourPolyline2D:T,CoordinateDouble:R,NurbsCurve:Wt,NurbsCurve2D:Lt,NurbsOrientationInterpolator:oe,NurbsPatchSurface:ce,NurbsPositionInterpolator:me,NurbsSet:Ne,NurbsSurfaceInterpolator:Ie,NurbsSweptSurface:je,NurbsSwungSurface:Be,NurbsTextureCoordinate:qe,NurbsTrimmedSurface:Ge},abstractTypes:{X3DNurbsControlCurveNode:N,X3DNurbsSurfaceGeometryNode:ae,X3DParametricGeometryNode:U}});const We=void 0;_().set("assets/components/NURBS",We)})();
1
+ /* X_ITE v8.6.14 */(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Components");var n=t.n(e);const i=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Fields");var o=t.n(i);const s=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Base/X3DFieldDefinition");var r=t.n(s);const u=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Base/FieldDefinitionArray");var l=t.n(u);const a=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Components/Core/X3DNode");var h=t.n(a);const c=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Base/X3DConstants");var d=t.n(c);const g=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Base/X3DCast");var f=t.n(g);const p=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Namespace");var _=t.n(p);function m(t){h().call(this,t),this.addType(d().Contour2D),this.childNodes=[]}function w(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}m.prototype=Object.assign(Object.create(h().prototype),{constructor:m,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"addChildren",new(o().MFNode)),new(r())(d().inputOnly,"removeChildren",new(o().MFNode)),new(r())(d().inputOutput,"children",new(o().MFNode))]),getTypeName:function(){return"Contour2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"trimmingContour"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){h().prototype.initialize.call(this),this._addChildren.addInterest("set_addChildren__",this),this._removeChildren.addInterest("set_removeChildren__",this),this._children.addInterest("set_children__",this),this.set_children__()},set_addChildren__:function(){this._addChildren.setTainted(!0),this._addChildren.erase(w(this._addChildren,0,this._addChildren.length,this._children,0,this._children.length),this._addChildren.length);for(const t of this._addChildren)this._children.push(t);this._addChildren.length=0,this._addChildren.setTainted(!1)},set_removeChildren__:function(){this._removeChildren.setTainted(!0),this._children.erase(w(this._children,0,this._children.length,this._removeChildren,0,this._removeChildren.length),this._children.length),this._removeChildren.length=0,this._removeChildren.setTainted(!1)},set_children__:function(){const t=this.childNodes;t.length=0;for(const e of this._children){const n=f()(d().NurbsCurve2D,e);if(n)t.push(n);else{const n=f()(d().ContourPolyline2D,e);if(n){t.push(n);continue}}}},addTrimmingContour:function(t){for(const e of this.childNodes)t.push(e.tessellate(2))}});const y=m;_().set("x_ite/Components/NURBS/Contour2D",y);const v=y;function b(t){h().call(this,t),this.addType(d().X3DNurbsControlCurveNode)}b.prototype=Object.assign(Object.create(h().prototype),{constructor:b});const C=b;_().set("x_ite/Components/NURBS/X3DNurbsControlCurveNode",C);const N=C,S=window[Symbol.for("X_ITE.X3D-8.6.14")].require("standard/Math/Numbers/Vector3");var O=t.n(S);function D(t){N.call(this,t),this.addType(d().ContourPolyline2D),this.controlPoints=[]}D.prototype=Object.assign(Object.create(N.prototype),{constructor:D,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"controlPoint",new(o().MFVec2d))]),getTypeName:function(){return"ContourPolyline2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},tessellate:function(t){switch(t){case 0:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i;e[n+0]=t[n+0],e[n+1]=t[n+1]}return e.length=2*n,e}case 1:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i,o=3*i;e[o+0]=t[n+0],e[o+1]=0,e[o+2]=t[n+1]}return e.length=3*n,e}case 3:{const t=this._controlPoint.getValue(),e=this.controlPoints,n=this._controlPoint.length;for(let i=0;i<n;++i){const n=2*i;e[i]=new(O())(t[n+0],t[n+1],0)}return e.length=n,e}}}});const P=D;_().set("x_ite/Components/NURBS/ContourPolyline2D",P);const T=P,F=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Components/Rendering/X3DCoordinateNode");var I=t.n(F);function R(t){I().call(this,t),this.addType(d().CoordinateDouble)}R.prototype=Object.assign(Object.create(I().prototype),{constructor:R,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"point",new(o().MFVec3d))]),getTypeName:function(){return"CoordinateDouble"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"coord"},getSpecificationRange:function(){return["3.0","Infinity"]}});const V=R;_().set("x_ite/Components/NURBS/CoordinateDouble",V);const x=V,z=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Components/Rendering/X3DGeometryNode");var j=t.n(z);const k=window[Symbol.for("X_ITE.X3D-8.6.14")].require("standard/Math/Numbers/Vector2");var A=t.n(k);const B=window[Symbol.for("X_ITE.X3D-8.6.14")].require("standard/Math/Numbers/Vector4");var X=t.n(B);const E={getTessellation:function(t,e){return t>0?t+1:t<0?-t*e+1:2*e+1},getClosed2D:function(t,e,n,i){const o=i.length;return(!(n.length===o)||n[0]===n[o-1])&&(!!i[0].equals(i[o-1])&&!!this.isPeriodic(t,o,e))},getClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s){const r=s.getSize();return(!(o.length===r)||o[0]===o[r-1])&&(!!s.get1Point(0,t).equals(s.get1Point(r-1,e))&&!!this.isPeriodic(n,r,i))}}(),getUClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s,r,u){const l=r.length===u.getSize();for(let n=0,s=o;n<s;++n){const o=n*i,s=n*i+i-1;if(l&&r[o]!==r[s])return!1;if(!u.get1Point(o,t).equals(u.get1Point(s,e)))return!1}return!!this.isPeriodic(n,i,s)}}(),getVClosed:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0);return function(n,i,o,s,r,u){const l=r.length===u.getSize();for(let n=0,s=i;n<s;++n){const s=n,a=(o-1)*i+n;if(l&&r[s]!==r[a])return!1;if(!u.get1Point(s,t).equals(u.get1Point(a,e)))return!1}return!!this.isPeriodic(n,o,s)}}(),isPeriodic:function(t,e,n){if(n.length===e+t){{let e=1;for(let i=1,o=t;i<o;++i)e+=n[i]===n[0];if(e===t)return!1}{let e=1;for(let i=n.length-t,o=n.length-1;i<o;++i)e+=n[i]===n[o];if(e===t)return!1}}return!0},getKnots:function(t,e,n,i,o){const s=t||[];for(let t=0,e=o.length;t<e;++t)s[t]=o[t];s.length=o.length;let r=!0;if(s.length===i+n){r=!1;let t=0;for(let e=1,i=s.length;e<i;++e)s[e]==s[e-1]?++t:t=0,t>n-1&&(r=!0),s[e-1]>s[e]&&(r=!0)}if(r)for(let t=0,e=i+n;t<e;++t)s[t]=t/(e-1);if(e)for(let t=1,e=n-1;t<e;++t)s.push(s.at(-1)+(s[t]-s[t-1]));return s},getWeights:function(t,e,n){if(n.length!==e)return;const i=t||[];for(let t=0;t<e;++t)i[t]=n[t];return i.length=e,i},getUVWeights:function(t,e,n,i){const o=e*n;if(i.length!==o)return;const s=t||[];for(let t=0,o=0;t<e;++t)for(let t=0;t<n;++t,++o)s[o]=i[o];return s.length=o,s},getControlPoints2D:function(t,e,n,i,o){const s=t||[],r=o.getValue(),u=o.length,l=Boolean(i),a=l?O():A();s.haveWeights!==l&&(s.haveWeights=l,s.length=0);for(let t=0;t<u;++t){const e=2*t,n=s[t]||new a(0,0,0);s[t]=n.set(r[e+0],r[e+1],l?i[t]:0)}if(s.length=u,e)for(let t=1,e=n-1;t<e;++t)s.push(s[t]);return s},getControlPoints:function(t,e,n,i,o){const s=t||[],r=o.getSize(),u=Boolean(i),l=u?X():O();s.haveWeights!==u&&(s.haveWeights=u,s.length=0);for(let t=0;t<r;++t){const e=s[t]=o.get1Point(t,s[t]||new l(0,0,0,0));u&&(e.w=i[t])}if(s.length=r,e)for(let t=1,e=n-1;t<e;++t)s.push(s[t]);return s},getUVControlPoints:function(t,e,n,i,o,s,r,u,l){const a=t||[],h=Boolean(u),c=h?X():O();a.haveWeights!==h&&(a.haveWeights=h,a.length=0);for(let t=0;t<s;++t){let e=a[t];e||(e=a[t]=[]);for(let n=0;n<r;++n){const i=n*s+t;e[n]=l.get1Point(i,e[n]||new c(0,0,0,0)),h&&(e[n].w=u[i])}if(e.length=r,n)for(let t=1,n=o-1;t<n;++t)e.push(e[t])}if(a.length=s,e)for(let t=1,e=i-1;t<e;++t)a.push(a[t]);return a},getTexControlPoints:function(t,e,n,i,o,s,r,u){const l=t||[];for(let t=0;t<s;++t){let e=l[t];e||(e=l[t]=[]);for(let n=0;n<r;++n){const i=n*s+t;e[n]=u.get1Point(i,e[n]||new(X())(0,0,0,0))}if(e.length=r,n)for(let t=1,n=o-1;t<n;++t)e.push(e[t])}if(l.length=s,e)for(let t=1,e=i-1;t<e;++t)l.push(l[t]);return l}};_().set("x_ite/Browser/NURBS/NURBS",E);const q=E;function K(t){j().call(this,t),this.addType(d().X3DParametricGeometryNode)}K.prototype=Object.assign(Object.create(j().prototype),{constructor:K,getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)}});const M=K;_().set("x_ite/Components/NURBS/X3DParametricGeometryNode",M);const U=M,G=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Components/Rendering/X3DLineGeometryNode");var W=t.n(G);const Y=function(t){return!!t&&(!!t.dtype&&new RegExp("function View[0-9]+d(:?"+t.dtype+")+").test(String(t.constructor)))};_().set("lib/nurbs/src/utils/is-ndarray",Y);const J=Y,L=function(t){return!!t&&(void 0!==t.data&&Array.isArray(t.shape)&&void 0!==t.offset&&void 0!==t.stride)};_().set("lib/nurbs/src/utils/is-ndarray-like",L);const Z=L,H=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)||void 0!==t.length};_().set("lib/nurbs/src/utils/is-array-like",H);const Q=H;function $(t){if(t){if(J(t)||Z(t))return"generic"===t.dtype?$.GENERIC_NDARRAY:$.NDARRAY;if(Q(t)){for(var e=t;Q(e[0]);e=e[0]);return"x"in e?$.ARRAY_OF_OBJECTS:$.ARRAY_OF_ARRAYS}throw new Error("Unhandled data type. Got type: "+typeof t)}}$.ARRAY_OF_OBJECTS="Obj",$.ARRAY_OF_ARRAYS="Arr",$.NDARRAY="Nd",$.GENERIC_NDARRAY="GenNd",$.PACKED="PackArr";const tt=$;_().set("lib/nurbs/src/utils/infer-type",tt);const et=tt;const nt=function(t,e,n,i,o,s){var r,u,l=[],a=!1;for(r=0;r<t.splineDimension;r++){var h=Q(t.knots)&&Q(t.knots[r]);h&&(a=!0),l.push("Deg"+t.degree[r]+(h?"":"Uniform")+((u=t.boundary[r])[0].toUpperCase()+u.slice(1)))}var c=[[a?"NU":"",t.weights?"RBS":"BS"].join("")+t.dimension+"D",l.join("_")];return i&&c.push(i+"Pts"),o&&c.push(o+"Wts"),s&&c.push(s+"Kts"),e&&c.push("debug"),n&&c.push("chk"),c.join("_")};_().set("lib/nurbs/src/utils/cache-key",nt);const it=nt;var ot=function t(e,n){return function(n,i){void 0===n||Array.isArray(n)||(n=[n]);for(var o=[],s=0;s<n.length;s++)o.push(t.sum(n[s]));if(i)for(n=0;n<o.length;n++)void 0!==i[n]&&(o[n]="("+o[n]+" + "+i[n]+") % "+i[n]);return e+o.join("_")}};ot.sum=function(t){return 0===(t=(t=Array.isArray(t)?t:[t]).filter((function(t){return void 0!==t&&0!==t}))).length&&t.push(0),t.join(" + ")};const st=ot;_().set("lib/nurbs/src/utils/variable",st);const rt=st;var ut=[".x",".y",".z",".w"];function lt(t){return function(e,n){void 0===e||Array.isArray(e)||(e=[e]);for(var i=[],o=0;o<e.length;o++)i.push(rt.sum(e[o]));if(n)for(e=0;e<i.length;e++)void 0!==n[e]&&(i[e]="("+i[e]+" + "+n[e]+") % "+n[e]);return t(i)}}function at(t,e){if(e)switch(et(e)){case et.ARRAY_OF_OBJECTS:return lt((function(e){var n=e.pop();return t+"["+e.join("][")+"]"+ut[n]}));case et.ARRAY_OF_ARRAYS:return lt((function(e){return t+"["+e.join("][")+"]"}));case et.GENERIC_NDARRAY:return lt((function(e){return t+".get("+e.join(",")+")"}));case et.NDARRAY:return lt((function(e){for(var n=[t+"Offset"],i=0;i<e.length;i++)n.push(t+"Stride"+i+" * ("+e[i]+")");return t+"["+n.join(" + ")+"]"}));case et.PACKED:default:return}}const ht=function(t){var e,n={};return(e=at("x",t.points))&&(n.point=e),(e=at("w",t.weights))&&(n.weight=e),(e=at("k",t.knots))&&(n.knot=e),n};_().set("lib/nurbs/src/utils/create-accessors",ht);const ct=ht;var dt=[],gt=[];const ft=function(t,e,n){if(1!==e)throw new Error("Numerical derivative not implemented for order n = "+e+".");var i,o=void 0===arguments[this.splineDimension+3]?1e-4:arguments[this.splineDimension+3];for(dt.length=this.splineDimension,i=0;i<this.splineDimension;i++)dt[i+1]=arguments[i+3];var s,r,u,l=this.domain,a=l[n][0],h=l[n][1],c=dt[n+1],d=(h-a)*o;for("closed"===this.boundary[n]?(s=a+(c-a-d+(u=h-a))%u,r=a+(c-a+d+u)%u,d*=2):(s=Math.min(h,Math.max(a,c-d)),d=(r=Math.min(h,Math.max(a,c+d)))-s),dt[n+1]=s,dt[0]=gt,this.evaluate.apply(null,dt),dt[n+1]=r,dt[0]=t,this.evaluate.apply(null,dt),i=0;i<this.dimension;i++)t[i]=(t[i]-gt[i])/d;return t};_().set("lib/nurbs/src/numerical-derivative",ft);const pt=ft,_t=function(t,e){for(var n=1,i=0,o=[];i<t.length;i++)n*=Array.isArray(t[i])?t[i][1]-t[i][0]:t[i],o[i]=Array.isArray(t[i])?t[i][0]:0;for(var s=0;s<n;s++)for(e(o.slice()),i=t.length-1;i>=0;i--){if(o[i]!==(Array.isArray(t[i])?t[i][1]:t[i])-1){o[i]++;break}o[i]=Array.isArray(t[i])?t[i][0]:0}};_().set("lib/nurbs/src/utils/ndloop",_t);const mt=_t,wt=function(t,e,n,i){var o=[];switch(et(i)){case et.NDARRAY:o.push(" var "+e+" = "+n+".data;"),o.push(" var "+e+"Offset = "+n+".offset;");for(var s=0;s<i.dimension;s++)o.push(" var "+e+"Stride"+s+" = "+n+".stride["+s+"];");break;case et.ARRAY_OF_OBJECTS:case et.ARRAY_OF_ARRAYS:o.push(" var "+e+" = "+n+";")}return o.join("\n")};_().set("lib/nurbs/src/utils/accessor-preamble",wt);const yt=wt,vt=function(t,e,n){if(t){if(Z(t))return e+".shape["+n+"]";for(var i=e,o=0;o<n;o++)i+="[0]";return i+".length"}return"this.size["+n+"]"};_().set("lib/nurbs/src/utils/size-getter",vt);const bt=vt;var Ct={},Nt={};const St=function(t,e,n,i,o,s,r){var u,l,a,h,c,d,g=e.splineDimension,f=e.points,p=e.degree,_=e.weights,m=void 0!==_,w=e.knots,y=e.dimension,v=e.boundary;if(null!=r){Array.isArray(r)||(r=[r]);var b=0;for(u=0;u<g;u++)void 0===r[u]&&(r[u]=0),b+=r[u];if(m&&b>1)throw new Error("Analytical derivative not implemented for rational b-splines with order n = "+b+".")}s&&(t="Basis"+t),r&&(t="Der"+r.join("_")+"_"+t);var C=Ct[t];if(i)var N="function"==typeof i?i:console.log;if(C)return i&&N(Nt[t]),C.bind(e);var S=[],O="evaluate"+t,D=n.point;s&&(D=function(t,e){for(var n=[],i=0;i<t.length;i++){for(var o=t[i],s=[],r=0;r<o.length;r++)0!==o[r]&&s.push(o[r]);o=s.join(" + "),e[i]&&(o="("+o+" + "+e[i]+") % "+e[i]),n.push(o+" === "+V(i))}return"(("+n.join(" && ")+") ? 1 : 0)"});var P=n.weight,T=n.knot,F=rt("k"),I=rt("x"),R=rt("w"),V=rt("i"),x=rt("t"),z=i?"domain":"d",j=rt(i?"size":"s"),k=rt(i?"knotIndex":"j"),A=!0;for(c=0;c<g;c++)Q(w)&&Q(w[c])&&(A=!1);function B(t){S.push(" "+(t||""))}function X(t){i&&B(t)}if(s)var E=[];var q=[];for(u=0;u<g;u++)s&&E.push(V([u])),q.push(x([u]));for(S.push("function "+O+" ("+(s?"":"out, ")+q.join(", ")+(s?", "+E.join(", "):"")+") {"),B("var h, m, a, b;"),o&&(B("var "+z+" = this.domain;"),B("for (var i = 0; i < this.splineDimension; i++) {"),B(" a = arguments[i + 1];"),B(" if (a < "+z+"[i][0] || a > "+z+"[i][1] || a === undefined || isNaN(a)) {"),B(' throw new Error("Invalid Spline parameter in dimension "+i+". Valid domain is ["+'+z+'[i][0]+", "+'+z+'[i][1]+"]. but got t"+i+" = "+arguments[i + 1]+".");'),B(" }"),B("}")),c=0;c<g;c++)B("var "+j(c)+" = "+bt(f,"this.points",c)+";");function K(t,e,n){return"("+t+") ? ("+e+") : ("+n+")"}S.push(yt(e,"x","this.points",f)),m&&S.push(yt(e,"w","this.weights",_)),A||S.push(yt(e,"k","this.knots",w));var M=[];for(c=0;c<g;c++)switch(et(w)){case et.NDARRAY:M[c]=!0;break;case et.ARRAY_OF_ARRAYS:M[c]=Q(w[c])}for(c=0;c<g;c++)if(M[c])for(X("\n // Bisect to locate the knot interval in dimension "+c+"\n"),B("var "+k(c)+" = 0;"),B("h = "+j(c)+";"),B("while(h > "+k(c)+" + 1) {"),B(" m = 0.5 * (h + "+k(c)+") | 0;"),B(" if ("+T([c,"m"])+" > "+x(c)+") h = m;"),B(" else "+k(c)+" = m;"),B("}"),X("\n // Fetch knots for dimension "+c+"\n"),u=1-p[c];u<=p[c];u++)"closed"===v[c]?B(u<0?"var "+F([c,u+p[c]-1])+" = "+K(k(c)+" < "+-u,T([c,0])+" + "+T([c,[j(c),k(c),u]])+" - "+T([c,[j(c)]]),T([c,[k(c),u]]))+";":u>0?"var "+F([c,u+p[c]-1])+" = "+K(k(c)+" + "+u+" > "+j(c),T([c,j(c)])+" + "+T([c,u+" + "+k(c)+" - "+j(c)])+" - "+T([c,0]),T([c,[k(c),u]]))+";":"var "+F([c,u+p[c]-1])+" = "+T([c,[k(c),u]])+";"):B("var "+F([c,u+p[c]-1])+" = "+T([c,[k(c),u]])+";");else{for(X("\n // Directly compute knot interval for dimension "+c+"\n"),"closed"===v[c]?B(k(c)+" = ("+x(c)+" | 0) % "+j(c)+";"):(B(k(c)+" = ("+x(c)+" | 0);"),B("if ("+k(c)+" < "+p[c]+") "+k(c)+" = "+p[c]+";"),B("if ("+k(c)+" > "+j(c)+" - 1) "+k(c)+" = "+j(c)+" - 1;")),X("\n // Compute and clamp knots for dimension "+c+"\n"),u=1-p[c];u<=p[c];u++)B("var "+(d=F([c,u+p[c]-1]))+" = "+k(c)+" + "+u+";");if("clamped"===v[c])for(u=1-p[c];u<=p[c];u++)d=F([c,u+p[c]-1]),u<0&&B("if ("+d+" < "+p[c]+") "+d+" = "+p[c]+";"),u>0&&B("if ("+d+" > "+j(c)+") "+d+" = "+j(c)+";");"closed"===v[c]&&(X("\n // Wrap the B-Spline parameter for closed boundary"),B(x(c)+" %= "+j(c)+";"))}for(c=0,a=[];c<g;c++)a[c]=p[c]+1;for(m&&(X("\n // Fetch weights\n"),mt(a,(function(t){for(var e=[],n=[],i=0;i<g;i++)e[i]=[k(i),t[i]-p[i]],"closed"===v[i]&&t[i]-p[i]<0&&(n[i]=j(i));B("var "+R(t)+" = "+P(e,n)+";")}))),i&&B(m?"\n // Fetch points and project into homogeneous (weighted) coordinates\n":"\n // Fetch points\n"),mt(a,(function(t){for(var e=[],n=[],i=0;i<g;i++)e[i]=[k(i),t[i]-p[i]],"closed"===v[i]&&t[i]-p[i]<0&&(n[i]=j(i));if(s)B(m?"var "+I(t)+" = "+D(e,n)+" * "+R(t)+";":"var "+I(t)+" = "+D(e,n)+";");else for(i=0;i<y;i++){var o=t.concat(i);e[g]=i,B(m?"var "+I(o)+" = "+D(e,n)+" * "+R(t)+";":"var "+I(o)+" = "+D(e,n)+";")}})),X("\n"),X('// Perform De Boor"s algorithm'),c=a.length-1;c>=0;c--)for(a[c]=[p[c],p[c]+1],u=0;u<p[c];u++)for(X("\n // Degree "+p[c]+" evaluation in dimension "+c+", step "+(u+1)+"\n"),l=p[c];l>u;l--){var U=r&&p[c]-u-r[c]<=0;U?(B("m = 1 / ("+F([c,l-u+p[c]-1])+" - "+F([c,l-1])+");"),m&&(B("a = ("+x(c)+" - "+F([c,l-1])+") * m;"),B("b = 1 - a;"))):(B("a = ("+x(c)+" - "+F([c,l-1])+") / ("+F([c,l-u+p[c]-1])+" - "+F([c,l-1])+");"),B("b = 1 - a;")),m&&mt(a,(function(t){var e=t.slice(),n=t.slice();e[c]=l,n[c]=l-1,U&&m&&B("h = "+R(e)+";"),B(R(e)+" = b * "+R(n)+" + a * "+R(e)+";")})),mt(a,(function(t){var e,n,i,o=t.slice(),r=t.slice();if(o[c]=l,r[c]=l-1,U){var a=u+1;if(s)e=m?"h * "+R(r)+" / "+R(o)+" * ":"",n=I(o)+(m?" / h":""),i=I(r)+(m?" / "+R(r):""),B(I(o)+" = "+a+" * "+e+"("+n+" - "+i+") * m;");else{var d=o.slice(),f=r.slice();for(h=0;h<y;h++)d[g]=f[g]=h,e=m?"h * "+R(r)+" / "+R(o)+" * ":"",n=I(d)+(m?" / h":""),i=I(f)+(m?" / "+R(r):""),B(I(d)+" = "+a+" * "+e+"("+n+" - "+i+") * m;")}}else if(s)B(I(o)+" = b * "+I(r)+" + a * "+I(o)+";");else for(h=0;h<y;h++)o[g]=r[g]=h,B(I(o)+" = b * "+I(r)+" + a * "+I(o)+";")})),X("\n")}if(i&&B(m?"\n // Project back from homogeneous coordinates and return final output\n":"\n // Return final output\n"),s)B(m?"return "+I(p)+" / "+R(p)+";":"return "+I(p)+";");else for(c=0;c<y;c++)B(m?"out["+c+"] = "+I(p.concat([c]))+" / "+R(p)+";":"out["+c+"] = "+I(p.concat([c]))+";");if(s||B("return out;"),S.push("}"),i){var G=S.join("\n");N(G),Nt[t]=G}var W=new Function([S.join("\n"),"; return ",O].join(""))();return Ct[t]=W,W.bind(e)};_().set("lib/nurbs/src/evaluate",St);const Ot=St;var Dt={};const Pt=function(t,e,n,i){var o,s,r,u,l,a,h,c,d=Dt[t];if(d)return d.bind(e);var g=[],f="transform"+t;g.push("function "+f+"(m) {"),g.push("var i, w;"),g.push(yt(e,"x","this.points",e.points));var p=rt(i?"size":"s");for(o=0;o<e.splineDimension;o++)g.push("var "+p(o)+" = "+bt(e.points,"this.points",o)+";");for(u=[],o=0;o<e.splineDimension;o++)r="i"+o,u.push(r),g.push("for ("+r+" = "+p(o)+"- 1; "+r+" >= 0; "+r+"--) {");for(o=0;o<e.dimension;o++)g.push("x"+o+" = "+n.point(u.concat([o])));for(l=[],o=0;o<e.dimension;o++)l.push("m["+((e.dimension+1)*(o+1)-1)+"] * x"+o);for(l.push("m["+((e.dimension+1)*(e.dimension+1)-1)+"]"),g.push("var w = ("+l.join(" + ")+") || 1.0;"),o=0;o<e.dimension;o++){for(l=[],a=e.dimension,s=0;s<a;s++)l.push("m["+(s*(a+1)+o)+"] * x"+s);l.push("m["+(s*(a+1)+o)+"]"),c=n.point(u.concat([o])),h="("+l.join(" + ")+") / w",g.push(c+" = "+h+";")}for(o=e.splineDimension-1;o>=0;o--)g.push("}");g.push("return this;"),g.push("}");var _=new Function([g.join("\n"),"; return ",f].join(""))();return i&&console.log(g.join("\n")),Dt[t]=_,_.bind(e)};_().set("lib/nurbs/src/transform",Pt);const Tt=Pt;var Ft={};const It=function(t,e,n,i,o){var s=Ft[t];if(s)return s.bind(e);var r,u,l,a=e.degree,h=e.knots,c=e.splineDimension,d=e.boundary,g=[],f="support"+t,p=n.knot,_=rt("t"),m=i?"domain":"d",w=rt(i?"size":"s"),y=rt(i?"knotIndex":"i"),v=!0;for(l=0;l<c;l++)Q(h)&&Q(h[l])&&(v=!1);function b(t){g.push(" "+(t||""))}var C=[];for(r=0;r<c;r++)C.push(_([r]));g.push("function "+f+" (out, "+C.join(", ")+") {");var N=0;function S(t,e){b(void 0===e?"out["+N+++"] = "+t.join(" + ")+";":"out["+N+++"] = ("+t.join(" + ")+" + "+e+") % "+e+";")}for(b("var h, m;"),b("var c = 0;"),o&&(b("var "+m+" = this.domain;"),b("for (var i = 0; i < this.splineDimension; i++) {"),b(" a = arguments[i + 1];"),b(" if (a < "+m+"[i][0] || a > "+m+"[i][1] || a === undefined || isNaN(a)) {"),b(' throw new Error("Invalid Spline parameter in dimension "+i+". Valid domain is ["+'+m+'[i][0]+", "+'+m+'[i][1]+"]. but got t"+i+" = "+arguments[i + 1]+".");'),b(" }"),b("}")),l=0;l<c;l++)b("var "+w(l)+" = "+bt(e.points,"this.points",l)+";");v||g.push(yt(e,"k","this.knots",h));var O=[];for(l=0;l<c;l++)switch(et(h)){case et.NDARRAY:O[l]=!0;break;case et.ARRAY_OF_ARRAYS:O[l]=Q(h[l])}for(l=0;l<c;l++)O[l]?(b("var "+y(l)+" = 0;"),b("h = "+w(l)+";"),b("while(h > "+y(l)+" + 1) {"),b(" m = 0.5 * (h + "+y(l)+") | 0;"),b(" if ("+p([l,"m"])+" > "+_(l)+") h = m;"),b(" else "+y(l)+" = m;"),b("}")):"closed"===d[l]?b(y(l)+" = ("+_(l)+" | 0) % "+w(l)+";"):(b(y(l)+" = ("+_(l)+" | 0);"),b("if ("+y(l)+" < "+a[l]+") "+y(l)+" = "+a[l]+";"),b("if ("+y(l)+" > "+w(l)+" - 1) "+y(l)+" = "+w(l)+" - 1;"));for(l=0,u=[];l<c;l++)u[l]=a[l]+1;mt(u,(function(t){for(var e=[],n=[],i=0;i<c;i++)e[i]=[y(i),t[i]-a[i]],"closed"===d[i]&&t[i]-a[i]<0&&(n[i]=w(i));for(i=0;i<c;i++)S(e[i],n[i])})),b("out.length = "+N+";"),b("return out;"),g.push("}"),i&&console.log(g.join("\n"));var D=new Function([g.join("\n"),"; return ",f].join(""))();return Ft[t]=D,D.bind(e)};_().set("lib/nurbs/src/support",It);const Rt=It,Vt=window[Symbol.for("X_ITE.X3D-8.6.14")].require("standard/Math/Geometry/Triangle3");var xt=t.n(Vt),zt=[];const jt=function(t,e,n){n=n||{};var i=(t=t||{}).points=t.points||[],o=t.faces=t.faces||[],s=n.haveWeights,r=e.dimension-s;if(Array.isArray(n.resolution))var u=n.resolution;else{var l=void 0===n.resolution?31:n.resolution;u=new Array(e.splineDimension).fill(l)}switch(e.splineDimension){case 1:for(var a=(_=(w=u[0])+!(v="closed"===e.boundary[0]))*r,h=(C=(m=n.domain||e.domain)[0])[1]-C[0],c=0;c<_;++c){var d=C[0]+h*c/w,g=c*r;if(e.evaluate(zt,d),s)for(var f=zt[r],p=0;p<r;++p)i[g+p]=zt[p]/f;else for(p=0;p<r;++p)i[g+p]=zt[p]}i.length=a;break;case 2:var _,m,w=u[0],y=u[1],v="closed"===e.boundary[0],b=y+!(P="closed"===e.boundary[1]),C=(a=(_=w+!v)*b*r,(m=n.domain||e.domain)[0]),N=m[1],S=(h=C[1]-C[0],N[1]-N[0]);for(c=0;c<_;++c){d=C[0]+h*c/w;for(var O=0;O<b;++O){var D=N[0]+S*O/y;g=(c+_*O)*r;if(e.evaluate(zt,d,D),s)for(f=zt[r],p=0;p<r;++p)i[g+p]=zt[p]/f;else for(p=0;p<r;++p)i[g+p]=zt[p]}}i.length=a;v=n.closed[0];var P=n.closed[1],T=0;for(c=0;c<w;++c){var F=c,I=c+1;v&&(I%=w);for(O=0;O<y;++O){var R=O,V=O+1;P&&(V%=y),o[T++]=F+_*R,o[T++]=I+_*R,o[T++]=I+_*V,o[T++]=F+_*R,o[T++]=I+_*V,o[T++]=F+_*V}}o.length=T;break;default:throw new Error("Can only sample contours and surfaces")}return t};_().set("lib/nurbs/extras/sample",jt);const kt=jt;var At={open:"open",closed:"closed",clamped:"clamped"};function Bt(t){return null==t}function Xt(t,e,n,i,o,s){var r,u;!t||Q(t)||J(t)?(s=s||{},this.weights=i,this.knots=n,this.degree=e,this.points=t,this.boundary=o,this.debug=s.debug,this.checkBounds=!!s.checkBounds,Object.defineProperty(this,"size",{value:s.size,writable:!0,configurable:!0})):(s=t,this.debug=t.debug,this.checkBounds=!!t.checkBounds,this.weights=t.weights,this.knots=t.knots,this.degree=t.degree,this.boundary=t.boundary,this.points=t.points,Object.defineProperty(this,"size",{value:s.size,writable:!0,configurable:!0}));var l=et(this.points),a=et(this.weights),h=et(this.knots);if(this.points)switch(l){case et.GENERIC_NDARRAY:case et.NDARRAY:Object.defineProperties(this,{splineDimension:{value:this.points.shape.length-1,writable:!1,configurable:!0},dimension:{value:this.points.shape[this.points.shape.length-1],writable:!1,configurable:!0},size:{get:function(){return this.points.shape.slice(0,this.points.shape.length-1)},set:function(){throw new Error("Cannot assign to read only property 'size'")},configurable:!0}});break;case et.ARRAY_OF_OBJECTS:case et.ARRAY_OF_ARRAYS:var c=0,d=this.size||[];d.length=0;for(var g=this.points;Q(g[0]);g=g[0])c++,d.push(g.length);if(0===c)throw new Error("Expected an array of points");Object.defineProperties(this,{splineDimension:{value:c,writable:!1,configurable:!0},dimension:{value:g.length,writable:!1,configurable:!0},size:{get:function(){var t=[];t.length=0;for(var e=0,n=this.points;e<this.splineDimension;e++,n=n[0])t[e]=n.length;return t},set:function(){throw new Error('Cannot assign to read only property "size"')},configurable:!0}});break;case et.PACKED:default:throw new Error("Expected either a packed array, array of arrays, or ndarray of points")}else{if(void 0===this.size||null===this.size)throw new Error("Either points or a control hull size must be provided.");if(Q(this.size)||Object.defineProperty(this,"size",{value:[this.size],writable:!0,configurable:!0}),0===this.size.length)throw new Error("`size` must be a number or an array of length at least one.");Object.defineProperties(this,{splineDimension:{value:this.size.length,writable:!1,configurable:!0},dimension:{value:0,writable:!1,configurable:!0}})}if(Q(this.degree)){for(r=0;r<this.splineDimension;r++)if(Bt(this.degree[r]))throw new Error("Missing degree in dimension "+(r+1))}else{var f=!Bt(this.degree),p=Bt(this.degree)?2:this.degree;for(this.degree=[],r=0;r<this.splineDimension;r++)if(this.size[r]<=p){if(f)throw new Error("Expected at least "+(p+1)+" points for degree "+p+" spline in dimension "+(r+1)+" but got only "+this.size[r]);this.degree[r]=this.size[r]-1}else this.degree[r]=p}if(u="string"!=typeof this.boundary?"open":this.boundary,!At[u])throw new Error("Boundary type must be one of "+Object.keys(At)+". Got "+u);for(this.boundary=Q(this.boundary)?this.boundary:[],this.boundary.length=this.splineDimension,r=0;r<this.splineDimension;r++)if(this.boundary[r]=Bt(this.boundary[r])?u:this.boundary[r],!At[u])throw new Error("Boundary type must be one of "+Object.keys(At)+". Got "+u+" for dimension "+(r+1));switch(h){case et.ARRAY_OF_ARRAYS:for(Q(this.knots)&&this.knots.length>0&&!Q(this.knots[0])&&(this.knots=[this.knots]),r=0;r<this.splineDimension;r++){if(this.size[r]<=this.degree[r])throw new Error("Expected at least "+(this.degree[r]+1)+" points in dimension "+(r+1)+" but got "+this.size[r]+".");if(Q(this.knots[r])){if("closed"!==this.boundary[r]&&this.knots[r].length!==this.degree[r]+this.size[r]+1)throw new Error("Expected "+(this.degree[r]+this.size[r]+1)+" knots in dimension "+(r+1)+" but got "+this.knots[r].length+".");if("closed"===this.boundary[r]&&this.knots[r].length!==this.size[r]+1&&!(this.knots[r].length===this.size[r]+this.degree[r]+1))throw new Error("Expected "+(this.size[r]+1)+" knots for closed spline in dimension "+(r+1)+" but got "+this.knots[r].length+".")}}case et.NDARRAY:}var _=it(this,this.debug,this.checkBounds,l,a,h);if(_!==this.__cacheKey){this.__cacheKey=_;var m=ct(this);this.evaluate=Ot(this.__cacheKey,this,m,this.debug,this.checkBounds,!1),this.transform=Tt(this.__cacheKey,this,m,this.debug),this.support=Rt(this.__cacheKey,this,m,this.debug,this.checkBounds),this.evaluator=function(t,e){return Ot(this.__cacheKey,this,m,this.debug,this.checkBounds,e,t)}}return this.numericalDerivative=pt.bind(this),this}function Et(){var t,e=[],n=this.points;n?Z(n)&&(t=n.shape):t=this.size;for(var i=0;i<this.splineDimension;i++){var o=t?t[i]:n.length,s=this.degree[i],r="closed"===this.boundary[i];if(this.knots&&this.knots[i]){var u=this.knots[i];e[i]=[u[r?0:s],u[o]]}else e[i]=[r?0:s,o];n&&(n=n[0])}return e}function qt(t,e,n,i,o,s){var r=function(t,e,n,i,o,s){return u(t,e,n,i,o,s),r},u=Xt.bind(r);return Object.defineProperty(r,"domain",{get:Et}),u(t,e,n,i,o,s),r}qt.sample=kt;const Kt=qt;_().set("lib/nurbs/nurbs",Kt);const Mt=Kt;function Ut(t){U.call(this,t),W().call(this,t),this.addType(d().NurbsCurve),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[]}}Ut.prototype=Object.assign(Object.create(U.prototype),W().prototype,{constructor:Ut,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"tessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"closed",new(o().SFBool)),new(r())(d().initializeOnly,"order",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode))]),getTypeName:function(){return"NurbsCurve"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){U.prototype.initialize.call(this),this._controlPoint.addInterest("set_controlPoint__",this),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this)},getTessellation:function(t){return q.getTessellation(this._tessellation.getValue(),t-this._order.getValue())},getClosed:function(t,e,n,i){return!!this._closed.getValue()&&q.getClosed(t,e,n,i)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},tessellate:function(){if(this._order.getValue()<2)return[];if(!this.controlPointNode)return[];if(this.controlPointNode.getSize()<this._order.getValue())return[];const t=this.getVertices(),e=[];if(t.length){const n=t.length;for(let i=0;i<n;i+=8)e.push(t[i],t[i+1],t[i+2]);e.push(t[n-4],t[n-3],t[n-2])}return e},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),o=(i.at(-1),i[0],this._order.getValue()-1),s=this.surface=(this.surface||Mt)({boundary:["open"],degree:[o],knots:[i],points:n,debug:!1});this.sampleOptions.resolution[0]=this.getTessellation(i.length),this.sampleOptions.haveWeights=Boolean(e);const r=Mt.sample(this.mesh,s,this.sampleOptions).points,u=this.getVertices();for(let t=3,e=r.length;t<e;t+=3){const e=t-3;u.push(r[e],r[e+1],r[e+2],1),u.push(r[t],r[t+1],r[t+2],1)}},dispose:function(){U.prototype.dispose.call(this)}});const Gt=Ut;_().set("x_ite/Components/NURBS/NurbsCurve",Gt);const Wt=Gt;function Yt(t){N.call(this,t),this.addType(d().NurbsCurve2D),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[]},this.array=[]}Yt.prototype=Object.assign(Object.create(N.prototype),{constructor:Yt,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"tessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"closed",new(o().SFBool)),new(r())(d().initializeOnly,"order",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().MFVec2d))]),getTypeName:function(){return"NurbsCurve2D"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},getTessellation:function(t){return q.getTessellation(this._tessellation.getValue(),t-this._order.getValue())},getClosed:function(t,e,n,i){return!!this._closed.getValue()&&q.getClosed2D(t,e,n,i)},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints2D(t,e,n,i,o)},tessellate:function(t){const e=this.array;if(e.length=0,this._order.getValue()<2)return e;if(this._controlPoint.length<this._order.getValue())return e;const n=this.getClosed(this._order.getValue(),this._knot,this._weight,this._controlPoint),i=this.getWeights(this.weights,this._controlPoint.length,this._weight),o=this.getControlPoints(this.controlPoints,n,this._order.getValue(),i,this._controlPoint),s=this.getKnots(this.knots,n,this._order.getValue(),this._controlPoint.length,this._knot),r=(s.at(-1),s[0],this._order.getValue()-1),u=this.surface=(this.surface||Mt)({boundary:["open"],degree:[r],knots:[s],points:o,debug:!1});this.sampleOptions.resolution[0]=this.getTessellation(s.length),this.sampleOptions.haveWeights=Boolean(i);const l=Mt.sample(this.mesh,u,this.sampleOptions).points;switch(t){case 0:for(let t=0,n=l.length;t<n;t+=2)e.push(l[t],l[t+1]);break;case 1:for(let t=0,n=l.length;t<n;t+=2)e.push(l[t],0,l[t+1]);break;case 2:for(let t=0,n=l.length;t<n;t+=2)e.push(new(O())(l[t],l[t+1],0))}return e}});const Jt=Yt;_().set("x_ite/Components/NURBS/NurbsCurve2D",Jt);const Lt=Jt,Zt=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Components/Core/X3DChildNode");var Ht=t.n(Zt);const Qt=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Components/Interpolation/OrientationInterpolator");var $t=t.n(Qt);const te=window[Symbol.for("X_ITE.X3D-8.6.14")].require("standard/Math/Numbers/Rotation4");var ee=t.n(te);function ne(t){Ht().call(this,t),this.addType(d().NurbsOrientationInterpolator),this.addChildObjects("rebuild",new(o().SFTime)),this.interpolator=new($t())(t),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[128]}}ne.prototype=Object.assign(Object.create(Ht().prototype),{constructor:ne,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"set_fraction",new(o().SFFloat)),new(r())(d().inputOutput,"order",new(o().SFInt32)(3)),new(r())(d().inputOutput,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().outputOnly,"value_changed",new(o().SFRotation))]),getTypeName:function(){return"NurbsOrientationInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){Ht().prototype.initialize.call(this),this._order.addInterest("requestRebuild",this),this._knot.addInterest("requestRebuild",this),this._weight.addInterest("requestRebuild",this),this._controlPoint.addInterest("set_controlPoint__",this),this._rebuild.addInterest("build",this),this._set_fraction.addFieldInterest(this.interpolator._set_fraction),this.interpolator._value_changed.addFieldInterest(this._value_changed),this.interpolator.setup(),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this),this.requestRebuild()},getClosed:function(t,e,n,i){return!1},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},requestRebuild:function(){this._rebuild.addEvent()},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),o=i.at(-1)-i[0],s=this._order.getValue()-1,r=this.surface=(this.surface||Mt)({boundary:["open"],degree:[s],knots:[i],points:n,debug:!1});this.sampleOptions.haveWeights=Boolean(e);const u=Mt.sample(this.mesh,r,this.sampleOptions).points,l=this.interpolator;l._key.length=0,l._keyValue.length=0;for(let e=0,n=u.length-3;e<n;e+=3){const s=new(O())(u[e+3]-u[e+0],u[e+4]-u[e+1],u[e+5]-u[e+2]);l._key.push(i[0]+e/(n-3+3*t)*o),l._keyValue.push(new(ee())(O().zAxis,s))}t&&(l._key.push(i[0]+o),l._keyValue.push(l._keyValue[0]))}});const ie=ne;_().set("x_ite/Components/NURBS/NurbsOrientationInterpolator",ie);const oe=ie,se=window[Symbol.for("X_ITE.X3D-8.6.14")].require("standard/Math/Algorithm");var re=t.n(se);function ue(t){U.call(this,t),this.addType(d().X3DNurbsSurfaceGeometryNode),this.tessellationScale=1,this.uKnots=[],this.vKnots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[],closed:[]},this.textUKnots=[],this.textVKnots=[],this.textWeights=[],this.texControlPoints=[],this.texMesh={}}ue.prototype=Object.assign(Object.create(U.prototype),{constructor:ue,initialize:function(){U.prototype.initialize.call(this),this._texCoord.addInterest("set_texCoord__",this),this._controlPoint.addInterest("set_controlPoint__",this),this.set_texCoord__(),this.set_controlPoint__()},set_texCoord__:function(){this.texCoordNode?.removeInterest("requestRebuild",this),this.nurbsTexCoordNode?.removeInterest("requestRebuild",this),this.texCoordNode=f()(d().X3DTextureCoordinateNode,this._texCoord),this.nurbsTexCoordNode=f()(d().NurbsTextureCoordinate,this._texCoord),this.texCoordNode?.addInterest("requestRebuild",this),this.nurbsTexCoordNode?.addInterest("requestRebuild",this)},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this)},setTessellationScale:function(t){this.tessellationScale=t,this.requestRebuild()},getUTessellation:function(t){return Math.floor(q.getTessellation(this._uTessellation.getValue(),t-this._uOrder.getValue())*this.tessellationScale)},getVTessellation:function(t){return Math.floor(q.getTessellation(this._vTessellation.getValue(),t-this._vOrder.getValue())*this.tessellationScale)},getUClosed:function(t,e,n,i,o,s){return!!this._uClosed.getValue()&&q.getUClosed(t,e,n,i,o,s)},getVClosed:function(t,e,n,i,o,s){return!!this._vClosed.getValue()&&q.getVClosed(t,e,n,i,o,s)},getUVWeights:function(t,e,n,i){return q.getUVWeights(t,e,n,i)},getTexControlPoints:function(t,e,n,i,o,s,r,u){return q.getTexControlPoints(t,e,n,i,o,s,r,u)},getUVControlPoints:function(t,e,n,i,o,s,r,u,l){return q.getUVControlPoints(t,e,n,i,o,s,r,u,l)},getTrimmingContours:function(){},build:function(){if(this._uOrder.getValue()<2)return;if(this._vOrder.getValue()<2)return;if(this._uDimension.getValue()<this._uOrder.getValue())return;if(this._vDimension.getValue()<this._vOrder.getValue())return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()!==this._uDimension.getValue()*this._vDimension.getValue())return;const t=this.getUClosed(this._uOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),this._uKnot,this._weight,this.controlPointNode),e=this.getVClosed(this._vOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),this._vKnot,this._weight,this.controlPointNode),n=this.getUVWeights(this.weights,this._uDimension.getValue(),this._vDimension.getValue(),this._weight),i=this.getUVControlPoints(this.controlPoints,t,e,this._uOrder.getValue(),this._vOrder.getValue(),this._uDimension.getValue(),this._vDimension.getValue(),n,this.controlPointNode),o=this.getKnots(this.uKnots,t,this._uOrder.getValue(),this._uDimension.getValue(),this._uKnot),s=this.getKnots(this.vKnots,e,this._vOrder.getValue(),this._vDimension.getValue(),this._vKnot),r=(o.at(-1),o[0],s.at(-1),s[0],this._uOrder.getValue()-1),u=this._vOrder.getValue()-1,l=this.surface=(this.surface||Mt)({boundary:["open","open"],degree:[r,u],knots:[o,s],points:i,debug:!1}),a=this.sampleOptions;a.resolution[0]=this.getUTessellation(o.length),a.resolution[1]=this.getVTessellation(s.length),a.closed[0]=t,a.closed[1]=e,a.domain=void 0,a.haveWeights=Boolean(n),a.trimmingContours=this.getTrimmingContours();const h=Mt.sample(this.mesh,l,a),c=h.faces,d=h.points,g=this.getVertices();for(let t=0,e=c.length;t<e;++t){const e=3*c[t];g.push(d[e],d[e+1],d[e+2],1)}this.buildNurbsTexCoords(t,e,this._uOrder.getValue(),this._vOrder.getValue(),o,s,this._uDimension.getValue(),this._vDimension.getValue(),l.domain),this.buildNormals(c,d),this.setSolid(this._solid.getValue()),this.setCCW(!0)},buildNurbsTexCoords:function(){const t=[],e=[],n=[[[0,0,0,1],[0,1,0,1]],[[1,0,0,1],[1,1,0,1]]];function i(t,e){return t[0]=t[1]=e[0],t[2]=t[3]=e.at(-1),t}return function(o,s,r,u,l,a,h,c,d){const g=this.sampleOptions;if(this.texCoordNode&&this.texCoordNode.getSize()===h*c)var f=r-1,p=u-1,_=l,m=a,w=this.getTexControlPoints(this.texControlPoints,o,s,r,u,h,c,this.texCoordNode);else if(this.nurbsTexCoordNode&&this.nurbsTexCoordNode.isValid()){var y=this.nurbsTexCoordNode,v=(f=y._uOrder.getValue()-1,p=y._vOrder.getValue()-1,_=this.getKnots(this.texUKnots,!1,y._uOrder.getValue(),y._uDimension.getValue(),y._uKnot),m=this.getKnots(this.texVKnots,!1,y._vOrder.getValue(),y._vDimension.getValue(),y._vKnot),this.getUVWeights(this.texWeights,y._uDimension.getValue(),y._vDimension.getValue(),y._weight));w=y.getControlPoints(v)}else{f=1,p=1,_=i(t,l),m=i(e,a),w=n;g.domain=d}const b=this.texSurface=(this.texSurface||Mt)({boundary:["open","open"],degree:[f,p],knots:[_,m],points:w});g.closed[0]=!1,g.closed[1]=!1,g.haveWeights=!1;const C=Mt.sample(this.texMesh,b,g),N=C.faces,S=C.points,O=this.getTexCoords();for(let t=0,e=N.length;t<e;++t){const e=4*N[t];O.push(S[e],S[e+1],S[e+2],S[e+3])}this.getMultiTexCoords().push(this.getTexCoords())}}(),buildNormals:function(t,e){const n=this.createNormals(t,e),i=this.getNormals();for(const t of n)i.push(t.x,t.y,t.z)},createNormals:function(t,e){const n=this.createFaceNormals(t,e),i=[];for(let e=0,n=t.length;e<n;++e){const n=t[e];let o=i[n];o||(o=i[n]=[]),o.push(e)}return this.refineNormals(i,n,re().radians(85))},createFaceNormals:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0),n=new(O())(0,0,0);return function(i,o){const s=this.faceNormals||[],r=i.length;for(let u=0;u<r;u+=3){const r=3*i[u],l=3*i[u+1],a=3*i[u+2];t.set(o[r],o[r+1],o[r+2]),e.set(o[l],o[l+1],o[l+2]),n.set(o[a],o[a+1],o[a+2]);const h=xt().normal(t,e,n,s[u]||new(O())(0,0,0));s[u]=h,s[u+1]=h,s[u+2]=h}return s.length=r,s}}()});const le=ue;_().set("x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode",le);const ae=le;function he(t){ae.call(this,t),this.addType(d().NurbsPatchSurface)}he.prototype=Object.assign(Object.create(ae.prototype),{constructor:he,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().inputOutput,"uTessellation",new(o().SFInt32)),new(r())(d().inputOutput,"vTessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"uClosed",new(o().SFBool)),new(r())(d().initializeOnly,"vClosed",new(o().SFBool)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"texCoord",new(o().SFNode)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode))]),getTypeName:function(){return"NurbsPatchSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]}});const ce=he;_().set("x_ite/Components/NURBS/NurbsPatchSurface",ce);const de=ce,ge=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Components/Interpolation/PositionInterpolator");var fe=t.n(ge);function pe(t){Ht().call(this,t),this.addType(d().NurbsPositionInterpolator),this.addChildObjects("rebuild",new(o().SFTime)),this.interpolator=new(fe())(t),this.knots=[],this.weights=[],this.controlPoints=[],this.mesh={},this.sampleOptions={resolution:[128]}}pe.prototype=Object.assign(Object.create(Ht().prototype),{constructor:pe,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"set_fraction",new(o().SFFloat)),new(r())(d().inputOutput,"order",new(o().SFInt32)(3)),new(r())(d().inputOutput,"knot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().outputOnly,"value_changed",new(o().SFVec3f))]),getTypeName:function(){return"NurbsPositionInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){Ht().prototype.initialize.call(this),this._order.addInterest("requestRebuild",this),this._knot.addInterest("requestRebuild",this),this._weight.addInterest("requestRebuild",this),this._controlPoint.addInterest("set_controlPoint__",this),this._rebuild.addInterest("build",this),this._set_fraction.addFieldInterest(this.interpolator._set_fraction),this.interpolator._value_changed.addFieldInterest(this._value_changed),this.interpolator.setup(),this.set_controlPoint__()},set_controlPoint__:function(){this.controlPointNode&&this.controlPointNode.removeInterest("requestRebuild",this),this.controlPointNode=f()(d().X3DCoordinateNode,this._controlPoint),this.controlPointNode&&this.controlPointNode.addInterest("requestRebuild",this),this.requestRebuild()},getClosed:function(t,e,n,i){return!1},getKnots:function(t,e,n,i,o){return q.getKnots(t,e,n,i,o)},getWeights:function(t,e,n){return q.getWeights(t,e,n)},getControlPoints:function(t,e,n,i,o){return q.getControlPoints(t,e,n,i,o)},requestRebuild:function(){this._rebuild.addEvent()},build:function(){if(this._order.getValue()<2)return;if(!this.controlPointNode)return;if(this.controlPointNode.getSize()<this._order.getValue())return;const t=this.getClosed(this._order.getValue(),this._knot,this._weight,this.controlPointNode),e=this.getWeights(this.weights,this.controlPointNode.getSize(),this._weight),n=this.getControlPoints(this.controlPoints,t,this._order.getValue(),e,this.controlPointNode),i=this.getKnots(this.knots,t,this._order.getValue(),this.controlPointNode.getSize(),this._knot),s=i.at(-1)-i[0],r=this._order.getValue()-1,u=this.surface=(this.surface||Mt)({boundary:["open"],degree:[r],knots:[i],points:n,debug:!1});this.sampleOptions.haveWeights=Boolean(e);const l=Mt.sample(this.mesh,u,this.sampleOptions).points,a=this.interpolator;a._key.length=0,a._keyValue.length=0;for(let t=0,e=l.length;t<e;t+=3)a._key.push(i[0]+t/(e-3)*s),a._keyValue.push(new(o().SFVec3f)(l[t],l[t+1],l[t+2]))}});const _e=pe;_().set("x_ite/Components/NURBS/NurbsPositionInterpolator",_e);const me=_e,we=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Components/Grouping/X3DBoundedObject");var ye=t.n(we);function ve(t){Ht().call(this,t),ye().call(this,t),this.addType(d().NurbsSet),this.geometryNodes=[]}function be(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}ve.prototype=Object.assign(Object.create(Ht().prototype),ye().prototype,{constructor:ve,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOutput,"tessellationScale",new(o().SFFloat)(1)),new(r())(d().inputOutput,"visible",new(o().SFBool)(!0)),new(r())(d().inputOutput,"bboxDisplay",new(o().SFBool)),new(r())(d().initializeOnly,"bboxSize",new(o().SFVec3f)(-1,-1,-1)),new(r())(d().initializeOnly,"bboxCenter",new(o().SFVec3f)),new(r())(d().inputOnly,"addGeometry",new(o().MFNode)),new(r())(d().inputOnly,"removeGeometry",new(o().MFNode)),new(r())(d().inputOutput,"geometry",new(o().MFNode))]),getTypeName:function(){return"NurbsSet"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){Ht().prototype.initialize.call(this),ye().prototype.initialize.call(this),this._tessellationScale.addInterest("set_tessellationScale__",this),this._addGeometry.addInterest("set_addGeometry__",this),this._removeGeometry.addInterest("set_removeGeometry__",this),this._geometry.addInterest("set_geometry__",this),this.set_geometry__()},getBBox:function(t,e){for(const e of this.geometryNodes)t.add(e.getBBox());return t},set_tessellationScale__:function(){const t=Math.max(0,this._tessellationScale.getValue());for(const e of this.geometryNodes)e.setTessellationScale(t)},set_addGeometry__:function(){this._addGeometry.setTainted(!0),this._addGeometry.erase(be(this._addGeometry,0,this._addGeometry.length,this._geometry,0,this._geometry.length),this._addGeometry.length);for(const t of this._addGeometry)this._geometry.push(t);this._addGeometry.length=0,this._addGeometry.setTainted(!1)},set_removeGeometry__:function(){this._removeGeometry.setTainted(!0),this._geometry.erase(be(this._geometry,0,this._geometry.length,this._removeGeometry,0,this._removeGeometry.length),this._geometry.length),this._removeGeometry.length=0,this._removeGeometry.setTainted(!1)},set_geometry__:function(){for(const t of this.geometryNodes)t.setTessellationScale(1);this.geometryNodes.length=0;for(const t of this._geometry){const e=f()(d().X3DNurbsSurfaceGeometryNode,t);e&&this.geometryNodes.push(e)}this.set_tessellationScale__()},dispose:function(){ye().prototype.dispose.call(this),Ht().prototype.dispose.call(this)}});const Ce=ve;_().set("x_ite/Components/NURBS/NurbsSet",Ce);const Ne=Ce,Se=window[Symbol.for("X_ITE.X3D-8.6.14")].require("standard/Math/Geometry/Line3");var Oe=t.n(Se);const De={isPointInTriangle:function(t,e,n,i){const o=(e.y-n.y)*(t.x-n.x)+(n.x-e.x)*(t.y-n.y);if(0==o)return!1;const s=((e.y-n.y)*(i.x-n.x)+(n.x-e.x)*(i.y-n.y))/o;if(s<0||s>1)return!1;const r=((n.y-t.y)*(i.x-n.x)+(t.x-n.x)*(i.y-n.y))/o;if(r<0||r>1)return!1;const u=1-s-r;return!(u<0||u>1)}};_().set("standard/Math/Geometry/Triangle2",De);const Pe=De;function Te(t){Ht().call(this,t),this.addType(d().NurbsSurfaceInterpolator),this.geometry=new de(t)}Te.prototype=Object.assign(Object.create(Ht().prototype),{constructor:Te,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().inputOnly,"set_fraction",new(o().SFVec2f)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().outputOnly,"normal_changed",new(o().SFVec3f)),new(r())(d().outputOnly,"position_changed",new(o().SFVec3f))]),getTypeName:function(){return"NurbsSurfaceInterpolator"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"children"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){this._set_fraction.addInterest("set_fraction__",this),this._uOrder.addFieldInterest(this.geometry._uOrder),this._vOrder.addFieldInterest(this.geometry._vOrder),this._uDimension.addFieldInterest(this.geometry._uDimension),this._vDimension.addFieldInterest(this.geometry._vDimension),this._uKnot.addFieldInterest(this.geometry._uKnot),this._vKnot.addFieldInterest(this.geometry._vKnot),this._weight.addFieldInterest(this.geometry._weight),this._controlPoint.addFieldInterest(this.geometry._controlPoint),this.geometry._uTessellation=128,this.geometry._vTessellation=128,this.geometry._uOrder=this._uOrder,this.geometry._vOrder=this._vOrder,this.geometry._uDimension=this._uDimension,this.geometry._vDimension=this._vDimension,this.geometry._uKnot=this._uKnot,this.geometry._vKnot=this._vKnot,this.geometry._weight=this._weight,this.geometry._controlPoint=this._controlPoint,this.geometry.setup()},set_fraction__:function(){const t=new(O())(0,0,0),e=new(O())(0,0,0),n=new(O())(0,0,0),i=new(O())(0,0,0),o=new(Oe())(O().Zero,O().zAxis),s={};return function(){const r=this._set_fraction.getValue(),u=this.geometry.getTexCoords(),l=this.geometry.getNormals(),a=this.geometry.getVertices();for(let h=0,c=0,d=u.length;h<d;h+=12,c+=9)if(t.set(u[h+0],u[h+1],0),e.set(u[h+4],u[h+5],0),n.set(u[h+7],u[h+9],0),Pe.isPointInTriangle(t,e,n,r)&&(o.set(i.set(r.x,r.y,0),O().zAxis),o.intersectsTriangle(t,e,n,s))){const t=s.u,e=s.v,n=s.t,i=new(O())(n*l[c+0]+t*l[c+3]+e*l[c+6],n*l[c+1]+t*l[c+4]+e*l[c+7],n*l[c+2]+t*l[c+5]+e*l[c+8]),o=new(O())(n*a[h+0]+t*a[h+4]+e*a[h+8],n*a[h+1]+t*a[h+5]+e*a[h+9],n*a[h+2]+t*a[h+6]+e*a[h+10]);this._normal_changed=i,this._position_changed=o}}}()});const Fe=Te;_().set("x_ite/Components/NURBS/NurbsSurfaceInterpolator",Fe);const Ie=Fe,Re=window[Symbol.for("X_ITE.X3D-8.6.14")].require("x_ite/Components/Geometry3D/Extrusion");var Ve=t.n(Re);function xe(t){U.call(this,t),this.addType(d().NurbsSweptSurface),this.extrusion=new(Ve())(t)}xe.prototype=Object.assign(Object.create(U.prototype),{constructor:xe,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().initializeOnly,"ccw",new(o().SFBool)(!0)),new(r())(d().inputOutput,"crossSectionCurve",new(o().SFNode)),new(r())(d().inputOutput,"trajectoryCurve",new(o().SFNode))]),getTypeName:function(){return"NurbsSweptSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){U.prototype.initialize.call(this),this._crossSectionCurve.addInterest("set_crossSectionCurve__",this),this._trajectoryCurve.addInterest("set_trajectoryCurve__",this);const t=this.extrusion;t._beginCap=!1,t._endCap=!1,t._solid=!0,t._ccw=!0,t._convex=!0,t._creaseAngle=Math.PI,t.setup(),t._crossSection.setTainted(!0),t._spine.setTainted(!0),this.set_crossSectionCurve__(),this.set_trajectoryCurve__()},set_crossSectionCurve__:function(){this.crossSectionCurveNode&&this.crossSectionCurveNode.removeInterest("requestRebuild",this),this.crossSectionCurveNode=f()(d().X3DNurbsControlCurveNode,this._crossSectionCurve),this.crossSectionCurveNode&&this.crossSectionCurveNode.addInterest("requestRebuild",this)},set_trajectoryCurve__:function(){this.trajectoryCurveNode&&this.trajectoryCurveNode._rebuild.removeInterest("requestRebuild",this),this.trajectoryCurveNode=f()(d().NurbsCurve,this._trajectoryCurve),this.trajectoryCurveNode&&this.trajectoryCurveNode._rebuild.addInterest("requestRebuild",this)},build:function(){if(!this.crossSectionCurveNode)return;if(!this.trajectoryCurveNode)return;const t=this.extrusion;if(t._crossSection=this.crossSectionCurveNode.tessellate(0),t._spine=this.trajectoryCurveNode.tessellate(0),t.rebuild(),this.getColors().assign(t.getColors()),this.getTexCoords().assign(t.getTexCoords()),this.getNormals().assign(t.getNormals()),this.getVertices().assign(t.getVertices()),this.getMultiTexCoords().push(this.getTexCoords()),!this._ccw.getValue()){const t=this.getNormals();for(let e=0,n=t.length;e<n;++e)t[e]=-t[e]}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}});const ze=xe;_().set("x_ite/Components/NURBS/NurbsSweptSurface",ze);const je=ze;function ke(t){U.call(this,t),this.addType(d().NurbsSwungSurface),this.extrusion=new(Ve())(t)}ke.prototype=Object.assign(Object.create(U.prototype),{constructor:ke,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().initializeOnly,"ccw",new(o().SFBool)(!0)),new(r())(d().inputOutput,"profileCurve",new(o().SFNode)),new(r())(d().inputOutput,"trajectoryCurve",new(o().SFNode))]),getTypeName:function(){return"NurbsSwungSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){U.prototype.initialize.call(this),this._profileCurve.addInterest("set_profileCurve__",this),this._trajectoryCurve.addInterest("set_trajectoryCurve__",this);const t=this.extrusion;t._beginCap=!1,t._endCap=!1,t._solid=!0,t._ccw=!0,t._convex=!0,t._creaseAngle=Math.PI,t.setup(),t._crossSection.setTainted(!0),t._spine.setTainted(!0),this.set_profileCurve__(),this.set_trajectoryCurve__()},set_profileCurve__:function(){this.profileCurveNode&&this.profileCurveNode.removeInterest("requestRebuild",this),this.profileCurveNode=f()(d().X3DNurbsControlCurveNode,this._profileCurve),this.profileCurveNode&&this.profileCurveNode.addInterest("requestRebuild",this)},set_trajectoryCurve__:function(){this.trajectoryCurveNode&&this.trajectoryCurveNode.removeInterest("requestRebuild",this),this.trajectoryCurveNode=f()(d().X3DNurbsControlCurveNode,this._trajectoryCurve),this.trajectoryCurveNode&&this.trajectoryCurveNode.addInterest("requestRebuild",this)},build:function(){if(!this.profileCurveNode)return;if(!this.trajectoryCurveNode)return;const t=this.extrusion;if(t._crossSection=this.profileCurveNode.tessellate(0),t._spine=this.trajectoryCurveNode.tessellate(1),t.rebuild(),this.getColors().assign(t.getColors()),this.getTexCoords().assign(t.getTexCoords()),this.getNormals().assign(t.getNormals()),this.getVertices().assign(t.getVertices()),this.getMultiTexCoords().push(this.getTexCoords()),!this._ccw.getValue()){const t=this.getNormals();for(let e=0,n=t.length;e<n;++e)t[e]=-t[e]}this.setSolid(this._solid.getValue()),this.setCCW(this._ccw.getValue())}});const Ae=ke;_().set("x_ite/Components/NURBS/NurbsSwungSurface",Ae);const Be=Ae;function Xe(t){h().call(this,t),this.addType(d().NurbsTextureCoordinate),this.controlPoints=[]}Xe.prototype=Object.assign(Object.create(h().prototype),{constructor:Xe,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"controlPoint",new(o().MFVec2f))]),getTypeName:function(){return"NurbsTextureCoordinate"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"texCoord"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){h().prototype.initialize.call(this)},getControlPoints:function(t){const e=this._controlPoint.getValue(),n=this.controlPoints;for(let i=0,o=this._uDimension.getValue();i<o;++i){let s=n[i];s||(s=n[i]=[]);for(let n=0,r=this._vDimension.getValue();n<r;++n){const r=n*o+i,u=s[n]||new(X()),l=2*r;s[n]=u.set(e[l],e[l+1],0,t?t[r]:1)}}return n},isValid:function(){return!(this._uOrder.getValue()<2)&&(!(this._vOrder.getValue()<2)&&(!(this._uDimension.getValue()<this._uOrder.getValue())&&(!(this._vDimension.getValue()<this._vOrder.getValue())&&this._controlPoint.length===this._uDimension.getValue()*this._vDimension.getValue())))}});const Ee=Xe;_().set("x_ite/Components/NURBS/NurbsTextureCoordinate",Ee);const qe=Ee;function Ke(t){ae.call(this,t),this.addType(d().NurbsTrimmedSurface),this.trimmingContourNodes=[]}function Me(t,e,n,i,o,s){const r=new Set;for(let t=o;t<s;++t)r.add(i[t]);return t.remove(e,n,(function(t){return r.has(t)}))}Ke.prototype=Object.assign(Object.create(ae.prototype),{constructor:Ke,[Symbol.for("X_ITE.X3DBaseNode.fieldDefinitions")]:new(l())([new(r())(d().inputOutput,"metadata",new(o().SFNode)),new(r())(d().initializeOnly,"solid",new(o().SFBool)(!0)),new(r())(d().inputOutput,"uTessellation",new(o().SFInt32)),new(r())(d().inputOutput,"vTessellation",new(o().SFInt32)),new(r())(d().initializeOnly,"uClosed",new(o().SFBool)),new(r())(d().initializeOnly,"vClosed",new(o().SFBool)),new(r())(d().initializeOnly,"uOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"vOrder",new(o().SFInt32)(3)),new(r())(d().initializeOnly,"uDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"vDimension",new(o().SFInt32)),new(r())(d().initializeOnly,"uKnot",new(o().MFDouble)),new(r())(d().initializeOnly,"vKnot",new(o().MFDouble)),new(r())(d().inputOutput,"weight",new(o().MFDouble)),new(r())(d().inputOutput,"texCoord",new(o().SFNode)),new(r())(d().inputOutput,"controlPoint",new(o().SFNode)),new(r())(d().inputOnly,"addTrimmingContour",new(o().MFNode)),new(r())(d().inputOnly,"removeTrimmingContour",new(o().MFNode)),new(r())(d().inputOutput,"trimmingContour",new(o().MFNode))]),getTypeName:function(){return"NurbsTrimmedSurface"},getComponentName:function(){return"NURBS"},getContainerField:function(){return"geometry"},getSpecificationRange:function(){return["3.0","Infinity"]},initialize:function(){ae.prototype.initialize.call(this),this._addTrimmingContour.addInterest("set_addTrimmingContour__",this),this._removeTrimmingContour.addInterest("set_removeTrimmingContour__",this),this._trimmingContour.addInterest("set_trimmingContour__",this),this.set_trimmingContour__()},set_addTrimmingContour__:function(){this._addTrimmingContour.setTainted(!0),this._addTrimmingContour.erase(Me(this._addTrimmingContour,0,this._addTrimmingContour.length,this._trimmingContour,0,this._trimmingContour.length),this._addTrimmingContour.length);for(const t of this._addTrimmingContour)this._trimmingContour.push(t);this._addTrimmingContour.length=0,this._addTrimmingContour.setTainted(!1)},set_removeTrimmingContour__:function(){this._removeTrimmingContour.setTainted(!0),this._trimmingContour.erase(Me(this._trimmingContour,0,this._trimmingContour.length,this._removeTrimmingContour,0,this._removeTrimmingContour.length),this._trimmingContour.length),this._removeTrimmingContour.length=0,this._removeTrimmingContour.setTainted(!1)},set_trimmingContour__:function(){const t=this.trimmingContourNodes;t.length=0;for(const e of this._trimmingContour){const n=f()(d().Contour2D,e);n&&t.push(n)}},getTrimmingContours:function(){const t=this.trimmingContourNodes,e=[];for(const n of t)n.addTrimmingContour(e);return e}});const Ue=Ke;_().set("x_ite/Components/NURBS/NurbsTrimmedSurface",Ue);const Ge=Ue;n().addComponent({name:"NURBS",types:{Contour2D:v,ContourPolyline2D:T,CoordinateDouble:x,NurbsCurve:Wt,NurbsCurve2D:Lt,NurbsOrientationInterpolator:oe,NurbsPatchSurface:de,NurbsPositionInterpolator:me,NurbsSet:Ne,NurbsSurfaceInterpolator:Ie,NurbsSweptSurface:je,NurbsSwungSurface:Be,NurbsTextureCoordinate:qe,NurbsTrimmedSurface:Ge},abstractTypes:{X3DNurbsControlCurveNode:N,X3DNurbsSurfaceGeometryNode:ae,X3DParametricGeometryNode:U}});const We=void 0;_().set("assets/components/NURBS",We)})();