@kitware/vtk.js 19.2.13 → 19.3.0

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 (717) hide show
  1. package/Common/Core/Base64.js +1 -1
  2. package/Common/Core/CellArray.js +2 -3
  3. package/Common/Core/ClassHierarchy.js +1 -1
  4. package/Common/Core/DataArray/Constants.js +1 -2
  5. package/Common/Core/DataArray.js +3 -4
  6. package/Common/Core/Endian.js +1 -2
  7. package/Common/Core/ImageHelper.js +1 -1
  8. package/Common/Core/LookupTable.js +1 -2
  9. package/Common/Core/MatrixBuilder.js +1 -1
  10. package/Common/Core/Points.js +1 -2
  11. package/Common/Core/PriorityQueue.js +1 -2
  12. package/Common/Core/ProgressHandler.js +1 -2
  13. package/Common/Core/ScalarsToColors/Constants.js +1 -2
  14. package/Common/Core/ScalarsToColors.js +2 -3
  15. package/Common/Core/StringArray.js +1 -2
  16. package/Common/Core/URLExtract.js +1 -1
  17. package/Common/Core/VariantArray.js +1 -2
  18. package/Common/Core.js +1 -1
  19. package/Common/DataModel/BoundingBox.js +2 -3
  20. package/Common/DataModel/Box.js +2 -3
  21. package/Common/DataModel/CardinalSpline1D.js +1 -2
  22. package/Common/DataModel/Cell.js +1 -2
  23. package/Common/DataModel/CellLinks.js +26 -27
  24. package/Common/DataModel/CellTypes/Constants.js +1 -2
  25. package/Common/DataModel/CellTypes.js +2 -3
  26. package/Common/DataModel/Cone.js +1 -2
  27. package/Common/DataModel/Cylinder.js +2 -3
  28. package/Common/DataModel/DataSet/Constants.js +1 -2
  29. package/Common/DataModel/DataSet.js +2 -3
  30. package/Common/DataModel/DataSetAttributes/Constants.js +1 -2
  31. package/Common/DataModel/DataSetAttributes/FieldData.js +1 -2
  32. package/Common/DataModel/DataSetAttributes.js +2 -3
  33. package/Common/DataModel/ITKHelper.js +1 -1
  34. package/Common/DataModel/ImageData.js +1 -2
  35. package/Common/DataModel/ImplicitBoolean/Constants.js +1 -2
  36. package/Common/DataModel/ImplicitBoolean.js +2 -3
  37. package/Common/DataModel/KochanekSpline1D.js +1 -2
  38. package/Common/DataModel/Line/Constants.js +1 -2
  39. package/Common/DataModel/Line.js +2 -3
  40. package/Common/DataModel/Molecule.js +1 -2
  41. package/Common/DataModel/PiecewiseFunction.js +1 -2
  42. package/Common/DataModel/Plane.js +2 -3
  43. package/Common/DataModel/PointSet.js +1 -2
  44. package/Common/DataModel/PolyData/Constants.js +1 -2
  45. package/Common/DataModel/PolyData.js +1 -2
  46. package/Common/DataModel/Polygon.js +1 -2
  47. package/Common/DataModel/SelectionNode/Constants.js +1 -2
  48. package/Common/DataModel/SelectionNode.js +2 -3
  49. package/Common/DataModel/Sphere.js +2 -3
  50. package/Common/DataModel/Spline1D.js +1 -2
  51. package/Common/DataModel/Spline3D/Constants.js +1 -2
  52. package/Common/DataModel/Spline3D.js +1 -2
  53. package/Common/DataModel/StructuredData/Constants.js +1 -2
  54. package/Common/DataModel/StructuredData.js +2 -3
  55. package/Common/DataModel/Triangle.js +2 -3
  56. package/Common/DataModel.js +1 -1
  57. package/Common/System/MobileVR/headsets.js +1 -1
  58. package/Common/System/MobileVR.js +1 -1
  59. package/Common/System/TimerLog.js +1 -2
  60. package/Common/System.js +1 -1
  61. package/Common/Transform/LandmarkTransform/Constants.js +1 -2
  62. package/Common/Transform/LandmarkTransform.js +2 -3
  63. package/Common/Transform.js +1 -1
  64. package/Common/index.js +1 -1
  65. package/Filters/Core/Cutter.js +3 -4
  66. package/Filters/Core.js +1 -1
  67. package/Filters/Cornerstone/ImageDataToCornerstoneImage.js +1 -2
  68. package/Filters/Cornerstone.js +1 -1
  69. package/Filters/General/AppendPolyData.js +1 -2
  70. package/Filters/General/Calculator.js +2 -3
  71. package/Filters/General/ClosedPolyLineToSurfaceFilter.js +1 -2
  72. package/Filters/General/ImageCropFilter.js +1 -2
  73. package/Filters/General/ImageMarchingCubes/caseTable.js +1 -1
  74. package/Filters/General/ImageMarchingCubes.js +1 -2
  75. package/Filters/General/ImageMarchingSquares/caseTable.js +1 -1
  76. package/Filters/General/ImageMarchingSquares.js +1 -2
  77. package/Filters/General/ImageOutlineFilter.js +1 -2
  78. package/Filters/General/ImageSliceFilter.js +1 -2
  79. package/Filters/General/ImageStreamline.js +1 -2
  80. package/Filters/General/LineFilter.js +1 -2
  81. package/Filters/General/MoleculeToRepresentation.js +1 -2
  82. package/Filters/General/OutlineFilter.js +1 -2
  83. package/Filters/General/PaintFilter/PaintFilter.worker.js +3 -3
  84. package/Filters/General/PaintFilter.js +3 -4
  85. package/Filters/General/ScalarToRGBA.js +1 -2
  86. package/Filters/General/TriangleFilter.js +1 -2
  87. package/Filters/General/TubeFilter/Constants.js +1 -2
  88. package/Filters/General/TubeFilter.js +1 -2
  89. package/Filters/General/WarpScalar.js +1 -2
  90. package/Filters/General/WindowedSincPolyDataFilter.js +43 -44
  91. package/Filters/General.js +1 -1
  92. package/Filters/Sources/Arrow2DSource/Constants.js +1 -2
  93. package/Filters/Sources/Arrow2DSource.js +2 -3
  94. package/Filters/Sources/ArrowSource.js +1 -2
  95. package/Filters/Sources/CircleSource.js +2 -3
  96. package/Filters/Sources/ConcentricCylinderSource.js +1 -2
  97. package/Filters/Sources/ConeSource.js +1 -2
  98. package/Filters/Sources/CubeSource.js +1 -2
  99. package/Filters/Sources/Cursor3D.js +12 -13
  100. package/Filters/Sources/CylinderSource.js +1 -2
  101. package/Filters/Sources/ImageGridSource.js +1 -2
  102. package/Filters/Sources/LineSource.js +1 -2
  103. package/Filters/Sources/PlaneSource.js +1 -2
  104. package/Filters/Sources/PointSource.js +1 -2
  105. package/Filters/Sources/RTAnalyticSource.js +1 -2
  106. package/Filters/Sources/SLICSource.js +1 -2
  107. package/Filters/Sources/SphereSource.js +1 -2
  108. package/Filters/Sources/ViewFinderSource.js +1 -2
  109. package/Filters/Sources.js +1 -1
  110. package/Filters/Texture/TextureMapToPlane.js +1 -2
  111. package/Filters/Texture/TextureMapToSphere.js +1 -2
  112. package/Filters/Texture.js +1 -1
  113. package/Filters/index.js +1 -1
  114. package/IO/Core/BinaryHelper.js +1 -1
  115. package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +1 -1
  116. package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +1 -1
  117. package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +3 -3
  118. package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js +1 -1
  119. package/IO/Core/DataAccessHelper.js +1 -2
  120. package/IO/Core/HttpDataSetReader.js +1 -2
  121. package/IO/Core/HttpDataSetSeriesReader.js +1 -2
  122. package/IO/Core/HttpSceneLoader.js +2 -3
  123. package/IO/Core/ImageStream/DefaultProtocol.js +1 -1
  124. package/IO/Core/ImageStream/ViewStream.js +1 -2
  125. package/IO/Core/ImageStream.js +1 -2
  126. package/IO/Core/ResourceLoader.js +1 -2
  127. package/IO/Core/Serializer/ArraySerializer.js +1 -2
  128. package/IO/Core/Serializer/FieldDataSerializer.js +1 -1
  129. package/IO/Core/Serializer/ImageDataSerializer.js +1 -1
  130. package/IO/Core/Serializer/PolyDataSerializer.js +1 -1
  131. package/IO/Core/Serializer.js +1 -1
  132. package/IO/Core/WSLinkClient.js +1 -2
  133. package/IO/Core/ZipMultiDataSetReader.js +3 -4
  134. package/IO/Core/ZipMultiDataSetWriter.js +3 -4
  135. package/IO/Core.js +1 -1
  136. package/IO/Geometry/DracoReader.js +1 -2
  137. package/IO/Geometry/PLYReader.js +1 -2
  138. package/IO/Geometry/STLReader.js +1 -2
  139. package/IO/Geometry/STLWriter/Constants.js +1 -2
  140. package/IO/Geometry/STLWriter.js +2 -3
  141. package/IO/Geometry.js +1 -1
  142. package/IO/Legacy/LegacyAsciiParser.js +1 -1
  143. package/IO/Legacy/PolyDataReader.js +1 -2
  144. package/IO/Legacy.js +1 -1
  145. package/IO/Misc/ElevationReader.js +1 -2
  146. package/IO/Misc/HttpDataSetLODsLoader.js +1 -2
  147. package/IO/Misc/ITKImageReader.js +1 -2
  148. package/IO/Misc/ITKPolyDataReader.js +1 -2
  149. package/IO/Misc/JSONNucleoReader.js +1 -2
  150. package/IO/Misc/JSONReader.js +1 -2
  151. package/IO/Misc/MTLReader.js +2 -3
  152. package/IO/Misc/OBJReader.js +1 -2
  153. package/IO/Misc/PDBReader.js +1 -2
  154. package/IO/Misc/SkyboxReader.js +3 -4
  155. package/IO/Misc.js +1 -1
  156. package/IO/XML/XMLImageDataReader.js +1 -2
  157. package/IO/XML/XMLImageDataWriter.js +2 -3
  158. package/IO/XML/XMLPolyDataReader.js +1 -2
  159. package/IO/XML/XMLPolyDataWriter.js +2 -3
  160. package/IO/XML/XMLReader.js +1 -2
  161. package/IO/XML/XMLWriter/Constants.js +1 -2
  162. package/IO/XML/XMLWriter.js +4 -4
  163. package/IO/XML.js +1 -1
  164. package/IO/index.js +1 -1
  165. package/Imaging/Core/AbstractImageInterpolator/Constants.js +1 -2
  166. package/Imaging/Core/AbstractImageInterpolator/InterpolationInfo.js +2 -3
  167. package/Imaging/Core/AbstractImageInterpolator.js +2 -3
  168. package/Imaging/Core/ImageInterpolator.js +2 -3
  169. package/Imaging/Core/ImagePointDataIterator.js +1 -2
  170. package/Imaging/Core/ImageReslice/Constants.js +1 -2
  171. package/Imaging/Core/ImageReslice.js +2 -3
  172. package/Imaging/Core.js +1 -1
  173. package/Imaging/Hybrid/SampleFunction.js +2 -3
  174. package/Imaging/Hybrid.js +1 -1
  175. package/Imaging/index.js +1 -1
  176. package/Interaction/Animations/TimeStepBasedAnimationHandler.js +2 -3
  177. package/Interaction/Manipulators/CompositeCameraManipulator.js +1 -2
  178. package/Interaction/Manipulators/CompositeGestureManipulator.js +1 -2
  179. package/Interaction/Manipulators/CompositeKeyboardManipulator.js +1 -2
  180. package/Interaction/Manipulators/CompositeMouseManipulator.js +1 -2
  181. package/Interaction/Manipulators/CompositeVRManipulator.js +1 -2
  182. package/Interaction/Manipulators/GestureCameraManipulator.js +1 -2
  183. package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -2
  184. package/Interaction/Manipulators/MouseBoxSelectorManipulator.js +3 -4
  185. package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -2
  186. package/Interaction/Manipulators/MouseCameraSliceManipulator.js +1 -2
  187. package/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator.js +1 -2
  188. package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.js +1 -2
  189. package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -2
  190. package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -2
  191. package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -2
  192. package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.js +1 -2
  193. package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.js +1 -2
  194. package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -2
  195. package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -2
  196. package/Interaction/Manipulators/MouseRangeManipulator.js +1 -2
  197. package/Interaction/Manipulators/VRButtonPanManipulator.js +1 -2
  198. package/Interaction/Manipulators.js +1 -1
  199. package/Interaction/Misc/DeviceOrientationToCamera.js +1 -1
  200. package/Interaction/Misc.js +1 -1
  201. package/Interaction/Style/InteractorStyleImage.js +1 -2
  202. package/Interaction/Style/InteractorStyleMPRSlice.js +1 -2
  203. package/Interaction/Style/InteractorStyleManipulator/Presets.js +1 -1
  204. package/Interaction/Style/InteractorStyleManipulator.js +2 -3
  205. package/Interaction/Style/InteractorStyleRemoteMouse.js +2 -3
  206. package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -2
  207. package/Interaction/Style/InteractorStyleUnicam.js +1 -2
  208. package/Interaction/Style.js +1 -1
  209. package/Interaction/UI/CornerAnnotation.js +1 -2
  210. package/Interaction/UI/FPSMonitor.js +2 -3
  211. package/Interaction/UI/Icons.js +1 -1
  212. package/Interaction/UI/Slider/Constants.js +1 -2
  213. package/Interaction/UI/Slider.js +2 -3
  214. package/Interaction/UI/VolumeController.js +1 -2
  215. package/Interaction/UI.js +1 -1
  216. package/Interaction/Widgets/AbstractWidget.js +2 -3
  217. package/Interaction/Widgets/DistanceRepresentation.js +2 -3
  218. package/Interaction/Widgets/DistanceWidget.js +2 -3
  219. package/Interaction/Widgets/HandleRepresentation/Constants.js +1 -2
  220. package/Interaction/Widgets/HandleRepresentation.js +2 -3
  221. package/Interaction/Widgets/HandleWidget/Constants.js +1 -2
  222. package/Interaction/Widgets/HandleWidget.js +2 -3
  223. package/Interaction/Widgets/ImageCroppingRegionsRepresentation.js +1 -2
  224. package/Interaction/Widgets/ImageCroppingRegionsWidget/Constants.js +1 -1
  225. package/Interaction/Widgets/ImageCroppingRegionsWidget.js +2 -3
  226. package/Interaction/Widgets/LabelRepresentation/Constants.js +1 -2
  227. package/Interaction/Widgets/LabelRepresentation.js +3 -4
  228. package/Interaction/Widgets/LabelWidget.js +2 -3
  229. package/Interaction/Widgets/LineRepresentation/Constants.js +1 -2
  230. package/Interaction/Widgets/LineRepresentation.js +2 -3
  231. package/Interaction/Widgets/LineWidget/Constants.js +1 -2
  232. package/Interaction/Widgets/LineWidget.js +2 -3
  233. package/Interaction/Widgets/OrientationMarkerWidget/Constants.js +1 -1
  234. package/Interaction/Widgets/OrientationMarkerWidget.js +2 -3
  235. package/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +3 -3
  236. package/Interaction/Widgets/PiecewiseGaussianWidget.js +15 -16
  237. package/Interaction/Widgets/PointPlacer.js +1 -2
  238. package/Interaction/Widgets/ResliceCursor/ResliceCursor/Constants.js +1 -2
  239. package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +2 -3
  240. package/Interaction/Widgets/ResliceCursor/ResliceCursorActor/Constants.js +1 -2
  241. package/Interaction/Widgets/ResliceCursor/ResliceCursorActor.js +2 -3
  242. package/Interaction/Widgets/ResliceCursor/ResliceCursorLineRepresentation.js +1 -2
  243. package/Interaction/Widgets/ResliceCursor/ResliceCursorPolyDataAlgorithm.js +2 -3
  244. package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +1 -2
  245. package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget/Constants.js +1 -2
  246. package/Interaction/Widgets/ResliceCursor/ResliceCursorWidget.js +2 -3
  247. package/Interaction/Widgets/SphereHandleRepresentation.js +2 -3
  248. package/Interaction/Widgets/WidgetRepresentation.js +1 -2
  249. package/Interaction/Widgets.js +1 -1
  250. package/Interaction/index.js +1 -1
  251. package/Proxy/Animation/AbstractAnimationProxy.js +1 -2
  252. package/Proxy/Animation/AnimationProxyManager.js +1 -2
  253. package/Proxy/Animation/TimeStepBasedAnimationHandlerProxy.js +1 -2
  254. package/Proxy/Core/AbstractRepresentationProxy.js +1 -1
  255. package/Proxy/Core/LookupTableProxy/Constants.js +1 -1
  256. package/Proxy/Core/LookupTableProxy.js +1 -2
  257. package/Proxy/Core/PiecewiseFunctionProxy/Constants.js +1 -1
  258. package/Proxy/Core/PiecewiseFunctionProxy.js +2 -3
  259. package/Proxy/Core/ProxyManager/core.js +2 -2
  260. package/Proxy/Core/ProxyManager/properties.js +2 -2
  261. package/Proxy/Core/ProxyManager/state.js +2 -2
  262. package/Proxy/Core/ProxyManager/view.js +1 -1
  263. package/Proxy/Core/ProxyManager.js +1 -2
  264. package/Proxy/Core/SourceProxy.js +1 -2
  265. package/Proxy/Core/View2DProxy.js +1 -2
  266. package/Proxy/Core/ViewProxy.js +4 -4
  267. package/Proxy/Core.js +1 -1
  268. package/Proxy/Representations/GeometryRepresentationProxy.js +1 -2
  269. package/Proxy/Representations/GlyphRepresentationProxy.js +1 -2
  270. package/Proxy/Representations/MoleculeRepresentationProxy.js +1 -2
  271. package/Proxy/Representations/SkyboxRepresentationProxy.js +1 -2
  272. package/Proxy/Representations/SliceRepresentationProxy.js +2 -3
  273. package/Proxy/Representations/SlicedGeometryRepresentationProxy.js +1 -2
  274. package/Proxy/Representations/VolumeRepresentationProxy.js +1 -2
  275. package/Proxy/Representations.js +1 -1
  276. package/Proxy/index.js +1 -1
  277. package/Rendering/Core/AbstractMapper.js +1 -2
  278. package/Rendering/Core/AbstractMapper3D.js +1 -2
  279. package/Rendering/Core/AbstractPicker.js +1 -2
  280. package/Rendering/Core/Actor.js +2 -3
  281. package/Rendering/Core/Actor2D.js +1 -2
  282. package/Rendering/Core/AnnotatedCubeActor/Presets.js +1 -1
  283. package/Rendering/Core/AnnotatedCubeActor.js +2 -3
  284. package/Rendering/Core/AxesActor.js +2 -3
  285. package/Rendering/Core/Camera.js +1 -2
  286. package/Rendering/Core/CellPicker.js +2 -3
  287. package/Rendering/Core/ColorTransferFunction/ColorMaps.js +1 -1
  288. package/Rendering/Core/ColorTransferFunction/ColorMapsLite.js +1 -1
  289. package/Rendering/Core/ColorTransferFunction/Constants.js +1 -2
  290. package/Rendering/Core/ColorTransferFunction.js +2 -3
  291. package/Rendering/Core/Coordinate/Constants.js +1 -2
  292. package/Rendering/Core/Coordinate.js +2 -3
  293. package/Rendering/Core/CubeAxesActor.js +2 -3
  294. package/Rendering/Core/Follower.js +2 -3
  295. package/Rendering/Core/Glyph3DMapper/Constants.js +1 -2
  296. package/Rendering/Core/Glyph3DMapper.js +2 -3
  297. package/Rendering/Core/HardwareSelector.js +1 -2
  298. package/Rendering/Core/ImageMapper/Constants.js +1 -2
  299. package/Rendering/Core/ImageMapper.js +2 -3
  300. package/Rendering/Core/ImageProperty/Constants.js +1 -2
  301. package/Rendering/Core/ImageProperty.js +1 -2
  302. package/Rendering/Core/ImageSlice.js +1 -2
  303. package/Rendering/Core/InteractorObserver.js +2 -3
  304. package/Rendering/Core/InteractorStyle/Constants.js +1 -2
  305. package/Rendering/Core/InteractorStyle.js +2 -3
  306. package/Rendering/Core/Light.js +1 -2
  307. package/Rendering/Core/Mapper/CoincidentTopologyHelper.js +1 -2
  308. package/Rendering/Core/Mapper/Constants.js +1 -2
  309. package/Rendering/Core/Mapper/Static.js +1 -2
  310. package/Rendering/Core/Mapper.js +2 -3
  311. package/Rendering/Core/Picker.js +2 -3
  312. package/Rendering/Core/PixelSpaceCallbackMapper.js +1 -2
  313. package/Rendering/Core/PointPicker.js +1 -9
  314. package/Rendering/Core/Prop.js +1 -2
  315. package/Rendering/Core/Prop3D.js +1 -2
  316. package/Rendering/Core/Property/Constants.js +1 -2
  317. package/Rendering/Core/Property.js +2 -3
  318. package/Rendering/Core/Property2D.js +1 -2
  319. package/Rendering/Core/RenderWindow.js +1 -2
  320. package/Rendering/Core/RenderWindowInteractor/Constants.js +1 -2
  321. package/Rendering/Core/RenderWindowInteractor.js +2 -3
  322. package/Rendering/Core/Renderer.js +2 -3
  323. package/Rendering/Core/ScalarBarActor.js +2 -3
  324. package/Rendering/Core/Skybox.js +1 -2
  325. package/Rendering/Core/SphereMapper.js +1 -2
  326. package/Rendering/Core/StickMapper.js +1 -2
  327. package/Rendering/Core/SurfaceLICInterface/Constants.js +1 -2
  328. package/Rendering/Core/SurfaceLICInterface.js +1 -2
  329. package/Rendering/Core/SurfaceLICMapper.js +1 -2
  330. package/Rendering/Core/Texture.js +1 -2
  331. package/Rendering/Core/Viewport.js +1 -2
  332. package/Rendering/Core/Volume.js +1 -2
  333. package/Rendering/Core/VolumeMapper/Constants.js +1 -2
  334. package/Rendering/Core/VolumeMapper.js +1 -2
  335. package/Rendering/Core/VolumeProperty/Constants.js +1 -2
  336. package/Rendering/Core/VolumeProperty.js +2 -3
  337. package/Rendering/Core.js +2 -2
  338. package/Rendering/Misc/CanvasView.js +1 -2
  339. package/Rendering/Misc/FullScreenRenderWindow.js +1 -2
  340. package/Rendering/Misc/GenericRenderWindow.js +1 -2
  341. package/Rendering/Misc/RemoteView.js +1 -2
  342. package/Rendering/Misc/RenderWindowWithControlBar.js +2 -3
  343. package/Rendering/Misc/SynchronizableRenderWindow/vtkObjectManager.js +2 -2
  344. package/Rendering/Misc/SynchronizableRenderWindow.js +3 -4
  345. package/Rendering/Misc/TextureLODsDownloader.js +1 -2
  346. package/Rendering/Misc.js +1 -1
  347. package/Rendering/OpenGL/Actor.js +2 -3
  348. package/Rendering/OpenGL/Actor2D.js +2 -3
  349. package/Rendering/OpenGL/BufferObject/Constants.js +1 -2
  350. package/Rendering/OpenGL/BufferObject.js +2 -3
  351. package/Rendering/OpenGL/Camera.js +2 -3
  352. package/Rendering/OpenGL/CellArrayBufferObject.js +2 -4
  353. package/Rendering/OpenGL/Convolution2DPass.js +1 -2
  354. package/Rendering/OpenGL/ForwardPass.js +1 -2
  355. package/Rendering/OpenGL/Framebuffer.js +2 -3
  356. package/Rendering/OpenGL/Glyph3DMapper.js +3 -4
  357. package/Rendering/OpenGL/HardwareSelector/Constants.js +1 -2
  358. package/Rendering/OpenGL/HardwareSelector.js +2 -3
  359. package/Rendering/OpenGL/Helper.js +1 -2
  360. package/Rendering/OpenGL/ImageMapper.js +2 -3
  361. package/Rendering/OpenGL/ImageSlice.js +2 -3
  362. package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +1 -2
  363. package/Rendering/OpenGL/PolyDataMapper.js +2 -3
  364. package/Rendering/OpenGL/RadialDistortionPass.js +1 -2
  365. package/Rendering/OpenGL/RenderWindow.js +1 -2
  366. package/Rendering/OpenGL/Renderer.js +2 -3
  367. package/Rendering/OpenGL/ReplacementShaderMapper.js +1 -1
  368. package/Rendering/OpenGL/Shader.js +1 -2
  369. package/Rendering/OpenGL/ShaderCache.js +1 -2
  370. package/Rendering/OpenGL/ShaderProgram.js +1 -1
  371. package/Rendering/OpenGL/Skybox.js +2 -3
  372. package/Rendering/OpenGL/SphereMapper.js +2 -3
  373. package/Rendering/OpenGL/StickMapper.js +2 -3
  374. package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D/pingpong.js +1 -2
  375. package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D.js +1 -2
  376. package/Rendering/OpenGL/SurfaceLIC/SurfaceLICInterface.js +1 -2
  377. package/Rendering/OpenGL/SurfaceLIC/SurfaceLICMapper.js +3 -4
  378. package/Rendering/OpenGL/SurfaceLIC.js +1 -1
  379. package/Rendering/OpenGL/Texture/Constants.js +1 -2
  380. package/Rendering/OpenGL/Texture.js +3 -4
  381. package/Rendering/OpenGL/TextureUnitManager.js +1 -2
  382. package/Rendering/OpenGL/VertexArrayObject.js +1 -2
  383. package/Rendering/OpenGL/ViewNodeFactory.js +1 -2
  384. package/Rendering/OpenGL/Volume.js +2 -3
  385. package/Rendering/OpenGL/VolumeMapper.js +3 -4
  386. package/Rendering/OpenGL.js +1 -1
  387. package/Rendering/SceneGraph/RenderPass.js +1 -2
  388. package/Rendering/SceneGraph/RenderWindowViewNode.js +1 -2
  389. package/Rendering/SceneGraph/ViewNode.js +1 -1
  390. package/Rendering/SceneGraph/ViewNodeFactory.js +1 -2
  391. package/Rendering/SceneGraph.js +1 -1
  392. package/Rendering/WebGPU/Actor.js +1 -2
  393. package/Rendering/WebGPU/BindGroup.js +1 -2
  394. package/Rendering/WebGPU/Buffer.js +2 -3
  395. package/Rendering/WebGPU/BufferManager/Constants.js +1 -2
  396. package/Rendering/WebGPU/BufferManager.js +3 -4
  397. package/Rendering/WebGPU/Camera.js +1 -2
  398. package/Rendering/WebGPU/Device.js +2 -3
  399. package/Rendering/WebGPU/ForwardPass.js +1 -2
  400. package/Rendering/WebGPU/FullScreenQuad.js +1 -2
  401. package/Rendering/WebGPU/Glyph3DMapper.js +3 -4
  402. package/Rendering/WebGPU/HardwareSelectionPass.js +1 -2
  403. package/Rendering/WebGPU/HardwareSelector.js +1 -2
  404. package/Rendering/WebGPU/MapperHelper.js +1 -2
  405. package/Rendering/WebGPU/OpaquePass.js +2 -4
  406. package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -2
  407. package/Rendering/WebGPU/Pipeline.js +2 -3
  408. package/Rendering/WebGPU/PixelSpaceCallbackMapper.js +1 -2
  409. package/Rendering/WebGPU/PolyDataMapper.js +3 -4
  410. package/Rendering/WebGPU/RenderEncoder.js +2 -3
  411. package/Rendering/WebGPU/RenderWindow.js +11 -3
  412. package/Rendering/WebGPU/Renderer.js +2 -3
  413. package/Rendering/WebGPU/Sampler.js +1 -2
  414. package/Rendering/WebGPU/ShaderCache.js +1 -2
  415. package/Rendering/WebGPU/ShaderDescription.js +1 -2
  416. package/Rendering/WebGPU/ShaderModule.js +1 -1
  417. package/Rendering/WebGPU/SphereMapper.js +1 -2
  418. package/Rendering/WebGPU/StickMapper.js +1 -2
  419. package/Rendering/WebGPU/StorageBuffer.js +1 -2
  420. package/Rendering/WebGPU/Texture.js +2 -3
  421. package/Rendering/WebGPU/TextureManager.js +24 -7
  422. package/Rendering/WebGPU/TextureView.js +19 -4
  423. package/Rendering/WebGPU/Types.js +83 -42
  424. package/Rendering/WebGPU/UniformBuffer.js +1 -2
  425. package/Rendering/WebGPU/VertexInput.js +2 -3
  426. package/Rendering/WebGPU/ViewNodeFactory.js +1 -2
  427. package/Rendering/WebGPU/Volume.js +1 -2
  428. package/Rendering/WebGPU/VolumePass.js +2 -3
  429. package/Rendering/WebGPU/VolumePassFSQ.js +4 -4
  430. package/Rendering/WebGPU.js +1 -1
  431. package/Rendering/index.js +1 -1
  432. package/ThirdParty/index.js +2 -2
  433. package/Utilities/DataGenerator/convert-cli.js +10 -8
  434. package/Utilities/ExampleRunner/example-runner-cli.js +2 -1
  435. package/Utilities/ExampleRunner/template-config.js +8 -6
  436. package/Utilities/TestResults/TESTS-Chrome_Headless_93.0.4577.63_(Linux_x86_64).xml +1058 -1058
  437. package/Utilities/XMLConverter/xml2json-cli.js +5 -4
  438. package/Widgets/Core/AbstractWidget/Constants.js +1 -2
  439. package/Widgets/Core/AbstractWidget.js +1 -2
  440. package/Widgets/Core/AbstractWidgetFactory.js +2 -3
  441. package/Widgets/Core/StateBuilder/boundsMixin.js +1 -2
  442. package/Widgets/Core/StateBuilder/colorMixin.js +1 -2
  443. package/Widgets/Core/StateBuilder/cornerMixin.js +1 -2
  444. package/Widgets/Core/StateBuilder/directionMixin.js +1 -2
  445. package/Widgets/Core/StateBuilder/manipulatorMixin.js +1 -2
  446. package/Widgets/Core/StateBuilder/nameMixin.js +1 -2
  447. package/Widgets/Core/StateBuilder/orientationMixin.js +1 -2
  448. package/Widgets/Core/StateBuilder/originMixin.js +1 -2
  449. package/Widgets/Core/StateBuilder/scale1Mixin.js +1 -2
  450. package/Widgets/Core/StateBuilder/scale3Mixin.js +1 -2
  451. package/Widgets/Core/StateBuilder/shapeMixin.js +1 -2
  452. package/Widgets/Core/StateBuilder/textMixin.js +1 -2
  453. package/Widgets/Core/StateBuilder/visibleMixin.js +1 -2
  454. package/Widgets/Core/StateBuilder.js +1 -2
  455. package/Widgets/Core/WidgetManager/Constants.js +1 -2
  456. package/Widgets/Core/WidgetManager.js +1 -2
  457. package/Widgets/Core/WidgetState.js +1 -2
  458. package/Widgets/Core.js +1 -1
  459. package/Widgets/Manipulators/LineManipulator.js +1 -2
  460. package/Widgets/Manipulators/PlaneManipulator.js +1 -2
  461. package/Widgets/Manipulators/TrackballManipulator.js +1 -2
  462. package/Widgets/Manipulators.js +1 -1
  463. package/Widgets/Representations/ArrowHandleRepresentation.js +2 -3
  464. package/Widgets/Representations/CircleContextRepresentation.js +1 -2
  465. package/Widgets/Representations/ContextRepresentation.js +2 -3
  466. package/Widgets/Representations/ConvexFaceContextRepresentation.js +1 -2
  467. package/Widgets/Representations/CroppingOutlineRepresentation.js +1 -2
  468. package/Widgets/Representations/CubeHandleRepresentation.js +1 -2
  469. package/Widgets/Representations/HandleRepresentation.js +2 -3
  470. package/Widgets/Representations/ImplicitPlaneRepresentation.js +1 -2
  471. package/Widgets/Representations/OutlineContextRepresentation.js +1 -2
  472. package/Widgets/Representations/PolyLineRepresentation.js +2 -3
  473. package/Widgets/Representations/RectangleContextRepresentation.js +1 -2
  474. package/Widgets/Representations/ResliceCursorContextRepresentation.js +2 -3
  475. package/Widgets/Representations/SphereHandleRepresentation.js +1 -2
  476. package/Widgets/Representations/SplineContextRepresentation.js +1 -2
  477. package/Widgets/Representations/WidgetRepresentation/Constants.js +1 -2
  478. package/Widgets/Representations/WidgetRepresentation.js +1 -2
  479. package/Widgets/Representations.js +1 -1
  480. package/Widgets/SVG/SVGLandmarkRepresentation.js +2 -3
  481. package/Widgets/SVG/SVGRepresentation.js +3 -2
  482. package/Widgets/Widgets3D/AngleWidget/behavior.js +1 -1
  483. package/Widgets/Widgets3D/AngleWidget/state.js +1 -1
  484. package/Widgets/Widgets3D/AngleWidget.js +1 -2
  485. package/Widgets/Widgets3D/DistanceWidget/behavior.js +1 -1
  486. package/Widgets/Widgets3D/DistanceWidget/state.js +1 -1
  487. package/Widgets/Widgets3D/DistanceWidget.js +1 -2
  488. package/Widgets/Widgets3D/EllipseWidget/behavior.js +2 -2
  489. package/Widgets/Widgets3D/EllipseWidget/state.js +1 -1
  490. package/Widgets/Widgets3D/EllipseWidget.js +2 -3
  491. package/Widgets/Widgets3D/ImageCroppingWidget/behavior.js +1 -1
  492. package/Widgets/Widgets3D/ImageCroppingWidget/state.js +1 -1
  493. package/Widgets/Widgets3D/ImageCroppingWidget.js +1 -2
  494. package/Widgets/Widgets3D/ImplicitPlaneWidget.js +1 -2
  495. package/Widgets/Widgets3D/InteractiveOrientationWidget/behavior.js +2 -2
  496. package/Widgets/Widgets3D/InteractiveOrientationWidget/state.js +1 -2
  497. package/Widgets/Widgets3D/InteractiveOrientationWidget.js +1 -2
  498. package/Widgets/Widgets3D/LineWidget/Constants.js +1 -2
  499. package/Widgets/Widgets3D/LineWidget/behavior.js +2 -2
  500. package/Widgets/Widgets3D/LineWidget/state.js +1 -1
  501. package/Widgets/Widgets3D/LineWidget.js +1 -2
  502. package/Widgets/Widgets3D/PaintWidget.js +1 -2
  503. package/Widgets/Widgets3D/PolyLineWidget/behavior.js +1 -1
  504. package/Widgets/Widgets3D/PolyLineWidget/state.js +1 -1
  505. package/Widgets/Widgets3D/PolyLineWidget.js +1 -2
  506. package/Widgets/Widgets3D/RectangleWidget/behavior.js +2 -2
  507. package/Widgets/Widgets3D/RectangleWidget/state.js +1 -1
  508. package/Widgets/Widgets3D/RectangleWidget.js +2 -3
  509. package/Widgets/Widgets3D/ResliceCursorWidget/Constants.js +1 -2
  510. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
  511. package/Widgets/Widgets3D/ResliceCursorWidget/state.js +1 -1
  512. package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -2
  513. package/Widgets/Widgets3D/ShapeWidget/Constants.js +1 -2
  514. package/Widgets/Widgets3D/ShapeWidget/behavior.js +2 -2
  515. package/Widgets/Widgets3D/ShapeWidget.js +1 -2
  516. package/Widgets/Widgets3D/SplineWidget/behavior.js +1 -1
  517. package/Widgets/Widgets3D/SplineWidget/state.js +1 -1
  518. package/Widgets/Widgets3D/SplineWidget.js +1 -2
  519. package/Widgets/Widgets3D.js +1 -1
  520. package/Widgets/index.js +1 -1
  521. package/_vendor/base64-js/index.js_commonjs-exports +1 -0
  522. package/_vendor/blueimp-md5/js/md5.js_commonjs-module +3 -0
  523. package/_vendor/define-properties/index.js_commonjs-proxy +1 -1
  524. package/_vendor/globalthis/implementation.browser.js_commonjs-module +3 -0
  525. package/_vendor/globalthis/implementation.browser.js_commonjs-proxy +1 -1
  526. package/_vendor/globalthis/polyfill.js_commonjs-proxy +1 -1
  527. package/_vendor/globalthis/shim.js_commonjs-proxy +2 -1
  528. package/_vendor/jszip/dist/jszip.min.js_commonjs-module +3 -0
  529. package/_vendor/object-keys/implementation.js_commonjs-proxy +1 -1
  530. package/_vendor/object-keys/index.js_commonjs-proxy +1 -1
  531. package/_vendor/object-keys/isArguments.js_commonjs-proxy +1 -1
  532. package/_vendor/seedrandom/lib/alea.js_commonjs-module +3 -0
  533. package/_vendor/seedrandom/lib/alea.js_commonjs-proxy +1 -1
  534. package/_vendor/seedrandom/lib/tychei.js_commonjs-module +3 -0
  535. package/_vendor/seedrandom/lib/tychei.js_commonjs-proxy +1 -1
  536. package/_vendor/seedrandom/lib/xor128.js_commonjs-module +3 -0
  537. package/_vendor/seedrandom/lib/xor128.js_commonjs-proxy +1 -1
  538. package/_vendor/seedrandom/lib/xor4096.js_commonjs-module +3 -0
  539. package/_vendor/seedrandom/lib/xor4096.js_commonjs-proxy +1 -1
  540. package/_vendor/seedrandom/lib/xorshift7.js_commonjs-module +3 -0
  541. package/_vendor/seedrandom/lib/xorshift7.js_commonjs-proxy +1 -1
  542. package/_vendor/seedrandom/lib/xorwow.js_commonjs-module +3 -0
  543. package/_vendor/seedrandom/lib/xorwow.js_commonjs-proxy +1 -1
  544. package/_vendor/seedrandom/seedrandom.js_commonjs-module +3 -0
  545. package/_vendor/seedrandom/seedrandom.js_commonjs-proxy +1 -1
  546. package/_vendor/webworker-promise/lib/register.js_commonjs-module +3 -0
  547. package/_vendor/webworker-promise/lib/tiny-emitter.js_commonjs-proxy +1 -1
  548. package/_vendor/webworker-promise/src/tiny-emitter.js_commonjs-proxy +1 -0
  549. package/_vendor/xmlbuilder2/lib/xmlbuilder2.min.js_commonjs-module +3 -0
  550. package/_virtual/commonjsHelpers.js +3 -4
  551. package/_virtual/{polyfill-node_buffer.js → polyfill-node.buffer.js} +1 -1
  552. package/_virtual/{polyfill-node_global.js → polyfill-node.global.js} +0 -0
  553. package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +1 -1
  554. package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +1 -1
  555. package/macros.js +4 -5
  556. package/package.json +54 -55
  557. package/vendor/base64-js/index.js +1 -87
  558. package/vendor/blueimp-md5/js/md5.js +6 -3
  559. package/vendor/d3-array/src/ascending.js +1 -1
  560. package/vendor/d3-array/src/bisect.js +2 -1
  561. package/vendor/d3-array/src/bisector.js +21 -23
  562. package/vendor/d3-array/src/mode.js +1 -0
  563. package/vendor/d3-scale/src/continuous.js +2 -2
  564. package/vendor/d3-time/src/ticks.js +1 -0
  565. package/vendor/define-properties/index.js +2 -1
  566. package/vendor/globalthis/implementation.browser.js +4 -9
  567. package/vendor/globalthis/index.js +13 -6
  568. package/vendor/globalthis/polyfill.js +6 -3
  569. package/vendor/globalthis/shim.js +12 -9
  570. package/vendor/jszip/dist/jszip.min.js +11 -0
  571. package/vendor/object-keys/index.js +2 -2
  572. package/vendor/pako/dist/pako.esm.mjs +397 -388
  573. package/vendor/seedrandom/index.js +28 -21
  574. package/vendor/seedrandom/lib/alea.js +4 -5
  575. package/vendor/seedrandom/lib/tychei.js +4 -5
  576. package/vendor/seedrandom/lib/xor128.js +4 -5
  577. package/vendor/seedrandom/lib/xor4096.js +4 -5
  578. package/vendor/seedrandom/lib/xorshift7.js +4 -5
  579. package/vendor/seedrandom/lib/xorwow.js +4 -5
  580. package/vendor/seedrandom/seedrandom.js +4 -5
  581. package/vendor/webworker-promise/lib/register.js +14 -8
  582. package/vendor/webworker-promise/src/index.js +110 -0
  583. package/vendor/webworker-promise/src/tiny-emitter.js +51 -0
  584. package/vendor/xmlbuilder2/lib/xmlbuilder2.min.js +6 -7
  585. package/vtk.js +2 -3
  586. package/_vendor/base64-js/index.js_commonjs-proxy +0 -1
  587. package/_vendor/buffer/index.js_commonjs-proxy +0 -1
  588. package/_vendor/ieee754/index.js_commonjs-proxy +0 -1
  589. package/_vendor/immediate/lib/browser.js_commonjs-proxy +0 -1
  590. package/_vendor/inherits/inherits_browser.js_commonjs-proxy +0 -1
  591. package/_vendor/jszip/lib/base64.js_commonjs-proxy +0 -1
  592. package/_vendor/jszip/lib/compressedObject.js_commonjs-proxy +0 -1
  593. package/_vendor/jszip/lib/compressions.js_commonjs-proxy +0 -1
  594. package/_vendor/jszip/lib/crc32.js_commonjs-proxy +0 -1
  595. package/_vendor/jszip/lib/defaults.js_commonjs-proxy +0 -1
  596. package/_vendor/jszip/lib/external.js_commonjs-proxy +0 -1
  597. package/_vendor/jszip/lib/flate.js_commonjs-proxy +0 -1
  598. package/_vendor/jszip/lib/generate/ZipFileWorker.js_commonjs-proxy +0 -1
  599. package/_vendor/jszip/lib/generate/index.js_commonjs-proxy +0 -1
  600. package/_vendor/jszip/lib/load.js_commonjs-proxy +0 -1
  601. package/_vendor/jszip/lib/nodejs/NodejsStreamInputAdapter.js_commonjs-proxy +0 -1
  602. package/_vendor/jszip/lib/nodejs/NodejsStreamOutputAdapter.js_commonjs-proxy +0 -1
  603. package/_vendor/jszip/lib/nodejsUtils.js_commonjs-proxy +0 -1
  604. package/_vendor/jszip/lib/object.js_commonjs-proxy +0 -1
  605. package/_vendor/jszip/lib/readable-stream-browser.js_commonjs-proxy +0 -1
  606. package/_vendor/jszip/lib/reader/ArrayReader.js_commonjs-proxy +0 -1
  607. package/_vendor/jszip/lib/reader/DataReader.js_commonjs-proxy +0 -1
  608. package/_vendor/jszip/lib/reader/NodeBufferReader.js_commonjs-proxy +0 -1
  609. package/_vendor/jszip/lib/reader/StringReader.js_commonjs-proxy +0 -1
  610. package/_vendor/jszip/lib/reader/Uint8ArrayReader.js_commonjs-proxy +0 -1
  611. package/_vendor/jszip/lib/reader/readerFor.js_commonjs-proxy +0 -1
  612. package/_vendor/jszip/lib/signature.js_commonjs-proxy +0 -1
  613. package/_vendor/jszip/lib/stream/ConvertWorker.js_commonjs-proxy +0 -1
  614. package/_vendor/jszip/lib/stream/Crc32Probe.js_commonjs-proxy +0 -1
  615. package/_vendor/jszip/lib/stream/DataLengthProbe.js_commonjs-proxy +0 -1
  616. package/_vendor/jszip/lib/stream/DataWorker.js_commonjs-proxy +0 -1
  617. package/_vendor/jszip/lib/stream/GenericWorker.js_commonjs-proxy +0 -1
  618. package/_vendor/jszip/lib/stream/StreamHelper.js_commonjs-proxy +0 -1
  619. package/_vendor/jszip/lib/support.js_commonjs-proxy +0 -1
  620. package/_vendor/jszip/lib/utf8.js_commonjs-proxy +0 -1
  621. package/_vendor/jszip/lib/utils.js_commonjs-proxy +0 -1
  622. package/_vendor/jszip/lib/zipEntries.js_commonjs-proxy +0 -1
  623. package/_vendor/jszip/lib/zipEntry.js_commonjs-proxy +0 -1
  624. package/_vendor/jszip/lib/zipObject.js_commonjs-proxy +0 -1
  625. package/_vendor/jszip/node_modules/pako/index.js_commonjs-proxy +0 -1
  626. package/_vendor/jszip/node_modules/pako/lib/deflate.js_commonjs-proxy +0 -1
  627. package/_vendor/jszip/node_modules/pako/lib/inflate.js_commonjs-proxy +0 -1
  628. package/_vendor/jszip/node_modules/pako/lib/utils/common.js_commonjs-proxy +0 -1
  629. package/_vendor/jszip/node_modules/pako/lib/utils/strings.js_commonjs-proxy +0 -1
  630. package/_vendor/jszip/node_modules/pako/lib/zlib/adler32.js_commonjs-proxy +0 -1
  631. package/_vendor/jszip/node_modules/pako/lib/zlib/constants.js_commonjs-proxy +0 -1
  632. package/_vendor/jszip/node_modules/pako/lib/zlib/crc32.js_commonjs-proxy +0 -1
  633. package/_vendor/jszip/node_modules/pako/lib/zlib/deflate.js_commonjs-proxy +0 -1
  634. package/_vendor/jszip/node_modules/pako/lib/zlib/gzheader.js_commonjs-proxy +0 -1
  635. package/_vendor/jszip/node_modules/pako/lib/zlib/inffast.js_commonjs-proxy +0 -1
  636. package/_vendor/jszip/node_modules/pako/lib/zlib/inflate.js_commonjs-proxy +0 -1
  637. package/_vendor/jszip/node_modules/pako/lib/zlib/inftrees.js_commonjs-proxy +0 -1
  638. package/_vendor/jszip/node_modules/pako/lib/zlib/messages.js_commonjs-proxy +0 -1
  639. package/_vendor/jszip/node_modules/pako/lib/zlib/trees.js_commonjs-proxy +0 -1
  640. package/_vendor/jszip/node_modules/pako/lib/zlib/zstream.js_commonjs-proxy +0 -1
  641. package/_vendor/lie/lib/browser.js_commonjs-proxy +0 -1
  642. package/_vendor/safe-buffer/index.js_commonjs-proxy +0 -1
  643. package/_vendor/set-immediate-shim/index.js_commonjs-proxy +0 -1
  644. package/_vendor/util/support/isBufferBrowser.js_commonjs-proxy +0 -1
  645. package/_virtual/_polyfill-node_stream.js_commonjs-proxy.js +0 -6
  646. package/_virtual/polyfill-node__buffer_list.js +0 -59
  647. package/_virtual/polyfill-node__stream_duplex.js +0 -44
  648. package/_virtual/polyfill-node__stream_passthrough.js +0 -15
  649. package/_virtual/polyfill-node__stream_readable.js +0 -896
  650. package/_virtual/polyfill-node__stream_transform.js +0 -132
  651. package/_virtual/polyfill-node__stream_writable.js +0 -480
  652. package/_virtual/polyfill-node_process.js +0 -225
  653. package/_virtual/polyfill-node_stream.js +0 -120
  654. package/vendor/buffer/index.js +0 -2112
  655. package/vendor/events/events.js +0 -457
  656. package/vendor/ieee754/index.js +0 -92
  657. package/vendor/immediate/lib/browser.js +0 -72
  658. package/vendor/inherits/inherits_browser.js +0 -29
  659. package/vendor/jszip/lib/base64.js +0 -113
  660. package/vendor/jszip/lib/compressedObject.js +0 -74
  661. package/vendor/jszip/lib/compressions.js +0 -20
  662. package/vendor/jszip/lib/crc32.js +0 -77
  663. package/vendor/jszip/lib/defaults.js +0 -25
  664. package/vendor/jszip/lib/external.js +0 -22
  665. package/vendor/jszip/lib/flate.js +0 -96
  666. package/vendor/jszip/lib/generate/ZipFileWorker.js +0 -540
  667. package/vendor/jszip/lib/generate/index.js +0 -61
  668. package/vendor/jszip/lib/index.js +0 -58
  669. package/vendor/jszip/lib/load.js +0 -82
  670. package/vendor/jszip/lib/nodejs/NodejsStreamInputAdapter.js +0 -74
  671. package/vendor/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +0 -45
  672. package/vendor/jszip/lib/nodejsUtils.js +0 -59
  673. package/vendor/jszip/lib/object.js +0 -389
  674. package/vendor/jszip/lib/readable-stream-browser.js +0 -14
  675. package/vendor/jszip/lib/reader/ArrayReader.js +0 -58
  676. package/vendor/jszip/lib/reader/DataReader.js +0 -117
  677. package/vendor/jszip/lib/reader/NodeBufferReader.js +0 -20
  678. package/vendor/jszip/lib/reader/StringReader.js +0 -39
  679. package/vendor/jszip/lib/reader/Uint8ArrayReader.js +0 -23
  680. package/vendor/jszip/lib/reader/readerFor.js +0 -28
  681. package/vendor/jszip/lib/signature.js +0 -17
  682. package/vendor/jszip/lib/stream/ConvertWorker.js +0 -26
  683. package/vendor/jszip/lib/stream/Crc32Probe.js +0 -24
  684. package/vendor/jszip/lib/stream/DataLengthProbe.js +0 -28
  685. package/vendor/jszip/lib/stream/DataWorker.js +0 -116
  686. package/vendor/jszip/lib/stream/GenericWorker.js +0 -263
  687. package/vendor/jszip/lib/stream/StreamHelper.js +0 -214
  688. package/vendor/jszip/lib/support.js +0 -45
  689. package/vendor/jszip/lib/utf8.js +0 -284
  690. package/vendor/jszip/lib/utils.js +0 -486
  691. package/vendor/jszip/lib/zipEntries.js +0 -257
  692. package/vendor/jszip/lib/zipEntry.js +0 -293
  693. package/vendor/jszip/lib/zipObject.js +0 -133
  694. package/vendor/jszip/node_modules/pako/index.js +0 -18
  695. package/vendor/jszip/node_modules/pako/lib/deflate.js +0 -406
  696. package/vendor/jszip/node_modules/pako/lib/inflate.js +0 -429
  697. package/vendor/jszip/node_modules/pako/lib/utils/common.js +0 -110
  698. package/vendor/jszip/node_modules/pako/lib/utils/strings.js +0 -192
  699. package/vendor/jszip/node_modules/pako/lib/zlib/adler32.js +0 -51
  700. package/vendor/jszip/node_modules/pako/lib/zlib/constants.js +0 -68
  701. package/vendor/jszip/node_modules/pako/lib/zlib/crc32.js +0 -59
  702. package/vendor/jszip/node_modules/pako/lib/zlib/deflate.js +0 -1892
  703. package/vendor/jszip/node_modules/pako/lib/zlib/gzheader.js +0 -58
  704. package/vendor/jszip/node_modules/pako/lib/zlib/inffast.js +0 -345
  705. package/vendor/jszip/node_modules/pako/lib/zlib/inflate.js +0 -1572
  706. package/vendor/jszip/node_modules/pako/lib/zlib/inftrees.js +0 -345
  707. package/vendor/jszip/node_modules/pako/lib/zlib/messages.js +0 -32
  708. package/vendor/jszip/node_modules/pako/lib/zlib/trees.js +0 -1232
  709. package/vendor/jszip/node_modules/pako/lib/zlib/zstream.js +0 -47
  710. package/vendor/lie/lib/browser.js +0 -274
  711. package/vendor/process/browser.js +0 -190
  712. package/vendor/safe-buffer/index.js +0 -69
  713. package/vendor/set-immediate-shim/index.js +0 -8
  714. package/vendor/string_decoder/lib/string_decoder.js +0 -276
  715. package/vendor/util/support/isBufferBrowser.js +0 -8
  716. package/vendor/util/util.js +0 -706
  717. package/vendor/webworker-promise/lib/index.js +0 -172
