volview 4.0.0 → 4.0.1

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 (404) hide show
  1. package/dist/css/app.925b979f.css +1 -0
  2. package/dist/css/chunk-vendors.43a6a19a.css +5 -0
  3. package/{public → dist}/favicon.ico +0 -0
  4. package/{public → dist}/global.css +0 -0
  5. package/{src/assets/KitwareHeadAndNeck.jpg → dist/img/KitwareHeadAndNeck.11db5ffb.jpg} +0 -0
  6. package/dist/index.html +1 -0
  7. package/dist/itk/image-io/BMPImageIOReadImage.js +1 -0
  8. package/dist/itk/image-io/BMPImageIOReadImage.umd.js +1 -0
  9. package/dist/itk/image-io/BMPImageIOReadImage.wasm +0 -0
  10. package/dist/itk/image-io/BMPImageIOWriteImage.js +1 -0
  11. package/dist/itk/image-io/BMPImageIOWriteImage.umd.js +1 -0
  12. package/dist/itk/image-io/BMPImageIOWriteImage.wasm +0 -0
  13. package/dist/itk/image-io/GDCMImageIOReadImage.js +1 -0
  14. package/dist/itk/image-io/GDCMImageIOReadImage.umd.js +1 -0
  15. package/dist/itk/image-io/GDCMImageIOReadImage.wasm +0 -0
  16. package/dist/itk/image-io/GDCMImageIOWriteImage.js +1 -0
  17. package/dist/itk/image-io/GDCMImageIOWriteImage.umd.js +1 -0
  18. package/dist/itk/image-io/GDCMImageIOWriteImage.wasm +0 -0
  19. package/dist/itk/image-io/JPEGImageIOReadImage.js +1 -0
  20. package/dist/itk/image-io/JPEGImageIOReadImage.umd.js +1 -0
  21. package/dist/itk/image-io/JPEGImageIOReadImage.wasm +0 -0
  22. package/dist/itk/image-io/JPEGImageIOWriteImage.js +1 -0
  23. package/dist/itk/image-io/JPEGImageIOWriteImage.umd.js +1 -0
  24. package/dist/itk/image-io/JPEGImageIOWriteImage.wasm +0 -0
  25. package/dist/itk/image-io/MetaImageIOReadImage.js +1 -0
  26. package/dist/itk/image-io/MetaImageIOReadImage.umd.js +1 -0
  27. package/dist/itk/image-io/MetaImageIOReadImage.wasm +0 -0
  28. package/dist/itk/image-io/MetaImageIOWriteImage.js +1 -0
  29. package/dist/itk/image-io/MetaImageIOWriteImage.umd.js +1 -0
  30. package/dist/itk/image-io/MetaImageIOWriteImage.wasm +0 -0
  31. package/dist/itk/image-io/NiftiImageIOReadImage.js +1 -0
  32. package/dist/itk/image-io/NiftiImageIOReadImage.umd.js +1 -0
  33. package/dist/itk/image-io/NiftiImageIOReadImage.wasm +0 -0
  34. package/dist/itk/image-io/NiftiImageIOWriteImage.js +1 -0
  35. package/dist/itk/image-io/NiftiImageIOWriteImage.umd.js +1 -0
  36. package/dist/itk/image-io/NiftiImageIOWriteImage.wasm +0 -0
  37. package/dist/itk/image-io/NrrdImageIOReadImage.js +1 -0
  38. package/dist/itk/image-io/NrrdImageIOReadImage.umd.js +1 -0
  39. package/dist/itk/image-io/NrrdImageIOReadImage.wasm +0 -0
  40. package/dist/itk/image-io/NrrdImageIOWriteImage.js +1 -0
  41. package/dist/itk/image-io/NrrdImageIOWriteImage.umd.js +1 -0
  42. package/dist/itk/image-io/NrrdImageIOWriteImage.wasm +0 -0
  43. package/dist/itk/image-io/PNGImageIOReadImage.js +1 -0
  44. package/dist/itk/image-io/PNGImageIOReadImage.umd.js +1 -0
  45. package/dist/itk/image-io/PNGImageIOReadImage.wasm +0 -0
  46. package/dist/itk/image-io/PNGImageIOWriteImage.js +1 -0
  47. package/dist/itk/image-io/PNGImageIOWriteImage.umd.js +1 -0
  48. package/dist/itk/image-io/PNGImageIOWriteImage.wasm +0 -0
  49. package/dist/itk/image-io/ReadDICOMTags.js +1 -0
  50. package/dist/itk/image-io/ReadDICOMTags.umd.js +1 -0
  51. package/dist/itk/image-io/ReadDICOMTags.wasm +0 -0
  52. package/dist/itk/image-io/ReadImageDICOMFileSeries.js +1 -0
  53. package/dist/itk/image-io/ReadImageDICOMFileSeries.umd.js +1 -0
  54. package/dist/itk/image-io/ReadImageDICOMFileSeries.wasm +0 -0
  55. package/dist/itk/image-io/VTKImageIOReadImage.js +1 -0
  56. package/dist/itk/image-io/VTKImageIOReadImage.umd.js +1 -0
  57. package/dist/itk/image-io/VTKImageIOReadImage.wasm +0 -0
  58. package/dist/itk/image-io/VTKImageIOWriteImage.js +1 -0
  59. package/dist/itk/image-io/VTKImageIOWriteImage.umd.js +1 -0
  60. package/dist/itk/image-io/VTKImageIOWriteImage.wasm +0 -0
  61. package/dist/itk/pipelines/dicom.js +1 -0
  62. package/dist/itk/pipelines/dicom.umd.js +1 -0
  63. package/{src/io/itk-dicom/web-build → dist/itk/pipelines}/dicom.umd.wasm +0 -0
  64. package/{src/io/itk-dicom/web-build → dist/itk/pipelines}/dicom.wasm +0 -0
  65. package/dist/itk/web-workers/IOInput.d.ts +6 -0
  66. package/dist/itk/web-workers/IOInput.js +1 -0
  67. package/dist/itk/web-workers/ITKConfig.d.ts +8 -0
  68. package/dist/itk/web-workers/ITKConfig.js +1 -0
  69. package/dist/itk/web-workers/RunPipelineInput.d.ts +10 -0
  70. package/dist/itk/web-workers/RunPipelineInput.js +1 -0
  71. package/dist/itk/web-workers/WebWorkerInput.d.ts +6 -0
  72. package/dist/itk/web-workers/WebWorkerInput.js +1 -0
  73. package/dist/itk/web-workers/bundles/pipeline.worker.js +1 -0
  74. package/dist/itk/web-workers/loadImageIOPipelineModule.d.ts +4 -0
  75. package/dist/itk/web-workers/loadImageIOPipelineModule.js +1 -0
  76. package/dist/itk/web-workers/loadMeshIOPipelineModule.d.ts +4 -0
  77. package/dist/itk/web-workers/loadMeshIOPipelineModule.js +1 -0
  78. package/dist/itk/web-workers/loadPipelineModule.d.ts +3 -0
  79. package/dist/itk/web-workers/loadPipelineModule.js +1 -0
  80. package/dist/itk/web-workers/min-bundles/pipeline.worker.js +3 -0
  81. package/dist/itk/web-workers/pipeline.worker.d.ts +1 -0
  82. package/dist/itk/web-workers/pipeline.worker.js +1 -0
  83. package/dist/itk/web-workers/runPipeline.d.ts +5 -0
  84. package/dist/itk/web-workers/runPipeline.js +1 -0
  85. package/dist/js/23.be4d694e.js +21 -0
  86. package/dist/js/23.be4d694e.js.map +1 -0
  87. package/dist/js/385.51ca48a2.js +2 -0
  88. package/dist/js/385.51ca48a2.js.map +1 -0
  89. package/dist/js/422.c64a6aa7.js +2 -0
  90. package/dist/js/422.c64a6aa7.js.map +1 -0
  91. package/dist/js/979.c4823352.js +2 -0
  92. package/dist/js/979.c4823352.js.map +1 -0
  93. package/dist/js/app.81e49d9a.js +2 -0
  94. package/dist/js/app.81e49d9a.js.map +1 -0
  95. package/dist/js/chunk-vendors.0ab48f8d.js +33 -0
  96. package/dist/js/chunk-vendors.0ab48f8d.js.map +1 -0
  97. package/{public → dist}/pvm-sample.png +0 -0
  98. package/package.json +3 -2
  99. package/.browserslistrc +0 -4
  100. package/.editorconfig +0 -6
  101. package/.env +0 -6
  102. package/.eslintrc.js +0 -109
  103. package/.gitattributes +0 -1
  104. package/.github/workflows/checks.yml +0 -16
  105. package/.github/workflows/publish.yml +0 -52
  106. package/.prettierignore +0 -5
  107. package/CONTRIBUTING.md +0 -29
  108. package/babel.config.js +0 -3
  109. package/documentation/config.js +0 -15
  110. package/documentation/content/KWVolViewLogo.png +0 -0
  111. package/documentation/content/KWVolViewLogo.svg +0 -35
  112. package/documentation/content/VolViewLogo.png +0 -0
  113. package/documentation/content/VolViewLogo.svg +0 -22
  114. package/documentation/content/doc/index.md +0 -64
  115. package/documentation/content/doc/loading_data.md +0 -30
  116. package/documentation/content/doc/mouse_controls.md +0 -34
  117. package/documentation/content/doc/quick_start_guide.md +0 -75
  118. package/documentation/content/doc/rendering.md +0 -27
  119. package/documentation/content/doc/state_files.md +0 -18
  120. package/documentation/content/doc/toolbar.md +0 -20
  121. package/documentation/content/doc/welcome_screen.md +0 -23
  122. package/documentation/content/gallery/01-volview-welcome-notes.jpg +0 -0
  123. package/documentation/content/gallery/01-volview-welcome.jpg +0 -0
  124. package/documentation/content/gallery/02-volview-about.jpg +0 -0
  125. package/documentation/content/gallery/02-volview-notifications.jpg +0 -0
  126. package/documentation/content/gallery/02-volview-settings.jpg +0 -0
  127. package/documentation/content/gallery/03-volview-sample-datasets.jpg +0 -0
  128. package/documentation/content/gallery/04-volview-active-data.jpg +0 -0
  129. package/documentation/content/gallery/05-volview-select-data-to-delete.jpg +0 -0
  130. package/documentation/content/gallery/06-volview-corner-annotation.jpg +0 -0
  131. package/documentation/content/gallery/07-volview-layout-notes.jpg +0 -0
  132. package/documentation/content/gallery/07-volview-layout.jpg +0 -0
  133. package/documentation/content/gallery/09-volview-layout-3DPrimary.jpg +0 -0
  134. package/documentation/content/gallery/10-volview-wl-pan-zoom-notes.jpg +0 -0
  135. package/documentation/content/gallery/10-volview-wl-pan-zoom.jpg +0 -0
  136. package/documentation/content/gallery/11-volview-paint-notes.jpg +0 -0
  137. package/documentation/content/gallery/11-volview-paint.jpg +0 -0
  138. package/documentation/content/gallery/12-volview-paint-options.jpg +0 -0
  139. package/documentation/content/gallery/13-volview-crop-notes.jpg +0 -0
  140. package/documentation/content/gallery/13-volview-crop.jpg +0 -0
  141. package/documentation/content/gallery/14-volview-ruler.jpg +0 -0
  142. package/documentation/content/gallery/15-volview-crosshairs.jpg +0 -0
  143. package/documentation/content/gallery/16-volview-rendering.jpg +0 -0
  144. package/documentation/content/gallery/17-volview-colormap-notes.jpg +0 -0
  145. package/documentation/content/gallery/17-volview-colormap.jpg +0 -0
  146. package/documentation/content/gallery/17-volview-opacity-notes.jpg +0 -0
  147. package/documentation/content/gallery/17-volview-opacity.jpg +0 -0
  148. package/documentation/content/gallery/17-volview-opacity2.jpg +0 -0
  149. package/documentation/content/gallery/18-volview-presets.jpg +0 -0
  150. package/documentation/content/gallery/19-volview-color.jpg +0 -0
  151. package/documentation/content/gallery/19-volview-color2.jpg +0 -0
  152. package/documentation/content/gallery/20-volview-lightfollowcamera0.jpg +0 -0
  153. package/documentation/content/gallery/20-volview-lightfollowcamera1.jpg +0 -0
  154. package/documentation/content/gallery/20-volview-lightfollowcamera2.jpg +0 -0
  155. package/documentation/content/gallery/20-volview-lightfollowcamera3.jpg +0 -0
  156. package/documentation/content/gallery/21-volview-hybrid-final.jpg +0 -0
  157. package/documentation/content/gallery/21-volview-hybrid0.0.jpg +0 -0
  158. package/documentation/content/gallery/21-volview-hybrid0.5.jpg +0 -0
  159. package/documentation/content/gallery/21-volview-hybrid1.0.jpg +0 -0
  160. package/documentation/content/gallery/LocalAmbientOcclusion.jpg +0 -0
  161. package/documentation/content/gallery/Notes.pptx +0 -0
  162. package/documentation/content/gallery/VolView-Overview.jpg +0 -0
  163. package/documentation/content/gallery/index.md +0 -53
  164. package/documentation/content/icon/favicon-16x16.png +0 -0
  165. package/documentation/content/icon/favicon-196x196.png +0 -0
  166. package/documentation/content/icon/favicon-32x32.png +0 -0
  167. package/documentation/content/icon/favicon-96x96.png +0 -0
  168. package/documentation/content/index.pug +0 -43
  169. package/documentation/content/logo.png +0 -0
  170. package/documentation/content/logo.svg +0 -20
  171. package/documentation/data/menu.yml +0 -3
  172. package/documentation/themes/navy/layout/partial/footer.swig +0 -22
  173. package/documentation/tpl/__en__ +0 -31
  174. package/documentation/tpl/__sidebar__ +0 -11
  175. package/patches/jsdom-global+3.0.2.patch +0 -12
  176. package/patches/vue-toastification+1.7.14.patch +0 -41
  177. package/patches/vuetify+2.6.10.patch +0 -13
  178. package/prettier.config.js +0 -9
  179. package/public/index.html +0 -28
  180. package/server/helper.py +0 -147
  181. package/server/host.js +0 -134
  182. package/server/serialize.js +0 -111
  183. package/server/serialize.py +0 -203
  184. package/server/server.py +0 -84
  185. package/server/test.py +0 -17
  186. package/src/assets/logo.png +0 -0
  187. package/src/assets/logo.svg +0 -20
  188. package/src/assets/samples/3DUS-Fetus.jpg +0 -0
  189. package/src/assets/samples/CTA-Head_and_Neck.jpg +0 -0
  190. package/src/assets/samples/MRA-Head_and_Neck.jpg +0 -0
  191. package/src/assets/samples/MRI-Cardiac.jpg +0 -0
  192. package/src/assets/samples/MRI-PROSTATEx.jpg +0 -0
  193. package/src/components/AboutBox.vue +0 -157
  194. package/src/components/AiModule.vue +0 -60
  195. package/src/components/AnnotationsModule.vue +0 -37
  196. package/src/components/App.vue +0 -539
  197. package/src/components/ColorFunctionSlider.vue +0 -181
  198. package/src/components/DataBrowser.vue +0 -173
  199. package/src/components/DragAndDrop.vue +0 -107
  200. package/src/components/GroupableItem.vue +0 -30
  201. package/src/components/ImageDataBrowser.vue +0 -186
  202. package/src/components/ImageListCard.vue +0 -114
  203. package/src/components/ItemGroup.vue +0 -74
  204. package/src/components/LabelmapList.vue +0 -36
  205. package/src/components/LayoutGrid.vue +0 -96
  206. package/src/components/MeasurementsList.vue +0 -134
  207. package/src/components/MessageCenter.vue +0 -189
  208. package/src/components/MessageItem.vue +0 -83
  209. package/src/components/MessageNotificationContent.vue +0 -20
  210. package/src/components/MessageNotifications.vue +0 -84
  211. package/src/components/ModelBrowser.vue +0 -83
  212. package/src/components/ModulePanel.vue +0 -137
  213. package/src/components/PaintControls.vue +0 -174
  214. package/src/components/PatientBrowser.vue +0 -280
  215. package/src/components/PatientStudyVolumeBrowser.vue +0 -325
  216. package/src/components/RenderingModule.vue +0 -49
  217. package/src/components/ResizableNavDrawer.vue +0 -158
  218. package/src/components/SampleDataBrowser.vue +0 -198
  219. package/src/components/SaveSession.vue +0 -57
  220. package/src/components/Settings.vue +0 -35
  221. package/src/components/SliceSlider.vue +0 -182
  222. package/src/components/SpleenModule.vue +0 -101
  223. package/src/components/ToolButton.vue +0 -58
  224. package/src/components/ToolStrip.vue +0 -186
  225. package/src/components/ViewOverlayGrid.vue +0 -84
  226. package/src/components/VolumePresets.vue +0 -165
  227. package/src/components/VolumeProperties.vue +0 -171
  228. package/src/components/VolumeRendering.vue +0 -365
  229. package/src/components/VtkThreeView.vue +0 -512
  230. package/src/components/VtkTwoView.vue +0 -665
  231. package/src/components/__tests__/ResizableNavDrawer.spec.js +0 -32
  232. package/src/components/__tests__/ToolButton.spec.js +0 -46
  233. package/src/components/icons/KitwareLogoIcon.vue +0 -54
  234. package/src/components/icons/VolViewFullLogo.vue +0 -139
  235. package/src/components/icons/VolViewLogo.vue +0 -78
  236. package/src/components/styles/utils.css +0 -16
  237. package/src/components/styles/vtk-view.css +0 -116
  238. package/src/components/tools/CropTool.vue +0 -61
  239. package/src/components/tools/CrosshairsTool.vue +0 -93
  240. package/src/components/tools/MouseManipulatorTool.vue +0 -108
  241. package/src/components/tools/PaintTool.vue +0 -54
  242. package/src/components/tools/PanTool.vue +0 -35
  243. package/src/components/tools/RulerTool.vue +0 -202
  244. package/src/components/tools/SliceScrollTool.vue +0 -123
  245. package/src/components/tools/WindowLevelTool.vue +0 -191
  246. package/src/components/tools/ZoomTool.vue +0 -35
  247. package/src/components/tools/crop/Crop2D.vue +0 -367
  248. package/src/components/tools/crop/Crop2DLineHandle.vue +0 -103
  249. package/src/components/tools/crop/Crop3D.vue +0 -192
  250. package/src/components/tools/crop/CropControls.vue +0 -38
  251. package/src/components/tools/crop/types.ts +0 -12
  252. package/src/components/tools/crosshairs/CrosshairSVG2D.vue +0 -125
  253. package/src/components/tools/crosshairs/CrosshairsWidget2D.vue +0 -100
  254. package/src/components/tools/paint/PaintWidget2D.vue +0 -192
  255. package/src/components/tools/ruler/RulerSVG2D.vue +0 -181
  256. package/src/components/tools/ruler/RulerWidget2D.vue +0 -154
  257. package/src/composables/__tests__/useDoubleRecord.spec.ts +0 -57
  258. package/src/composables/__tests__/useOrientationLabels.spec.ts +0 -29
  259. package/src/composables/isViewAnimating.ts +0 -25
  260. package/src/composables/manageVTKSubscription.ts +0 -6
  261. package/src/composables/onProxyManagerEvent.ts +0 -50
  262. package/src/composables/proxyManager.ts +0 -13
  263. package/src/composables/sync/__tests__/createPrimitiveSyncContext.spec.ts +0 -41
  264. package/src/composables/sync/__tests__/useWindowingSync.spec.ts +0 -51
  265. package/src/composables/sync/createPrimitiveSyncContext.ts +0 -83
  266. package/src/composables/sync/useWindowingSync.ts +0 -48
  267. package/src/composables/useAppLoadingNotifications.ts +0 -73
  268. package/src/composables/useCameraOrientation.ts +0 -34
  269. package/src/composables/useCurrentImage.ts +0 -74
  270. package/src/composables/useCurrentSlice.ts +0 -43
  271. package/src/composables/useDoubleRecord.ts +0 -77
  272. package/src/composables/useEventListener.ts +0 -26
  273. package/src/composables/useGlobalErrorHook.ts +0 -18
  274. package/src/composables/useMultiSelection.ts +0 -29
  275. package/src/composables/useOrientationLabels.ts +0 -62
  276. package/src/composables/usePanels.ts +0 -42
  277. package/src/composables/usePersistCameraConfig.ts +0 -138
  278. package/src/composables/useResizeObserver.ts +0 -37
  279. package/src/composables/useResizeToFit.ts +0 -50
  280. package/src/composables/useSceneBuilder.ts +0 -96
  281. package/src/composables/useToast.js +0 -11
  282. package/src/composables/useVTKCallback.ts +0 -33
  283. package/src/composables/useVTKWorldToDisplay.ts +0 -141
  284. package/src/composables/useViewProxy.ts +0 -87
  285. package/src/composables/useVolumeThumbnailing.ts +0 -173
  286. package/src/composables/useWebGLWatchdog.ts +0 -32
  287. package/src/composables/useWidgetManager.ts +0 -41
  288. package/src/config.ts +0 -182
  289. package/src/constants.ts +0 -38
  290. package/src/core/id.ts +0 -18
  291. package/src/core/provider.ts +0 -31
  292. package/src/core/proxies.ts +0 -90
  293. package/src/core/thumbnailers/__tests__/vtk-image.spec.ts +0 -58
  294. package/src/core/thumbnailers/index.ts +0 -5
  295. package/src/core/thumbnailers/volume-thumbnailer.ts +0 -130
  296. package/src/core/thumbnailers/vtk-image.ts +0 -142
  297. package/src/core/tools/__tests__/paint.spec.ts +0 -101
  298. package/src/core/tools/__tests__/ruler.spec.ts +0 -73
  299. package/src/core/tools/paint/brush.ts +0 -20
  300. package/src/core/tools/paint/ellipse-brush.ts +0 -96
  301. package/src/core/tools/paint/index.ts +0 -141
  302. package/src/core/tools/ruler.ts +0 -149
  303. package/src/global.d.ts +0 -24
  304. package/src/io/__tests__/io.spec.ts +0 -26
  305. package/src/io/dicom.ts +0 -187
  306. package/src/io/index.ts +0 -11
  307. package/src/io/io.ts +0 -157
  308. package/src/io/itk/itkConfig.js +0 -8
  309. package/src/io/itk-dicom/dicom.cpp +0 -327
  310. package/src/io/itk-dicom/web-build/dicom.js +0 -16
  311. package/src/io/itk-dicom/web-build/dicom.umd.js +0 -21
  312. package/src/io/manifest.ts +0 -30
  313. package/src/io/readers.ts +0 -36
  314. package/src/io/state-file/index.ts +0 -170
  315. package/src/io/state-file/schema.ts +0 -277
  316. package/src/io/state-file/utils.ts +0 -33
  317. package/src/io/types.ts +0 -4
  318. package/src/io/vtk/async.reader.worker.ts +0 -50
  319. package/src/io/vtk/async.ts +0 -58
  320. package/src/io/vtk/async.writer.worker.ts +0 -46
  321. package/src/io/vtk/common.ts +0 -30
  322. package/src/io/zip.ts +0 -31
  323. package/src/main.js +0 -66
  324. package/src/main.ts +0 -1
  325. package/src/plugins/vuetify.js +0 -25
  326. package/src/shims-itk.d.ts +0 -67
  327. package/src/shims-misc.d.ts +0 -4
  328. package/src/shims-tsx.d.ts +0 -13
  329. package/src/shims-vtk.d.ts +0 -1042
  330. package/src/shims-vue.d.ts +0 -5
  331. package/src/store/__tests__/datasets.spec.ts +0 -75
  332. package/src/store/__tests__/messages.spec.ts +0 -74
  333. package/src/store/__tests__/rulers.spec.ts +0 -77
  334. package/src/store/__tests__/view-configs.spec.ts +0 -37
  335. package/src/store/datasets-dicom.ts +0 -398
  336. package/src/store/datasets-files.ts +0 -35
  337. package/src/store/datasets-images.ts +0 -118
  338. package/src/store/datasets-labelmaps.ts +0 -136
  339. package/src/store/datasets-models.ts +0 -25
  340. package/src/store/datasets.ts +0 -341
  341. package/src/store/messages.ts +0 -144
  342. package/src/store/tools/crop.ts +0 -136
  343. package/src/store/tools/crosshairs.ts +0 -131
  344. package/src/store/tools/index.ts +0 -95
  345. package/src/store/tools/paint.ts +0 -191
  346. package/src/store/tools/rulers.ts +0 -305
  347. package/src/store/tools/types.ts +0 -54
  348. package/src/store/view-configs/camera.ts +0 -51
  349. package/src/store/view-configs/common.ts +0 -61
  350. package/src/store/view-configs/slicing.ts +0 -86
  351. package/src/store/view-configs/types.ts +0 -39
  352. package/src/store/view-configs/volume-coloring.ts +0 -193
  353. package/src/store/view-configs/windowing.ts +0 -69
  354. package/src/store/view-configs.ts +0 -78
  355. package/src/store/views.ts +0 -130
  356. package/src/types/index.ts +0 -16
  357. package/src/types/layout.ts +0 -10
  358. package/src/types/lps.ts +0 -40
  359. package/src/types/views.ts +0 -65
  360. package/src/types/vtk-types.ts +0 -29
  361. package/src/utils/__tests__/lps.spec.ts +0 -102
  362. package/src/utils/color.ts +0 -23
  363. package/src/utils/errors.js +0 -3
  364. package/src/utils/fetch.ts +0 -101
  365. package/src/utils/hacks.ts +0 -14
  366. package/src/utils/index.ts +0 -83
  367. package/src/utils/lps.ts +0 -129
  368. package/src/utils/manipulators.ts +0 -35
  369. package/src/utils/promise-worker.ts +0 -45
  370. package/src/utils/vtk-helpers.ts +0 -215
  371. package/src/utils/workerHandler.js +0 -42
  372. package/src/vtk/ColorMaps.ts +0 -72
  373. package/src/vtk/CrosshairsWidget/behavior.ts +0 -112
  374. package/src/vtk/CrosshairsWidget/index.d.ts +0 -22
  375. package/src/vtk/CrosshairsWidget/index.js +0 -73
  376. package/src/vtk/CrosshairsWidget/state.ts +0 -51
  377. package/src/vtk/IJKSliceRepresentationProxy/index.d.ts +0 -9
  378. package/src/vtk/IJKSliceRepresentationProxy/index.js +0 -59
  379. package/src/vtk/LPSView2DProxy/index.d.ts +0 -18
  380. package/src/vtk/LPSView2DProxy/index.js +0 -89
  381. package/src/vtk/LPSView3DProxy/index.d.ts +0 -16
  382. package/src/vtk/LPSView3DProxy/index.js +0 -78
  383. package/src/vtk/LabelMap/index.d.ts +0 -16
  384. package/src/vtk/LabelMap/index.js +0 -49
  385. package/src/vtk/LabelMapSliceRepProxy/index.d.ts +0 -6
  386. package/src/vtk/LabelMapSliceRepProxy/index.js +0 -104
  387. package/src/vtk/MedicalColorPresets.json +0 -1448
  388. package/src/vtk/PaintBrushContextRepresentation/index.js +0 -191
  389. package/src/vtk/PaintWidget/behavior.ts +0 -101
  390. package/src/vtk/PaintWidget/index.d.ts +0 -28
  391. package/src/vtk/PaintWidget/index.js +0 -56
  392. package/src/vtk/PaintWidget/state.ts +0 -41
  393. package/src/vtk/PiecewiseWidget/index.js +0 -203
  394. package/src/vtk/RulerWidget/behavior.ts +0 -185
  395. package/src/vtk/RulerWidget/index.d.ts +0 -25
  396. package/src/vtk/RulerWidget/index.js +0 -79
  397. package/src/vtk/RulerWidget/state.ts +0 -63
  398. package/src/vtk/TreJsonConverter/index.js +0 -150
  399. package/src/vtk/proxy.js +0 -66
  400. package/src/vtk/proxyUtils.js +0 -16
  401. package/src/vtk/webvr-empty.js +0 -1
  402. package/tests/testUtils.js +0 -12
  403. package/tsconfig.json +0 -46
  404. package/vue.config.js +0 -86
