@gen-epix/ui-client-casedb 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (832) hide show
  1. package/LICENSE +287 -0
  2. package/README.md +101 -0
  3. package/dist/@types/mui.d.ts +12 -0
  4. package/dist/@types/ui-casedb.d.ts +3 -0
  5. package/dist/@types/vite-env.d.ts +3 -0
  6. package/dist/_chunks/AddCasesToEventDialog.js +246 -0
  7. package/dist/_chunks/AddCasesToEventDialog.js.map +1 -0
  8. package/dist/_chunks/CaseContentForm.js +43 -0
  9. package/dist/_chunks/CaseContentForm.js.map +1 -0
  10. package/dist/_chunks/CaseDbDownloadUtil.js +2307 -0
  11. package/dist/_chunks/CaseDbDownloadUtil.js.map +1 -0
  12. package/dist/_chunks/CaseInfoDialog.js +509 -0
  13. package/dist/_chunks/CaseInfoDialog.js.map +1 -0
  14. package/dist/_chunks/CaseSetInfoDialog.js +479 -0
  15. package/dist/_chunks/CaseSetInfoDialog.js.map +1 -0
  16. package/dist/_chunks/CaseTypeInfoDialog.js +470 -0
  17. package/dist/_chunks/CaseTypeInfoDialog.js.map +1 -0
  18. package/dist/_chunks/CasesAlreadyInCaseSetWarning.js +123 -0
  19. package/dist/_chunks/CasesAlreadyInCaseSetWarning.js.map +1 -0
  20. package/dist/_chunks/CollectionIcon.js +18 -0
  21. package/dist/_chunks/CollectionIcon.js.map +1 -0
  22. package/dist/_chunks/CompletCaseTypeLoader.js +53 -0
  23. package/dist/_chunks/CompletCaseTypeLoader.js.map +1 -0
  24. package/dist/_chunks/CreateEventDialogSuccessNotificationMessage.js +18 -0
  25. package/dist/_chunks/CreateEventDialogSuccessNotificationMessage.js.map +1 -0
  26. package/dist/_chunks/CustomTabPanel.js +21 -0
  27. package/dist/_chunks/CustomTabPanel.js.map +1 -0
  28. package/dist/_chunks/Dashboard.js +2582 -0
  29. package/dist/_chunks/Dashboard.js.map +1 -0
  30. package/dist/_chunks/DashboardStoreLoader.js +67 -0
  31. package/dist/_chunks/DashboardStoreLoader.js.map +1 -0
  32. package/dist/_chunks/DataCollectionAccessInfo.js +66 -0
  33. package/dist/_chunks/DataCollectionAccessInfo.js.map +1 -0
  34. package/dist/_chunks/EpiCurveUtil.js +378 -0
  35. package/dist/_chunks/EpiCurveUtil.js.map +1 -0
  36. package/dist/_chunks/EpiCurveWidget.js +570 -0
  37. package/dist/_chunks/EpiCurveWidget.js.map +1 -0
  38. package/dist/_chunks/FilterUtil.js +1537 -0
  39. package/dist/_chunks/FilterUtil.js.map +1 -0
  40. package/dist/_chunks/FindSimilarCasesDialog.js +439 -0
  41. package/dist/_chunks/FindSimilarCasesDialog.js.map +1 -0
  42. package/dist/_chunks/FindSimilarCasesUtil.js +100 -0
  43. package/dist/_chunks/FindSimilarCasesUtil.js.map +1 -0
  44. package/dist/_chunks/HomePageTrends.js +276 -0
  45. package/dist/_chunks/HomePageTrends.js.map +1 -0
  46. package/dist/_chunks/LegendaItem.js +325 -0
  47. package/dist/_chunks/LegendaItem.js.map +1 -0
  48. package/dist/_chunks/LineListWidget.js +702 -0
  49. package/dist/_chunks/LineListWidget.js.map +1 -0
  50. package/dist/_chunks/PanelSeparator.js +1676 -0
  51. package/dist/_chunks/PanelSeparator.js.map +1 -0
  52. package/dist/_chunks/Upload.js +1506 -0
  53. package/dist/_chunks/Upload.js.map +1 -0
  54. package/dist/_chunks/UploadUtil.js +1976 -0
  55. package/dist/_chunks/UploadUtil.js.map +1 -0
  56. package/dist/_chunks/UserRightsDialog.js +152 -0
  57. package/dist/_chunks/UserRightsDialog.js.map +1 -0
  58. package/dist/_chunks/_MapCache.js +274 -0
  59. package/dist/_chunks/_MapCache.js.map +1 -0
  60. package/dist/_chunks/_Set.js +9 -0
  61. package/dist/_chunks/_Set.js.map +1 -0
  62. package/dist/_chunks/_arrayIncludesWith.js +42 -0
  63. package/dist/_chunks/_arrayIncludesWith.js.map +1 -0
  64. package/dist/_chunks/_baseClone.js +262 -0
  65. package/dist/_chunks/_baseClone.js.map +1 -0
  66. package/dist/_chunks/_baseFlatten.js +26 -0
  67. package/dist/_chunks/_baseFlatten.js.map +1 -0
  68. package/dist/_chunks/_baseGet.js +246 -0
  69. package/dist/_chunks/_baseGet.js.map +1 -0
  70. package/dist/_chunks/_baseIteratee.js +246 -0
  71. package/dist/_chunks/_baseIteratee.js.map +1 -0
  72. package/dist/_chunks/_cacheHas.js +29 -0
  73. package/dist/_chunks/_cacheHas.js.map +1 -0
  74. package/dist/_chunks/_defineProperty.js +15 -0
  75. package/dist/_chunks/_defineProperty.js.map +1 -0
  76. package/dist/_chunks/_setToArray.js +15 -0
  77. package/dist/_chunks/_setToArray.js.map +1 -0
  78. package/dist/_chunks/_setToString.js +64 -0
  79. package/dist/_chunks/_setToString.js.map +1 -0
  80. package/dist/_chunks/chunk-KS7C4IRE.js +1327 -0
  81. package/dist/_chunks/chunk-KS7C4IRE.js.map +1 -0
  82. package/dist/_chunks/cloneDeep.js +119 -0
  83. package/dist/_chunks/cloneDeep.js.map +1 -0
  84. package/dist/_chunks/dashboardStore.js +743 -0
  85. package/dist/_chunks/dashboardStore.js.map +1 -0
  86. package/dist/_chunks/eachYearOfInterval.js +104 -0
  87. package/dist/_chunks/eachYearOfInterval.js.map +1 -0
  88. package/dist/_chunks/esm.js +46335 -0
  89. package/dist/_chunks/esm.js.map +1 -0
  90. package/dist/_chunks/format.js +504 -0
  91. package/dist/_chunks/format.js.map +1 -0
  92. package/dist/_chunks/hasIn.js +34 -0
  93. package/dist/_chunks/hasIn.js.map +1 -0
  94. package/dist/_chunks/index.esm.js +1342 -0
  95. package/dist/_chunks/index.esm.js.map +1 -0
  96. package/dist/_chunks/index.module.js +72 -0
  97. package/dist/_chunks/index.module.js.map +1 -0
  98. package/dist/_chunks/intersection.js +58 -0
  99. package/dist/_chunks/intersection.js.map +1 -0
  100. package/dist/_chunks/isArguments.js +27 -0
  101. package/dist/_chunks/isArguments.js.map +1 -0
  102. package/dist/_chunks/isArray.js +9 -0
  103. package/dist/_chunks/isArray.js.map +1 -0
  104. package/dist/_chunks/isArrayLike.js +30 -0
  105. package/dist/_chunks/isArrayLike.js.map +1 -0
  106. package/dist/_chunks/isObjectLike.js +18 -0
  107. package/dist/_chunks/isObjectLike.js.map +1 -0
  108. package/dist/_chunks/isValid.js +14 -0
  109. package/dist/_chunks/isValid.js.map +1 -0
  110. package/dist/_chunks/last.js +13 -0
  111. package/dist/_chunks/last.js.map +1 -0
  112. package/dist/_chunks/noop.js +10 -0
  113. package/dist/_chunks/noop.js.map +1 -0
  114. package/dist/_chunks/omit.js +81 -0
  115. package/dist/_chunks/omit.js.map +1 -0
  116. package/dist/_chunks/parseISO.js +117 -0
  117. package/dist/_chunks/parseISO.js.map +1 -0
  118. package/dist/_chunks/protectedTokens.js +630 -0
  119. package/dist/_chunks/protectedTokens.js.map +1 -0
  120. package/dist/_chunks/react.js +11 -0
  121. package/dist/_chunks/react.js.map +1 -0
  122. package/dist/_chunks/round.js +64 -0
  123. package/dist/_chunks/round.js.map +1 -0
  124. package/dist/_chunks/shallow.js +31 -0
  125. package/dist/_chunks/shallow.js.map +1 -0
  126. package/dist/_chunks/sync.js +3796 -0
  127. package/dist/_chunks/sync.js.map +1 -0
  128. package/dist/_chunks/toDate.js +18 -0
  129. package/dist/_chunks/toDate.js.map +1 -0
  130. package/dist/_chunks/toString.js +31 -0
  131. package/dist/_chunks/toString.js.map +1 -0
  132. package/dist/_chunks/useUnit.js +30 -0
  133. package/dist/_chunks/useUnit.js.map +1 -0
  134. package/dist/_chunks/userProfileStoreContext.js +7 -0
  135. package/dist/_chunks/userProfileStoreContext.js.map +1 -0
  136. package/dist/_chunks/vanilla.js +20 -0
  137. package/dist/_chunks/vanilla.js.map +1 -0
  138. package/dist/_chunks/yup.js +73 -0
  139. package/dist/_chunks/yup.js.map +1 -0
  140. package/dist/classes/errors/UploadError.d.ts +5 -0
  141. package/dist/classes/errors/index.d.ts +1 -0
  142. package/dist/classes/errors/index.js +11 -0
  143. package/dist/classes/errors/index.js.map +1 -0
  144. package/dist/classes/filters/SelectionFilter.d.ts +11 -0
  145. package/dist/classes/filters/TreeFilter.d.ts +11 -0
  146. package/dist/classes/services/DataService/DataService.d.ts +13 -0
  147. package/dist/classes/services/DataService/index.d.ts +1 -0
  148. package/dist/classes/services/DataService/index.js +83 -0
  149. package/dist/classes/services/DataService/index.js.map +1 -0
  150. package/dist/classes/services/EventBusService/EventBusService.d.ts +49 -0
  151. package/dist/classes/services/EventBusService/index.d.ts +1 -0
  152. package/dist/classes/services/EventBusService/index.js +16 -0
  153. package/dist/classes/services/EventBusService/index.js.map +1 -0
  154. package/dist/classes/services/LineListService/LineListCaseSetMembersService/LineListCaseSetMembersService.d.ts +9 -0
  155. package/dist/classes/services/LineListService/LineListCaseSetMembersService/index.d.ts +1 -0
  156. package/dist/classes/services/LineListService/LineListCaseSetMembersService/index.js +27 -0
  157. package/dist/classes/services/LineListService/LineListCaseSetMembersService/index.js.map +1 -0
  158. package/dist/classes/services/LineListService/LineListIsOwnCaseService/LineListIsOwnCaseService.d.ts +9 -0
  159. package/dist/classes/services/LineListService/LineListIsOwnCaseService/index.d.ts +1 -0
  160. package/dist/classes/services/LineListService/LineListIsOwnCaseService/index.js +30 -0
  161. package/dist/classes/services/LineListService/LineListIsOwnCaseService/index.js.map +1 -0
  162. package/dist/classes/services/LineListService/LineListServiceAbstract/LineListServiceAbstract.d.ts +11 -0
  163. package/dist/classes/services/LineListService/LineListServiceAbstract/index.d.ts +1 -0
  164. package/dist/classes/services/LineListService/LineListServiceAbstract/index.js +55 -0
  165. package/dist/classes/services/LineListService/LineListServiceAbstract/index.js.map +1 -0
  166. package/dist/components/app/CaseDbApp/CaseDbApp.d.ts +1 -0
  167. package/dist/components/app/CaseDbApp/index.d.ts +1 -0
  168. package/dist/components/app/CaseDbApp/index.js +14 -0
  169. package/dist/components/app/CaseDbApp/index.js.map +1 -0
  170. package/dist/components/form/fields/ArrangementEditor/ArrangementEditor.d.ts +17 -0
  171. package/dist/components/form/fields/ArrangementEditor/index.d.ts +1 -0
  172. package/dist/components/form/fields/ArrangementEditor/index.js +130 -0
  173. package/dist/components/form/fields/ArrangementEditor/index.js.map +1 -0
  174. package/dist/components/ui/AddCasesToEventDialog/AddCasesToEventDialog.d.ts +10 -0
  175. package/dist/components/ui/AddCasesToEventDialog/AddCasesToEventDialogSuccessNotificationMessage.d.ts +6 -0
  176. package/dist/components/ui/AddCasesToEventDialog/index.d.ts +1 -0
  177. package/dist/components/ui/AddCasesToEventDialog/index.js +2 -0
  178. package/dist/components/ui/CaseContentForm/CaseContentForm.d.ts +10 -0
  179. package/dist/components/ui/CaseContentForm/index.d.ts +1 -0
  180. package/dist/components/ui/CaseContentForm/index.js +2 -0
  181. package/dist/components/ui/CaseContentFormDialog/CaseContentFormDialog.d.ts +9 -0
  182. package/dist/components/ui/CaseContentFormDialog/index.d.ts +1 -0
  183. package/dist/components/ui/CaseContentFormDialog/index.js +57 -0
  184. package/dist/components/ui/CaseContentFormDialog/index.js.map +1 -0
  185. package/dist/components/ui/CaseInfoDialog/CaseCaseSetInfo.d.ts +6 -0
  186. package/dist/components/ui/CaseInfoDialog/CaseContent.d.ts +6 -0
  187. package/dist/components/ui/CaseInfoDialog/CaseInfoDialog.d.ts +15 -0
  188. package/dist/components/ui/CaseInfoDialog/CaseInfoForm.d.ts +10 -0
  189. package/dist/components/ui/CaseInfoDialog/CaseSharingForm.d.ts +9 -0
  190. package/dist/components/ui/CaseInfoDialog/CaseSharingInfo.d.ts +3 -0
  191. package/dist/components/ui/CaseInfoDialog/ReadOnlyCaseContent.d.ts +6 -0
  192. package/dist/components/ui/CaseInfoDialog/index.d.ts +1 -0
  193. package/dist/components/ui/CaseInfoDialog/index.js +2 -0
  194. package/dist/components/ui/CaseSetInfoDialog/CaseSetContent.d.ts +6 -0
  195. package/dist/components/ui/CaseSetInfoDialog/CaseSetDescription.d.ts +6 -0
  196. package/dist/components/ui/CaseSetInfoDialog/CaseSetForm.d.ts +8 -0
  197. package/dist/components/ui/CaseSetInfoDialog/CaseSetInfoDialog.d.ts +10 -0
  198. package/dist/components/ui/CaseSetInfoDialog/CaseSetSharingForm.d.ts +10 -0
  199. package/dist/components/ui/CaseSetInfoDialog/CaseSetSharingInfo.d.ts +3 -0
  200. package/dist/components/ui/CaseSetInfoDialog/index.d.ts +1 -0
  201. package/dist/components/ui/CaseSetInfoDialog/index.js +2 -0
  202. package/dist/components/ui/CaseSummary/CaseSummary.d.ts +5 -0
  203. package/dist/components/ui/CaseSummary/index.d.ts +1 -0
  204. package/dist/components/ui/CaseSummary/index.js +92 -0
  205. package/dist/components/ui/CaseSummary/index.js.map +1 -0
  206. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoAccessRights.d.ts +5 -0
  207. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoColAccessRights.d.ts +4 -0
  208. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoData.d.ts +5 -0
  209. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialog.d.ts +7 -0
  210. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialogContent.d.ts +3 -0
  211. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialogWithLoader.d.ts +8 -0
  212. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoRegions.d.ts +5 -0
  213. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoTrees.d.ts +5 -0
  214. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoValues.d.ts +5 -0
  215. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoVariableDetails.d.ts +6 -0
  216. package/dist/components/ui/CaseTypeInfoDialog/index.d.ts +10 -0
  217. package/dist/components/ui/CaseTypeInfoDialog/index.js +2 -0
  218. package/dist/components/ui/CasesAlreadyInCaseSetWarning/CasesAlreadyInCaseSetWarning.d.ts +5 -0
  219. package/dist/components/ui/CasesAlreadyInCaseSetWarning/CasesAlreadyInCaseSetWarningCaseSetLink.d.ts +5 -0
  220. package/dist/components/ui/CasesAlreadyInCaseSetWarning/index.d.ts +1 -0
  221. package/dist/components/ui/CasesAlreadyInCaseSetWarning/index.js +2 -0
  222. package/dist/components/ui/CompletCaseTypeLoader/CompletCaseTypeLoader.d.ts +7 -0
  223. package/dist/components/ui/CompletCaseTypeLoader/index.d.ts +1 -0
  224. package/dist/components/ui/CompletCaseTypeLoader/index.js +2 -0
  225. package/dist/components/ui/CompletCaseTypeLoader/withEpiCompleteCaseTypeLoader.d.ts +4 -0
  226. package/dist/components/ui/ContextMenu/ContextMenu.d.ts +20 -0
  227. package/dist/components/ui/ContextMenu/index.d.ts +1 -0
  228. package/dist/components/ui/ContextMenu/index.js +96 -0
  229. package/dist/components/ui/ContextMenu/index.js.map +1 -0
  230. package/dist/components/ui/CreateEventDialog/CreateEventDialog.d.ts +10 -0
  231. package/dist/components/ui/CreateEventDialog/CreateEventDialogSuccessNotificationMessage.d.ts +6 -0
  232. package/dist/components/ui/CreateEventDialog/index.d.ts +1 -0
  233. package/dist/components/ui/CreateEventDialog/index.js +278 -0
  234. package/dist/components/ui/CreateEventDialog/index.js.map +1 -0
  235. package/dist/components/ui/CustomTabPanel/CustomTabPanel.d.ts +6 -0
  236. package/dist/components/ui/CustomTabPanel/index.d.ts +1 -0
  237. package/dist/components/ui/CustomTabPanel/index.js +2 -0
  238. package/dist/components/ui/Dashboard/Dashboard.d.ts +1 -0
  239. package/dist/components/ui/Dashboard/DashboardContent.d.ts +6 -0
  240. package/dist/components/ui/Dashboard/DashboardDownloadSidebarItem.d.ts +6 -0
  241. package/dist/components/ui/Dashboard/DashboardGeneralSettingsForm.d.ts +1 -0
  242. package/dist/components/ui/Dashboard/DashboardLayoutRenderer.d.ts +9 -0
  243. package/dist/components/ui/Dashboard/DashboardLayoutSettingsForm.d.ts +4 -0
  244. package/dist/components/ui/Dashboard/DashboardSearch.d.ts +1 -0
  245. package/dist/components/ui/Dashboard/DashboardSearchSettings.d.ts +10 -0
  246. package/dist/components/ui/Dashboard/DashboardSettingsSidebarItem.d.ts +8 -0
  247. package/dist/components/ui/Dashboard/DashboardWidget.d.ts +12 -0
  248. package/dist/components/ui/Dashboard/DashboardWidgetPlaceHolder.d.ts +1 -0
  249. package/dist/components/ui/Dashboard/DashboardWidgetSettingsForm.d.ts +4 -0
  250. package/dist/components/ui/Dashboard/DashboardZoneContext.d.ts +1 -0
  251. package/dist/components/ui/Dashboard/context/DashboardContext.d.ts +12 -0
  252. package/dist/components/ui/Dashboard/context/DashboardContextProvider.d.ts +6 -0
  253. package/dist/components/ui/Dashboard/index.d.ts +2 -0
  254. package/dist/components/ui/Dashboard/index.js +2 -0
  255. package/dist/components/ui/DashboardEditCases/DashboardEditCases.d.ts +6 -0
  256. package/dist/components/ui/DashboardEditCases/index.d.ts +1 -0
  257. package/dist/components/ui/DashboardEditCases/index.js +70 -0
  258. package/dist/components/ui/DashboardEditCases/index.js.map +1 -0
  259. package/dist/components/ui/DashboardStoreLoader/DashboardStoreLoader.d.ts +7 -0
  260. package/dist/components/ui/DashboardStoreLoader/DashboardStoreLoaderContent.d.ts +8 -0
  261. package/dist/components/ui/DashboardStoreLoader/index.d.ts +2 -0
  262. package/dist/components/ui/DashboardStoreLoader/index.js +2 -0
  263. package/dist/components/ui/DashboardStoreLoader/withEpiDashboardStore.d.ts +4 -0
  264. package/dist/components/ui/DataCollectionAccessInfo/DataCollectionAccessInfo.d.ts +1 -0
  265. package/dist/components/ui/DataCollectionAccessInfo/index.d.ts +1 -0
  266. package/dist/components/ui/DataCollectionAccessInfo/index.js +2 -0
  267. package/dist/components/ui/EpiCurveWidget/EpiCurveBarChart.d.ts +21 -0
  268. package/dist/components/ui/EpiCurveWidget/EpiCurveStackedAreaChart.d.ts +22 -0
  269. package/dist/components/ui/EpiCurveWidget/EpiCurveWidget.d.ts +2 -0
  270. package/dist/components/ui/EpiCurveWidget/index.d.ts +1 -0
  271. package/dist/components/ui/EpiCurveWidget/index.js +2 -0
  272. package/dist/components/ui/FileSelector/FileSelector.d.ts +7 -0
  273. package/dist/components/ui/FileSelector/index.d.ts +1 -0
  274. package/dist/components/ui/FileSelector/index.js +206 -0
  275. package/dist/components/ui/FileSelector/index.js.map +1 -0
  276. package/dist/components/ui/FindSimilarCasesDialog/FindSimilarCasesDialog.d.ts +11 -0
  277. package/dist/components/ui/FindSimilarCasesDialog/FindSimilarCasesDialogDateRangeChart.d.ts +11 -0
  278. package/dist/components/ui/FindSimilarCasesDialog/index.d.ts +1 -0
  279. package/dist/components/ui/FindSimilarCasesDialog/index.js +2 -0
  280. package/dist/components/ui/Grouping/Grouping.d.ts +1 -0
  281. package/dist/components/ui/Grouping/index.d.ts +1 -0
  282. package/dist/components/ui/Grouping/index.js +102 -0
  283. package/dist/components/ui/Grouping/index.js.map +1 -0
  284. package/dist/components/ui/HistogramWidget/HistogramWidget.d.ts +1 -0
  285. package/dist/components/ui/HistogramWidget/index.d.ts +1 -0
  286. package/dist/components/ui/HistogramWidget/index.js +333 -0
  287. package/dist/components/ui/HistogramWidget/index.js.map +1 -0
  288. package/dist/components/ui/HomePageTrends/HomePageTrendCard.d.ts +9 -0
  289. package/dist/components/ui/HomePageTrends/HomePageTrends.d.ts +4 -0
  290. package/dist/components/ui/HomePageTrends/index.d.ts +1 -0
  291. package/dist/components/ui/HomePageTrends/index.js +2 -0
  292. package/dist/components/ui/LegendaItem/LegendaItem.d.ts +10 -0
  293. package/dist/components/ui/LegendaItem/index.d.ts +1 -0
  294. package/dist/components/ui/LegendaItem/index.js +2 -0
  295. package/dist/components/ui/LineListWidget/LineListWidget.d.ts +1 -0
  296. package/dist/components/ui/LineListWidget/LineListWidgetIsInEventCell.d.ts +6 -0
  297. package/dist/components/ui/LineListWidget/LineListWidgetIsOwnCaseCell.d.ts +6 -0
  298. package/dist/components/ui/LineListWidget/LineListWidgetPrimaryMenu.d.ts +5 -0
  299. package/dist/components/ui/LineListWidget/LineListWidgetSecondaryMenu.d.ts +1 -0
  300. package/dist/components/ui/LineListWidget/LineListWidgetTitle.d.ts +1 -0
  301. package/dist/components/ui/LineListWidget/index.d.ts +1 -0
  302. package/dist/components/ui/LineListWidget/index.js +2 -0
  303. package/dist/components/ui/LineListWidget/useEpiLineListWidgetEmitDownloadOptions.d.ts +1 -0
  304. package/dist/components/ui/MapWidget/MapWidget.d.ts +1 -0
  305. package/dist/components/ui/MapWidget/index.d.ts +1 -0
  306. package/dist/components/ui/MapWidget/index.js +302 -0
  307. package/dist/components/ui/MapWidget/index.js.map +1 -0
  308. package/dist/components/ui/PanelSeparator/PanelSeparatorHorizontal.d.ts +2 -0
  309. package/dist/components/ui/PanelSeparator/PanelSeparatorVertical.d.ts +2 -0
  310. package/dist/components/ui/PanelSeparator/index.d.ts +2 -0
  311. package/dist/components/ui/PanelSeparator/index.js +2 -0
  312. package/dist/components/ui/RemoveCasesFromEventDialog/RemoveCasesFromEventDialog.d.ts +10 -0
  313. package/dist/components/ui/RemoveCasesFromEventDialog/index.d.ts +1 -0
  314. package/dist/components/ui/RemoveCasesFromEventDialog/index.js +111 -0
  315. package/dist/components/ui/RemoveCasesFromEventDialog/index.js.map +1 -0
  316. package/dist/components/ui/RemoveFindSimilarCasesResultDialog/RemoveFindSimilarCasesResultDialog.d.ts +9 -0
  317. package/dist/components/ui/SequenceDownloadDialog/SequenceDownloadDialog.d.ts +10 -0
  318. package/dist/components/ui/SequenceDownloadDialog/index.d.ts +1 -0
  319. package/dist/components/ui/SequenceDownloadDialog/index.js +89 -0
  320. package/dist/components/ui/SequenceDownloadDialog/index.js.map +1 -0
  321. package/dist/components/ui/TreeDescription/TreeDescription.d.ts +5 -0
  322. package/dist/components/ui/TreeDescription/index.d.ts +1 -0
  323. package/dist/components/ui/TreeDescription/index.js +40 -0
  324. package/dist/components/ui/TreeDescription/index.js.map +1 -0
  325. package/dist/components/ui/TreeWidget/TreeWidget.d.ts +1 -0
  326. package/dist/components/ui/TreeWidget/index.d.ts +1 -0
  327. package/dist/components/ui/TreeWidget/index.js +404 -0
  328. package/dist/components/ui/TreeWidget/index.js.map +1 -0
  329. package/dist/components/ui/Upload/Upload.d.ts +1 -0
  330. package/dist/components/ui/Upload/UploadCaseResultTable.d.ts +18 -0
  331. package/dist/components/ui/Upload/UploadCreateCases.d.ts +1 -0
  332. package/dist/components/ui/Upload/UploadEditColumnValuesDialog.d.ts +12 -0
  333. package/dist/components/ui/Upload/UploadMapColumns.d.ts +1 -0
  334. package/dist/components/ui/Upload/UploadMapSequences.d.ts +1 -0
  335. package/dist/components/ui/Upload/UploadNavigation.d.ts +10 -0
  336. package/dist/components/ui/Upload/UploadPreview.d.ts +4 -0
  337. package/dist/components/ui/Upload/UploadPreviewNavigation.d.ts +5 -0
  338. package/dist/components/ui/Upload/UploadSelectFile.d.ts +1 -0
  339. package/dist/components/ui/Upload/UploadSelectSequenceFiles.d.ts +1 -0
  340. package/dist/components/ui/Upload/index.d.ts +1 -0
  341. package/dist/components/ui/Upload/index.js +2 -0
  342. package/dist/components/ui/UserRightsDialog/UserRightsDialog.d.ts +9 -0
  343. package/dist/components/ui/UserRightsDialog/UserRightsDialogCaseAccessPolicy.d.ts +5 -0
  344. package/dist/components/ui/UserRightsDialog/index.d.ts +1 -0
  345. package/dist/components/ui/UserRightsDialog/index.js +2 -0
  346. package/dist/components/ui/UsersEffectiveRightsDetailsDialog/UsersEffectiveRightsDetailsDialog.d.ts +13 -0
  347. package/dist/components/ui/UsersEffectiveRightsDetailsDialog/index.d.ts +1 -0
  348. package/dist/components/ui/UsersEffectiveRightsDetailsDialog/index.js +373 -0
  349. package/dist/components/ui/UsersEffectiveRightsDetailsDialog/index.js.map +1 -0
  350. package/dist/components/ui/Warning/Warning.d.ts +4 -0
  351. package/dist/components/ui/Warning/index.d.ts +1 -0
  352. package/dist/components/ui/Warning/index.js +29 -0
  353. package/dist/components/ui/Warning/index.js.map +1 -0
  354. package/dist/components/ui/WidgetHeaderIconButton/WidgetHeaderIconButton.d.ts +5 -0
  355. package/dist/components/ui/WidgetHeaderIconButton/index.d.ts +1 -0
  356. package/dist/components/ui/WidgetHeaderIconButton/index.js +24 -0
  357. package/dist/components/ui/WidgetHeaderIconButton/index.js.map +1 -0
  358. package/dist/components/ui/WidgetMenu/WidgetMenu.d.ts +6 -0
  359. package/dist/components/ui/WidgetMenu/index.d.ts +1 -0
  360. package/dist/components/ui/WidgetMenu/index.js +26 -0
  361. package/dist/components/ui/WidgetMenu/index.js.map +1 -0
  362. package/dist/components/ui/WidgetUnavailable/WidgetUnavailable.d.ts +6 -0
  363. package/dist/components/ui/WidgetUnavailable/index.d.ts +1 -0
  364. package/dist/components/ui/WidgetUnavailable/index.js +18 -0
  365. package/dist/components/ui/WidgetUnavailable/index.js.map +1 -0
  366. package/dist/constants/dashboard.d.ts +9 -0
  367. package/dist/constants/dashboard.js +14 -0
  368. package/dist/constants/dashboard.js.map +1 -0
  369. package/dist/constants/query.d.ts +62 -0
  370. package/dist/constants/query.js +163 -0
  371. package/dist/constants/query.js.map +1 -0
  372. package/dist/context/caseAbac/CaseAbacContext.d.ts +14 -0
  373. package/dist/context/caseAbac/CaseAbacContextProvider.d.ts +6 -0
  374. package/dist/context/caseAbac/index.d.ts +3 -0
  375. package/dist/context/caseAbac/useCaseAbacContext.d.ts +2 -0
  376. package/dist/context/caseTypeAbac/CaseTypeAbacContext.d.ts +14 -0
  377. package/dist/context/caseTypeAbac/CaseTypeAbacContextProvider.d.ts +6 -0
  378. package/dist/context/caseTypeAbac/index.d.ts +3 -0
  379. package/dist/context/caseTypeAbac/useCaseTypeAbacContext.d.ts +2 -0
  380. package/dist/dataHooks/useAssemblyProtocolsQuery/index.d.ts +1 -0
  381. package/dist/dataHooks/useAssemblyProtocolsQuery/index.js +21 -0
  382. package/dist/dataHooks/useAssemblyProtocolsQuery/index.js.map +1 -0
  383. package/dist/dataHooks/useAssemblyProtocolsQuery/useAssemblyProtocolsQuery.d.ts +6 -0
  384. package/dist/dataHooks/useCaseRightsQuery/index.d.ts +1 -0
  385. package/dist/dataHooks/useCaseRightsQuery/index.js +17 -0
  386. package/dist/dataHooks/useCaseRightsQuery/index.js.map +1 -0
  387. package/dist/dataHooks/useCaseRightsQuery/useCaseRightsQuery.d.ts +3 -0
  388. package/dist/dataHooks/useCaseSetCategoriesQuery/index.d.ts +1 -0
  389. package/dist/dataHooks/useCaseSetCategoriesQuery/index.js +22 -0
  390. package/dist/dataHooks/useCaseSetCategoriesQuery/index.js.map +1 -0
  391. package/dist/dataHooks/useCaseSetCategoriesQuery/useCaseSetCategoriesQuery.d.ts +6 -0
  392. package/dist/dataHooks/useCaseSetRightsQuery/index.d.ts +1 -0
  393. package/dist/dataHooks/useCaseSetRightsQuery/index.js +13 -0
  394. package/dist/dataHooks/useCaseSetRightsQuery/index.js.map +1 -0
  395. package/dist/dataHooks/useCaseSetRightsQuery/useCaseSetRightsQuery.d.ts +3 -0
  396. package/dist/dataHooks/useCaseSetStatsQuery/index.d.ts +1 -0
  397. package/dist/dataHooks/useCaseSetStatsQuery/index.js +19 -0
  398. package/dist/dataHooks/useCaseSetStatsQuery/index.js.map +1 -0
  399. package/dist/dataHooks/useCaseSetStatsQuery/useCaseSetStatsQuery.d.ts +5 -0
  400. package/dist/dataHooks/useCaseSetStatusesQuery/index.d.ts +1 -0
  401. package/dist/dataHooks/useCaseSetStatusesQuery/index.js +22 -0
  402. package/dist/dataHooks/useCaseSetStatusesQuery/index.js.map +1 -0
  403. package/dist/dataHooks/useCaseSetStatusesQuery/useCaseSetStatusesQuery.d.ts +6 -0
  404. package/dist/dataHooks/useCaseSetsQuery/index.d.ts +1 -0
  405. package/dist/dataHooks/useCaseSetsQuery/index.js +22 -0
  406. package/dist/dataHooks/useCaseSetsQuery/index.js.map +1 -0
  407. package/dist/dataHooks/useCaseSetsQuery/useCaseSetsQuery.d.ts +6 -0
  408. package/dist/dataHooks/useCaseTypeSetCategoriesQuery/index.d.ts +1 -0
  409. package/dist/dataHooks/useCaseTypeSetCategoriesQuery/index.js +22 -0
  410. package/dist/dataHooks/useCaseTypeSetCategoriesQuery/index.js.map +1 -0
  411. package/dist/dataHooks/useCaseTypeSetCategoriesQuery/useCaseTypeSetCategoriesQuery.d.ts +6 -0
  412. package/dist/dataHooks/useCaseTypeSetCategoryPurposeQuery/index.d.ts +1 -0
  413. package/dist/dataHooks/useCaseTypeSetCategoryPurposeQuery/index.js +21 -0
  414. package/dist/dataHooks/useCaseTypeSetCategoryPurposeQuery/index.js.map +1 -0
  415. package/dist/dataHooks/useCaseTypeSetCategoryPurposeQuery/useCaseTypeSetCategoryPurposeQuery.d.ts +4 -0
  416. package/dist/dataHooks/useCaseTypeSetMembersQuery/index.d.ts +1 -0
  417. package/dist/dataHooks/useCaseTypeSetMembersQuery/index.js +13 -0
  418. package/dist/dataHooks/useCaseTypeSetMembersQuery/index.js.map +1 -0
  419. package/dist/dataHooks/useCaseTypeSetMembersQuery/useCaseTypeSetMembersQuery.d.ts +3 -0
  420. package/dist/dataHooks/useCaseTypeSetsQuery/index.d.ts +1 -0
  421. package/dist/dataHooks/useCaseTypeSetsQuery/index.js +25 -0
  422. package/dist/dataHooks/useCaseTypeSetsQuery/index.js.map +1 -0
  423. package/dist/dataHooks/useCaseTypeSetsQuery/useCaseTypeSetsQuery.d.ts +7 -0
  424. package/dist/dataHooks/useCaseTypeStatsQuery/index.d.ts +1 -0
  425. package/dist/dataHooks/useCaseTypeStatsQuery/index.js +13 -0
  426. package/dist/dataHooks/useCaseTypeStatsQuery/index.js.map +1 -0
  427. package/dist/dataHooks/useCaseTypeStatsQuery/useCaseTypeStatsQuery.d.ts +3 -0
  428. package/dist/dataHooks/useCaseTypesQuery/index.d.ts +1 -0
  429. package/dist/dataHooks/useCaseTypesQuery/index.js +24 -0
  430. package/dist/dataHooks/useCaseTypesQuery/index.js.map +1 -0
  431. package/dist/dataHooks/useCaseTypesQuery/useCaseTypesQuery.d.ts +9 -0
  432. package/dist/dataHooks/useColSetMembersQuery/index.d.ts +1 -0
  433. package/dist/dataHooks/useColSetMembersQuery/index.js +13 -0
  434. package/dist/dataHooks/useColSetMembersQuery/index.js.map +1 -0
  435. package/dist/dataHooks/useColSetMembersQuery/useColSetMembersQuery.d.ts +3 -0
  436. package/dist/dataHooks/useColSetsQuery/index.d.ts +1 -0
  437. package/dist/dataHooks/useColSetsQuery/index.js +21 -0
  438. package/dist/dataHooks/useColSetsQuery/index.js.map +1 -0
  439. package/dist/dataHooks/useColSetsQuery/useColSetsQuery.d.ts +6 -0
  440. package/dist/dataHooks/useColTypesQuery/index.d.ts +1 -0
  441. package/dist/dataHooks/useColTypesQuery/index.js +51 -0
  442. package/dist/dataHooks/useColTypesQuery/index.js.map +1 -0
  443. package/dist/dataHooks/useColTypesQuery/useColTypesQuery.d.ts +4 -0
  444. package/dist/dataHooks/useColsQuery/index.d.ts +1 -0
  445. package/dist/dataHooks/useColsQuery/index.js +27 -0
  446. package/dist/dataHooks/useColsQuery/index.js.map +1 -0
  447. package/dist/dataHooks/useColsQuery/useColsQuery.d.ts +7 -0
  448. package/dist/dataHooks/useConceptQuery/index.d.ts +1 -0
  449. package/dist/dataHooks/useConceptQuery/index.js +26 -0
  450. package/dist/dataHooks/useConceptQuery/index.js.map +1 -0
  451. package/dist/dataHooks/useConceptQuery/useConceptQuery.d.ts +7 -0
  452. package/dist/dataHooks/useConceptRelationTypeQuery/index.d.ts +1 -0
  453. package/dist/dataHooks/useConceptRelationTypeQuery/index.js +15 -0
  454. package/dist/dataHooks/useConceptRelationTypeQuery/index.js.map +1 -0
  455. package/dist/dataHooks/useConceptRelationTypeQuery/useConceptRelationTypeQuery.d.ts +4 -0
  456. package/dist/dataHooks/useConceptSetTypeQuery/index.d.ts +1 -0
  457. package/dist/dataHooks/useConceptSetTypeQuery/index.js +22 -0
  458. package/dist/dataHooks/useConceptSetTypeQuery/index.js.map +1 -0
  459. package/dist/dataHooks/useConceptSetTypeQuery/useConceptSetTypeQuery.d.ts +4 -0
  460. package/dist/dataHooks/useConceptSetsQuery/index.d.ts +1 -0
  461. package/dist/dataHooks/useConceptSetsQuery/index.js +21 -0
  462. package/dist/dataHooks/useConceptSetsQuery/index.js.map +1 -0
  463. package/dist/dataHooks/useConceptSetsQuery/useConceptSetsQuery.d.ts +6 -0
  464. package/dist/dataHooks/useDataCollectionSetMembersQuery/index.d.ts +1 -0
  465. package/dist/dataHooks/useDataCollectionSetMembersQuery/index.js +13 -0
  466. package/dist/dataHooks/useDataCollectionSetMembersQuery/index.js.map +1 -0
  467. package/dist/dataHooks/useDataCollectionSetMembersQuery/useDataCollectionSetMembersQuery.d.ts +3 -0
  468. package/dist/dataHooks/useDataCollectionsQuery/index.d.ts +1 -0
  469. package/dist/dataHooks/useDataCollectionsQuery/index.js +22 -0
  470. package/dist/dataHooks/useDataCollectionsQuery/index.js.map +1 -0
  471. package/dist/dataHooks/useDataCollectionsQuery/useDataCollectionsQuery.d.ts +6 -0
  472. package/dist/dataHooks/useDimTypesQuery/index.d.ts +1 -0
  473. package/dist/dataHooks/useDimTypesQuery/index.js +26 -0
  474. package/dist/dataHooks/useDimTypesQuery/index.js.map +1 -0
  475. package/dist/dataHooks/useDimTypesQuery/useDimTypesQuery.d.ts +4 -0
  476. package/dist/dataHooks/useDimsQuery/index.d.ts +1 -0
  477. package/dist/dataHooks/useDimsQuery/index.js +26 -0
  478. package/dist/dataHooks/useDimsQuery/index.js.map +1 -0
  479. package/dist/dataHooks/useDimsQuery/useDimsQuery.d.ts +7 -0
  480. package/dist/dataHooks/useDiseasesQuery/index.d.ts +1 -0
  481. package/dist/dataHooks/useDiseasesQuery/index.js +21 -0
  482. package/dist/dataHooks/useDiseasesQuery/index.js.map +1 -0
  483. package/dist/dataHooks/useDiseasesQuery/useDiseasesQuery.d.ts +6 -0
  484. package/dist/dataHooks/useEtiologicalAgentsQuery/index.d.ts +1 -0
  485. package/dist/dataHooks/useEtiologicalAgentsQuery/index.js +21 -0
  486. package/dist/dataHooks/useEtiologicalAgentsQuery/index.js.map +1 -0
  487. package/dist/dataHooks/useEtiologicalAgentsQuery/useEtiologicalAgentsQuery.d.ts +6 -0
  488. package/dist/dataHooks/useGeneticDistanceProtocolsQuery/index.d.ts +1 -0
  489. package/dist/dataHooks/useGeneticDistanceProtocolsQuery/index.js +18 -0
  490. package/dist/dataHooks/useGeneticDistanceProtocolsQuery/index.js.map +1 -0
  491. package/dist/dataHooks/useGeneticDistanceProtocolsQuery/useGeneticDistanceProtocolsQuery.d.ts +5 -0
  492. package/dist/dataHooks/useOrganizationAccessCasePoliciesQuery/index.d.ts +1 -0
  493. package/dist/dataHooks/useOrganizationAccessCasePoliciesQuery/index.js +14 -0
  494. package/dist/dataHooks/useOrganizationAccessCasePoliciesQuery/index.js.map +1 -0
  495. package/dist/dataHooks/useOrganizationAccessCasePoliciesQuery/useOrganizationAccessCasePoliciesQuery.d.ts +3 -0
  496. package/dist/dataHooks/useOrganizationShareCasePoliciesQuery/index.d.ts +1 -0
  497. package/dist/dataHooks/useOrganizationShareCasePoliciesQuery/index.js +14 -0
  498. package/dist/dataHooks/useOrganizationShareCasePoliciesQuery/index.js.map +1 -0
  499. package/dist/dataHooks/useOrganizationShareCasePoliciesQuery/useOrganizationShareCasePoliciesQuery.d.ts +3 -0
  500. package/dist/dataHooks/useRefColsQuery/index.d.ts +1 -0
  501. package/dist/dataHooks/useRefColsQuery/index.js +22 -0
  502. package/dist/dataHooks/useRefColsQuery/index.js.map +1 -0
  503. package/dist/dataHooks/useRefColsQuery/useRefColsQuery.d.ts +6 -0
  504. package/dist/dataHooks/useRefColsValidationRulesQuery/index.d.ts +1 -0
  505. package/dist/dataHooks/useRefColsValidationRulesQuery/index.js +13 -0
  506. package/dist/dataHooks/useRefColsValidationRulesQuery/index.js.map +1 -0
  507. package/dist/dataHooks/useRefColsValidationRulesQuery/useRefColsValidationRulesQuery.d.ts +3 -0
  508. package/dist/dataHooks/useRefDimsQuery/index.d.ts +1 -0
  509. package/dist/dataHooks/useRefDimsQuery/index.js +22 -0
  510. package/dist/dataHooks/useRefDimsQuery/index.js.map +1 -0
  511. package/dist/dataHooks/useRefDimsQuery/useRefDimsQuery.d.ts +6 -0
  512. package/dist/dataHooks/useRegionQuery/index.d.ts +1 -0
  513. package/dist/dataHooks/useRegionQuery/index.js +25 -0
  514. package/dist/dataHooks/useRegionQuery/index.js.map +1 -0
  515. package/dist/dataHooks/useRegionQuery/useRegionQuery.d.ts +7 -0
  516. package/dist/dataHooks/useRegionRelationTypeQuery/index.d.ts +1 -0
  517. package/dist/dataHooks/useRegionRelationTypeQuery/index.js +20 -0
  518. package/dist/dataHooks/useRegionRelationTypeQuery/index.js.map +1 -0
  519. package/dist/dataHooks/useRegionRelationTypeQuery/useRegionRelationTypeQuery.d.ts +4 -0
  520. package/dist/dataHooks/useRegionSetsQuery/index.d.ts +1 -0
  521. package/dist/dataHooks/useRegionSetsQuery/index.js +21 -0
  522. package/dist/dataHooks/useRegionSetsQuery/index.js.map +1 -0
  523. package/dist/dataHooks/useRegionSetsQuery/useRegionSetsQuery.d.ts +6 -0
  524. package/dist/dataHooks/useSequencingProtocolsQuery/index.d.ts +1 -0
  525. package/dist/dataHooks/useSequencingProtocolsQuery/index.js +21 -0
  526. package/dist/dataHooks/useSequencingProtocolsQuery/index.js.map +1 -0
  527. package/dist/dataHooks/useSequencingProtocolsQuery/useSequencingProtocolsQuery.d.ts +6 -0
  528. package/dist/dataHooks/useTreeAlgorithmCodesQuery/index.d.ts +1 -0
  529. package/dist/dataHooks/useTreeAlgorithmCodesQuery/index.js +42 -0
  530. package/dist/dataHooks/useTreeAlgorithmCodesQuery/index.js.map +1 -0
  531. package/dist/dataHooks/useTreeAlgorithmCodesQuery/useTreeAlgorithmCodesQuery.d.ts +4 -0
  532. package/dist/dataHooks/useUnitQuery/index.d.ts +1 -0
  533. package/dist/dataHooks/useUnitQuery/index.js +2 -0
  534. package/dist/dataHooks/useUnitQuery/useUnit.d.ts +4 -0
  535. package/dist/dataHooks/useUserAccessCasePoliciesQuery/index.d.ts +1 -0
  536. package/dist/dataHooks/useUserAccessCasePoliciesQuery/index.js +14 -0
  537. package/dist/dataHooks/useUserAccessCasePoliciesQuery/index.js.map +1 -0
  538. package/dist/dataHooks/useUserAccessCasePoliciesQuery/useUserAccessCasePoliciesQuery.d.ts +3 -0
  539. package/dist/dataHooks/useUserEffectiveRightsQuery/index.d.ts +1 -0
  540. package/dist/dataHooks/useUserEffectiveRightsQuery/index.js +83 -0
  541. package/dist/dataHooks/useUserEffectiveRightsQuery/index.js.map +1 -0
  542. package/dist/dataHooks/useUserEffectiveRightsQuery/useUserEffectiveRightsQuery.d.ts +16 -0
  543. package/dist/dataHooks/useUserShareCasePoliciesQuery/index.d.ts +1 -0
  544. package/dist/dataHooks/useUserShareCasePoliciesQuery/index.js +14 -0
  545. package/dist/dataHooks/useUserShareCasePoliciesQuery/index.js.map +1 -0
  546. package/dist/dataHooks/useUserShareCasePoliciesQuery/useUserShareCasePoliciesQuery.d.ts +3 -0
  547. package/dist/hooks/useOrganizationCasePolicyNameFactory/index.d.ts +1 -0
  548. package/dist/hooks/useOrganizationCasePolicyNameFactory/index.js +25 -0
  549. package/dist/hooks/useOrganizationCasePolicyNameFactory/index.js.map +1 -0
  550. package/dist/hooks/useOrganizationCasePolicyNameFactory/useOrganizationCasePolicyNameFactory.d.ts +3 -0
  551. package/dist/hooks/useUserCasePolicyNameFactory/index.d.ts +1 -0
  552. package/dist/hooks/useUserCasePolicyNameFactory/index.js +28 -0
  553. package/dist/hooks/useUserCasePolicyNameFactory/index.js.map +1 -0
  554. package/dist/hooks/useUserCasePolicyNameFactory/useUserCasePolicyNameFactory.d.ts +3 -0
  555. package/dist/locale/en.json +676 -0
  556. package/dist/locale/nl.json +676 -0
  557. package/dist/models/caseAccess.d.ts +15 -0
  558. package/dist/models/caseAccess.js +0 -0
  559. package/dist/models/caseDb.d.ts +96 -0
  560. package/dist/models/caseDb.js +8 -0
  561. package/dist/models/caseDb.js.map +1 -0
  562. package/dist/models/config.d.ts +70 -0
  563. package/dist/models/config.js +0 -0
  564. package/dist/models/dashboard.d.ts +91 -0
  565. package/dist/models/dashboard.js +10 -0
  566. package/dist/models/dashboard.js.map +1 -0
  567. package/dist/models/stratification.d.ts +40 -0
  568. package/dist/models/stratification.js +12 -0
  569. package/dist/models/stratification.js.map +1 -0
  570. package/dist/models/theme.d.ts +17 -0
  571. package/dist/models/theme.js +0 -0
  572. package/dist/models/upload.d.ts +51 -0
  573. package/dist/models/upload.js +8 -0
  574. package/dist/models/upload.js.map +1 -0
  575. package/dist/pages/CaseDbUsersAdminPage/CaseDbUsersAdminPage.d.ts +1 -0
  576. package/dist/pages/CaseDbUsersAdminPage/index.d.ts +1 -0
  577. package/dist/pages/CaseDbUsersAdminPage/index.js +67 -0
  578. package/dist/pages/CaseDbUsersAdminPage/index.js.map +1 -0
  579. package/dist/pages/CaseSetCategoryAdminPage/CaseSetCategoryAdminPage.d.ts +1 -0
  580. package/dist/pages/CaseSetCategoryAdminPage/index.d.ts +1 -0
  581. package/dist/pages/CaseSetCategoryAdminPage/index.js +69 -0
  582. package/dist/pages/CaseSetCategoryAdminPage/index.js.map +1 -0
  583. package/dist/pages/CaseSetStatusAdminPage/CaseSetStatusAdminPage.d.ts +1 -0
  584. package/dist/pages/CaseSetStatusAdminPage/index.d.ts +1 -0
  585. package/dist/pages/CaseSetStatusAdminPage/index.js +69 -0
  586. package/dist/pages/CaseSetStatusAdminPage/index.js.map +1 -0
  587. package/dist/pages/CaseTypeSetCategoriesAdminPage/CaseTypeSetCategoriesAdminPage.d.ts +1 -0
  588. package/dist/pages/CaseTypeSetCategoriesAdminPage/index.d.ts +1 -0
  589. package/dist/pages/CaseTypeSetCategoriesAdminPage/index.js +92 -0
  590. package/dist/pages/CaseTypeSetCategoriesAdminPage/index.js.map +1 -0
  591. package/dist/pages/CaseTypeSetsAdminPage/CaseTypeSetsAdminPage.d.ts +1 -0
  592. package/dist/pages/CaseTypeSetsAdminPage/index.d.ts +1 -0
  593. package/dist/pages/CaseTypeSetsAdminPage/index.js +148 -0
  594. package/dist/pages/CaseTypeSetsAdminPage/index.js.map +1 -0
  595. package/dist/pages/CaseTypesAdminPage/CaseTypesAdminPage.d.ts +1 -0
  596. package/dist/pages/CaseTypesAdminPage/index.d.ts +1 -0
  597. package/dist/pages/CaseTypesAdminPage/index.js +288 -0
  598. package/dist/pages/CaseTypesAdminPage/index.js.map +1 -0
  599. package/dist/pages/CasesDetailPage/CasesDetailPage.d.ts +1 -0
  600. package/dist/pages/CasesDetailPage/index.d.ts +1 -0
  601. package/dist/pages/CasesDetailPage/index.js +41 -0
  602. package/dist/pages/CasesDetailPage/index.js.map +1 -0
  603. package/dist/pages/CasesPage/CasesPage.d.ts +1 -0
  604. package/dist/pages/CasesPage/index.d.ts +1 -0
  605. package/dist/pages/CasesPage/index.js +229 -0
  606. package/dist/pages/CasesPage/index.js.map +1 -0
  607. package/dist/pages/ColSetsAdminPage/ColSetsAdminPage.d.ts +1 -0
  608. package/dist/pages/ColSetsAdminPage/index.d.ts +1 -0
  609. package/dist/pages/ColSetsAdminPage/index.js +109 -0
  610. package/dist/pages/ColSetsAdminPage/index.js.map +1 -0
  611. package/dist/pages/ColsAdminPage/ColsAdminPage.d.ts +1 -0
  612. package/dist/pages/ColsAdminPage/index.d.ts +1 -0
  613. package/dist/pages/ColsAdminPage/index.js +315 -0
  614. package/dist/pages/ColsAdminPage/index.js.map +1 -0
  615. package/dist/pages/ConceptRelationsAdminPage/ConceptRelationsAdminPage.d.ts +1 -0
  616. package/dist/pages/ConceptRelationsAdminPage/index.d.ts +1 -0
  617. package/dist/pages/ConceptRelationsAdminPage/index.js +103 -0
  618. package/dist/pages/ConceptRelationsAdminPage/index.js.map +1 -0
  619. package/dist/pages/ConceptSetsAdminPage/ConceptSetsAdminPage.d.ts +1 -0
  620. package/dist/pages/ConceptSetsAdminPage/index.d.ts +1 -0
  621. package/dist/pages/ConceptSetsAdminPage/index.js +112 -0
  622. package/dist/pages/ConceptSetsAdminPage/index.js.map +1 -0
  623. package/dist/pages/ConceptsAdminPage/ConceptsAdminPage.d.ts +1 -0
  624. package/dist/pages/ConceptsAdminPage/index.d.ts +1 -0
  625. package/dist/pages/ConceptsAdminPage/index.js +94 -0
  626. package/dist/pages/ConceptsAdminPage/index.js.map +1 -0
  627. package/dist/pages/DataCollectionSetsAdminPage/DataCollectionSetsAdminPage.d.ts +1 -0
  628. package/dist/pages/DataCollectionSetsAdminPage/index.d.ts +1 -0
  629. package/dist/pages/DataCollectionSetsAdminPage/index.js +99 -0
  630. package/dist/pages/DataCollectionSetsAdminPage/index.js.map +1 -0
  631. package/dist/pages/DataCollectionVisualizationPage/DataCollectionVisualizationPage.d.ts +1 -0
  632. package/dist/pages/DataCollectionVisualizationPage/index.d.ts +1 -0
  633. package/dist/pages/DataCollectionVisualizationPage/index.js +494 -0
  634. package/dist/pages/DataCollectionVisualizationPage/index.js.map +1 -0
  635. package/dist/pages/DataCollectionsAdminPage/DataCollectionsAdminPage.d.ts +1 -0
  636. package/dist/pages/DataCollectionsAdminPage/index.d.ts +1 -0
  637. package/dist/pages/DataCollectionsAdminPage/index.js +54 -0
  638. package/dist/pages/DataCollectionsAdminPage/index.js.map +1 -0
  639. package/dist/pages/DimsAdminPage/DimsAdminPage.d.ts +1 -0
  640. package/dist/pages/DimsAdminPage/index.d.ts +1 -0
  641. package/dist/pages/DimsAdminPage/index.js +146 -0
  642. package/dist/pages/DimsAdminPage/index.js.map +1 -0
  643. package/dist/pages/DiseasesAdminPage/DiseasesAdminPage.d.ts +1 -0
  644. package/dist/pages/DiseasesAdminPage/index.d.ts +1 -0
  645. package/dist/pages/DiseasesAdminPage/index.js +57 -0
  646. package/dist/pages/DiseasesAdminPage/index.js.map +1 -0
  647. package/dist/pages/EtiologicalAgentsAdminPage/EtiologicalAgentsAdminPage.d.ts +1 -0
  648. package/dist/pages/EtiologicalAgentsAdminPage/index.d.ts +1 -0
  649. package/dist/pages/EtiologicalAgentsAdminPage/index.js +54 -0
  650. package/dist/pages/EtiologicalAgentsAdminPage/index.js.map +1 -0
  651. package/dist/pages/EtiologiesAdminPage/EtiologiesAdminPage.d.ts +1 -0
  652. package/dist/pages/EtiologiesAdminPage/index.d.ts +1 -0
  653. package/dist/pages/EtiologiesAdminPage/index.js +76 -0
  654. package/dist/pages/EtiologiesAdminPage/index.js.map +1 -0
  655. package/dist/pages/EventsDetailPage/EventsDetailPage.d.ts +1 -0
  656. package/dist/pages/EventsDetailPage/index.d.ts +1 -0
  657. package/dist/pages/EventsDetailPage/index.js +56 -0
  658. package/dist/pages/EventsDetailPage/index.js.map +1 -0
  659. package/dist/pages/EventsPage/EventsPage.d.ts +1 -0
  660. package/dist/pages/EventsPage/index.d.ts +1 -0
  661. package/dist/pages/EventsPage/index.js +221 -0
  662. package/dist/pages/EventsPage/index.js.map +1 -0
  663. package/dist/pages/HomePage/HomePage.d.ts +1 -0
  664. package/dist/pages/HomePage/index.d.ts +1 -0
  665. package/dist/pages/HomePage/index.js +35 -0
  666. package/dist/pages/HomePage/index.js.map +1 -0
  667. package/dist/pages/OrganizationAccessCasePoliciesAdminPage/OrganizationAccessCasePoliciesAdminPage.d.ts +1 -0
  668. package/dist/pages/OrganizationAccessCasePoliciesAdminPage/index.d.ts +1 -0
  669. package/dist/pages/OrganizationAccessCasePoliciesAdminPage/index.js +216 -0
  670. package/dist/pages/OrganizationAccessCasePoliciesAdminPage/index.js.map +1 -0
  671. package/dist/pages/OrganizationShareCasePoliciesAdminPage/OrganizationShareCasePoliciesAdminPage.d.ts +1 -0
  672. package/dist/pages/OrganizationShareCasePoliciesAdminPage/index.d.ts +1 -0
  673. package/dist/pages/OrganizationShareCasePoliciesAdminPage/index.js +170 -0
  674. package/dist/pages/OrganizationShareCasePoliciesAdminPage/index.js.map +1 -0
  675. package/dist/pages/RefColsAdminPage/RefColsAdminPage.d.ts +1 -0
  676. package/dist/pages/RefColsAdminPage/index.d.ts +1 -0
  677. package/dist/pages/RefColsAdminPage/index.js +302 -0
  678. package/dist/pages/RefColsAdminPage/index.js.map +1 -0
  679. package/dist/pages/RefDimsAdminPage/RefDimsAdminPage.d.ts +1 -0
  680. package/dist/pages/RefDimsAdminPage/index.d.ts +1 -0
  681. package/dist/pages/RefDimsAdminPage/index.js +110 -0
  682. package/dist/pages/RefDimsAdminPage/index.js.map +1 -0
  683. package/dist/pages/RegionRelationsAdminPage/RegionRelationsAdminPage.d.ts +1 -0
  684. package/dist/pages/RegionRelationsAdminPage/index.d.ts +1 -0
  685. package/dist/pages/RegionRelationsAdminPage/index.js +102 -0
  686. package/dist/pages/RegionRelationsAdminPage/index.js.map +1 -0
  687. package/dist/pages/RegionSetShapesAdminPage/RegionSetShapesAdminPage.d.ts +1 -0
  688. package/dist/pages/RegionSetShapesAdminPage/index.d.ts +1 -0
  689. package/dist/pages/RegionSetShapesAdminPage/index.js +73 -0
  690. package/dist/pages/RegionSetShapesAdminPage/index.js.map +1 -0
  691. package/dist/pages/RegionSetsAdminPage/RegionSetsAdminPage.d.ts +1 -0
  692. package/dist/pages/RegionSetsAdminPage/index.d.ts +1 -0
  693. package/dist/pages/RegionSetsAdminPage/index.js +101 -0
  694. package/dist/pages/RegionSetsAdminPage/index.js.map +1 -0
  695. package/dist/pages/RegionsAdminPage/RegionsAdminPage.d.ts +1 -0
  696. package/dist/pages/RegionsAdminPage/index.d.ts +1 -0
  697. package/dist/pages/RegionsAdminPage/index.js +99 -0
  698. package/dist/pages/RegionsAdminPage/index.js.map +1 -0
  699. package/dist/pages/TrendsPage/TrendsPage.d.ts +1 -0
  700. package/dist/pages/TrendsPage/index.d.ts +1 -0
  701. package/dist/pages/TrendsPage/index.js +17 -0
  702. package/dist/pages/TrendsPage/index.js.map +1 -0
  703. package/dist/pages/UploadPage/UploadPage.d.ts +1 -0
  704. package/dist/pages/UploadPage/index.d.ts +1 -0
  705. package/dist/pages/UploadPage/index.js +31 -0
  706. package/dist/pages/UploadPage/index.js.map +1 -0
  707. package/dist/pages/UserAccessCasePoliciesAdminPage/UserAccessCasePoliciesAdminPage.d.ts +1 -0
  708. package/dist/pages/UserAccessCasePoliciesAdminPage/index.d.ts +1 -0
  709. package/dist/pages/UserAccessCasePoliciesAdminPage/index.js +206 -0
  710. package/dist/pages/UserAccessCasePoliciesAdminPage/index.js.map +1 -0
  711. package/dist/pages/UserEffectiveRightsAdminPage/UserEffectiveRightsAdminPage.d.ts +1 -0
  712. package/dist/pages/UserEffectiveRightsAdminPage/index.d.ts +1 -0
  713. package/dist/pages/UserEffectiveRightsAdminPage/index.js +246 -0
  714. package/dist/pages/UserEffectiveRightsAdminPage/index.js.map +1 -0
  715. package/dist/pages/UserEffectiveRightsTesterAdminPage/UserEffectiveRightsTesterAdminPage.d.ts +1 -0
  716. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.d.ts +1 -0
  717. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js +195 -0
  718. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js.map +1 -0
  719. package/dist/pages/UserShareCasePoliciesAdminPage/UserShareCasePoliciesAdminPage.d.ts +1 -0
  720. package/dist/pages/UserShareCasePoliciesAdminPage/index.d.ts +1 -0
  721. package/dist/pages/UserShareCasePoliciesAdminPage/index.js +169 -0
  722. package/dist/pages/UserShareCasePoliciesAdminPage/index.js.map +1 -0
  723. package/dist/routes/adminRoutes.d.ts +6 -0
  724. package/dist/routes/index.d.ts +2 -0
  725. package/dist/routes/index.js +1110 -0
  726. package/dist/routes/index.js.map +1 -0
  727. package/dist/routes/routes.d.ts +6 -0
  728. package/dist/setup/setup.d.ts +1 -0
  729. package/dist/setup/setup.js +28 -0
  730. package/dist/setup/setup.js.map +1 -0
  731. package/dist/stores/dashboardStore/dashboardStore.d.ts +80 -0
  732. package/dist/stores/dashboardStore/dashboardStoreContext.d.ts +3 -0
  733. package/dist/stores/dashboardStore/index.d.ts +2 -0
  734. package/dist/stores/dashboardStore/index.js +2 -0
  735. package/dist/stores/uploadStore/index.d.ts +2 -0
  736. package/dist/stores/uploadStore/index.js +185 -0
  737. package/dist/stores/uploadStore/index.js.map +1 -0
  738. package/dist/stores/uploadStore/uploadStore.d.ts +80 -0
  739. package/dist/stores/uploadStore/uploadStoreContext.d.ts +3 -0
  740. package/dist/stores/userProfileStore/index.d.ts +1 -0
  741. package/dist/stores/userProfileStore/index.js +81 -0
  742. package/dist/stores/userProfileStore/index.js.map +1 -0
  743. package/dist/stores/userProfileStore/userProfileStore.d.ts +38 -0
  744. package/dist/stores/userProfileStore/userProfileStoreContext.d.ts +3 -0
  745. package/dist/theme/demoTheme/demoTheme.d.ts +3 -0
  746. package/dist/theme/demoTheme/index.d.ts +1 -0
  747. package/dist/theme/demoTheme/index.js +20 -0
  748. package/dist/theme/demoTheme/index.js.map +1 -0
  749. package/dist/utils/AbacUtil/AbacUtil.d.ts +7 -0
  750. package/dist/utils/AbacUtil/index.d.ts +1 -0
  751. package/dist/utils/AbacUtil/index.js +31 -0
  752. package/dist/utils/AbacUtil/index.js.map +1 -0
  753. package/dist/utils/CaseDbDataUtil/CaseDbDataUtil.d.ts +31 -0
  754. package/dist/utils/CaseDbDataUtil/index.d.ts +1 -0
  755. package/dist/utils/CaseDbDataUtil/index.js +43 -0
  756. package/dist/utils/CaseDbDataUtil/index.js.map +1 -0
  757. package/dist/utils/CaseDbDownloadUtil/CaseDbDownloadUtil.d.ts +17 -0
  758. package/dist/utils/CaseDbDownloadUtil/index.d.ts +1 -0
  759. package/dist/utils/CaseDbDownloadUtil/index.js +2 -0
  760. package/dist/utils/CaseDbStandardConfigUtil/CaseDbStandardConfigUtil.d.ts +7 -0
  761. package/dist/utils/CaseDbStandardConfigUtil/index.d.ts +1 -0
  762. package/dist/utils/CaseDbStandardConfigUtil/index.js +4778 -0
  763. package/dist/utils/CaseDbStandardConfigUtil/index.js.map +1 -0
  764. package/dist/utils/CaseDbTableUtil/CaseDbTableUtil.d.ts +6 -0
  765. package/dist/utils/CaseDbTableUtil/index.d.ts +1 -0
  766. package/dist/utils/CaseDbTableUtil/index.js +41 -0
  767. package/dist/utils/CaseDbTableUtil/index.js.map +1 -0
  768. package/dist/utils/CaseSelectionUtil/CaseSelectionUtil.d.ts +8 -0
  769. package/dist/utils/CaseSelectionUtil/index.d.ts +1 -0
  770. package/dist/utils/CaseSelectionUtil/index.js +29 -0
  771. package/dist/utils/CaseSelectionUtil/index.js.map +1 -0
  772. package/dist/utils/CaseSetUtil/CaseSetUtil.d.ts +4 -0
  773. package/dist/utils/CaseSetUtil/index.d.ts +1 -0
  774. package/dist/utils/CaseSetUtil/index.js +13 -0
  775. package/dist/utils/CaseSetUtil/index.js.map +1 -0
  776. package/dist/utils/CaseTypeFormUtil/CaseTypeFormUtil.d.ts +20 -0
  777. package/dist/utils/CaseTypeFormUtil/index.d.ts +1 -0
  778. package/dist/utils/CaseTypeFormUtil/index.js +199 -0
  779. package/dist/utils/CaseTypeFormUtil/index.js.map +1 -0
  780. package/dist/utils/CaseTypeUtil/CaseTypeUtil.d.ts +39 -0
  781. package/dist/utils/CaseTypeUtil/index.d.ts +1 -0
  782. package/dist/utils/CaseTypeUtil/index.js +135 -0
  783. package/dist/utils/CaseTypeUtil/index.js.map +1 -0
  784. package/dist/utils/CaseUtil/CaseUtil.d.ts +18 -0
  785. package/dist/utils/CaseUtil/index.d.ts +1 -0
  786. package/dist/utils/CaseUtil/index.js +138 -0
  787. package/dist/utils/CaseUtil/index.js.map +1 -0
  788. package/dist/utils/DashboardUtil/DashboardUtil.d.ts +29 -0
  789. package/dist/utils/DashboardUtil/index.d.ts +1 -0
  790. package/dist/utils/DashboardUtil/index.js +152 -0
  791. package/dist/utils/DashboardUtil/index.js.map +1 -0
  792. package/dist/utils/DataSetUtil/DataSetUtil.d.ts +17 -0
  793. package/dist/utils/DataSetUtil/index.d.ts +1 -0
  794. package/dist/utils/DataSetUtil/index.js +43 -0
  795. package/dist/utils/DataSetUtil/index.js.map +1 -0
  796. package/dist/utils/EffectiveRightsUtil/EffectiveRightsUtil.d.ts +29 -0
  797. package/dist/utils/EffectiveRightsUtil/index.d.ts +1 -0
  798. package/dist/utils/EffectiveRightsUtil/index.js +118 -0
  799. package/dist/utils/EffectiveRightsUtil/index.js.map +1 -0
  800. package/dist/utils/EpiCurveUtil/EpiCurveUtil.d.ts +96 -0
  801. package/dist/utils/EpiCurveUtil/index.d.ts +1 -0
  802. package/dist/utils/EpiCurveUtil/index.js +2 -0
  803. package/dist/utils/FileUtil/FileUtil.d.ts +5 -0
  804. package/dist/utils/FileUtil/index.d.ts +1 -0
  805. package/dist/utils/FileUtil/index.js +15 -0
  806. package/dist/utils/FileUtil/index.js.map +1 -0
  807. package/dist/utils/FilterUtil/FilterUtil.d.ts +11 -0
  808. package/dist/utils/FilterUtil/index.d.ts +1 -0
  809. package/dist/utils/FilterUtil/index.js +2 -0
  810. package/dist/utils/FindSimilarCasesUtil/FindSimilarCasesUtil.d.ts +7 -0
  811. package/dist/utils/FindSimilarCasesUtil/index.d.ts +1 -0
  812. package/dist/utils/FindSimilarCasesUtil/index.js +2 -0
  813. package/dist/utils/HistogramUtil/HistogramUtil.d.ts +78 -0
  814. package/dist/utils/HistogramUtil/index.d.ts +1 -0
  815. package/dist/utils/HistogramUtil/index.js +145 -0
  816. package/dist/utils/HistogramUtil/index.js.map +1 -0
  817. package/dist/utils/MapUtil/MapUtil.d.ts +38 -0
  818. package/dist/utils/MapUtil/index.d.ts +1 -0
  819. package/dist/utils/MapUtil/index.js +210 -0
  820. package/dist/utils/MapUtil/index.js.map +1 -0
  821. package/dist/utils/StratificationUtil/StratificationUtil.d.ts +25 -0
  822. package/dist/utils/StratificationUtil/index.d.ts +1 -0
  823. package/dist/utils/StratificationUtil/index.js +198 -0
  824. package/dist/utils/StratificationUtil/index.js.map +1 -0
  825. package/dist/utils/TreeWidgetUtil/TreeWidgetUtil.d.ts +7 -0
  826. package/dist/utils/TreeWidgetUtil/index.d.ts +1 -0
  827. package/dist/utils/TreeWidgetUtil/index.js +35 -0
  828. package/dist/utils/TreeWidgetUtil/index.js.map +1 -0
  829. package/dist/utils/UploadUtil/UploadUtil.d.ts +106 -0
  830. package/dist/utils/UploadUtil/index.d.ts +1 -0
  831. package/dist/utils/UploadUtil/index.js +2 -0
  832. package/package.json +784 -0