@@ -1,896 +0,0 @@
1
- import { B as Buffer } from './polyfill-node_buffer.js';
2
- import { e as events } from '../vendor/events/events.js';
3
- import { u as util } from '../vendor/util/util.js';
4
- import { B as BufferList } from './polyfill-node__buffer_list.js';
5
- import { S as StringDecoder_1 } from '../vendor/string_decoder/lib/string_decoder.js';
6
- import { D as Duplex } from './polyfill-node__stream_duplex.js';
7
- import { b as browser } from '../vendor/process/browser.js';
8
-
9
- Readable.ReadableState = ReadableState;
10
-
11
- var debug = util.debuglog('stream');
12
- util.inherits(Readable, events);
13
-
14
- function prependListener(emitter, event, fn) {
15
- // Sadly this is not cacheable as some libraries bundle their own
16
- // event emitter implementation with them.
17
- if (typeof emitter.prependListener === 'function') {
18
- return emitter.prependListener(event, fn);
19
- } else {
20
- // This is a hack to make sure that our error handler is attached before any
21
- // userland ones. NEVER DO THIS. This is here only because this code needs
22
- // to continue to work with older versions of Node.js that do not include
23
- // the prependListener() method. The goal is to eventually remove this hack.
24
- if (!emitter._events || !emitter._events[event])
25
- emitter.on(event, fn);
26
- else if (Array.isArray(emitter._events[event]))
27
- emitter._events[event].unshift(fn);
28
- else
29
- emitter._events[event] = [fn, emitter._events[event]];
30
- }
31
- }
32
- function listenerCount (emitter, type) {
33
- return emitter.listeners(type).length;
34
- }
35
- function ReadableState(options, stream) {
36
-
37
- options = options || {};
38
-
39
- // object stream flag. Used to make read(n) ignore n and to
40
- // make all the buffer merging and length checks go away
41
- this.objectMode = !!options.objectMode;
42
-
43
- if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
44
-
45
- // the point at which it stops calling _read() to fill the buffer
46
- // Note: 0 is a valid value, means "don't call _read preemptively ever"
47
- var hwm = options.highWaterMark;
48
- var defaultHwm = this.objectMode ? 16 : 16 * 1024;
49
- this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
50
-
51
- // cast to ints.
52
- this.highWaterMark = ~ ~this.highWaterMark;
53
-
54
- // A linked list is used to store data chunks instead of an array because the
55
- // linked list can remove elements from the beginning faster than
56
- // array.shift()
57
- this.buffer = new BufferList();
58
- this.length = 0;
59
- this.pipes = null;
60
- this.pipesCount = 0;
61
- this.flowing = null;
62
- this.ended = false;
63
- this.endEmitted = false;
64
- this.reading = false;
65
-
66
- // a flag to be able to tell if the onwrite cb is called immediately,
67
- // or on a later tick. We set this to true at first, because any
68
- // actions that shouldn't happen until "later" should generally also
69
- // not happen before the first write call.
70
- this.sync = true;
71
-
72
- // whenever we return null, then we set a flag to say
73
- // that we're awaiting a 'readable' event emission.
74
- this.needReadable = false;
75
- this.emittedReadable = false;
76
- this.readableListening = false;
77
- this.resumeScheduled = false;
78
-
79
- // Crypto is kind of old and crusty. Historically, its default string
80
- // encoding is 'binary' so we have to make this configurable.
81
- // Everything else in the universe uses 'utf8', though.
82
- this.defaultEncoding = options.defaultEncoding || 'utf8';
83
-
84
- // when piping, we only care about 'readable' events that happen
85
- // after read()ing all the bytes and not getting any pushback.
86
- this.ranOut = false;
87
-
88
- // the number of writers that are awaiting a drain event in .pipe()s
89
- this.awaitDrain = 0;
90
-
91
- // if true, a maybeReadMore has been scheduled
92
- this.readingMore = false;
93
-
94
- this.decoder = null;
95
- this.encoding = null;
96
- if (options.encoding) {
97
- this.decoder = new StringDecoder_1(options.encoding);
98
- this.encoding = options.encoding;
99
- }
100
- }
101
- function Readable(options) {
102
-
103
- if (!(this instanceof Readable)) return new Readable(options);
104
-
105
- this._readableState = new ReadableState(options, this);
106
-
107
- // legacy
108
- this.readable = true;
109
-
110
- if (options && typeof options.read === 'function') this._read = options.read;
111
-
112
- events.call(this);
113
- }
114
-
115
- // Manually shove something into the read() buffer.
116
- // This returns true if the highWaterMark has not been hit yet,
117
- // similar to how Writable.write() returns true if you should
118
- // write() some more.
119
- Readable.prototype.push = function (chunk, encoding) {
120
- var state = this._readableState;
121
-
122
- if (!state.objectMode && typeof chunk === 'string') {
123
- encoding = encoding || state.defaultEncoding;
124
- if (encoding !== state.encoding) {
125
- chunk = Buffer.from(chunk, encoding);
126
- encoding = '';
127
- }
128
- }
129
-
130
- return readableAddChunk(this, state, chunk, encoding, false);
131
- };
132
-
133
- // Unshift should *always* be something directly out of read()
134
- Readable.prototype.unshift = function (chunk) {
135
- var state = this._readableState;
136
- return readableAddChunk(this, state, chunk, '', true);
137
- };
138
-
139
- Readable.prototype.isPaused = function () {
140
- return this._readableState.flowing === false;
141
- };
142
-
143
- function readableAddChunk(stream, state, chunk, encoding, addToFront) {
144
- var er = chunkInvalid(state, chunk);
145
- if (er) {
146
- stream.emit('error', er);
147
- } else if (chunk === null) {
148
- state.reading = false;
149
- onEofChunk(stream, state);
150
- } else if (state.objectMode || chunk && chunk.length > 0) {
151
- if (state.ended && !addToFront) {
152
- var e = new Error('stream.push() after EOF');
153
- stream.emit('error', e);
154
- } else if (state.endEmitted && addToFront) {
155
- var _e = new Error('stream.unshift() after end event');
156
- stream.emit('error', _e);
157
- } else {
158
- var skipAdd;
159
- if (state.decoder && !addToFront && !encoding) {
160
- chunk = state.decoder.write(chunk);
161
- skipAdd = !state.objectMode && chunk.length === 0;
162
- }
163
-
164
- if (!addToFront) state.reading = false;
165
-
166
- // Don't add to the buffer if we've decoded to an empty string chunk and
167
- // we're not in object mode
168
- if (!skipAdd) {
169
- // if we want the data now, just emit it.
170
- if (state.flowing && state.length === 0 && !state.sync) {
171
- stream.emit('data', chunk);
172
- stream.read(0);
173
- } else {
174
- // update the buffer info.
175
- state.length += state.objectMode ? 1 : chunk.length;
176
- if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
177
-
178
- if (state.needReadable) emitReadable(stream);
179
- }
180
- }
181
-
182
- maybeReadMore(stream, state);
183
- }
184
- } else if (!addToFront) {
185
- state.reading = false;
186
- }
187
-
188
- return needMoreData(state);
189
- }
190
-
191
- // if it's past the high water mark, we can push in some more.
192
- // Also, if we have no data yet, we can stand some
193
- // more bytes. This is to work around cases where hwm=0,
194
- // such as the repl. Also, if the push() triggered a
195
- // readable event, and the user called read(largeNumber) such that
196
- // needReadable was set, then we ought to push more, so that another
197
- // 'readable' event will be triggered.
198
- function needMoreData(state) {
199
- return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
200
- }
201
-
202
- // backwards compatibility.
203
- Readable.prototype.setEncoding = function (enc) {
204
- this._readableState.decoder = new StringDecoder_1(enc);
205
- this._readableState.encoding = enc;
206
- return this;
207
- };
208
-
209
- // Don't raise the hwm > 8MB
210
- var MAX_HWM = 0x800000;
211
- function computeNewHighWaterMark(n) {
212
- if (n >= MAX_HWM) {
213
- n = MAX_HWM;
214
- } else {
215
- // Get the next highest power of 2 to prevent increasing hwm excessively in
216
- // tiny amounts
217
- n--;
218
- n |= n >>> 1;
219
- n |= n >>> 2;
220
- n |= n >>> 4;
221
- n |= n >>> 8;
222
- n |= n >>> 16;
223
- n++;
224
- }
225
- return n;
226
- }
227
-
228
- // This function is designed to be inlinable, so please take care when making
229
- // changes to the function body.
230
- function howMuchToRead(n, state) {
231
- if (n <= 0 || state.length === 0 && state.ended) return 0;
232
- if (state.objectMode) return 1;
233
- if (n !== n) {
234
- // Only flow one buffer at a time
235
- if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
236
- }
237
- // If we're asking for more than the current hwm, then raise the hwm.
238
- if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
239
- if (n <= state.length) return n;
240
- // Don't have enough
241
- if (!state.ended) {
242
- state.needReadable = true;
243
- return 0;
244
- }
245
- return state.length;
246
- }
247
-
248
- // you can override either this method, or the async _read(n) below.
249
- Readable.prototype.read = function (n) {
250
- debug('read', n);
251
- n = parseInt(n, 10);
252
- var state = this._readableState;
253
- var nOrig = n;
254
-
255
- if (n !== 0) state.emittedReadable = false;
256
-
257
- // if we're doing read(0) to trigger a readable event, but we
258
- // already have a bunch of data in the buffer, then just trigger
259
- // the 'readable' event and move on.
260
- if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
261
- debug('read: emitReadable', state.length, state.ended);
262
- if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
263
- return null;
264
- }
265
-
266
- n = howMuchToRead(n, state);
267
-
268
- // if we've ended, and we're now clear, then finish it up.
269
- if (n === 0 && state.ended) {
270
- if (state.length === 0) endReadable(this);
271
- return null;
272
- }
273
-
274
- // All the actual chunk generation logic needs to be
275
- // *below* the call to _read. The reason is that in certain
276
- // synthetic stream cases, such as passthrough streams, _read
277
- // may be a completely synchronous operation which may change
278
- // the state of the read buffer, providing enough data when
279
- // before there was *not* enough.
280
- //
281
- // So, the steps are:
282
- // 1. Figure out what the state of things will be after we do
283
- // a read from the buffer.
284
- //
285
- // 2. If that resulting state will trigger a _read, then call _read.
286
- // Note that this may be asynchronous, or synchronous. Yes, it is
287
- // deeply ugly to write APIs this way, but that still doesn't mean
288
- // that the Readable class should behave improperly, as streams are
289
- // designed to be sync/async agnostic.
290
- // Take note if the _read call is sync or async (ie, if the read call
291
- // has returned yet), so that we know whether or not it's safe to emit
292
- // 'readable' etc.
293
- //
294
- // 3. Actually pull the requested chunks out of the buffer and return.
295
-
296
- // if we need a readable event, then we need to do some reading.
297
- var doRead = state.needReadable;
298
- debug('need readable', doRead);
299
-
300
- // if we currently have less than the highWaterMark, then also read some
301
- if (state.length === 0 || state.length - n < state.highWaterMark) {
302
- doRead = true;
303
- debug('length less than watermark', doRead);
304
- }
305
-
306
- // however, if we've ended, then there's no point, and if we're already
307
- // reading, then it's unnecessary.
308
- if (state.ended || state.reading) {
309
- doRead = false;
310
- debug('reading or ended', doRead);
311
- } else if (doRead) {
312
- debug('do read');
313
- state.reading = true;
314
- state.sync = true;
315
- // if the length is currently zero, then we *need* a readable event.
316
- if (state.length === 0) state.needReadable = true;
317
- // call internal read method
318
- this._read(state.highWaterMark);
319
- state.sync = false;
320
- // If _read pushed data synchronously, then `reading` will be false,
321
- // and we need to re-evaluate how much data we can return to the user.
322
- if (!state.reading) n = howMuchToRead(nOrig, state);
323
- }
324
-
325
- var ret;
326
- if (n > 0) ret = fromList(n, state);else ret = null;
327
-
328
- if (ret === null) {
329
- state.needReadable = true;
330
- n = 0;
331
- } else {
332
- state.length -= n;
333
- }
334
-
335
- if (state.length === 0) {
336
- // If we have nothing in the buffer, then we want to know
337
- // as soon as we *do* get something into the buffer.
338
- if (!state.ended) state.needReadable = true;
339
-
340
- // If we tried to read() past the EOF, then emit end on the next tick.
341
- if (nOrig !== n && state.ended) endReadable(this);
342
- }
343
-
344
- if (ret !== null) this.emit('data', ret);
345
-
346
- return ret;
347
- };
348
-
349
- function chunkInvalid(state, chunk) {
350
- var er = null;
351
- if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
352
- er = new TypeError('Invalid non-string/buffer chunk');
353
- }
354
- return er;
355
- }
356
-
357
- function onEofChunk(stream, state) {
358
- if (state.ended) return;
359
- if (state.decoder) {
360
- var chunk = state.decoder.end();
361
- if (chunk && chunk.length) {
362
- state.buffer.push(chunk);
363
- state.length += state.objectMode ? 1 : chunk.length;
364
- }
365
- }
366
- state.ended = true;
367
-
368
- // emit 'readable' now to make sure it gets picked up.
369
- emitReadable(stream);
370
- }
371
-
372
- // Don't emit readable right away in sync mode, because this can trigger
373
- // another read() call => stack overflow. This way, it might trigger
374
- // a nextTick recursion warning, but that's not so bad.
375
- function emitReadable(stream) {
376
- var state = stream._readableState;
377
- state.needReadable = false;
378
- if (!state.emittedReadable) {
379
- debug('emitReadable', state.flowing);
380
- state.emittedReadable = true;
381
- if (state.sync) browser.nextTick(emitReadable_, stream);else emitReadable_(stream);
382
- }
383
- }
384
-
385
- function emitReadable_(stream) {
386
- debug('emit readable');
387
- stream.emit('readable');
388
- flow(stream);
389
- }
390
-
391
- // at this point, the user has presumably seen the 'readable' event,
392
- // and called read() to consume some data. that may have triggered
393
- // in turn another _read(n) call, in which case reading = true if
394
- // it's in progress.
395
- // However, if we're not ended, or reading, and the length < hwm,
396
- // then go ahead and try to read some more preemptively.
397
- function maybeReadMore(stream, state) {
398
- if (!state.readingMore) {
399
- state.readingMore = true;
400
- browser.nextTick(maybeReadMore_, stream, state);
401
- }
402
- }
403
-
404
- function maybeReadMore_(stream, state) {
405
- var len = state.length;
406
- while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
407
- debug('maybeReadMore read 0');
408
- stream.read(0);
409
- if (len === state.length)
410
- // didn't get any data, stop spinning.
411
- break;else len = state.length;
412
- }
413
- state.readingMore = false;
414
- }
415
-
416
- // abstract method. to be overridden in specific implementation classes.
417
- // call cb(er, data) where data is <= n in length.
418
- // for virtual (non-string, non-buffer) streams, "length" is somewhat
419
- // arbitrary, and perhaps not very meaningful.
420
- Readable.prototype._read = function (n) {
421
- this.emit('error', new Error('not implemented'));
422
- };
423
-
424
- Readable.prototype.pipe = function (dest, pipeOpts) {
425
- var src = this;
426
- var state = this._readableState;
427
-
428
- switch (state.pipesCount) {
429
- case 0:
430
- state.pipes = dest;
431
- break;
432
- case 1:
433
- state.pipes = [state.pipes, dest];
434
- break;
435
- default:
436
- state.pipes.push(dest);
437
- break;
438
- }
439
- state.pipesCount += 1;
440
- debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
441
-
442
- var doEnd = (!pipeOpts || pipeOpts.end !== false);
443
-
444
- var endFn = doEnd ? onend : cleanup;
445
- if (state.endEmitted) browser.nextTick(endFn);else src.once('end', endFn);
446
-
447
- dest.on('unpipe', onunpipe);
448
- function onunpipe(readable) {
449
- debug('onunpipe');
450
- if (readable === src) {
451
- cleanup();
452
- }
453
- }
454
-
455
- function onend() {
456
- debug('onend');
457
- dest.end();
458
- }
459
-
460
- // when the dest drains, it reduces the awaitDrain counter
461
- // on the source. This would be more elegant with a .once()
462
- // handler in flow(), but adding and removing repeatedly is
463
- // too slow.
464
- var ondrain = pipeOnDrain(src);
465
- dest.on('drain', ondrain);
466
-
467
- var cleanedUp = false;
468
- function cleanup() {
469
- debug('cleanup');
470
- // cleanup event handlers once the pipe is broken
471
- dest.removeListener('close', onclose);
472
- dest.removeListener('finish', onfinish);
473
- dest.removeListener('drain', ondrain);
474
- dest.removeListener('error', onerror);
475
- dest.removeListener('unpipe', onunpipe);
476
- src.removeListener('end', onend);
477
- src.removeListener('end', cleanup);
478
- src.removeListener('data', ondata);
479
-
480
- cleanedUp = true;
481
-
482
- // if the reader is waiting for a drain event from this
483
- // specific writer, then it would cause it to never start
484
- // flowing again.
485
- // So, if this is awaiting a drain, then we just call it now.
486
- // If we don't know, then assume that we are waiting for one.
487
- if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
488
- }
489
-
490
- // If the user pushes more data while we're writing to dest then we'll end up
491
- // in ondata again. However, we only want to increase awaitDrain once because
492
- // dest will only emit one 'drain' event for the multiple writes.
493
- // => Introduce a guard on increasing awaitDrain.
494
- var increasedAwaitDrain = false;
495
- src.on('data', ondata);
496
- function ondata(chunk) {
497
- debug('ondata');
498
- increasedAwaitDrain = false;
499
- var ret = dest.write(chunk);
500
- if (false === ret && !increasedAwaitDrain) {
501
- // If the user unpiped during `dest.write()`, it is possible
502
- // to get stuck in a permanently paused state if that write
503
- // also returned false.
504
- // => Check whether `dest` is still a piping destination.
505
- if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
506
- debug('false write response, pause', src._readableState.awaitDrain);
507
- src._readableState.awaitDrain++;
508
- increasedAwaitDrain = true;
509
- }
510
- src.pause();
511
- }
512
- }
513
-
514
- // if the dest has an error, then stop piping into it.
515
- // however, don't suppress the throwing behavior for this.
516
- function onerror(er) {
517
- debug('onerror', er);
518
- unpipe();
519
- dest.removeListener('error', onerror);
520
- if (listenerCount(dest, 'error') === 0) dest.emit('error', er);
521
- }
522
-
523
- // Make sure our error handler is attached before userland ones.
524
- prependListener(dest, 'error', onerror);
525
-
526
- // Both close and finish should trigger unpipe, but only once.
527
- function onclose() {
528
- dest.removeListener('finish', onfinish);
529
- unpipe();
530
- }
531
- dest.once('close', onclose);
532
- function onfinish() {
533
- debug('onfinish');
534
- dest.removeListener('close', onclose);
535
- unpipe();
536
- }
537
- dest.once('finish', onfinish);
538
-
539
- function unpipe() {
540
- debug('unpipe');
541
- src.unpipe(dest);
542
- }
543
-
544
- // tell the dest that it's being piped to
545
- dest.emit('pipe', src);
546
-
547
- // start the flow if it hasn't been started already.
548
- if (!state.flowing) {
549
- debug('pipe resume');
550
- src.resume();
551
- }
552
-
553
- return dest;
554
- };
555
-
556
- function pipeOnDrain(src) {
557
- return function () {
558
- var state = src._readableState;
559
- debug('pipeOnDrain', state.awaitDrain);
560
- if (state.awaitDrain) state.awaitDrain--;
561
- if (state.awaitDrain === 0 && src.listeners('data').length) {
562
- state.flowing = true;
563
- flow(src);
564
- }
565
- };
566
- }
567
-
568
- Readable.prototype.unpipe = function (dest) {
569
- var state = this._readableState;
570
-
571
- // if we're not piping anywhere, then do nothing.
572
- if (state.pipesCount === 0) return this;
573
-
574
- // just one destination. most common case.
575
- if (state.pipesCount === 1) {
576
- // passed in one, but it's not the right one.
577
- if (dest && dest !== state.pipes) return this;
578
-
579
- if (!dest) dest = state.pipes;
580
-
581
- // got a match.
582
- state.pipes = null;
583
- state.pipesCount = 0;
584
- state.flowing = false;
585
- if (dest) dest.emit('unpipe', this);
586
- return this;
587
- }
588
-
589
- // slow case. multiple pipe destinations.
590
-
591
- if (!dest) {
592
- // remove all.
593
- var dests = state.pipes;
594
- var len = state.pipesCount;
595
- state.pipes = null;
596
- state.pipesCount = 0;
597
- state.flowing = false;
598
-
599
- for (var _i = 0; _i < len; _i++) {
600
- dests[_i].emit('unpipe', this);
601
- }return this;
602
- }
603
-
604
- // try to find the right one.
605
- var i = indexOf(state.pipes, dest);
606
- if (i === -1) return this;
607
-
608
- state.pipes.splice(i, 1);
609
- state.pipesCount -= 1;
610
- if (state.pipesCount === 1) state.pipes = state.pipes[0];
611
-
612
- dest.emit('unpipe', this);
613
-
614
- return this;
615
- };
616
-
617
- // set up data events if they are asked for
618
- // Ensure readable listeners eventually get something
619
- Readable.prototype.on = function (ev, fn) {
620
- var res = events.prototype.on.call(this, ev, fn);
621
-
622
- if (ev === 'data') {
623
- // Start flowing on next tick if stream isn't explicitly paused
624
- if (this._readableState.flowing !== false) this.resume();
625
- } else if (ev === 'readable') {
626
- var state = this._readableState;
627
- if (!state.endEmitted && !state.readableListening) {
628
- state.readableListening = state.needReadable = true;
629
- state.emittedReadable = false;
630
- if (!state.reading) {
631
- browser.nextTick(nReadingNextTick, this);
632
- } else if (state.length) {
633
- emitReadable(this);
634
- }
635
- }
636
- }
637
-
638
- return res;
639
- };
640
- Readable.prototype.addListener = Readable.prototype.on;
641
-
642
- function nReadingNextTick(self) {
643
- debug('readable nexttick read 0');
644
- self.read(0);
645
- }
646
-
647
- // pause() and resume() are remnants of the legacy readable stream API
648
- // If the user uses them, then switch into old mode.
649
- Readable.prototype.resume = function () {
650
- var state = this._readableState;
651
- if (!state.flowing) {
652
- debug('resume');
653
- state.flowing = true;
654
- resume(this, state);
655
- }
656
- return this;
657
- };
658
-
659
- function resume(stream, state) {
660
- if (!state.resumeScheduled) {
661
- state.resumeScheduled = true;
662
- browser.nextTick(resume_, stream, state);
663
- }
664
- }
665
-
666
- function resume_(stream, state) {
667
- if (!state.reading) {
668
- debug('resume read 0');
669
- stream.read(0);
670
- }
671
-
672
- state.resumeScheduled = false;
673
- state.awaitDrain = 0;
674
- stream.emit('resume');
675
- flow(stream);
676
- if (state.flowing && !state.reading) stream.read(0);
677
- }
678
-
679
- Readable.prototype.pause = function () {
680
- debug('call pause flowing=%j', this._readableState.flowing);
681
- if (false !== this._readableState.flowing) {
682
- debug('pause');
683
- this._readableState.flowing = false;
684
- this.emit('pause');
685
- }
686
- return this;
687
- };
688
-
689
- function flow(stream) {
690
- var state = stream._readableState;
691
- debug('flow', state.flowing);
692
- while (state.flowing && stream.read() !== null) {}
693
- }
694
-
695
- // wrap an old-style stream as the async data source.
696
- // This is *not* part of the readable stream interface.
697
- // It is an ugly unfortunate mess of history.
698
- Readable.prototype.wrap = function (stream) {
699
- var state = this._readableState;
700
- var paused = false;
701
-
702
- var self = this;
703
- stream.on('end', function () {
704
- debug('wrapped end');
705
- if (state.decoder && !state.ended) {
706
- var chunk = state.decoder.end();
707
- if (chunk && chunk.length) self.push(chunk);
708
- }
709
-
710
- self.push(null);
711
- });
712
-
713
- stream.on('data', function (chunk) {
714
- debug('wrapped data');
715
- if (state.decoder) chunk = state.decoder.write(chunk);
716
-
717
- // don't skip over falsy values in objectMode
718
- if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
719
-
720
- var ret = self.push(chunk);
721
- if (!ret) {
722
- paused = true;
723
- stream.pause();
724
- }
725
- });
726
-
727
- // proxy all the other methods.
728
- // important when wrapping filters and duplexes.
729
- for (var i in stream) {
730
- if (this[i] === undefined && typeof stream[i] === 'function') {
731
- this[i] = function (method) {
732
- return function () {
733
- return stream[method].apply(stream, arguments);
734
- };
735
- }(i);
736
- }
737
- }
738
-
739
- // proxy certain important events.
740
- var events = ['error', 'close', 'destroy', 'pause', 'resume'];
741
- forEach(events, function (ev) {
742
- stream.on(ev, self.emit.bind(self, ev));
743
- });
744
-
745
- // when we try to consume some more bytes, simply unpause the
746
- // underlying stream.
747
- self._read = function (n) {
748
- debug('wrapped _read', n);
749
- if (paused) {
750
- paused = false;
751
- stream.resume();
752
- }
753
- };
754
-
755
- return self;
756
- };
757
-
758
- // exposed for testing purposes only.
759
- Readable._fromList = fromList;
760
-
761
- // Pluck off n bytes from an array of buffers.
762
- // Length is the combined lengths of all the buffers in the list.
763
- // This function is designed to be inlinable, so please take care when making
764
- // changes to the function body.
765
- function fromList(n, state) {
766
- // nothing buffered
767
- if (state.length === 0) return null;
768
-
769
- var ret;
770
- if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
771
- // read it all, truncate the list
772
- if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
773
- state.buffer.clear();
774
- } else {
775
- // read part of list
776
- ret = fromListPartial(n, state.buffer, state.decoder);
777
- }
778
-
779
- return ret;
780
- }
781
-
782
- // Extracts only enough buffered data to satisfy the amount requested.
783
- // This function is designed to be inlinable, so please take care when making
784
- // changes to the function body.
785
- function fromListPartial(n, list, hasStrings) {
786
- var ret;
787
- if (n < list.head.data.length) {
788
- // slice is the same for buffers and strings
789
- ret = list.head.data.slice(0, n);
790
- list.head.data = list.head.data.slice(n);
791
- } else if (n === list.head.data.length) {
792
- // first chunk is a perfect match
793
- ret = list.shift();
794
- } else {
795
- // result spans more than one buffer
796
- ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
797
- }
798
- return ret;
799
- }
800
-
801
- // Copies a specified amount of characters from the list of buffered data
802
- // chunks.
803
- // This function is designed to be inlinable, so please take care when making
804
- // changes to the function body.
805
- function copyFromBufferString(n, list) {
806
- var p = list.head;
807
- var c = 1;
808
- var ret = p.data;
809
- n -= ret.length;
810
- while (p = p.next) {
811
- var str = p.data;
812
- var nb = n > str.length ? str.length : n;
813
- if (nb === str.length) ret += str;else ret += str.slice(0, n);
814
- n -= nb;
815
- if (n === 0) {
816
- if (nb === str.length) {
817
- ++c;
818
- if (p.next) list.head = p.next;else list.head = list.tail = null;
819
- } else {
820
- list.head = p;
821
- p.data = str.slice(nb);
822
- }
823
- break;
824
- }
825
- ++c;
826
- }
827
- list.length -= c;
828
- return ret;
829
- }
830
-
831
- // Copies a specified amount of bytes from the list of buffered data chunks.
832
- // This function is designed to be inlinable, so please take care when making
833
- // changes to the function body.
834
- function copyFromBuffer(n, list) {
835
- var ret = Buffer.allocUnsafe(n);
836
- var p = list.head;
837
- var c = 1;
838
- p.data.copy(ret);
839
- n -= p.data.length;
840
- while (p = p.next) {
841
- var buf = p.data;
842
- var nb = n > buf.length ? buf.length : n;
843
- buf.copy(ret, ret.length - n, 0, nb);
844
- n -= nb;
845
- if (n === 0) {
846
- if (nb === buf.length) {
847
- ++c;
848
- if (p.next) list.head = p.next;else list.head = list.tail = null;
849
- } else {
850
- list.head = p;
851
- p.data = buf.slice(nb);
852
- }
853
- break;
854
- }
855
- ++c;
856
- }
857
- list.length -= c;
858
- return ret;
859
- }
860
-
861
- function endReadable(stream) {
862
- var state = stream._readableState;
863
-
864
- // If we get here before consuming all the bytes, then that is a
865
- // bug in node. Should never happen.
866
- if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
867
-
868
- if (!state.endEmitted) {
869
- state.ended = true;
870
- browser.nextTick(endReadableNT, state, stream);
871
- }
872
- }
873
-
874
- function endReadableNT(state, stream) {
875
- // Check that we didn't get one last unshift.
876
- if (!state.endEmitted && state.length === 0) {
877
- state.endEmitted = true;
878
- stream.readable = false;
879
- stream.emit('end');
880
- }
881
- }
882
-
883
- function forEach(xs, f) {
884
- for (var i = 0, l = xs.length; i < l; i++) {
885
- f(xs[i], i);
886
- }
887
- }
888
-
889
- function indexOf(xs, x) {
890
- for (var i = 0, l = xs.length; i < l; i++) {
891
- if (xs[i] === x) return i;
892
- }
893
- return -1;
894
- }
895
-
896
- export { Readable as R };