@@ -0,0 +1 @@
1
+ var dicom=(()=>{var e="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!==typeof __filename&&(e=e||__filename),function(r){r=r||{};var t,n,o="undefined"!=typeof r?r:{};o["ready"]=new Promise((function(e,r){t=e,n=r}));var i=null,a=null;o["resetModuleStdout"]=function(){i=""},o["resetModuleStderr"]=function(){a=""},o["print"]=function(e){console.log(e),i+=e+"\n"},o["printErr"]=function(e){console.error(e),a+=e+"\n"},o["getModuleStdout"]=function(){return i},o["getModuleStderr"]=function(){return a};var s,u,l,c,d,f,p=Object.assign({},o),m=[],h="./this.program",y=(e,r)=>{throw r},_="object"==typeof window,w="function"==typeof importScripts,v="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,E="";function g(e){return o["locateFile"]?o["locateFile"](e,E):E+e}function k(e){if(e instanceof Rt)return;let r=e;b("exiting due to exception: "+r)}v?(E=w?require("path").dirname(E)+"/":__dirname+"/",f=()=>{d||(c=require("fs"),d=require("path"))},s=function(e,r){return f(),e=d["normalize"](e),c.readFileSync(e,r?void 0:"utf8")},l=e=>{var r=s(e,!0);return r.buffer||(r=new Uint8Array(r)),r},u=(e,r,t)=>{f(),e=d["normalize"](e),c.readFile(e,(function(e,n){e?t(e):r(n.buffer)}))},process["argv"].length>1&&(h=process["argv"][1].replace(/\\/g,"/")),m=process["argv"].slice(2),process["on"]("uncaughtException",(function(e){if(!(e instanceof Rt))throw e})),process["on"]("unhandledRejection",(function(e){throw e})),y=(e,r)=>{if(ae())throw process["exitCode"]=e,r;k(r),process["exit"](e)},o["inspect"]=function(){return"[Emscripten Module object]"}):(_||w)&&(w?E=self.location.href:"undefined"!=typeof document&&document.currentScript&&(E=document.currentScript.src),e&&(E=e),E=0!==E.indexOf("blob:")?E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},w&&(l=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),u=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)});var j=o["print"]||console.log.bind(console),b=o["printErr"]||console.warn.bind(console);Object.assign(o,p),p=null,o["arguments"]&&(m=o["arguments"]),o["thisProgram"]&&(h=o["thisProgram"]),o["quit"]&&(y=o["quit"]);var C,S=0,D=e=>{S=e},N=()=>S;o["wasmBinary"]&&(C=o["wasmBinary"]);var O,F=o["noExitRuntime"]||!0;"object"!=typeof WebAssembly&&Ee("no native wasm support detected");var P,A=!1;function T(e,r){e||Ee(r)}function M(e){var r=o["_"+e];return r}function R(e,r,t,n,o){var i={string:function(e){var r=0;if(null!==e&&void 0!==e&&0!==e){var t=1+(e.length<<2);r=ht(t),U(e,r,t)}return r},array:function(e){var r=ht(e.length);return J(e,r),r}};function a(e){return"string"===r?I(e):"boolean"===r?Boolean(e):e}var s=M(e),u=[],l=0;if(n)for(var c=0;c<n.length;c++){var d=i[t[c]];d?(0===l&&(l=pt()),u[c]=d(n[c])):u[c]=n[c]}var f=s.apply(null,u);function p(e){return 0!==l&&mt(l),a(e)}return f=p(f),f}function L(e,r,t,n){t=t||[];var o=t.every((function(e){return"number"===e})),i="string"!==r;return i&&o&&!n?M(e):function(){return R(e,r,t,arguments,n)}}var x="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function z(e,r,t){var n=r+t,o=r;while(e[o]&&!(o>=n))++o;if(o-r>16&&e.buffer&&x)return x.decode(e.subarray(r,o));var i="";while(r<o){var a=e[r++];if(128&a){var s=63&e[r++];if(192!=(224&a)){var u=63&e[r++];if(a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[r++],a<65536)i+=String.fromCharCode(a);else{var l=a-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function I(e,r){return e?z(G,e,r):""}function B(e,r,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343){var u=e.charCodeAt(++a);s=65536+((1023&s)<<10)|1023&u}if(s<=127){if(t>=i)break;r[t++]=s}else if(s<=2047){if(t+1>=i)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=i)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function U(e,r,t){return B(e,G,r,t)}function H(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++t)),n<=127?++r:r+=n<=2047?2:n<=65535?3:4}return r}function W(e){var r="";while(1){var t=G[e++>>0];if(!t)return r;r+=String.fromCharCode(t)}}var Y,q,G,X,V,K;"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function Q(e){var r=H(e)+1,t=lt(r);return t&&B(e,q,t,r),t}function $(e){var r=H(e)+1,t=ht(r);return B(e,q,t,r),t}function J(e,r){q.set(e,r)}function Z(e,r,t){for(var n=0;n<e.length;++n)q[r++>>0]=e.charCodeAt(n);t||(q[r>>0]=0)}function ee(e){Y=e,o["HEAP8"]=q=new Int8Array(e),o["HEAP16"]=X=new Int16Array(e),o["HEAP32"]=V=new Int32Array(e),o["HEAPU8"]=G=new Uint8Array(e),o["HEAPU16"]=new Uint16Array(e),o["HEAPU32"]=K=new Uint32Array(e),o["HEAPF32"]=new Float32Array(e),o["HEAPF64"]=new Float64Array(e)}o["INITIAL_MEMORY"];var re,te=[],ne=[],oe=[],ie=[];function ae(){return F}function se(){if(o["preRun"]){"function"==typeof o["preRun"]&&(o["preRun"]=[o["preRun"]]);while(o["preRun"].length)de(o["preRun"].shift())}Fe(te)}function ue(){!0,o["noFSInit"]||Ve.init.initialized||Ve.init(),Ve.ignorePermissions=!1,Be.init(),dr.root=Ve.mount(dr,{},null),Fe(ne)}function le(){Fe(oe)}function ce(){if(o["postRun"]){"function"==typeof o["postRun"]&&(o["postRun"]=[o["postRun"]]);while(o["postRun"].length)pe(o["postRun"].shift())}Fe(ie)}function de(e){te.unshift(e)}function fe(e){ne.unshift(e)}function pe(e){ie.unshift(e)}var me=0,he=null,ye=null;function _e(e){return e}function we(e){me++,o["monitorRunDependencies"]&&o["monitorRunDependencies"](me)}function ve(e){if(me--,o["monitorRunDependencies"]&&o["monitorRunDependencies"](me),0==me&&(null!==he&&(clearInterval(he),he=null),ye)){var r=ye;ye=null,r()}}function Ee(e){o["onAbort"]&&o["onAbort"](e),e="Aborted("+e+")",b(e),A=!0,P=1,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw n(r),r}var ge,ke,je,be="data:application/octet-stream;base64,";function Ce(e){return e.startsWith(be)}function Se(e){return e.startsWith("file://")}function De(e){try{if(e==ge&&C)return new Uint8Array(C);if(l)return l(e);throw"both async and sync fetching of the wasm failed"}catch(b){Ee(b)}}function Ne(){if(!C&&(_||w)){if("function"==typeof fetch&&!Se(ge))return fetch(ge,{credentials:"same-origin"}).then((function(e){if(!e["ok"])throw"failed to load wasm binary file at '"+ge+"'";return e["arrayBuffer"]()})).catch((function(){return De(ge)}));if(u)return new Promise((function(e,r){u(ge,(function(r){e(new Uint8Array(r))}),r)}))}return Promise.resolve().then((function(){return De(ge)}))}function Oe(){var e={env:ut,wasi_snapshot_preview1:ut};function r(e,r){var t=e.exports;o["asm"]=t,O=o["asm"]["memory"],ee(O.buffer),re=o["asm"]["__indirect_function_table"],fe(o["asm"]["__wasm_call_ctors"]),ve("wasm-instantiate")}function t(e){r(e["instance"])}function i(r){return Ne().then((function(r){return WebAssembly.instantiate(r,e)})).then((function(e){return e})).then(r,(function(e){b("failed to asynchronously prepare wasm: "+e),Ee(e)}))}function a(){return C||"function"!=typeof WebAssembly.instantiateStreaming||Ce(ge)||Se(ge)||v||"function"!=typeof fetch?i(t):fetch(ge,{credentials:"same-origin"}).then((function(r){var n=WebAssembly.instantiateStreaming(r,e);return n.then(t,(function(e){return b("wasm streaming compile failed: "+e),b("falling back to ArrayBuffer instantiation"),i(t)}))}))}if(we("wasm-instantiate"),o["instantiateWasm"])try{var s=o["instantiateWasm"](e,r);return s}catch(u){return b("Module.instantiateWasm callback failed with error: "+u),!1}return a().catch(n),{}}function Fe(e){while(e.length>0){var r=e.shift();if("function"!=typeof r){var t=r.func;"number"==typeof t?void 0===r.arg?Ae(t)():Ae(t)(r.arg):t(void 0===r.arg?null:r.arg)}else r(o)}}ge="dicom.umd.wasm",Ce(ge)||(ge=g(ge));var Pe=[];function Ae(e){var r=Pe[e];return r||(e>=Pe.length&&(Pe.length=e+1),Pe[e]=r=re.get(e)),r}function Te(e){if(e instanceof Rt||"unwind"==e)return P;y(1,e)}function Me(e){return lt(e+24)+24}function Re(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){K[this.ptr+4>>2]=e},this.get_type=function(){return K[this.ptr+4>>2]},this.set_destructor=function(e){K[this.ptr+8>>2]=e},this.get_destructor=function(){return K[this.ptr+8>>2]},this.set_refcount=function(e){V[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,q[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=q[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,q[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=q[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=V[this.ptr>>2];V[this.ptr>>2]=e+1},this.release_ref=function(){var e=V[this.ptr>>2];return V[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){K[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return K[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=yt(this.get_type());if(e)return K[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}function Le(e,r,t){var n=new Re(e);throw n.init(r,t),e,e}var xe={isAbs:e=>"/"===e.charAt(0),splitPath:e=>{var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return r.exec(e).slice(1)},normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=xe.isAbs(e),t="/"===e.substr(-1);return e=xe.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"),e||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=xe.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";e=xe.normalize(e),e=e.replace(/\/$/,"");var r=e.lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return xe.normalize(e.join("/"))},join2:(e,r)=>xe.normalize(e+"/"+r)};function ze(){if("object"==typeof crypto&&"function"==typeof crypto["getRandomValues"]){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(v)try{var r=require("crypto");return function(){return r["randomBytes"](1)[0]}}catch(t){}return function(){Ee("randomDevice")}}var Ie={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:Ve.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=xe.isAbs(n)}return e=xe.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"),(r?"/":"")+e||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length;r++)if(""!==e[r])break;for(var t=e.length-1;t>=0;t--)if(""!==e[t])break;return r>t?[]:e.slice(r,t-r+1)}e=Ie.resolve(e).substr(1),r=Ie.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return u=u.concat(o.slice(a)),u.join("/")}},Be={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){Be.ttys[e]={input:[],output:[],ops:r},Ve.registerDevice(e,Be.stream_ops)},stream_ops:{open:function(e){var r=Be.ttys[e.node.rdev];if(!r)throw new Ve.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Ve.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(u){throw new Ve.ErrnoError(29)}if(void 0===s&&0===i)throw new Ve.ErrnoError(6);if(null===s||void 0===s)break;i++,r[t+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new Ve.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,r[t+i])}catch(a){throw new Ve.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if(v){var t=256,n=Buffer.alloc(t),o=0;try{o=c.readSync(process.stdin.fd,n,0,t,-1)}catch(i){if(!i.toString().includes("EOF"))throw i;o=0}r=o>0?n.slice(0,o).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(r=window.prompt("Input: "),null!==r&&(r+="\n")):"function"==typeof readline&&(r=readline(),null!==r&&(r+="\n"));if(!r)return null;e.input=at(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(j(z(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(j(z(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(b(z(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(b(z(e.output,0)),e.output=[])}}};function Ue(e,r){G.fill(0,e,e+r)}function He(e,r){return Math.ceil(e/r)*r}function We(e){e=He(e,65536);var r=dt(65536,e);return r?(Ue(r,e),r):0}var Ye={ops_table:null,mount:function(e){return Ye.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(Ve.isBlkdev(t)||Ve.isFIFO(t))throw new Ve.ErrnoError(63);Ye.ops_table||(Ye.ops_table={dir:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr,lookup:Ye.node_ops.lookup,mknod:Ye.node_ops.mknod,rename:Ye.node_ops.rename,unlink:Ye.node_ops.unlink,rmdir:Ye.node_ops.rmdir,readdir:Ye.node_ops.readdir,symlink:Ye.node_ops.symlink},stream:{llseek:Ye.stream_ops.llseek}},file:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr},stream:{llseek:Ye.stream_ops.llseek,read:Ye.stream_ops.read,write:Ye.stream_ops.write,allocate:Ye.stream_ops.allocate,mmap:Ye.stream_ops.mmap,msync:Ye.stream_ops.msync}},link:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr,readlink:Ye.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ye.node_ops.getattr,setattr:Ye.node_ops.setattr},stream:Ve.chrdev_stream_ops}});var o=Ve.createNode(e,r,t,n);return Ve.isDir(o.mode)?(o.node_ops=Ye.ops_table.dir.node,o.stream_ops=Ye.ops_table.dir.stream,o.contents={}):Ve.isFile(o.mode)?(o.node_ops=Ye.ops_table.file.node,o.stream_ops=Ye.ops_table.file.stream,o.usedBytes=0,o.contents=null):Ve.isLink(o.mode)?(o.node_ops=Ye.ops_table.link.node,o.stream_ops=Ye.ops_table.link.stream):Ve.isChrdev(o.mode)&&(o.node_ops=Ye.ops_table.chrdev.node,o.stream_ops=Ye.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){var n=1048576;r=Math.max(r,t*(t<n?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var o=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(o.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr:function(e){var r={};return r.dev=Ve.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Ve.isDir(e.mode)?r.size=4096:Ve.isFile(e.mode)?r.size=e.usedBytes:Ve.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&Ye.resizeFileStorage(e,r.size)},lookup:function(e,r){throw Ve.genericErrors[44]},mknod:function(e,r,t,n){return Ye.createNode(e,r,t,n)},rename:function(e,r,t){if(Ve.isDir(e.mode)){var n;try{n=Ve.lookupNode(r,t)}catch(i){}if(n)for(var o in n.contents)throw new Ve.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=Ve.lookupNode(e,r);for(var n in t.contents)throw new Ve.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=Ye.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!Ve.isLink(e.mode))throw new Ve.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(a>8&&i.subarray)r.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)r[t+s]=i[o+s];return a},write:function(e,r,t,n,o,i){if(r.buffer===q.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),r.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=r.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=r.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(r.subarray(t,t+n),o),n}if(Ye.expandFileStorage(a,o+n),a.contents.subarray&&r.subarray)a.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=r[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&Ve.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Ve.ErrnoError(28);return n},allocate:function(e,r,t){Ye.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o){if(!Ve.isFile(e.node.mode))throw new Ve.ErrnoError(43);var i,a,s=e.node.contents;if(2&o||s.buffer!==Y){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),a=!0,i=We(r),!i)throw new Ve.ErrnoError(48);q.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(e,r,t,n,o){if(!Ve.isFile(e.node.mode))throw new Ve.ErrnoError(43);if(2&o)return 0;Ye.stream_ops.write(e,r,0,n,t,!1);return 0}}};function qe(e,r,t,n){var o=n?"":_e("al "+e);u(e,(function(t){T(t,'Loading data file "'+e+'" failed (no arrayBuffer).'),r(new Uint8Array(t)),o&&ve(o)}),(function(r){if(!t)throw'Loading data file "'+e+'" failed.';t()})),o&&we(o)}var Ge={},Xe={isWindows:!1,staticInit:()=>{Xe.isWindows=!!process.platform.match(/^win/);var e=process["binding"]("constants");e["fs"]&&(e=e["fs"]),Xe.flagsForNodeMap={1024:e["O_APPEND"],64:e["O_CREAT"],128:e["O_EXCL"],256:e["O_NOCTTY"],0:e["O_RDONLY"],2:e["O_RDWR"],4096:e["O_SYNC"],512:e["O_TRUNC"],1:e["O_WRONLY"],131072:e["O_NOFOLLOW"]}},convertNodeCode:e=>{var r=e.code;return Ge[r]},mount:e=>Xe.createNode(null,"/",Xe.getMode(e.opts.root),0),createNode:(e,r,t,n)=>{if(!Ve.isDir(t)&&!Ve.isFile(t)&&!Ve.isLink(t))throw new Ve.ErrnoError(28);var o=Ve.createNode(e,r,t);return o.node_ops=Xe.node_ops,o.stream_ops=Xe.stream_ops,o},getMode:e=>{var r;try{r=c.lstatSync(e),Xe.isWindows&&(r.mode=r.mode|(292&r.mode)>>2)}catch(t){if(!t.code)throw t;throw new Ve.ErrnoError(Xe.convertNodeCode(t))}return r.mode},realPath:e=>{var r=[];while(e.parent!==e)r.push(e.name),e=e.parent;return r.push(e.mount.opts.root),r.reverse(),xe.join.apply(null,r)},flagsForNode:e=>{e&=-2097153,e&=-2049,e&=-32769,e&=-524289,e&=-65537;var r=0;for(var t in Xe.flagsForNodeMap)e&t&&(r|=Xe.flagsForNodeMap[t],e^=t);if(e)throw new Ve.ErrnoError(28);return r},node_ops:{getattr:e=>{var r,t=Xe.realPath(e);try{r=c.lstatSync(t)}catch(n){if(!n.code)throw n;throw new Ve.ErrnoError(Xe.convertNodeCode(n))}return Xe.isWindows&&!r.blksize&&(r.blksize=4096),Xe.isWindows&&!r.blocks&&(r.blocks=(r.size+r.blksize-1)/r.blksize|0),{dev:r.dev,ino:r.ino,mode:r.mode,nlink:r.nlink,uid:r.uid,gid:r.gid,rdev:r.rdev,size:r.size,atime:r.atime,mtime:r.mtime,ctime:r.ctime,blksize:r.blksize,blocks:r.blocks}},setattr:(e,r)=>{var t=Xe.realPath(e);try{if(void 0!==r.mode&&(c.chmodSync(t,r.mode),e.mode=r.mode),void 0!==r.timestamp){var n=new Date(r.timestamp);c.utimesSync(t,n,n)}void 0!==r.size&&c.truncateSync(t,r.size)}catch(o){if(!o.code)throw o;throw new Ve.ErrnoError(Xe.convertNodeCode(o))}},lookup:(e,r)=>{var t=xe.join2(Xe.realPath(e),r),n=Xe.getMode(t);return Xe.createNode(e,r,n)},mknod:(e,r,t,n)=>{var o=Xe.createNode(e,r,t,n),i=Xe.realPath(o);try{Ve.isDir(o.mode)?c.mkdirSync(i,o.mode):c.writeFileSync(i,"",{mode:o.mode})}catch(a){if(!a.code)throw a;throw new Ve.ErrnoError(Xe.convertNodeCode(a))}return o},rename:(e,r,t)=>{var n=Xe.realPath(e),o=xe.join2(Xe.realPath(r),t);try{c.renameSync(n,o)}catch(i){if(!i.code)throw i;throw new Ve.ErrnoError(Xe.convertNodeCode(i))}e.name=t},unlink:(e,r)=>{var t=xe.join2(Xe.realPath(e),r);try{c.unlinkSync(t)}catch(n){if(!n.code)throw n;throw new Ve.ErrnoError(Xe.convertNodeCode(n))}},rmdir:(e,r)=>{var t=xe.join2(Xe.realPath(e),r);try{c.rmdirSync(t)}catch(n){if(!n.code)throw n;throw new Ve.ErrnoError(Xe.convertNodeCode(n))}},readdir:e=>{var r=Xe.realPath(e);try{return c.readdirSync(r)}catch(t){if(!t.code)throw t;throw new Ve.ErrnoError(Xe.convertNodeCode(t))}},symlink:(e,r,t)=>{var n=xe.join2(Xe.realPath(e),r);try{c.symlinkSync(t,n)}catch(o){if(!o.code)throw o;throw new Ve.ErrnoError(Xe.convertNodeCode(o))}},readlink:e=>{var r=Xe.realPath(e);try{return r=c.readlinkSync(r),r=d.relative(d.resolve(e.mount.opts.root),r),r}catch(t){if(!t.code)throw t;if("UNKNOWN"===t.code)throw new Ve.ErrnoError(28);throw new Ve.ErrnoError(Xe.convertNodeCode(t))}}},stream_ops:{open:e=>{var r=Xe.realPath(e.node);try{Ve.isFile(e.node.mode)&&(e.nfd=c.openSync(r,Xe.flagsForNode(e.flags)))}catch(t){if(!t.code)throw t;throw new Ve.ErrnoError(Xe.convertNodeCode(t))}},close:e=>{try{Ve.isFile(e.node.mode)&&e.nfd&&c.closeSync(e.nfd)}catch(r){if(!r.code)throw r;throw new Ve.ErrnoError(Xe.convertNodeCode(r))}},read:(e,r,t,n,o)=>{if(0===n)return 0;try{return c.readSync(e.nfd,Buffer.from(r.buffer),t,n,o)}catch(i){throw new Ve.ErrnoError(Xe.convertNodeCode(i))}},write:(e,r,t,n,o)=>{try{return c.writeSync(e.nfd,Buffer.from(r.buffer),t,n,o)}catch(i){throw new Ve.ErrnoError(Xe.convertNodeCode(i))}},llseek:(e,r,t)=>{var n=r;if(1===t)n+=e.position;else if(2===t&&Ve.isFile(e.node.mode))try{var o=c.fstatSync(e.nfd);n+=o.size}catch(i){throw new Ve.ErrnoError(Xe.convertNodeCode(i))}if(n<0)throw new Ve.ErrnoError(28);return n},mmap:(e,r,t,n,o)=>{if(!Ve.isFile(e.node.mode))throw new Ve.ErrnoError(43);var i=We(r);return Xe.stream_ops.read(e,q,i,r,t),{ptr:i,allocated:!0}},msync:(e,r,t,n,o)=>{if(!Ve.isFile(e.node.mode))throw new Ve.ErrnoError(43);if(2&o)return 0;Xe.stream_ops.write(e,r,0,n,t,!1);return 0}}},Ve={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,r={})=>{if(e=Ie.resolve(Ve.cwd(),e),!e)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(r=Object.assign(t,r),r.recurse_count>8)throw new Ve.ErrnoError(32);for(var n=xe.normalizeArray(e.split("/").filter((e=>!!e)),!1),o=Ve.root,i="/",a=0;a<n.length;a++){var s=a===n.length-1;if(s&&r.parent)break;if(o=Ve.lookupNode(o,n[a]),i=xe.join2(i,n[a]),Ve.isMountpoint(o)&&(!s||s&&r.follow_mount)&&(o=o.mounted.root),!s||r.follow){var u=0;while(Ve.isLink(o.mode)){var l=Ve.readlink(i);i=Ie.resolve(xe.dirname(i),l);var c=Ve.lookupPath(i,{recurse_count:r.recurse_count+1});if(o=c.node,u++>40)throw new Ve.ErrnoError(32)}}}return{path:i,node:o}},getPath:e=>{var r;while(1){if(Ve.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?t+"/"+r:t+r:t}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%Ve.nameTable.length},hashAddNode:e=>{var r=Ve.hashName(e.parent.id,e.name);e.name_next=Ve.nameTable[r],Ve.nameTable[r]=e},hashRemoveNode:e=>{var r=Ve.hashName(e.parent.id,e.name);if(Ve.nameTable[r]===e)Ve.nameTable[r]=e.name_next;else{var t=Ve.nameTable[r];while(t){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}}},lookupNode:(e,r)=>{var t=Ve.mayLookup(e);if(t)throw new Ve.ErrnoError(t,e);for(var n=Ve.hashName(e.id,r),o=Ve.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===r)return o}return Ve.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new Ve.FSNode(e,r,t,n);return Ve.hashAddNode(o),o},destroyNode:e=>{Ve.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768===(61440&e),isDir:e=>16384===(61440&e),isLink:e=>40960===(61440&e),isChrdev:e=>8192===(61440&e),isBlkdev:e=>24576===(61440&e),isFIFO:e=>4096===(61440&e),isSocket:e=>49152===(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=Ve.flagModes[e];if("undefined"==typeof r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Ve.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var r=Ve.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate:(e,r)=>{try{Ve.lookupNode(e,r);return 20}catch(t){}return Ve.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{var n;try{n=Ve.lookupNode(e,r)}catch(i){return i.errno}var o=Ve.nodePermissions(e,"wx");if(o)return o;if(t){if(!Ve.isDir(n.mode))return 54;if(Ve.isRoot(n)||Ve.getPath(n)===Ve.cwd())return 10}else if(Ve.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Ve.isLink(e.mode)?32:Ve.isDir(e.mode)&&("r"!==Ve.flagsToPermissionString(r)||512&r)?31:Ve.nodePermissions(e,Ve.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=Ve.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!Ve.streams[t])return t;throw new Ve.ErrnoError(33)},getStream:e=>Ve.streams[e],createStream:(e,r,t)=>{Ve.FSStream||(Ve.FSStream=function(){this.shared={}},Ve.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!==(2097155&this.flags)}},isWrite:{get:function(){return 0!==(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get function(){return this.shared.position},set:function(e){this.shared.position=e}}}),e=Object.assign(new Ve.FSStream,e);var n=Ve.nextfd(r,t);return e.fd=n,Ve.streams[n]=e,e},closeStream:e=>{Ve.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=Ve.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new Ve.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{Ve.devices[e]={stream_ops:r}},getDevice:e=>Ve.devices[e],getMounts:e=>{var r=[],t=[e];while(t.length){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),Ve.syncFSRequests++,Ve.syncFSRequests>1&&b("warning: "+Ve.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Ve.getMounts(Ve.root.mount),n=0;function o(e){return Ve.syncFSRequests--,r(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return i(null);r.type.syncfs(r,e,i)}))},mount:(e,r,t)=>{var n,o="/"===t,i=!t;if(o&&Ve.root)throw new Ve.ErrnoError(10);if(!o&&!i){var a=Ve.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Ve.isMountpoint(n))throw new Ve.ErrnoError(10);if(!Ve.isDir(n.mode))throw new Ve.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?Ve.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var r=Ve.lookupPath(e,{follow_mount:!1});if(!Ve.isMountpoint(r.node))throw new Ve.ErrnoError(28);var t=r.node,n=t.mounted,o=Ve.getMounts(n);Object.keys(Ve.nameTable).forEach((e=>{var r=Ve.nameTable[e];while(r){var t=r.name_next;o.includes(r.mount)&&Ve.destroyNode(r),r=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=Ve.lookupPath(e,{parent:!0}),o=n.node,i=xe.basename(e);if(!i||"."===i||".."===i)throw new Ve.ErrnoError(28);var a=Ve.mayCreate(o,i);if(a)throw new Ve.ErrnoError(a);if(!o.node_ops.mknod)throw new Ve.ErrnoError(63);return o.node_ops.mknod(o,i,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Ve.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Ve.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Ve.mkdir(n,r)}catch(i){if(20!=i.errno)throw i}}},mkdev:(e,r,t)=>("undefined"==typeof t&&(t=r,r=438),r|=8192,Ve.mknod(e,r,t)),symlink:(e,r)=>{if(!Ie.resolve(e))throw new Ve.ErrnoError(44);var t=Ve.lookupPath(r,{parent:!0}),n=t.node;if(!n)throw new Ve.ErrnoError(44);var o=xe.basename(r),i=Ve.mayCreate(n,o);if(i)throw new Ve.ErrnoError(i);if(!n.node_ops.symlink)throw new Ve.ErrnoError(63);return n.node_ops.symlink(n,o,e)},rename:(e,r)=>{var t,n,o,i=xe.dirname(e),a=xe.dirname(r),s=xe.basename(e),u=xe.basename(r);if(t=Ve.lookupPath(e,{parent:!0}),n=t.node,t=Ve.lookupPath(r,{parent:!0}),o=t.node,!n||!o)throw new Ve.ErrnoError(44);if(n.mount!==o.mount)throw new Ve.ErrnoError(75);var l,c=Ve.lookupNode(n,s),d=Ie.relative(e,a);if("."!==d.charAt(0))throw new Ve.ErrnoError(28);if(d=Ie.relative(r,i),"."!==d.charAt(0))throw new Ve.ErrnoError(55);try{l=Ve.lookupNode(o,u)}catch(m){}if(c!==l){var f=Ve.isDir(c.mode),p=Ve.mayDelete(n,s,f);if(p)throw new Ve.ErrnoError(p);if(p=l?Ve.mayDelete(o,u,f):Ve.mayCreate(o,u),p)throw new Ve.ErrnoError(p);if(!n.node_ops.rename)throw new Ve.ErrnoError(63);if(Ve.isMountpoint(c)||l&&Ve.isMountpoint(l))throw new Ve.ErrnoError(10);if(o!==n&&(p=Ve.nodePermissions(n,"w"),p))throw new Ve.ErrnoError(p);Ve.hashRemoveNode(c);try{n.node_ops.rename(c,o,u)}catch(m){throw m}finally{Ve.hashAddNode(c)}}},rmdir:e=>{var r=Ve.lookupPath(e,{parent:!0}),t=r.node,n=xe.basename(e),o=Ve.lookupNode(t,n),i=Ve.mayDelete(t,n,!0);if(i)throw new Ve.ErrnoError(i);if(!t.node_ops.rmdir)throw new Ve.ErrnoError(63);if(Ve.isMountpoint(o))throw new Ve.ErrnoError(10);t.node_ops.rmdir(t,n),Ve.destroyNode(o)},readdir:e=>{var r=Ve.lookupPath(e,{follow:!0}),t=r.node;if(!t.node_ops.readdir)throw new Ve.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var r=Ve.lookupPath(e,{parent:!0}),t=r.node;if(!t)throw new Ve.ErrnoError(44);var n=xe.basename(e),o=Ve.lookupNode(t,n),i=Ve.mayDelete(t,n,!1);if(i)throw new Ve.ErrnoError(i);if(!t.node_ops.unlink)throw new Ve.ErrnoError(63);if(Ve.isMountpoint(o))throw new Ve.ErrnoError(10);t.node_ops.unlink(t,n),Ve.destroyNode(o)},readlink:e=>{var r=Ve.lookupPath(e),t=r.node;if(!t)throw new Ve.ErrnoError(44);if(!t.node_ops.readlink)throw new Ve.ErrnoError(28);return Ie.resolve(Ve.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,r)=>{var t=Ve.lookupPath(e,{follow:!r}),n=t.node;if(!n)throw new Ve.ErrnoError(44);if(!n.node_ops.getattr)throw new Ve.ErrnoError(63);return n.node_ops.getattr(n)},lstat:e=>Ve.stat(e,!0),chmod:(e,r,t)=>{var n;if("string"==typeof e){var o=Ve.lookupPath(e,{follow:!t});n=o.node}else n=e;if(!n.node_ops.setattr)throw new Ve.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{Ve.chmod(e,r,!0)},fchmod:(e,r)=>{var t=Ve.getStream(e);if(!t)throw new Ve.ErrnoError(8);Ve.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;if("string"==typeof e){var i=Ve.lookupPath(e,{follow:!n});o=i.node}else o=e;if(!o.node_ops.setattr)throw new Ve.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{Ve.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=Ve.getStream(e);if(!n)throw new Ve.ErrnoError(8);Ve.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new Ve.ErrnoError(28);var t;if("string"==typeof e){var n=Ve.lookupPath(e,{follow:!0});t=n.node}else t=e;if(!t.node_ops.setattr)throw new Ve.ErrnoError(63);if(Ve.isDir(t.mode))throw new Ve.ErrnoError(31);if(!Ve.isFile(t.mode))throw new Ve.ErrnoError(28);var o=Ve.nodePermissions(t,"w");if(o)throw new Ve.ErrnoError(o);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=Ve.getStream(e);if(!t)throw new Ve.ErrnoError(8);if(0===(2097155&t.flags))throw new Ve.ErrnoError(28);Ve.truncate(t.node,r)},utime:(e,r,t)=>{var n=Ve.lookupPath(e,{follow:!0}),o=n.node;o.node_ops.setattr(o,{timestamp:Math.max(r,t)})},open:(e,r,t)=>{if(""===e)throw new Ve.ErrnoError(44);var n;if(r="string"==typeof r?Ve.modeStringToFlags(r):r,t="undefined"==typeof t?438:t,t=64&r?4095&t|32768:0,"object"==typeof e)n=e;else{e=xe.normalize(e);try{var i=Ve.lookupPath(e,{follow:!(131072&r)});n=i.node}catch(l){}}var a=!1;if(64&r)if(n){if(128&r)throw new Ve.ErrnoError(20)}else n=Ve.mknod(e,t,0),a=!0;if(!n)throw new Ve.ErrnoError(44);if(Ve.isChrdev(n.mode)&&(r&=-513),65536&r&&!Ve.isDir(n.mode))throw new Ve.ErrnoError(54);if(!a){var s=Ve.mayOpen(n,r);if(s)throw new Ve.ErrnoError(s)}512&r&&!a&&Ve.truncate(n,0),r&=-131713;var u=Ve.createStream({node:n,path:Ve.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),!o["logReadFiles"]||1&r||(Ve.readFiles||(Ve.readFiles={}),e in Ve.readFiles||(Ve.readFiles[e]=1)),u},close:e=>{if(Ve.isClosed(e))throw new Ve.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{Ve.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ve.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Ve.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new Ve.ErrnoError(28);if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(1===(2097155&e.flags))throw new Ve.ErrnoError(8);if(Ve.isDir(e.node.mode))throw new Ve.ErrnoError(31);if(!e.stream_ops.read)throw new Ve.ErrnoError(28);var i="undefined"!=typeof o;if(i){if(!e.seekable)throw new Ve.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,r,t,n,o);return i||(e.position+=a),a},write:(e,r,t,n,o,i)=>{if(n<0||o<0)throw new Ve.ErrnoError(28);if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(0===(2097155&e.flags))throw new Ve.ErrnoError(8);if(Ve.isDir(e.node.mode))throw new Ve.ErrnoError(31);if(!e.stream_ops.write)throw new Ve.ErrnoError(28);e.seekable&&1024&e.flags&&Ve.llseek(e,0,2);var a="undefined"!=typeof o;if(a){if(!e.seekable)throw new Ve.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,i);return a||(e.position+=s),s},allocate:(e,r,t)=>{if(Ve.isClosed(e))throw new Ve.ErrnoError(8);if(r<0||t<=0)throw new Ve.ErrnoError(28);if(0===(2097155&e.flags))throw new Ve.ErrnoError(8);if(!Ve.isFile(e.node.mode)&&!Ve.isDir(e.node.mode))throw new Ve.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ve.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if(0!==(2&n)&&0===(2&o)&&2!==(2097155&e.flags))throw new Ve.ErrnoError(2);if(1===(2097155&e.flags))throw new Ve.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ve.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new Ve.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:(e,r={})=>{if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'+r.encoding+'"');var t,n=Ve.open(e,r.flags),o=Ve.stat(e),i=o.size,a=new Uint8Array(i);return Ve.read(n,a,0,i,0),"utf8"===r.encoding?t=z(a,0):"binary"===r.encoding&&(t=a),Ve.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=Ve.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(H(r)+1),i=B(r,o,0,o.length);Ve.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Ve.write(n,r,0,r.byteLength,void 0,t.canOwn)}Ve.close(n)},cwd:()=>Ve.currentPath,chdir:e=>{var r=Ve.lookupPath(e,{follow:!0});if(null===r.node)throw new Ve.ErrnoError(44);if(!Ve.isDir(r.node.mode))throw new Ve.ErrnoError(54);var t=Ve.nodePermissions(r.node,"x");if(t)throw new Ve.ErrnoError(t);Ve.currentPath=r.path},createDefaultDirectories:()=>{Ve.mkdir("/tmp"),Ve.mkdir("/home"),Ve.mkdir("/home/web_user")},createDefaultDevices:()=>{Ve.mkdir("/dev"),Ve.registerDevice(Ve.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Ve.mkdev("/dev/null",Ve.makedev(1,3)),Be.register(Ve.makedev(5,0),Be.default_tty_ops),Be.register(Ve.makedev(6,0),Be.default_tty1_ops),Ve.mkdev("/dev/tty",Ve.makedev(5,0)),Ve.mkdev("/dev/tty1",Ve.makedev(6,0));var e=ze();Ve.createDevice("/dev","random",e),Ve.createDevice("/dev","urandom",e),Ve.mkdir("/dev/shm"),Ve.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Ve.mkdir("/proc");var e=Ve.mkdir("/proc/self");Ve.mkdir("/proc/self/fd"),Ve.mount({mount:()=>{var r=Ve.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=+r,n=Ve.getStream(t);if(!n)throw new Ve.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{o["stdin"]?Ve.createDevice("/dev","stdin",o["stdin"]):Ve.symlink("/dev/tty","/dev/stdin"),o["stdout"]?Ve.createDevice("/dev","stdout",null,o["stdout"]):Ve.symlink("/dev/tty","/dev/stdout"),o["stderr"]?Ve.createDevice("/dev","stderr",null,o["stderr"]):Ve.symlink("/dev/tty1","/dev/stderr");Ve.open("/dev/stdin",0),Ve.open("/dev/stdout",1),Ve.open("/dev/stderr",1)},ensureErrnoError:()=>{Ve.ErrnoError||(Ve.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Ve.ErrnoError.prototype=new Error,Ve.ErrnoError.prototype.constructor=Ve.ErrnoError,[44].forEach((e=>{Ve.genericErrors[e]=new Ve.ErrnoError(e),Ve.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{Ve.ensureErrnoError(),Ve.nameTable=new Array(4096),Ve.mount(Ye,{},"/"),Ve.createDefaultDirectories(),Ve.createDefaultDevices(),Ve.createSpecialDirectories(),Ve.filesystems={MEMFS:Ye,NODEFS:Xe}},init:(e,r,t)=>{Ve.init.initialized=!0,Ve.ensureErrnoError(),o["stdin"]=e||o["stdin"],o["stdout"]=r||o["stdout"],o["stderr"]=t||o["stderr"],Ve.createStandardStreams()},quit:()=>{Ve.init.initialized=!1;for(var e=0;e<Ve.streams.length;e++){var r=Ve.streams[e];r&&Ve.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=Ve.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{var t=Ve.lookupPath(e,{follow:!r});e=t.path}catch(o){}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{t=Ve.lookupPath(e,{parent:!0});n.parentExists=!0,n.parentPath=t.path,n.parentObject=t.node,n.name=xe.basename(e),t=Ve.lookupPath(e,{follow:!r}),n.exists=!0,n.path=t.path,n.object=t.node,n.name=t.node.name,n.isRoot="/"===t.path}catch(o){n.error=o.errno}return n},createPath:(e,r,t,n)=>{e="string"==typeof e?e:Ve.getPath(e);var o=r.split("/").reverse();while(o.length){var i=o.pop();if(i){var a=xe.join2(e,i);try{Ve.mkdir(a)}catch(s){}e=a}}return a},createFile:(e,r,t,n,o)=>{var i=xe.join2("string"==typeof e?e:Ve.getPath(e),r),a=Ve.getMode(n,o);return Ve.create(i,a)},createDataFile:(e,r,t,n,o,i)=>{var a=r;e&&(e="string"==typeof e?e:Ve.getPath(e),a=r?xe.join2(e,r):e);var s=Ve.getMode(n,o),u=Ve.create(a,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),c=0,d=t.length;c<d;++c)l[c]=t.charCodeAt(c);t=l}Ve.chmod(u,146|s);var f=Ve.open(u,577);Ve.write(f,t,0,t.length,0,i),Ve.close(f),Ve.chmod(u,s)}return u},createDevice:(e,r,t,n)=>{var o=xe.join2("string"==typeof e?e:Ve.getPath(e),r),i=Ve.getMode(!!t,!!n);Ve.createDevice.major||(Ve.createDevice.major=64);var a=Ve.makedev(Ve.createDevice.major++,0);return Ve.registerDevice(a,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(l){throw new Ve.ErrnoError(29)}if(void 0===u&&0===a)throw new Ve.ErrnoError(6);if(null===u||void 0===u)break;a++,r[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write:(e,r,t,o,i)=>{for(var a=0;a<o;a++)try{n(r[t+a])}catch(s){throw new Ve.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),Ve.mkdev(o,i,a)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=at(s(e.url),!0),e.usedBytes=e.contents.length}catch(r){throw new Ve.ErrnoError(29)}},createLazyFile:(e,r,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,i=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,a=1048576;o||(a=n);var s=(e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):at(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*a,t=(e+1)*a-1;if(t=Math.min(t,n-1),"undefined"==typeof u.chunks[e]&&(u.chunks[e]=s(r,t)),"undefined"==typeof u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,j("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!w)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:t};var u=Ve.createFile(e,r,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var l={},c=Object.keys(u.stream_ops);function d(e,r,t,n,o){var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)r[t+s]=i[o+s];else for(s=0;s<a;s++)r[t+s]=i.get(o+s);return a}return c.forEach((e=>{var r=u.stream_ops[e];l[e]=function(){return Ve.forceLoadFile(u),r.apply(null,arguments)}})),l.read=(e,r,t,n,o)=>(Ve.forceLoadFile(u),d(e,r,t,n,o)),l.mmap=(e,r,t,n,o)=>{Ve.forceLoadFile(u);var i=We(r);if(!i)throw new Ve.ErrnoError(48);return d(e,q,i,r,t),{ptr:i,allocated:!0}},u.stream_ops=l,u},createPreloadedFile:(e,r,t,n,o,i,a,s,u,l)=>{var c=r?Ie.resolve(xe.join2(e,r)):e,d=_e("cp "+c);function f(t){function f(t){l&&l(),s||Ve.createDataFile(e,r,t,n,o,u),i&&i(),ve(d)}Browser.handledByPreloadPlugin(t,c,f,(()=>{a&&a(),ve(d)}))||f(t)}we(d),"string"==typeof t?qe(t,(e=>f(e)),a):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=Ve.indexedDB();try{var o=n.open(Ve.DB_NAME(),Ve.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=()=>{j("creating db");var e=o.result;e.createObjectStore(Ve.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result,i=n.transaction([Ve.DB_STORE_NAME],"readwrite"),a=i.objectStore(Ve.DB_STORE_NAME),s=0,u=0,l=e.length;function c(){0==u?r():t()}e.forEach((e=>{var r=a.put(Ve.analyzePath(e).object.contents,e);r.onsuccess=()=>{s++,s+u==l&&c()},r.onerror=()=>{u++,s+u==l&&c()}})),i.onerror=t},o.onerror=t},loadFilesFromDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=Ve.indexedDB();try{var o=n.open(Ve.DB_NAME(),Ve.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([Ve.DB_STORE_NAME],"readonly")}catch(i){return void t(i)}var s=a.objectStore(Ve.DB_STORE_NAME),u=0,l=0,c=e.length;function d(){0==l?r():t()}e.forEach((e=>{var r=s.get(e);r.onsuccess=()=>{Ve.analyzePath(e).exists&&Ve.unlink(e),Ve.createDataFile(xe.dirname(e),xe.basename(e),r.result,!0,!0,!0),u++,u+l==c&&d()},r.onerror=()=>{l++,u+l==c&&d()}})),a.onerror=t},o.onerror=t}},Ke={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(xe.isAbs(r))return r;var n;if(-100===e)n=Ve.cwd();else{var o=Ve.getStream(e);if(!o)throw new Ve.ErrnoError(8);n=o.path}if(0==r.length){if(!t)throw new Ve.ErrnoError(44);return n}return xe.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(o){if(o&&o.node&&xe.normalize(r)!==xe.normalize(Ve.getPath(o.node)))return-54;throw o}return V[t>>2]=n.dev,V[t+4>>2]=0,V[t+8>>2]=n.ino,V[t+12>>2]=n.mode,V[t+16>>2]=n.nlink,V[t+20>>2]=n.uid,V[t+24>>2]=n.gid,V[t+28>>2]=n.rdev,V[t+32>>2]=0,je=[n.size>>>0,(ke=n.size,+Math.abs(ke)>=1?ke>0?(0|Math.min(+Math.floor(ke/4294967296),4294967295))>>>0:~~+Math.ceil((ke-+(~~ke>>>0))/4294967296)>>>0:0)],V[t+40>>2]=je[0],V[t+44>>2]=je[1],V[t+48>>2]=4096,V[t+52>>2]=n.blocks,V[t+56>>2]=n.atime.getTime()/1e3|0,V[t+60>>2]=0,V[t+64>>2]=n.mtime.getTime()/1e3|0,V[t+68>>2]=0,V[t+72>>2]=n.ctime.getTime()/1e3|0,V[t+76>>2]=0,je=[n.ino>>>0,(ke=n.ino,+Math.abs(ke)>=1?ke>0?(0|Math.min(+Math.floor(ke/4294967296),4294967295))>>>0:~~+Math.ceil((ke-+(~~ke>>>0))/4294967296)>>>0:0)],V[t+80>>2]=je[0],V[t+84>>2]=je[1],0},doMsync:function(e,r,t,n,o){var i=G.slice(e,e+t);Ve.msync(r,i,o,t,n)},varargs:void 0,get:function(){Ke.varargs+=4;var e=V[Ke.varargs-4>>2];return e},getStr:function(e){var r=I(e);return r},getStreamFromFD:function(e){var r=Ve.getStream(e);if(!r)throw new Ve.ErrnoError(8);return r}};function Qe(e,r,t,n){try{if(r=Ke.getStr(r),r=Ke.calculateAt(e,r),-8&t)return-28;var o=Ve.lookupPath(r,{follow:!0}),i=o.node;if(!i)return-44;var a="";return 4&t&&(a+="r"),2&t&&(a+="w"),1&t&&(a+="x"),a&&Ve.nodePermissions(i,a)?-2:0}catch(s){if("undefined"==typeof Ve||!(s instanceof Ve.ErrnoError))throw s;return-s.errno}}function $e(e){return V[ct()>>2]=e,e}function Je(e,r,t){Ke.varargs=t;try{var n=Ke.getStreamFromFD(e);switch(r){case 0:var o,i=Ke.get();return i<0?-28:(o=Ve.createStream(n,i),o.fd);case 1:case 2:return 0;case 3:return n.flags;case 4:i=Ke.get();return n.flags|=i,0;case 5:i=Ke.get();var a=0;return X[i+a>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return $e(28),-1;default:return-28}}catch(s){if("undefined"==typeof Ve||!(s instanceof Ve.ErrnoError))throw s;return-s.errno}}function Ze(e,r){try{var t=Ke.getStreamFromFD(e);return Ke.doStat(Ve.stat,t.path,r)}catch(n){if("undefined"==typeof Ve||!(n instanceof Ve.ErrnoError))throw n;return-n.errno}}function er(e,r){return r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN}function rr(e,r,t){try{var n=er(r,t);return isNaN(n)?-61:(Ve.ftruncate(e,n),0)}catch(o){if("undefined"==typeof Ve||!(o instanceof Ve.ErrnoError))throw o;return-o.errno}}function tr(e,r){try{if(0===r)return-28;var t=Ve.cwd(),n=H(t)+1;return r<n?-68:(U(t,e,r),n)}catch(o){if("undefined"==typeof Ve||!(o instanceof Ve.ErrnoError))throw o;return-o.errno}}function nr(e,r,t){try{var n=Ke.getStreamFromFD(e);n.getdents||(n.getdents=Ve.readdir(n.path));var o=280,i=0,a=Ve.llseek(n,0,1),s=Math.floor(a/o);while(s<n.getdents.length&&i+o<=t){var u,l,c=n.getdents[s];if("."===c)u=n.node.id,l=4;else if(".."===c){var d=Ve.lookupPath(n.path,{parent:!0});u=d.node.id,l=4}else{var f=Ve.lookupNode(n.node,c);u=f.id,l=Ve.isChrdev(f.mode)?2:Ve.isDir(f.mode)?4:Ve.isLink(f.mode)?10:8}je=[u>>>0,(ke=u,+Math.abs(ke)>=1?ke>0?(0|Math.min(+Math.floor(ke/4294967296),4294967295))>>>0:~~+Math.ceil((ke-+(~~ke>>>0))/4294967296)>>>0:0)],V[r+i>>2]=je[0],V[r+i+4>>2]=je[1],je=[(s+1)*o>>>0,(ke=(s+1)*o,+Math.abs(ke)>=1?ke>0?(0|Math.min(+Math.floor(ke/4294967296),4294967295))>>>0:~~+Math.ceil((ke-+(~~ke>>>0))/4294967296)>>>0:0)],V[r+i+8>>2]=je[0],V[r+i+12>>2]=je[1],X[r+i+16>>1]=280,q[r+i+18>>0]=l,U(c,r+i+19,256),i+=o,s+=1}return Ve.llseek(n,s*o,0),i}catch(p){if("undefined"==typeof Ve||!(p instanceof Ve.ErrnoError))throw p;return-p.errno}}function or(e,r,t){Ke.varargs=t;try{var n=Ke.getStreamFromFD(e);switch(r){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Ke.get();return V[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=Ke.get();return Ve.ioctl(n,r,o);case 21523:return n.tty?0:-59;case 21524:return n.tty?0:-59;default:Ee("bad ioctl syscall "+r)}}catch(i){if("undefined"==typeof Ve||!(i instanceof Ve.ErrnoError))throw i;return-i.errno}}function ir(e,r){try{return e=Ke.getStr(e),Ke.doStat(Ve.lstat,e,r)}catch(t){if("undefined"==typeof Ve||!(t instanceof Ve.ErrnoError))throw t;return-t.errno}}function ar(e,r,t){try{return r=Ke.getStr(r),r=Ke.calculateAt(e,r),r=xe.normalize(r),"/"===r[r.length-1]&&(r=r.substr(0,r.length-1)),Ve.mkdir(r,t,0),0}catch(n){if("undefined"==typeof Ve||!(n instanceof Ve.ErrnoError))throw n;return-n.errno}}function sr(e,r,t,n){try{r=Ke.getStr(r);var o=256&n,i=4096&n;return n&=-4353,r=Ke.calculateAt(e,r,i),Ke.doStat(o?Ve.lstat:Ve.stat,r,t)}catch(a){if("undefined"==typeof Ve||!(a instanceof Ve.ErrnoError))throw a;return-a.errno}}function ur(e,r,t,n){Ke.varargs=n;try{r=Ke.getStr(r),r=Ke.calculateAt(e,r);var o=n?Ke.get():0;return Ve.open(r,t,o).fd}catch(i){if("undefined"==typeof Ve||!(i instanceof Ve.ErrnoError))throw i;return-i.errno}}function lr(e,r,t,n){try{if(r=Ke.getStr(r),r=Ke.calculateAt(e,r),n<=0)return-28;var o=Ve.readlink(r),i=Math.min(n,H(o)),a=q[t+i];return U(o,t,n+1),q[t+i]=a,i}catch(s){if("undefined"==typeof Ve||!(s instanceof Ve.ErrnoError))throw s;return-s.errno}}function cr(e){try{return e=Ke.getStr(e),Ve.rmdir(e),0}catch(r){if("undefined"==typeof Ve||!(r instanceof Ve.ErrnoError))throw r;return-r.errno}}var dr={mount:function(e){return o["websocket"]=o["websocket"]&&"object"===typeof o["websocket"]?o["websocket"]:{},o["websocket"]._callbacks={},o["websocket"]["on"]=function(e,r){return"function"===typeof r&&(this._callbacks[e]=r),this},o["websocket"].emit=function(e,r){"function"===typeof this._callbacks[e]&&this._callbacks[e].call(this,r)},Ve.createNode(null,"/",16895,0)},createSocket:function(e,r,t){r&=-526337;var n=1==r;if(n&&t&&6!=t)throw new Ve.ErrnoError(66);var o={family:e,type:r,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:dr.websocket_sock_ops},i=dr.nextname(),a=Ve.createNode(dr.root,i,49152,0);a.sock=o;var s=Ve.createStream({path:i,node:a,flags:2,seekable:!1,stream_ops:dr.stream_ops});return o.stream=s,o},getSocket:function(e){var r=Ve.getStream(e);return r&&Ve.isSocket(r.node.mode)?r.node.sock:null},stream_ops:{poll:function(e){var r=e.node.sock;return r.sock_ops.poll(r)},ioctl:function(e,r,t){var n=e.node.sock;return n.sock_ops.ioctl(n,r,t)},read:function(e,r,t,n,o){var i=e.node.sock,a=i.sock_ops.recvmsg(i,n);return a?(r.set(a.buffer,t),a.buffer.length):0},write:function(e,r,t,n,o){var i=e.node.sock;return i.sock_ops.sendmsg(i,r,t,n)},close:function(e){var r=e.node.sock;r.sock_ops.close(r)}},nextname:function(){return dr.nextname.current||(dr.nextname.current=0),"socket["+dr.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(e,r,t){var n;if("object"==typeof r&&(n=r,r=null,t=null),n)if(n._socket)r=n._socket.remoteAddress,t=n._socket.remotePort;else{var i=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!i)throw new Error("WebSocket URL must be in the format ws(s)://address:port");r=i[1],t=parseInt(i[2],10)}else try{var a=o["websocket"]&&"object"===typeof o["websocket"],s="ws:#".replace("#","//");if(a&&"string"===typeof o["websocket"]["url"]&&(s=o["websocket"]["url"]),"ws://"===s||"wss://"===s){var u=r.split("/");s=s+u[0]+":"+t+"/"+u.slice(1).join("/")}var l="binary";a&&"string"===typeof o["websocket"]["subprotocol"]&&(l=o["websocket"]["subprotocol"]);var c,d=void 0;"null"!==l&&(l=l.replace(/^ +| +$/g,"").split(/ *, */),d=l),a&&null===o["websocket"]["subprotocol"]&&(l="null",d=void 0),c=v?require("ws"):WebSocket,n=new c(s,d),n.binaryType="arraybuffer"}catch(p){throw new Ve.ErrnoError(23)}var f={addr:r,port:t,socket:n,dgram_send_queue:[]};return dr.websocket_sock_ops.addPeer(e,f),dr.websocket_sock_ops.handlePeerEvents(e,f),2===e.type&&"undefined"!=typeof e.sport&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(65280&e.sport)>>8,255&e.sport])),f},getPeer:function(e,r,t){return e.peers[r+":"+t]},addPeer:function(e,r){e.peers[r.addr+":"+r.port]=r},removePeer:function(e,r){delete e.peers[r.addr+":"+r.port]},handlePeerEvents:function(e,r){var t=!0,n=function(){o["websocket"].emit("open",e.stream.fd);try{var t=r.dgram_send_queue.shift();while(t)r.socket.send(t),t=r.dgram_send_queue.shift()}catch(n){r.socket.close()}};function i(n){if("string"==typeof n){var i=new TextEncoder;n=i.encode(n)}else{if(T(void 0!==n.byteLength),0==n.byteLength)return;n=new Uint8Array(n)}var a=t;if(t=!1,a&&10===n.length&&255===n[0]&&255===n[1]&&255===n[2]&&255===n[3]&&n[4]==="p".charCodeAt(0)&&n[5]==="o".charCodeAt(0)&&n[6]==="r".charCodeAt(0)&&n[7]==="t".charCodeAt(0)){var s=n[8]<<8|n[9];return dr.websocket_sock_ops.removePeer(e,r),r.port=s,void dr.websocket_sock_ops.addPeer(e,r)}e.recv_queue.push({addr:r.addr,port:r.port,data:n}),o["websocket"].emit("message",e.stream.fd)}v?(r.socket.on("open",n),r.socket.on("message",(function(e,r){r&&i(new Uint8Array(e).buffer)})),r.socket.on("close",(function(){o["websocket"].emit("close",e.stream.fd)})),r.socket.on("error",(function(r){e.error=14,o["websocket"].emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])}))):(r.socket.onopen=n,r.socket.onclose=function(){o["websocket"].emit("close",e.stream.fd)},r.socket.onmessage=function(e){i(e.data)},r.socket.onerror=function(r){e.error=14,o["websocket"].emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})},poll:function(e){if(1===e.type&&e.server)return e.pending.length?65:0;var r=0,t=1===e.type?dr.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(r|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=16),r},ioctl:function(e,r,t){switch(r){case 21531:var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),V[t>>2]=n,0;default:return 28}},close:function(e){if(e.server){try{e.server.close()}catch(o){}e.server=null}for(var r=Object.keys(e.peers),t=0;t<r.length;t++){var n=e.peers[r[t]];try{n.socket.close()}catch(o){}dr.websocket_sock_ops.removePeer(e,n)}return 0},bind:function(e,r,t){if("undefined"!=typeof e.saddr||"undefined"!=typeof e.sport)throw new Ve.ErrnoError(28);if(e.saddr=r,e.sport=t,2===e.type){e.server&&(e.server.close(),e.server=null);try{e.sock_ops.listen(e,0)}catch(n){if(!(n instanceof Ve.ErrnoError))throw n;if(138!==n.errno)throw n}}},connect:function(e,r,t){if(e.server)throw new Ve.ErrnoError(138);if("undefined"!=typeof e.daddr&&"undefined"!=typeof e.dport){var n=dr.websocket_sock_ops.getPeer(e,e.daddr,e.dport);if(n)throw n.socket.readyState===n.socket.CONNECTING?new Ve.ErrnoError(7):new Ve.ErrnoError(30)}var o=dr.websocket_sock_ops.createPeer(e,r,t);throw e.daddr=o.addr,e.dport=o.port,new Ve.ErrnoError(26)},listen:function(e,r){if(!v)throw new Ve.ErrnoError(138);if(e.server)throw new Ve.ErrnoError(28);var t=require("ws").Server,n=e.saddr;e.server=new t({host:n,port:e.sport}),o["websocket"].emit("listen",e.stream.fd),e.server.on("connection",(function(r){if(1===e.type){var t=dr.createSocket(e.family,e.type,e.protocol),n=dr.websocket_sock_ops.createPeer(t,r);t.daddr=n.addr,t.dport=n.port,e.pending.push(t),o["websocket"].emit("connection",t.stream.fd)}else dr.websocket_sock_ops.createPeer(e,r),o["websocket"].emit("connection",e.stream.fd)})),e.server.on("close",(function(){o["websocket"].emit("close",e.stream.fd),e.server=null})),e.server.on("error",(function(r){e.error=23,o["websocket"].emit("error",[e.stream.fd,e.error,"EHOSTUNREACH: Host is unreachable"])}))},accept:function(e){if(!e.server||!e.pending.length)throw new Ve.ErrnoError(28);var r=e.pending.shift();return r.stream.flags=e.stream.flags,r},getname:function(e,r){var t,n;if(r){if(void 0===e.daddr||void 0===e.dport)throw new Ve.ErrnoError(53);t=e.daddr,n=e.dport}else t=e.saddr||0,n=e.sport||0;return{addr:t,port:n}},sendmsg:function(e,r,t,n,o,i){if(2===e.type){if(void 0!==o&&void 0!==i||(o=e.daddr,i=e.dport),void 0===o||void 0===i)throw new Ve.ErrnoError(17)}else o=e.daddr,i=e.dport;var a,s=dr.websocket_sock_ops.getPeer(e,o,i);if(1===e.type){if(!s||s.socket.readyState===s.socket.CLOSING||s.socket.readyState===s.socket.CLOSED)throw new Ve.ErrnoError(53);if(s.socket.readyState===s.socket.CONNECTING)throw new Ve.ErrnoError(6)}if(ArrayBuffer.isView(r)&&(t+=r.byteOffset,r=r.buffer),a=r.slice(t,t+n),2===e.type&&(!s||s.socket.readyState!==s.socket.OPEN))return s&&s.socket.readyState!==s.socket.CLOSING&&s.socket.readyState!==s.socket.CLOSED||(s=dr.websocket_sock_ops.createPeer(e,o,i)),s.dgram_send_queue.push(a),n;try{return s.socket.send(a),n}catch(u){throw new Ve.ErrnoError(28)}},recvmsg:function(e,r){if(1===e.type&&e.server)throw new Ve.ErrnoError(53);var t=e.recv_queue.shift();if(!t){if(1===e.type){var n=dr.websocket_sock_ops.getPeer(e,e.daddr,e.dport);if(n){if(n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)return null;throw new Ve.ErrnoError(6)}throw new Ve.ErrnoError(53)}throw new Ve.ErrnoError(6)}var o=t.data.byteLength||t.data.length,i=t.data.byteOffset||0,a=t.data.buffer||t.data,s=Math.min(r,o),u={buffer:new Uint8Array(a,i,s),addr:t.addr,port:t.port};if(1===e.type&&s<o){var l=o-s;t.data=new Uint8Array(a,i+s,l),e.recv_queue.unshift(t)}return u}}};function fr(e,r,t){try{var n=dr.createSocket(e,r,t);return n.stream.fd}catch(o){if("undefined"==typeof Ve||!(o instanceof Ve.ErrnoError))throw o;return-o.errno}}function pr(e,r){try{return e=Ke.getStr(e),Ke.doStat(Ve.stat,e,r)}catch(t){if("undefined"==typeof Ve||!(t instanceof Ve.ErrnoError))throw t;return-t.errno}}function mr(e,r,t){try{return r=Ke.getStr(r),r=Ke.calculateAt(e,r),0===t?Ve.unlink(r):512===t?Ve.rmdir(r):Ee("Invalid flags passed to unlinkat"),0}catch(n){if("undefined"==typeof Ve||!(n instanceof Ve.ErrnoError))throw n;return-n.errno}}function hr(e,r,t,n){try{if(r=Ke.getStr(r),r=Ke.calculateAt(e,r,!0),t){var o=V[t>>2],i=V[t+4>>2];a=1e3*o+i/1e6,t+=8,o=V[t>>2],i=V[t+4>>2],s=1e3*o+i/1e6}else var a=Date.now(),s=a;return Ve.utime(r,a,s),0}catch(u){if("undefined"==typeof Ve||!(u instanceof Ve.ErrnoError))throw u;return-u.errno}}function yr(e){}var _r,wr="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function vr(e,r){Ee(wr)}function Er(e,r){Ee(wr)}function gr(){return Date.now()}function kr(){throw 1/0}function jr(e,r){var t=new Date(1e3*V[e>>2]);V[r>>2]=t.getUTCSeconds(),V[r+4>>2]=t.getUTCMinutes(),V[r+8>>2]=t.getUTCHours(),V[r+12>>2]=t.getUTCDate(),V[r+16>>2]=t.getUTCMonth(),V[r+20>>2]=t.getUTCFullYear()-1900,V[r+24>>2]=t.getUTCDay();var n=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),o=(t.getTime()-n)/864e5|0;V[r+28>>2]=o}function br(e,r){var t=new Date(1e3*V[e>>2]);V[r>>2]=t.getSeconds(),V[r+4>>2]=t.getMinutes(),V[r+8>>2]=t.getHours(),V[r+12>>2]=t.getDate(),V[r+16>>2]=t.getMonth(),V[r+20>>2]=t.getFullYear()-1900,V[r+24>>2]=t.getDay();var n=new Date(t.getFullYear(),0,1),o=(t.getTime()-n.getTime())/864e5|0;V[r+28>>2]=o,V[r+36>>2]=-60*t.getTimezoneOffset();var i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=0|(i!=a&&t.getTimezoneOffset()==Math.min(a,i));V[r+32>>2]=s}function Cr(e){var r=new Date(V[e+20>>2]+1900,V[e+16>>2],V[e+12>>2],V[e+8>>2],V[e+4>>2],V[e>>2],0),t=V[e+32>>2],n=r.getTimezoneOffset(),o=new Date(r.getFullYear(),0,1),i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i);if(t<0)V[e+32>>2]=Number(i!=a&&s==n);else if(t>0!=(s==n)){var u=Math.max(a,i),l=t>0?s:u;r.setTime(r.getTime()+6e4*(l-n))}V[e+24>>2]=r.getDay();var c=(r.getTime()-o.getTime())/864e5|0;return V[e+28>>2]=c,V[e>>2]=r.getSeconds(),V[e+4>>2]=r.getMinutes(),V[e+8>>2]=r.getHours(),V[e+12>>2]=r.getDate(),V[e+16>>2]=r.getMonth(),r.getTime()/1e3|0}function Sr(e,r,t,n,o,i){try{var a=Ve.getStream(n);if(!a)return-8;var s=Ve.mmap(a,e,o,r,t),u=s.ptr;return V[i>>2]=s.allocated,u}catch(l){if("undefined"==typeof Ve||!(l instanceof Ve.ErrnoError))throw l;return-l.errno}}function Dr(e,r,t,n,o,i){try{var a=Ve.getStream(o);a&&(2&t&&Ke.doMsync(e,a,r,n,i),Ve.munmap(a))}catch(s){if("undefined"==typeof Ve||!(s instanceof Ve.ErrnoError))throw s;return-s.errno}}function Nr(e,r,t){var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),a=o.getTimezoneOffset(),s=i.getTimezoneOffset(),u=Math.max(a,s);function l(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}V[e>>2]=60*u,V[r>>2]=Number(a!=s);var c=l(o),d=l(i),f=Q(c),p=Q(d);s<a?(K[t>>2]=f,K[t+4>>2]=p):(K[t>>2]=p,K[t+4>>2]=f)}function Or(e,r,t){Or.called||(Or.called=!0,Nr(e,r,t))}function Fr(){Ee("")}function Pr(e,r,t){G.copyWithin(e,r,r+t)}function Ar(){return 2147483648}function Tr(e){try{return O.grow(e-Y.byteLength+65535>>>16),ee(O.buffer),1}catch(r){}}function Mr(e){var r=G.length;e>>>=0;var t=Ar();if(e>t)return!1;let n=(e,r)=>e+(r-e%r)%r;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);i=Math.min(i,e+100663296);var a=Math.min(t,n(Math.max(e,i),65536)),s=Tr(a);if(s)return!0}return!1}_r=v?()=>{var e=process["hrtime"]();return 1e3*e[0]+e[1]/1e6}:()=>performance.now();var Rr={};function Lr(){return h||"./this.program"}function xr(){if(!xr.strings){var e=("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Lr()};for(var t in Rr)void 0===Rr[t]?delete r[t]:r[t]=Rr[t];var n=[];for(var t in r)n.push(t+"="+r[t]);xr.strings=n}return xr.strings}function zr(e,r){var t=0;return xr().forEach((function(n,o){var i=r+t;K[e+4*o>>2]=i,Z(n,i),t+=n.length+1})),0}function Ir(e,r){var t=xr();K[e>>2]=t.length;var n=0;return t.forEach((function(e){n+=e.length+1})),K[r>>2]=n,0}function Br(e){zt(e)}function Ur(e){try{var r=Ke.getStreamFromFD(e);return Ve.close(r),0}catch(t){if("undefined"==typeof Ve||!(t instanceof Ve.ErrnoError))throw t;return t.errno}}function Hr(e,r){try{var t=Ke.getStreamFromFD(e),n=t.tty?2:Ve.isDir(t.mode)?3:Ve.isLink(t.mode)?7:4;return q[r>>0]=n,0}catch(o){if("undefined"==typeof Ve||!(o instanceof Ve.ErrnoError))throw o;return o.errno}}function Wr(e,r,t,n){for(var o=0,i=0;i<t;i++){var a=K[r>>2],s=K[r+4>>2];r+=8;var u=Ve.read(e,q,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}function Yr(e,r,t,n){try{var o=Ke.getStreamFromFD(e),i=Wr(o,r,t);return V[n>>2]=i,0}catch(a){if("undefined"==typeof Ve||!(a instanceof Ve.ErrnoError))throw a;return a.errno}}function qr(e,r,t,n,o){try{var i=er(r,t);if(isNaN(i))return 61;var a=Ke.getStreamFromFD(e);return Ve.llseek(a,i,n),je=[a.position>>>0,(ke=a.position,+Math.abs(ke)>=1?ke>0?(0|Math.min(+Math.floor(ke/4294967296),4294967295))>>>0:~~+Math.ceil((ke-+(~~ke>>>0))/4294967296)>>>0:0)],V[o>>2]=je[0],V[o+4>>2]=je[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(s){if("undefined"==typeof Ve||!(s instanceof Ve.ErrnoError))throw s;return s.errno}}function Gr(e,r,t,n){for(var o=0,i=0;i<t;i++){var a=K[r>>2],s=K[r+4>>2];r+=8;var u=Ve.write(e,q,a,s,n);if(u<0)return-1;o+=u}return o}function Xr(e,r,t,n){try{var o=Ke.getStreamFromFD(e),i=Gr(o,r,t);return K[n>>2]=i,0}catch(a){if("undefined"==typeof Ve||!(a instanceof Ve.ErrnoError))throw a;return a.errno}}function Vr(){return N()}function Kr(e){D(e)}function Qr(e){return e%4===0&&(e%100!==0||e%400===0)}function $r(e,r){for(var t=0,n=0;n<=r;t+=e[n++]);return t}var Jr=[31,29,31,30,31,30,31,31,30,31,30,31],Zr=[31,28,31,30,31,30,31,31,30,31,30,31];function et(e,r){var t=new Date(e.getTime());while(r>0){var n=Qr(t.getFullYear()),o=t.getMonth(),i=(n?Jr:Zr)[o];if(!(r>i-t.getDate()))return t.setDate(t.getDate()+r),t;r-=i-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}function rt(e,r,t,n){var o=V[n+40>>2],i={tm_sec:V[n>>2],tm_min:V[n+4>>2],tm_hour:V[n+8>>2],tm_mday:V[n+12>>2],tm_mon:V[n+16>>2],tm_year:V[n+20>>2],tm_wday:V[n+24>>2],tm_yday:V[n+28>>2],tm_isdst:V[n+32>>2],tm_gmtoff:V[n+36>>2],tm_zone:o?I(o):""},a=I(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,r,t){var n="number"==typeof e?e.toString():e||"";while(n.length<r)n=t[0]+n;return n}function f(e,r){return d(e,r,"0")}function p(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function m(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function h(e){var r=et(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=m(t),i=m(n);return p(o,r)<=0?p(i,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":function(e){return l[e.tm_wday].substring(0,3)},"%A":function(e){return l[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){var r=e.tm_year+1900;return f(r/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":function(e){return f(e.tm_mday+$r(Qr(e.tm_year+1900)?Jr:Zr,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return f(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var r=e.tm_yday+7-e.tm_wday;return f(Math.floor(r/7),2)},"%V":function(e){var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&Qr(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Qr(e.tm_year%400-1))&&r++}return f(r,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var r=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(r/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var r=e.tm_gmtoff,t=r>=0;return r=Math.abs(r)/60,r=r/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),y)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),y[u](i)));a=a.replace(/\0\0/g,"%");var _=at(a,!1);return _.length>r?0:(J(_,e),_.length-1)}function tt(e,r,t,n){return rt(e,r,t,n)}var nt=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ve.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},ot=365,it=146;Object.defineProperties(nt.prototype,{read:{get:function(){return(this.mode&ot)===ot},set:function(e){e?this.mode|=ot:this.mode&=~ot}},write:{get:function(){return(this.mode&it)===it},set:function(e){e?this.mode|=it:this.mode&=~it}},isFolder:{get:function(){return Ve.isDir(this.mode)}},isDevice:{get:function(){return Ve.isChrdev(this.mode)}}}),Ve.FSNode=nt,Ve.staticInit(),o["FS_createPath"]=Ve.createPath,o["FS_createDataFile"]=Ve.createDataFile,o["FS_createPreloadedFile"]=Ve.createPreloadedFile,o["FS_unlink"]=Ve.unlink,o["FS_createLazyFile"]=Ve.createLazyFile,o["FS_createDevice"]=Ve.createDevice,v&&(f(),Xe.staticInit()),Ge={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};function at(e,r,t){var n=t>0?t:H(e)+1,o=new Array(n),i=B(e,o,0,o.length);return r&&(o.length=i),o}"function"==typeof atob&&atob;var st,ut={__cxa_allocate_exception:Me,__cxa_throw:Le,__syscall_faccessat:Qe,__syscall_fcntl64:Je,__syscall_fstat64:Ze,__syscall_ftruncate64:rr,__syscall_getcwd:tr,__syscall_getdents64:nr,__syscall_ioctl:or,__syscall_lstat64:ir,__syscall_mkdirat:ar,__syscall_newfstatat:sr,__syscall_openat:ur,__syscall_readlinkat:lr,__syscall_rmdir:cr,__syscall_socket:fr,__syscall_stat64:pr,__syscall_unlinkat:mr,__syscall_utimensat:hr,_dlinit:yr,_dlopen_js:vr,_dlsym_js:Er,_emscripten_date_now:gr,_emscripten_throw_longjmp:kr,_gmtime_js:jr,_localtime_js:br,_mktime_js:Cr,_mmap_js:Sr,_munmap_js:Dr,_tzset_js:Or,abort:Fr,emscripten_get_now:_r,emscripten_memcpy_big:Pr,emscripten_resize_heap:Mr,environ_get:zr,environ_sizes_get:Ir,exit:Br,fd_close:Ur,fd_fdstat_get:Hr,fd_read:Yr,fd_seek:qr,fd_write:Xr,getTempRet0:Vr,invoke_di:Ot,invoke_i:Ct,invoke_ii:wt,invoke_iii:gt,invoke_iiii:Et,invoke_iiiii:kt,invoke_iiiiii:bt,invoke_iiiiiii:Tt,invoke_iiij:Mt,invoke_vi:vt,invoke_vii:jt,invoke_viid:Ft,invoke_viii:Dt,invoke_viiii:St,invoke_viiiii:Pt,invoke_viiiiii:At,invoke_viiiiiiii:Nt,setTempRet0:Kr,strftime:rt,strftime_l:tt},lt=(Oe(),o["___wasm_call_ctors"]=function(){return(o["___wasm_call_ctors"]=o["asm"]["__wasm_call_ctors"]).apply(null,arguments)},o["_unpack_error_what"]=function(){return(o["_unpack_error_what"]=o["asm"]["unpack_error_what"]).apply(null,arguments)},o["_main"]=function(){return(o["_main"]=o["asm"]["main"]).apply(null,arguments)},o["_malloc"]=function(){return(lt=o["_malloc"]=o["asm"]["malloc"]).apply(null,arguments)}),ct=(o["_free"]=function(){return(o["_free"]=o["asm"]["free"]).apply(null,arguments)},o["___errno_location"]=function(){return(ct=o["___errno_location"]=o["asm"]["__errno_location"]).apply(null,arguments)}),dt=(o["_itkPNGWriteErrorFunction"]=function(){return(o["_itkPNGWriteErrorFunction"]=o["asm"]["itkPNGWriteErrorFunction"]).apply(null,arguments)},o["_itkPNGWriteWarningFunction"]=function(){return(o["_itkPNGWriteWarningFunction"]=o["asm"]["itkPNGWriteWarningFunction"]).apply(null,arguments)},o["_itk_wasm_input_array_alloc"]=function(){return(o["_itk_wasm_input_array_alloc"]=o["asm"]["itk_wasm_input_array_alloc"]).apply(null,arguments)},o["_itk_wasm_input_json_alloc"]=function(){return(o["_itk_wasm_input_json_alloc"]=o["asm"]["itk_wasm_input_json_alloc"]).apply(null,arguments)},o["_itk_wasm_output_json_address"]=function(){return(o["_itk_wasm_output_json_address"]=o["asm"]["itk_wasm_output_json_address"]).apply(null,arguments)},o["_itk_wasm_output_json_size"]=function(){return(o["_itk_wasm_output_json_size"]=o["asm"]["itk_wasm_output_json_size"]).apply(null,arguments)},o["_itk_wasm_output_array_address"]=function(){return(o["_itk_wasm_output_array_address"]=o["asm"]["itk_wasm_output_array_address"]).apply(null,arguments)},o["_itk_wasm_output_array_size"]=function(){return(o["_itk_wasm_output_array_size"]=o["asm"]["itk_wasm_output_array_size"]).apply(null,arguments)},o["_itk_wasm_free_all"]=function(){return(o["_itk_wasm_free_all"]=o["asm"]["itk_wasm_free_all"]).apply(null,arguments)},o["___dl_seterr"]=function(){return(o["___dl_seterr"]=o["asm"]["__dl_seterr"]).apply(null,arguments)},o["_emscripten_builtin_memalign"]=function(){return(dt=o["_emscripten_builtin_memalign"]=o["asm"]["emscripten_builtin_memalign"]).apply(null,arguments)}),ft=o["_setThrew"]=function(){return(ft=o["_setThrew"]=o["asm"]["setThrew"]).apply(null,arguments)},pt=(o["_saveSetjmp"]=function(){return(o["_saveSetjmp"]=o["asm"]["saveSetjmp"]).apply(null,arguments)},o["stackSave"]=function(){return(pt=o["stackSave"]=o["asm"]["stackSave"]).apply(null,arguments)}),mt=o["stackRestore"]=function(){return(mt=o["stackRestore"]=o["asm"]["stackRestore"]).apply(null,arguments)},ht=o["stackAlloc"]=function(){return(ht=o["stackAlloc"]=o["asm"]["stackAlloc"]).apply(null,arguments)},yt=o["___cxa_is_pointer_type"]=function(){return(yt=o["___cxa_is_pointer_type"]=o["asm"]["__cxa_is_pointer_type"]).apply(null,arguments)},_t=o["dynCall_iiij"]=function(){return(_t=o["dynCall_iiij"]=o["asm"]["dynCall_iiij"]).apply(null,arguments)};o["dynCall_iiji"]=function(){return(o["dynCall_iiji"]=o["asm"]["dynCall_iiji"]).apply(null,arguments)},o["dynCall_ji"]=function(){return(o["dynCall_ji"]=o["asm"]["dynCall_ji"]).apply(null,arguments)},o["dynCall_jiji"]=function(){return(o["dynCall_jiji"]=o["asm"]["dynCall_jiji"]).apply(null,arguments)},o["dynCall_viij"]=function(){return(o["dynCall_viij"]=o["asm"]["dynCall_viij"]).apply(null,arguments)},o["dynCall_ijii"]=function(){return(o["dynCall_ijii"]=o["asm"]["dynCall_ijii"]).apply(null,arguments)},o["dynCall_ijjiiiiiij"]=function(){return(o["dynCall_ijjiiiiiij"]=o["asm"]["dynCall_ijjiiiiiij"]).apply(null,arguments)},o["dynCall_ijjiiiiii"]=function(){return(o["dynCall_ijjiiiiii"]=o["asm"]["dynCall_ijjiiiiii"]).apply(null,arguments)},o["dynCall_iji"]=function(){return(o["dynCall_iji"]=o["asm"]["dynCall_iji"]).apply(null,arguments)},o["dynCall_jji"]=function(){return(o["dynCall_jji"]=o["asm"]["dynCall_jji"]).apply(null,arguments)},o["dynCall_ijjii"]=function(){return(o["dynCall_ijjii"]=o["asm"]["dynCall_ijjii"]).apply(null,arguments)},o["dynCall_iiijii"]=function(){return(o["dynCall_iiijii"]=o["asm"]["dynCall_iiijii"]).apply(null,arguments)},o["dynCall_ijiii"]=function(){return(o["dynCall_ijiii"]=o["asm"]["dynCall_ijiii"]).apply(null,arguments)},o["dynCall_iijiii"]=function(){return(o["dynCall_iijiii"]=o["asm"]["dynCall_iijiii"]).apply(null,arguments)},o["dynCall_viiiij"]=function(){return(o["dynCall_viiiij"]=o["asm"]["dynCall_viiiij"]).apply(null,arguments)},o["dynCall_iiiij"]=function(){return(o["dynCall_iiiij"]=o["asm"]["dynCall_iiiij"]).apply(null,arguments)},o["dynCall_viiij"]=function(){return(o["dynCall_viiij"]=o["asm"]["dynCall_viiij"]).apply(null,arguments)},o["dynCall_viijii"]=function(){return(o["dynCall_viijii"]=o["asm"]["dynCall_viijii"]).apply(null,arguments)},o["dynCall_vij"]=function(){return(o["dynCall_vij"]=o["asm"]["dynCall_vij"]).apply(null,arguments)},o["dynCall_iiijiiii"]=function(){return(o["dynCall_iiijiiii"]=o["asm"]["dynCall_iiijiiii"]).apply(null,arguments)},o["dynCall_iijii"]=function(){return(o["dynCall_iijii"]=o["asm"]["dynCall_iijii"]).apply(null,arguments)},o["dynCall_iijiiii"]=function(){return(o["dynCall_iijiiii"]=o["asm"]["dynCall_iijiiii"]).apply(null,arguments)},o["dynCall_iijjii"]=function(){return(o["dynCall_iijjii"]=o["asm"]["dynCall_iijjii"]).apply(null,arguments)},o["dynCall_iijiiiiiii"]=function(){return(o["dynCall_iijiiiiiii"]=o["asm"]["dynCall_iijiiiiiii"]).apply(null,arguments)},o["dynCall_iijiiiii"]=function(){return(o["dynCall_iijiiiii"]=o["asm"]["dynCall_iijiiiii"]).apply(null,arguments)},o["dynCall_iiijiii"]=function(){return(o["dynCall_iiijiii"]=o["asm"]["dynCall_iiijiii"]).apply(null,arguments)},o["dynCall_iiiiji"]=function(){return(o["dynCall_iiiiji"]=o["asm"]["dynCall_iiiiji"]).apply(null,arguments)},o["dynCall_iij"]=function(){return(o["dynCall_iij"]=o["asm"]["dynCall_iij"]).apply(null,arguments)},o["dynCall_iiijj"]=function(){return(o["dynCall_iiijj"]=o["asm"]["dynCall_iiijj"]).apply(null,arguments)},o["dynCall_jii"]=function(){return(o["dynCall_jii"]=o["asm"]["dynCall_jii"]).apply(null,arguments)},o["dynCall_iiijjii"]=function(){return(o["dynCall_iiijjii"]=o["asm"]["dynCall_iiijjii"]).apply(null,arguments)},o["dynCall_iiijji"]=function(){return(o["dynCall_iiijji"]=o["asm"]["dynCall_iiijji"]).apply(null,arguments)},o["dynCall_jijiijj"]=function(){return(o["dynCall_jijiijj"]=o["asm"]["dynCall_jijiijj"]).apply(null,arguments)},o["dynCall_ij"]=function(){return(o["dynCall_ij"]=o["asm"]["dynCall_ij"]).apply(null,arguments)},o["dynCall_iiiijjjjji"]=function(){return(o["dynCall_iiiijjjjji"]=o["asm"]["dynCall_iiiijjjjji"]).apply(null,arguments)},o["dynCall_iiiijji"]=function(){return(o["dynCall_iiiijji"]=o["asm"]["dynCall_iiiijji"]).apply(null,arguments)},o["dynCall_iijiji"]=function(){return(o["dynCall_iijiji"]=o["asm"]["dynCall_iijiji"]).apply(null,arguments)},o["dynCall_iiiijii"]=function(){return(o["dynCall_iiiijii"]=o["asm"]["dynCall_iiiijii"]).apply(null,arguments)},o["dynCall_iiiijjjjjji"]=function(){return(o["dynCall_iiiijjjjjji"]=o["asm"]["dynCall_iiiijjjjjji"]).apply(null,arguments)},o["dynCall_iijjjjii"]=function(){return(o["dynCall_iijjjjii"]=o["asm"]["dynCall_iijjjjii"]).apply(null,arguments)},o["dynCall_iiijjji"]=function(){return(o["dynCall_iiijjji"]=o["asm"]["dynCall_iiijjji"]).apply(null,arguments)},o["dynCall_iiiijjjji"]=function(){return(o["dynCall_iiiijjjji"]=o["asm"]["dynCall_iiiijjjji"]).apply(null,arguments)},o["dynCall_iiiijjjii"]=function(){return(o["dynCall_iiiijjjii"]=o["asm"]["dynCall_iiiijjjii"]).apply(null,arguments)},o["dynCall_iiiiijjji"]=function(){return(o["dynCall_iiiiijjji"]=o["asm"]["dynCall_iiiiijjji"]).apply(null,arguments)},o["dynCall_iiiiiiijjji"]=function(){return(o["dynCall_iiiiiiijjji"]=o["asm"]["dynCall_iiiiiiijjji"]).apply(null,arguments)},o["dynCall_ijjj"]=function(){return(o["dynCall_ijjj"]=o["asm"]["dynCall_ijjj"]).apply(null,arguments)},o["dynCall_iiiiij"]=function(){return(o["dynCall_iiiiij"]=o["asm"]["dynCall_iiiiij"]).apply(null,arguments)},o["dynCall_iiiiijj"]=function(){return(o["dynCall_iiiiijj"]=o["asm"]["dynCall_iiiiijj"]).apply(null,arguments)},o["dynCall_iiiiiijj"]=function(){return(o["dynCall_iiiiiijj"]=o["asm"]["dynCall_iiiiiijj"]).apply(null,arguments)};function wt(e,r){var t=pt();try{return Ae(e)(r)}catch(n){if(mt(t),n!==n+0)throw n;ft(1,0)}}function vt(e,r){var t=pt();try{Ae(e)(r)}catch(n){if(mt(t),n!==n+0)throw n;ft(1,0)}}function Et(e,r,t,n){var o=pt();try{return Ae(e)(r,t,n)}catch(i){if(mt(o),i!==i+0)throw i;ft(1,0)}}function gt(e,r,t){var n=pt();try{return Ae(e)(r,t)}catch(o){if(mt(n),o!==o+0)throw o;ft(1,0)}}function kt(e,r,t,n,o){var i=pt();try{return Ae(e)(r,t,n,o)}catch(a){if(mt(i),a!==a+0)throw a;ft(1,0)}}function jt(e,r,t){var n=pt();try{Ae(e)(r,t)}catch(o){if(mt(n),o!==o+0)throw o;ft(1,0)}}function bt(e,r,t,n,o,i){var a=pt();try{return Ae(e)(r,t,n,o,i)}catch(s){if(mt(a),s!==s+0)throw s;ft(1,0)}}function Ct(e){var r=pt();try{return Ae(e)()}catch(t){if(mt(r),t!==t+0)throw t;ft(1,0)}}function St(e,r,t,n,o){var i=pt();try{Ae(e)(r,t,n,o)}catch(a){if(mt(i),a!==a+0)throw a;ft(1,0)}}function Dt(e,r,t,n){var o=pt();try{Ae(e)(r,t,n)}catch(i){if(mt(o),i!==i+0)throw i;ft(1,0)}}function Nt(e,r,t,n,o,i,a,s,u){var l=pt();try{Ae(e)(r,t,n,o,i,a,s,u)}catch(c){if(mt(l),c!==c+0)throw c;ft(1,0)}}function Ot(e,r){var t=pt();try{return Ae(e)(r)}catch(n){if(mt(t),n!==n+0)throw n;ft(1,0)}}function Ft(e,r,t,n){var o=pt();try{Ae(e)(r,t,n)}catch(i){if(mt(o),i!==i+0)throw i;ft(1,0)}}function Pt(e,r,t,n,o,i){var a=pt();try{Ae(e)(r,t,n,o,i)}catch(s){if(mt(a),s!==s+0)throw s;ft(1,0)}}function At(e,r,t,n,o,i,a){var s=pt();try{Ae(e)(r,t,n,o,i,a)}catch(u){if(mt(s),u!==u+0)throw u;ft(1,0)}}function Tt(e,r,t,n,o,i,a){var s=pt();try{return Ae(e)(r,t,n,o,i,a)}catch(u){if(mt(s),u!==u+0)throw u;ft(1,0)}}function Mt(e,r,t,n,o){var i=pt();try{return _t(e,r,t,n,o)}catch(a){if(mt(i),a!==a+0)throw a;ft(1,0)}}function Rt(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}o["ccall"]=R,o["cwrap"]=L,o["addRunDependency"]=we,o["removeRunDependency"]=ve,o["FS_createPath"]=Ve.createPath,o["FS_createDataFile"]=Ve.createDataFile,o["FS_createPreloadedFile"]=Ve.createPreloadedFile,o["FS_createLazyFile"]=Ve.createLazyFile,o["FS_createDevice"]=Ve.createDevice,o["FS_unlink"]=Ve.unlink,o["callMain"]=Lt,o["AsciiToString"]=W,o["writeArrayToMemory"]=J,o["writeAsciiToMemory"]=Z;function Lt(e){var r=o["_main"];e=e||[],e.unshift(h);var t=e.length,n=ht(4*(t+1)),i=n>>2;e.forEach((e=>{V[i++]=$(e)})),V[i]=0;try{var a=r(t,n);return zt(a,!0),a}catch(s){return Te(s)}finally{!0}}function xt(e){function r(){st||(st=!0,o["calledRun"]=!0,A||(ue(),le(),t(o),o["onRuntimeInitialized"]&&o["onRuntimeInitialized"](),Bt&&Lt(e),ce()))}e=e||m,me>0||(se(),me>0||(o["setStatus"]?(o["setStatus"]("Running..."),setTimeout((function(){setTimeout((function(){o["setStatus"]("")}),1),r()}),1)):r()))}function zt(e,r){P=e,It(e)}function It(e){P=e,ae()||(o["onExit"]&&o["onExit"](e),A=!0),y(e,new Rt(e))}if(ye=function e(){st||xt(),st||(ye=e)},o["run"]=xt,o["preInit"]){"function"==typeof o["preInit"]&&(o["preInit"]=[o["preInit"]]);while(o["preInit"].length>0)o["preInit"].pop()()}var Bt=!1;return o["noInitialRun"]&&(Bt=!1),xt(),o.mountContainingDir=function(e){if(v){var r=require("path"),t=r.dirname(e);if(!Ve.isDir(t)&&"/"!==t){for(var n="/",o=t.split(r.sep),i=1;i<o.length;i++)n+=o[i],Ve.analyzePath(n).exists||Ve.mkdir(n),n+="/";return Ve.mount(Xe,{root:t},n),n+r.basename(e)}}},o.unmountContainingDir=function(e){if(v){var r=require("path"),t=r.dirname(e);Ve.unmount(t)}},o.fs_mkdirs=function(e){for(var r="/",t=e.split("/"),n=1;n<t.length;++n)r+=t[n],Ve.analyzePath(r).exists||Ve.mkdir(r),r+="/"},o.fs_readFile=function(e,r){return Ve.readFile(e,r)},o.fs_writeFile=function(e,r,t){return Ve.writeFile(e,r,t)},o.fs_unlink=function(e){return Ve.unlink(e)},o.fs_open=function(e,r,t){return Ve.open(e,r,t)},o.fs_stat=function(e){return Ve.stat(e)},o.fs_read=function(e,r,t,n,o){return Ve.read(e,r,t,n,o)},o.fs_close=function(e){return Ve.close(e)},r.ready}})();"object"===typeof exports&&"object"===typeof module?module.exports=dicom:"function"===typeof define&&define["amd"]?define([],(function(){return dicom})):"object"===typeof exports&&(exports["dicom"]=dicom);
@@ -0,0 +1,6 @@
1
+ import RunPipelineInput from "./RunPipelineInput.js";
2
+ interface IOInput extends RunPipelineInput {
3
+ fileName: string;
4
+ mimeType: string;
5
+ }
6
+ export default IOInput;
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,8 @@
1
+ interface ITKConfig {
2
+ webWorkersUrl?: string;
3
+ pipelineWorkerUrl?: string;
4
+ pipelinesUrl: string;
5
+ imageIOUrl: string;
6
+ meshIOUrl: string;
7
+ }
8
+ export default ITKConfig;
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,10 @@
1
+ import PipelineInput from '../pipeline/PipelineInput.js';
2
+ import PipelineOutput from '../pipeline/PipelineOutput.js';
3
+ import WebWorkerInput from './WebWorkerInput.js';
4
+ interface RunPipelineInput extends WebWorkerInput {
5
+ pipelinePath: string | object;
6
+ args: string[];
7
+ outputs: PipelineOutput[];
8
+ inputs: PipelineInput[];
9
+ }
10
+ export default RunPipelineInput;
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,6 @@
1
+ import ITKConfig from './ITKConfig.js';
2
+ interface WebWorkerInput {
3
+ operation: 'runPipeline' | 'runPolyDataIOPipeline' | 'readImage' | 'writeImage' | 'readMesh' | 'writeMesh' | 'meshToPolyData' | 'polyDataToMesh' | 'readDICOMImageSeries' | 'readDICOMTags';
4
+ config: ITKConfig;
5
+ }
6
+ export default WebWorkerInput;
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1 @@
1
+ (function(){"use strict";var e={exports:{}},t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(){n(this,e),Object.defineProperty(this,"__listeners",{value:{},enumerable:!1,writable:!1})}return t(e,[{key:"emit",value:function(e){if(!this.__listeners[e])return this;for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=!0,i=!1,o=void 0;try{for(var s,u=this.__listeners[e][Symbol.iterator]();!(a=(s=u.next()).done);a=!0){var l=s.value;l.apply(void 0,n)}}catch(f){i=!0,o=f}finally{try{!a&&u.return&&u.return()}finally{if(i)throw o}}return this}},{key:"once",value:function(e,t){var n=this,r=function r(){n.off(e,r),t.apply(void 0,arguments)};return this.on(e,r)}},{key:"on",value:function(e,t){return this.__listeners[e]||(this.__listeners[e]=[]),this.__listeners[e].push(t),this}},{key:"off",value:function(e,t){return this.__listeners[e]=t?this.__listeners[e].filter((function(e){return e!==t})):[],this}}]),e}(),a=r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in a)return a.value;var o=a.get;return void 0!==o?o.call(r):void 0},s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=a,h=0,m=1,y=0,g=1,b="main",I=function(e){return"object"===("undefined"===typeof e?"undefined":s(e))&&null!==e&&"function"===typeof e.then&&"function"===typeof e.catch};function w(e){var t=p({},b,e),n=self.postMessage.bind(self),r=new(function(e){function r(){return l(this,r),f(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return c(r,e),i(r,[{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return 1==r.length&&r[0]instanceof O?n({eventName:e,args:r},r[0].transferable):n({eventName:e,args:r}),this}},{key:"emitLocally",value:function(e){for(var t,n=arguments.length,a=Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];(t=o(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"emit",this)).call.apply(t,[this,e].concat(a))}},{key:"operation",value:function(e,n){return t[e]=n,this}}]),r}(d)),a=function(e,t,n){var r=function(t){t&&t instanceof O?w(e,g,t.payload,t.transferable):w(e,g,t)},a=function(t){w(e,y,{message:t.message,stack:t.stack})};try{var i=s(e,t,n);I(i)?i.then(r).catch(a):r(i)}catch(o){a(o)}},s=function(e,n,r){var a=t[r||b];if(!a)throw new Error("Not found handler for this request");return a(n,v.bind(null,e))},w=function(e,t,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];n([h,e,t,r],a)},v=function(e,t,r){if(!t)throw new Error("eventName is required");if("string"!==typeof t)throw new Error("eventName should be string");n([m,e,t,r])};return self.addEventListener("message",(function(e){var t=e.data;Array.isArray(t)?a.apply(void 0,u(t)):t&&t.eventName&&r.emitLocally.apply(r,[t.eventName].concat(u(t.args)))})),r}var O=function e(t,n){l(this,e),this.payload=t,this.transferable=n};e.exports=w,e.exports.TransferableResponse=O;var v=e.exports,S={exports:{}},T=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},P=T,_=Object.prototype.toString;function x(e){return"[object Array]"===_.call(e)}function M(e){return"undefined"===typeof e}function A(e){return null!==e&&!M(e)&&null!==e.constructor&&!M(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function C(e){return"[object ArrayBuffer]"===_.call(e)}function k(e){return"undefined"!==typeof FormData&&e instanceof FormData}function E(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function B(e){return"string"===typeof e}function D(e){return"number"===typeof e}function F(e){return null!==e&&"object"===typeof e}function U(e){if("[object Object]"!==_.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function N(e){return"[object Date]"===_.call(e)}function j(e){return"[object File]"===_.call(e)}function R(e){return"[object Blob]"===_.call(e)}function z(e){return"[object Function]"===_.call(e)}function L(e){return F(e)&&z(e.pipe)}function $(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}function G(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function J(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function q(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),x(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}function W(){var e={};function t(t,n){U(e[n])&&U(t)?e[n]=W(e[n],t):U(t)?e[n]=W({},t):x(t)?e[n]=t.slice():e[n]=t}for(var n=0,r=arguments.length;n<r;n++)q(arguments[n],t);return e}function V(e,t,n){return q(t,(function(t,r){e[r]=n&&"function"===typeof t?P(t,n):t})),e}function H(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}var K={isArray:x,isArrayBuffer:C,isBuffer:A,isFormData:k,isArrayBufferView:E,isString:B,isNumber:D,isObject:F,isPlainObject:U,isUndefined:M,isDate:N,isFile:j,isBlob:R,isFunction:z,isStream:L,isURLSearchParams:$,isStandardBrowserEnv:J,forEach:q,merge:W,extend:V,trim:G,stripBOM:H},X=K;function Z(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Y=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(X.isURLSearchParams(t))r=t.toString();else{var a=[];X.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(X.isArray(e)?t+="[]":e=[e],X.forEach(e,(function(e){X.isDate(e)?e=e.toISOString():X.isObject(e)&&(e=JSON.stringify(e)),a.push(Z(t)+"="+Z(e))})))})),r=a.join("&")}if(r){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},Q=K;function ee(){this.handlers=[]}ee.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},ee.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},ee.prototype.forEach=function(e){Q.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var te=ee,ne=K,re=function(e,t){ne.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},ae=function(e,t,n,r,a){return e.config=t,n&&(e.code=n),e.request=r,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},ie=ae,oe=function(e,t,n,r,a){var i=new Error(e);return ie(i,t,n,r,a)},se=oe,ue=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(se("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)},le=K,fe=le.isStandardBrowserEnv()?function(){return{write:function(e,t,n,r,a,i){var o=[];o.push(e+"="+encodeURIComponent(t)),le.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),le.isString(r)&&o.push("path="+r),le.isString(a)&&o.push("domain="+a),!0===i&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),ce=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)},pe=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},de=ce,he=pe,me=function(e,t){return e&&!de(t)?he(e,t):t},ye=K,ge=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],be=function(e){var t,n,r,a={};return e?(ye.forEach(e.split("\n"),(function(e){if(r=e.indexOf(":"),t=ye.trim(e.substr(0,r)).toLowerCase(),n=ye.trim(e.substr(r+1)),t){if(a[t]&&ge.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a},Ie=K,we=Ie.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=Ie.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return function(){return!0}}();function Oe(e){this.message=e}Oe.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Oe.prototype.__CANCEL__=!0;var ve=Oe,Se=K,Te=ue,Pe=fe,_e=Y,xe=me,Me=be,Ae=we,Ce=oe,ke=$e,Ee=ve,Be=function(e){return new Promise((function(t,n){var r,a=e.data,i=e.headers,o=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}Se.isFormData(a)&&delete i["Content-Type"];var u=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(l+":"+f)}var c=xe(e.baseURL,e.url);function p(){if(u){var r="getAllResponseHeaders"in u?Me(u.getAllResponseHeaders()):null,a=o&&"text"!==o&&"json"!==o?u.response:u.responseText,i={data:a,status:u.status,statusText:u.statusText,headers:r,config:e,request:u};Te((function(e){t(e),s()}),(function(e){n(e),s()}),i),u=null}}if(u.open(e.method.toUpperCase(),_e(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(p)},u.onabort=function(){u&&(n(Ce("Request aborted",e,"ECONNABORTED",u)),u=null)},u.onerror=function(){n(Ce("Network Error",e,null,u)),u=null},u.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||ke.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(Ce(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",u)),u=null},Se.isStandardBrowserEnv()){var d=(e.withCredentials||Ae(c))&&e.xsrfCookieName?Pe.read(e.xsrfCookieName):void 0;d&&(i[e.xsrfHeaderName]=d)}"setRequestHeader"in u&&Se.forEach(i,(function(e,t){"undefined"===typeof a&&"content-type"===t.toLowerCase()?delete i[t]:u.setRequestHeader(t,e)})),Se.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),o&&"json"!==o&&(u.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&u.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(r=function(e){u&&(n(!e||e&&e.type?new Ee("canceled"):e),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r))),a||(a=null),u.send(a)}))},De=K,Fe=re,Ue=ae,Ne={"Content-Type":"application/x-www-form-urlencoded"};function je(e,t){!De.isUndefined(e)&&De.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function Re(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=Be),e}function ze(e,t,n){if(De.isString(e))try{return(t||JSON.parse)(e),De.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}var Le={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Re(),transformRequest:[function(e,t){return Fe(t,"Accept"),Fe(t,"Content-Type"),De.isFormData(e)||De.isArrayBuffer(e)||De.isBuffer(e)||De.isStream(e)||De.isFile(e)||De.isBlob(e)?e:De.isArrayBufferView(e)?e.buffer:De.isURLSearchParams(e)?(je(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):De.isObject(e)||t&&"application/json"===t["Content-Type"]?(je(t,"application/json"),ze(e)):e}],transformResponse:[function(e){var t=this.transitional||Le.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||r&&De.isString(e)&&e.length)try{return JSON.parse(e)}catch(i){if(a){if("SyntaxError"===i.name)throw Ue(i,this,"E_JSON_PARSE");throw i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};De.forEach(["delete","get","head"],(function(e){Le.headers[e]={}})),De.forEach(["post","put","patch"],(function(e){Le.headers[e]=De.merge(Ne)}));var $e=Le,Ge=K,Je=$e,qe=function(e,t,n){var r=this||Je;return Ge.forEach(n,(function(n){e=n.call(r,e,t)})),e},We=function(e){return!(!e||!e.__CANCEL__)},Ve=K,He=qe,Ke=We,Xe=$e,Ze=ve;function Ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ze("canceled")}var Qe=function(e){Ye(e),e.headers=e.headers||{},e.data=He.call(e,e.data,e.headers,e.transformRequest),e.headers=Ve.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Ve.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||Xe.adapter;return t(e).then((function(t){return Ye(e),t.data=He.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return Ke(t)||(Ye(e),t&&t.response&&(t.response.data=He.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},et=K,tt=function(e,t){t=t||{};var n={};function r(e,t){return et.isPlainObject(e)&&et.isPlainObject(t)?et.merge(e,t):et.isPlainObject(t)?et.merge({},t):et.isArray(t)?t.slice():t}function a(n){return et.isUndefined(t[n])?et.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function i(e){if(!et.isUndefined(t[e]))return r(void 0,t[e])}function o(n){return et.isUndefined(t[n])?et.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function s(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s};return et.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||a,r=t(e);et.isUndefined(r)&&t!==s||(n[e]=r)})),n},nt={version:"0.23.0"},rt=nt.version,at={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){at[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var it={};function ot(e,t,n){if("object"!==typeof e)throw new TypeError("options must be an object");var r=Object.keys(e),a=r.length;while(a-- >0){var i=r[a],o=t[i];if(o){var s=e[i],u=void 0===s||o(s,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+i)}}at.transitional=function(e,t,n){function r(e,t){return"[Axios v"+rt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,a,i){if(!1===e)throw new Error(r(a," has been removed"+(t?" in "+t:"")));return t&&!it[a]&&(it[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,i)}};var st={assertOptions:ot,validators:at},ut=K,lt=Y,ft=te,ct=Qe,pt=tt,dt=st,ht=dt.validators;function mt(e){this.defaults=e,this.interceptors={request:new ft,response:new ft}}mt.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=pt(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&dt.assertOptions(t,{silentJSONParsing:ht.transitional(ht.boolean),forcedJSONParsing:ht.transitional(ht.boolean),clarifyTimeoutError:ht.transitional(ht.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var a,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var o=[ct,void 0];Array.prototype.unshift.apply(o,n),o=o.concat(i),a=Promise.resolve(e);while(o.length)a=a.then(o.shift(),o.shift());return a}var s=e;while(n.length){var u=n.shift(),l=n.shift();try{s=u(s)}catch(f){l(f);break}}try{a=ct(s)}catch(f){return Promise.reject(f)}while(i.length)a=a.then(i.shift(),i.shift());return a},mt.prototype.getUri=function(e){return e=pt(this.defaults,e),lt(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},ut.forEach(["delete","get","head","options"],(function(e){mt.prototype[e]=function(t,n){return this.request(pt(n||{},{method:e,url:t,data:(n||{}).data}))}})),ut.forEach(["post","put","patch"],(function(e){mt.prototype[e]=function(t,n,r){return this.request(pt(r||{},{method:e,url:t,data:n}))}}));var yt=mt,gt=ve;function bt(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new gt(e),t(n.reason))}))}bt.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},bt.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},bt.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},bt.source=function(){var e,t=new bt((function(t){e=t}));return{token:t,cancel:e}};var It=bt,wt=function(e){return function(t){return e.apply(null,t)}},Ot=function(e){return"object"===typeof e&&!0===e.isAxiosError},vt=K,St=T,Tt=yt,Pt=tt,_t=$e;function xt(e){var t=new Tt(e),n=St(Tt.prototype.request,t);return vt.extend(n,Tt.prototype,t),vt.extend(n,t),n.create=function(t){return xt(Pt(e,t))},n}var Mt=xt(_t);Mt.Axios=Tt,Mt.Cancel=ve,Mt.CancelToken=It,Mt.isCancel=We,Mt.VERSION=nt.version,Mt.all=function(e){return Promise.all(e)},Mt.spread=wt,Mt.isAxiosError=Ot,S.exports=Mt,S.exports.default=Mt;var At=S.exports;async function Ct(e,t){let n=null;n="string"!==typeof e?e.href:e.startsWith("http")?e:`${t}/${e}`,n.endsWith(".js")&&(n=n.substring(0,n.length-3)),n.endsWith(".wasm")&&(n=n.substring(0,n.length-5));const r=`${n}.wasm`,a=await At.get(r,{responseType:"arraybuffer"}),i=a.data,o=`${n}.umd.js`;importScripts(o);const s=n.replace(/.*\//,""),u=self[s],l=u({wasmBinary:i});return l}const kt=new Map;async function Et(e,t){let n=e,r=e,a=null;return"string"!==typeof e&&(n=new URL(e.href),r=n.href),kt.has(r)||kt.set(r,await Ct(n,t)),a=kt.get(r),a}const Bt=new Map([["image/jpeg","JPEGImageIO"],["image/png","PNGImageIO"],["image/tiff","TIFFImageIO"],["image/x-ms-bmp","BMPImageIO"],["image/x-bmp","BMPImageIO"],["image/bmp","BMPImageIO"],["application/dicom","GDCMImageIO"]]);var Dt=Bt;const Ft=new Map([["bmp","BMPImageIO"],["BMP","BMPImageIO"],["dcm","GDCMImageIO"],["DCM","GDCMImageIO"],["gipl","GiplImageIO"],["gipl.gz","GiplImageIO"],["hdf5","HDF5ImageIO"],["jpg","JPEGImageIO"],["JPG","JPEGImageIO"],["jpeg","JPEGImageIO"],["JPEG","JPEGImageIO"],["iwi","WASMImageIO"],["iwi.cbor","WASMImageIO"],["iwi.cbor.zstd","WASMZstdImageIO"],["lsm","LSMImageIO"],["mnc","MINCImageIO"],["MNC","MINCImageIO"],["mnc.gz","MINCImageIO"],["MNC.GZ","MINCImageIO"],["mnc2","MINCImageIO"],["MNC2","MINCImageIO"],["mgh","MGHImageIO"],["mgz","MGHImageIO"],["mgh.gz","MGHImageIO"],["mha","MetaImageIO"],["mhd","MetaImageIO"],["mrc","MRCImageIO"],["nia","NiftiImageIO"],["nii","NiftiImageIO"],["nii.gz","NiftiImageIO"],["hdr","NiftiImageIO"],["nrrd","NrrdImageIO"],["NRRD","NrrdImageIO"],["nhdr","NrrdImageIO"],["NHDR","NrrdImageIO"],["png","PNGImageIO"],["PNG","PNGImageIO"],["pic","BioRadImageIO"],["PIC","BioRadImageIO"],["tif","TIFFImageIO"],["TIF","TIFFImageIO"],["tiff","TIFFImageIO"],["TIFF","TIFFImageIO"],["vtk","VTKImageIO"],["VTK","VTKImageIO"],["isq","ScancoImageIO"],["ISQ","ScancoImageIO"],["fdf","FDFImageIO"],["FDF","FDFImageIO"]]);var Ut=Ft;function Nt(e){let t=e.slice(2+(e.lastIndexOf(".")-1>>>0));if("gz"===t.toLowerCase()){const n=e.slice(0,-3).lastIndexOf(".");t=e.slice(2+(n-1>>>0))}else if("cbor"===t.toLowerCase()){const n=e.slice(0,-5).lastIndexOf(".");t=e.slice(2+(n-1>>>0))}else if("zstd"===t.toLowerCase()){const n=e.slice(0,-10).lastIndexOf(".");t=e.slice(2+(n-1>>>0))}else if("zip"===t.toLowerCase()){const n=e.slice(0,-4).lastIndexOf(".");t=e.slice(2+(n-1>>>0))}return t}const jt=["PNGImageIO","MetaImageIO","TIFFImageIO","NiftiImageIO","JPEGImageIO","NrrdImageIO","VTKImageIO","BMPImageIO","HDF5ImageIO","MINCImageIO","MRCImageIO","LSMImageIO","MGHImageIO","BioRadImageIO","GiplImageIO","GEAdwImageIO","GE4ImageIO","GE5ImageIO","GDCMImageIO","ScancoImageIO","FDFImageIO","WASMImageIO","WASMZstdImageIO"];var Rt=jt;const zt={TextFile:"InterfaceTextFile",BinaryFile:"InterfaceBinaryFile",TextStream:"InterfaceTextStream",BinaryStream:"InterfaceBinaryStream",Image:"InterfaceImage",Mesh:"InterfaceMesh",PolyData:"InterfacePolyData"};var Lt=zt;const $t={Text:"Text",Binary:"Binary",Image:"Image",Mesh:"Mesh"};var Gt=$t;const Jt={Int8:"int8",UInt8:"uint8",Int16:"int16",UInt16:"uint16",Int32:"int32",UInt32:"uint32",Int64:"int64",UInt64:"uint64",SizeValueType:"uint64",IdentifierType:"uint64",IndexValueType:"int64",OffsetValueType:"int64"};var qt=Jt;const Wt={Float32:"float32",Float64:"float64",SpacePrecisionType:"float64"};var Vt=Wt;function Ht(e,t){let n=null;switch(e){case qt.UInt8:n=new Uint8Array(t);break;case qt.Int8:n=new Int8Array(t);break;case qt.UInt16:n=new Uint16Array(t);break;case qt.Int16:n=new Int16Array(t);break;case qt.UInt32:n=new Uint32Array(t);break;case qt.Int32:n=new Int32Array(t);break;case qt.UInt64:n="function"===typeof globalThis.BigUint64Array?new BigUint64Array(t):new Uint8Array(t);break;case qt.Int64:n="function"===typeof globalThis.BigInt64Array?new BigInt64Array(t):new Uint8Array(t);break;case Vt.Float32:n=new Float32Array(t);break;case Vt.Float64:n=new Float64Array(t);break;case"null":n=null;break;case null:n=null;break;default:throw new Error("Type is not supported as a TypedArray")}return n}const Kt="function"===typeof globalThis.SharedArrayBuffer,Xt=new TextEncoder,Zt=new TextDecoder("utf-8");function Yt(e,t){const n={flags:"r",encoding:"binary"},r=e.fs_open(t,n.flags),a=e.fs_stat(t),i=a.size;let o=null;o=Kt?new SharedArrayBuffer(i):new ArrayBuffer(i);const s=new Uint8Array(o);return e.fs_read(r,s,0,i,0),e.fs_close(r),s}function Qt(e,t,n){let r=null;r=Kt?new SharedArrayBuffer(n):new ArrayBuffer(n);const a=new Uint8Array(r),i=new Uint8Array(e.HEAPU8.buffer,t,n);return a.set(i),a}function en(e,t,n,r){let a=0;return null!==t&&(a=e.ccall("itk_wasm_input_array_alloc","number",["number","number","number","number"],[0,n,r,t.buffer.byteLength]),e.HEAPU8.set(new Uint8Array(t.buffer),a)),a}function tn(e,t,n){const r=JSON.stringify(t),a=e.ccall("itk_wasm_input_json_alloc","number",["number","number","number"],[0,n,r.length]);e.writeAsciiToMemory(r,a,!1)}function nn(e,t,n,r){const a=e.ccall("itk_wasm_output_array_address","number",["number","number","number"],[0,t,n]),i=e.ccall("itk_wasm_output_array_size","number",["number","number","number"],[0,t,n]),o=Qt(e,a,i),s=Ht(r,o.buffer);return s}function rn(e,t){const n=e.ccall("itk_wasm_output_json_address","number",["number","number"],[0,t]),r=e.AsciiToString(n),a=JSON.parse(r);return a}function an(e,t,n,r){null!=r&&r.length>0&&r.forEach((function(t,n){switch(t.type){case Lt.TextStream:{const r=Xt.encode(t.data.data),a=en(e,r,n,0),i={size:r.buffer.byteLength,data:`data:application/vnd.itk.address,0:${a}`};tn(e,i,n);break}case Lt.BinaryStream:{const r=t.data.data,a=en(e,r,n,0),i={size:r.buffer.byteLength,data:`data:application/vnd.itk.address,0:${a}`};tn(e,i,n);break}case Lt.TextFile:e.fs_writeFile(t.data.path,t.data.data);break;case Lt.BinaryFile:e.fs_writeFile(t.data.path,t.data.data);break;case Lt.Image:{const r=t.data,a=en(e,r.data,n,0),i=en(e,r.direction,n,1),o={imageType:r.imageType,name:r.name,origin:r.origin,spacing:r.spacing,direction:`data:application/vnd.itk.address,0:${i}`,size:r.size,data:`data:application/vnd.itk.address,0:${a}`};tn(e,o,n);break}case Lt.Mesh:{const r=t.data,a=en(e,r.points,n,0),i=en(e,r.cells,n,1),o=en(e,r.pointData,n,2),s=en(e,r.pointData,n,3),u={meshType:r.meshType,name:r.name,numberOfPoints:r.numberOfPoints,points:`data:application/vnd.itk.address,0:${a}`,numberOfCells:r.numberOfCells,cells:`data:application/vnd.itk.address,0:${i}`,cellBufferSize:r.cellBufferSize,numberOfPointPixels:r.numberOfPointPixels,pointData:`data:application/vnd.itk.address,0:${o}`,numberOfCellPixels:r.numberOfCellPixels,cellData:`data:application/vnd.itk.address,0:${s}`};tn(e,u,n);break}case Lt.PolyData:{const r=t.data,a=en(e,r.points,n,0),i=en(e,r.vertices,n,1),o=en(e,r.lines,n,2),s=en(e,r.polygons,n,3),u=en(e,r.triangleStrips,n,4),l=en(e,r.pointData,n,5),f=en(e,r.pointData,n,6),c={polyDataType:r.polyDataType,name:r.name,numberOfPoints:r.numberOfPoints,points:`data:application/vnd.itk.address,0:${a}`,verticesBufferSize:r.verticesBufferSize,vertices:`data:application/vnd.itk.address,0:${i}`,linesBufferSize:r.linesBufferSize,lines:`data:application/vnd.itk.address,0:${o}`,polygonsBufferSize:r.polygonsBufferSize,polygons:`data:application/vnd.itk.address,0:${s}`,triangleStripsBufferSize:r.triangleStripsBufferSize,triangleStrips:`data:application/vnd.itk.address,0:${u}`,numberOfPointPixels:r.numberOfPointPixels,pointData:`data:application/vnd.itk.address,0:${l}`,numberOfCellPixels:r.numberOfCellPixels,cellData:`data:application/vnd.itk.address,0:${f}`};tn(e,c,n);break}case Gt.Text:e.fs_writeFile(t.path,t.data);break;case Gt.Binary:e.fs_writeFile(t.path,t.data);break;case Gt.Image:{const n=t.data,r={imageType:n.imageType,name:n.name,origin:n.origin,spacing:n.spacing,direction:"data:application/vnd.itk.path,data/direction.raw",size:n.size,data:"data:application/vnd.itk.path,data/data.raw"};if(e.fs_mkdirs(`${t.path}/data`),e.fs_writeFile(`${t.path}/index.json`,JSON.stringify(r)),null===n.data)throw Error("image.data is null");e.fs_writeFile(`${t.path}/data/data.raw`,new Uint8Array(n.data.buffer)),e.fs_writeFile(`${t.path}/data/direction.raw`,new Uint8Array(n.direction.buffer));break}case Gt.Mesh:{const n=t.data,r={meshType:n.meshType,name:n.name,numberOfPoints:n.numberOfPoints,points:"data:application/vnd.itk.path,data/points.raw",numberOfPointPixels:n.numberOfPointPixels,pointData:"data:application/vnd.itk.path,data/pointData.raw",numberOfCells:n.numberOfCells,cells:"data:application/vnd.itk.path,data/cells.raw",numberOfCellPixels:n.numberOfCellPixels,cellData:"data:application/vnd.itk.path,data/cellData.raw",cellBufferSize:n.cellBufferSize};if(e.fs_mkdirs(`${t.path}/data`),e.fs_writeFile(`${t.path}/index.json`,JSON.stringify(r)),r.numberOfPoints>0){if(null===n.points)throw Error("mesh.points is null");e.fs_writeFile(`${t.path}/data/points.raw`,new Uint8Array(n.points.buffer))}if(r.numberOfPointPixels>0){if(null===n.pointData)throw Error("mesh.pointData is null");e.fs_writeFile(`${t.path}/data/pointData.raw`,new Uint8Array(n.pointData.buffer))}if(r.numberOfCells>0){if(null===n.cells)throw Error("mesh.cells is null");e.fs_writeFile(`${t.path}/data/cells.raw`,new Uint8Array(n.cells.buffer))}if(r.numberOfCellPixels>0){if(null===n.cellData)throw Error("mesh.cellData is null");e.fs_writeFile(`${t.path}/data/cellData.raw`,new Uint8Array(n.cellData.buffer))}break}default:throw Error("Unsupported input InterfaceType")}})),e.resetModuleStdout(),e.resetModuleStderr();let a=0;try{a=e.callMain(t)}catch(u){throw"number"===typeof u&&(console.log("Exception while running pipeline:"),console.log("stdout:",e.getModuleStdout()),console.error("stderr:",e.getModuleStderr()),"undefined"!==typeof e.getExceptionMessage?console.error("exception:",e.getExceptionMessage(u)):console.error("Build module in Debug mode for exception message information.")),u}const i=e.getModuleStdout(),o=e.getModuleStderr(),s=[];return null!=n&&n.length>0&&0===a&&n.forEach((function(t,n){let r=null;switch(t.type){case Lt.TextStream:{const t=e.ccall("itk_wasm_output_array_address","number",["number","number","number"],[0,n,0]),a=e.ccall("itk_wasm_output_array_size","number",["number","number","number"],[0,n,0]),i=new Uint8Array(e.HEAPU8.buffer,t,a);r={data:Zt.decode(i)};break}case Lt.BinaryStream:{const t=e.ccall("itk_wasm_output_array_address","number",["number","number","number"],[0,n,0]),a=e.ccall("itk_wasm_output_array_size","number",["number","number","number"],[0,n,0]);r={data:Qt(e,t,a)};break}case Lt.TextFile:r={path:t.data.path,data:e.fs_readFile(t.data.path,{encoding:"utf8"})};break;case Lt.BinaryFile:r={path:t.data.path,data:Yt(e,t.data.path)};break;case Lt.Image:{const t=rn(e,n);t.data=nn(e,n,0,t.imageType.componentType),t.direction=nn(e,n,1,Vt.Float64),r=t;break}case Lt.Mesh:{const t=rn(e,n);t.numberOfPoints>0?t.points=nn(e,n,0,t.meshType.pointComponentType):t.points=Ht(t.meshType.pointComponentType,new ArrayBuffer(0)),t.numberOfCells>0?t.cells=nn(e,n,1,t.meshType.cellComponentType):t.cells=Ht(t.meshType.cellComponentType,new ArrayBuffer(0)),t.numberOfPointPixels>0?t.pointData=nn(e,n,2,t.meshType.pointPixelComponentType):t.pointData=Ht(t.meshType.pointPixelComponentType,new ArrayBuffer(0)),t.numberOfCellPixels>0?t.cellData=nn(e,n,3,t.meshType.cellPixelComponentType):t.cellData=Ht(t.meshType.cellPixelComponentType,new ArrayBuffer(0)),r=t;break}case Lt.PolyData:{const t=rn(e,n);t.numberOfPoints>0?t.points=nn(e,n,0,Vt.Float32):t.points=new Float32Array,t.verticesBufferSize>0?t.vertices=nn(e,n,1,qt.UInt32):t.vertices=new Uint32Array,t.linesBufferSize>0?t.lines=nn(e,n,2,qt.UInt32):t.lines=new Uint32Array,t.polygonsBufferSize>0?t.polygons=nn(e,n,3,qt.UInt32):t.polygons=new Uint32Array,t.triangleStripsBufferSize>0?t.triangleStrips=nn(e,n,4,qt.UInt32):t.triangleStrips=new Uint32Array,t.numberOfPointPixels>0?t.pointData=nn(e,n,5,t.polyDataType.pointPixelComponentType):t.pointData=Ht(t.polyDataType.pointPixelComponentType,new ArrayBuffer(0)),t.numberOfCellPixels>0?t.cellData=nn(e,n,6,t.polyDataType.cellPixelComponentType):t.cellData=Ht(t.polyDataType.cellPixelComponentType,new ArrayBuffer(0)),r=t;break}case Gt.Text:if("undefined"===typeof t.path)throw new Error("output.path not defined");r=e.fs_readFile(t.path,{encoding:"utf8"});break;case Gt.Binary:if("undefined"===typeof t.path)throw new Error("output.path not defined");r=Yt(e,t.path);break;case Gt.Image:{if("undefined"===typeof t.path)throw new Error("output.path not defined");const n=e.fs_readFile(`${t.path}/index.json`,{encoding:"utf8"}),a=JSON.parse(n),i=Yt(e,`${t.path}/data/data.raw`);a.data=Ht(a.imageType.componentType,i.buffer);const o=Yt(e,`${t.path}/data/direction.raw`);a.direction=Ht(Vt.Float64,o.buffer),r=a;break}case Gt.Mesh:{if("undefined"===typeof t.path)throw new Error("output.path not defined");const n=e.fs_readFile(`${t.path}/index.json`,{encoding:"utf8"}),a=JSON.parse(n);if(a.numberOfPoints>0){const n=Yt(e,`${t.path}/data/points.raw`);a.points=Ht(a.meshType.pointComponentType,n.buffer)}else a.points=Ht(a.meshType.pointComponentType,new ArrayBuffer(0));if(a.numberOfPointPixels>0){const n=Yt(e,`${t.path}/data/pointData.raw`);a.pointData=Ht(a.meshType.pointPixelComponentType,n.buffer)}else a.pointData=Ht(a.meshType.pointPixelComponentType,new ArrayBuffer(0));if(a.numberOfCells>0){const n=Yt(e,`${t.path}/data/cells.raw`);a.cells=Ht(a.meshType.cellComponentType,n.buffer)}else a.cells=Ht(a.meshType.cellComponentType,new ArrayBuffer(0));if(a.numberOfCellPixels>0){const n=Yt(e,`${t.path}/data/cellData.raw`);a.cellData=Ht(a.meshType.cellPixelComponentType,n.buffer)}else a.cellData=Ht(a.meshType.cellPixelComponentType,new ArrayBuffer(0));r=a;break}default:throw Error("Unsupported output InterfaceType")}const a={type:t.type,data:r};s.push(a)})),{returnValue:a,stdout:i,stderr:o,outputs:s}}var on=self&&self.__await||function(e){return this instanceof on?(this.v=e,this):new on(e)},sn=self&&self.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),i=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){a[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{u(a[e](t))}catch(n){c(i[0][3],n)}}function u(e){e.value instanceof on?Promise.resolve(e.value.v).then(l,f):c(i[0][2],e)}function l(e){s("next",e)}function f(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}},un=self&&self.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"===typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){t=e[n](t),a(r,i,t.done,t.value)}))}}function a(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}};function ln(e){return sn(this,arguments,(function*(){for(let t=0;t<Rt.length;t++){const n=Rt[t]+"ReadImage",r=yield on(Et(n,e.config.imageIOUrl));yield yield on(r)}}))}async function fn(e,t){var n,r;if(e.mimeType&&Dt.has(e.mimeType)){const n=Dt.get(e.mimeType)+t,r=await Et(n,e.config.imageIOUrl);return r}const a=Nt(e.fileName);if(Ut.has(a)){const n=Ut.get(a)+t,r=await Et(n,e.config.imageIOUrl);return r}for(let l=0;l<Rt.length;++l){let t=0;try{for(var i,o=(n=void 0,un(ln(e)));i=await o.next(),!i.done;){const n=i.value;try{const{returnValue:t,outputs:r}=await an(n,e.args,e.outputs,e.inputs);if(0===t)return n}catch(s){}t++}}catch(u){n={error:u}}finally{try{i&&!i.done&&(r=o.return)&&await r.call(o)}finally{if(n)throw n.error}}}throw Error(`Could not find IO for: ${e.fileName}`)}const cn=new Map([]);var pn=cn;const dn=new Map([["vtk","VTKPolyDataMeshIO"],["VTK","VTKPolyDataMeshIO"],["byu","BYUMeshIO"],["BYU","BYUMeshIO"],["fsa","FreeSurferAsciiMeshIO"],["FSA","FreeSurferAsciiMeshIO"],["fsb","FreeSurferBinaryMeshIO"],["FSB","FreeSurferBinaryMeshIO"],["obj","OBJMeshIO"],["OBJ","OBJMeshIO"],["off","OFFMeshIO"],["OFF","OFFMeshIO"],["stl","STLMeshIO"],["STL","STLMeshIO"],["swc","SWCMeshIO"],["SWC","SWCMeshIO"],["iwm","WASMMeshIO"],["iwm.cbor","WASMMeshIO"],["iwm.cbor.zstd","WASMZstdMeshIO"]]);var hn=dn;const mn=["BYUMeshIO","FreeSurferAsciiMeshIO","FreeSurferBinaryMeshIO","OBJMeshIO","OFFMeshIO","STLMeshIO","SWCMeshIO","VTKPolyDataMeshIO","WASMMeshIO","WASMZstdMeshIO"];var yn=mn,gn=self&&self.__await||function(e){return this instanceof gn?(this.v=e,this):new gn(e)},bn=self&&self.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,a=n.apply(e,t||[]),i=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){a[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{u(a[e](t))}catch(n){c(i[0][3],n)}}function u(e){e.value instanceof gn?Promise.resolve(e.value.v).then(l,f):c(i[0][2],e)}function l(e){s("next",e)}function f(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}},In=self&&self.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"===typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){t=e[n](t),a(r,i,t.done,t.value)}))}}function a(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}};function wn(e){return bn(this,arguments,(function*(){for(let t=0;t<yn.length;t++){const n=yn[t]+"ReadMesh",r=yield gn(Et(n,e.config.meshIOUrl));yield yield gn(r)}}))}async function On(e,t){var n,r;if(e.mimeType&&pn.has(e.mimeType)){const n=pn.get(e.mimeType)+t,r=await Et(n,e.config.meshIOUrl);return r}const a=Nt(e.fileName);if(hn.has(a)){const n=hn.get(a)+t,r=await Et(n,e.config.meshIOUrl);return r}for(let l=0;l<yn.length;++l){let t=0;try{for(var i,o=(n=void 0,In(wn(e)));i=await o.next(),!i.done;){const n=i.value;try{const{returnValue:t,outputs:r}=await an(n,e.args,e.outputs,e.inputs);if(0===t)return n}catch(s){}t++}}catch(u){n={error:u}}finally{try{i&&!i.done&&(r=o.return)&&await r.call(o)}finally{if(n)throw n.error}}}throw Error(`Could not find IO for: ${e.fileName}`)}const vn="function"===typeof globalThis.SharedArrayBuffer;function Sn(e){let t=null;return void 0!==e.buffer?t=e.buffer:void 0!==e.byteLength&&(t=e),t&&vn&&t instanceof SharedArrayBuffer?null:t}function Tn(e){const t=[];return null!=e.points&&t.push(e.points.buffer),null!=e.pointData&&t.push(e.pointData.buffer),null!=e.cells&&t.push(e.cells.buffer),null!=e.cellData&&t.push(e.cellData.buffer),t}function Pn(e){const t=[];return null!=e.points&&t.push(e.points.buffer),null!=e.vertices&&t.push(e.vertices.buffer),null!=e.lines&&t.push(e.lines.buffer),null!=e.polygons&&t.push(e.polygons.buffer),null!=e.triangleStrips&&t.push(e.triangleStrips.buffer),null!=e.pointData&&t.push(e.pointData.buffer),null!=e.cellData&&t.push(e.cellData.buffer),t}async function _n(e,t,n,r){const a=an(e,t,n,r),i=[];return a.outputs&&a.outputs.forEach((function(e){if(e.type===Lt.BinaryStream||e.type===Lt.BinaryFile){const t=e.data,n=Sn(t);n&&i.push(n)}else if(e.type===Lt.Image){const t=e.data;let n=Sn(t.data);n&&i.push(n),n=Sn(t.direction),n&&i.push(n)}else if(e.type===Lt.Mesh){const t=e.data,n=Tn(t);i.push(...n)}else if(e.type===Lt.PolyData){const t=e.data,n=Pn(t);i.push(...n)}else if(e.type===Gt.Binary){const t=e.data,n=Sn(t);n&&i.push(n)}else if(e.type===Gt.Image){const t=e.data;let n=Sn(t.data);n&&i.push(n),n=Sn(t.direction),n&&i.push(n)}else if(e.type===Gt.Mesh){const t=e.data;if(t.points){const e=Sn(t.points);e&&i.push(e)}if(t.pointData){const e=Sn(t.pointData);e&&i.push(e)}if(t.cells){const e=Sn(t.cells);e&&i.push(e)}if(t.cellData){const e=Sn(t.cellData);e&&i.push(e)}}})),new v.TransferableResponse(a,i)}v((async function(e){let t=null;if("runPipeline"===e.operation)t=await Et(e.pipelinePath,e.config.pipelinesUrl);else if("readImage"===e.operation)t=await fn(e,"ReadImage");else if("writeImage"===e.operation)t=await fn(e,"WriteImage");else if("readMesh"===e.operation)t=await On(e,"ReadMesh");else if("writeMesh"===e.operation)t=await On(e,"WriteMesh");else if("meshToPolyData"===e.operation)t=await Et("MeshToPolyData",e.config.meshIOUrl);else if("polyDataToMesh"===e.operation)t=await Et("PolyDataToMesh",e.config.meshIOUrl);else if("readDICOMImageSeries"===e.operation)t=await Et("ReadImageDICOMFileSeries",e.config.imageIOUrl);else{if("readDICOMTags"!==e.operation)throw new Error("Unknown worker operation");t=await Et("ReadDICOMTags",e.config.imageIOUrl)}return _n(t,e.args,e.outputs,e.inputs)}))})();
@@ -0,0 +1,4 @@
1
+ import IOInput from './IOInput.js';
2
+ import PipelineEmscriptenModule from '../pipeline/PipelineEmscriptenModule.js';
3
+ declare function loadImageIOPipelineModule(input: IOInput, postfix: string): Promise<PipelineEmscriptenModule>;
4
+ export default loadImageIOPipelineModule;
@@ -0,0 +1 @@
1
+ var __await=this&&this.__await||function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=this&&this.__asyncGenerator||function(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,o=t.apply(e,n||[]),r=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(e){o[e]&&(i[e]=function(n){return new Promise((function(t,i){r.push([e,n,t,i])>1||l(e,n)}))})}function l(e,n){try{s(o[e](n))}catch(t){m(r[0][3],t)}}function s(e){e.value instanceof __await?Promise.resolve(e.value.v).then(u,c):m(r[0][2],e)}function u(e){l("next",e)}function c(e){l("throw",e)}function m(e,n){e(n),r.shift(),r.length&&l(r[0][0],r[0][1])}},__asyncValues=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,t=e[Symbol.asyncIterator];return t?t.call(e):(e="function"===typeof __values?__values(e):e[Symbol.iterator](),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(t){n[t]=e[t]&&function(n){return new Promise((function(i,r){n=e[t](n),o(i,r,n.done,n.value)}))}}function o(e,n,t,i){Promise.resolve(i).then((function(n){e({value:n,done:t})}),n)}};import loadPipelineModule from"./loadPipelineModule.js";import mimeToIO from"../io/internal/MimeToImageIO.js";import extensionToIO from"../io/extensionToImageIO.js";import getFileExtension from"../io/getFileExtension.js";import ImageIOIndex from"../io/internal/ImageIOIndex.js";import runPipelineEmscripten from"../pipeline/internal/runPipelineEmscripten.js";function availableIOModules(e){return __asyncGenerator(this,arguments,(function*(){for(let n=0;n<ImageIOIndex.length;n++){const t=ImageIOIndex[n]+"ReadImage",i=yield __await(loadPipelineModule(t,e.config.imageIOUrl));yield yield __await(i)}}))}async function loadImageIOPipelineModule(e,n){var t,i;if(e.mimeType&&mimeToIO.has(e.mimeType)){const t=mimeToIO.get(e.mimeType)+n,i=await loadPipelineModule(t,e.config.imageIOUrl);return i}const o=getFileExtension(e.fileName);if(extensionToIO.has(o)){const t=extensionToIO.get(o)+n,i=await loadPipelineModule(t,e.config.imageIOUrl);return i}for(let u=0;u<ImageIOIndex.length;++u){let n=0;try{for(var r,a=(t=void 0,__asyncValues(availableIOModules(e)));r=await a.next(),!r.done;){const t=r.value;try{const{returnValue:n,outputs:i}=await runPipelineEmscripten(t,e.args,e.outputs,e.inputs);if(0===n)return t}catch(l){}n++}}catch(s){t={error:s}}finally{try{r&&!r.done&&(i=a.return)&&await i.call(a)}finally{if(t)throw t.error}}}throw Error(`Could not find IO for: ${e.fileName}`)}export default loadImageIOPipelineModule;
@@ -0,0 +1,4 @@
1
+ import IOInput from './IOInput.js';
2
+ import PipelineEmscriptenModule from '../pipeline/PipelineEmscriptenModule.js';
3
+ declare function loadMeshIOPipelineModule(input: IOInput, postfix: string): Promise<PipelineEmscriptenModule>;
4
+ export default loadMeshIOPipelineModule;
@@ -0,0 +1 @@
1
+ var __await=this&&this.__await||function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=this&&this.__asyncGenerator||function(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,o=t.apply(e,n||[]),r=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(e){o[e]&&(i[e]=function(n){return new Promise((function(t,i){r.push([e,n,t,i])>1||s(e,n)}))})}function s(e,n){try{l(o[e](n))}catch(t){f(r[0][3],t)}}function l(e){e.value instanceof __await?Promise.resolve(e.value.v).then(u,c):f(r[0][2],e)}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,n){e(n),r.shift(),r.length&&s(r[0][0],r[0][1])}},__asyncValues=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,t=e[Symbol.asyncIterator];return t?t.call(e):(e="function"===typeof __values?__values(e):e[Symbol.iterator](),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(t){n[t]=e[t]&&function(n){return new Promise((function(i,r){n=e[t](n),o(i,r,n.done,n.value)}))}}function o(e,n,t,i){Promise.resolve(i).then((function(n){e({value:n,done:t})}),n)}};import loadPipelineModule from"./loadPipelineModule.js";import mimeToIO from"../io/internal/MimeToMeshIO.js";import extensionToIO from"../io/extensionToMeshIO.js";import getFileExtension from"../io/getFileExtension.js";import MeshIOIndex from"../io/internal/MeshIOIndex.js";import runPipelineEmscripten from"../pipeline/internal/runPipelineEmscripten.js";function availableIOModules(e){return __asyncGenerator(this,arguments,(function*(){for(let n=0;n<MeshIOIndex.length;n++){const t=MeshIOIndex[n]+"ReadMesh",i=yield __await(loadPipelineModule(t,e.config.meshIOUrl));yield yield __await(i)}}))}async function loadMeshIOPipelineModule(e,n){var t,i;if(e.mimeType&&mimeToIO.has(e.mimeType)){const t=mimeToIO.get(e.mimeType)+n,i=await loadPipelineModule(t,e.config.meshIOUrl);return i}const o=getFileExtension(e.fileName);if(extensionToIO.has(o)){const t=extensionToIO.get(o)+n,i=await loadPipelineModule(t,e.config.meshIOUrl);return i}for(let u=0;u<MeshIOIndex.length;++u){let n=0;try{for(var r,a=(t=void 0,__asyncValues(availableIOModules(e)));r=await a.next(),!r.done;){const t=r.value;try{const{returnValue:n,outputs:i}=await runPipelineEmscripten(t,e.args,e.outputs,e.inputs);if(0===n)return t}catch(s){}n++}}catch(l){t={error:l}}finally{try{r&&!r.done&&(i=a.return)&&await i.call(a)}finally{if(t)throw t.error}}}throw Error(`Could not find IO for: ${e.fileName}`)}export default loadMeshIOPipelineModule;
@@ -0,0 +1,3 @@
1
+ import PipelineEmscriptenModule from '../pipeline/PipelineEmscriptenModule.js';
2
+ declare function loadPipelineModule(pipelinePath: string | object, baseUrl: string): Promise<PipelineEmscriptenModule>;
3
+ export default loadPipelineModule;
@@ -0,0 +1 @@
1
+ import loadEmscriptenModule from"../core/internal/loadEmscriptenModuleWebWorker.js";const pipelineToModule=new Map;async function loadPipelineModule(e,o){let l=e,i=e,n=null;return"string"!==typeof e&&(l=new URL(e.href),i=l.href),pipelineToModule.has(i)||pipelineToModule.set(i,await loadEmscriptenModule(l,o)),n=pipelineToModule.get(i),n}export default loadPipelineModule;