@@ -0,0 +1,3796 @@
1
+ //#region ../../node_modules/.pnpm/fflate@0.8.3/node_modules/fflate/esm/browser.js
2
+ var e = {}, t = (function(t, n, r, i, a) {
3
+ var o = new Worker(e[n] || (e[n] = URL.createObjectURL(new Blob([t + ";addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})"], { type: "text/javascript" }))));
4
+ return o.onmessage = function(e) {
5
+ var t = e.data, n = t.$e$;
6
+ if (n) {
7
+ var r = Error(n[0]);
8
+ r.code = n[1], r.stack = n[2], a(r, null);
9
+ } else a(null, t);
10
+ }, o.postMessage(r, i), o;
11
+ }), n = Uint8Array, r = Uint16Array, i = Int32Array, a = new n([
12
+ 0,
13
+ 0,
14
+ 0,
15
+ 0,
16
+ 0,
17
+ 0,
18
+ 0,
19
+ 0,
20
+ 1,
21
+ 1,
22
+ 1,
23
+ 1,
24
+ 2,
25
+ 2,
26
+ 2,
27
+ 2,
28
+ 3,
29
+ 3,
30
+ 3,
31
+ 3,
32
+ 4,
33
+ 4,
34
+ 4,
35
+ 4,
36
+ 5,
37
+ 5,
38
+ 5,
39
+ 5,
40
+ 0,
41
+ 0,
42
+ 0,
43
+ 0
44
+ ]), o = new n([
45
+ 0,
46
+ 0,
47
+ 0,
48
+ 0,
49
+ 1,
50
+ 1,
51
+ 2,
52
+ 2,
53
+ 3,
54
+ 3,
55
+ 4,
56
+ 4,
57
+ 5,
58
+ 5,
59
+ 6,
60
+ 6,
61
+ 7,
62
+ 7,
63
+ 8,
64
+ 8,
65
+ 9,
66
+ 9,
67
+ 10,
68
+ 10,
69
+ 11,
70
+ 11,
71
+ 12,
72
+ 12,
73
+ 13,
74
+ 13,
75
+ 0,
76
+ 0
77
+ ]), s = new n([
78
+ 16,
79
+ 17,
80
+ 18,
81
+ 0,
82
+ 8,
83
+ 7,
84
+ 9,
85
+ 6,
86
+ 10,
87
+ 5,
88
+ 11,
89
+ 4,
90
+ 12,
91
+ 3,
92
+ 13,
93
+ 2,
94
+ 14,
95
+ 1,
96
+ 15
97
+ ]), c = function(e, t) {
98
+ for (var n = new r(31), a = 0; a < 31; ++a) n[a] = t += 1 << e[a - 1];
99
+ for (var o = new i(n[30]), a = 1; a < 30; ++a) for (var s = n[a]; s < n[a + 1]; ++s) o[s] = s - n[a] << 5 | a;
100
+ return {
101
+ b: n,
102
+ r: o
103
+ };
104
+ }, l = c(a, 2), u = l.b, d = l.r;
105
+ u[28] = 258, d[258] = 28;
106
+ for (var f = c(o, 0), p = f.b, m = f.r, h = new r(32768), g = 0; g < 32768; ++g) {
107
+ var _ = (g & 43690) >> 1 | (g & 21845) << 1;
108
+ _ = (_ & 52428) >> 2 | (_ & 13107) << 2, _ = (_ & 61680) >> 4 | (_ & 3855) << 4, h[g] = ((_ & 65280) >> 8 | (_ & 255) << 8) >> 1;
109
+ }
110
+ for (var v = (function(e, t, n) {
111
+ for (var i = e.length, a = 0, o = new r(t); a < i; ++a) e[a] && ++o[e[a] - 1];
112
+ var s = new r(t);
113
+ for (a = 1; a < t; ++a) s[a] = s[a - 1] + o[a - 1] << 1;
114
+ var c;
115
+ if (n) {
116
+ c = new r(1 << t);
117
+ var l = 15 - t;
118
+ for (a = 0; a < i; ++a) if (e[a]) for (var u = a << 4 | e[a], d = t - e[a], f = s[e[a] - 1]++ << d, p = f | (1 << d) - 1; f <= p; ++f) c[h[f] >> l] = u;
119
+ } else for (c = new r(i), a = 0; a < i; ++a) e[a] && (c[a] = h[s[e[a] - 1]++] >> 15 - e[a]);
120
+ return c;
121
+ }), y = new n(288), g = 0; g < 144; ++g) y[g] = 8;
122
+ for (var g = 144; g < 256; ++g) y[g] = 9;
123
+ for (var g = 256; g < 280; ++g) y[g] = 7;
124
+ for (var g = 280; g < 288; ++g) y[g] = 8;
125
+ for (var b = new n(32), g = 0; g < 32; ++g) b[g] = 5;
126
+ var ee = /*#__PURE__*/ v(y, 9, 0), te = /*#__PURE__*/ v(y, 9, 1), x = /*#__PURE__*/ v(b, 5, 0), S = /*#__PURE__*/ v(b, 5, 1), ne = function(e) {
127
+ for (var t = e[0], n = 1; n < e.length; ++n) e[n] > t && (t = e[n]);
128
+ return t;
129
+ }, C = function(e, t, n) {
130
+ var r = t / 8 | 0;
131
+ return (e[r] | e[r + 1] << 8) >> (t & 7) & n;
132
+ }, w = function(e, t) {
133
+ var n = t / 8 | 0;
134
+ return (e[n] | e[n + 1] << 8 | e[n + 2] << 16) >> (t & 7);
135
+ }, re = function(e) {
136
+ return (e + 7) / 8 | 0;
137
+ }, T = function(e, t, r) {
138
+ return (t == null || t < 0) && (t = 0), (r == null || r > e.length) && (r = e.length), new n(e.subarray(t, r));
139
+ }, E = [
140
+ "unexpected EOF",
141
+ "invalid block type",
142
+ "invalid length/literal",
143
+ "invalid distance",
144
+ "stream finished",
145
+ "no stream handler",
146
+ ,
147
+ "no callback",
148
+ "invalid UTF-8 data",
149
+ "extra field too long",
150
+ "date not in range 1980-2099",
151
+ "filename too long",
152
+ "stream finishing",
153
+ "invalid zip data"
154
+ ], D = function(e, t, n) {
155
+ var r = Error(t || E[e]);
156
+ if (r.code = e, Error.captureStackTrace && Error.captureStackTrace(r, D), !n) throw r;
157
+ return r;
158
+ }, O = function(e, t, r, i) {
159
+ var c = e.length, l = i ? i.length : 0;
160
+ if (!c || t.f && !t.l) return r || new n(0);
161
+ var d = !r, f = d || t.i != 2, m = t.i;
162
+ d && (r = new n(c * 3));
163
+ var h = function(e) {
164
+ var t = r.length;
165
+ if (e > t) {
166
+ var i = new n(Math.max(t * 2, e));
167
+ i.set(r), r = i;
168
+ }
169
+ }, g = t.f || 0, _ = t.p || 0, y = t.b || 0, b = t.l, ee = t.d, x = t.m, E = t.n, O = c * 8;
170
+ do {
171
+ if (!b) {
172
+ g = C(e, _, 1);
173
+ var k = C(e, _ + 1, 3);
174
+ if (_ += 3, !k) {
175
+ var A = re(_) + 4, j = e[A - 4] | e[A - 3] << 8, M = A + j;
176
+ if (M > c) {
177
+ m && D(0);
178
+ break;
179
+ }
180
+ f && h(y + j), r.set(e.subarray(A, M), y), t.b = y += j, t.p = _ = M * 8, t.f = g;
181
+ continue;
182
+ } else if (k == 1) b = te, ee = S, x = 9, E = 5;
183
+ else if (k == 2) {
184
+ var ie = C(e, _, 31) + 257, ae = C(e, _ + 10, 15) + 4, oe = ie + C(e, _ + 5, 31) + 1;
185
+ _ += 14;
186
+ for (var se = new n(oe), ce = new n(19), N = 0; N < ae; ++N) ce[s[N]] = C(e, _ + N * 3, 7);
187
+ _ += ae * 3;
188
+ for (var P = ne(ce), le = (1 << P) - 1, F = v(ce, P, 1), N = 0; N < oe;) {
189
+ var I = F[C(e, _, le)];
190
+ _ += I & 15;
191
+ var A = I >> 4;
192
+ if (A < 16) se[N++] = A;
193
+ else {
194
+ var L = 0, ue = 0;
195
+ for (A == 16 ? (ue = 3 + C(e, _, 3), _ += 2, L = se[N - 1]) : A == 17 ? (ue = 3 + C(e, _, 7), _ += 3) : A == 18 && (ue = 11 + C(e, _, 127), _ += 7); ue--;) se[N++] = L;
196
+ }
197
+ }
198
+ var R = se.subarray(0, ie), de = se.subarray(ie);
199
+ x = ne(R), E = ne(de), b = v(R, x, 1), ee = v(de, E, 1);
200
+ } else D(1);
201
+ if (_ > O) {
202
+ m && D(0);
203
+ break;
204
+ }
205
+ }
206
+ f && h(y + 131072);
207
+ for (var fe = (1 << x) - 1, pe = (1 << E) - 1, z = _;; z = _) {
208
+ var L = b[w(e, _) & fe], B = L >> 4;
209
+ if (_ += L & 15, _ > O) {
210
+ m && D(0);
211
+ break;
212
+ }
213
+ if (L || D(2), B < 256) r[y++] = B;
214
+ else if (B == 256) {
215
+ z = _, b = null;
216
+ break;
217
+ } else {
218
+ var me = B - 254;
219
+ if (B > 264) {
220
+ var N = B - 257, V = a[N];
221
+ me = C(e, _, (1 << V) - 1) + u[N], _ += V;
222
+ }
223
+ var H = ee[w(e, _) & pe], U = H >> 4;
224
+ H || D(3), _ += H & 15;
225
+ var de = p[U];
226
+ if (U > 3) {
227
+ var V = o[U];
228
+ de += w(e, _) & (1 << V) - 1, _ += V;
229
+ }
230
+ if (_ > O) {
231
+ m && D(0);
232
+ break;
233
+ }
234
+ f && h(y + 131072);
235
+ var he = y + me;
236
+ if (y < de) {
237
+ var W = l - de, ge = Math.min(de, he);
238
+ for (W + y < 0 && D(3); y < ge; ++y) r[y] = i[W + y];
239
+ }
240
+ for (; y < he; ++y) r[y] = r[y - de];
241
+ }
242
+ }
243
+ t.l = b, t.p = z, t.b = y, t.f = g, b && (g = 1, t.m = x, t.d = ee, t.n = E);
244
+ } while (!g);
245
+ return y != r.length && d ? T(r, 0, y) : r.subarray(0, y);
246
+ }, k = function(e, t, n) {
247
+ n <<= t & 7;
248
+ var r = t / 8 | 0;
249
+ e[r] |= n, e[r + 1] |= n >> 8;
250
+ }, A = function(e, t, n) {
251
+ n <<= t & 7;
252
+ var r = t / 8 | 0;
253
+ e[r] |= n, e[r + 1] |= n >> 8, e[r + 2] |= n >> 16;
254
+ }, j = function(e, t) {
255
+ for (var i = [], a = 0; a < e.length; ++a) e[a] && i.push({
256
+ s: a,
257
+ f: e[a]
258
+ });
259
+ var o = i.length, s = i.slice();
260
+ if (!o) return {
261
+ t: N,
262
+ l: 0
263
+ };
264
+ if (o == 1) {
265
+ var c = new n(i[0].s + 1);
266
+ return c[i[0].s] = 1, {
267
+ t: c,
268
+ l: 1
269
+ };
270
+ }
271
+ i.sort(function(e, t) {
272
+ return e.f - t.f;
273
+ }), i.push({
274
+ s: -1,
275
+ f: 25001
276
+ });
277
+ var l = i[0], u = i[1], d = 0, f = 1, p = 2;
278
+ for (i[0] = {
279
+ s: -1,
280
+ f: l.f + u.f,
281
+ l,
282
+ r: u
283
+ }; f != o - 1;) l = i[i[d].f < i[p].f ? d++ : p++], u = i[d != f && i[d].f < i[p].f ? d++ : p++], i[f++] = {
284
+ s: -1,
285
+ f: l.f + u.f,
286
+ l,
287
+ r: u
288
+ };
289
+ for (var m = s[0].s, a = 1; a < o; ++a) s[a].s > m && (m = s[a].s);
290
+ var h = new r(m + 1), g = M(i[f - 1], h, 0);
291
+ if (g > t) {
292
+ var a = 0, _ = 0, v = g - t, y = 1 << v;
293
+ for (s.sort(function(e, t) {
294
+ return h[t.s] - h[e.s] || e.f - t.f;
295
+ }); a < o; ++a) {
296
+ var b = s[a].s;
297
+ if (h[b] > t) _ += y - (1 << g - h[b]), h[b] = t;
298
+ else break;
299
+ }
300
+ for (_ >>= v; _ > 0;) {
301
+ var ee = s[a].s;
302
+ h[ee] < t ? _ -= 1 << t - h[ee]++ - 1 : ++a;
303
+ }
304
+ for (; a >= 0 && _; --a) {
305
+ var te = s[a].s;
306
+ h[te] == t && (--h[te], ++_);
307
+ }
308
+ g = t;
309
+ }
310
+ return {
311
+ t: new n(h),
312
+ l: g
313
+ };
314
+ }, M = function(e, t, n) {
315
+ return e.s == -1 ? Math.max(M(e.l, t, n + 1), M(e.r, t, n + 1)) : t[e.s] = n;
316
+ }, ie = function(e) {
317
+ for (var t = e.length; t && !e[--t];);
318
+ for (var n = new r(++t), i = 0, a = e[0], o = 1, s = function(e) {
319
+ n[i++] = e;
320
+ }, c = 1; c <= t; ++c) if (e[c] == a && c != t) ++o;
321
+ else {
322
+ if (!a && o > 2) {
323
+ for (; o > 138; o -= 138) s(32754);
324
+ o > 2 && (s(o > 10 ? o - 11 << 5 | 28690 : o - 3 << 5 | 12305), o = 0);
325
+ } else if (o > 3) {
326
+ for (s(a), --o; o > 6; o -= 6) s(8304);
327
+ o > 2 && (s(o - 3 << 5 | 8208), o = 0);
328
+ }
329
+ for (; o--;) s(a);
330
+ o = 1, a = e[c];
331
+ }
332
+ return {
333
+ c: n.subarray(0, i),
334
+ n: t
335
+ };
336
+ }, ae = function(e, t) {
337
+ for (var n = 0, r = 0; r < t.length; ++r) n += e[r] * t[r];
338
+ return n;
339
+ }, oe = function(e, t, n) {
340
+ var r = n.length, i = re(t + 2);
341
+ e[i] = r & 255, e[i + 1] = r >> 8, e[i + 2] = e[i] ^ 255, e[i + 3] = e[i + 1] ^ 255;
342
+ for (var a = 0; a < r; ++a) e[i + a + 4] = n[a];
343
+ return (i + 4 + r) * 8;
344
+ }, se = function(e, t, n, i, c, l, u, d, f, p, m) {
345
+ k(t, m++, n), ++c[256];
346
+ for (var h = j(c, 15), g = h.t, _ = h.l, te = j(l, 15), S = te.t, ne = te.l, C = ie(g), w = C.c, re = C.n, T = ie(S), E = T.c, D = T.n, O = new r(19), M = 0; M < w.length; ++M) ++O[w[M] & 31];
347
+ for (var M = 0; M < E.length; ++M) ++O[E[M] & 31];
348
+ for (var se = j(O, 7), ce = se.t, N = se.l, P = 19; P > 4 && !ce[s[P - 1]]; --P);
349
+ var le = p + 5 << 3, F = ae(c, y) + ae(l, b) + u, I = ae(c, g) + ae(l, S) + u + 14 + 3 * P + ae(O, ce) + 2 * O[16] + 3 * O[17] + 7 * O[18];
350
+ if (f >= 0 && le <= F && le <= I) return oe(t, m, e.subarray(f, f + p));
351
+ var L, ue, R, de;
352
+ if (k(t, m, 1 + (I < F)), m += 2, I < F) {
353
+ L = v(g, _, 0), ue = g, R = v(S, ne, 0), de = S;
354
+ var fe = v(ce, N, 0);
355
+ k(t, m, re - 257), k(t, m + 5, D - 1), k(t, m + 10, P - 4), m += 14;
356
+ for (var M = 0; M < P; ++M) k(t, m + 3 * M, ce[s[M]]);
357
+ m += 3 * P;
358
+ for (var pe = [w, E], z = 0; z < 2; ++z) for (var B = pe[z], M = 0; M < B.length; ++M) {
359
+ var me = B[M] & 31;
360
+ k(t, m, fe[me]), m += ce[me], me > 15 && (k(t, m, B[M] >> 5 & 127), m += B[M] >> 12);
361
+ }
362
+ } else L = ee, ue = y, R = x, de = b;
363
+ for (var M = 0; M < d; ++M) {
364
+ var V = i[M];
365
+ if (V > 255) {
366
+ var me = V >> 18 & 31;
367
+ A(t, m, L[me + 257]), m += ue[me + 257], me > 7 && (k(t, m, V >> 23 & 31), m += a[me]);
368
+ var H = V & 31;
369
+ A(t, m, R[H]), m += de[H], H > 3 && (A(t, m, V >> 5 & 8191), m += o[H]);
370
+ } else A(t, m, L[V]), m += ue[V];
371
+ }
372
+ return A(t, m, L[256]), m + ue[256];
373
+ }, ce = /*#__PURE__*/ new i([
374
+ 65540,
375
+ 131080,
376
+ 131088,
377
+ 131104,
378
+ 262176,
379
+ 1048704,
380
+ 1048832,
381
+ 2114560,
382
+ 2117632
383
+ ]), N = /*#__PURE__*/ new n(0), P = function(e, t, s, c, l, u) {
384
+ var f = u.z || e.length, p = new n(c + f + 5 * (1 + Math.ceil(f / 7e3)) + l), h = p.subarray(c, p.length - l), g = u.l, _ = (u.r || 0) & 7;
385
+ if (t) {
386
+ _ && (h[0] = u.r >> 3);
387
+ for (var v = ce[t - 1], y = v >> 13, b = v & 8191, ee = (1 << s) - 1, te = u.p || new r(32768), x = u.h || new r(ee + 1), S = Math.ceil(s / 3), ne = 2 * S, C = function(t) {
388
+ return (e[t] ^ e[t + 1] << S ^ e[t + 2] << ne) & ee;
389
+ }, w = new i(25e3), E = new r(288), D = new r(32), O = 0, k = 0, A = u.i || 0, j = 0, M = u.w || 0, ie = 0; A + 2 < f; ++A) {
390
+ var ae = C(A), N = A & 32767, P = x[ae];
391
+ if (te[N] = P, x[ae] = N, M <= A) {
392
+ var le = f - A;
393
+ if ((O > 7e3 || j > 24576) && (le > 423 || !g)) {
394
+ _ = se(e, h, 0, w, E, D, k, j, ie, A - ie, _), j = O = k = 0, ie = A;
395
+ for (var F = 0; F < 286; ++F) E[F] = 0;
396
+ for (var F = 0; F < 30; ++F) D[F] = 0;
397
+ }
398
+ var I = 2, L = 0, ue = b, R = N - P & 32767;
399
+ if (le > 2 && ae == C(A - R)) for (var de = Math.min(y, le) - 1, fe = Math.min(32767, A), pe = Math.min(258, le); R <= fe && --ue && N != P;) {
400
+ if (e[A + I] == e[A + I - R]) {
401
+ for (var z = 0; z < pe && e[A + z] == e[A + z - R]; ++z);
402
+ if (z > I) {
403
+ if (I = z, L = R, z > de) break;
404
+ for (var B = Math.min(R, z - 2), me = 0, F = 0; F < B; ++F) {
405
+ var V = A - R + F & 32767, H = V - te[V] & 32767;
406
+ H > me && (me = H, P = V);
407
+ }
408
+ }
409
+ }
410
+ N = P, P = te[N], R += N - P & 32767;
411
+ }
412
+ if (L) {
413
+ w[j++] = 268435456 | d[I] << 18 | m[L];
414
+ var U = d[I] & 31, he = m[L] & 31;
415
+ k += a[U] + o[he], ++E[257 + U], ++D[he], M = A + I, ++O;
416
+ } else w[j++] = e[A], ++E[e[A]];
417
+ }
418
+ }
419
+ for (A = Math.max(A, M); A < f; ++A) w[j++] = e[A], ++E[e[A]];
420
+ _ = se(e, h, g, w, E, D, k, j, ie, A - ie, _), g || (u.r = _ & 7 | h[_ / 8 | 0] << 3, _ -= 7, u.h = x, u.p = te, u.i = A, u.w = M);
421
+ } else {
422
+ for (var A = u.w || 0; A < f + g; A += 65535) {
423
+ var W = A + 65535;
424
+ W >= f && (h[_ / 8 | 0] = g, W = f), _ = oe(h, _ + 1, e.subarray(A, W));
425
+ }
426
+ u.i = f;
427
+ }
428
+ return T(p, 0, c + re(_) + l);
429
+ }, le = /*#__PURE__*/ (function() {
430
+ for (var e = /* @__PURE__ */ new Int32Array(256), t = 0; t < 256; ++t) {
431
+ for (var n = t, r = 9; --r;) n = (n & 1 && -306674912) ^ n >>> 1;
432
+ e[t] = n;
433
+ }
434
+ return e;
435
+ })(), F = function() {
436
+ var e = -1;
437
+ return {
438
+ p: function(t) {
439
+ for (var n = e, r = 0; r < t.length; ++r) n = le[n & 255 ^ t[r]] ^ n >>> 8;
440
+ e = n;
441
+ },
442
+ d: function() {
443
+ return ~e;
444
+ }
445
+ };
446
+ }, I = function(e, t, r, i, a) {
447
+ if (!a && (a = { l: 1 }, t.dictionary)) {
448
+ var o = t.dictionary.subarray(-32768), s = new n(o.length + e.length);
449
+ s.set(o), s.set(e, o.length), e = s, a.w = o.length;
450
+ }
451
+ return P(e, t.level == null ? 6 : t.level, t.mem == null ? a.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20 : 12 + t.mem, r, i, a);
452
+ }, L = function(e, t) {
453
+ var n = {};
454
+ for (var r in e) n[r] = e[r];
455
+ for (var r in t) n[r] = t[r];
456
+ return n;
457
+ }, ue = function(e, t, n) {
458
+ for (var r = e(), i = e.toString(), a = i.slice(i.indexOf("[") + 1, i.lastIndexOf("]")).replace(/\s+/g, "").split(","), o = 0; o < r.length; ++o) {
459
+ var s = r[o], c = a[o];
460
+ if (typeof s == "function") {
461
+ t += ";" + c + "=";
462
+ var l = s.toString();
463
+ if (s.prototype) if (l.indexOf("[native code]") != -1) {
464
+ var u = l.indexOf(" ", 8) + 1;
465
+ t += l.slice(u, l.indexOf("(", u));
466
+ } else for (var d in t += l, s.prototype) t += ";" + c + ".prototype." + d + "=" + s.prototype[d].toString();
467
+ else t += l;
468
+ } else n[c] = s;
469
+ }
470
+ return t;
471
+ }, R = [], de = function(e) {
472
+ var t = [];
473
+ for (var n in e) e[n].buffer && t.push((e[n] = new e[n].constructor(e[n])).buffer);
474
+ return t;
475
+ }, fe = function(e, n, r, i) {
476
+ if (!R[r]) {
477
+ for (var a = "", o = {}, s = e.length - 1, c = 0; c < s; ++c) a = ue(e[c], a, o);
478
+ R[r] = {
479
+ c: ue(e[s], a, o),
480
+ e: o
481
+ };
482
+ }
483
+ var l = L({}, R[r].e);
484
+ return t(R[r].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + n.toString() + "}", r, l, de(l), i);
485
+ }, pe = function() {
486
+ return [
487
+ n,
488
+ r,
489
+ i,
490
+ a,
491
+ o,
492
+ s,
493
+ u,
494
+ p,
495
+ te,
496
+ S,
497
+ h,
498
+ E,
499
+ v,
500
+ ne,
501
+ C,
502
+ w,
503
+ re,
504
+ T,
505
+ D,
506
+ O,
507
+ ye,
508
+ B,
509
+ me
510
+ ];
511
+ }, z = function() {
512
+ return [
513
+ n,
514
+ r,
515
+ i,
516
+ a,
517
+ o,
518
+ s,
519
+ d,
520
+ m,
521
+ ee,
522
+ y,
523
+ x,
524
+ b,
525
+ h,
526
+ ce,
527
+ N,
528
+ v,
529
+ k,
530
+ A,
531
+ j,
532
+ M,
533
+ ie,
534
+ ae,
535
+ oe,
536
+ se,
537
+ re,
538
+ T,
539
+ P,
540
+ I,
541
+ _e,
542
+ B
543
+ ];
544
+ }, B = function(e) {
545
+ return postMessage(e, [e.buffer]);
546
+ }, me = function(e) {
547
+ return e && {
548
+ out: e.size && new n(e.size),
549
+ dictionary: e.dictionary
550
+ };
551
+ }, V = function(e, t, n, r, i, a) {
552
+ var o = fe(n, r, i, function(e, t) {
553
+ o.terminate(), a(e, t);
554
+ });
555
+ return o.postMessage([e, t], t.consume ? [e.buffer] : []), function() {
556
+ o.terminate();
557
+ };
558
+ }, H = function(e, t) {
559
+ return e[t] | e[t + 1] << 8;
560
+ }, U = function(e, t) {
561
+ return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0;
562
+ }, he = function(e, t) {
563
+ return U(e, t) + U(e, t + 4) * 4294967296;
564
+ }, W = function(e, t, n) {
565
+ for (; n; ++t) e[t] = n, n >>>= 8;
566
+ };
567
+ function ge(e, t, n) {
568
+ return n || (n = t, t = {}), typeof n != "function" && D(7), V(e, t, [z], function(e) {
569
+ return B(_e(e.data[0], e.data[1]));
570
+ }, 0, n);
571
+ }
572
+ function _e(e, t) {
573
+ return I(e, t || {}, 0, 0);
574
+ }
575
+ function ve(e, t, n) {
576
+ return n || (n = t, t = {}), typeof n != "function" && D(7), V(e, t, [pe], function(e) {
577
+ return B(ye(e.data[0], me(e.data[1])));
578
+ }, 1, n);
579
+ }
580
+ function ye(e, t) {
581
+ return O(e, { i: 2 }, t && t.out, t && t.dictionary);
582
+ }
583
+ var be = function(e, t, r, i) {
584
+ for (var a in e) {
585
+ var o = e[a], s = t + a, c = i;
586
+ Array.isArray(o) && (c = L(i, o[1]), o = o[0]), ArrayBuffer.isView(o) ? r[s] = [o, c] : (r[s += "/"] = [new n(0), c], be(o, s, r, i));
587
+ }
588
+ }, xe = typeof TextEncoder < "u" && /*#__PURE__*/ new TextEncoder(), Se = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
589
+ try {
590
+ Se.decode(N, { stream: !0 });
591
+ } catch {}
592
+ var Ce = function(e) {
593
+ for (var t = "", n = 0;;) {
594
+ var r = e[n++], i = (r > 127) + (r > 223) + (r > 239);
595
+ if (n + i > e.length) return {
596
+ s: t,
597
+ r: T(e, n - 1)
598
+ };
599
+ i ? i == 3 ? (r = ((r & 15) << 18 | (e[n++] & 63) << 12 | (e[n++] & 63) << 6 | e[n++] & 63) - 65536, t += String.fromCharCode(55296 | r >> 10, 56320 | r & 1023)) : i & 1 ? t += String.fromCharCode((r & 31) << 6 | e[n++] & 63) : t += String.fromCharCode((r & 15) << 12 | (e[n++] & 63) << 6 | e[n++] & 63) : t += String.fromCharCode(r);
600
+ }
601
+ };
602
+ function we(e, t) {
603
+ if (t) {
604
+ for (var r = new n(e.length), i = 0; i < e.length; ++i) r[i] = e.charCodeAt(i);
605
+ return r;
606
+ }
607
+ if (xe) return xe.encode(e);
608
+ for (var a = e.length, o = new n(e.length + (e.length >> 1)), s = 0, c = function(e) {
609
+ o[s++] = e;
610
+ }, i = 0; i < a; ++i) {
611
+ if (s + 5 > o.length) {
612
+ var l = new n(s + 8 + (a - i << 1));
613
+ l.set(o), o = l;
614
+ }
615
+ var u = e.charCodeAt(i);
616
+ u < 128 || t ? c(u) : u < 2048 ? (c(192 | u >> 6), c(128 | u & 63)) : u > 55295 && u < 57344 ? (u = 65536 + (u & 1047552) | e.charCodeAt(++i) & 1023, c(240 | u >> 18), c(128 | u >> 12 & 63), c(128 | u >> 6 & 63), c(128 | u & 63)) : (c(224 | u >> 12), c(128 | u >> 6 & 63), c(128 | u & 63));
617
+ }
618
+ return T(o, 0, s);
619
+ }
620
+ function Te(e, t) {
621
+ if (t) {
622
+ for (var n = "", r = 0; r < e.length; r += 16384) n += String.fromCharCode.apply(null, e.subarray(r, r + 16384));
623
+ return n;
624
+ } else if (Se) return Se.decode(e);
625
+ else {
626
+ var i = Ce(e), a = i.s, n = i.r;
627
+ return n.length && D(8), a;
628
+ }
629
+ }
630
+ var Ee = function(e, t) {
631
+ return t + 30 + H(e, t + 26) + H(e, t + 28);
632
+ }, De = function(e, t, n) {
633
+ var r = H(e, t + 28), i = H(e, t + 30), a = Te(e.subarray(t + 46, t + 46 + r), !(H(e, t + 8) & 2048)), o = t + 46 + r, s = Oe(e, o, i, n, U(e, t + 20), U(e, t + 24), U(e, t + 42)), c = s[0], l = s[1], u = s[2];
634
+ return [
635
+ H(e, t + 10),
636
+ c,
637
+ l,
638
+ a,
639
+ o + i + H(e, t + 32),
640
+ u
641
+ ];
642
+ }, Oe = function(e, t, n, r, i, a, o) {
643
+ var s = i == 4294967295, c = a == 4294967295, l = o == 4294967295, u = t + n, d = s + c + l;
644
+ if (r && d) {
645
+ for (; t + 4 < u; t += 4 + H(e, t + 2)) if (H(e, t) == 1) return [
646
+ s ? he(e, t + 4 + 8 * c) : i,
647
+ c ? he(e, t + 4) : a,
648
+ l ? he(e, t + 4 + 8 * (c + s)) : o,
649
+ 1
650
+ ];
651
+ r < 2 && D(13);
652
+ }
653
+ return [
654
+ i,
655
+ a,
656
+ o,
657
+ 0
658
+ ];
659
+ }, ke = function(e) {
660
+ var t = 0;
661
+ if (e) for (var n in e) {
662
+ var r = e[n].length;
663
+ r > 65535 && D(9), t += r + 4;
664
+ }
665
+ return t;
666
+ }, Ae = function(e, t, n, r, i, a, o, s) {
667
+ var c = r.length, l = n.extra, u = s && s.length, d = ke(l);
668
+ W(e, t, o == null ? 67324752 : 33639248), t += 4, o != null && (e[t++] = 20, e[t++] = n.os), e[t] = 20, t += 2, e[t++] = n.flag << 1 | (a < 0 && 8), e[t++] = i && 8, e[t++] = n.compression & 255, e[t++] = n.compression >> 8;
669
+ var f = new Date(n.mtime == null ? Date.now() : n.mtime), p = f.getFullYear() - 1980;
670
+ if ((p < 0 || p > 119) && D(10), W(e, t, p << 25 | f.getMonth() + 1 << 21 | f.getDate() << 16 | f.getHours() << 11 | f.getMinutes() << 5 | f.getSeconds() >> 1), t += 4, a != -1 && (W(e, t, n.crc), W(e, t + 4, a < 0 ? -a - 2 : a), W(e, t + 8, n.size)), W(e, t + 12, c), W(e, t + 14, d), t += 16, o != null && (W(e, t, u), W(e, t + 6, n.attrs), W(e, t + 10, o), t += 14), e.set(r, t), t += c, d) for (var m in l) {
671
+ var h = l[m], g = h.length;
672
+ W(e, t, +m), W(e, t + 2, g), e.set(h, t + 4), t += 4 + g;
673
+ }
674
+ return u && (e.set(s, t), t += u), t;
675
+ }, je = function(e, t, n, r, i) {
676
+ W(e, t, 101010256), W(e, t + 8, n), W(e, t + 10, n), W(e, t + 12, r), W(e, t + 16, i);
677
+ };
678
+ function Me(e, t, r) {
679
+ r || (r = t, t = {}), typeof r != "function" && D(7);
680
+ var i = {};
681
+ be(e, "", i, t);
682
+ var a = Object.keys(i), o = a.length, s = 0, c = 0, l = o, u = Array(o), d = [], f = function() {
683
+ for (var e = 0; e < d.length; ++e) d[e]();
684
+ }, p = function(e, t) {
685
+ Ne(function() {
686
+ r(e, t);
687
+ });
688
+ };
689
+ Ne(function() {
690
+ p = r;
691
+ });
692
+ var m = function() {
693
+ var e = new n(c + 22), t = s, r = c - s;
694
+ c = 0;
695
+ for (var i = 0; i < l; ++i) {
696
+ var a = u[i];
697
+ try {
698
+ var o = a.c.length;
699
+ Ae(e, c, a, a.f, a.u, o);
700
+ var d = 30 + a.f.length + ke(a.extra), f = c + d;
701
+ e.set(a.c, f), Ae(e, s, a, a.f, a.u, o, c, a.m), s += 16 + d + (a.m ? a.m.length : 0), c = f + o;
702
+ } catch (e) {
703
+ return p(e, null);
704
+ }
705
+ }
706
+ je(e, s, u.length, r, t), p(null, e);
707
+ };
708
+ o || m();
709
+ for (var h = function(e) {
710
+ var t = a[e], n = i[t], r = n[0], l = n[1], h = F(), g = r.length;
711
+ h.p(r);
712
+ var _ = we(t), v = _.length, y = l.comment, b = y && we(y), ee = b && b.length, te = ke(l.extra), x = l.level == 0 ? 0 : 8, S = function(n, r) {
713
+ if (n) f(), p(n, null);
714
+ else {
715
+ var i = r.length;
716
+ u[e] = L(l, {
717
+ size: g,
718
+ crc: h.d(),
719
+ c: r,
720
+ f: _,
721
+ m: b,
722
+ u: v != t.length || b && y.length != ee,
723
+ compression: x
724
+ }), s += 30 + v + te + i, c += 76 + 2 * (v + te) + (ee || 0) + i, --o || m();
725
+ }
726
+ };
727
+ if (v > 65535 && S(D(11, 0, 1), null), !x) S(null, r);
728
+ else if (g < 16e4) try {
729
+ S(null, _e(r, l));
730
+ } catch (e) {
731
+ S(e, null);
732
+ }
733
+ else d.push(ge(r, l, S));
734
+ }, g = 0; g < l; ++g) h(g);
735
+ return f;
736
+ }
737
+ var Ne = typeof queueMicrotask == "function" ? queueMicrotask : typeof setTimeout == "function" ? setTimeout : function(e) {
738
+ e();
739
+ };
740
+ function Pe(e, t, r) {
741
+ r || (r = t, t = {}), typeof r != "function" && D(7);
742
+ var i = [], a = function() {
743
+ for (var e = 0; e < i.length; ++e) i[e]();
744
+ }, o = {}, s = function(e, t) {
745
+ Ne(function() {
746
+ r(e, t);
747
+ });
748
+ };
749
+ Ne(function() {
750
+ s = r;
751
+ });
752
+ for (var c = e.length - 22; U(e, c) != 101010256; --c) if (!c || e.length - c > 65558) return s(D(13, 0, 1), null), a;
753
+ var l = H(e, c + 8);
754
+ if (l) {
755
+ var u = l, d = U(e, c + 16), f = U(e, c - 20) == 117853008;
756
+ if (f) {
757
+ var p = U(e, c - 12);
758
+ f = U(e, p) == 101075792, f && (u = l = U(e, p + 32), d = U(e, p + 48));
759
+ }
760
+ for (var m = t && t.filter, h = function(t) {
761
+ var r = De(e, d, f), c = r[0], u = r[1], p = r[2], h = r[3], g = r[4], _ = r[5], v = Ee(e, _);
762
+ d = g;
763
+ var y = function(e, t) {
764
+ e ? (a(), s(e, null)) : (t && (o[h] = t), --l || s(null, o));
765
+ };
766
+ if (!m || m({
767
+ name: h,
768
+ size: u,
769
+ originalSize: p,
770
+ compression: c
771
+ })) if (!c) y(null, T(e, v, v + u));
772
+ else if (c == 8) {
773
+ var b = e.subarray(v, v + u);
774
+ if (p < 524288 || u > .8 * p) try {
775
+ y(null, ye(b, { out: new n(p) }));
776
+ } catch (e) {
777
+ y(e, null);
778
+ }
779
+ else i.push(ve(b, { size: p }, y));
780
+ } else y(D(14, "unknown compression type " + c, 1), null);
781
+ else y(null, null);
782
+ }, g = 0; g < u; ++g) h(g);
783
+ } else s(null, {});
784
+ return a;
785
+ }
786
+ //#endregion
787
+ //#region ../../node_modules/.pnpm/csv@6.6.1/node_modules/csv/dist/esm/sync.js
788
+ var Fe = typeof global < "u" ? global : typeof self < "u" ? self : typeof window < "u" ? window : {}, Ie = [], Le = [], Re = typeof Uint8Array < "u" ? Uint8Array : Array, ze = !1;
789
+ function Be() {
790
+ ze = !0;
791
+ for (var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", t = 0, n = e.length; t < n; ++t) Ie[t] = e[t], Le[e.charCodeAt(t)] = t;
792
+ Le[45] = 62, Le[95] = 63;
793
+ }
794
+ function Ve(e) {
795
+ ze || Be();
796
+ var t, n, r, i, a, o, s = e.length;
797
+ if (s % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
798
+ a = e[s - 2] === "=" ? 2 : +(e[s - 1] === "="), o = new Re(s * 3 / 4 - a), r = a > 0 ? s - 4 : s;
799
+ var c = 0;
800
+ for (t = 0, n = 0; t < r; t += 4, n += 3) i = Le[e.charCodeAt(t)] << 18 | Le[e.charCodeAt(t + 1)] << 12 | Le[e.charCodeAt(t + 2)] << 6 | Le[e.charCodeAt(t + 3)], o[c++] = i >> 16 & 255, o[c++] = i >> 8 & 255, o[c++] = i & 255;
801
+ return a === 2 ? (i = Le[e.charCodeAt(t)] << 2 | Le[e.charCodeAt(t + 1)] >> 4, o[c++] = i & 255) : a === 1 && (i = Le[e.charCodeAt(t)] << 10 | Le[e.charCodeAt(t + 1)] << 4 | Le[e.charCodeAt(t + 2)] >> 2, o[c++] = i >> 8 & 255, o[c++] = i & 255), o;
802
+ }
803
+ function He(e) {
804
+ return Ie[e >> 18 & 63] + Ie[e >> 12 & 63] + Ie[e >> 6 & 63] + Ie[e & 63];
805
+ }
806
+ function Ue(e, t, n) {
807
+ for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16) + (e[a + 1] << 8) + e[a + 2], i.push(He(r));
808
+ return i.join("");
809
+ }
810
+ function We(e) {
811
+ ze || Be();
812
+ for (var t, n = e.length, r = n % 3, i = "", a = [], o = 16383, s = 0, c = n - r; s < c; s += o) a.push(Ue(e, s, s + o > c ? c : s + o));
813
+ return r === 1 ? (t = e[n - 1], i += Ie[t >> 2], i += Ie[t << 4 & 63], i += "==") : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i += Ie[t >> 10], i += Ie[t >> 4 & 63], i += Ie[t << 2 & 63], i += "="), a.push(i), a.join("");
814
+ }
815
+ function Ge(e, t, n, r, i) {
816
+ var a, o, s = i * 8 - r - 1, c = (1 << s) - 1, l = c >> 1, u = -7, d = n ? i - 1 : 0, f = n ? -1 : 1, p = e[t + d];
817
+ for (d += f, a = p & (1 << -u) - 1, p >>= -u, u += s; u > 0; a = a * 256 + e[t + d], d += f, u -= 8);
818
+ for (o = a & (1 << -u) - 1, a >>= -u, u += r; u > 0; o = o * 256 + e[t + d], d += f, u -= 8);
819
+ if (a === 0) a = 1 - l;
820
+ else if (a === c) return o ? NaN : (p ? -1 : 1) * Infinity;
821
+ else o += 2 ** r, a -= l;
822
+ return (p ? -1 : 1) * o * 2 ** (a - r);
823
+ }
824
+ function Ke(e, t, n, r, i, a) {
825
+ var o, s, c, l = a * 8 - i - 1, u = (1 << l) - 1, d = u >> 1, f = i === 23 ? 2 ** -24 - 2 ** -77 : 0, p = r ? 0 : a - 1, m = r ? 1 : -1, h = +(t < 0 || t === 0 && 1 / t < 0);
826
+ for (t = Math.abs(t), isNaN(t) || t === Infinity ? (s = +!!isNaN(t), o = u) : (o = Math.floor(Math.log(t) / Math.LN2), t * (c = 2 ** -o) < 1 && (o--, c *= 2), o + d >= 1 ? t += f / c : t += f * 2 ** (1 - d), t * c >= 2 && (o++, c /= 2), o + d >= u ? (s = 0, o = u) : o + d >= 1 ? (s = (t * c - 1) * 2 ** i, o += d) : (s = t * 2 ** (d - 1) * 2 ** i, o = 0)); i >= 8; e[n + p] = s & 255, p += m, s /= 256, i -= 8);
827
+ for (o = o << i | s, l += i; l > 0; e[n + p] = o & 255, p += m, o /= 256, l -= 8);
828
+ e[n + p - m] |= h * 128;
829
+ }
830
+ var qe = {}.toString, Je = Array.isArray || function(e) {
831
+ return qe.call(e) == "[object Array]";
832
+ }, Ye = 50;
833
+ G.TYPED_ARRAY_SUPPORT = Fe.TYPED_ARRAY_SUPPORT === void 0 ? !0 : Fe.TYPED_ARRAY_SUPPORT, Xe();
834
+ function Xe() {
835
+ return G.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
836
+ }
837
+ function Ze(e, t) {
838
+ if (Xe() < t) throw RangeError("Invalid typed array length");
839
+ return G.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t), e.__proto__ = G.prototype) : (e === null && (e = new G(t)), e.length = t), e;
840
+ }
841
+ function G(e, t, n) {
842
+ if (!G.TYPED_ARRAY_SUPPORT && !(this instanceof G)) return new G(e, t, n);
843
+ if (typeof e == "number") {
844
+ if (typeof t == "string") throw Error("If encoding is specified then the first argument must be a string");
845
+ return tt(this, e);
846
+ }
847
+ return Qe(this, e, t, n);
848
+ }
849
+ G.poolSize = 8192, G._augment = function(e) {
850
+ return e.__proto__ = G.prototype, e;
851
+ };
852
+ function Qe(e, t, n, r) {
853
+ if (typeof t == "number") throw TypeError("\"value\" argument must not be a number");
854
+ return typeof ArrayBuffer < "u" && t instanceof ArrayBuffer ? it(e, t, n, r) : typeof t == "string" ? nt(e, t, n) : at(e, t);
855
+ }
856
+ G.from = function(e, t, n) {
857
+ return Qe(null, e, t, n);
858
+ }, G.TYPED_ARRAY_SUPPORT && (G.prototype.__proto__ = Uint8Array.prototype, G.__proto__ = Uint8Array, typeof Symbol < "u" && Symbol.species && G[Symbol.species]);
859
+ function $e(e) {
860
+ if (typeof e != "number") throw TypeError("\"size\" argument must be a number");
861
+ if (e < 0) throw RangeError("\"size\" argument must not be negative");
862
+ }
863
+ function et(e, t, n, r) {
864
+ return $e(t), t <= 0 || n === void 0 ? Ze(e, t) : typeof r == "string" ? Ze(e, t).fill(n, r) : Ze(e, t).fill(n);
865
+ }
866
+ G.alloc = function(e, t, n) {
867
+ return et(null, e, t, n);
868
+ };
869
+ function tt(e, t) {
870
+ if ($e(t), e = Ze(e, t < 0 ? 0 : ot(t) | 0), !G.TYPED_ARRAY_SUPPORT) for (var n = 0; n < t; ++n) e[n] = 0;
871
+ return e;
872
+ }
873
+ G.allocUnsafe = function(e) {
874
+ return tt(null, e);
875
+ }, G.allocUnsafeSlow = function(e) {
876
+ return tt(null, e);
877
+ };
878
+ function nt(e, t, n) {
879
+ if ((typeof n != "string" || n === "") && (n = "utf8"), !G.isEncoding(n)) throw TypeError("\"encoding\" must be a valid string encoding");
880
+ var r = ct(t, n) | 0;
881
+ e = Ze(e, r);
882
+ var i = e.write(t, n);
883
+ return i !== r && (e = e.slice(0, i)), e;
884
+ }
885
+ function rt(e, t) {
886
+ var n = t.length < 0 ? 0 : ot(t.length) | 0;
887
+ e = Ze(e, n);
888
+ for (var r = 0; r < n; r += 1) e[r] = t[r] & 255;
889
+ return e;
890
+ }
891
+ function it(e, t, n, r) {
892
+ if (t.byteLength, n < 0 || t.byteLength < n) throw RangeError("'offset' is out of bounds");
893
+ if (t.byteLength < n + (r || 0)) throw RangeError("'length' is out of bounds");
894
+ return t = n === void 0 && r === void 0 ? new Uint8Array(t) : r === void 0 ? new Uint8Array(t, n) : new Uint8Array(t, n, r), G.TYPED_ARRAY_SUPPORT ? (e = t, e.__proto__ = G.prototype) : e = rt(e, t), e;
895
+ }
896
+ function at(e, t) {
897
+ if (st(t)) {
898
+ var n = ot(t.length) | 0;
899
+ return e = Ze(e, n), e.length === 0 || t.copy(e, 0, 0, n), e;
900
+ }
901
+ if (t) {
902
+ if (typeof ArrayBuffer < "u" && t.buffer instanceof ArrayBuffer || "length" in t) return typeof t.length != "number" || Vt(t.length) ? Ze(e, 0) : rt(e, t);
903
+ if (t.type === "Buffer" && Je(t.data)) return rt(e, t.data);
904
+ }
905
+ throw TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
906
+ }
907
+ function ot(e) {
908
+ if (e >= Xe()) throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + Xe().toString(16) + " bytes");
909
+ return e | 0;
910
+ }
911
+ G.isBuffer = J;
912
+ function st(e) {
913
+ return !!(e != null && e._isBuffer);
914
+ }
915
+ G.compare = function(e, t) {
916
+ if (!st(e) || !st(t)) throw TypeError("Arguments must be Buffers");
917
+ if (e === t) return 0;
918
+ for (var n = e.length, r = t.length, i = 0, a = Math.min(n, r); i < a; ++i) if (e[i] !== t[i]) {
919
+ n = e[i], r = t[i];
920
+ break;
921
+ }
922
+ return n < r ? -1 : +(r < n);
923
+ }, G.isEncoding = function(e) {
924
+ switch (String(e).toLowerCase()) {
925
+ case "hex":
926
+ case "utf8":
927
+ case "utf-8":
928
+ case "ascii":
929
+ case "latin1":
930
+ case "binary":
931
+ case "base64":
932
+ case "ucs2":
933
+ case "ucs-2":
934
+ case "utf16le":
935
+ case "utf-16le": return !0;
936
+ default: return !1;
937
+ }
938
+ }, G.concat = function(e, t) {
939
+ if (!Je(e)) throw TypeError("\"list\" argument must be an Array of Buffers");
940
+ if (e.length === 0) return G.alloc(0);
941
+ var n;
942
+ if (t === void 0) for (t = 0, n = 0; n < e.length; ++n) t += e[n].length;
943
+ var r = G.allocUnsafe(t), i = 0;
944
+ for (n = 0; n < e.length; ++n) {
945
+ var a = e[n];
946
+ if (!st(a)) throw TypeError("\"list\" argument must be an Array of Buffers");
947
+ a.copy(r, i), i += a.length;
948
+ }
949
+ return r;
950
+ };
951
+ function ct(e, t) {
952
+ if (st(e)) return e.length;
953
+ if (typeof ArrayBuffer < "u" && typeof ArrayBuffer.isView == "function" && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e.byteLength;
954
+ typeof e != "string" && (e = "" + e);
955
+ var n = e.length;
956
+ if (n === 0) return 0;
957
+ for (var r = !1;;) switch (t) {
958
+ case "ascii":
959
+ case "latin1":
960
+ case "binary": return n;
961
+ case "utf8":
962
+ case "utf-8":
963
+ case void 0: return It(e).length;
964
+ case "ucs2":
965
+ case "ucs-2":
966
+ case "utf16le":
967
+ case "utf-16le": return n * 2;
968
+ case "hex": return n >>> 1;
969
+ case "base64": return zt(e).length;
970
+ default:
971
+ if (r) return It(e).length;
972
+ t = ("" + t).toLowerCase(), r = !0;
973
+ }
974
+ }
975
+ G.byteLength = ct;
976
+ function lt(e, t, n) {
977
+ var r = !1;
978
+ if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((n === void 0 || n > this.length) && (n = this.length), n <= 0) || (n >>>= 0, t >>>= 0, n <= t)) return "";
979
+ for (e ||= "utf8";;) switch (e) {
980
+ case "hex": return Tt(this, t, n);
981
+ case "utf8":
982
+ case "utf-8": return bt(this, t, n);
983
+ case "ascii": return Ct(this, t, n);
984
+ case "latin1":
985
+ case "binary": return wt(this, t, n);
986
+ case "base64": return yt(this, t, n);
987
+ case "ucs2":
988
+ case "ucs-2":
989
+ case "utf16le":
990
+ case "utf-16le": return Et(this, t, n);
991
+ default:
992
+ if (r) throw TypeError("Unknown encoding: " + e);
993
+ e = (e + "").toLowerCase(), r = !0;
994
+ }
995
+ }
996
+ G.prototype._isBuffer = !0;
997
+ function ut(e, t, n) {
998
+ var r = e[t];
999
+ e[t] = e[n], e[n] = r;
1000
+ }
1001
+ G.prototype.swap16 = function() {
1002
+ var e = this.length;
1003
+ if (e % 2 != 0) throw RangeError("Buffer size must be a multiple of 16-bits");
1004
+ for (var t = 0; t < e; t += 2) ut(this, t, t + 1);
1005
+ return this;
1006
+ }, G.prototype.swap32 = function() {
1007
+ var e = this.length;
1008
+ if (e % 4 != 0) throw RangeError("Buffer size must be a multiple of 32-bits");
1009
+ for (var t = 0; t < e; t += 4) ut(this, t, t + 3), ut(this, t + 1, t + 2);
1010
+ return this;
1011
+ }, G.prototype.swap64 = function() {
1012
+ var e = this.length;
1013
+ if (e % 8 != 0) throw RangeError("Buffer size must be a multiple of 64-bits");
1014
+ for (var t = 0; t < e; t += 8) ut(this, t, t + 7), ut(this, t + 1, t + 6), ut(this, t + 2, t + 5), ut(this, t + 3, t + 4);
1015
+ return this;
1016
+ }, G.prototype.toString = function() {
1017
+ var e = this.length | 0;
1018
+ return e === 0 ? "" : arguments.length === 0 ? bt(this, 0, e) : lt.apply(this, arguments);
1019
+ }, G.prototype.equals = function(e) {
1020
+ if (!st(e)) throw TypeError("Argument must be a Buffer");
1021
+ return this === e ? !0 : G.compare(this, e) === 0;
1022
+ }, G.prototype.inspect = function() {
1023
+ var e = "", t = Ye;
1024
+ return this.length > 0 && (e = this.toString("hex", 0, t).match(/.{2}/g).join(" "), this.length > t && (e += " ... ")), "<Buffer " + e + ">";
1025
+ }, G.prototype.compare = function(e, t, n, r, i) {
1026
+ if (!st(e)) throw TypeError("Argument must be a Buffer");
1027
+ if (t === void 0 && (t = 0), n === void 0 && (n = e ? e.length : 0), r === void 0 && (r = 0), i === void 0 && (i = this.length), t < 0 || n > e.length || r < 0 || i > this.length) throw RangeError("out of range index");
1028
+ if (r >= i && t >= n) return 0;
1029
+ if (r >= i) return -1;
1030
+ if (t >= n) return 1;
1031
+ if (t >>>= 0, n >>>= 0, r >>>= 0, i >>>= 0, this === e) return 0;
1032
+ for (var a = i - r, o = n - t, s = Math.min(a, o), c = this.slice(r, i), l = e.slice(t, n), u = 0; u < s; ++u) if (c[u] !== l[u]) {
1033
+ a = c[u], o = l[u];
1034
+ break;
1035
+ }
1036
+ return a < o ? -1 : +(o < a);
1037
+ };
1038
+ function dt(e, t, n, r, i) {
1039
+ if (e.length === 0) return -1;
1040
+ if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (n = i ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
1041
+ if (i) return -1;
1042
+ n = e.length - 1;
1043
+ } else if (n < 0) if (i) n = 0;
1044
+ else return -1;
1045
+ if (typeof t == "string" && (t = G.from(t, r)), st(t)) return t.length === 0 ? -1 : ft(e, t, n, r, i);
1046
+ if (typeof t == "number") return t &= 255, G.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf == "function" ? i ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : ft(e, [t], n, r, i);
1047
+ throw TypeError("val must be string, number or Buffer");
1048
+ }
1049
+ function ft(e, t, n, r, i) {
1050
+ var a = 1, o = e.length, s = t.length;
1051
+ if (r !== void 0 && (r = String(r).toLowerCase(), r === "ucs2" || r === "ucs-2" || r === "utf16le" || r === "utf-16le")) {
1052
+ if (e.length < 2 || t.length < 2) return -1;
1053
+ a = 2, o /= 2, s /= 2, n /= 2;
1054
+ }
1055
+ function c(e, t) {
1056
+ return a === 1 ? e[t] : e.readUInt16BE(t * a);
1057
+ }
1058
+ var l;
1059
+ if (i) {
1060
+ var u = -1;
1061
+ for (l = n; l < o; l++) if (c(e, l) === c(t, u === -1 ? 0 : l - u)) {
1062
+ if (u === -1 && (u = l), l - u + 1 === s) return u * a;
1063
+ } else u !== -1 && (l -= l - u), u = -1;
1064
+ } else for (n + s > o && (n = o - s), l = n; l >= 0; l--) {
1065
+ for (var d = !0, f = 0; f < s; f++) if (c(e, l + f) !== c(t, f)) {
1066
+ d = !1;
1067
+ break;
1068
+ }
1069
+ if (d) return l;
1070
+ }
1071
+ return -1;
1072
+ }
1073
+ G.prototype.includes = function(e, t, n) {
1074
+ return this.indexOf(e, t, n) !== -1;
1075
+ }, G.prototype.indexOf = function(e, t, n) {
1076
+ return dt(this, e, t, n, !0);
1077
+ }, G.prototype.lastIndexOf = function(e, t, n) {
1078
+ return dt(this, e, t, n, !1);
1079
+ };
1080
+ function pt(e, t, n, r) {
1081
+ n = Number(n) || 0;
1082
+ var i = e.length - n;
1083
+ r ? (r = Number(r), r > i && (r = i)) : r = i;
1084
+ var a = t.length;
1085
+ if (a % 2 != 0) throw TypeError("Invalid hex string");
1086
+ r > a / 2 && (r = a / 2);
1087
+ for (var o = 0; o < r; ++o) {
1088
+ var s = parseInt(t.substr(o * 2, 2), 16);
1089
+ if (isNaN(s)) return o;
1090
+ e[n + o] = s;
1091
+ }
1092
+ return o;
1093
+ }
1094
+ function mt(e, t, n, r) {
1095
+ return Bt(It(t, e.length - n), e, n, r);
1096
+ }
1097
+ function ht(e, t, n, r) {
1098
+ return Bt(Lt(t), e, n, r);
1099
+ }
1100
+ function gt(e, t, n, r) {
1101
+ return ht(e, t, n, r);
1102
+ }
1103
+ function _t(e, t, n, r) {
1104
+ return Bt(zt(t), e, n, r);
1105
+ }
1106
+ function vt(e, t, n, r) {
1107
+ return Bt(Rt(t, e.length - n), e, n, r);
1108
+ }
1109
+ G.prototype.write = function(e, t, n, r) {
1110
+ if (t === void 0) r = "utf8", n = this.length, t = 0;
1111
+ else if (n === void 0 && typeof t == "string") r = t, n = this.length, t = 0;
1112
+ else if (isFinite(t)) t |= 0, isFinite(n) ? (n |= 0, r === void 0 && (r = "utf8")) : (r = n, n = void 0);
1113
+ else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
1114
+ var i = this.length - t;
1115
+ if ((n === void 0 || n > i) && (n = i), e.length > 0 && (n < 0 || t < 0) || t > this.length) throw RangeError("Attempt to write outside buffer bounds");
1116
+ r ||= "utf8";
1117
+ for (var a = !1;;) switch (r) {
1118
+ case "hex": return pt(this, e, t, n);
1119
+ case "utf8":
1120
+ case "utf-8": return mt(this, e, t, n);
1121
+ case "ascii": return ht(this, e, t, n);
1122
+ case "latin1":
1123
+ case "binary": return gt(this, e, t, n);
1124
+ case "base64": return _t(this, e, t, n);
1125
+ case "ucs2":
1126
+ case "ucs-2":
1127
+ case "utf16le":
1128
+ case "utf-16le": return vt(this, e, t, n);
1129
+ default:
1130
+ if (a) throw TypeError("Unknown encoding: " + r);
1131
+ r = ("" + r).toLowerCase(), a = !0;
1132
+ }
1133
+ }, G.prototype.toJSON = function() {
1134
+ return {
1135
+ type: "Buffer",
1136
+ data: Array.prototype.slice.call(this._arr || this, 0)
1137
+ };
1138
+ };
1139
+ function yt(e, t, n) {
1140
+ return t === 0 && n === e.length ? We(e) : We(e.slice(t, n));
1141
+ }
1142
+ function bt(e, t, n) {
1143
+ n = Math.min(e.length, n);
1144
+ for (var r = [], i = t; i < n;) {
1145
+ var a = e[i], o = null, s = a > 239 ? 4 : a > 223 ? 3 : a > 191 ? 2 : 1;
1146
+ if (i + s <= n) {
1147
+ var c, l, u, d;
1148
+ switch (s) {
1149
+ case 1:
1150
+ a < 128 && (o = a);
1151
+ break;
1152
+ case 2:
1153
+ c = e[i + 1], (c & 192) == 128 && (d = (a & 31) << 6 | c & 63, d > 127 && (o = d));
1154
+ break;
1155
+ case 3:
1156
+ c = e[i + 1], l = e[i + 2], (c & 192) == 128 && (l & 192) == 128 && (d = (a & 15) << 12 | (c & 63) << 6 | l & 63, d > 2047 && (d < 55296 || d > 57343) && (o = d));
1157
+ break;
1158
+ case 4: c = e[i + 1], l = e[i + 2], u = e[i + 3], (c & 192) == 128 && (l & 192) == 128 && (u & 192) == 128 && (d = (a & 15) << 18 | (c & 63) << 12 | (l & 63) << 6 | u & 63, d > 65535 && d < 1114112 && (o = d));
1159
+ }
1160
+ }
1161
+ o === null ? (o = 65533, s = 1) : o > 65535 && (o -= 65536, r.push(o >>> 10 & 1023 | 55296), o = 56320 | o & 1023), r.push(o), i += s;
1162
+ }
1163
+ return St(r);
1164
+ }
1165
+ var xt = 4096;
1166
+ function St(e) {
1167
+ var t = e.length;
1168
+ if (t <= xt) return String.fromCharCode.apply(String, e);
1169
+ for (var n = "", r = 0; r < t;) n += String.fromCharCode.apply(String, e.slice(r, r += xt));
1170
+ return n;
1171
+ }
1172
+ function Ct(e, t, n) {
1173
+ var r = "";
1174
+ n = Math.min(e.length, n);
1175
+ for (var i = t; i < n; ++i) r += String.fromCharCode(e[i] & 127);
1176
+ return r;
1177
+ }
1178
+ function wt(e, t, n) {
1179
+ var r = "";
1180
+ n = Math.min(e.length, n);
1181
+ for (var i = t; i < n; ++i) r += String.fromCharCode(e[i]);
1182
+ return r;
1183
+ }
1184
+ function Tt(e, t, n) {
1185
+ var r = e.length;
1186
+ (!t || t < 0) && (t = 0), (!n || n < 0 || n > r) && (n = r);
1187
+ for (var i = "", a = t; a < n; ++a) i += Ft(e[a]);
1188
+ return i;
1189
+ }
1190
+ function Et(e, t, n) {
1191
+ for (var r = e.slice(t, n), i = "", a = 0; a < r.length; a += 2) i += String.fromCharCode(r[a] + r[a + 1] * 256);
1192
+ return i;
1193
+ }
1194
+ G.prototype.slice = function(e, t) {
1195
+ var n = this.length;
1196
+ e = ~~e, t = t === void 0 ? n : ~~t, e < 0 ? (e += n, e < 0 && (e = 0)) : e > n && (e = n), t < 0 ? (t += n, t < 0 && (t = 0)) : t > n && (t = n), t < e && (t = e);
1197
+ var r;
1198
+ if (G.TYPED_ARRAY_SUPPORT) r = this.subarray(e, t), r.__proto__ = G.prototype;
1199
+ else {
1200
+ var i = t - e;
1201
+ r = new G(i, void 0);
1202
+ for (var a = 0; a < i; ++a) r[a] = this[a + e];
1203
+ }
1204
+ return r;
1205
+ };
1206
+ function K(e, t, n) {
1207
+ if (e % 1 != 0 || e < 0) throw RangeError("offset is not uint");
1208
+ if (e + t > n) throw RangeError("Trying to access beyond buffer length");
1209
+ }
1210
+ G.prototype.readUIntLE = function(e, t, n) {
1211
+ e |= 0, t |= 0, n || K(e, t, this.length);
1212
+ for (var r = this[e], i = 1, a = 0; ++a < t && (i *= 256);) r += this[e + a] * i;
1213
+ return r;
1214
+ }, G.prototype.readUIntBE = function(e, t, n) {
1215
+ e |= 0, t |= 0, n || K(e, t, this.length);
1216
+ for (var r = this[e + --t], i = 1; t > 0 && (i *= 256);) r += this[e + --t] * i;
1217
+ return r;
1218
+ }, G.prototype.readUInt8 = function(e, t) {
1219
+ return t || K(e, 1, this.length), this[e];
1220
+ }, G.prototype.readUInt16LE = function(e, t) {
1221
+ return t || K(e, 2, this.length), this[e] | this[e + 1] << 8;
1222
+ }, G.prototype.readUInt16BE = function(e, t) {
1223
+ return t || K(e, 2, this.length), this[e] << 8 | this[e + 1];
1224
+ }, G.prototype.readUInt32LE = function(e, t) {
1225
+ return t || K(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
1226
+ }, G.prototype.readUInt32BE = function(e, t) {
1227
+ return t || K(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
1228
+ }, G.prototype.readIntLE = function(e, t, n) {
1229
+ e |= 0, t |= 0, n || K(e, t, this.length);
1230
+ for (var r = this[e], i = 1, a = 0; ++a < t && (i *= 256);) r += this[e + a] * i;
1231
+ return i *= 128, r >= i && (r -= 2 ** (8 * t)), r;
1232
+ }, G.prototype.readIntBE = function(e, t, n) {
1233
+ e |= 0, t |= 0, n || K(e, t, this.length);
1234
+ for (var r = t, i = 1, a = this[e + --r]; r > 0 && (i *= 256);) a += this[e + --r] * i;
1235
+ return i *= 128, a >= i && (a -= 2 ** (8 * t)), a;
1236
+ }, G.prototype.readInt8 = function(e, t) {
1237
+ return t || K(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
1238
+ }, G.prototype.readInt16LE = function(e, t) {
1239
+ t || K(e, 2, this.length);
1240
+ var n = this[e] | this[e + 1] << 8;
1241
+ return n & 32768 ? n | 4294901760 : n;
1242
+ }, G.prototype.readInt16BE = function(e, t) {
1243
+ t || K(e, 2, this.length);
1244
+ var n = this[e + 1] | this[e] << 8;
1245
+ return n & 32768 ? n | 4294901760 : n;
1246
+ }, G.prototype.readInt32LE = function(e, t) {
1247
+ return t || K(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
1248
+ }, G.prototype.readInt32BE = function(e, t) {
1249
+ return t || K(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
1250
+ }, G.prototype.readFloatLE = function(e, t) {
1251
+ return t || K(e, 4, this.length), Ge(this, e, !0, 23, 4);
1252
+ }, G.prototype.readFloatBE = function(e, t) {
1253
+ return t || K(e, 4, this.length), Ge(this, e, !1, 23, 4);
1254
+ }, G.prototype.readDoubleLE = function(e, t) {
1255
+ return t || K(e, 8, this.length), Ge(this, e, !0, 52, 8);
1256
+ }, G.prototype.readDoubleBE = function(e, t) {
1257
+ return t || K(e, 8, this.length), Ge(this, e, !1, 52, 8);
1258
+ };
1259
+ function q(e, t, n, r, i, a) {
1260
+ if (!st(e)) throw TypeError("\"buffer\" argument must be a Buffer instance");
1261
+ if (t > i || t < a) throw RangeError("\"value\" argument is out of bounds");
1262
+ if (n + r > e.length) throw RangeError("Index out of range");
1263
+ }
1264
+ G.prototype.writeUIntLE = function(e, t, n, r) {
1265
+ if (e = +e, t |= 0, n |= 0, !r) {
1266
+ var i = 2 ** (8 * n) - 1;
1267
+ q(this, e, t, n, i, 0);
1268
+ }
1269
+ var a = 1, o = 0;
1270
+ for (this[t] = e & 255; ++o < n && (a *= 256);) this[t + o] = e / a & 255;
1271
+ return t + n;
1272
+ }, G.prototype.writeUIntBE = function(e, t, n, r) {
1273
+ if (e = +e, t |= 0, n |= 0, !r) {
1274
+ var i = 2 ** (8 * n) - 1;
1275
+ q(this, e, t, n, i, 0);
1276
+ }
1277
+ var a = n - 1, o = 1;
1278
+ for (this[t + a] = e & 255; --a >= 0 && (o *= 256);) this[t + a] = e / o & 255;
1279
+ return t + n;
1280
+ }, G.prototype.writeUInt8 = function(e, t, n) {
1281
+ return e = +e, t |= 0, n || q(this, e, t, 1, 255, 0), G.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[t] = e & 255, t + 1;
1282
+ };
1283
+ function Dt(e, t, n, r) {
1284
+ t < 0 && (t = 65535 + t + 1);
1285
+ for (var i = 0, a = Math.min(e.length - n, 2); i < a; ++i) e[n + i] = (t & 255 << 8 * (r ? i : 1 - i)) >>> (r ? i : 1 - i) * 8;
1286
+ }
1287
+ G.prototype.writeUInt16LE = function(e, t, n) {
1288
+ return e = +e, t |= 0, n || q(this, e, t, 2, 65535, 0), G.TYPED_ARRAY_SUPPORT ? (this[t] = e & 255, this[t + 1] = e >>> 8) : Dt(this, e, t, !0), t + 2;
1289
+ }, G.prototype.writeUInt16BE = function(e, t, n) {
1290
+ return e = +e, t |= 0, n || q(this, e, t, 2, 65535, 0), G.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = e & 255) : Dt(this, e, t, !1), t + 2;
1291
+ };
1292
+ function Ot(e, t, n, r) {
1293
+ t < 0 && (t = 4294967295 + t + 1);
1294
+ for (var i = 0, a = Math.min(e.length - n, 4); i < a; ++i) e[n + i] = t >>> (r ? i : 3 - i) * 8 & 255;
1295
+ }
1296
+ G.prototype.writeUInt32LE = function(e, t, n) {
1297
+ return e = +e, t |= 0, n || q(this, e, t, 4, 4294967295, 0), G.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = e & 255) : Ot(this, e, t, !0), t + 4;
1298
+ }, G.prototype.writeUInt32BE = function(e, t, n) {
1299
+ return e = +e, t |= 0, n || q(this, e, t, 4, 4294967295, 0), G.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255) : Ot(this, e, t, !1), t + 4;
1300
+ }, G.prototype.writeIntLE = function(e, t, n, r) {
1301
+ if (e = +e, t |= 0, !r) {
1302
+ var i = 2 ** (8 * n - 1);
1303
+ q(this, e, t, n, i - 1, -i);
1304
+ }
1305
+ var a = 0, o = 1, s = 0;
1306
+ for (this[t] = e & 255; ++a < n && (o *= 256);) e < 0 && s === 0 && this[t + a - 1] !== 0 && (s = 1), this[t + a] = (e / o >> 0) - s & 255;
1307
+ return t + n;
1308
+ }, G.prototype.writeIntBE = function(e, t, n, r) {
1309
+ if (e = +e, t |= 0, !r) {
1310
+ var i = 2 ** (8 * n - 1);
1311
+ q(this, e, t, n, i - 1, -i);
1312
+ }
1313
+ var a = n - 1, o = 1, s = 0;
1314
+ for (this[t + a] = e & 255; --a >= 0 && (o *= 256);) e < 0 && s === 0 && this[t + a + 1] !== 0 && (s = 1), this[t + a] = (e / o >> 0) - s & 255;
1315
+ return t + n;
1316
+ }, G.prototype.writeInt8 = function(e, t, n) {
1317
+ return e = +e, t |= 0, n || q(this, e, t, 1, 127, -128), G.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[t] = e & 255, t + 1;
1318
+ }, G.prototype.writeInt16LE = function(e, t, n) {
1319
+ return e = +e, t |= 0, n || q(this, e, t, 2, 32767, -32768), G.TYPED_ARRAY_SUPPORT ? (this[t] = e & 255, this[t + 1] = e >>> 8) : Dt(this, e, t, !0), t + 2;
1320
+ }, G.prototype.writeInt16BE = function(e, t, n) {
1321
+ return e = +e, t |= 0, n || q(this, e, t, 2, 32767, -32768), G.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = e & 255) : Dt(this, e, t, !1), t + 2;
1322
+ }, G.prototype.writeInt32LE = function(e, t, n) {
1323
+ return e = +e, t |= 0, n || q(this, e, t, 4, 2147483647, -2147483648), G.TYPED_ARRAY_SUPPORT ? (this[t] = e & 255, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24) : Ot(this, e, t, !0), t + 4;
1324
+ }, G.prototype.writeInt32BE = function(e, t, n) {
1325
+ return e = +e, t |= 0, n || q(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), G.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255) : Ot(this, e, t, !1), t + 4;
1326
+ };
1327
+ function kt(e, t, n, r, i, a) {
1328
+ if (n + r > e.length || n < 0) throw RangeError("Index out of range");
1329
+ }
1330
+ function At(e, t, n, r, i) {
1331
+ return i || kt(e, t, n, 4), Ke(e, t, n, r, 23, 4), n + 4;
1332
+ }
1333
+ G.prototype.writeFloatLE = function(e, t, n) {
1334
+ return At(this, e, t, !0, n);
1335
+ }, G.prototype.writeFloatBE = function(e, t, n) {
1336
+ return At(this, e, t, !1, n);
1337
+ };
1338
+ function jt(e, t, n, r, i) {
1339
+ return i || kt(e, t, n, 8), Ke(e, t, n, r, 52, 8), n + 8;
1340
+ }
1341
+ G.prototype.writeDoubleLE = function(e, t, n) {
1342
+ return jt(this, e, t, !0, n);
1343
+ }, G.prototype.writeDoubleBE = function(e, t, n) {
1344
+ return jt(this, e, t, !1, n);
1345
+ }, G.prototype.copy = function(e, t, n, r) {
1346
+ if (n ||= 0, !r && r !== 0 && (r = this.length), t >= e.length && (t = e.length), t ||= 0, r > 0 && r < n && (r = n), r === n || e.length === 0 || this.length === 0) return 0;
1347
+ if (t < 0) throw RangeError("targetStart out of bounds");
1348
+ if (n < 0 || n >= this.length) throw RangeError("sourceStart out of bounds");
1349
+ if (r < 0) throw RangeError("sourceEnd out of bounds");
1350
+ r > this.length && (r = this.length), e.length - t < r - n && (r = e.length - t + n);
1351
+ var i = r - n, a;
1352
+ if (this === e && n < t && t < r) for (a = i - 1; a >= 0; --a) e[a + t] = this[a + n];
1353
+ else if (i < 1e3 || !G.TYPED_ARRAY_SUPPORT) for (a = 0; a < i; ++a) e[a + t] = this[a + n];
1354
+ else Uint8Array.prototype.set.call(e, this.subarray(n, n + i), t);
1355
+ return i;
1356
+ }, G.prototype.fill = function(e, t, n, r) {
1357
+ if (typeof e == "string") {
1358
+ if (typeof t == "string" ? (r = t, t = 0, n = this.length) : typeof n == "string" && (r = n, n = this.length), e.length === 1) {
1359
+ var i = e.charCodeAt(0);
1360
+ i < 256 && (e = i);
1361
+ }
1362
+ if (r !== void 0 && typeof r != "string") throw TypeError("encoding must be a string");
1363
+ if (typeof r == "string" && !G.isEncoding(r)) throw TypeError("Unknown encoding: " + r);
1364
+ } else typeof e == "number" && (e &= 255);
1365
+ if (t < 0 || this.length < t || this.length < n) throw RangeError("Out of range index");
1366
+ if (n <= t) return this;
1367
+ t >>>= 0, n = n === void 0 ? this.length : n >>> 0, e ||= 0;
1368
+ var a;
1369
+ if (typeof e == "number") for (a = t; a < n; ++a) this[a] = e;
1370
+ else {
1371
+ var o = st(e) ? e : It(new G(e, r).toString()), s = o.length;
1372
+ for (a = 0; a < n - t; ++a) this[a + t] = o[a % s];
1373
+ }
1374
+ return this;
1375
+ };
1376
+ var Mt = /[^+\/0-9A-Za-z-_]/g;
1377
+ function Nt(e) {
1378
+ if (e = Pt(e).replace(Mt, ""), e.length < 2) return "";
1379
+ for (; e.length % 4 != 0;) e += "=";
1380
+ return e;
1381
+ }
1382
+ function Pt(e) {
1383
+ return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
1384
+ }
1385
+ function Ft(e) {
1386
+ return e < 16 ? "0" + e.toString(16) : e.toString(16);
1387
+ }
1388
+ function It(e, t) {
1389
+ t ||= Infinity;
1390
+ for (var n, r = e.length, i = null, a = [], o = 0; o < r; ++o) {
1391
+ if (n = e.charCodeAt(o), n > 55295 && n < 57344) {
1392
+ if (!i) {
1393
+ if (n > 56319) {
1394
+ (t -= 3) > -1 && a.push(239, 191, 189);
1395
+ continue;
1396
+ } else if (o + 1 === r) {
1397
+ (t -= 3) > -1 && a.push(239, 191, 189);
1398
+ continue;
1399
+ }
1400
+ i = n;
1401
+ continue;
1402
+ }
1403
+ if (n < 56320) {
1404
+ (t -= 3) > -1 && a.push(239, 191, 189), i = n;
1405
+ continue;
1406
+ }
1407
+ n = (i - 55296 << 10 | n - 56320) + 65536;
1408
+ } else i && (t -= 3) > -1 && a.push(239, 191, 189);
1409
+ if (i = null, n < 128) {
1410
+ if (--t < 0) break;
1411
+ a.push(n);
1412
+ } else if (n < 2048) {
1413
+ if ((t -= 2) < 0) break;
1414
+ a.push(n >> 6 | 192, n & 63 | 128);
1415
+ } else if (n < 65536) {
1416
+ if ((t -= 3) < 0) break;
1417
+ a.push(n >> 12 | 224, n >> 6 & 63 | 128, n & 63 | 128);
1418
+ } else if (n < 1114112) {
1419
+ if ((t -= 4) < 0) break;
1420
+ a.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, n & 63 | 128);
1421
+ } else throw Error("Invalid code point");
1422
+ }
1423
+ return a;
1424
+ }
1425
+ function Lt(e) {
1426
+ for (var t = [], n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
1427
+ return t;
1428
+ }
1429
+ function Rt(e, t) {
1430
+ for (var n, r, i, a = [], o = 0; o < e.length && !((t -= 2) < 0); ++o) n = e.charCodeAt(o), r = n >> 8, i = n % 256, a.push(i), a.push(r);
1431
+ return a;
1432
+ }
1433
+ function zt(e) {
1434
+ return Ve(Nt(e));
1435
+ }
1436
+ function Bt(e, t, n, r) {
1437
+ for (var i = 0; i < r && !(i + n >= t.length || i >= e.length); ++i) t[i + n] = e[i];
1438
+ return i;
1439
+ }
1440
+ function Vt(e) {
1441
+ return e !== e;
1442
+ }
1443
+ function J(e) {
1444
+ return e != null && (!!e._isBuffer || Ht(e) || Ut(e));
1445
+ }
1446
+ function Ht(e) {
1447
+ return !!e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
1448
+ }
1449
+ function Ut(e) {
1450
+ return typeof e.readFloatLE == "function" && typeof e.slice == "function" && Ht(e.slice(0, 0));
1451
+ }
1452
+ var Wt;
1453
+ function Gt() {}
1454
+ Gt.prototype = Object.create(null);
1455
+ function Y() {
1456
+ Y.init.call(this);
1457
+ }
1458
+ Y.EventEmitter = Y, Y.usingDomains = !1, Y.prototype.domain = void 0, Y.prototype._events = void 0, Y.prototype._maxListeners = void 0, Y.defaultMaxListeners = 10, Y.init = function() {
1459
+ this.domain = null, Y.usingDomains && Wt.active && !(this instanceof Wt.Domain) && (this.domain = Wt.active), (!this._events || this._events === Object.getPrototypeOf(this)._events) && (this._events = new Gt(), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
1460
+ }, Y.prototype.setMaxListeners = function(e) {
1461
+ if (typeof e != "number" || e < 0 || isNaN(e)) throw TypeError("\"n\" argument must be a positive number");
1462
+ return this._maxListeners = e, this;
1463
+ };
1464
+ function Kt(e) {
1465
+ return e._maxListeners === void 0 ? Y.defaultMaxListeners : e._maxListeners;
1466
+ }
1467
+ Y.prototype.getMaxListeners = function() {
1468
+ return Kt(this);
1469
+ };
1470
+ function qt(e, t, n) {
1471
+ if (t) e.call(n);
1472
+ else for (var r = e.length, i = rn(e, r), a = 0; a < r; ++a) i[a].call(n);
1473
+ }
1474
+ function Jt(e, t, n, r) {
1475
+ if (t) e.call(n, r);
1476
+ else for (var i = e.length, a = rn(e, i), o = 0; o < i; ++o) a[o].call(n, r);
1477
+ }
1478
+ function Yt(e, t, n, r, i) {
1479
+ if (t) e.call(n, r, i);
1480
+ else for (var a = e.length, o = rn(e, a), s = 0; s < a; ++s) o[s].call(n, r, i);
1481
+ }
1482
+ function Xt(e, t, n, r, i, a) {
1483
+ if (t) e.call(n, r, i, a);
1484
+ else for (var o = e.length, s = rn(e, o), c = 0; c < o; ++c) s[c].call(n, r, i, a);
1485
+ }
1486
+ function Zt(e, t, n, r) {
1487
+ if (t) e.apply(n, r);
1488
+ else for (var i = e.length, a = rn(e, i), o = 0; o < i; ++o) a[o].apply(n, r);
1489
+ }
1490
+ Y.prototype.emit = function(e) {
1491
+ var t, n, r, i, a, o, s, c = e === "error";
1492
+ if (o = this._events, o) c &&= o.error == null;
1493
+ else if (!c) return !1;
1494
+ if (s = this.domain, c) {
1495
+ if (t = arguments[1], s) t ||= /* @__PURE__ */ Error("Uncaught, unspecified \"error\" event"), t.domainEmitter = this, t.domain = s, t.domainThrown = !1, s.emit("error", t);
1496
+ else if (t instanceof Error) throw t;
1497
+ else {
1498
+ var l = /* @__PURE__ */ Error("Uncaught, unspecified \"error\" event. (" + t + ")");
1499
+ throw l.context = t, l;
1500
+ }
1501
+ return !1;
1502
+ }
1503
+ if (n = o[e], !n) return !1;
1504
+ var u = typeof n == "function";
1505
+ switch (r = arguments.length, r) {
1506
+ case 1:
1507
+ qt(n, u, this);
1508
+ break;
1509
+ case 2:
1510
+ Jt(n, u, this, arguments[1]);
1511
+ break;
1512
+ case 3:
1513
+ Yt(n, u, this, arguments[1], arguments[2]);
1514
+ break;
1515
+ case 4:
1516
+ Xt(n, u, this, arguments[1], arguments[2], arguments[3]);
1517
+ break;
1518
+ default:
1519
+ for (i = Array(r - 1), a = 1; a < r; a++) i[a - 1] = arguments[a];
1520
+ Zt(n, u, this, i);
1521
+ }
1522
+ return !0;
1523
+ };
1524
+ function Qt(e, t, n, r) {
1525
+ var i, a, o;
1526
+ if (typeof n != "function") throw TypeError("\"listener\" argument must be a function");
1527
+ if (a = e._events, a ? (a.newListener && (e.emit("newListener", t, n.listener ? n.listener : n), a = e._events), o = a[t]) : (a = e._events = new Gt(), e._eventsCount = 0), !o) o = a[t] = n, ++e._eventsCount;
1528
+ else if (typeof o == "function" ? o = a[t] = r ? [n, o] : [o, n] : r ? o.unshift(n) : o.push(n), !o.warned && (i = Kt(e), i && i > 0 && o.length > i)) {
1529
+ o.warned = !0;
1530
+ var s = /* @__PURE__ */ Error("Possible EventEmitter memory leak detected. " + o.length + " " + t + " listeners added. Use emitter.setMaxListeners() to increase limit");
1531
+ s.name = "MaxListenersExceededWarning", s.emitter = e, s.type = t, s.count = o.length, $t(s);
1532
+ }
1533
+ return e;
1534
+ }
1535
+ function $t(e) {
1536
+ typeof console.warn == "function" ? console.warn(e) : console.log(e);
1537
+ }
1538
+ Y.prototype.addListener = function(e, t) {
1539
+ return Qt(this, e, t, !1);
1540
+ }, Y.prototype.on = Y.prototype.addListener, Y.prototype.prependListener = function(e, t) {
1541
+ return Qt(this, e, t, !0);
1542
+ };
1543
+ function en(e, t, n) {
1544
+ var r = !1;
1545
+ function i() {
1546
+ e.removeListener(t, i), r || (r = !0, n.apply(e, arguments));
1547
+ }
1548
+ return i.listener = n, i;
1549
+ }
1550
+ Y.prototype.once = function(e, t) {
1551
+ if (typeof t != "function") throw TypeError("\"listener\" argument must be a function");
1552
+ return this.on(e, en(this, e, t)), this;
1553
+ }, Y.prototype.prependOnceListener = function(e, t) {
1554
+ if (typeof t != "function") throw TypeError("\"listener\" argument must be a function");
1555
+ return this.prependListener(e, en(this, e, t)), this;
1556
+ }, Y.prototype.removeListener = function(e, t) {
1557
+ var n, r, i, a, o;
1558
+ if (typeof t != "function") throw TypeError("\"listener\" argument must be a function");
1559
+ if (r = this._events, !r || (n = r[e], !n)) return this;
1560
+ if (n === t || n.listener && n.listener === t) --this._eventsCount === 0 ? this._events = new Gt() : (delete r[e], r.removeListener && this.emit("removeListener", e, n.listener || t));
1561
+ else if (typeof n != "function") {
1562
+ for (i = -1, a = n.length; a-- > 0;) if (n[a] === t || n[a].listener && n[a].listener === t) {
1563
+ o = n[a].listener, i = a;
1564
+ break;
1565
+ }
1566
+ if (i < 0) return this;
1567
+ if (n.length === 1) {
1568
+ if (n[0] = void 0, --this._eventsCount === 0) return this._events = new Gt(), this;
1569
+ delete r[e];
1570
+ } else nn(n, i);
1571
+ r.removeListener && this.emit("removeListener", e, o || t);
1572
+ }
1573
+ return this;
1574
+ }, Y.prototype.removeAllListeners = function(e) {
1575
+ var t, n = this._events;
1576
+ if (!n) return this;
1577
+ if (!n.removeListener) return arguments.length === 0 ? (this._events = new Gt(), this._eventsCount = 0) : n[e] && (--this._eventsCount === 0 ? this._events = new Gt() : delete n[e]), this;
1578
+ if (arguments.length === 0) {
1579
+ for (var r = Object.keys(n), i = 0, a; i < r.length; ++i) a = r[i], a !== "removeListener" && this.removeAllListeners(a);
1580
+ return this.removeAllListeners("removeListener"), this._events = new Gt(), this._eventsCount = 0, this;
1581
+ }
1582
+ if (t = n[e], typeof t == "function") this.removeListener(e, t);
1583
+ else if (t) do
1584
+ this.removeListener(e, t[t.length - 1]);
1585
+ while (t[0]);
1586
+ return this;
1587
+ }, Y.prototype.listeners = function(e) {
1588
+ var t, n, r = this._events;
1589
+ return r ? (t = r[e], n = t ? typeof t == "function" ? [t.listener || t] : an(t) : []) : n = [], n;
1590
+ }, Y.listenerCount = function(e, t) {
1591
+ return typeof e.listenerCount == "function" ? e.listenerCount(t) : tn.call(e, t);
1592
+ }, Y.prototype.listenerCount = tn;
1593
+ function tn(e) {
1594
+ var t = this._events;
1595
+ if (t) {
1596
+ var n = t[e];
1597
+ if (typeof n == "function") return 1;
1598
+ if (n) return n.length;
1599
+ }
1600
+ return 0;
1601
+ }
1602
+ Y.prototype.eventNames = function() {
1603
+ return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
1604
+ };
1605
+ function nn(e, t) {
1606
+ for (var n = t, r = n + 1, i = e.length; r < i; n += 1, r += 1) e[n] = e[r];
1607
+ e.pop();
1608
+ }
1609
+ function rn(e, t) {
1610
+ for (var n = Array(t); t--;) n[t] = e[t];
1611
+ return n;
1612
+ }
1613
+ function an(e) {
1614
+ for (var t = Array(e.length), n = 0; n < t.length; ++n) t[n] = e[n].listener || e[n];
1615
+ return t;
1616
+ }
1617
+ function on() {
1618
+ throw Error("setTimeout has not been defined");
1619
+ }
1620
+ function sn() {
1621
+ throw Error("clearTimeout has not been defined");
1622
+ }
1623
+ var cn = on, ln = sn;
1624
+ typeof Fe.setTimeout == "function" && (cn = setTimeout), typeof Fe.clearTimeout == "function" && (ln = clearTimeout);
1625
+ function un(e) {
1626
+ if (cn === setTimeout) return setTimeout(e, 0);
1627
+ if ((cn === on || !cn) && setTimeout) return cn = setTimeout, setTimeout(e, 0);
1628
+ try {
1629
+ return cn(e, 0);
1630
+ } catch {
1631
+ try {
1632
+ return cn.call(null, e, 0);
1633
+ } catch {
1634
+ return cn.call(this, e, 0);
1635
+ }
1636
+ }
1637
+ }
1638
+ function dn(e) {
1639
+ if (ln === clearTimeout) return clearTimeout(e);
1640
+ if ((ln === sn || !ln) && clearTimeout) return ln = clearTimeout, clearTimeout(e);
1641
+ try {
1642
+ return ln(e);
1643
+ } catch {
1644
+ try {
1645
+ return ln.call(null, e);
1646
+ } catch {
1647
+ return ln.call(this, e);
1648
+ }
1649
+ }
1650
+ }
1651
+ var fn = [], pn = !1, mn, hn = -1;
1652
+ function gn() {
1653
+ !pn || !mn || (pn = !1, mn.length ? fn = mn.concat(fn) : hn = -1, fn.length && _n());
1654
+ }
1655
+ function _n() {
1656
+ if (!pn) {
1657
+ var e = un(gn);
1658
+ pn = !0;
1659
+ for (var t = fn.length; t;) {
1660
+ for (mn = fn, fn = []; ++hn < t;) mn && mn[hn].run();
1661
+ hn = -1, t = fn.length;
1662
+ }
1663
+ mn = null, pn = !1, dn(e);
1664
+ }
1665
+ }
1666
+ function vn(e) {
1667
+ var t = Array(arguments.length - 1);
1668
+ if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
1669
+ fn.push(new yn(e, t)), fn.length === 1 && !pn && un(_n);
1670
+ }
1671
+ function yn(e, t) {
1672
+ this.fun = e, this.array = t;
1673
+ }
1674
+ yn.prototype.run = function() {
1675
+ this.fun.apply(null, this.array);
1676
+ };
1677
+ var bn = {}, xn = Fe.performance || {};
1678
+ xn.now || xn.mozNow || xn.msNow || xn.oNow || xn.webkitNow;
1679
+ var Sn = { env: bn }, Cn = typeof Object.create == "function" ? function(e, t) {
1680
+ e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: {
1681
+ value: e,
1682
+ enumerable: !1,
1683
+ writable: !0,
1684
+ configurable: !0
1685
+ } });
1686
+ } : function(e, t) {
1687
+ e.super_ = t;
1688
+ var n = function() {};
1689
+ n.prototype = t.prototype, e.prototype = new n(), e.prototype.constructor = e;
1690
+ }, wn = /%[sdj%]/g;
1691
+ function Tn(e) {
1692
+ if (!Gn(e)) {
1693
+ for (var t = [], n = 0; n < arguments.length; n++) t.push(An(arguments[n]));
1694
+ return t.join(" ");
1695
+ }
1696
+ for (var n = 1, r = arguments, i = r.length, a = String(e).replace(wn, function(e) {
1697
+ if (e === "%%") return "%";
1698
+ if (n >= i) return e;
1699
+ switch (e) {
1700
+ case "%s": return String(r[n++]);
1701
+ case "%d": return Number(r[n++]);
1702
+ case "%j": try {
1703
+ return JSON.stringify(r[n++]);
1704
+ } catch {
1705
+ return "[Circular]";
1706
+ }
1707
+ default: return e;
1708
+ }
1709
+ }), o = r[n]; n < i; o = r[++n]) Hn(o) || !Yn(o) ? a += " " + o : a += " " + An(o);
1710
+ return a;
1711
+ }
1712
+ function En(e, t) {
1713
+ if (qn(Fe.process)) return function() {
1714
+ return En(e, t).apply(this, arguments);
1715
+ };
1716
+ if (Sn.noDeprecation === !0) return e;
1717
+ var n = !1;
1718
+ function r() {
1719
+ if (!n) {
1720
+ if (Sn.throwDeprecation) throw Error(t);
1721
+ Sn.traceDeprecation ? console.trace(t) : console.error(t), n = !0;
1722
+ }
1723
+ return e.apply(this, arguments);
1724
+ }
1725
+ return r;
1726
+ }
1727
+ var Dn = {}, On;
1728
+ function kn(e) {
1729
+ if (qn(On) && (On = Sn.env.NODE_DEBUG || ""), e = e.toUpperCase(), !Dn[e]) if (RegExp("\\b" + e + "\\b", "i").test(On)) {
1730
+ var t = 0;
1731
+ Dn[e] = function() {
1732
+ var n = Tn.apply(null, arguments);
1733
+ console.error("%s %d: %s", e, t, n);
1734
+ };
1735
+ } else Dn[e] = function() {};
1736
+ return Dn[e];
1737
+ }
1738
+ function An(e, t) {
1739
+ var n = {
1740
+ seen: [],
1741
+ stylize: Mn
1742
+ };
1743
+ return arguments.length >= 3 && (n.depth = arguments[2]), arguments.length >= 4 && (n.colors = arguments[3]), Vn(t) ? n.showHidden = t : t && or(n, t), qn(n.showHidden) && (n.showHidden = !1), qn(n.depth) && (n.depth = 2), qn(n.colors) && (n.colors = !1), qn(n.customInspect) && (n.customInspect = !0), n.colors && (n.stylize = jn), Pn(n, e, n.depth);
1744
+ }
1745
+ An.colors = {
1746
+ bold: [1, 22],
1747
+ italic: [3, 23],
1748
+ underline: [4, 24],
1749
+ inverse: [7, 27],
1750
+ white: [37, 39],
1751
+ grey: [90, 39],
1752
+ black: [30, 39],
1753
+ blue: [34, 39],
1754
+ cyan: [36, 39],
1755
+ green: [32, 39],
1756
+ magenta: [35, 39],
1757
+ red: [31, 39],
1758
+ yellow: [33, 39]
1759
+ }, An.styles = {
1760
+ special: "cyan",
1761
+ number: "yellow",
1762
+ boolean: "yellow",
1763
+ undefined: "grey",
1764
+ null: "bold",
1765
+ string: "green",
1766
+ date: "magenta",
1767
+ regexp: "red"
1768
+ };
1769
+ function jn(e, t) {
1770
+ var n = An.styles[t];
1771
+ return n ? "\x1B[" + An.colors[n][0] + "m" + e + "\x1B[" + An.colors[n][1] + "m" : e;
1772
+ }
1773
+ function Mn(e, t) {
1774
+ return e;
1775
+ }
1776
+ function Nn(e) {
1777
+ var t = {};
1778
+ return e.forEach(function(e, n) {
1779
+ t[e] = !0;
1780
+ }), t;
1781
+ }
1782
+ function Pn(e, t, n) {
1783
+ if (e.customInspect && t && Qn(t.inspect) && t.inspect !== An && !(t.constructor && t.constructor.prototype === t)) {
1784
+ var r = t.inspect(n, e);
1785
+ return Gn(r) || (r = Pn(e, r, n)), r;
1786
+ }
1787
+ var i = Fn(e, t);
1788
+ if (i) return i;
1789
+ var a = Object.keys(t), o = Nn(a);
1790
+ if (e.showHidden && (a = Object.getOwnPropertyNames(t)), Zn(t) && (a.indexOf("message") >= 0 || a.indexOf("description") >= 0)) return In(t);
1791
+ if (a.length === 0) {
1792
+ if (Qn(t)) {
1793
+ var s = t.name ? ": " + t.name : "";
1794
+ return e.stylize("[Function" + s + "]", "special");
1795
+ }
1796
+ if (Jn(t)) return e.stylize(RegExp.prototype.toString.call(t), "regexp");
1797
+ if (Xn(t)) return e.stylize(Date.prototype.toString.call(t), "date");
1798
+ if (Zn(t)) return In(t);
1799
+ }
1800
+ var c = "", l = !1, u = ["{", "}"];
1801
+ if (Bn(t) && (l = !0, u = ["[", "]"]), Qn(t) && (c = " [Function" + (t.name ? ": " + t.name : "") + "]"), Jn(t) && (c = " " + RegExp.prototype.toString.call(t)), Xn(t) && (c = " " + Date.prototype.toUTCString.call(t)), Zn(t) && (c = " " + In(t)), a.length === 0 && (!l || t.length == 0)) return u[0] + c + u[1];
1802
+ if (n < 0) return Jn(t) ? e.stylize(RegExp.prototype.toString.call(t), "regexp") : e.stylize("[Object]", "special");
1803
+ e.seen.push(t);
1804
+ var d = l ? Ln(e, t, n, o, a) : a.map(function(r) {
1805
+ return Rn(e, t, n, o, r, l);
1806
+ });
1807
+ return e.seen.pop(), zn(d, c, u);
1808
+ }
1809
+ function Fn(e, t) {
1810
+ if (qn(t)) return e.stylize("undefined", "undefined");
1811
+ if (Gn(t)) {
1812
+ var n = "'" + JSON.stringify(t).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, "\"") + "'";
1813
+ return e.stylize(n, "string");
1814
+ }
1815
+ if (Wn(t)) return e.stylize("" + t, "number");
1816
+ if (Vn(t)) return e.stylize("" + t, "boolean");
1817
+ if (Hn(t)) return e.stylize("null", "null");
1818
+ }
1819
+ function In(e) {
1820
+ return "[" + Error.prototype.toString.call(e) + "]";
1821
+ }
1822
+ function Ln(e, t, n, r, i) {
1823
+ for (var a = [], o = 0, s = t.length; o < s; ++o) sr(t, String(o)) ? a.push(Rn(e, t, n, r, String(o), !0)) : a.push("");
1824
+ return i.forEach(function(i) {
1825
+ i.match(/^\d+$/) || a.push(Rn(e, t, n, r, i, !0));
1826
+ }), a;
1827
+ }
1828
+ function Rn(e, t, n, r, i, a) {
1829
+ var o, s, c = Object.getOwnPropertyDescriptor(t, i) || { value: t[i] };
1830
+ if (c.get ? s = c.set ? e.stylize("[Getter/Setter]", "special") : e.stylize("[Getter]", "special") : c.set && (s = e.stylize("[Setter]", "special")), sr(r, i) || (o = "[" + i + "]"), s || (e.seen.indexOf(c.value) < 0 ? (s = Hn(n) ? Pn(e, c.value, null) : Pn(e, c.value, n - 1), s.indexOf("\n") > -1 && (s = a ? s.split("\n").map(function(e) {
1831
+ return " " + e;
1832
+ }).join("\n").substr(2) : "\n" + s.split("\n").map(function(e) {
1833
+ return " " + e;
1834
+ }).join("\n"))) : s = e.stylize("[Circular]", "special")), qn(o)) {
1835
+ if (a && i.match(/^\d+$/)) return s;
1836
+ o = JSON.stringify("" + i), o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (o = o.substr(1, o.length - 2), o = e.stylize(o, "name")) : (o = o.replace(/'/g, "\\'").replace(/\\"/g, "\"").replace(/(^"|"$)/g, "'"), o = e.stylize(o, "string"));
1837
+ }
1838
+ return o + ": " + s;
1839
+ }
1840
+ function zn(e, t, n) {
1841
+ return e.reduce(function(e, t) {
1842
+ return t.indexOf("\n"), e + t.replace(/\u001b\[\d\d?m/g, "").length + 1;
1843
+ }, 0) > 60 ? n[0] + (t === "" ? "" : t + "\n ") + " " + e.join(",\n ") + " " + n[1] : n[0] + t + " " + e.join(", ") + " " + n[1];
1844
+ }
1845
+ function Bn(e) {
1846
+ return Array.isArray(e);
1847
+ }
1848
+ function Vn(e) {
1849
+ return typeof e == "boolean";
1850
+ }
1851
+ function Hn(e) {
1852
+ return e === null;
1853
+ }
1854
+ function Un(e) {
1855
+ return e == null;
1856
+ }
1857
+ function Wn(e) {
1858
+ return typeof e == "number";
1859
+ }
1860
+ function Gn(e) {
1861
+ return typeof e == "string";
1862
+ }
1863
+ function Kn(e) {
1864
+ return typeof e == "symbol";
1865
+ }
1866
+ function qn(e) {
1867
+ return e === void 0;
1868
+ }
1869
+ function Jn(e) {
1870
+ return Yn(e) && tr(e) === "[object RegExp]";
1871
+ }
1872
+ function Yn(e) {
1873
+ return typeof e == "object" && !!e;
1874
+ }
1875
+ function Xn(e) {
1876
+ return Yn(e) && tr(e) === "[object Date]";
1877
+ }
1878
+ function Zn(e) {
1879
+ return Yn(e) && (tr(e) === "[object Error]" || e instanceof Error);
1880
+ }
1881
+ function Qn(e) {
1882
+ return typeof e == "function";
1883
+ }
1884
+ function $n(e) {
1885
+ return e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string" || typeof e == "symbol" || e === void 0;
1886
+ }
1887
+ function er(e) {
1888
+ return J(e);
1889
+ }
1890
+ function tr(e) {
1891
+ return Object.prototype.toString.call(e);
1892
+ }
1893
+ function nr(e) {
1894
+ return e < 10 ? "0" + e.toString(10) : e.toString(10);
1895
+ }
1896
+ var rr = [
1897
+ "Jan",
1898
+ "Feb",
1899
+ "Mar",
1900
+ "Apr",
1901
+ "May",
1902
+ "Jun",
1903
+ "Jul",
1904
+ "Aug",
1905
+ "Sep",
1906
+ "Oct",
1907
+ "Nov",
1908
+ "Dec"
1909
+ ];
1910
+ function ir() {
1911
+ var e = /* @__PURE__ */ new Date(), t = [
1912
+ nr(e.getHours()),
1913
+ nr(e.getMinutes()),
1914
+ nr(e.getSeconds())
1915
+ ].join(":");
1916
+ return [
1917
+ e.getDate(),
1918
+ rr[e.getMonth()],
1919
+ t
1920
+ ].join(" ");
1921
+ }
1922
+ function ar() {
1923
+ console.log("%s - %s", ir(), Tn.apply(null, arguments));
1924
+ }
1925
+ function or(e, t) {
1926
+ if (!t || !Yn(t)) return e;
1927
+ for (var n = Object.keys(t), r = n.length; r--;) e[n[r]] = t[n[r]];
1928
+ return e;
1929
+ }
1930
+ function sr(e, t) {
1931
+ return Object.prototype.hasOwnProperty.call(e, t);
1932
+ }
1933
+ var cr = {
1934
+ inherits: Cn,
1935
+ _extend: or,
1936
+ log: ar,
1937
+ isBuffer: er,
1938
+ isPrimitive: $n,
1939
+ isFunction: Qn,
1940
+ isError: Zn,
1941
+ isDate: Xn,
1942
+ isObject: Yn,
1943
+ isRegExp: Jn,
1944
+ isUndefined: qn,
1945
+ isSymbol: Kn,
1946
+ isString: Gn,
1947
+ isNumber: Wn,
1948
+ isNullOrUndefined: Un,
1949
+ isNull: Hn,
1950
+ isBoolean: Vn,
1951
+ isArray: Bn,
1952
+ inspect: An,
1953
+ deprecate: En,
1954
+ format: Tn,
1955
+ debuglog: kn
1956
+ };
1957
+ function lr() {
1958
+ this.head = null, this.tail = null, this.length = 0;
1959
+ }
1960
+ lr.prototype.push = function(e) {
1961
+ var t = {
1962
+ data: e,
1963
+ next: null
1964
+ };
1965
+ this.length > 0 ? this.tail.next = t : this.head = t, this.tail = t, ++this.length;
1966
+ }, lr.prototype.unshift = function(e) {
1967
+ var t = {
1968
+ data: e,
1969
+ next: this.head
1970
+ };
1971
+ this.length === 0 && (this.tail = t), this.head = t, ++this.length;
1972
+ }, lr.prototype.shift = function() {
1973
+ if (this.length !== 0) {
1974
+ var e = this.head.data;
1975
+ return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, e;
1976
+ }
1977
+ }, lr.prototype.clear = function() {
1978
+ this.head = this.tail = null, this.length = 0;
1979
+ }, lr.prototype.join = function(e) {
1980
+ if (this.length === 0) return "";
1981
+ for (var t = this.head, n = "" + t.data; t = t.next;) n += e + t.data;
1982
+ return n;
1983
+ }, lr.prototype.concat = function(e) {
1984
+ if (this.length === 0) return G.alloc(0);
1985
+ if (this.length === 1) return this.head.data;
1986
+ for (var t = G.allocUnsafe(e >>> 0), n = this.head, r = 0; n;) n.data.copy(t, r), r += n.data.length, n = n.next;
1987
+ return t;
1988
+ };
1989
+ var ur = G.isEncoding || function(e) {
1990
+ switch (e && e.toLowerCase()) {
1991
+ case "hex":
1992
+ case "utf8":
1993
+ case "utf-8":
1994
+ case "ascii":
1995
+ case "binary":
1996
+ case "base64":
1997
+ case "ucs2":
1998
+ case "ucs-2":
1999
+ case "utf16le":
2000
+ case "utf-16le":
2001
+ case "raw": return !0;
2002
+ default: return !1;
2003
+ }
2004
+ };
2005
+ function dr(e) {
2006
+ if (e && !ur(e)) throw Error("Unknown encoding: " + e);
2007
+ }
2008
+ function fr(e) {
2009
+ switch (this.encoding = (e || "utf8").toLowerCase().replace(/[-_]/, ""), dr(e), this.encoding) {
2010
+ case "utf8":
2011
+ this.surrogateSize = 3;
2012
+ break;
2013
+ case "ucs2":
2014
+ case "utf16le":
2015
+ this.surrogateSize = 2, this.detectIncompleteChar = mr;
2016
+ break;
2017
+ case "base64":
2018
+ this.surrogateSize = 3, this.detectIncompleteChar = hr;
2019
+ break;
2020
+ default:
2021
+ this.write = pr;
2022
+ return;
2023
+ }
2024
+ this.charBuffer = new G(6), this.charReceived = 0, this.charLength = 0;
2025
+ }
2026
+ fr.prototype.write = function(e) {
2027
+ for (var t = ""; this.charLength;) {
2028
+ var n = e.length >= this.charLength - this.charReceived ? this.charLength - this.charReceived : e.length;
2029
+ if (e.copy(this.charBuffer, this.charReceived, 0, n), this.charReceived += n, this.charReceived < this.charLength) return "";
2030
+ e = e.slice(n, e.length), t = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
2031
+ var r = t.charCodeAt(t.length - 1);
2032
+ if (r >= 55296 && r <= 56319) {
2033
+ this.charLength += this.surrogateSize, t = "";
2034
+ continue;
2035
+ }
2036
+ if (this.charReceived = this.charLength = 0, e.length === 0) return t;
2037
+ break;
2038
+ }
2039
+ this.detectIncompleteChar(e);
2040
+ var i = e.length;
2041
+ this.charLength && (e.copy(this.charBuffer, 0, e.length - this.charReceived, i), i -= this.charReceived), t += e.toString(this.encoding, 0, i);
2042
+ var i = t.length - 1, r = t.charCodeAt(i);
2043
+ if (r >= 55296 && r <= 56319) {
2044
+ var a = this.surrogateSize;
2045
+ return this.charLength += a, this.charReceived += a, this.charBuffer.copy(this.charBuffer, a, 0, a), e.copy(this.charBuffer, 0, 0, a), t.substring(0, i);
2046
+ }
2047
+ return t;
2048
+ }, fr.prototype.detectIncompleteChar = function(e) {
2049
+ for (var t = e.length >= 3 ? 3 : e.length; t > 0; t--) {
2050
+ var n = e[e.length - t];
2051
+ if (t == 1 && n >> 5 == 6) {
2052
+ this.charLength = 2;
2053
+ break;
2054
+ }
2055
+ if (t <= 2 && n >> 4 == 14) {
2056
+ this.charLength = 3;
2057
+ break;
2058
+ }
2059
+ if (t <= 3 && n >> 3 == 30) {
2060
+ this.charLength = 4;
2061
+ break;
2062
+ }
2063
+ }
2064
+ this.charReceived = t;
2065
+ }, fr.prototype.end = function(e) {
2066
+ var t = "";
2067
+ if (e && e.length && (t = this.write(e)), this.charReceived) {
2068
+ var n = this.charReceived, r = this.charBuffer, i = this.encoding;
2069
+ t += r.slice(0, n).toString(i);
2070
+ }
2071
+ return t;
2072
+ };
2073
+ function pr(e) {
2074
+ return e.toString(this.encoding);
2075
+ }
2076
+ function mr(e) {
2077
+ this.charReceived = e.length % 2, this.charLength = this.charReceived ? 2 : 0;
2078
+ }
2079
+ function hr(e) {
2080
+ this.charReceived = e.length % 3, this.charLength = this.charReceived ? 3 : 0;
2081
+ }
2082
+ Z.ReadableState = vr;
2083
+ var X = kn("stream");
2084
+ Cn(Z, Y);
2085
+ function gr(e, t, n) {
2086
+ if (typeof e.prependListener == "function") return e.prependListener(t, n);
2087
+ !e._events || !e._events[t] ? e.on(t, n) : Array.isArray(e._events[t]) ? e._events[t].unshift(n) : e._events[t] = [n, e._events[t]];
2088
+ }
2089
+ function _r(e, t) {
2090
+ return e.listeners(t).length;
2091
+ }
2092
+ function vr(e, t) {
2093
+ e ||= {}, this.objectMode = !!e.objectMode, t instanceof di && (this.objectMode = this.objectMode || !!e.readableObjectMode);
2094
+ var n = e.highWaterMark, r = this.objectMode ? 16 : 16 * 1024;
2095
+ this.highWaterMark = n || n === 0 ? n : r, this.highWaterMark = ~~this.highWaterMark, this.buffer = new lr(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.defaultEncoding = e.defaultEncoding || "utf8", this.ranOut = !1, this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, e.encoding && (this.decoder = new fr(e.encoding), this.encoding = e.encoding);
2096
+ }
2097
+ function Z(e) {
2098
+ if (!(this instanceof Z)) return new Z(e);
2099
+ this._readableState = new vr(e, this), this.readable = !0, e && typeof e.read == "function" && (this._read = e.read), Y.call(this);
2100
+ }
2101
+ Z.prototype.push = function(e, t) {
2102
+ var n = this._readableState;
2103
+ return !n.objectMode && typeof e == "string" && (t ||= n.defaultEncoding, t !== n.encoding && (e = G.from(e, t), t = "")), yr(this, n, e, t, !1);
2104
+ }, Z.prototype.unshift = function(e) {
2105
+ var t = this._readableState;
2106
+ return yr(this, t, e, "", !0);
2107
+ }, Z.prototype.isPaused = function() {
2108
+ return this._readableState.flowing === !1;
2109
+ };
2110
+ function yr(e, t, n, r, i) {
2111
+ var a = wr(t, n);
2112
+ if (a) e.emit("error", a);
2113
+ else if (n === null) t.reading = !1, Tr(e, t);
2114
+ else if (t.objectMode || n && n.length > 0) if (t.ended && !i) {
2115
+ var o = /* @__PURE__ */ Error("stream.push() after EOF");
2116
+ e.emit("error", o);
2117
+ } else if (t.endEmitted && i) {
2118
+ var s = /* @__PURE__ */ Error("stream.unshift() after end event");
2119
+ e.emit("error", s);
2120
+ } else {
2121
+ var c;
2122
+ t.decoder && !i && !r && (n = t.decoder.write(n), c = !t.objectMode && n.length === 0), i || (t.reading = !1), c || (t.flowing && t.length === 0 && !t.sync ? (e.emit("data", n), e.read(0)) : (t.length += t.objectMode ? 1 : n.length, i ? t.buffer.unshift(n) : t.buffer.push(n), t.needReadable && Er(e))), Or(e, t);
2123
+ }
2124
+ else i || (t.reading = !1);
2125
+ return br(t);
2126
+ }
2127
+ function br(e) {
2128
+ return !e.ended && (e.needReadable || e.length < e.highWaterMark || e.length === 0);
2129
+ }
2130
+ Z.prototype.setEncoding = function(e) {
2131
+ return this._readableState.decoder = new fr(e), this._readableState.encoding = e, this;
2132
+ };
2133
+ var xr = 8388608;
2134
+ function Sr(e) {
2135
+ return e >= xr ? e = xr : (e--, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e++), e;
2136
+ }
2137
+ function Cr(e, t) {
2138
+ return e <= 0 || t.length === 0 && t.ended ? 0 : t.objectMode ? 1 : e === e ? (e > t.highWaterMark && (t.highWaterMark = Sr(e)), e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0, 0)) : t.flowing && t.length ? t.buffer.head.data.length : t.length;
2139
+ }
2140
+ Z.prototype.read = function(e) {
2141
+ X("read", e), e = parseInt(e, 10);
2142
+ var t = this._readableState, n = e;
2143
+ if (e !== 0 && (t.emittedReadable = !1), e === 0 && t.needReadable && (t.length >= t.highWaterMark || t.ended)) return X("read: emitReadable", t.length, t.ended), t.length === 0 && t.ended ? zr(this) : Er(this), null;
2144
+ if (e = Cr(e, t), e === 0 && t.ended) return t.length === 0 && zr(this), null;
2145
+ var r = t.needReadable;
2146
+ X("need readable", r), (t.length === 0 || t.length - e < t.highWaterMark) && (r = !0, X("length less than watermark", r)), t.ended || t.reading ? (r = !1, X("reading or ended", r)) : r && (X("do read"), t.reading = !0, t.sync = !0, t.length === 0 && (t.needReadable = !0), this._read(t.highWaterMark), t.sync = !1, t.reading || (e = Cr(n, t)));
2147
+ var i = e > 0 ? Fr(e, t) : null;
2148
+ return i === null ? (t.needReadable = !0, e = 0) : t.length -= e, t.length === 0 && (t.ended || (t.needReadable = !0), n !== e && t.ended && zr(this)), i !== null && this.emit("data", i), i;
2149
+ };
2150
+ function wr(e, t) {
2151
+ var n = null;
2152
+ return !J(t) && typeof t != "string" && t != null && !e.objectMode && (n = /* @__PURE__ */ TypeError("Invalid non-string/buffer chunk")), n;
2153
+ }
2154
+ function Tr(e, t) {
2155
+ if (!t.ended) {
2156
+ if (t.decoder) {
2157
+ var n = t.decoder.end();
2158
+ n && n.length && (t.buffer.push(n), t.length += t.objectMode ? 1 : n.length);
2159
+ }
2160
+ t.ended = !0, Er(e);
2161
+ }
2162
+ }
2163
+ function Er(e) {
2164
+ var t = e._readableState;
2165
+ t.needReadable = !1, t.emittedReadable || (X("emitReadable", t.flowing), t.emittedReadable = !0, t.sync ? vn(Dr, e) : Dr(e));
2166
+ }
2167
+ function Dr(e) {
2168
+ X("emit readable"), e.emit("readable"), Pr(e);
2169
+ }
2170
+ function Or(e, t) {
2171
+ t.readingMore || (t.readingMore = !0, vn(kr, e, t));
2172
+ }
2173
+ function kr(e, t) {
2174
+ for (var n = t.length; !t.reading && !t.flowing && !t.ended && t.length < t.highWaterMark && (X("maybeReadMore read 0"), e.read(0), n !== t.length);) n = t.length;
2175
+ t.readingMore = !1;
2176
+ }
2177
+ Z.prototype._read = function(e) {
2178
+ this.emit("error", /* @__PURE__ */ Error("not implemented"));
2179
+ }, Z.prototype.pipe = function(e, t) {
2180
+ var n = this, r = this._readableState;
2181
+ switch (r.pipesCount) {
2182
+ case 0:
2183
+ r.pipes = e;
2184
+ break;
2185
+ case 1:
2186
+ r.pipes = [r.pipes, e];
2187
+ break;
2188
+ default:
2189
+ r.pipes.push(e);
2190
+ break;
2191
+ }
2192
+ r.pipesCount += 1, X("pipe count=%d opts=%j", r.pipesCount, t);
2193
+ var i = !t || t.end !== !1 ? o : l;
2194
+ r.endEmitted ? vn(i) : n.once("end", i), e.on("unpipe", a);
2195
+ function a(e) {
2196
+ X("onunpipe"), e === n && l();
2197
+ }
2198
+ function o() {
2199
+ X("onend"), e.end();
2200
+ }
2201
+ var s = Ar(n);
2202
+ e.on("drain", s);
2203
+ var c = !1;
2204
+ function l() {
2205
+ X("cleanup"), e.removeListener("close", p), e.removeListener("finish", m), e.removeListener("drain", s), e.removeListener("error", f), e.removeListener("unpipe", a), n.removeListener("end", o), n.removeListener("end", l), n.removeListener("data", d), c = !0, r.awaitDrain && (!e._writableState || e._writableState.needDrain) && s();
2206
+ }
2207
+ var u = !1;
2208
+ n.on("data", d);
2209
+ function d(t) {
2210
+ X("ondata"), u = !1, !1 === e.write(t) && !u && ((r.pipesCount === 1 && r.pipes === e || r.pipesCount > 1 && Hr(r.pipes, e) !== -1) && !c && (X("false write response, pause", n._readableState.awaitDrain), n._readableState.awaitDrain++, u = !0), n.pause());
2211
+ }
2212
+ function f(t) {
2213
+ X("onerror", t), h(), e.removeListener("error", f), _r(e, "error") === 0 && e.emit("error", t);
2214
+ }
2215
+ gr(e, "error", f);
2216
+ function p() {
2217
+ e.removeListener("finish", m), h();
2218
+ }
2219
+ e.once("close", p);
2220
+ function m() {
2221
+ X("onfinish"), e.removeListener("close", p), h();
2222
+ }
2223
+ e.once("finish", m);
2224
+ function h() {
2225
+ X("unpipe"), n.unpipe(e);
2226
+ }
2227
+ return e.emit("pipe", n), r.flowing || (X("pipe resume"), n.resume()), e;
2228
+ };
2229
+ function Ar(e) {
2230
+ return function() {
2231
+ var t = e._readableState;
2232
+ X("pipeOnDrain", t.awaitDrain), t.awaitDrain && t.awaitDrain--, t.awaitDrain === 0 && e.listeners("data").length && (t.flowing = !0, Pr(e));
2233
+ };
2234
+ }
2235
+ Z.prototype.unpipe = function(e) {
2236
+ var t = this._readableState;
2237
+ if (t.pipesCount === 0) return this;
2238
+ if (t.pipesCount === 1) return e && e !== t.pipes ? this : (e ||= t.pipes, t.pipes = null, t.pipesCount = 0, t.flowing = !1, e && e.emit("unpipe", this), this);
2239
+ if (!e) {
2240
+ var n = t.pipes, r = t.pipesCount;
2241
+ t.pipes = null, t.pipesCount = 0, t.flowing = !1;
2242
+ for (var i = 0; i < r; i++) n[i].emit("unpipe", this);
2243
+ return this;
2244
+ }
2245
+ var a = Hr(t.pipes, e);
2246
+ return a === -1 ? this : (t.pipes.splice(a, 1), --t.pipesCount, t.pipesCount === 1 && (t.pipes = t.pipes[0]), e.emit("unpipe", this), this);
2247
+ }, Z.prototype.on = function(e, t) {
2248
+ var n = Y.prototype.on.call(this, e, t);
2249
+ if (e === "data") this._readableState.flowing !== !1 && this.resume();
2250
+ else if (e === "readable") {
2251
+ var r = this._readableState;
2252
+ !r.endEmitted && !r.readableListening && (r.readableListening = r.needReadable = !0, r.emittedReadable = !1, r.reading ? r.length && Er(this) : vn(jr, this));
2253
+ }
2254
+ return n;
2255
+ }, Z.prototype.addListener = Z.prototype.on;
2256
+ function jr(e) {
2257
+ X("readable nexttick read 0"), e.read(0);
2258
+ }
2259
+ Z.prototype.resume = function() {
2260
+ var e = this._readableState;
2261
+ return e.flowing || (X("resume"), e.flowing = !0, Mr(this, e)), this;
2262
+ };
2263
+ function Mr(e, t) {
2264
+ t.resumeScheduled || (t.resumeScheduled = !0, vn(Nr, e, t));
2265
+ }
2266
+ function Nr(e, t) {
2267
+ t.reading || (X("resume read 0"), e.read(0)), t.resumeScheduled = !1, t.awaitDrain = 0, e.emit("resume"), Pr(e), t.flowing && !t.reading && e.read(0);
2268
+ }
2269
+ Z.prototype.pause = function() {
2270
+ return X("call pause flowing=%j", this._readableState.flowing), !1 !== this._readableState.flowing && (X("pause"), this._readableState.flowing = !1, this.emit("pause")), this;
2271
+ };
2272
+ function Pr(e) {
2273
+ var t = e._readableState;
2274
+ for (X("flow", t.flowing); t.flowing && e.read() !== null;);
2275
+ }
2276
+ Z.prototype.wrap = function(e) {
2277
+ var t = this._readableState, n = !1, r = this;
2278
+ for (var i in e.on("end", function() {
2279
+ if (X("wrapped end"), t.decoder && !t.ended) {
2280
+ var e = t.decoder.end();
2281
+ e && e.length && r.push(e);
2282
+ }
2283
+ r.push(null);
2284
+ }), e.on("data", function(i) {
2285
+ X("wrapped data"), t.decoder && (i = t.decoder.write(i)), !(t.objectMode && i == null) && (!t.objectMode && (!i || !i.length) || r.push(i) || (n = !0, e.pause()));
2286
+ }), e) this[i] === void 0 && typeof e[i] == "function" && (this[i] = function(t) {
2287
+ return function() {
2288
+ return e[t].apply(e, arguments);
2289
+ };
2290
+ }(i));
2291
+ return Vr([
2292
+ "error",
2293
+ "close",
2294
+ "destroy",
2295
+ "pause",
2296
+ "resume"
2297
+ ], function(t) {
2298
+ e.on(t, r.emit.bind(r, t));
2299
+ }), r._read = function(t) {
2300
+ X("wrapped _read", t), n && (n = !1, e.resume());
2301
+ }, r;
2302
+ }, Z._fromList = Fr;
2303
+ function Fr(e, t) {
2304
+ if (t.length === 0) return null;
2305
+ var n;
2306
+ return t.objectMode ? n = t.buffer.shift() : !e || e >= t.length ? (n = t.decoder ? t.buffer.join("") : t.buffer.length === 1 ? t.buffer.head.data : t.buffer.concat(t.length), t.buffer.clear()) : n = Ir(e, t.buffer, t.decoder), n;
2307
+ }
2308
+ function Ir(e, t, n) {
2309
+ var r;
2310
+ return e < t.head.data.length ? (r = t.head.data.slice(0, e), t.head.data = t.head.data.slice(e)) : r = e === t.head.data.length ? t.shift() : n ? Lr(e, t) : Rr(e, t), r;
2311
+ }
2312
+ function Lr(e, t) {
2313
+ var n = t.head, r = 1, i = n.data;
2314
+ for (e -= i.length; n = n.next;) {
2315
+ var a = n.data, o = e > a.length ? a.length : e;
2316
+ if (o === a.length ? i += a : i += a.slice(0, e), e -= o, e === 0) {
2317
+ o === a.length ? (++r, n.next ? t.head = n.next : t.head = t.tail = null) : (t.head = n, n.data = a.slice(o));
2318
+ break;
2319
+ }
2320
+ ++r;
2321
+ }
2322
+ return t.length -= r, i;
2323
+ }
2324
+ function Rr(e, t) {
2325
+ var n = G.allocUnsafe(e), r = t.head, i = 1;
2326
+ for (r.data.copy(n), e -= r.data.length; r = r.next;) {
2327
+ var a = r.data, o = e > a.length ? a.length : e;
2328
+ if (a.copy(n, n.length - e, 0, o), e -= o, e === 0) {
2329
+ o === a.length ? (++i, r.next ? t.head = r.next : t.head = t.tail = null) : (t.head = r, r.data = a.slice(o));
2330
+ break;
2331
+ }
2332
+ ++i;
2333
+ }
2334
+ return t.length -= i, n;
2335
+ }
2336
+ function zr(e) {
2337
+ var t = e._readableState;
2338
+ if (t.length > 0) throw Error("\"endReadable()\" called on non-empty stream");
2339
+ t.endEmitted || (t.ended = !0, vn(Br, t, e));
2340
+ }
2341
+ function Br(e, t) {
2342
+ !e.endEmitted && e.length === 0 && (e.endEmitted = !0, t.readable = !1, t.emit("end"));
2343
+ }
2344
+ function Vr(e, t) {
2345
+ for (var n = 0, r = e.length; n < r; n++) t(e[n], n);
2346
+ }
2347
+ function Hr(e, t) {
2348
+ for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
2349
+ return -1;
2350
+ }
2351
+ Q.WritableState = Gr, Cn(Q, Y);
2352
+ function Ur() {}
2353
+ function Wr(e, t, n) {
2354
+ this.chunk = e, this.encoding = t, this.callback = n, this.next = null;
2355
+ }
2356
+ function Gr(e, t) {
2357
+ Object.defineProperty(this, "buffer", { get: En(function() {
2358
+ return this.getBuffer();
2359
+ }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.") }), e ||= {}, this.objectMode = !!e.objectMode, t instanceof di && (this.objectMode = this.objectMode || !!e.writableObjectMode);
2360
+ var n = e.highWaterMark, r = this.objectMode ? 16 : 16 * 1024;
2361
+ this.highWaterMark = n || n === 0 ? n : r, this.highWaterMark = ~~this.highWaterMark, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1;
2362
+ var i = e.decodeStrings === !1;
2363
+ this.decodeStrings = !i, this.defaultEncoding = e.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(e) {
2364
+ $r(t, e);
2365
+ }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new si(this);
2366
+ }
2367
+ Gr.prototype.getBuffer = function() {
2368
+ for (var e = this.bufferedRequest, t = []; e;) t.push(e), e = e.next;
2369
+ return t;
2370
+ };
2371
+ function Q(e) {
2372
+ if (!(this instanceof Q) && !(this instanceof di)) return new Q(e);
2373
+ this._writableState = new Gr(e, this), this.writable = !0, e && (typeof e.write == "function" && (this._write = e.write), typeof e.writev == "function" && (this._writev = e.writev)), Y.call(this);
2374
+ }
2375
+ Q.prototype.pipe = function() {
2376
+ this.emit("error", /* @__PURE__ */ Error("Cannot pipe, not readable"));
2377
+ };
2378
+ function Kr(e, t) {
2379
+ var n = /* @__PURE__ */ Error("write after end");
2380
+ e.emit("error", n), vn(t, n);
2381
+ }
2382
+ function qr(e, t, n, r) {
2383
+ var i = !0, a = !1;
2384
+ return n === null ? a = /* @__PURE__ */ TypeError("May not write null values to stream") : !G.isBuffer(n) && typeof n != "string" && n !== void 0 && !t.objectMode && (a = /* @__PURE__ */ TypeError("Invalid non-string/buffer chunk")), a && (e.emit("error", a), vn(r, a), i = !1), i;
2385
+ }
2386
+ Q.prototype.write = function(e, t, n) {
2387
+ var r = this._writableState, i = !1;
2388
+ return typeof t == "function" && (n = t, t = null), G.isBuffer(e) ? t = "buffer" : t ||= r.defaultEncoding, typeof n != "function" && (n = Ur), r.ended ? Kr(this, n) : qr(this, r, e, n) && (r.pendingcb++, i = Yr(this, r, e, t, n)), i;
2389
+ }, Q.prototype.cork = function() {
2390
+ var e = this._writableState;
2391
+ e.corked++;
2392
+ }, Q.prototype.uncork = function() {
2393
+ var e = this._writableState;
2394
+ e.corked && (e.corked--, !e.writing && !e.corked && !e.finished && !e.bufferProcessing && e.bufferedRequest && ni(this, e));
2395
+ }, Q.prototype.setDefaultEncoding = function(e) {
2396
+ if (typeof e == "string" && (e = e.toLowerCase()), !([
2397
+ "hex",
2398
+ "utf8",
2399
+ "utf-8",
2400
+ "ascii",
2401
+ "binary",
2402
+ "base64",
2403
+ "ucs2",
2404
+ "ucs-2",
2405
+ "utf16le",
2406
+ "utf-16le",
2407
+ "raw"
2408
+ ].indexOf((e + "").toLowerCase()) > -1)) throw TypeError("Unknown encoding: " + e);
2409
+ return this._writableState.defaultEncoding = e, this;
2410
+ };
2411
+ function Jr(e, t, n) {
2412
+ return !e.objectMode && e.decodeStrings !== !1 && typeof t == "string" && (t = G.from(t, n)), t;
2413
+ }
2414
+ function Yr(e, t, n, r, i) {
2415
+ n = Jr(t, n, r), G.isBuffer(n) && (r = "buffer");
2416
+ var a = t.objectMode ? 1 : n.length;
2417
+ t.length += a;
2418
+ var o = t.length < t.highWaterMark;
2419
+ if (o || (t.needDrain = !0), t.writing || t.corked) {
2420
+ var s = t.lastBufferedRequest;
2421
+ t.lastBufferedRequest = new Wr(n, r, i), s ? s.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1;
2422
+ } else Xr(e, t, !1, a, n, r, i);
2423
+ return o;
2424
+ }
2425
+ function Xr(e, t, n, r, i, a, o) {
2426
+ t.writelen = r, t.writecb = o, t.writing = !0, t.sync = !0, n ? e._writev(i, t.onwrite) : e._write(i, a, t.onwrite), t.sync = !1;
2427
+ }
2428
+ function Zr(e, t, n, r, i) {
2429
+ --t.pendingcb, n ? vn(i, r) : i(r), e._writableState.errorEmitted = !0, e.emit("error", r);
2430
+ }
2431
+ function Qr(e) {
2432
+ e.writing = !1, e.writecb = null, e.length -= e.writelen, e.writelen = 0;
2433
+ }
2434
+ function $r(e, t) {
2435
+ var n = e._writableState, r = n.sync, i = n.writecb;
2436
+ if (Qr(n), t) Zr(e, n, r, t, i);
2437
+ else {
2438
+ var a = ri(n);
2439
+ !a && !n.corked && !n.bufferProcessing && n.bufferedRequest && ni(e, n), r ? vn(ei, e, n, a, i) : ei(e, n, a, i);
2440
+ }
2441
+ }
2442
+ function ei(e, t, n, r) {
2443
+ n || ti(e, t), t.pendingcb--, r(), ai(e, t);
2444
+ }
2445
+ function ti(e, t) {
2446
+ t.length === 0 && t.needDrain && (t.needDrain = !1, e.emit("drain"));
2447
+ }
2448
+ function ni(e, t) {
2449
+ t.bufferProcessing = !0;
2450
+ var n = t.bufferedRequest;
2451
+ if (e._writev && n && n.next) {
2452
+ var r = t.bufferedRequestCount, i = Array(r), a = t.corkedRequestsFree;
2453
+ a.entry = n;
2454
+ for (var o = 0; n;) i[o] = n, n = n.next, o += 1;
2455
+ Xr(e, t, !0, t.length, i, "", a.finish), t.pendingcb++, t.lastBufferedRequest = null, a.next ? (t.corkedRequestsFree = a.next, a.next = null) : t.corkedRequestsFree = new si(t);
2456
+ } else {
2457
+ for (; n;) {
2458
+ var s = n.chunk, c = n.encoding, l = n.callback;
2459
+ if (Xr(e, t, !1, t.objectMode ? 1 : s.length, s, c, l), n = n.next, t.writing) break;
2460
+ }
2461
+ n === null && (t.lastBufferedRequest = null);
2462
+ }
2463
+ t.bufferedRequestCount = 0, t.bufferedRequest = n, t.bufferProcessing = !1;
2464
+ }
2465
+ Q.prototype._write = function(e, t, n) {
2466
+ n(/* @__PURE__ */ Error("not implemented"));
2467
+ }, Q.prototype._writev = null, Q.prototype.end = function(e, t, n) {
2468
+ var r = this._writableState;
2469
+ typeof e == "function" ? (n = e, e = null, t = null) : typeof t == "function" && (n = t, t = null), e != null && this.write(e, t), r.corked && (r.corked = 1, this.uncork()), !r.ending && !r.finished && oi(this, r, n);
2470
+ };
2471
+ function ri(e) {
2472
+ return e.ending && e.length === 0 && e.bufferedRequest === null && !e.finished && !e.writing;
2473
+ }
2474
+ function ii(e, t) {
2475
+ t.prefinished || (t.prefinished = !0, e.emit("prefinish"));
2476
+ }
2477
+ function ai(e, t) {
2478
+ var n = ri(t);
2479
+ return n && (t.pendingcb === 0 ? (ii(e, t), t.finished = !0, e.emit("finish")) : ii(e, t)), n;
2480
+ }
2481
+ function oi(e, t, n) {
2482
+ t.ending = !0, ai(e, t), n && (t.finished ? vn(n) : e.once("finish", n)), t.ended = !0, e.writable = !1;
2483
+ }
2484
+ function si(e) {
2485
+ var t = this;
2486
+ this.next = null, this.entry = null, this.finish = function(n) {
2487
+ var r = t.entry;
2488
+ for (t.entry = null; r;) {
2489
+ var i = r.callback;
2490
+ e.pendingcb--, i(n), r = r.next;
2491
+ }
2492
+ e.corkedRequestsFree ? e.corkedRequestsFree.next = t : e.corkedRequestsFree = t;
2493
+ };
2494
+ }
2495
+ Cn(di, Z);
2496
+ for (var ci = Object.keys(Q.prototype), li = 0; li < ci.length; li++) {
2497
+ var ui = ci[li];
2498
+ di.prototype[ui] || (di.prototype[ui] = Q.prototype[ui]);
2499
+ }
2500
+ function di(e) {
2501
+ if (!(this instanceof di)) return new di(e);
2502
+ Z.call(this, e), Q.call(this, e), e && e.readable === !1 && (this.readable = !1), e && e.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, e && e.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", fi);
2503
+ }
2504
+ function fi() {
2505
+ this.allowHalfOpen || this._writableState.ended || vn(pi, this);
2506
+ }
2507
+ function pi(e) {
2508
+ e.end();
2509
+ }
2510
+ Cn(gi, di);
2511
+ function mi(e) {
2512
+ this.afterTransform = function(t, n) {
2513
+ return hi(e, t, n);
2514
+ }, this.needTransform = !1, this.transforming = !1, this.writecb = null, this.writechunk = null, this.writeencoding = null;
2515
+ }
2516
+ function hi(e, t, n) {
2517
+ var r = e._transformState;
2518
+ r.transforming = !1;
2519
+ var i = r.writecb;
2520
+ if (!i) return e.emit("error", /* @__PURE__ */ Error("no writecb in Transform class"));
2521
+ r.writechunk = null, r.writecb = null, n != null && e.push(n), i(t);
2522
+ var a = e._readableState;
2523
+ a.reading = !1, (a.needReadable || a.length < a.highWaterMark) && e._read(a.highWaterMark);
2524
+ }
2525
+ function gi(e) {
2526
+ if (!(this instanceof gi)) return new gi(e);
2527
+ di.call(this, e), this._transformState = new mi(this);
2528
+ var t = this;
2529
+ this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.once("prefinish", function() {
2530
+ typeof this._flush == "function" ? this._flush(function(e) {
2531
+ _i(t, e);
2532
+ }) : _i(t);
2533
+ });
2534
+ }
2535
+ gi.prototype.push = function(e, t) {
2536
+ return this._transformState.needTransform = !1, di.prototype.push.call(this, e, t);
2537
+ }, gi.prototype._transform = function(e, t, n) {
2538
+ throw Error("Not implemented");
2539
+ }, gi.prototype._write = function(e, t, n) {
2540
+ var r = this._transformState;
2541
+ if (r.writecb = n, r.writechunk = e, r.writeencoding = t, !r.transforming) {
2542
+ var i = this._readableState;
2543
+ (r.needTransform || i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark);
2544
+ }
2545
+ }, gi.prototype._read = function(e) {
2546
+ var t = this._transformState;
2547
+ t.writechunk !== null && t.writecb && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) : t.needTransform = !0;
2548
+ };
2549
+ function _i(e, t) {
2550
+ if (t) return e.emit("error", t);
2551
+ var n = e._writableState, r = e._transformState;
2552
+ if (n.length) throw Error("Calling transform done when ws.length != 0");
2553
+ if (r.transforming) throw Error("Calling transform done when still transforming");
2554
+ return e.push(null);
2555
+ }
2556
+ Cn(vi, gi);
2557
+ function vi(e) {
2558
+ if (!(this instanceof vi)) return new vi(e);
2559
+ gi.call(this, e);
2560
+ }
2561
+ vi.prototype._transform = function(e, t, n) {
2562
+ n(null, e);
2563
+ }, Cn(yi, Y), yi.Readable = Z, yi.Writable = Q, yi.Duplex = di, yi.Transform = gi, yi.PassThrough = vi, yi.Stream = yi;
2564
+ function yi() {
2565
+ Y.call(this);
2566
+ }
2567
+ yi.prototype.pipe = function(e, t) {
2568
+ var n = this;
2569
+ function r(t) {
2570
+ e.writable && !1 === e.write(t) && n.pause && n.pause();
2571
+ }
2572
+ n.on("data", r);
2573
+ function i() {
2574
+ n.readable && n.resume && n.resume();
2575
+ }
2576
+ e.on("drain", i), !e._isStdio && (!t || t.end !== !1) && (n.on("end", o), n.on("close", s));
2577
+ var a = !1;
2578
+ function o() {
2579
+ a || (a = !0, e.end());
2580
+ }
2581
+ function s() {
2582
+ a || (a = !0, typeof e.destroy == "function" && e.destroy());
2583
+ }
2584
+ function c(e) {
2585
+ if (l(), Y.listenerCount(this, "error") === 0) throw e;
2586
+ }
2587
+ n.on("error", c), e.on("error", c);
2588
+ function l() {
2589
+ n.removeListener("data", r), e.removeListener("drain", i), n.removeListener("end", o), n.removeListener("close", s), n.removeListener("error", c), e.removeListener("error", c), n.removeListener("end", l), n.removeListener("close", l), e.removeListener("close", l);
2590
+ }
2591
+ return n.on("end", l), n.on("close", l), e.on("close", l), e.emit("pipe", n), e;
2592
+ };
2593
+ var bi = (e) => ({
2594
+ start_time: e.duration ? Date.now() : null,
2595
+ fixed_size_buffer: "",
2596
+ count_written: 0,
2597
+ count_created: 0
2598
+ }), xi = function(e = {}) {
2599
+ return e.seed ? e.seed = e.seed * Math.PI * 100 % 100 / 100 : Math.random();
2600
+ }, Si = {
2601
+ ascii: function({ options: e }) {
2602
+ let t = [], n = Math.ceil(xi(e) * e.maxWordLength);
2603
+ for (let r = 0; r < n; r++) {
2604
+ let n = Math.floor(xi(e) * 32);
2605
+ t.push(String.fromCharCode(n + (n < 16 ? 65 : 81)));
2606
+ }
2607
+ return t.join("");
2608
+ },
2609
+ int: function({ options: e }) {
2610
+ return Math.floor(xi(e) * 2 ** 52);
2611
+ },
2612
+ bool: function({ options: e }) {
2613
+ return Math.floor(xi(e) * 2);
2614
+ }
2615
+ }, Ci = function(e) {
2616
+ return e.replace(/_([a-z])/gi, function(e, t) {
2617
+ return t.toUpperCase();
2618
+ });
2619
+ }, wi = (e) => {
2620
+ e.object_mode && (e.objectMode = e.object_mode), e.high_water_mark && (e.highWaterMark = e.high_water_mark);
2621
+ let t = {};
2622
+ for (let n in e) t[Ci(n)] = e[n];
2623
+ let n = {
2624
+ columns: 8,
2625
+ delimiter: ",",
2626
+ duration: null,
2627
+ encoding: null,
2628
+ end: null,
2629
+ eof: !1,
2630
+ fixedSize: !1,
2631
+ length: -1,
2632
+ maxWordLength: 16,
2633
+ rowDelimiter: "\n",
2634
+ seed: !1,
2635
+ sleep: 0
2636
+ };
2637
+ for (let e in n) t[e] === void 0 && (t[e] = n[e]);
2638
+ t.eof === !0 && (t.eof = t.rowDelimiter), typeof t.columns == "number" && (t.columns = Array(t.columns));
2639
+ let r = Object.keys(Si).filter((e) => !["super_", "camelize"].includes(e));
2640
+ for (let e = 0; e < t.columns.length; e++) {
2641
+ let n = t.columns[e] || "ascii";
2642
+ if (typeof n == "string") {
2643
+ if (!r.includes(n)) throw Error(`Invalid column type: got "${n}", default values are ${JSON.stringify(r)}`);
2644
+ t.columns[e] = Si[n];
2645
+ }
2646
+ }
2647
+ return t;
2648
+ }, Ti = (e, t, n, r, i) => {
2649
+ let a = [], o = 0;
2650
+ for (e.fixedSize && (o = t.fixed_size_buffer.length, o !== 0 && a.push(t.fixed_size_buffer));;) {
2651
+ if (t.count_created === e.length || e.end && Date.now() > e.end || e.duration && Date.now() > t.start_time + e.duration) {
2652
+ if (a.length) {
2653
+ if (e.objectMode) for (let e of a) r(e);
2654
+ else r(a.join("") + (e.eof ? e.eof : ""));
2655
+ t.end = !0;
2656
+ } else i();
2657
+ return;
2658
+ }
2659
+ let s = [], c;
2660
+ for (let n of e.columns) {
2661
+ let r = n({
2662
+ options: e,
2663
+ state: t
2664
+ }), a = typeof r;
2665
+ if (r !== null && a !== "string" && a !== "number") {
2666
+ i(Error([
2667
+ "INVALID_VALUE:",
2668
+ "values returned by column function must be",
2669
+ "a string, a number or null,",
2670
+ `got ${JSON.stringify(r)}`
2671
+ ].join(" ")));
2672
+ return;
2673
+ }
2674
+ s.push(r);
2675
+ }
2676
+ if (e.objectMode) {
2677
+ c = 0;
2678
+ for (let e of s) c += e.length;
2679
+ } else s = (t.count_created === 0 ? "" : e.rowDelimiter) + s.join(e.delimiter), c = s.length;
2680
+ if (t.count_created++, o + c > n) {
2681
+ if (e.objectMode) {
2682
+ a.push(s);
2683
+ for (let e of a) r(e);
2684
+ } else e.fixedSize ? (t.fixed_size_buffer = s.substr(n - o), a.push(s.substr(0, n - o))) : a.push(s), r(a.join(""));
2685
+ return;
2686
+ }
2687
+ o += c, a.push(s);
2688
+ }
2689
+ }, Ei = function(e = {}) {
2690
+ return this.options = wi(e), yi.Readable.call(this, this.options), this.state = bi(this.options), this;
2691
+ };
2692
+ cr.inherits(Ei, yi.Readable), Ei.prototype.end = function() {
2693
+ this.push(null);
2694
+ }, Ei.prototype._read = function(e) {
2695
+ setImmediate(() => {
2696
+ this.__read(e);
2697
+ });
2698
+ }, Ei.prototype.__read = function(e) {
2699
+ Ti(this.options, this.state, e, (e) => {
2700
+ this.__push(e);
2701
+ }, (e) => {
2702
+ e ? this.destroy(e) : this.push(null);
2703
+ });
2704
+ }, Ei.prototype.__push = function(e) {
2705
+ let t = () => {
2706
+ if (this.state.count_written++, this.push(e), this.state.end === !0) return this.push(null);
2707
+ };
2708
+ this.options.sleep > 0 ? setTimeout(t, this.options.sleep) : t();
2709
+ };
2710
+ var $ = class e extends Error {
2711
+ constructor(t, n, r, ...i) {
2712
+ Array.isArray(n) && (n = n.join(" ").trim()), super(n), Error.captureStackTrace !== void 0 && Error.captureStackTrace(this, e), this.code = t;
2713
+ for (let e of i) for (let t in e) {
2714
+ let n = e[t];
2715
+ this[t] = J(n) ? n.toString(r.encoding) : n == null ? n : JSON.parse(JSON.stringify(n));
2716
+ }
2717
+ }
2718
+ }, Di = function(e) {
2719
+ return typeof e == "object" && !!e && !Array.isArray(e);
2720
+ }, Oi = function(e) {
2721
+ let t = [];
2722
+ for (let n = 0, r = e.length; n < r; n++) {
2723
+ let r = e[n];
2724
+ if (r == null || r === !1) t[n] = { disabled: !0 };
2725
+ else if (typeof r == "string" || typeof r == "number") t[n] = { name: `${r}` };
2726
+ else if (Di(r)) {
2727
+ if (typeof r.name != "string") throw new $("CSV_OPTION_COLUMNS_MISSING_NAME", [
2728
+ "Option columns missing name:",
2729
+ `property "name" is required at position ${n}`,
2730
+ "when column is an object literal"
2731
+ ]);
2732
+ t[n] = r;
2733
+ } else throw new $("CSV_INVALID_COLUMN_DEFINITION", [
2734
+ "Invalid column definition:",
2735
+ "expect a string or a literal object,",
2736
+ `got ${JSON.stringify(r)} at position ${n}`
2737
+ ]);
2738
+ }
2739
+ return t;
2740
+ }, ki = class {
2741
+ constructor(e = 100) {
2742
+ this.size = e, this.length = 0, this.buf = G.allocUnsafe(e);
2743
+ }
2744
+ prepend(e) {
2745
+ if (J(e)) {
2746
+ let t = this.length + e.length;
2747
+ if (t >= this.size && (this.resize(), t >= this.size)) throw Error("INVALID_BUFFER_STATE");
2748
+ let n = this.buf;
2749
+ this.buf = G.allocUnsafe(this.size), e.copy(this.buf, 0), n.copy(this.buf, e.length), this.length += e.length;
2750
+ } else {
2751
+ let t = this.length++;
2752
+ t === this.size && this.resize();
2753
+ let n = this.clone();
2754
+ this.buf[0] = e, n.copy(this.buf, 1, 0, t);
2755
+ }
2756
+ }
2757
+ append(e) {
2758
+ let t = this.length++;
2759
+ t === this.size && this.resize(), this.buf[t] = e;
2760
+ }
2761
+ clone() {
2762
+ return G.from(this.buf.slice(0, this.length));
2763
+ }
2764
+ resize() {
2765
+ let e = this.length;
2766
+ this.size *= 2;
2767
+ let t = G.allocUnsafe(this.size);
2768
+ this.buf.copy(t, 0, 0, e), this.buf = t;
2769
+ }
2770
+ toString(e) {
2771
+ return e ? this.buf.slice(0, this.length).toString(e) : Uint8Array.prototype.slice.call(this.buf.slice(0, this.length));
2772
+ }
2773
+ toJSON() {
2774
+ return this.toString("utf8");
2775
+ }
2776
+ reset() {
2777
+ this.length = 0;
2778
+ }
2779
+ }, Ai = function(e) {
2780
+ let t = [
2781
+ 32,
2782
+ 9,
2783
+ 10,
2784
+ 13,
2785
+ 12,
2786
+ 11,
2787
+ 160,
2788
+ 5760,
2789
+ 8192,
2790
+ 8193,
2791
+ 8194,
2792
+ 8195,
2793
+ 8196,
2794
+ 8197,
2795
+ 8198,
2796
+ 8199,
2797
+ 8200,
2798
+ 8201,
2799
+ 8202,
2800
+ 8232,
2801
+ 8233,
2802
+ 8239,
2803
+ 8287,
2804
+ 12288,
2805
+ 65279
2806
+ ].reduce((t, n) => {
2807
+ let r = G.from(String.fromCharCode(n), e.encoding);
2808
+ return n !== 63 && r.length === 1 && r[0] === 63 || t.push(r), t;
2809
+ }, []), n = /* @__PURE__ */ new Uint8Array(256);
2810
+ for (let e of t) n[e[0]] = 1;
2811
+ return {
2812
+ bomSkipped: !1,
2813
+ bufBytesStart: 0,
2814
+ castField: e.cast_function,
2815
+ commenting: !1,
2816
+ delimiterBufPrevious: void 0,
2817
+ delimiterDiscovered: !1,
2818
+ error: void 0,
2819
+ enabled: e.from_line === 1,
2820
+ escaping: !1,
2821
+ escapeIsQuote: J(e.escape) && J(e.quote) && G.compare(e.escape, e.quote) === 0,
2822
+ expectedRecordLength: Array.isArray(e.columns) ? e.columns.length : void 0,
2823
+ field: new ki(20),
2824
+ firstLineToHeaders: e.cast_first_line_to_header,
2825
+ needMoreDataSize: Math.max(e.comment === null ? 0 : e.comment.length, ...e.delimiter ? e.delimiter.map((e) => e.length) : [], +!!e.delimiter_auto, e.quote === null ? 0 : e.quote.length, ...t.map((e) => e.length)),
2826
+ previousBuf: void 0,
2827
+ quoting: !1,
2828
+ stop: !1,
2829
+ rawBuffer: new ki(100),
2830
+ record: [],
2831
+ recordHasError: !1,
2832
+ record_length: 0,
2833
+ recordDelimiterMaxLength: e.record_delimiter.length === 0 ? 0 : Math.max(...e.record_delimiter.map((e) => e.length)),
2834
+ trimChars: [G.from(" ", e.encoding)[0], G.from(" ", e.encoding)[0]],
2835
+ wasQuoting: !1,
2836
+ wasRowDelimiter: !1,
2837
+ timchars: t,
2838
+ timcharFirstBytes: n
2839
+ };
2840
+ }, ji = function(e) {
2841
+ return e.replace(/([A-Z])/g, function(e, t) {
2842
+ return "_" + t.toLowerCase();
2843
+ });
2844
+ }, Mi = function(e) {
2845
+ let t = {};
2846
+ for (let n in e) t[ji(n)] = e[n];
2847
+ if (t.encoding === void 0 || t.encoding === !0) t.encoding = "utf8";
2848
+ else if (t.encoding === null || t.encoding === !1) t.encoding = null;
2849
+ else if (typeof t.encoding != "string" && t.encoding !== null) throw new $("CSV_INVALID_OPTION_ENCODING", [
2850
+ "Invalid option encoding:",
2851
+ "encoding must be a string or null to return a buffer,",
2852
+ `got ${JSON.stringify(t.encoding)}`
2853
+ ], t);
2854
+ if (t.bom === void 0 || t.bom === null || t.bom === !1) t.bom = !1;
2855
+ else if (t.bom !== !0) throw new $("CSV_INVALID_OPTION_BOM", [
2856
+ "Invalid option bom:",
2857
+ "bom must be true,",
2858
+ `got ${JSON.stringify(t.bom)}`
2859
+ ], t);
2860
+ if (t.cast_function = null, t.cast === void 0 || t.cast === null || t.cast === !1 || t.cast === "") t.cast = void 0;
2861
+ else if (typeof t.cast == "function") t.cast_function = t.cast, t.cast = !0;
2862
+ else if (t.cast !== !0) throw new $("CSV_INVALID_OPTION_CAST", [
2863
+ "Invalid option cast:",
2864
+ "cast must be true or a function,",
2865
+ `got ${JSON.stringify(t.cast)}`
2866
+ ], t);
2867
+ if (t.cast_date === void 0 || t.cast_date === null || t.cast_date === !1 || t.cast_date === "") t.cast_date = !1;
2868
+ else if (t.cast_date === !0) t.cast_date = function(e) {
2869
+ let t = Date.parse(e);
2870
+ return isNaN(t) ? e : new Date(t);
2871
+ };
2872
+ else if (typeof t.cast_date != "function") throw new $("CSV_INVALID_OPTION_CAST_DATE", [
2873
+ "Invalid option cast_date:",
2874
+ "cast_date must be true or a function,",
2875
+ `got ${JSON.stringify(t.cast_date)}`
2876
+ ], t);
2877
+ if (t.cast_first_line_to_header = void 0, t.columns === !0) t.cast_first_line_to_header = void 0;
2878
+ else if (typeof t.columns == "function") t.cast_first_line_to_header = t.columns, t.columns = !0;
2879
+ else if (Array.isArray(t.columns)) t.columns = Oi(t.columns);
2880
+ else if (t.columns === void 0 || t.columns === null || t.columns === !1) t.columns = !1;
2881
+ else throw new $("CSV_INVALID_OPTION_COLUMNS", [
2882
+ "Invalid option columns:",
2883
+ "expect an array, a function or true,",
2884
+ `got ${JSON.stringify(t.columns)}`
2885
+ ], t);
2886
+ if (t.group_columns_by_name === void 0 || t.group_columns_by_name === null || t.group_columns_by_name === !1) t.group_columns_by_name = !1;
2887
+ else if (t.group_columns_by_name !== !0) throw new $("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME", [
2888
+ "Invalid option group_columns_by_name:",
2889
+ "expect an boolean,",
2890
+ `got ${JSON.stringify(t.group_columns_by_name)}`
2891
+ ], t);
2892
+ else if (t.columns === !1) throw new $("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME", ["Invalid option group_columns_by_name:", "the `columns` mode must be activated."], t);
2893
+ if (t.comment === void 0 || t.comment === null || t.comment === !1 || t.comment === "") t.comment = null;
2894
+ else if (typeof t.comment == "string" && (t.comment = G.from(t.comment, t.encoding)), !J(t.comment)) throw new $("CSV_INVALID_OPTION_COMMENT", [
2895
+ "Invalid option comment:",
2896
+ "comment must be a buffer or a string,",
2897
+ `got ${JSON.stringify(t.comment)}`
2898
+ ], t);
2899
+ if (t.comment_no_infix === void 0 || t.comment_no_infix === null || t.comment_no_infix === !1) t.comment_no_infix = !1;
2900
+ else if (t.comment_no_infix !== !0) throw new $("CSV_INVALID_OPTION_COMMENT", [
2901
+ "Invalid option comment_no_infix:",
2902
+ "value must be a boolean,",
2903
+ `got ${JSON.stringify(t.comment_no_infix)}`
2904
+ ], t);
2905
+ if (t.delimiter_auto === void 0 || t.delimiter_auto === null || t.delimiter_auto === !1) t.delimiter_auto = !1;
2906
+ else if (t.delimiter_auto === !0) t.delimiter_auto = {};
2907
+ else if (!Di(t.delimiter_auto)) throw new $("CSV_INVALID_OPTION_DELIMITER_AUTO", [
2908
+ "Invalid option delimiter_auto:",
2909
+ "delimiter_auto must be a boolean or a configuration object,",
2910
+ `got ${JSON.stringify(t.delimiter_auto)}`
2911
+ ], t);
2912
+ if (t.delimiter_auto) {
2913
+ if (t.delimiter_auto.preferred === void 0) t.delimiter_auto.preferred = {
2914
+ 44: 1.8,
2915
+ 9: 1.8,
2916
+ 59: 1.6,
2917
+ 32: 1.6,
2918
+ 58: 1.5,
2919
+ 46: 1.4,
2920
+ 47: 1.4
2921
+ };
2922
+ else if (!Di(t.delimiter_auto.preferred)) throw new $("CSV_INVALID_OPTION_DELIMITER_AUTO", [
2923
+ "Invalid option delimiter_auto:",
2924
+ "preferred must be an object,",
2925
+ `got ${JSON.stringify(t.delimiter_auto.preferred)}`
2926
+ ], t);
2927
+ if (t.delimiter_auto.score === void 0) t.delimiter_auto.score = (e, t) => (e.total - e.std) * (t.preferred[e.char_code] || 1);
2928
+ else if (typeof t.delimiter_auto.score != "function") throw new $("CSV_INVALID_OPTION_DELIMITER_AUTO", [
2929
+ "Invalid option delimiter_auto:",
2930
+ "score must be a function,",
2931
+ `got ${JSON.stringify(t.delimiter_auto.score)}`
2932
+ ], t);
2933
+ if (t.delimiter_auto.size === void 0) t.delimiter_auto.size = 2048;
2934
+ else if (typeof t.delimiter_auto.size != "number") throw new $("CSV_INVALID_OPTION_DELIMITER_AUTO", [
2935
+ "Invalid option delimiter_auto:",
2936
+ "size must be a number,",
2937
+ `got ${JSON.stringify(t.delimiter_auto.size)}`
2938
+ ], t);
2939
+ }
2940
+ let n = JSON.stringify(t.delimiter);
2941
+ if (t.delimiter_auto !== !1 && (t.delimiter = []), Array.isArray(t.delimiter) || ((t.delimiter === void 0 || t.delimiter === null || t.delimiter === !1) && (t.delimiter = G.from(",", t.encoding)), t.delimiter = [t.delimiter]), t.delimiter = t.delimiter.map(function(e) {
2942
+ if (typeof e == "string" && (e = G.from(e, t.encoding)), !J(e) || e.length === 0) throw new $("CSV_INVALID_OPTION_DELIMITER", [
2943
+ "Invalid option delimiter:",
2944
+ "delimiter must be a non empty string or buffer or array of string|buffer,",
2945
+ `got ${n}`
2946
+ ], t);
2947
+ return e;
2948
+ }), t.escape === void 0 || t.escape === !0 ? t.escape = G.from("\"", t.encoding) : typeof t.escape == "string" ? t.escape = G.from(t.escape, t.encoding) : (t.escape === null || t.escape === !1) && (t.escape = null), t.escape !== null && !J(t.escape)) throw Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(t.escape)}`);
2949
+ if (t.from === void 0 || t.from === null) t.from = 1;
2950
+ else if (typeof t.from == "string" && /\d+/.test(t.from) && (t.from = parseInt(t.from)), Number.isInteger(t.from)) {
2951
+ if (t.from < 0) throw Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(e.from)}`);
2952
+ } else throw Error(`Invalid Option: from must be an integer, got ${JSON.stringify(t.from)}`);
2953
+ if (t.from_line === void 0 || t.from_line === null) t.from_line = 1;
2954
+ else if (typeof t.from_line == "string" && /\d+/.test(t.from_line) && (t.from_line = parseInt(t.from_line)), Number.isInteger(t.from_line)) {
2955
+ if (t.from_line <= 0) throw Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(e.from_line)}`);
2956
+ } else throw Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(e.from_line)}`);
2957
+ if (t.ignore_last_delimiters === void 0 || t.ignore_last_delimiters === null) t.ignore_last_delimiters = !1;
2958
+ else if (typeof t.ignore_last_delimiters == "number") t.ignore_last_delimiters = Math.floor(t.ignore_last_delimiters), t.ignore_last_delimiters === 0 && (t.ignore_last_delimiters = !1);
2959
+ else if (typeof t.ignore_last_delimiters != "boolean") throw new $("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS", [
2960
+ "Invalid option `ignore_last_delimiters`:",
2961
+ "the value must be a boolean value or an integer,",
2962
+ `got ${JSON.stringify(t.ignore_last_delimiters)}`
2963
+ ], t);
2964
+ if (t.ignore_last_delimiters === !0 && t.columns === !1) throw new $("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS", ["The option `ignore_last_delimiters`", "requires the activation of the `columns` option"], t);
2965
+ if (t.info === void 0 || t.info === null || t.info === !1) t.info = !1;
2966
+ else if (t.info !== !0) throw Error(`Invalid Option: info must be true, got ${JSON.stringify(t.info)}`);
2967
+ if (t.max_record_size === void 0 || t.max_record_size === null || t.max_record_size === !1) t.max_record_size = 0;
2968
+ else if (!(Number.isInteger(t.max_record_size) && t.max_record_size >= 0)) if (typeof t.max_record_size == "string" && /\d+/.test(t.max_record_size)) t.max_record_size = parseInt(t.max_record_size);
2969
+ else throw Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(t.max_record_size)}`);
2970
+ if (t.objname === void 0 || t.objname === null || t.objname === !1) t.objname = void 0;
2971
+ else if (J(t.objname)) {
2972
+ if (t.objname.length === 0) throw Error("Invalid Option: objname must be a non empty buffer");
2973
+ t.encoding === null || (t.objname = t.objname.toString(t.encoding));
2974
+ } else if (typeof t.objname == "string") {
2975
+ if (t.objname.length === 0) throw Error("Invalid Option: objname must be a non empty string");
2976
+ } else if (typeof t.objname != "number") throw Error(`Invalid Option: objname must be a string or a buffer, got ${t.objname}`);
2977
+ if (t.objname !== void 0) {
2978
+ if (typeof t.objname == "number") {
2979
+ if (t.columns !== !1) throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field");
2980
+ } else if (t.columns === !1) throw Error("Invalid Option: objname field must be combined with columns or be defined as an index");
2981
+ }
2982
+ if (t.on_record === void 0 || t.on_record === null) t.on_record = void 0;
2983
+ else if (typeof t.on_record != "function") throw new $("CSV_INVALID_OPTION_ON_RECORD", [
2984
+ "Invalid option `on_record`:",
2985
+ "expect a function,",
2986
+ `got ${JSON.stringify(t.on_record)}`
2987
+ ], t);
2988
+ if (t.on_skip !== void 0 && t.on_skip !== null && typeof t.on_skip != "function") throw Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(t.on_skip)}`);
2989
+ if (t.quote === null || t.quote === !1 || t.quote === "") t.quote = null;
2990
+ else if (t.quote === void 0 || t.quote === !0 ? t.quote = G.from("\"", t.encoding) : typeof t.quote == "string" && (t.quote = G.from(t.quote, t.encoding)), !J(t.quote)) throw Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(t.quote)}`);
2991
+ if (t.raw === void 0 || t.raw === null || t.raw === !1) t.raw = !1;
2992
+ else if (t.raw !== !0) throw Error(`Invalid Option: raw must be true, got ${JSON.stringify(t.raw)}`);
2993
+ if (t.record_delimiter === void 0) t.record_delimiter = [];
2994
+ else if (typeof t.record_delimiter == "string" || J(t.record_delimiter)) {
2995
+ if (t.record_delimiter.length === 0) throw new $("CSV_INVALID_OPTION_RECORD_DELIMITER", [
2996
+ "Invalid option `record_delimiter`:",
2997
+ "value must be a non empty string or buffer,",
2998
+ `got ${JSON.stringify(t.record_delimiter)}`
2999
+ ], t);
3000
+ t.record_delimiter = [t.record_delimiter];
3001
+ } else if (!Array.isArray(t.record_delimiter)) throw new $("CSV_INVALID_OPTION_RECORD_DELIMITER", [
3002
+ "Invalid option `record_delimiter`:",
3003
+ "value must be a string, a buffer or array of string|buffer,",
3004
+ `got ${JSON.stringify(t.record_delimiter)}`
3005
+ ], t);
3006
+ if (t.record_delimiter = t.record_delimiter.map(function(e, n) {
3007
+ if (typeof e != "string" && !J(e)) throw new $("CSV_INVALID_OPTION_RECORD_DELIMITER", [
3008
+ "Invalid option `record_delimiter`:",
3009
+ "value must be a string, a buffer or array of string|buffer",
3010
+ `at index ${n},`,
3011
+ `got ${JSON.stringify(e)}`
3012
+ ], t);
3013
+ if (e.length === 0) throw new $("CSV_INVALID_OPTION_RECORD_DELIMITER", [
3014
+ "Invalid option `record_delimiter`:",
3015
+ "value must be a non empty string or buffer",
3016
+ `at index ${n},`,
3017
+ `got ${JSON.stringify(e)}`
3018
+ ], t);
3019
+ return typeof e == "string" && (e = G.from(e, t.encoding)), e;
3020
+ }), typeof t.relax_column_count != "boolean") if (t.relax_column_count === void 0 || t.relax_column_count === null) t.relax_column_count = !1;
3021
+ else throw Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(t.relax_column_count)}`);
3022
+ if (typeof t.relax_column_count_less != "boolean") if (t.relax_column_count_less === void 0 || t.relax_column_count_less === null) t.relax_column_count_less = !1;
3023
+ else throw Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(t.relax_column_count_less)}`);
3024
+ if (typeof t.relax_column_count_more != "boolean") if (t.relax_column_count_more === void 0 || t.relax_column_count_more === null) t.relax_column_count_more = !1;
3025
+ else throw Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(t.relax_column_count_more)}`);
3026
+ if (typeof t.relax_quotes != "boolean") if (t.relax_quotes === void 0 || t.relax_quotes === null) t.relax_quotes = !1;
3027
+ else throw Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(t.relax_quotes)}`);
3028
+ if (typeof t.skip_empty_lines != "boolean") if (t.skip_empty_lines === void 0 || t.skip_empty_lines === null) t.skip_empty_lines = !1;
3029
+ else throw Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(t.skip_empty_lines)}`);
3030
+ if (typeof t.skip_records_with_empty_values != "boolean") if (t.skip_records_with_empty_values === void 0 || t.skip_records_with_empty_values === null) t.skip_records_with_empty_values = !1;
3031
+ else throw Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(t.skip_records_with_empty_values)}`);
3032
+ if (typeof t.skip_records_with_error != "boolean") if (t.skip_records_with_error === void 0 || t.skip_records_with_error === null) t.skip_records_with_error = !1;
3033
+ else throw Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(t.skip_records_with_error)}`);
3034
+ if (t.rtrim === void 0 || t.rtrim === null || t.rtrim === !1) t.rtrim = !1;
3035
+ else if (t.rtrim !== !0) throw Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(t.rtrim)}`);
3036
+ if (t.ltrim === void 0 || t.ltrim === null || t.ltrim === !1) t.ltrim = !1;
3037
+ else if (t.ltrim !== !0) throw Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(t.ltrim)}`);
3038
+ if (t.trim === void 0 || t.trim === null || t.trim === !1) t.trim = !1;
3039
+ else if (t.trim !== !0) throw Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(t.trim)}`);
3040
+ if (t.trim === !0 && e.ltrim !== !1 ? t.ltrim = !0 : t.ltrim !== !0 && (t.ltrim = !1), t.trim === !0 && e.rtrim !== !1 ? t.rtrim = !0 : t.rtrim !== !0 && (t.rtrim = !1), t.to === void 0 || t.to === null) t.to = -1;
3041
+ else if (t.to !== -1) if (typeof t.to == "string" && /\d+/.test(t.to) && (t.to = parseInt(t.to)), Number.isInteger(t.to)) {
3042
+ if (t.to <= 0) throw Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(e.to)}`);
3043
+ } else throw Error(`Invalid Option: to must be an integer, got ${JSON.stringify(e.to)}`);
3044
+ if (t.to_line === void 0 || t.to_line === null) t.to_line = -1;
3045
+ else if (t.to_line !== -1) if (typeof t.to_line == "string" && /\d+/.test(t.to_line) && (t.to_line = parseInt(t.to_line)), Number.isInteger(t.to_line)) {
3046
+ if (t.to_line <= 0) throw Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(e.to_line)}`);
3047
+ } else throw Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(e.to_line)}`);
3048
+ return t;
3049
+ }, Ni = function(e, t) {
3050
+ t || ({delimiter_auto: t} = Mi({ delimiter_auto: !0 })), typeof e == "string" && (e = G.from(e)), J(e) && (e = ((e) => {
3051
+ let t = [], n = zi({ delimiter: [] }).parse(e, !0, (e) => t.push(e), () => {});
3052
+ if (n !== void 0) throw n;
3053
+ return t;
3054
+ })(e));
3055
+ let n = Array(127).fill().map(() => ({ lines: [] }));
3056
+ e.map(([e], t) => {
3057
+ for (let r = 0, i = e.length; r < i; r++) {
3058
+ let i = e.charCodeAt(r);
3059
+ n[i].lines[t] === void 0 && (n[i].lines[t] = 0), n[i].lines[t]++;
3060
+ }
3061
+ }), n.map((e, n) => {
3062
+ e.char_code = n, e.std = Pi(e.lines), e.total = e.lines.reduce((e, t) => e + t, 0), e.preferred = !!t.preferred[n], e.score = t.score(e, t);
3063
+ });
3064
+ let r = n.reduce((e, t) => e.score > t.score ? e : t, {});
3065
+ return String.fromCharCode(r.char_code);
3066
+ }, Pi = function(e) {
3067
+ let t = e.length;
3068
+ if (t === 0) return 0;
3069
+ let n = e.reduce((e, t) => e + t) / t;
3070
+ return Math.sqrt(e.map((e) => (e - n) ** 2).reduce((e, t) => e + t) / t);
3071
+ }, Fi = function(e) {
3072
+ return e.every((e) => e == null || e.toString && e.toString().trim() === "");
3073
+ }, Ii = 13, Li = 10, Ri = {
3074
+ utf8: G.from([
3075
+ 239,
3076
+ 187,
3077
+ 191
3078
+ ]),
3079
+ utf16le: G.from([255, 254])
3080
+ }, zi = function(e = {}) {
3081
+ let t = {
3082
+ bytes: 0,
3083
+ bytes_records: 0,
3084
+ comment_lines: 0,
3085
+ empty_lines: 0,
3086
+ invalid_field_length: 0,
3087
+ lines: 1,
3088
+ records: 0
3089
+ }, n = Mi(e);
3090
+ return {
3091
+ info: t,
3092
+ original_options: e,
3093
+ options: n,
3094
+ state: Ai(n),
3095
+ __needMoreData: function(e, t, n) {
3096
+ if (n) return !1;
3097
+ let { encoding: r, escape: i, quote: a } = this.options, { quoting: o, needMoreDataSize: s, recordDelimiterMaxLength: c } = this.state;
3098
+ return t - e - 1 < Math.max(s, c === 0 ? G.from("\r\n", r).length : c, o ? (i === null ? 0 : i.length) + a.length : 0, o ? a.length + c : 0);
3099
+ },
3100
+ parse: function(e, t, n, r) {
3101
+ let { bom: i, comment_no_infix: a, delimiter_auto: o, encoding: s, from_line: c, ltrim: l, max_record_size: u, raw: d, relax_quotes: f, rtrim: p, skip_empty_lines: m, to: h, to_line: g } = this.options, { comment: _, escape: v, quote: y, record_delimiter: b } = this.options, { bomSkipped: ee, delimiterDiscovered: te, delimiterBufPrevious: x, rawBuffer: S, escapeIsQuote: ne } = this.state;
3102
+ if (!te && o) {
3103
+ let n;
3104
+ if (n = x === void 0 ? e : x !== void 0 && e === void 0 ? x : G.concat([x, e]), e = void 0, t || n.length > o.size) this.options.delimiter = [G.from(Ni(n, this.options.delimiter_auto))], this.state.previousBuf = n, this.state.delimiterBufPrevious = void 0, this.state.delimiterDiscovered = !0;
3105
+ else {
3106
+ this.state.delimiterBufPrevious = n;
3107
+ return;
3108
+ }
3109
+ }
3110
+ let { previousBuf: C } = this.state, w;
3111
+ if (C === void 0) if (e === void 0) {
3112
+ r();
3113
+ return;
3114
+ } else w = e;
3115
+ else w = C !== void 0 && e === void 0 ? C : G.concat([C, e]);
3116
+ if (ee === !1) if (i === !1) this.state.bomSkipped = !0;
3117
+ else if (w.length < 3) {
3118
+ if (t === !1) {
3119
+ this.state.previousBuf = w;
3120
+ return;
3121
+ }
3122
+ } else {
3123
+ for (let e in Ri) if (Ri[e].compare(w, 0, Ri[e].length) === 0) {
3124
+ let t = Ri[e].length;
3125
+ this.state.bufBytesStart += t, w = w.slice(t);
3126
+ let n = Mi({
3127
+ ...this.original_options,
3128
+ encoding: e
3129
+ });
3130
+ for (let e in n) this.options[e] = n[e];
3131
+ ({comment: _, escape: v, quote: y} = this.options);
3132
+ break;
3133
+ }
3134
+ this.state.bomSkipped = !0;
3135
+ }
3136
+ let re = w.length, T;
3137
+ for (T = 0; T < re && !this.__needMoreData(T, re, t); T++) {
3138
+ if (this.state.wasRowDelimiter === !0 && (this.info.lines++, this.state.wasRowDelimiter = !1), g !== -1 && this.info.lines > g) {
3139
+ this.state.stop = !0, r();
3140
+ return;
3141
+ }
3142
+ this.state.quoting === !1 && b.length === 0 && this.__autoDiscoverRecordDelimiter(w, T) && (b = this.options.record_delimiter);
3143
+ let e = w[T];
3144
+ if (d === !0 && S.append(e), (e === Ii || e === Li) && this.state.wasRowDelimiter === !1 && (this.state.wasRowDelimiter = !0), this.state.escaping === !0) this.state.escaping = !1;
3145
+ else {
3146
+ if (v !== null && this.state.quoting === !0 && this.__isEscape(w, T, e) && T + v.length < re) if (ne) {
3147
+ if (this.__isQuote(w, T + v.length)) {
3148
+ this.state.escaping = !0, T += v.length - 1;
3149
+ continue;
3150
+ }
3151
+ } else {
3152
+ this.state.escaping = !0, T += v.length - 1;
3153
+ continue;
3154
+ }
3155
+ if (this.state.commenting === !1 && this.__isQuote(w, T)) if (this.state.quoting === !0) {
3156
+ let t = w[T + y.length], n = p && this.__isCharTrimable(w, T + y.length), r = _ !== null && this.__compareBytes(_, w, T + y.length, t), i = this.__isDelimiter(w, T + y.length, t), a = b.length === 0 ? this.__autoDiscoverRecordDelimiter(w, T + y.length) : this.__isRecordDelimiter(t, w, T + y.length);
3157
+ if (v !== null && this.__isEscape(w, T, e) && this.__isQuote(w, T + v.length)) T += v.length - 1;
3158
+ else if (!t || i || a || r || n) {
3159
+ this.state.quoting = !1, this.state.wasQuoting = !0, T += y.length - 1;
3160
+ continue;
3161
+ } else if (f === !1) {
3162
+ let e = this.__error(new $("CSV_INVALID_CLOSING_QUOTE", [
3163
+ "Invalid Closing Quote:",
3164
+ `got "${String.fromCharCode(t)}"`,
3165
+ `at line ${this.info.lines}`,
3166
+ "instead of delimiter, record delimiter, trimable character",
3167
+ "(if activated) or comment"
3168
+ ], this.options, this.__infoField()));
3169
+ if (e !== void 0) return e;
3170
+ } else this.state.quoting = !1, this.state.wasQuoting = !0, this.state.field.prepend(y), T += y.length - 1;
3171
+ } else if (this.state.field.length !== 0) {
3172
+ if (f === !1) {
3173
+ let e = this.__infoField(), t = Object.keys(Ri).map((e) => Ri[e].equals(this.state.field.toString()) ? e : !1).filter(Boolean)[0], n = this.__error(new $("INVALID_OPENING_QUOTE", [
3174
+ "Invalid Opening Quote:",
3175
+ `a quote is found on field ${JSON.stringify(e.column)} at line ${e.lines}, value is ${JSON.stringify(this.state.field.toString(s))}`,
3176
+ t ? `(${t} bom)` : void 0
3177
+ ], this.options, e, { field: this.state.field }));
3178
+ if (n !== void 0) return n;
3179
+ }
3180
+ } else {
3181
+ this.state.quoting = !0, T += y.length - 1;
3182
+ continue;
3183
+ }
3184
+ if (this.state.quoting === !1) {
3185
+ let t = this.__isRecordDelimiter(e, w, T);
3186
+ if (t !== 0) {
3187
+ if (this.state.commenting && this.state.wasQuoting === !1 && this.state.record.length === 0 && this.state.field.length === 0) this.info.comment_lines++;
3188
+ else {
3189
+ if (this.state.enabled === !1 && this.info.lines + +(this.state.wasRowDelimiter === !0) >= c) {
3190
+ this.state.enabled = !0, this.__resetField(), this.__resetRecord(), T += t - 1;
3191
+ continue;
3192
+ }
3193
+ if (m === !0 && this.state.wasQuoting === !1 && this.state.record.length === 0 && this.state.field.length === 0) {
3194
+ this.info.empty_lines++, T += t - 1;
3195
+ continue;
3196
+ }
3197
+ this.info.bytes = this.state.bufBytesStart + T;
3198
+ let e = this.__onField();
3199
+ if (e !== void 0) return e;
3200
+ this.info.bytes = this.state.bufBytesStart + T + t;
3201
+ let i = this.__onRecord(n);
3202
+ if (i !== void 0) return i;
3203
+ if (h !== -1 && this.info.records >= h) {
3204
+ this.state.stop = !0, r();
3205
+ return;
3206
+ }
3207
+ }
3208
+ this.state.commenting = !1, T += t - 1;
3209
+ continue;
3210
+ }
3211
+ if (this.state.commenting) continue;
3212
+ if (_ !== null && (a === !1 || this.state.record.length === 0 && this.state.field.length === 0) && this.__compareBytes(_, w, T, e) !== 0) {
3213
+ this.state.commenting = !0;
3214
+ continue;
3215
+ }
3216
+ let i = this.__isDelimiter(w, T, e);
3217
+ if (i !== 0) {
3218
+ this.info.bytes = this.state.bufBytesStart + T;
3219
+ let e = this.__onField();
3220
+ if (e !== void 0) return e;
3221
+ T += i - 1;
3222
+ continue;
3223
+ }
3224
+ }
3225
+ }
3226
+ if (this.state.commenting === !1 && u !== 0 && this.state.record_length + this.state.field.length > u) return this.__error(new $("CSV_MAX_RECORD_SIZE", [
3227
+ "Max Record Size:",
3228
+ "record exceed the maximum number of tolerated bytes",
3229
+ `of ${u}`,
3230
+ `at line ${this.info.lines}`
3231
+ ], this.options, this.__infoField()));
3232
+ let t = l === !1 || this.state.quoting === !0 || this.state.field.length !== 0 || !this.__isCharTrimable(w, T), i = p === !1 || this.state.wasQuoting === !1;
3233
+ if (t === !0 && i === !0) this.state.field.append(e);
3234
+ else if (p === !0 && !this.__isCharTrimable(w, T)) return this.__error(new $("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE", [
3235
+ "Invalid Closing Quote:",
3236
+ "found non trimable byte after quote",
3237
+ `at line ${this.info.lines}`
3238
+ ], this.options, this.__infoField()));
3239
+ else {
3240
+ t === !1 && (T += this.__isCharTrimable(w, T) - 1);
3241
+ continue;
3242
+ }
3243
+ }
3244
+ if (t === !0) if (this.state.quoting === !0) {
3245
+ let e = this.__error(new $("CSV_QUOTE_NOT_CLOSED", ["Quote Not Closed:", `the parsing is finished with an opening quote at line ${this.info.lines}`], this.options, this.__infoField()));
3246
+ if (e !== void 0) return e;
3247
+ } else if (this.state.wasQuoting === !0 || this.state.record.length !== 0 || this.state.field.length !== 0) {
3248
+ this.info.bytes = this.state.bufBytesStart + T;
3249
+ let e = this.__onField();
3250
+ if (e !== void 0) return e;
3251
+ let t = this.__onRecord(n);
3252
+ if (t !== void 0) return t;
3253
+ } else this.state.wasRowDelimiter === !0 ? this.info.empty_lines++ : this.state.commenting === !0 && this.info.comment_lines++;
3254
+ else this.state.bufBytesStart += T, this.state.previousBuf = w.slice(T);
3255
+ this.state.wasRowDelimiter === !0 && (this.info.lines++, this.state.wasRowDelimiter = !1);
3256
+ },
3257
+ __onRecord: function(e) {
3258
+ let { columns: t, group_columns_by_name: n, encoding: r, info: i, from: a, relax_column_count: o, relax_column_count_less: s, relax_column_count_more: c, raw: l, skip_records_with_empty_values: u } = this.options, { enabled: d, record: f } = this.state;
3259
+ if (d === !1) return this.__resetRecord();
3260
+ let p = f.length;
3261
+ if (t === !0) {
3262
+ if (u === !0 && Fi(f)) {
3263
+ this.__resetRecord();
3264
+ return;
3265
+ }
3266
+ return this.__firstLineToColumns(f);
3267
+ }
3268
+ if (t === !1 && this.info.records === 0 && (this.state.expectedRecordLength = p), p !== this.state.expectedRecordLength) {
3269
+ let e = t === !1 ? new $("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH", [
3270
+ "Invalid Record Length:",
3271
+ `expect ${this.state.expectedRecordLength},`,
3272
+ `got ${p} on line ${this.info.lines}`
3273
+ ], this.options, this.__infoField(), { record: f }) : new $("CSV_RECORD_INCONSISTENT_COLUMNS", [
3274
+ "Invalid Record Length:",
3275
+ `columns length is ${t.length},`,
3276
+ `got ${p} on line ${this.info.lines}`
3277
+ ], this.options, this.__infoField(), { record: f });
3278
+ if (o === !0 || s === !0 && p < this.state.expectedRecordLength || c === !0 && p > this.state.expectedRecordLength) this.info.invalid_field_length++, this.state.error = e;
3279
+ else {
3280
+ let t = this.__error(e);
3281
+ if (t) return t;
3282
+ }
3283
+ }
3284
+ if (u === !0 && Fi(f)) {
3285
+ this.__resetRecord();
3286
+ return;
3287
+ }
3288
+ if (this.state.recordHasError === !0) {
3289
+ this.__resetRecord(), this.state.recordHasError = !1;
3290
+ return;
3291
+ }
3292
+ if (this.info.records++, a === 1 || this.info.records >= a) {
3293
+ let { objname: a } = this.options;
3294
+ if (t !== !1) {
3295
+ let o = {};
3296
+ for (let e = 0, r = f.length; e < r; e++) t[e] === void 0 || t[e].disabled || (n === !0 && o[t[e].name] !== void 0 ? Array.isArray(o[t[e].name]) ? o[t[e].name] = o[t[e].name].concat(f[e]) : o[t[e].name] = [o[t[e].name], f[e]] : o[t[e].name] = f[e]);
3297
+ if (l === !0 || i === !0) {
3298
+ let t = Object.assign({ record: o }, l === !0 ? { raw: this.state.rawBuffer.toString(r) } : {}, i === !0 ? { info: this.__infoRecord() } : {}), n = this.__push(a === void 0 ? t : [o[a], t], e);
3299
+ if (n) return n;
3300
+ } else {
3301
+ let t = this.__push(a === void 0 ? o : [o[a], o], e);
3302
+ if (t) return t;
3303
+ }
3304
+ } else if (l === !0 || i === !0) {
3305
+ let t = Object.assign({ record: f }, l === !0 ? { raw: this.state.rawBuffer.toString(r) } : {}, i === !0 ? { info: this.__infoRecord() } : {}), n = this.__push(a === void 0 ? t : [f[a], t], e);
3306
+ if (n) return n;
3307
+ } else {
3308
+ let t = this.__push(a === void 0 ? f : [f[a], f], e);
3309
+ if (t) return t;
3310
+ }
3311
+ }
3312
+ this.__resetRecord();
3313
+ },
3314
+ __firstLineToColumns: function(e) {
3315
+ let { firstLineToHeaders: t } = this.state;
3316
+ try {
3317
+ let n = t === void 0 ? e : t.call(null, e);
3318
+ if (!Array.isArray(n)) return this.__error(new $("CSV_INVALID_COLUMN_MAPPING", [
3319
+ "Invalid Column Mapping:",
3320
+ "expect an array from column function,",
3321
+ `got ${JSON.stringify(n)}`
3322
+ ], this.options, this.__infoField(), { headers: n }));
3323
+ let r = Oi(n);
3324
+ this.state.expectedRecordLength = r.length, this.options.columns = r, this.__resetRecord();
3325
+ return;
3326
+ } catch (e) {
3327
+ return e;
3328
+ }
3329
+ },
3330
+ __resetRecord: function() {
3331
+ this.options.raw === !0 && this.state.rawBuffer.reset(), this.state.error = void 0, this.state.record = [], this.state.record_length = 0;
3332
+ },
3333
+ __onField: function() {
3334
+ let { cast: e, encoding: t, rtrim: n, max_record_size: r } = this.options, { enabled: i, wasQuoting: a } = this.state;
3335
+ if (i === !1) return this.__resetField();
3336
+ let o = this.state.field.toString(t);
3337
+ if (n === !0 && a === !1 && (o = o.trimRight()), e === !0) {
3338
+ let [e, t] = this.__cast(o);
3339
+ if (e !== void 0) return e;
3340
+ o = t;
3341
+ }
3342
+ this.state.record.push(o), r !== 0 && typeof o == "string" && (this.state.record_length += o.length), this.__resetField();
3343
+ },
3344
+ __resetField: function() {
3345
+ this.state.field.reset(), this.state.wasQuoting = !1;
3346
+ },
3347
+ __push: function(e, t) {
3348
+ let { on_record: n } = this.options;
3349
+ if (n !== void 0) {
3350
+ let t = this.__infoRecord();
3351
+ try {
3352
+ e = n.call(null, e, t);
3353
+ } catch (e) {
3354
+ return e;
3355
+ }
3356
+ if (e == null) return;
3357
+ }
3358
+ this.info.bytes_records += this.info.bytes, t(e);
3359
+ },
3360
+ __cast: function(e) {
3361
+ let { columns: t, relax_column_count: n } = this.options;
3362
+ if (Array.isArray(t) === !0 && n && this.options.columns.length <= this.state.record.length) return [void 0, void 0];
3363
+ if (this.state.castField !== null) try {
3364
+ let t = this.__infoField();
3365
+ return [void 0, this.state.castField.call(null, e, t)];
3366
+ } catch (e) {
3367
+ return [e];
3368
+ }
3369
+ if (this.__isFloat(e)) return [void 0, parseFloat(e)];
3370
+ if (this.options.cast_date !== !1) {
3371
+ let t = this.__infoField();
3372
+ return [void 0, this.options.cast_date.call(null, e, t)];
3373
+ }
3374
+ return [void 0, e];
3375
+ },
3376
+ __compareBytes: function(e, t, n, r) {
3377
+ if (e[0] !== r) return 0;
3378
+ let i = e.length;
3379
+ for (let r = 1; r < i; r++) if (e[r] !== t[n + r]) return 0;
3380
+ return i;
3381
+ },
3382
+ __isCharTrimable: function(e, t) {
3383
+ let { timchars: n, timcharFirstBytes: r } = this.state, i = e[t];
3384
+ if (i === void 0 || r[i] === 0) return 0;
3385
+ loop1: for (let r = 0; r < n.length; r++) {
3386
+ let i = n[r];
3387
+ for (let n = 0; n < i.length; n++) if (i[n] !== e[t + n]) continue loop1;
3388
+ return i.length;
3389
+ }
3390
+ return 0;
3391
+ },
3392
+ __isDelimiter: function(e, t, n) {
3393
+ let { delimiter: r, ignore_last_delimiters: i } = this.options;
3394
+ if (i === !0 && this.state.record.length === this.options.columns.length - 1 || i !== !1 && typeof i == "number" && this.state.record.length === i - 1) return 0;
3395
+ loop1: for (let i = 0; i < r.length; i++) {
3396
+ let a = r[i];
3397
+ if (a[0] === n) {
3398
+ for (let n = 1; n < a.length; n++) if (a[n] !== e[t + n]) continue loop1;
3399
+ return a.length;
3400
+ }
3401
+ }
3402
+ return 0;
3403
+ },
3404
+ __isEscape: function(e, t, n) {
3405
+ let { escape: r } = this.options;
3406
+ if (r === null) return !1;
3407
+ let i = r.length;
3408
+ if (r[0] === n) {
3409
+ for (let n = 0; n < i; n++) if (r[n] !== e[t + n]) return !1;
3410
+ return !0;
3411
+ }
3412
+ return !1;
3413
+ },
3414
+ __isFloat: function(e) {
3415
+ return e - parseFloat(e) + 1 >= 0;
3416
+ },
3417
+ __isQuote: function(e, t) {
3418
+ let { quote: n } = this.options;
3419
+ if (n === null) return !1;
3420
+ let r = n.length;
3421
+ for (let i = 0; i < r; i++) if (n[i] !== e[t + i]) return !1;
3422
+ return !0;
3423
+ },
3424
+ __isRecordDelimiter: function(e, t, n) {
3425
+ let { record_delimiter: r } = this.options, i = r.length;
3426
+ loop1: for (let a = 0; a < i; a++) {
3427
+ let i = r[a], o = i.length;
3428
+ if (i[0] === e) {
3429
+ for (let e = 1; e < o; e++) if (i[e] !== t[n + e]) continue loop1;
3430
+ return i.length;
3431
+ }
3432
+ }
3433
+ return 0;
3434
+ },
3435
+ __autoDiscoverRecordDelimiter: function(e, t) {
3436
+ let { encoding: n } = this.options, r = [
3437
+ G.from("\r\n", n),
3438
+ G.from("\n", n),
3439
+ G.from("\r", n)
3440
+ ];
3441
+ loop: for (let n = 0; n < r.length; n++) {
3442
+ let i = r[n].length;
3443
+ for (let a = 0; a < i; a++) if (r[n][a] !== e[t + a]) continue loop;
3444
+ return this.options.record_delimiter.push(r[n]), this.state.recordDelimiterMaxLength = r[n].length, r[n].length;
3445
+ }
3446
+ return 0;
3447
+ },
3448
+ __error: function(e) {
3449
+ let { encoding: t, raw: n, skip_records_with_error: r } = this.options, i = typeof e == "string" ? Error(e) : e;
3450
+ if (r) {
3451
+ if (this.state.recordHasError = !0, this.options.on_skip !== void 0) try {
3452
+ this.options.on_skip(i, n ? this.state.rawBuffer.toString(t) : void 0);
3453
+ } catch (e) {
3454
+ return e;
3455
+ }
3456
+ return;
3457
+ } else return i;
3458
+ },
3459
+ __infoDataSet: function() {
3460
+ return {
3461
+ ...this.info,
3462
+ columns: this.options.columns
3463
+ };
3464
+ },
3465
+ __infoRecord: function() {
3466
+ let { columns: e, raw: t, encoding: n } = this.options;
3467
+ return {
3468
+ ...this.__infoDataSet(),
3469
+ bytes_records: this.info.bytes,
3470
+ error: this.state.error,
3471
+ header: e === !0,
3472
+ index: this.state.record.length,
3473
+ raw: t ? this.state.rawBuffer.toString(n) : void 0
3474
+ };
3475
+ },
3476
+ __infoField: function() {
3477
+ let { columns: e } = this.options, t = Array.isArray(e), n = this.info.bytes_records;
3478
+ return {
3479
+ ...this.__infoRecord(),
3480
+ bytes_records: n,
3481
+ column: t === !0 ? e.length > this.state.record.length ? e[this.state.record.length].name : null : this.state.record.length,
3482
+ quoting: this.state.wasQuoting
3483
+ };
3484
+ }
3485
+ };
3486
+ }, Bi = function(e, t = {}) {
3487
+ typeof e == "string" && (e = G.from(e));
3488
+ let n = t && t.objname ? Object.create(null) : [], r = zi(t), i = r.parse(e, !0, (e) => {
3489
+ r.options.objname === void 0 ? n.push(e) : n[e[0]] = e[1];
3490
+ }, () => {});
3491
+ if (i !== void 0) throw i;
3492
+ return n;
3493
+ }, Vi = 46, Hi = /\\(\\)?/g, Ui = RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))", "g"), Wi = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Gi = /^\w*$/, Ki = function(e) {
3494
+ return Object.prototype.toString.call(e);
3495
+ }, qi = function(e) {
3496
+ let t = typeof e;
3497
+ return t === "symbol" || t === "object" && e && Ki(e) === "[object Symbol]";
3498
+ }, Ji = function(e, t) {
3499
+ if (Array.isArray(e)) return !1;
3500
+ let n = typeof e;
3501
+ return n === "number" || n === "symbol" || n === "boolean" || !e || qi(e) ? !0 : Gi.test(e) || !Wi.test(e) || t != null && e in Object(t);
3502
+ }, Yi = function(e) {
3503
+ let t = [];
3504
+ return e.charCodeAt(0) === Vi && t.push(""), e.replace(Ui, function(e, n, r, i) {
3505
+ let a = e;
3506
+ r ? a = i.replace(Hi, "$1") : n && (a = n.trim()), t.push(a);
3507
+ }), t;
3508
+ }, Xi = function(e, t) {
3509
+ return Array.isArray(e) ? e : Ji(e, t) ? [e] : Yi(e);
3510
+ }, Zi = function(e) {
3511
+ if (typeof e == "string" || qi(e)) return e;
3512
+ let t = `${e}`;
3513
+ return t == "0" && 1 / e == -Infinity ? "-0" : t;
3514
+ }, Qi = function(e, t) {
3515
+ t = Xi(t, e);
3516
+ let n = 0, r = t.length;
3517
+ for (; e != null && n < r;) e = e[Zi(t[n++])];
3518
+ return n && n === r ? e : void 0;
3519
+ }, $i = function(e) {
3520
+ return typeof e == "object" && !!e && !Array.isArray(e);
3521
+ }, ea = function(e) {
3522
+ if (e == null) return [void 0, void 0];
3523
+ if (typeof e != "object") return [Error("Invalid option \"columns\": expect an array or an object")];
3524
+ if (Array.isArray(e)) {
3525
+ let t = [];
3526
+ for (let n of e) if (typeof n == "string") t.push({
3527
+ key: n,
3528
+ header: n
3529
+ });
3530
+ else if (typeof n == "object" && n && !Array.isArray(n)) {
3531
+ if (!n.key) return [Error("Invalid column definition: property \"key\" is required")];
3532
+ n.header === void 0 && (n.header = n.key), t.push(n);
3533
+ } else return [Error("Invalid column definition: expect a string or an object")];
3534
+ e = t;
3535
+ } else {
3536
+ let t = [];
3537
+ for (let n in e) t.push({
3538
+ key: n,
3539
+ header: e[n]
3540
+ });
3541
+ e = t;
3542
+ }
3543
+ return [void 0, e];
3544
+ }, ta = class e extends Error {
3545
+ constructor(t, n, ...r) {
3546
+ Array.isArray(n) && (n = n.join(" ")), super(n), Error.captureStackTrace !== void 0 && Error.captureStackTrace(this, e), this.code = t;
3547
+ for (let e of r) for (let t in e) {
3548
+ let n = e[t];
3549
+ this[t] = J(n) ? n.toString() : n == null ? n : JSON.parse(JSON.stringify(n));
3550
+ }
3551
+ }
3552
+ }, na = function(e) {
3553
+ return e.replace(/([A-Z])/g, function(e, t) {
3554
+ return "_" + t.toLowerCase();
3555
+ });
3556
+ }, ra = function(e) {
3557
+ let t = {};
3558
+ for (let n in e) t[na(n)] = e[n];
3559
+ if (t.bom === void 0 || t.bom === null || t.bom === !1) t.bom = !1;
3560
+ else if (t.bom !== !0) return [new ta("CSV_OPTION_BOOLEAN_INVALID_TYPE", ["option `bom` is optional and must be a boolean value,", `got ${JSON.stringify(t.bom)}`])];
3561
+ if (t.delimiter === void 0 || t.delimiter === null) t.delimiter = ",";
3562
+ else if (J(t.delimiter)) t.delimiter = t.delimiter.toString();
3563
+ else if (typeof t.delimiter != "string") return [new ta("CSV_OPTION_DELIMITER_INVALID_TYPE", ["option `delimiter` must be a buffer or a string,", `got ${JSON.stringify(t.delimiter)}`])];
3564
+ if (t.quote === void 0 || t.quote === null) t.quote = "\"";
3565
+ else if (t.quote === !0) t.quote = "\"";
3566
+ else if (t.quote === !1) t.quote = "";
3567
+ else if (J(t.quote)) t.quote = t.quote.toString();
3568
+ else if (typeof t.quote != "string") return [new ta("CSV_OPTION_QUOTE_INVALID_TYPE", ["option `quote` must be a boolean, a buffer or a string,", `got ${JSON.stringify(t.quote)}`])];
3569
+ if ((t.quoted === void 0 || t.quoted === null) && (t.quoted = !1), t.escape_formulas === void 0 || t.escape_formulas === null) t.escape_formulas = !1;
3570
+ else if (typeof t.escape_formulas != "boolean") return [new ta("CSV_OPTION_ESCAPE_FORMULAS_INVALID_TYPE", ["option `escape_formulas` must be a boolean,", `got ${JSON.stringify(t.escape_formulas)}`])];
3571
+ if ((t.quoted_empty === void 0 || t.quoted_empty === null) && (t.quoted_empty = void 0), t.quoted_match === void 0 || t.quoted_match === null || t.quoted_match === !1 ? t.quoted_match = null : Array.isArray(t.quoted_match) || (t.quoted_match = [t.quoted_match]), t.quoted_match) for (let e of t.quoted_match) {
3572
+ let n = typeof e == "string", r = e instanceof RegExp;
3573
+ if (!n && !r) return [new ta("CSV_OPTION_QUOTED_MATCH", ["option `quoted_match` must be a string or a regex,", `got ${JSON.stringify(t.quoted_match)}`])];
3574
+ }
3575
+ if ((t.quoted_string === void 0 || t.quoted_string === null) && (t.quoted_string = !1), (t.eof === void 0 || t.eof === null) && (t.eof = !0), t.escape === void 0 || t.escape === null) t.escape = "\"";
3576
+ else if (J(t.escape)) t.escape = t.escape.toString();
3577
+ else if (typeof t.escape != "string") return [Error(`Invalid Option: escape must be a buffer or a string, got ${JSON.stringify(t.escape)}`)];
3578
+ if (t.escape.length > 1) return [Error(`Invalid Option: escape must be one character, got ${t.escape.length} characters`)];
3579
+ if (t.header === void 0 || t.header === null || t.header === !1) t.header = !1;
3580
+ else if (t.header !== !0) throw new ta("CSV_INVALID_OPTION_HEADER", ["option `header` is expected to be a boolean,", `got ${JSON.stringify(t.header)}`], t);
3581
+ if (t.header_as_comment === void 0 || t.header_as_comment === null || t.header_as_comment === !1) t.header_as_comment = !1;
3582
+ else if (t.header_as_comment === !0) t.header_as_comment = "#";
3583
+ else if (J(t.header_as_comment)) t.header_as_comment = t.header_as_comment.toString();
3584
+ else if (typeof t.header_as_comment != "string") throw new ta("CSV_INVALID_OPTION_HEADER_AS_COMMENT", ["option `header_as_comment` must be a boolean, a string or a buffer,", `got ${JSON.stringify(t.header_as_comment)}`], t);
3585
+ let [n, r] = ea(t.columns);
3586
+ if (n !== void 0) return [n];
3587
+ if (t.columns = r, (t.quoted === void 0 || t.quoted === null) && (t.quoted = !1), (t.cast === void 0 || t.cast === null) && (t.cast = {}), (t.cast.bigint === void 0 || t.cast.bigint === null) && (t.cast.bigint = (e) => "" + e), (t.cast.boolean === void 0 || t.cast.boolean === null) && (t.cast.boolean = (e) => e ? "1" : ""), (t.cast.date === void 0 || t.cast.date === null) && (t.cast.date = (e) => "" + e.getTime()), (t.cast.number === void 0 || t.cast.number === null) && (t.cast.number = (e) => "" + e), (t.cast.object === void 0 || t.cast.object === null) && (t.cast.object = (e) => JSON.stringify(e)), (t.cast.string === void 0 || t.cast.string === null) && (t.cast.string = function(e) {
3588
+ return e;
3589
+ }), t.on_record !== void 0 && typeof t.on_record != "function") return [Error("Invalid Option: \"on_record\" must be a function.")];
3590
+ if (t.record_delimiter === void 0 || t.record_delimiter === null) t.record_delimiter = "\n";
3591
+ else if (J(t.record_delimiter)) t.record_delimiter = t.record_delimiter.toString();
3592
+ else if (typeof t.record_delimiter != "string") return [Error(`Invalid Option: record_delimiter must be a buffer or a string, got ${JSON.stringify(t.record_delimiter)}`)];
3593
+ switch (t.record_delimiter) {
3594
+ case "unix":
3595
+ t.record_delimiter = "\n";
3596
+ break;
3597
+ case "mac":
3598
+ t.record_delimiter = "\r";
3599
+ break;
3600
+ case "windows":
3601
+ t.record_delimiter = "\r\n";
3602
+ break;
3603
+ case "ascii":
3604
+ t.record_delimiter = "";
3605
+ break;
3606
+ case "unicode":
3607
+ t.record_delimiter = "\u2028";
3608
+ break;
3609
+ }
3610
+ return [void 0, t];
3611
+ }, ia = G.from([
3612
+ 239,
3613
+ 187,
3614
+ 191
3615
+ ]), aa = function(e, t) {
3616
+ return t.length !== 0 && (e.indexOf(t) !== -1 || t.length > 1 && (e + t).indexOf(t) < e.length);
3617
+ }, oa = function(e, t, n) {
3618
+ return {
3619
+ options: e,
3620
+ state: t,
3621
+ info: n,
3622
+ __transform: function(e, t) {
3623
+ if (!Array.isArray(e) && typeof e != "object") return Error(`Invalid Record: expect an array or an object, got ${JSON.stringify(e)}`);
3624
+ if (this.info.records === 0) {
3625
+ if (Array.isArray(e)) {
3626
+ if (this.options.header === !0 && this.options.columns === void 0) return Error("Undiscoverable Columns: header option requires column option or object records");
3627
+ } else if (this.options.columns === void 0) {
3628
+ let [t, n] = ea(Object.keys(e));
3629
+ if (t) return;
3630
+ this.options.columns = n;
3631
+ }
3632
+ }
3633
+ if (this.info.records === 0) {
3634
+ this.bom(t);
3635
+ let e = this.headers(t);
3636
+ if (e) return e;
3637
+ }
3638
+ try {
3639
+ this.options.on_record && this.options.on_record(e, this.info.records);
3640
+ } catch (e) {
3641
+ return e;
3642
+ }
3643
+ let n, r;
3644
+ if (this.options.eof) {
3645
+ if ([n, r] = this.stringify(e), n) return n;
3646
+ if (r === void 0) return;
3647
+ r += this.options.record_delimiter;
3648
+ } else {
3649
+ if ([n, r] = this.stringify(e), n) return n;
3650
+ if (r === void 0) return;
3651
+ (this.options.header || this.info.records) && (r = this.options.record_delimiter + r);
3652
+ }
3653
+ this.info.records++, t(r);
3654
+ },
3655
+ stringify: function(e, t = !1) {
3656
+ if (typeof e != "object") return [void 0, e];
3657
+ let { columns: n } = this.options, r = [];
3658
+ if (Array.isArray(e)) {
3659
+ n && e.splice(n.length);
3660
+ for (let n = 0; n < e.length; n++) {
3661
+ let i = e[n], [a, o] = this.__cast(i, {
3662
+ index: n,
3663
+ column: n,
3664
+ records: this.info.records,
3665
+ header: t
3666
+ });
3667
+ if (a) return [a];
3668
+ r[n] = [o, i];
3669
+ }
3670
+ } else for (let i = 0; i < n.length; i++) {
3671
+ let a = Qi(e, n[i].key), [o, s] = this.__cast(a, {
3672
+ index: i,
3673
+ column: n[i].key,
3674
+ records: this.info.records,
3675
+ header: t
3676
+ });
3677
+ if (o) return [o];
3678
+ r[i] = [s, a];
3679
+ }
3680
+ let i = "";
3681
+ for (let e = 0; e < r.length; e++) {
3682
+ let t, n, [a, o] = r[e];
3683
+ if (typeof a == "string") t = this.options;
3684
+ else if ($i(a)) {
3685
+ if (t = a, a = t.value, delete t.value, typeof a != "string" && a != null && n) return [Error(`Invalid Casting Value: returned value must return a string, null or undefined, got ${JSON.stringify(a)}`)];
3686
+ if (t = {
3687
+ ...this.options,
3688
+ ...t
3689
+ }, [n, t] = ra(t), n !== void 0) return [n];
3690
+ } else if (a == null) t = this.options;
3691
+ else return [Error(`Invalid Casting Value: returned value must return a string, an object, null or undefined, got ${JSON.stringify(a)}`)];
3692
+ let { delimiter: s, escape: c, quote: l, quoted: u, quoted_empty: d, quoted_string: f, quoted_match: p, record_delimiter: m, escape_formulas: h } = t;
3693
+ if (a === "" && o === "") {
3694
+ let e = p && p.filter((e) => typeof e == "string" ? a.indexOf(e) !== -1 : e.test(a));
3695
+ e &&= e.length > 0, (e || !0 === d || !0 === f && !1 !== d) === !0 && (a = l + a + l), i += a;
3696
+ } else if (a) {
3697
+ if (typeof a != "string") return [Error(`Formatter must return a string, null or undefined, got ${JSON.stringify(a)}`)];
3698
+ let e = aa(a, s), t = l !== "" && a.indexOf(l) >= 0, n = a.indexOf(c) >= 0 && c !== l, r = aa(a, m), d = f && typeof o == "string", g = p && p.filter((e) => typeof e == "string" ? a.indexOf(e) !== -1 : e.test(a));
3699
+ if (g &&= g.length > 0, h) switch (a[0]) {
3700
+ case "=":
3701
+ case "+":
3702
+ case "-":
3703
+ case "@":
3704
+ case " ":
3705
+ case "\r":
3706
+ case "=":
3707
+ case "+":
3708
+ case "-":
3709
+ case "@":
3710
+ a = `'${a}`;
3711
+ break;
3712
+ }
3713
+ let _ = t === !0 || e || r || u || d || g;
3714
+ _ === !0 && n === !0 && (a = a.replaceAll(c, () => c + c)), t === !0 && (a = a.replaceAll(l, () => c + l)), _ === !0 && (a = l + a + l), i += a;
3715
+ } else (d === !0 || o === "" && f === !0 && d !== !1) && (i += l + l);
3716
+ e !== r.length - 1 && (i += s);
3717
+ }
3718
+ return [void 0, i];
3719
+ },
3720
+ bom: function(e) {
3721
+ this.options.bom === !0 && e(ia);
3722
+ },
3723
+ headers: function(e) {
3724
+ if (this.options.header === !1 || this.options.columns === void 0) return;
3725
+ let t, n = this.options.columns.map((e) => e.header);
3726
+ if (this.options.eof ? ([t, n] = this.stringify(n, !0), n += this.options.record_delimiter) : [t, n] = this.stringify(n), t) return t;
3727
+ this.options.header_as_comment && (n = this.options.header_as_comment + " " + n), e(n);
3728
+ },
3729
+ __cast: function(e, t) {
3730
+ let n = typeof e;
3731
+ try {
3732
+ return n === "string" ? [void 0, this.options.cast.string(e, t)] : n === "bigint" ? [void 0, this.options.cast.bigint(e, t)] : n === "number" ? [void 0, this.options.cast.number(e, t)] : n === "boolean" ? [void 0, this.options.cast.boolean(e, t)] : e instanceof Date ? [void 0, this.options.cast.date(e, t)] : n === "object" && e !== null ? [void 0, this.options.cast.object(e, t)] : e === null && this.options.cast.null !== void 0 ? [void 0, this.options.cast.null(e, t)] : e === void 0 && this.options.cast.undefined !== void 0 ? [void 0, this.options.cast.undefined(e, t)] : [void 0, e];
3733
+ } catch (e) {
3734
+ return [e];
3735
+ }
3736
+ }
3737
+ };
3738
+ }, sa = function(e, t = {}) {
3739
+ let n = [], [r, i] = ra(t);
3740
+ if (r !== void 0) throw r;
3741
+ let a = oa(i, { stop: !1 }, { records: 0 });
3742
+ for (let t of e) {
3743
+ let e = a.__transform(t, function(e) {
3744
+ n.push(e);
3745
+ });
3746
+ if (e !== void 0) throw e;
3747
+ }
3748
+ if (n.length === 0) {
3749
+ a.bom((e) => {
3750
+ n.push(e);
3751
+ });
3752
+ let e = a.headers((e) => {
3753
+ n.push(e);
3754
+ });
3755
+ if (e !== void 0) throw e;
3756
+ }
3757
+ return n.join("");
3758
+ }, ca = function(e = {}, t) {
3759
+ return this.options = e, (e.consume === void 0 || e.consume === null) && (this.options.consume = !1), this.options.objectMode = !0, (e.parallel === void 0 || e.parallel === null) && (this.options.parallel = 100), (e.params === void 0 || e.params === null) && (e.params = null), this.handler = t, yi.Transform.call(this, this.options), this.state = {
3760
+ running: 0,
3761
+ started: 0,
3762
+ finished: 0,
3763
+ paused: !1
3764
+ }, this;
3765
+ };
3766
+ cr.inherits(ca, yi.Transform), ca.prototype._transform = function(e, t, n) {
3767
+ this.state.started++, this.state.running++, !this.state.paused && this.state.running < this.options.parallel && (n(), n = null);
3768
+ try {
3769
+ let t = this.handler.length;
3770
+ if (this.options.params !== null && t--, t === 1) {
3771
+ let t = this.handler.call(this, e, this.options.params);
3772
+ t && t.then ? (t.then((e) => {
3773
+ this.__done(null, [e], n);
3774
+ }), t.catch((e) => {
3775
+ this.__done(e);
3776
+ })) : this.__done(null, [t], n);
3777
+ } else if (t === 2) this.handler.call(this, e, (e, ...t) => this.__done(e, t, n), this.options.params);
3778
+ else throw Error("Invalid handler arguments");
3779
+ return !1;
3780
+ } catch (e) {
3781
+ this.__done(e);
3782
+ }
3783
+ }, ca.prototype._flush = function(e) {
3784
+ this.state.running === 0 ? e() : this._ending = function() {
3785
+ e();
3786
+ };
3787
+ }, ca.prototype.__done = function(e, t, n) {
3788
+ if (this.state.running--, e) return this.destroy(e);
3789
+ this.state.finished++;
3790
+ for (let e of t) typeof e == "number" && (e = `${e}`), e != null && e !== "" && (this.state.paused = !this.push(e));
3791
+ n && n(), this._ending && this.state.running === 0 && this._ending();
3792
+ };
3793
+ //#endregion
3794
+ export { Pe as a, we as i, sa as n, Me as o, Te as r, Bi as t };
3795
+
3796
+ //# sourceMappingURL=sync.js.map