@piwitests/server 0.18.2 → 0.19.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 (773) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{BlnwU1OO.js → -09h6CA9.js} +1 -1
  3. package/.output/public/_nuxt/279D2RYp.js +1 -0
  4. package/.output/public/_nuxt/81InBX9v.js +1 -0
  5. package/.output/public/_nuxt/{CUvGJXY3.js → Ar3IelOY.js} +1 -1
  6. package/.output/public/_nuxt/B33iXw77.js +1 -0
  7. package/.output/public/_nuxt/B3B9Ii2A.js +1 -0
  8. package/.output/public/_nuxt/B3HO8kuh.js +1 -0
  9. package/.output/public/_nuxt/B44A4LSJ.js +1 -0
  10. package/.output/public/_nuxt/{C8OCrfDP.js → B7NBP1C-.js} +1 -1
  11. package/.output/public/_nuxt/{DZ3Vfcpz.js → B9WhzpKO.js} +1 -1
  12. package/.output/public/_nuxt/{DWowvnwc.js → BCMuIgP5.js} +1 -1
  13. package/.output/public/_nuxt/BDicZ1gQ.js +1 -0
  14. package/.output/public/_nuxt/BJ0XQElc.js +1 -0
  15. package/.output/public/_nuxt/{xqiPI_FQ.js → BMvCSA6h.js} +1 -1
  16. package/.output/public/_nuxt/BPQoBGg5.js +1 -0
  17. package/.output/public/_nuxt/BPRffDuo.js +1 -0
  18. package/.output/public/_nuxt/BSIxhGsh.js +1 -0
  19. package/.output/public/_nuxt/BVaxh6Nl.js +4 -0
  20. package/.output/public/_nuxt/{hgHc4teu.js → BX9ZXe98.js} +1 -1
  21. package/.output/public/_nuxt/{CcXaak_K.js → BYDaY0Z7.js} +1 -1
  22. package/.output/public/_nuxt/{S5DLdEpg.js → Bc8mOoz9.js} +2 -2
  23. package/.output/public/_nuxt/BccXfBfI.js +1 -0
  24. package/.output/public/_nuxt/{Bd3HqPMF.js → BeLWlVK0.js} +1 -1
  25. package/.output/public/_nuxt/{D5oNv2cB.js → BfTuX0wq.js} +1 -1
  26. package/.output/public/_nuxt/BjaRappk.js +1 -0
  27. package/.output/public/_nuxt/{By4YL7mx.js → Bn0YQDyy.js} +1 -1
  28. package/.output/public/_nuxt/Bp5ELvx9.js +1 -0
  29. package/.output/public/_nuxt/BpUaY9nH.js +2 -0
  30. package/.output/public/_nuxt/BqV0l12c.js +1 -0
  31. package/.output/public/_nuxt/{BjCHB89N.js → Bti38m-M.js} +1 -1
  32. package/.output/public/_nuxt/{QmMoMxLM.js → Bu2aaVIY.js} +3 -3
  33. package/.output/public/_nuxt/{DZUgX70W.js → BuMC3WjZ.js} +1 -1
  34. package/.output/public/_nuxt/{BJtlcTrb.js → BxCKKeYs.js} +1 -1
  35. package/.output/public/_nuxt/{CfOLBbW9.js → C-elpgyr.js} +1 -1
  36. package/.output/public/_nuxt/C2_3mdPC.js +1 -0
  37. package/.output/public/_nuxt/{BLIRKrbM.js → C5iG7O4O.js} +4 -4
  38. package/.output/public/_nuxt/C7P1UCO2.js +1 -0
  39. package/.output/public/_nuxt/{hH1UFE3Z.js → C95YAaJq.js} +1 -1
  40. package/.output/public/_nuxt/{BXY_PWcx.js → C9_jrmk9.js} +2 -2
  41. package/.output/public/_nuxt/CDk0q2hV.js +2 -0
  42. package/.output/public/_nuxt/{kjYMoWWx.js → CGNkHojN.js} +3 -3
  43. package/.output/public/_nuxt/CHEFCN8Q.js +1 -0
  44. package/.output/public/_nuxt/CHNwfU1y.js +1 -0
  45. package/.output/public/_nuxt/CK_2LZBS.js +1 -0
  46. package/.output/public/_nuxt/CNFYDQmj.js +1 -0
  47. package/.output/public/_nuxt/{DZOS7Fh7.js → CTxDO9fB.js} +1 -1
  48. package/.output/public/_nuxt/{kS3boz40.js → CU5S9GCh.js} +1 -1
  49. package/.output/public/_nuxt/{DZ1zNBVM.js → CUtJobDm.js} +1 -1
  50. package/.output/public/_nuxt/CV9-fTmY.js +1 -0
  51. package/.output/public/_nuxt/{e7zD3uJ0.js → CYsTqbBS.js} +1 -1
  52. package/.output/public/_nuxt/{C9YzQCiq.js → CZfMdzfk.js} +1 -1
  53. package/.output/public/_nuxt/{B-IcwqZ2.js → Cdff9XNh.js} +1 -1
  54. package/.output/public/_nuxt/{CNMoZYMv.js → ClOqkAcc.js} +1 -1
  55. package/.output/public/_nuxt/{DXbPFI1d.js → CpjgB2aY.js} +1 -1
  56. package/.output/public/_nuxt/CrwJAwhk.js +1 -0
  57. package/.output/public/_nuxt/CtQBsNUb.js +1 -0
  58. package/.output/public/_nuxt/CuSVQEkS.js +3 -0
  59. package/.output/public/_nuxt/{Df7kUO0m.js → CylWPruw.js} +1 -1
  60. package/.output/public/_nuxt/CzGyac8q.js +1 -0
  61. package/.output/public/_nuxt/D-c8ZSws.js +1 -0
  62. package/.output/public/_nuxt/{B2oUeBbA.js → D0HNloZ9.js} +1 -1
  63. package/.output/public/_nuxt/{DBtBvrYc.js → D55D4EYo.js} +1 -1
  64. package/.output/public/_nuxt/{CfPSts5n.js → DDDpCFpF.js} +1 -1
  65. package/.output/public/_nuxt/{CPLJeOCb.js → DEFEpYzn.js} +1 -1
  66. package/.output/public/_nuxt/DGfAxLHV.js +1 -0
  67. package/.output/public/_nuxt/DHDtnj7p.js +1 -0
  68. package/.output/public/_nuxt/DLSrtpsA.js +1 -0
  69. package/.output/public/_nuxt/DP8hfJ9h.js +1 -0
  70. package/.output/public/_nuxt/DS636elg.js +1 -0
  71. package/.output/public/_nuxt/{Cng9gj7q.js → DT53RWbC.js} +1 -1
  72. package/.output/public/_nuxt/DVDXJYq2.js +2 -0
  73. package/.output/public/_nuxt/DW0xl3I6.js +17 -0
  74. package/.output/public/_nuxt/{4TxgDGVa.js → DX-MDGb3.js} +1 -1
  75. package/.output/public/_nuxt/DcmZRa_F.js +1 -0
  76. package/.output/public/_nuxt/DgE2YE3R.js +1 -0
  77. package/.output/public/_nuxt/Dgf5N4Ng.js +1 -0
  78. package/.output/public/_nuxt/DiOLdHBC.js +1 -0
  79. package/.output/public/_nuxt/DiZyJYez.js +1 -0
  80. package/.output/public/_nuxt/Dk9fwOCm.js +34 -0
  81. package/.output/public/_nuxt/{BlA8mIS-.js → Dnpkl-1q.js} +1 -1
  82. package/.output/public/_nuxt/DoUy4UHi.js +44 -0
  83. package/.output/public/_nuxt/{CN1mJlvD.js → DprVVyUQ.js} +1 -1
  84. package/.output/public/_nuxt/{DD5HpaW9.js → DslPMqfa.js} +1 -1
  85. package/.output/public/_nuxt/{BFP6M-20.js → FUXhyidq.js} +1 -1
  86. package/.output/public/_nuxt/HXerICAi.js +79 -0
  87. package/.output/public/_nuxt/{gnCL8GjZ.js → IvQlbZk6.js} +1 -1
  88. package/.output/public/_nuxt/{BOCwBVnz.js → Jo8kRmHz.js} +1 -1
  89. package/.output/public/_nuxt/{oFM1KLWA.js → KnfsST6Y.js} +1 -1
  90. package/.output/public/_nuxt/NQikbhmK.js +253 -0
  91. package/.output/public/_nuxt/OSduWzyz.js +1 -0
  92. package/.output/public/_nuxt/SfMRXW25.js +5 -0
  93. package/.output/public/_nuxt/{BBK2-Krn.js → SlIRLREZ.js} +2 -2
  94. package/.output/public/_nuxt/TagBadge.By1E6r4y.css +1 -0
  95. package/.output/public/_nuxt/WsxFTEFq.js +10 -0
  96. package/.output/public/_nuxt/YVN7WG7q.js +1 -0
  97. package/.output/public/_nuxt/{rTvJTef_.js → ZFiQCMUB.js} +1 -1
  98. package/.output/public/_nuxt/aQgs_c6e.js +9 -0
  99. package/.output/public/_nuxt/builds/latest.json +1 -1
  100. package/.output/public/_nuxt/builds/meta/ab473028-4b37-4884-b243-b8f6e5046e5e.json +1 -0
  101. package/.output/public/_nuxt/{B1X__ilH.js → cHAnlQbv.js} +1 -1
  102. package/.output/public/_nuxt/dYCKgE-3.js +5 -0
  103. package/.output/public/_nuxt/{BeFDVhpA.js → eaVkJRSa.js} +1 -1
  104. package/.output/public/_nuxt/entry.CPhW41mh.css +1 -0
  105. package/.output/public/_nuxt/{Dwws9U0D.js → eptP4pGv.js} +1 -1
  106. package/.output/public/_nuxt/fVcG504p.js +1 -0
  107. package/.output/public/_nuxt/g26aVPxc.js +1 -0
  108. package/.output/public/_nuxt/{CsUoYK75.js → ndShiWE8.js} +1 -1
  109. package/.output/public/_nuxt/nv9-6vBK.js +1 -0
  110. package/.output/public/_nuxt/rWNTSFD6.js +3 -0
  111. package/.output/public/_nuxt/tvgqrYDd.js +1 -0
  112. package/.output/public/_nuxt/{wHnZ9OaL.js → y17lMTFy.js} +1 -1
  113. package/.output/public/_nuxt/{qpI-_f9Q.js → ybDYeNxd.js} +1 -1
  114. package/.output/public/_nuxt/{D0cnIs93.js → zQyPuvV1.js} +1 -1
  115. package/.output/public/demo/seed.version.json +2 -2
  116. package/.output/server/chunks/_/ai-prompt-preview.mjs +38 -0
  117. package/.output/server/chunks/_/ai-prompt-preview.mjs.map +1 -0
  118. package/.output/server/chunks/_/collect.mjs +122 -0
  119. package/.output/server/chunks/_/collect.mjs.map +1 -0
  120. package/.output/server/chunks/_/import-runs.mjs +351 -0
  121. package/.output/server/chunks/_/import-runs.mjs.map +1 -0
  122. package/.output/server/chunks/_/markers.mjs +1 -1
  123. package/.output/server/chunks/_/quarantine.mjs +112 -0
  124. package/.output/server/chunks/_/quarantine.mjs.map +1 -0
  125. package/.output/server/chunks/_/users.mjs +1 -1
  126. package/.output/server/chunks/build/{Alert-Bp1Wz_sq.mjs → Alert-C4xq8lao.mjs} +2 -2
  127. package/.output/server/chunks/build/Alert-C4xq8lao.mjs.map +1 -0
  128. package/.output/server/chunks/build/{Breadcrumb-C9ZPTLym.mjs → Breadcrumb-Ak2Lg3oM.mjs} +3 -3
  129. package/.output/server/chunks/build/Breadcrumb-Ak2Lg3oM.mjs.map +1 -0
  130. package/.output/server/chunks/build/{BreadcrumbNav-C3y42Vun.mjs → BreadcrumbNav-DO7I_z-n.mjs} +3 -3
  131. package/.output/server/chunks/build/BreadcrumbNav-DO7I_z-n.mjs.map +1 -0
  132. package/.output/server/chunks/build/{BrowserBadge-DNCp9pF-.mjs → BrowserBadge-D33lqUcj.mjs} +5 -5
  133. package/.output/server/chunks/build/BrowserBadge-D33lqUcj.mjs.map +1 -0
  134. package/.output/server/chunks/build/{ChartCard-Fr557IbV.mjs → ChartCard-Y1UKwMsf.mjs} +2 -2
  135. package/.output/server/chunks/build/ChartCard-Y1UKwMsf.mjs.map +1 -0
  136. package/.output/server/chunks/build/{Checkbox-cVOSIY93.mjs → Checkbox-DvUBGagc.mjs} +8 -8
  137. package/.output/server/chunks/build/Checkbox-DvUBGagc.mjs.map +1 -0
  138. package/.output/server/chunks/build/{CiEnvCard-DXPOhdSG.mjs → CiEnvCard-CrjOM17n.mjs} +25 -34
  139. package/.output/server/chunks/build/CiEnvCard-CrjOM17n.mjs.map +1 -0
  140. package/.output/server/chunks/build/{CodeBlock-BGwNmJ8J.mjs → CodeBlock-BgE-NSmE.mjs} +7 -22
  141. package/.output/server/chunks/build/CodeBlock-BgE-NSmE.mjs.map +1 -0
  142. package/.output/server/chunks/build/{DashboardNavbar-Bdp-OwTN.mjs → DashboardNavbar-BHmMSPX7.mjs} +3 -3
  143. package/.output/server/chunks/build/DashboardNavbar-BHmMSPX7.mjs.map +1 -0
  144. package/.output/server/chunks/build/{DashboardSidebarToggle-Ji6ADuqF.mjs → DashboardSidebarToggle-DCTnHiIv.mjs} +3 -3
  145. package/.output/server/chunks/build/DashboardSidebarToggle-DCTnHiIv.mjs.map +1 -0
  146. package/.output/server/chunks/build/{DataLocationCard-D6xSOrme.mjs → DataLocationCard-B_YHdzSz.mjs} +3 -3
  147. package/.output/server/chunks/build/DataLocationCard-B_YHdzSz.mjs.map +1 -0
  148. package/.output/server/chunks/build/{DiagnosisPanel-DV1xwGu4.mjs → DiagnosisPanel-B646dK4p.mjs} +17 -528
  149. package/.output/server/chunks/build/DiagnosisPanel-B646dK4p.mjs.map +1 -0
  150. package/.output/server/chunks/build/DurationValue-D20oGbnc.mjs +43 -0
  151. package/.output/server/chunks/build/DurationValue-D20oGbnc.mjs.map +1 -0
  152. package/.output/server/chunks/build/{EmptyState-DV3oT_xz.mjs → EmptyState-Dtlab7S9.mjs} +3 -3
  153. package/.output/server/chunks/build/EmptyState-Dtlab7S9.mjs.map +1 -0
  154. package/.output/server/chunks/build/{EntityLinks-DeOP13Kr.mjs → EntityLinks-D3fp57pR.mjs} +6 -6
  155. package/.output/server/chunks/build/EntityLinks-D3fp57pR.mjs.map +1 -0
  156. package/.output/server/chunks/build/{EnvManagedBadge-Qpn58Nmr.mjs → EnvManagedBadge-Bg3FSiU1.mjs} +3 -3
  157. package/.output/server/chunks/build/EnvManagedBadge-Bg3FSiU1.mjs.map +1 -0
  158. package/.output/server/chunks/build/{FormField-B-GSn_VR.mjs → FormField-B0HKsdMd.mjs} +3 -3
  159. package/.output/server/chunks/build/FormField-B0HKsdMd.mjs.map +1 -0
  160. package/.output/server/chunks/build/{HelpHint-YEMWtKu1.mjs → HelpHint-DrcIv-Oj.mjs} +53 -6
  161. package/.output/server/chunks/build/HelpHint-DrcIv-Oj.mjs.map +1 -0
  162. package/.output/server/chunks/build/{Label-DBvbHd3A.mjs → Label-DYDR1Oeh.mjs} +2 -2
  163. package/.output/server/chunks/build/Label-DYDR1Oeh.mjs.map +1 -0
  164. package/.output/server/chunks/build/{MiniRunBars-C3HG-EYm.mjs → MiniRunBars-CZMugDrh.mjs} +2 -2
  165. package/.output/server/chunks/build/MiniRunBars-CZMugDrh.mjs.map +1 -0
  166. package/.output/server/chunks/build/{Modal-CfA78Hm1.mjs → Modal-Ck2XLt8d.mjs} +2 -2
  167. package/.output/server/chunks/build/Modal-Ck2XLt8d.mjs.map +1 -0
  168. package/.output/server/chunks/build/{OpenInIdeLink-B92wosXu.mjs → OpenInIdeLink-C4MXA8ya.mjs} +6 -6
  169. package/.output/server/chunks/build/{OpenInIdeLink-B92wosXu.mjs.map → OpenInIdeLink-C4MXA8ya.mjs.map} +1 -1
  170. package/.output/server/chunks/build/{ProjectTestCasesTable-9Ia825h8.mjs → ProjectTestCasesTable-CxfQ5wtN.mjs} +120 -45
  171. package/.output/server/chunks/build/ProjectTestCasesTable-CxfQ5wtN.mjs.map +1 -0
  172. package/.output/server/chunks/build/{RovingFocusItem-CxhHdNGo.mjs → RovingFocusItem-BJSzTBjy.mjs} +2 -2
  173. package/.output/server/chunks/build/RovingFocusItem-BJSzTBjy.mjs.map +1 -0
  174. package/.output/server/chunks/build/{RunReports-BpJqLHY9.mjs → RunReports-DFLv51TX.mjs} +8 -6
  175. package/.output/server/chunks/build/RunReports-DFLv51TX.mjs.map +1 -0
  176. package/.output/server/chunks/build/{RunStatusBadge-BhmJ_RKM.mjs → RunStatusBadge-FfGb6bkW.mjs} +3 -2
  177. package/.output/server/chunks/build/RunStatusBadge-FfGb6bkW.mjs.map +1 -0
  178. package/.output/server/chunks/build/{SectionCard-COd9TuDq.mjs → SectionCard-CN-v0FZ_.mjs} +2 -2
  179. package/.output/server/chunks/build/SectionCard-CN-v0FZ_.mjs.map +1 -0
  180. package/.output/server/chunks/build/{Select-ppPz926C.mjs → Select-CUqj50wi.mjs} +4 -4
  181. package/.output/server/chunks/build/Select-CUqj50wi.mjs.map +1 -0
  182. package/.output/server/chunks/build/{SelectMenu-799c_Ils.mjs → SelectMenu-Db7osY7J.mjs} +4 -4
  183. package/.output/server/chunks/build/{SelectMenu-799c_Ils.mjs.map → SelectMenu-Db7osY7J.mjs.map} +1 -1
  184. package/.output/server/chunks/build/{Separator-CxZdx8kw.mjs → Separator-CR4WcEKD.mjs} +2 -2
  185. package/.output/server/chunks/build/Separator-CR4WcEKD.mjs.map +1 -0
  186. package/.output/server/chunks/build/{SettingsField-DDD4oqys.mjs → SettingsField-D6iEYbEc.mjs} +6 -6
  187. package/.output/server/chunks/build/SettingsField-D6iEYbEc.mjs.map +1 -0
  188. package/.output/server/chunks/build/{Slideover-B95Rj237.mjs → Slideover-DgCa80mf.mjs} +3 -3
  189. package/.output/server/chunks/build/Slideover-DgCa80mf.mjs.map +1 -0
  190. package/.output/server/chunks/build/{Switch-xQQ3_ME1.mjs → Switch-CgUioOYB.mjs} +5 -5
  191. package/.output/server/chunks/build/Switch-CgUioOYB.mjs.map +1 -0
  192. package/.output/server/chunks/build/{Table-CPhhVzDv.mjs → Table-BRk04Hd2.mjs} +3 -3
  193. package/.output/server/chunks/build/Table-BRk04Hd2.mjs.map +1 -0
  194. package/.output/server/chunks/build/{Tabs-BV9XqjoO.mjs → Tabs-Bbsg9wag.mjs} +3 -3
  195. package/.output/server/chunks/build/Tabs-Bbsg9wag.mjs.map +1 -0
  196. package/.output/server/chunks/build/TagBadge-DwzoFCBb.mjs +31 -0
  197. package/.output/server/chunks/build/TagBadge-DwzoFCBb.mjs.map +1 -0
  198. package/.output/server/chunks/build/TagBadge-styles.jhuZ4NjP.mjs +8 -0
  199. package/.output/server/chunks/build/TagBadge-styles.jhuZ4NjP.mjs.map +1 -0
  200. package/.output/server/chunks/build/{TestCaseHistoryChart-DMb-xSJa.mjs → TestCaseHistoryChart-nMLPhdvD.mjs} +6 -6
  201. package/.output/server/chunks/build/TestCaseHistoryChart-nMLPhdvD.mjs.map +1 -0
  202. package/.output/server/chunks/build/TestMetaBadges-D5_yUtIP.mjs +200 -0
  203. package/.output/server/chunks/build/TestMetaBadges-D5_yUtIP.mjs.map +1 -0
  204. package/.output/server/chunks/build/{TestStatusBar-CEzt76wk.mjs → TestStatusBar-j6h2Jp6A.mjs} +15 -15
  205. package/.output/server/chunks/build/TestStatusBar-j6h2Jp6A.mjs.map +1 -0
  206. package/.output/server/chunks/build/{Textarea-DrrqQUVG.mjs → Textarea-Dv2-lOvW.mjs} +2 -2
  207. package/.output/server/chunks/build/Textarea-Dv2-lOvW.mjs.map +1 -0
  208. package/.output/server/chunks/build/{Tooltip-7vwuDPrZ.mjs → Tooltip-BOazooWP.mjs} +3 -3
  209. package/.output/server/chunks/build/Tooltip-BOazooWP.mjs.map +1 -0
  210. package/.output/server/chunks/build/{VisuallyHiddenInput-C9eJVpPW.mjs → VisuallyHiddenInput-D6kBJxVd.mjs} +2 -2
  211. package/.output/server/chunks/build/VisuallyHiddenInput-D6kBJxVd.mjs.map +1 -0
  212. package/.output/server/chunks/build/{_id_-B2yirIuA.mjs → _id_-B78ky13D.mjs} +798 -358
  213. package/.output/server/chunks/build/_id_-B78ky13D.mjs.map +1 -0
  214. package/.output/server/chunks/build/{_id_-bWcP2xFl.mjs → _id_-BHh65pfg.mjs} +690 -443
  215. package/.output/server/chunks/build/_id_-BHh65pfg.mjs.map +1 -0
  216. package/.output/server/chunks/build/{_id_-B4V5fop6.mjs → _id_-Rzkqx55x.mjs} +297 -60
  217. package/.output/server/chunks/build/{_id_-B4V5fop6.mjs.map → _id_-Rzkqx55x.mjs.map} +1 -1
  218. package/.output/server/chunks/build/{_id_-CE0Gso6i.mjs → _id_-z5N6HPyC.mjs} +89 -40
  219. package/.output/server/chunks/build/_id_-z5N6HPyC.mjs.map +1 -0
  220. package/.output/server/chunks/build/{about-CoJjvUwM.mjs → about-CvSP73Ug.mjs} +100 -52
  221. package/.output/server/chunks/build/about-CvSP73Ug.mjs.map +1 -0
  222. package/.output/server/chunks/build/{account-Cn-eZqXM.mjs → account-DAfvaD-F.mjs} +21 -9
  223. package/.output/server/chunks/build/account-DAfvaD-F.mjs.map +1 -0
  224. package/.output/server/chunks/build/{ai-7jdaPOmj.mjs → ai-B4VJ9K1K.mjs} +45 -23
  225. package/.output/server/chunks/build/{ai-7jdaPOmj.mjs.map → ai-B4VJ9K1K.mjs.map} +1 -1
  226. package/.output/server/chunks/build/{analytics-B276WPeU.mjs → analytics-CJPC6t4L.mjs} +65 -39
  227. package/.output/server/chunks/build/{analytics-B276WPeU.mjs.map → analytics-CJPC6t4L.mjs.map} +1 -1
  228. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  229. package/.output/server/chunks/build/compare-RxHSOdsO.mjs +12 -0
  230. package/.output/server/chunks/build/{db.client-aHcD0wyX.mjs → db.client-CQoVTYB9.mjs} +83 -5
  231. package/.output/server/chunks/build/db.client-CQoVTYB9.mjs.map +1 -0
  232. package/.output/server/chunks/build/{default-BSzdkM_L.mjs → default-zvbFgDJG.mjs} +36 -24
  233. package/.output/server/chunks/build/default-zvbFgDJG.mjs.map +1 -0
  234. package/.output/server/chunks/build/{docs-BN_x1OW3.mjs → docs-DyuVEgtB.mjs} +30 -49
  235. package/.output/server/chunks/build/{docs-BN_x1OW3.mjs.map → docs-DyuVEgtB.mjs.map} +1 -1
  236. package/.output/server/chunks/build/{edit-C9Z7oZeu.mjs → edit-CFR5g2Qf.mjs} +30 -18
  237. package/.output/server/chunks/build/edit-CFR5g2Qf.mjs.map +1 -0
  238. package/.output/server/chunks/build/{fetch-8kznMtBM.mjs → fetch-B4FwBOzu.mjs} +3 -3
  239. package/.output/server/chunks/build/fetch-B4FwBOzu.mjs.map +1 -0
  240. package/.output/server/chunks/build/{forgot-password-BqPF4Rxs.mjs → forgot-password-CC__1OnV.mjs} +17 -5
  241. package/.output/server/chunks/build/forgot-password-CC__1OnV.mjs.map +1 -0
  242. package/.output/server/chunks/build/{help-content-DmFnuhNu.mjs → help-content-C876a9WD.mjs} +37 -8
  243. package/.output/server/chunks/build/help-content-C876a9WD.mjs.map +1 -0
  244. package/.output/server/chunks/build/import-CZo3djDi.mjs +1021 -0
  245. package/.output/server/chunks/build/import-CZo3djDi.mjs.map +1 -0
  246. package/.output/server/chunks/build/{index-CULN3-en.mjs → index-CU2nZhAa.mjs} +113 -42
  247. package/.output/server/chunks/build/index-CU2nZhAa.mjs.map +1 -0
  248. package/.output/server/chunks/build/{index-DVUtBexc.mjs → index-D7fe97l3.mjs} +1305 -281
  249. package/.output/server/chunks/build/index-D7fe97l3.mjs.map +1 -0
  250. package/.output/server/chunks/build/{index-BR9hw6qk.mjs → index-Stqw0dEI.mjs} +50 -30
  251. package/.output/server/chunks/build/index-Stqw0dEI.mjs.map +1 -0
  252. package/.output/server/chunks/build/{index-BK9PTRpd.mjs → index-gCw_y4ZJ.mjs} +87 -70
  253. package/.output/server/chunks/build/{index-BK9PTRpd.mjs.map → index-gCw_y4ZJ.mjs.map} +1 -1
  254. package/.output/server/chunks/build/{index-Ba-Fifra.mjs → index-tR6owKzj.mjs} +18 -6
  255. package/.output/server/chunks/build/index-tR6owKzj.mjs.map +1 -0
  256. package/.output/server/chunks/build/{isValueEqualOrExist-DBZjbD_3.mjs → isValueEqualOrExist-D2qw9YEr.mjs} +3 -3
  257. package/.output/server/chunks/build/isValueEqualOrExist-D2qw9YEr.mjs.map +1 -0
  258. package/.output/server/chunks/build/{login-D2XZDuek.mjs → login-Da4u1IlW.mjs} +19 -7
  259. package/.output/server/chunks/build/login-Da4u1IlW.mjs.map +1 -0
  260. package/.output/server/chunks/build/{mcp-_o6cMS6m.mjs → mcp-B3IUvRgD.mjs} +27 -21
  261. package/.output/server/chunks/build/mcp-B3IUvRgD.mjs.map +1 -0
  262. package/.output/server/chunks/build/{notifications-Dzm9c0u_.mjs → notifications-abDv0id8.mjs} +27 -21
  263. package/.output/server/chunks/build/notifications-abDv0id8.mjs.map +1 -0
  264. package/.output/server/chunks/build/pr-feedback-DjZID6q-.mjs +368 -0
  265. package/.output/server/chunks/build/pr-feedback-DjZID6q-.mjs.map +1 -0
  266. package/.output/server/chunks/build/{reset-password-gpFzIEDj.mjs → reset-password-BmrUS4ZD.mjs} +17 -5
  267. package/.output/server/chunks/build/reset-password-BmrUS4ZD.mjs.map +1 -0
  268. package/.output/server/chunks/build/server.mjs +238 -36
  269. package/.output/server/chunks/build/{settings-pNyPBXVa.mjs → settings-Du7YqF8i.mjs} +23 -10
  270. package/.output/server/chunks/build/settings-Du7YqF8i.mjs.map +1 -0
  271. package/.output/server/chunks/build/{settings-metadata-B0wo5R-W.mjs → settings-metadata-DrEqWcW-.mjs} +11 -2
  272. package/.output/server/chunks/build/settings-metadata-DrEqWcW-.mjs.map +1 -0
  273. package/.output/server/chunks/build/{storage-XelzuyPy.mjs → storage-B4vzxd8G.mjs} +41 -31
  274. package/.output/server/chunks/build/storage-B4vzxd8G.mjs.map +1 -0
  275. package/.output/server/chunks/build/styles.mjs +1 -0
  276. package/.output/server/chunks/build/{tags-DrCQ7QSw.mjs → tags-DauTe_F-.mjs} +22 -10
  277. package/.output/server/chunks/build/tags-DauTe_F-.mjs.map +1 -0
  278. package/.output/server/chunks/build/{test-cases-pmOxi-AN.mjs → test-cases-DUvaO1He.mjs} +38 -24
  279. package/.output/server/chunks/build/test-cases-DUvaO1He.mjs.map +1 -0
  280. package/.output/server/chunks/build/{timeout-hygiene-CNs71Iah.mjs → timeout-hygiene-CbnSaVbK.mjs} +20 -8
  281. package/.output/server/chunks/build/timeout-hygiene-CbnSaVbK.mjs.map +1 -0
  282. package/.output/server/chunks/build/{useAiStatus-ZO987RY7.mjs → useAiStatus-CWvIo32Q.mjs} +89 -89
  283. package/.output/server/chunks/build/useAiStatus-CWvIo32Q.mjs.map +1 -0
  284. package/.output/server/chunks/build/{useCopy-BQQKcwlq.mjs → useCopy-CeKWgHyT.mjs} +2 -2
  285. package/.output/server/chunks/build/useCopy-CeKWgHyT.mjs.map +1 -0
  286. package/.output/server/chunks/build/{PageStateCard-Bwee6JTk.mjs → useCopyRich-BemRsKgv.mjs} +418 -39
  287. package/.output/server/chunks/build/useCopyRich-BemRsKgv.mjs.map +1 -0
  288. package/.output/server/chunks/build/useDesktopDownload-D49JRQSw.mjs +46 -0
  289. package/.output/server/chunks/build/useDesktopDownload-D49JRQSw.mjs.map +1 -0
  290. package/.output/server/chunks/build/{useFormControl-BLpq1s4O.mjs → useFormControl-CZ9So7iX.mjs} +2 -2
  291. package/.output/server/chunks/build/useFormControl-CZ9So7iX.mjs.map +1 -0
  292. package/.output/server/chunks/build/{useOpenInIde-kMZ7Jw5c.mjs → useOpenInIde-4GFf-kdi.mjs} +2 -2
  293. package/.output/server/chunks/build/useOpenInIde-4GFf-kdi.mjs.map +1 -0
  294. package/.output/server/chunks/build/{useSettingsNav-NjI2seBy.mjs → useSettingsNav-C3O866KC.mjs} +6 -6
  295. package/.output/server/chunks/build/useSettingsNav-C3O866KC.mjs.map +1 -0
  296. package/.output/server/chunks/build/{useTreeViewCookie-DVYpxW-p.mjs → useTreeViewCookie-CQjQdTkH.mjs} +2 -2
  297. package/.output/server/chunks/build/useTreeViewCookie-CQjQdTkH.mjs.map +1 -0
  298. package/.output/server/chunks/build/{users-NmAUZs3i.mjs → users-CTUqXyGh.mjs} +22 -10
  299. package/.output/server/chunks/build/users-CTUqXyGh.mjs.map +1 -0
  300. package/.output/server/chunks/build/{virtualizer-ZaqK4guJ.mjs → virtualizer-Cd1hhlxC.mjs} +5 -5
  301. package/.output/server/chunks/build/virtualizer-Cd1hhlxC.mjs.map +1 -0
  302. package/.output/server/chunks/build/{wasted-time-CguAF9zc.mjs → wasted-time-lYkx5YO4.mjs} +26 -14
  303. package/.output/server/chunks/build/wasted-time-lYkx5YO4.mjs.map +1 -0
  304. package/.output/server/chunks/nitro/nitro.mjs +4960 -1155
  305. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  306. package/.output/server/chunks/routes/__piwi/session.get.mjs +13 -1
  307. package/.output/server/chunks/routes/__piwi/session.get.mjs.map +1 -1
  308. package/.output/server/chunks/routes/api/admin/cleanup.delete.mjs +12 -0
  309. package/.output/server/chunks/routes/api/admin/cleanup.delete.mjs.map +1 -1
  310. package/.output/server/chunks/routes/api/admin/stats.get.mjs +12 -0
  311. package/.output/server/chunks/routes/api/admin/stats.get.mjs.map +1 -1
  312. package/.output/server/chunks/routes/api/ai/status.get.mjs +12 -0
  313. package/.output/server/chunks/routes/api/ai/status.get.mjs.map +1 -1
  314. package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs +12 -0
  315. package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs.map +1 -1
  316. package/.output/server/chunks/routes/api/auth/change-password.post.mjs +12 -0
  317. package/.output/server/chunks/routes/api/auth/change-password.post.mjs.map +1 -1
  318. package/.output/server/chunks/routes/api/auth/forgot-password.post.mjs +12 -0
  319. package/.output/server/chunks/routes/api/auth/forgot-password.post.mjs.map +1 -1
  320. package/.output/server/chunks/routes/api/auth/login.post.mjs +12 -0
  321. package/.output/server/chunks/routes/api/auth/login.post.mjs.map +1 -1
  322. package/.output/server/chunks/routes/api/auth/logout.post.mjs +12 -0
  323. package/.output/server/chunks/routes/api/auth/logout.post.mjs.map +1 -1
  324. package/.output/server/chunks/routes/api/auth/me.get.mjs +12 -0
  325. package/.output/server/chunks/routes/api/auth/me.get.mjs.map +1 -1
  326. package/.output/server/chunks/routes/api/auth/oauth/_provider/callback.get.mjs +12 -0
  327. package/.output/server/chunks/routes/api/auth/oauth/_provider/callback.get.mjs.map +1 -1
  328. package/.output/server/chunks/routes/api/auth/oauth/_provider/login.get.mjs +12 -0
  329. package/.output/server/chunks/routes/api/auth/oauth/_provider/login.get.mjs.map +1 -1
  330. package/.output/server/chunks/routes/api/auth/oauth/_provider/unlink.post.mjs +12 -0
  331. package/.output/server/chunks/routes/api/auth/oauth/_provider/unlink.post.mjs.map +1 -1
  332. package/.output/server/chunks/routes/api/auth/reset-password.post.mjs +12 -0
  333. package/.output/server/chunks/routes/api/auth/reset-password.post.mjs.map +1 -1
  334. package/.output/server/chunks/routes/api/auth/send-verify-email.post.mjs +12 -0
  335. package/.output/server/chunks/routes/api/auth/send-verify-email.post.mjs.map +1 -1
  336. package/.output/server/chunks/routes/api/auth/setup.get.mjs +12 -0
  337. package/.output/server/chunks/routes/api/auth/setup.get.mjs.map +1 -1
  338. package/.output/server/chunks/routes/api/auth/setup.post.mjs +12 -0
  339. package/.output/server/chunks/routes/api/auth/setup.post.mjs.map +1 -1
  340. package/.output/server/chunks/routes/api/auth/verify-email.get.mjs +12 -0
  341. package/.output/server/chunks/routes/api/auth/verify-email.get.mjs.map +1 -1
  342. package/.output/server/chunks/routes/api/channels/_id/test.post.mjs +12 -0
  343. package/.output/server/chunks/routes/api/channels/_id/test.post.mjs.map +1 -1
  344. package/.output/server/chunks/routes/api/channels/_id_.delete.mjs +12 -0
  345. package/.output/server/chunks/routes/api/channels/_id_.delete.mjs.map +1 -1
  346. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/approve.post.mjs +12 -0
  347. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/approve.post.mjs.map +1 -1
  348. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/reject.post.mjs +12 -0
  349. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/reject.post.mjs.map +1 -1
  350. package/.output/server/chunks/routes/api/desktop/reporter-config.get.mjs +12 -0
  351. package/.output/server/chunks/routes/api/desktop/reporter-config.get.mjs.map +1 -1
  352. package/.output/server/chunks/routes/api/failure-clusters/_id/base-commit.patch.mjs +12 -0
  353. package/.output/server/chunks/routes/api/failure-clusters/_id/base-commit.patch.mjs.map +1 -1
  354. package/.output/server/chunks/routes/api/failure-clusters/_id/branches.get.mjs +12 -0
  355. package/.output/server/chunks/routes/api/failure-clusters/_id/branches.get.mjs.map +1 -1
  356. package/.output/server/chunks/routes/api/failure-clusters/_id/commit-diff.get.mjs +12 -0
  357. package/.output/server/chunks/routes/api/failure-clusters/_id/commit-diff.get.mjs.map +1 -1
  358. package/.output/server/chunks/routes/api/failure-clusters/_id/commits.get.mjs +12 -0
  359. package/.output/server/chunks/routes/api/failure-clusters/_id/commits.get.mjs.map +1 -1
  360. package/.output/server/chunks/routes/api/failure-clusters/_id/context.get.mjs +24 -1
  361. package/.output/server/chunks/routes/api/failure-clusters/_id/context.get.mjs.map +1 -1
  362. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose/stream.post.mjs +13 -1
  363. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose/stream.post.mjs.map +1 -1
  364. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose.post.mjs +13 -1
  365. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose.post.mjs.map +1 -1
  366. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnoses.get.mjs +13 -1
  367. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnoses.get.mjs.map +1 -1
  368. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnosis.get.mjs +13 -1
  369. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnosis.get.mjs.map +1 -1
  370. package/.output/server/chunks/routes/api/failure-clusters/_id/export.get.mjs +64 -0
  371. package/.output/server/chunks/routes/api/failure-clusters/_id/export.get.mjs.map +1 -0
  372. package/.output/server/chunks/routes/api/failure-clusters/_id/extract-cases.post.mjs +13 -1
  373. package/.output/server/chunks/routes/api/failure-clusters/_id/extract-cases.post.mjs.map +1 -1
  374. package/.output/server/chunks/routes/api/failure-clusters/_id/fix-plan.get.mjs +56 -0
  375. package/.output/server/chunks/routes/api/failure-clusters/_id/fix-plan.get.mjs.map +1 -0
  376. package/.output/server/chunks/routes/api/failure-clusters/_id/status.patch.mjs +13 -1
  377. package/.output/server/chunks/routes/api/failure-clusters/_id/status.patch.mjs.map +1 -1
  378. package/.output/server/chunks/routes/api/failure-clusters/_id_.get.mjs +12 -0
  379. package/.output/server/chunks/routes/api/failure-clusters/_id_.get.mjs.map +1 -1
  380. package/.output/server/chunks/routes/api/failure-diagnoses/_id/feedback.patch.mjs +13 -1
  381. package/.output/server/chunks/routes/api/failure-diagnoses/_id/feedback.patch.mjs.map +1 -1
  382. package/.output/server/chunks/routes/api/files/_...path_.get.mjs +13 -32
  383. package/.output/server/chunks/routes/api/files/_...path_.get.mjs.map +1 -1
  384. package/.output/server/chunks/routes/api/health.get.mjs +13 -1
  385. package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
  386. package/.output/server/chunks/routes/api/index.get.mjs +12 -0
  387. package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
  388. package/.output/server/chunks/routes/api/index.get2.mjs +13 -1
  389. package/.output/server/chunks/routes/api/index.get2.mjs.map +1 -1
  390. package/.output/server/chunks/routes/api/index.get3.mjs +13 -1
  391. package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
  392. package/.output/server/chunks/routes/api/index.get4.mjs +13 -1
  393. package/.output/server/chunks/routes/api/index.get4.mjs.map +1 -1
  394. package/.output/server/chunks/routes/api/index.get5.mjs +12 -0
  395. package/.output/server/chunks/routes/api/index.get5.mjs.map +1 -1
  396. package/.output/server/chunks/routes/api/index.post.mjs +12 -0
  397. package/.output/server/chunks/routes/api/index.post.mjs.map +1 -1
  398. package/.output/server/chunks/routes/api/index.post2.mjs +13 -1
  399. package/.output/server/chunks/routes/api/index.post2.mjs.map +1 -1
  400. package/.output/server/chunks/routes/api/index.post3.mjs +13 -1
  401. package/.output/server/chunks/routes/api/index.post3.mjs.map +1 -1
  402. package/.output/server/chunks/routes/api/index.post4.mjs +13 -1
  403. package/.output/server/chunks/routes/api/index.post4.mjs.map +1 -1
  404. package/.output/server/chunks/routes/api/index.post5.mjs +13 -1
  405. package/.output/server/chunks/routes/api/index.post5.mjs.map +1 -1
  406. package/.output/server/chunks/routes/api/index.post6.mjs +12 -0
  407. package/.output/server/chunks/routes/api/index.post6.mjs.map +1 -1
  408. package/.output/server/chunks/routes/api/links/_id/refresh.post.mjs +13 -1
  409. package/.output/server/chunks/routes/api/links/_id/refresh.post.mjs.map +1 -1
  410. package/.output/server/chunks/routes/api/links/_id_.delete.mjs +13 -1
  411. package/.output/server/chunks/routes/api/links/_id_.delete.mjs.map +1 -1
  412. package/.output/server/chunks/routes/api/links/_id_.patch.mjs +13 -1
  413. package/.output/server/chunks/routes/api/links/_id_.patch.mjs.map +1 -1
  414. package/.output/server/chunks/routes/api/markers/_id_.delete.mjs +13 -1
  415. package/.output/server/chunks/routes/api/markers/_id_.delete.mjs.map +1 -1
  416. package/.output/server/chunks/routes/api/markers/_id_.put.mjs +13 -1
  417. package/.output/server/chunks/routes/api/markers/_id_.put.mjs.map +1 -1
  418. package/.output/server/chunks/routes/api/notifications/stream.get.mjs +13 -1
  419. package/.output/server/chunks/routes/api/notifications/stream.get.mjs.map +1 -1
  420. package/.output/server/chunks/routes/api/projects/_id/cluster-merge-suggestions.get.mjs +13 -1
  421. package/.output/server/chunks/routes/api/projects/_id/cluster-merge-suggestions.get.mjs.map +1 -1
  422. package/.output/server/chunks/routes/api/projects/_id/failure-clusters.get.mjs +13 -1
  423. package/.output/server/chunks/routes/api/projects/_id/failure-clusters.get.mjs.map +1 -1
  424. package/.output/server/chunks/routes/api/projects/_id/flaky-classify.post.mjs +13 -1
  425. package/.output/server/chunks/routes/api/projects/_id/flaky-classify.post.mjs.map +1 -1
  426. package/.output/server/chunks/routes/api/projects/_id/flaky-tests.get.mjs +22 -2
  427. package/.output/server/chunks/routes/api/projects/_id/flaky-tests.get.mjs.map +1 -1
  428. package/.output/server/chunks/routes/api/projects/_id/latest-run.get.mjs +13 -1
  429. package/.output/server/chunks/routes/api/projects/_id/latest-run.get.mjs.map +1 -1
  430. package/.output/server/chunks/routes/api/projects/_id/markers.get.mjs +13 -1
  431. package/.output/server/chunks/routes/api/projects/_id/markers.get.mjs.map +1 -1
  432. package/.output/server/chunks/routes/api/projects/_id/markers.post.mjs +13 -1
  433. package/.output/server/chunks/routes/api/projects/_id/markers.post.mjs.map +1 -1
  434. package/.output/server/chunks/routes/api/projects/_id/members.get.mjs +13 -1
  435. package/.output/server/chunks/routes/api/projects/_id/members.get.mjs.map +1 -1
  436. package/.output/server/chunks/routes/api/projects/_id/members.put.mjs +13 -1
  437. package/.output/server/chunks/routes/api/projects/_id/members.put.mjs.map +1 -1
  438. package/.output/server/chunks/routes/api/projects/_id/performance.get.mjs +13 -1
  439. package/.output/server/chunks/routes/api/projects/_id/performance.get.mjs.map +1 -1
  440. package/.output/server/chunks/routes/api/projects/_id/quarantine/_testCaseId_.delete.mjs +58 -0
  441. package/.output/server/chunks/routes/api/projects/_id/quarantine/_testCaseId_.delete.mjs.map +1 -0
  442. package/.output/server/chunks/routes/api/projects/_id/quarantine.get.mjs +57 -0
  443. package/.output/server/chunks/routes/api/projects/_id/quarantine.get.mjs.map +1 -0
  444. package/.output/server/chunks/routes/api/projects/_id/quarantine.post.mjs +72 -0
  445. package/.output/server/chunks/routes/api/projects/_id/quarantine.post.mjs.map +1 -0
  446. package/.output/server/chunks/routes/api/projects/_id/slow-tests.get.mjs +13 -1
  447. package/.output/server/chunks/routes/api/projects/_id/slow-tests.get.mjs.map +1 -1
  448. package/.output/server/chunks/routes/api/projects/_id/spec-health.get.mjs +13 -1
  449. package/.output/server/chunks/routes/api/projects/_id/spec-health.get.mjs.map +1 -1
  450. package/.output/server/chunks/routes/api/projects/_id/test-cases.get.mjs +13 -1
  451. package/.output/server/chunks/routes/api/projects/_id/test-cases.get.mjs.map +1 -1
  452. package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs +13 -1
  453. package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs.map +1 -1
  454. package/.output/server/chunks/routes/api/projects/_id_.delete.mjs +13 -1
  455. package/.output/server/chunks/routes/api/projects/_id_.delete.mjs.map +1 -1
  456. package/.output/server/chunks/routes/api/projects/_id_.get.mjs +13 -1
  457. package/.output/server/chunks/routes/api/projects/_id_.get.mjs.map +1 -1
  458. package/.output/server/chunks/routes/api/projects/_id_.put.mjs +13 -1
  459. package/.output/server/chunks/routes/api/projects/_id_.put.mjs.map +1 -1
  460. package/.output/server/chunks/routes/api/projects/menu.get.mjs +13 -1
  461. package/.output/server/chunks/routes/api/projects/menu.get.mjs.map +1 -1
  462. package/.output/server/chunks/routes/api/projects/overview.get.mjs +13 -1
  463. package/.output/server/chunks/routes/api/projects/overview.get.mjs.map +1 -1
  464. package/.output/server/chunks/routes/api/projects.get.mjs +13 -1
  465. package/.output/server/chunks/routes/api/projects.get.mjs.map +1 -1
  466. package/.output/server/chunks/routes/api/search.get.mjs +13 -1
  467. package/.output/server/chunks/routes/api/search.get.mjs.map +1 -1
  468. package/.output/server/chunks/routes/api/settings/ai/limits.get.mjs +13 -1
  469. package/.output/server/chunks/routes/api/settings/ai/limits.get.mjs.map +1 -1
  470. package/.output/server/chunks/routes/api/settings/ai/limits.put.mjs +13 -1
  471. package/.output/server/chunks/routes/api/settings/ai/limits.put.mjs.map +1 -1
  472. package/.output/server/chunks/routes/api/settings/ai/models.post.mjs +12 -0
  473. package/.output/server/chunks/routes/api/settings/ai/models.post.mjs.map +1 -1
  474. package/.output/server/chunks/routes/api/settings/ai/test.post.mjs +13 -1
  475. package/.output/server/chunks/routes/api/settings/ai/test.post.mjs.map +1 -1
  476. package/.output/server/chunks/routes/api/settings/ai/usage.get.mjs +13 -1
  477. package/.output/server/chunks/routes/api/settings/ai/usage.get.mjs.map +1 -1
  478. package/.output/server/chunks/routes/api/settings/ai.get.mjs +13 -1
  479. package/.output/server/chunks/routes/api/settings/ai.get.mjs.map +1 -1
  480. package/.output/server/chunks/routes/api/settings/ai.put.mjs +13 -1
  481. package/.output/server/chunks/routes/api/settings/ai.put.mjs.map +1 -1
  482. package/.output/server/chunks/routes/api/settings/pr-feedback.get.mjs +57 -0
  483. package/.output/server/chunks/routes/api/settings/pr-feedback.get.mjs.map +1 -0
  484. package/.output/server/chunks/routes/api/settings/pr-feedback.put.mjs +63 -0
  485. package/.output/server/chunks/routes/api/settings/pr-feedback.put.mjs.map +1 -0
  486. package/.output/server/chunks/routes/api/settings/smtp/test.post.mjs +12 -0
  487. package/.output/server/chunks/routes/api/settings/smtp/test.post.mjs.map +1 -1
  488. package/.output/server/chunks/routes/api/settings/smtp.get.mjs +13 -1
  489. package/.output/server/chunks/routes/api/settings/smtp.get.mjs.map +1 -1
  490. package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs +13 -1
  491. package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs.map +1 -1
  492. package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs +13 -1
  493. package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs.map +1 -1
  494. package/.output/server/chunks/routes/api/settings/wasted-waits.get.mjs +13 -1
  495. package/.output/server/chunks/routes/api/settings/wasted-waits.get.mjs.map +1 -1
  496. package/.output/server/chunks/routes/api/settings/wasted-waits.put.mjs +13 -1
  497. package/.output/server/chunks/routes/api/settings/wasted-waits.put.mjs.map +1 -1
  498. package/.output/server/chunks/routes/api/stream.get.mjs +13 -1
  499. package/.output/server/chunks/routes/api/stream.get.mjs.map +1 -1
  500. package/.output/server/chunks/routes/api/subscriptions/_id_.delete.mjs +13 -1
  501. package/.output/server/chunks/routes/api/subscriptions/_id_.delete.mjs.map +1 -1
  502. package/.output/server/chunks/routes/api/subscriptions/_id_.patch.mjs +13 -1
  503. package/.output/server/chunks/routes/api/subscriptions/_id_.patch.mjs.map +1 -1
  504. package/.output/server/chunks/routes/api/tags/_id_.delete.mjs +13 -1
  505. package/.output/server/chunks/routes/api/tags/_id_.delete.mjs.map +1 -1
  506. package/.output/server/chunks/routes/api/tags/_id_.put.mjs +13 -1
  507. package/.output/server/chunks/routes/api/tags/_id_.put.mjs.map +1 -1
  508. package/.output/server/chunks/routes/api/test-cases/_id/history.get.mjs +13 -1
  509. package/.output/server/chunks/routes/api/test-cases/_id/history.get.mjs.map +1 -1
  510. package/.output/server/chunks/routes/api/test-cases/_id/stability-trend.get.mjs +13 -1
  511. package/.output/server/chunks/routes/api/test-cases/_id/stability-trend.get.mjs.map +1 -1
  512. package/.output/server/chunks/routes/api/test-cases/_id_.get.mjs +13 -1
  513. package/.output/server/chunks/routes/api/test-cases/_id_.get.mjs.map +1 -1
  514. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnose.post.mjs +13 -1
  515. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnose.post.mjs.map +1 -1
  516. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis-context.get.mjs +25 -3
  517. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis-context.get.mjs.map +1 -1
  518. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis.get.mjs +13 -1
  519. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis.get.mjs.map +1 -1
  520. package/.output/server/chunks/routes/api/test-run-cases/_id/export.get.mjs +60 -0
  521. package/.output/server/chunks/routes/api/test-run-cases/_id/export.get.mjs.map +1 -0
  522. package/.output/server/chunks/routes/api/test-run-cases/_id/traces.get.mjs +13 -1
  523. package/.output/server/chunks/routes/api/test-run-cases/_id/traces.get.mjs.map +1 -1
  524. package/.output/server/chunks/routes/api/test-run-cases/_id_.get.mjs +13 -1
  525. package/.output/server/chunks/routes/api/test-run-cases/_id_.get.mjs.map +1 -1
  526. package/.output/server/chunks/routes/api/test-runs/_id/begin.post.mjs +13 -1
  527. package/.output/server/chunks/routes/api/test-runs/_id/begin.post.mjs.map +1 -1
  528. package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs +13 -1
  529. package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs.map +1 -1
  530. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/dom-snapshot.get.mjs +13 -1
  531. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/dom-snapshot.get.mjs.map +1 -1
  532. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/environment-diff.get.mjs +13 -1
  533. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/environment-diff.get.mjs.map +1 -1
  534. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-healing.get.mjs +13 -1
  535. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-healing.get.mjs.map +1 -1
  536. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-pick.post.mjs +13 -1
  537. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-pick.post.mjs.map +1 -1
  538. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network-body.get.mjs +13 -1
  539. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network-body.get.mjs.map +1 -1
  540. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network.get.mjs +13 -1
  541. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network.get.mjs.map +1 -1
  542. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-stacks.get.mjs +13 -1
  543. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-stacks.get.mjs.map +1 -1
  544. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/visual-diff.get.mjs +13 -1
  545. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/visual-diff.get.mjs.map +1 -1
  546. package/.output/server/chunks/routes/api/test-runs/_id/events.post.mjs +13 -1
  547. package/.output/server/chunks/routes/api/test-runs/_id/events.post.mjs.map +1 -1
  548. package/.output/server/chunks/routes/api/test-runs/_id/failure-groups.get.mjs +13 -1
  549. package/.output/server/chunks/routes/api/test-runs/_id/failure-groups.get.mjs.map +1 -1
  550. package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs +15 -1
  551. package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs.map +1 -1
  552. package/.output/server/chunks/routes/api/test-runs/_id/gate.post.mjs +196 -0
  553. package/.output/server/chunks/routes/api/test-runs/_id/gate.post.mjs.map +1 -0
  554. package/.output/server/chunks/routes/api/test-runs/_id/heartbeat.post.mjs +13 -1
  555. package/.output/server/chunks/routes/api/test-runs/_id/heartbeat.post.mjs.map +1 -1
  556. package/.output/server/chunks/routes/api/test-runs/_id/insights.get.mjs +13 -1
  557. package/.output/server/chunks/routes/api/test-runs/_id/insights.get.mjs.map +1 -1
  558. package/.output/server/chunks/routes/api/test-runs/_id/network-requests.get.mjs +13 -1
  559. package/.output/server/chunks/routes/api/test-runs/_id/network-requests.get.mjs.map +1 -1
  560. package/.output/server/chunks/routes/api/test-runs/_id/regression-context.get.mjs +13 -1
  561. package/.output/server/chunks/routes/api/test-runs/_id/regression-context.get.mjs.map +1 -1
  562. package/.output/server/chunks/routes/api/test-runs/_id/stream.get.mjs +13 -1
  563. package/.output/server/chunks/routes/api/test-runs/_id/stream.get.mjs.map +1 -1
  564. package/.output/server/chunks/routes/api/test-runs/_id/summary.get.mjs +13 -1
  565. package/.output/server/chunks/routes/api/test-runs/_id/summary.get.mjs.map +1 -1
  566. package/.output/server/chunks/routes/api/test-runs/_id_.delete.mjs +13 -1
  567. package/.output/server/chunks/routes/api/test-runs/_id_.delete.mjs.map +1 -1
  568. package/.output/server/chunks/routes/api/test-runs/_id_.get.mjs +13 -1
  569. package/.output/server/chunks/routes/api/test-runs/_id_.get.mjs.map +1 -1
  570. package/.output/server/chunks/routes/api/test-runs/_id_.patch.mjs +13 -1
  571. package/.output/server/chunks/routes/api/test-runs/_id_.patch.mjs.map +1 -1
  572. package/.output/server/chunks/routes/api/test-runs/import/check.post.mjs +78 -0
  573. package/.output/server/chunks/routes/api/test-runs/import/check.post.mjs.map +1 -0
  574. package/.output/server/chunks/routes/api/test-runs/import.post.mjs +201 -0
  575. package/.output/server/chunks/routes/api/test-runs/import.post.mjs.map +1 -0
  576. package/.output/server/chunks/routes/api/test-runs/recent.get.mjs +13 -1
  577. package/.output/server/chunks/routes/api/test-runs/recent.get.mjs.map +1 -1
  578. package/.output/server/chunks/routes/api/test-runs/setup.post.mjs +13 -1
  579. package/.output/server/chunks/routes/api/test-runs/setup.post.mjs.map +1 -1
  580. package/.output/server/chunks/routes/api/test-runs/start.post.mjs +13 -1
  581. package/.output/server/chunks/routes/api/test-runs/start.post.mjs.map +1 -1
  582. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs +32 -15
  583. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs.map +1 -1
  584. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs +21 -6
  585. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs.map +1 -1
  586. package/.output/server/chunks/routes/api/tests/cleanup.delete.mjs +154 -3
  587. package/.output/server/chunks/routes/api/tests/cleanup.delete.mjs.map +1 -1
  588. package/.output/server/chunks/routes/api/traces/check.post.mjs +13 -1
  589. package/.output/server/chunks/routes/api/traces/check.post.mjs.map +1 -1
  590. package/.output/server/chunks/routes/api/users/_id/api-keys/_keyId_.delete.mjs +12 -0
  591. package/.output/server/chunks/routes/api/users/_id/api-keys/_keyId_.delete.mjs.map +1 -1
  592. package/.output/server/chunks/routes/api/users/_id/index.get.mjs +12 -0
  593. package/.output/server/chunks/routes/api/users/_id/index.get.mjs.map +1 -1
  594. package/.output/server/chunks/routes/api/users/_id/index.post.mjs +13 -1
  595. package/.output/server/chunks/routes/api/users/_id/index.post.mjs.map +1 -1
  596. package/.output/server/chunks/routes/api/users/_id/invite.post.mjs +13 -1
  597. package/.output/server/chunks/routes/api/users/_id/invite.post.mjs.map +1 -1
  598. package/.output/server/chunks/routes/api/users/_id/projects.get.mjs +13 -1
  599. package/.output/server/chunks/routes/api/users/_id/projects.get.mjs.map +1 -1
  600. package/.output/server/chunks/routes/api/users/_id/projects.put.mjs +13 -1
  601. package/.output/server/chunks/routes/api/users/_id/projects.put.mjs.map +1 -1
  602. package/.output/server/chunks/routes/api/users/_id_.delete.mjs +12 -0
  603. package/.output/server/chunks/routes/api/users/_id_.delete.mjs.map +1 -1
  604. package/.output/server/chunks/routes/api/users/_id_.patch.mjs +12 -0
  605. package/.output/server/chunks/routes/api/users/_id_.patch.mjs.map +1 -1
  606. package/.output/server/chunks/routes/api/version.get.mjs +13 -1
  607. package/.output/server/chunks/routes/api/version.get.mjs.map +1 -1
  608. package/.output/server/chunks/routes/mcp.post.mjs +13 -1
  609. package/.output/server/chunks/routes/mcp.post.mjs.map +1 -1
  610. package/.output/server/chunks/routes/renderer.mjs +1 -1
  611. package/.output/server/chunks/tasks/sweep.mjs +12 -0
  612. package/.output/server/chunks/tasks/sweep.mjs.map +1 -1
  613. package/.output/server/chunks/tasks/sweep2.mjs +12 -0
  614. package/.output/server/chunks/tasks/sweep2.mjs.map +1 -1
  615. package/.output/server/database/migrations/0039_remarkable_jean_grey.sql +2 -0
  616. package/.output/server/database/migrations/0040_organic_phalanx.sql +8 -0
  617. package/.output/server/database/migrations/0041_tense_gravity.sql +5 -0
  618. package/.output/server/database/migrations/0042_burly_hemingway.sql +19 -0
  619. package/.output/server/database/migrations/meta/0039_snapshot.json +3403 -0
  620. package/.output/server/database/migrations/meta/0040_snapshot.json +3457 -0
  621. package/.output/server/database/migrations/meta/0041_snapshot.json +3492 -0
  622. package/.output/server/database/migrations/meta/0042_snapshot.json +3618 -0
  623. package/.output/server/database/migrations/meta/_journal.json +28 -0
  624. package/.output/server/database/migrations-pg/0040_lazy_layla_miller.sql +2 -0
  625. package/.output/server/database/migrations-pg/0041_light_screwball.sql +8 -0
  626. package/.output/server/database/migrations-pg/0042_serious_layla_miller.sql +5 -0
  627. package/.output/server/database/migrations-pg/0043_wonderful_mordo.sql +19 -0
  628. package/.output/server/database/migrations-pg/meta/0040_snapshot.json +4060 -0
  629. package/.output/server/database/migrations-pg/meta/0041_snapshot.json +4123 -0
  630. package/.output/server/database/migrations-pg/meta/0042_snapshot.json +4153 -0
  631. package/.output/server/database/migrations-pg/meta/0043_snapshot.json +4308 -0
  632. package/.output/server/database/migrations-pg/meta/_journal.json +28 -0
  633. package/.output/server/index.mjs +13 -1
  634. package/.output/server/index.mjs.map +1 -1
  635. package/.output/server/node_modules/fflate/esm/index.mjs +2710 -0
  636. package/.output/server/node_modules/fflate/package.json +128 -0
  637. package/.output/server/node_modules/highlight.js/es/languages/yaml.js +213 -0
  638. package/.output/server/node_modules/marked/lib/marked.esm.js +72 -0
  639. package/.output/server/node_modules/marked/package.json +103 -0
  640. package/.output/server/package.json +3 -1
  641. package/package.json +2 -2
  642. package/.output/public/_nuxt/9-wVZMur.js +0 -4
  643. package/.output/public/_nuxt/B-5GukRk.js +0 -1
  644. package/.output/public/_nuxt/B1G3GGhQ.js +0 -1
  645. package/.output/public/_nuxt/B1zMFx24.js +0 -1
  646. package/.output/public/_nuxt/B4jvLMfS.js +0 -1
  647. package/.output/public/_nuxt/BBnX5xw4.js +0 -2
  648. package/.output/public/_nuxt/BHpUiv6j.js +0 -3
  649. package/.output/public/_nuxt/BLOUs6AE.js +0 -5
  650. package/.output/public/_nuxt/BT6p4Pgt.js +0 -2
  651. package/.output/public/_nuxt/BUXSUkJ_.js +0 -1
  652. package/.output/public/_nuxt/BVf6Yx9V.js +0 -26
  653. package/.output/public/_nuxt/BbS6Bwby.js +0 -1
  654. package/.output/public/_nuxt/BeKvLsja.js +0 -2
  655. package/.output/public/_nuxt/BeUm5UNV.js +0 -1
  656. package/.output/public/_nuxt/BfV444H3.js +0 -3
  657. package/.output/public/_nuxt/BjKamgHq.js +0 -1
  658. package/.output/public/_nuxt/BoJdjCVl.js +0 -4
  659. package/.output/public/_nuxt/BreO2PiA.js +0 -1
  660. package/.output/public/_nuxt/BvIDC_R-.js +0 -1
  661. package/.output/public/_nuxt/ByuJWADR.js +0 -34
  662. package/.output/public/_nuxt/C1dyLp_j.js +0 -1
  663. package/.output/public/_nuxt/CAUgpKsF.js +0 -2
  664. package/.output/public/_nuxt/CL9-VLTJ.js +0 -1
  665. package/.output/public/_nuxt/CazDIG_m.js +0 -1
  666. package/.output/public/_nuxt/CdMuck_X.js +0 -1
  667. package/.output/public/_nuxt/CfROFPse.js +0 -1
  668. package/.output/public/_nuxt/Cnapl7lZ.js +0 -1
  669. package/.output/public/_nuxt/CscWZxCi.js +0 -1
  670. package/.output/public/_nuxt/CuicKV-B.js +0 -34
  671. package/.output/public/_nuxt/Cyiu1VQD.js +0 -1
  672. package/.output/public/_nuxt/D6PUPmRC.js +0 -1
  673. package/.output/public/_nuxt/DCl2yo4g.js +0 -8
  674. package/.output/public/_nuxt/DHXWp5yD.js +0 -1
  675. package/.output/public/_nuxt/DHltYerF.js +0 -114
  676. package/.output/public/_nuxt/DLXydYJb.js +0 -47
  677. package/.output/public/_nuxt/DRPSi76A.js +0 -1
  678. package/.output/public/_nuxt/DS53kyHJ.js +0 -1
  679. package/.output/public/_nuxt/DWhBqv_7.js +0 -1
  680. package/.output/public/_nuxt/Dd0kK5WH.js +0 -1
  681. package/.output/public/_nuxt/Dga3Av-m.js +0 -1
  682. package/.output/public/_nuxt/DgwTpwfB.js +0 -1
  683. package/.output/public/_nuxt/DkI145a5.js +0 -1
  684. package/.output/public/_nuxt/DoFBTaDR.js +0 -1
  685. package/.output/public/_nuxt/Dr_dI5hB.js +0 -1
  686. package/.output/public/_nuxt/EPZOxdgq.js +0 -1
  687. package/.output/public/_nuxt/R1nNqTru.js +0 -1
  688. package/.output/public/_nuxt/builds/meta/7caf3cb3-d272-4dbd-bb3f-1eeb64fab5d1.json +0 -1
  689. package/.output/public/_nuxt/entry.ChQMshd4.css +0 -1
  690. package/.output/public/_nuxt/gCELhaU9.js +0 -1
  691. package/.output/public/_nuxt/ipDzNHcs.js +0 -5
  692. package/.output/public/_nuxt/qH_j2A3a.js +0 -1
  693. package/.output/public/_nuxt/r3SBLxtE.js +0 -1
  694. package/.output/public/_nuxt/rsiRgrVM.js +0 -1
  695. package/.output/public/_nuxt/swrbBdtB.js +0 -1
  696. package/.output/public/sw.js +0 -1
  697. package/.output/public/workbox-2fbc6a65.js +0 -1
  698. package/.output/server/chunks/build/Alert-Bp1Wz_sq.mjs.map +0 -1
  699. package/.output/server/chunks/build/Breadcrumb-C9ZPTLym.mjs.map +0 -1
  700. package/.output/server/chunks/build/BreadcrumbNav-C3y42Vun.mjs.map +0 -1
  701. package/.output/server/chunks/build/BrowserBadge-DNCp9pF-.mjs.map +0 -1
  702. package/.output/server/chunks/build/ChartCard-Fr557IbV.mjs.map +0 -1
  703. package/.output/server/chunks/build/Checkbox-cVOSIY93.mjs.map +0 -1
  704. package/.output/server/chunks/build/CiEnvCard-DXPOhdSG.mjs.map +0 -1
  705. package/.output/server/chunks/build/CodeBlock-BGwNmJ8J.mjs.map +0 -1
  706. package/.output/server/chunks/build/DashboardNavbar-Bdp-OwTN.mjs.map +0 -1
  707. package/.output/server/chunks/build/DashboardSidebarToggle-Ji6ADuqF.mjs.map +0 -1
  708. package/.output/server/chunks/build/DataLocationCard-D6xSOrme.mjs.map +0 -1
  709. package/.output/server/chunks/build/DiagnosisPanel-DV1xwGu4.mjs.map +0 -1
  710. package/.output/server/chunks/build/EmptyState-DV3oT_xz.mjs.map +0 -1
  711. package/.output/server/chunks/build/EntityLinks-DeOP13Kr.mjs.map +0 -1
  712. package/.output/server/chunks/build/EnvManagedBadge-Qpn58Nmr.mjs.map +0 -1
  713. package/.output/server/chunks/build/FormField-B-GSn_VR.mjs.map +0 -1
  714. package/.output/server/chunks/build/HelpHint-YEMWtKu1.mjs.map +0 -1
  715. package/.output/server/chunks/build/Label-DBvbHd3A.mjs.map +0 -1
  716. package/.output/server/chunks/build/MiniRunBars-C3HG-EYm.mjs.map +0 -1
  717. package/.output/server/chunks/build/Modal-CfA78Hm1.mjs.map +0 -1
  718. package/.output/server/chunks/build/PageStateCard-Bwee6JTk.mjs.map +0 -1
  719. package/.output/server/chunks/build/ProjectTestCasesTable-9Ia825h8.mjs.map +0 -1
  720. package/.output/server/chunks/build/RovingFocusItem-CxhHdNGo.mjs.map +0 -1
  721. package/.output/server/chunks/build/RunReports-BpJqLHY9.mjs.map +0 -1
  722. package/.output/server/chunks/build/RunStatusBadge-BhmJ_RKM.mjs.map +0 -1
  723. package/.output/server/chunks/build/SectionCard-COd9TuDq.mjs.map +0 -1
  724. package/.output/server/chunks/build/Select-ppPz926C.mjs.map +0 -1
  725. package/.output/server/chunks/build/Separator-CxZdx8kw.mjs.map +0 -1
  726. package/.output/server/chunks/build/SettingsField-DDD4oqys.mjs.map +0 -1
  727. package/.output/server/chunks/build/Slideover-B95Rj237.mjs.map +0 -1
  728. package/.output/server/chunks/build/Switch-xQQ3_ME1.mjs.map +0 -1
  729. package/.output/server/chunks/build/Table-CPhhVzDv.mjs.map +0 -1
  730. package/.output/server/chunks/build/Tabs-BV9XqjoO.mjs.map +0 -1
  731. package/.output/server/chunks/build/TagBadge-BDcvvGxw.mjs +0 -47
  732. package/.output/server/chunks/build/TagBadge-BDcvvGxw.mjs.map +0 -1
  733. package/.output/server/chunks/build/TestCaseHistoryChart-DMb-xSJa.mjs.map +0 -1
  734. package/.output/server/chunks/build/TestStatusBar-CEzt76wk.mjs.map +0 -1
  735. package/.output/server/chunks/build/Textarea-DrrqQUVG.mjs.map +0 -1
  736. package/.output/server/chunks/build/Tooltip-7vwuDPrZ.mjs.map +0 -1
  737. package/.output/server/chunks/build/VisuallyHiddenInput-C9eJVpPW.mjs.map +0 -1
  738. package/.output/server/chunks/build/_id_-B2yirIuA.mjs.map +0 -1
  739. package/.output/server/chunks/build/_id_-CE0Gso6i.mjs.map +0 -1
  740. package/.output/server/chunks/build/_id_-bWcP2xFl.mjs.map +0 -1
  741. package/.output/server/chunks/build/about-CoJjvUwM.mjs.map +0 -1
  742. package/.output/server/chunks/build/account-Cn-eZqXM.mjs.map +0 -1
  743. package/.output/server/chunks/build/db.client-aHcD0wyX.mjs.map +0 -1
  744. package/.output/server/chunks/build/default-BSzdkM_L.mjs.map +0 -1
  745. package/.output/server/chunks/build/edit-C9Z7oZeu.mjs.map +0 -1
  746. package/.output/server/chunks/build/fetch-8kznMtBM.mjs.map +0 -1
  747. package/.output/server/chunks/build/forgot-password-BqPF4Rxs.mjs.map +0 -1
  748. package/.output/server/chunks/build/help-content-DmFnuhNu.mjs.map +0 -1
  749. package/.output/server/chunks/build/index-BR9hw6qk.mjs.map +0 -1
  750. package/.output/server/chunks/build/index-Ba-Fifra.mjs.map +0 -1
  751. package/.output/server/chunks/build/index-CULN3-en.mjs.map +0 -1
  752. package/.output/server/chunks/build/index-DVUtBexc.mjs.map +0 -1
  753. package/.output/server/chunks/build/isValueEqualOrExist-DBZjbD_3.mjs.map +0 -1
  754. package/.output/server/chunks/build/login-D2XZDuek.mjs.map +0 -1
  755. package/.output/server/chunks/build/mcp-_o6cMS6m.mjs.map +0 -1
  756. package/.output/server/chunks/build/notifications-Dzm9c0u_.mjs.map +0 -1
  757. package/.output/server/chunks/build/reset-password-gpFzIEDj.mjs.map +0 -1
  758. package/.output/server/chunks/build/settings-metadata-B0wo5R-W.mjs.map +0 -1
  759. package/.output/server/chunks/build/settings-pNyPBXVa.mjs.map +0 -1
  760. package/.output/server/chunks/build/storage-XelzuyPy.mjs.map +0 -1
  761. package/.output/server/chunks/build/tags-DrCQ7QSw.mjs.map +0 -1
  762. package/.output/server/chunks/build/test-cases-pmOxi-AN.mjs.map +0 -1
  763. package/.output/server/chunks/build/timeout-hygiene-CNs71Iah.mjs.map +0 -1
  764. package/.output/server/chunks/build/useAiStatus-ZO987RY7.mjs.map +0 -1
  765. package/.output/server/chunks/build/useCopy-BQQKcwlq.mjs.map +0 -1
  766. package/.output/server/chunks/build/useFormControl-BLpq1s4O.mjs.map +0 -1
  767. package/.output/server/chunks/build/useOpenInIde-kMZ7Jw5c.mjs.map +0 -1
  768. package/.output/server/chunks/build/useSettingsNav-NjI2seBy.mjs.map +0 -1
  769. package/.output/server/chunks/build/useTreeViewCookie-DVYpxW-p.mjs.map +0 -1
  770. package/.output/server/chunks/build/users-NmAUZs3i.mjs.map +0 -1
  771. package/.output/server/chunks/build/virtualizer-ZaqK4guJ.mjs.map +0 -1
  772. package/.output/server/chunks/build/wasted-time-CguAF9zc.mjs.map +0 -1
  773. /package/.output/public/_nuxt/{PageStateCard.BrM5HWjY.css → useCopyRich.BrM5HWjY.css} +0 -0
@@ -0,0 +1,2710 @@
1
+ import { createRequire } from 'module';
2
+ var require = createRequire('/');
3
+ // DEFLATE is a complex format; to read this code, you should probably check the RFC first:
4
+ // https://tools.ietf.org/html/rfc1951
5
+ // You may also wish to take a look at the guide I made about this program:
6
+ // https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad
7
+ // Some of the following code is similar to that of UZIP.js:
8
+ // https://github.com/photopea/UZIP.js
9
+ // However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.
10
+ // Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint
11
+ // is better for memory in most engines (I *think*).
12
+ var _a;
13
+ // Mediocre shim
14
+ var Worker;
15
+ var isMarkedAsUntransferable;
16
+ var workerAdd = ";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global";
17
+ try {
18
+ (_a = require('worker_threads'), Worker = _a.Worker, isMarkedAsUntransferable = _a.isMarkedAsUntransferable);
19
+ }
20
+ catch (e) {
21
+ }
22
+ var wk = Worker ? function (c, _, msg, transfer, cb) {
23
+ var done = false;
24
+ var w = new Worker(c + workerAdd, { eval: true })
25
+ .on('error', function (e) { return cb(e, null); })
26
+ .on('message', function (m) { return cb(null, m); })
27
+ .on('exit', function (c) {
28
+ if (c && !done)
29
+ cb(new Error('exited with code ' + c), null);
30
+ });
31
+ if (isMarkedAsUntransferable)
32
+ transfer = transfer.filter(function (t) { return !isMarkedAsUntransferable(t); });
33
+ w.postMessage(msg, transfer);
34
+ w.terminate = function () {
35
+ done = true;
36
+ return Worker.prototype.terminate.call(w);
37
+ };
38
+ return w;
39
+ } : function (_, __, ___, ____, cb) {
40
+ setImmediate(function () { return cb(new Error('async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)'), null); });
41
+ var NOP = function () { };
42
+ return {
43
+ terminate: NOP,
44
+ postMessage: NOP
45
+ };
46
+ };
47
+
48
+ // aliases for shorter compressed code (most minifers don't do this)
49
+ var u8 = Uint8Array, u16 = Uint16Array, i32 = Int32Array;
50
+ // fixed length extra bits
51
+ var fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);
52
+ // fixed distance extra bits
53
+ var fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);
54
+ // code length index map
55
+ var clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
56
+ // get base, reverse index map from extra bits
57
+ var freb = function (eb, start) {
58
+ var b = new u16(31);
59
+ for (var i = 0; i < 31; ++i) {
60
+ b[i] = start += 1 << eb[i - 1];
61
+ }
62
+ // numbers here are at max 18 bits
63
+ var r = new i32(b[30]);
64
+ for (var i = 1; i < 30; ++i) {
65
+ for (var j = b[i]; j < b[i + 1]; ++j) {
66
+ r[j] = ((j - b[i]) << 5) | i;
67
+ }
68
+ }
69
+ return { b: b, r: r };
70
+ };
71
+ var _a = freb(fleb, 2), fl = _a.b, revfl = _a.r;
72
+ // we can ignore the fact that the other numbers are wrong; they never happen anyway
73
+ fl[28] = 258, revfl[258] = 28;
74
+ var _b = freb(fdeb, 0), fd = _b.b, revfd = _b.r;
75
+ // map of value to reverse (assuming 16 bits)
76
+ var rev = new u16(32768);
77
+ for (var i = 0; i < 32768; ++i) {
78
+ // reverse table algorithm from SO
79
+ var x = ((i & 0xAAAA) >> 1) | ((i & 0x5555) << 1);
80
+ x = ((x & 0xCCCC) >> 2) | ((x & 0x3333) << 2);
81
+ x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4);
82
+ rev[i] = (((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8)) >> 1;
83
+ }
84
+ // create huffman tree from u8 "map": index -> code length for code index
85
+ // mb (max bits) must be at most 15
86
+ // TODO: optimize/split up?
87
+ var hMap = (function (cd, mb, r) {
88
+ var s = cd.length;
89
+ // index
90
+ var i = 0;
91
+ // u16 "map": index -> # of codes with bit length = index
92
+ var l = new u16(mb);
93
+ // length of cd must be 288 (total # of codes)
94
+ for (; i < s; ++i) {
95
+ if (cd[i])
96
+ ++l[cd[i] - 1];
97
+ }
98
+ // u16 "map": index -> minimum code for bit length = index
99
+ var le = new u16(mb);
100
+ for (i = 1; i < mb; ++i) {
101
+ le[i] = (le[i - 1] + l[i - 1]) << 1;
102
+ }
103
+ var co;
104
+ if (r) {
105
+ // u16 "map": index -> number of actual bits, symbol for code
106
+ co = new u16(1 << mb);
107
+ // bits to remove for reverser
108
+ var rvb = 15 - mb;
109
+ for (i = 0; i < s; ++i) {
110
+ // ignore 0 lengths
111
+ if (cd[i]) {
112
+ // num encoding both symbol and bits read
113
+ var sv = (i << 4) | cd[i];
114
+ // free bits
115
+ var r_1 = mb - cd[i];
116
+ // start value
117
+ var v = le[cd[i] - 1]++ << r_1;
118
+ // m is end value
119
+ for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {
120
+ // every 16 bit value starting with the code yields the same result
121
+ co[rev[v] >> rvb] = sv;
122
+ }
123
+ }
124
+ }
125
+ }
126
+ else {
127
+ co = new u16(s);
128
+ for (i = 0; i < s; ++i) {
129
+ if (cd[i]) {
130
+ co[i] = rev[le[cd[i] - 1]++] >> (15 - cd[i]);
131
+ }
132
+ }
133
+ }
134
+ return co;
135
+ });
136
+ // fixed length tree
137
+ var flt = new u8(288);
138
+ for (var i = 0; i < 144; ++i)
139
+ flt[i] = 8;
140
+ for (var i = 144; i < 256; ++i)
141
+ flt[i] = 9;
142
+ for (var i = 256; i < 280; ++i)
143
+ flt[i] = 7;
144
+ for (var i = 280; i < 288; ++i)
145
+ flt[i] = 8;
146
+ // fixed distance tree
147
+ var fdt = new u8(32);
148
+ for (var i = 0; i < 32; ++i)
149
+ fdt[i] = 5;
150
+ // fixed length map
151
+ var flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);
152
+ // fixed distance map
153
+ var fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);
154
+ // find max of array
155
+ var max = function (a) {
156
+ var m = a[0];
157
+ for (var i = 1; i < a.length; ++i) {
158
+ if (a[i] > m)
159
+ m = a[i];
160
+ }
161
+ return m;
162
+ };
163
+ // read d, starting at bit p and mask with m
164
+ var bits = function (d, p, m) {
165
+ var o = (p / 8) | 0;
166
+ return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;
167
+ };
168
+ // read d, starting at bit p continuing for at least 16 bits
169
+ var bits16 = function (d, p) {
170
+ var o = (p / 8) | 0;
171
+ return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));
172
+ };
173
+ // get end of byte
174
+ var shft = function (p) { return ((p + 7) / 8) | 0; };
175
+ // typed array slice - allows garbage collector to free original reference,
176
+ // while being more compatible than .slice
177
+ var slc = function (v, s, e) {
178
+ if (s == null || s < 0)
179
+ s = 0;
180
+ if (e == null || e > v.length)
181
+ e = v.length;
182
+ // can't use .constructor in case user-supplied
183
+ return new u8(v.subarray(s, e));
184
+ };
185
+ /**
186
+ * Codes for errors generated within this library
187
+ */
188
+ export var FlateErrorCode = {
189
+ UnexpectedEOF: 0,
190
+ InvalidBlockType: 1,
191
+ InvalidLengthLiteral: 2,
192
+ InvalidDistance: 3,
193
+ StreamFinished: 4,
194
+ NoStreamHandler: 5,
195
+ InvalidHeader: 6,
196
+ NoCallback: 7,
197
+ InvalidUTF8: 8,
198
+ ExtraFieldTooLong: 9,
199
+ InvalidDate: 10,
200
+ FilenameTooLong: 11,
201
+ StreamFinishing: 12,
202
+ InvalidZipData: 13,
203
+ UnknownCompressionMethod: 14
204
+ };
205
+ // error codes
206
+ var ec = [
207
+ 'unexpected EOF',
208
+ 'invalid block type',
209
+ 'invalid length/literal',
210
+ 'invalid distance',
211
+ 'stream finished',
212
+ 'no stream handler',
213
+ , // determined by compression function
214
+ 'no callback',
215
+ 'invalid UTF-8 data',
216
+ 'extra field too long',
217
+ 'date not in range 1980-2099',
218
+ 'filename too long',
219
+ 'stream finishing',
220
+ 'invalid zip data'
221
+ // determined by unknown compression method
222
+ ];
223
+ ;
224
+ var err = function (ind, msg, nt) {
225
+ var e = new Error(msg || ec[ind]);
226
+ e.code = ind;
227
+ if (Error.captureStackTrace)
228
+ Error.captureStackTrace(e, err);
229
+ if (!nt)
230
+ throw e;
231
+ return e;
232
+ };
233
+ // expands raw DEFLATE data
234
+ var inflt = function (dat, st, buf, dict) {
235
+ // source length dict length
236
+ var sl = dat.length, dl = dict ? dict.length : 0;
237
+ if (!sl || st.f && !st.l)
238
+ return buf || new u8(0);
239
+ var noBuf = !buf;
240
+ // have to estimate size
241
+ var resize = noBuf || st.i != 2;
242
+ // no state
243
+ var noSt = st.i;
244
+ // Assumes roughly 33% compression ratio average
245
+ if (noBuf)
246
+ buf = new u8(sl * 3);
247
+ // ensure buffer can fit at least l elements
248
+ var cbuf = function (l) {
249
+ var bl = buf.length;
250
+ // need to increase size to fit
251
+ if (l > bl) {
252
+ // Double or set to necessary, whichever is greater
253
+ var nbuf = new u8(Math.max(bl * 2, l));
254
+ nbuf.set(buf);
255
+ buf = nbuf;
256
+ }
257
+ };
258
+ // last chunk bitpos bytes
259
+ var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;
260
+ // total bits
261
+ var tbts = sl * 8;
262
+ do {
263
+ if (!lm) {
264
+ // BFINAL - this is only 1 when last chunk is next
265
+ final = bits(dat, pos, 1);
266
+ // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman
267
+ var type = bits(dat, pos + 1, 3);
268
+ pos += 3;
269
+ if (!type) {
270
+ // go to end of byte boundary
271
+ var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;
272
+ if (t > sl) {
273
+ if (noSt)
274
+ err(0);
275
+ break;
276
+ }
277
+ // ensure size
278
+ if (resize)
279
+ cbuf(bt + l);
280
+ // Copy over uncompressed data
281
+ buf.set(dat.subarray(s, t), bt);
282
+ // Get new bitpos, update byte count
283
+ st.b = bt += l, st.p = pos = t * 8, st.f = final;
284
+ continue;
285
+ }
286
+ else if (type == 1)
287
+ lm = flrm, dm = fdrm, lbt = 9, dbt = 5;
288
+ else if (type == 2) {
289
+ // literal lengths
290
+ var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;
291
+ var tl = hLit + bits(dat, pos + 5, 31) + 1;
292
+ pos += 14;
293
+ // length+distance tree
294
+ var ldt = new u8(tl);
295
+ // code length tree
296
+ var clt = new u8(19);
297
+ for (var i = 0; i < hcLen; ++i) {
298
+ // use index map to get real code
299
+ clt[clim[i]] = bits(dat, pos + i * 3, 7);
300
+ }
301
+ pos += hcLen * 3;
302
+ // code lengths bits
303
+ var clb = max(clt), clbmsk = (1 << clb) - 1;
304
+ // code lengths map
305
+ var clm = hMap(clt, clb, 1);
306
+ for (var i = 0; i < tl;) {
307
+ var r = clm[bits(dat, pos, clbmsk)];
308
+ // bits read
309
+ pos += r & 15;
310
+ // symbol
311
+ var s = r >> 4;
312
+ // code length to copy
313
+ if (s < 16) {
314
+ ldt[i++] = s;
315
+ }
316
+ else {
317
+ // copy count
318
+ var c = 0, n = 0;
319
+ if (s == 16)
320
+ n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];
321
+ else if (s == 17)
322
+ n = 3 + bits(dat, pos, 7), pos += 3;
323
+ else if (s == 18)
324
+ n = 11 + bits(dat, pos, 127), pos += 7;
325
+ while (n--)
326
+ ldt[i++] = c;
327
+ }
328
+ }
329
+ // length tree distance tree
330
+ var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);
331
+ // max length bits
332
+ lbt = max(lt);
333
+ // max dist bits
334
+ dbt = max(dt);
335
+ lm = hMap(lt, lbt, 1);
336
+ dm = hMap(dt, dbt, 1);
337
+ }
338
+ else
339
+ err(1);
340
+ if (pos > tbts) {
341
+ if (noSt)
342
+ err(0);
343
+ break;
344
+ }
345
+ }
346
+ // Make sure the buffer can hold this + the largest possible addition
347
+ // Maximum chunk size (practically, theoretically infinite) is 2^17
348
+ if (resize)
349
+ cbuf(bt + 131072);
350
+ var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;
351
+ var lpos = pos;
352
+ for (;; lpos = pos) {
353
+ // bits read, code
354
+ var c = lm[bits16(dat, pos) & lms], sym = c >> 4;
355
+ pos += c & 15;
356
+ if (pos > tbts) {
357
+ if (noSt)
358
+ err(0);
359
+ break;
360
+ }
361
+ if (!c)
362
+ err(2);
363
+ if (sym < 256)
364
+ buf[bt++] = sym;
365
+ else if (sym == 256) {
366
+ lpos = pos, lm = null;
367
+ break;
368
+ }
369
+ else {
370
+ var add = sym - 254;
371
+ // no extra bits needed if less
372
+ if (sym > 264) {
373
+ // index
374
+ var i = sym - 257, b = fleb[i];
375
+ add = bits(dat, pos, (1 << b) - 1) + fl[i];
376
+ pos += b;
377
+ }
378
+ // dist
379
+ var d = dm[bits16(dat, pos) & dms], dsym = d >> 4;
380
+ if (!d)
381
+ err(3);
382
+ pos += d & 15;
383
+ var dt = fd[dsym];
384
+ if (dsym > 3) {
385
+ var b = fdeb[dsym];
386
+ dt += bits16(dat, pos) & (1 << b) - 1, pos += b;
387
+ }
388
+ if (pos > tbts) {
389
+ if (noSt)
390
+ err(0);
391
+ break;
392
+ }
393
+ if (resize)
394
+ cbuf(bt + 131072);
395
+ var end = bt + add;
396
+ if (bt < dt) {
397
+ var shift = dl - dt, dend = Math.min(dt, end);
398
+ if (shift + bt < 0)
399
+ err(3);
400
+ for (; bt < dend; ++bt)
401
+ buf[bt] = dict[shift + bt];
402
+ }
403
+ for (; bt < end; ++bt)
404
+ buf[bt] = buf[bt - dt];
405
+ }
406
+ }
407
+ st.l = lm, st.p = lpos, st.b = bt, st.f = final;
408
+ if (lm)
409
+ final = 1, st.m = lbt, st.d = dm, st.n = dbt;
410
+ } while (!final);
411
+ // don't reallocate for streams or user buffers
412
+ return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt);
413
+ };
414
+ // starting at p, write the minimum number of bits that can hold v to d
415
+ var wbits = function (d, p, v) {
416
+ v <<= p & 7;
417
+ var o = (p / 8) | 0;
418
+ d[o] |= v;
419
+ d[o + 1] |= v >> 8;
420
+ };
421
+ // starting at p, write the minimum number of bits (>8) that can hold v to d
422
+ var wbits16 = function (d, p, v) {
423
+ v <<= p & 7;
424
+ var o = (p / 8) | 0;
425
+ d[o] |= v;
426
+ d[o + 1] |= v >> 8;
427
+ d[o + 2] |= v >> 16;
428
+ };
429
+ // creates code lengths from a frequency table
430
+ var hTree = function (d, mb) {
431
+ // Need extra info to make a tree
432
+ var t = [];
433
+ for (var i = 0; i < d.length; ++i) {
434
+ if (d[i])
435
+ t.push({ s: i, f: d[i] });
436
+ }
437
+ var s = t.length;
438
+ var t2 = t.slice();
439
+ if (!s)
440
+ return { t: et, l: 0 };
441
+ if (s == 1) {
442
+ var v = new u8(t[0].s + 1);
443
+ v[t[0].s] = 1;
444
+ return { t: v, l: 1 };
445
+ }
446
+ t.sort(function (a, b) { return a.f - b.f; });
447
+ // after i2 reaches last ind, will be stopped
448
+ // freq must be greater than largest possible number of symbols
449
+ t.push({ s: -1, f: 25001 });
450
+ var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;
451
+ t[0] = { s: -1, f: l.f + r.f, l: l, r: r };
452
+ // efficient algorithm from UZIP.js
453
+ // i0 is lookbehind, i2 is lookahead - after processing two low-freq
454
+ // symbols that combined have high freq, will start processing i2 (high-freq,
455
+ // non-composite) symbols instead
456
+ // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/
457
+ while (i1 != s - 1) {
458
+ l = t[t[i0].f < t[i2].f ? i0++ : i2++];
459
+ r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];
460
+ t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };
461
+ }
462
+ var maxSym = t2[0].s;
463
+ for (var i = 1; i < s; ++i) {
464
+ if (t2[i].s > maxSym)
465
+ maxSym = t2[i].s;
466
+ }
467
+ // code lengths
468
+ var tr = new u16(maxSym + 1);
469
+ // max bits in tree
470
+ var mbt = ln(t[i1 - 1], tr, 0);
471
+ if (mbt > mb) {
472
+ // more algorithms from UZIP.js
473
+ // TODO: find out how this code works (debt)
474
+ // ind debt
475
+ var i = 0, dt = 0;
476
+ // left cost
477
+ var lft = mbt - mb, cst = 1 << lft;
478
+ t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });
479
+ for (; i < s; ++i) {
480
+ var i2_1 = t2[i].s;
481
+ if (tr[i2_1] > mb) {
482
+ dt += cst - (1 << (mbt - tr[i2_1]));
483
+ tr[i2_1] = mb;
484
+ }
485
+ else
486
+ break;
487
+ }
488
+ dt >>= lft;
489
+ while (dt > 0) {
490
+ var i2_2 = t2[i].s;
491
+ if (tr[i2_2] < mb)
492
+ dt -= 1 << (mb - tr[i2_2]++ - 1);
493
+ else
494
+ ++i;
495
+ }
496
+ for (; i >= 0 && dt; --i) {
497
+ var i2_3 = t2[i].s;
498
+ if (tr[i2_3] == mb) {
499
+ --tr[i2_3];
500
+ ++dt;
501
+ }
502
+ }
503
+ mbt = mb;
504
+ }
505
+ return { t: new u8(tr), l: mbt };
506
+ };
507
+ // get the max length and assign length codes
508
+ var ln = function (n, l, d) {
509
+ return n.s == -1
510
+ ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))
511
+ : (l[n.s] = d);
512
+ };
513
+ // length codes generation
514
+ var lc = function (c) {
515
+ var s = c.length;
516
+ // Note that the semicolon was intentional
517
+ while (s && !c[--s])
518
+ ;
519
+ var cl = new u16(++s);
520
+ // ind num streak
521
+ var cli = 0, cln = c[0], cls = 1;
522
+ var w = function (v) { cl[cli++] = v; };
523
+ for (var i = 1; i <= s; ++i) {
524
+ if (c[i] == cln && i != s)
525
+ ++cls;
526
+ else {
527
+ if (!cln && cls > 2) {
528
+ for (; cls > 138; cls -= 138)
529
+ w(32754);
530
+ if (cls > 2) {
531
+ w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);
532
+ cls = 0;
533
+ }
534
+ }
535
+ else if (cls > 3) {
536
+ w(cln), --cls;
537
+ for (; cls > 6; cls -= 6)
538
+ w(8304);
539
+ if (cls > 2)
540
+ w(((cls - 3) << 5) | 8208), cls = 0;
541
+ }
542
+ while (cls--)
543
+ w(cln);
544
+ cls = 1;
545
+ cln = c[i];
546
+ }
547
+ }
548
+ return { c: cl.subarray(0, cli), n: s };
549
+ };
550
+ // calculate the length of output from tree, code lengths
551
+ var clen = function (cf, cl) {
552
+ var l = 0;
553
+ for (var i = 0; i < cl.length; ++i)
554
+ l += cf[i] * cl[i];
555
+ return l;
556
+ };
557
+ // writes a fixed block
558
+ // returns the new bit pos
559
+ var wfblk = function (out, pos, dat) {
560
+ // no need to write 00 as type: TypedArray defaults to 0
561
+ var s = dat.length;
562
+ var o = shft(pos + 2);
563
+ out[o] = s & 255;
564
+ out[o + 1] = s >> 8;
565
+ out[o + 2] = out[o] ^ 255;
566
+ out[o + 3] = out[o + 1] ^ 255;
567
+ for (var i = 0; i < s; ++i)
568
+ out[o + i + 4] = dat[i];
569
+ return (o + 4 + s) * 8;
570
+ };
571
+ // writes a block
572
+ var wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {
573
+ wbits(out, p++, final);
574
+ ++lf[256];
575
+ var _a = hTree(lf, 15), dlt = _a.t, mlb = _a.l;
576
+ var _b = hTree(df, 15), ddt = _b.t, mdb = _b.l;
577
+ var _c = lc(dlt), lclt = _c.c, nlc = _c.n;
578
+ var _d = lc(ddt), lcdt = _d.c, ndc = _d.n;
579
+ var lcfreq = new u16(19);
580
+ for (var i = 0; i < lclt.length; ++i)
581
+ ++lcfreq[lclt[i] & 31];
582
+ for (var i = 0; i < lcdt.length; ++i)
583
+ ++lcfreq[lcdt[i] & 31];
584
+ var _e = hTree(lcfreq, 7), lct = _e.t, mlcb = _e.l;
585
+ var nlcc = 19;
586
+ for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)
587
+ ;
588
+ var flen = (bl + 5) << 3;
589
+ var ftlen = clen(lf, flt) + clen(df, fdt) + eb;
590
+ var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];
591
+ if (bs >= 0 && flen <= ftlen && flen <= dtlen)
592
+ return wfblk(out, p, dat.subarray(bs, bs + bl));
593
+ var lm, ll, dm, dl;
594
+ wbits(out, p, 1 + (dtlen < ftlen)), p += 2;
595
+ if (dtlen < ftlen) {
596
+ lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;
597
+ var llm = hMap(lct, mlcb, 0);
598
+ wbits(out, p, nlc - 257);
599
+ wbits(out, p + 5, ndc - 1);
600
+ wbits(out, p + 10, nlcc - 4);
601
+ p += 14;
602
+ for (var i = 0; i < nlcc; ++i)
603
+ wbits(out, p + 3 * i, lct[clim[i]]);
604
+ p += 3 * nlcc;
605
+ var lcts = [lclt, lcdt];
606
+ for (var it = 0; it < 2; ++it) {
607
+ var clct = lcts[it];
608
+ for (var i = 0; i < clct.length; ++i) {
609
+ var len = clct[i] & 31;
610
+ wbits(out, p, llm[len]), p += lct[len];
611
+ if (len > 15)
612
+ wbits(out, p, (clct[i] >> 5) & 127), p += clct[i] >> 12;
613
+ }
614
+ }
615
+ }
616
+ else {
617
+ lm = flm, ll = flt, dm = fdm, dl = fdt;
618
+ }
619
+ for (var i = 0; i < li; ++i) {
620
+ var sym = syms[i];
621
+ if (sym > 255) {
622
+ var len = (sym >> 18) & 31;
623
+ wbits16(out, p, lm[len + 257]), p += ll[len + 257];
624
+ if (len > 7)
625
+ wbits(out, p, (sym >> 23) & 31), p += fleb[len];
626
+ var dst = sym & 31;
627
+ wbits16(out, p, dm[dst]), p += dl[dst];
628
+ if (dst > 3)
629
+ wbits16(out, p, (sym >> 5) & 8191), p += fdeb[dst];
630
+ }
631
+ else {
632
+ wbits16(out, p, lm[sym]), p += ll[sym];
633
+ }
634
+ }
635
+ wbits16(out, p, lm[256]);
636
+ return p + ll[256];
637
+ };
638
+ // deflate options (nice << 13) | chain
639
+ var deo = /*#__PURE__*/ new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
640
+ // empty
641
+ var et = /*#__PURE__*/ new u8(0);
642
+ // compresses data into a raw DEFLATE buffer
643
+ var dflt = function (dat, lvl, plvl, pre, post, st) {
644
+ var s = st.z || dat.length;
645
+ var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);
646
+ // writing to this writes to the output buffer
647
+ var w = o.subarray(pre, o.length - post);
648
+ var lst = st.l;
649
+ var pos = (st.r || 0) & 7;
650
+ if (lvl) {
651
+ if (pos)
652
+ w[0] = st.r >> 3;
653
+ var opt = deo[lvl - 1];
654
+ var n = opt >> 13, c = opt & 8191;
655
+ var msk_1 = (1 << plvl) - 1;
656
+ // prev 2-byte val map curr 2-byte val map
657
+ var prev = st.p || new u16(32768), head = st.h || new u16(msk_1 + 1);
658
+ var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;
659
+ var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };
660
+ // 24576 is an arbitrary number of maximum symbols per block
661
+ // 424 buffer for last block
662
+ var syms = new i32(25000);
663
+ // length/literal freq distance freq
664
+ var lf = new u16(288), df = new u16(32);
665
+ // l/lcnt exbits index l/lind waitdx blkpos
666
+ var lc_1 = 0, eb = 0, i = st.i || 0, li = 0, wi = st.w || 0, bs = 0;
667
+ for (; i + 2 < s; ++i) {
668
+ // hash value
669
+ var hv = hsh(i);
670
+ // index mod 32768 previous index mod
671
+ var imod = i & 32767, pimod = head[hv];
672
+ prev[imod] = pimod;
673
+ head[hv] = imod;
674
+ // We always should modify head and prev, but only add symbols if
675
+ // this data is not yet processed ("wait" for wait index)
676
+ if (wi <= i) {
677
+ // bytes remaining
678
+ var rem = s - i;
679
+ if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) {
680
+ pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);
681
+ li = lc_1 = eb = 0, bs = i;
682
+ for (var j = 0; j < 286; ++j)
683
+ lf[j] = 0;
684
+ for (var j = 0; j < 30; ++j)
685
+ df[j] = 0;
686
+ }
687
+ // len dist chain
688
+ var l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767;
689
+ if (rem > 2 && hv == hsh(i - dif)) {
690
+ var maxn = Math.min(n, rem) - 1;
691
+ var maxd = Math.min(32767, i);
692
+ // max possible length
693
+ // not capped at dif because decompressors implement "rolling" index population
694
+ var ml = Math.min(258, rem);
695
+ while (dif <= maxd && --ch_1 && imod != pimod) {
696
+ if (dat[i + l] == dat[i + l - dif]) {
697
+ var nl = 0;
698
+ for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)
699
+ ;
700
+ if (nl > l) {
701
+ l = nl, d = dif;
702
+ // break out early when we reach "nice" (we are satisfied enough)
703
+ if (nl > maxn)
704
+ break;
705
+ // now, find the rarest 2-byte sequence within this
706
+ // length of literals and search for that instead.
707
+ // Much faster than just using the start
708
+ var mmd = Math.min(dif, nl - 2);
709
+ var md = 0;
710
+ for (var j = 0; j < mmd; ++j) {
711
+ var ti = i - dif + j & 32767;
712
+ var pti = prev[ti];
713
+ var cd = ti - pti & 32767;
714
+ if (cd > md)
715
+ md = cd, pimod = ti;
716
+ }
717
+ }
718
+ }
719
+ // check the previous match
720
+ imod = pimod, pimod = prev[imod];
721
+ dif += imod - pimod & 32767;
722
+ }
723
+ }
724
+ // d will be nonzero only when a match was found
725
+ if (d) {
726
+ // store both dist and len data in one int32
727
+ // Make sure this is recognized as a len/dist with 28th bit (2^28)
728
+ syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];
729
+ var lin = revfl[l] & 31, din = revfd[d] & 31;
730
+ eb += fleb[lin] + fdeb[din];
731
+ ++lf[257 + lin];
732
+ ++df[din];
733
+ wi = i + l;
734
+ ++lc_1;
735
+ }
736
+ else {
737
+ syms[li++] = dat[i];
738
+ ++lf[dat[i]];
739
+ }
740
+ }
741
+ }
742
+ for (i = Math.max(i, wi); i < s; ++i) {
743
+ syms[li++] = dat[i];
744
+ ++lf[dat[i]];
745
+ }
746
+ pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);
747
+ if (!lst) {
748
+ st.r = (pos & 7) | w[(pos / 8) | 0] << 3;
749
+ // shft(pos) now 1 less if pos & 7 != 0
750
+ pos -= 7;
751
+ st.h = head, st.p = prev, st.i = i, st.w = wi;
752
+ }
753
+ }
754
+ else {
755
+ for (var i = st.w || 0; i < s + lst; i += 65535) {
756
+ // end
757
+ var e = i + 65535;
758
+ if (e >= s) {
759
+ // write final block
760
+ w[(pos / 8) | 0] = lst;
761
+ e = s;
762
+ }
763
+ pos = wfblk(w, pos + 1, dat.subarray(i, e));
764
+ }
765
+ st.i = s;
766
+ }
767
+ return slc(o, 0, pre + shft(pos) + post);
768
+ };
769
+ // CRC32 table
770
+ var crct = /*#__PURE__*/ (function () {
771
+ var t = new Int32Array(256);
772
+ for (var i = 0; i < 256; ++i) {
773
+ var c = i, k = 9;
774
+ while (--k)
775
+ c = ((c & 1) && -306674912) ^ (c >>> 1);
776
+ t[i] = c;
777
+ }
778
+ return t;
779
+ })();
780
+ // CRC32
781
+ var crc = function () {
782
+ var c = -1;
783
+ return {
784
+ p: function (d) {
785
+ // closures have awful performance
786
+ var cr = c;
787
+ for (var i = 0; i < d.length; ++i)
788
+ cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);
789
+ c = cr;
790
+ },
791
+ d: function () { return ~c; }
792
+ };
793
+ };
794
+ // Adler32
795
+ var adler = function () {
796
+ var a = 1, b = 0;
797
+ return {
798
+ p: function (d) {
799
+ // closures have awful performance
800
+ var n = a, m = b;
801
+ var l = d.length | 0;
802
+ for (var i = 0; i != l;) {
803
+ var e = Math.min(i + 2655, l);
804
+ for (; i < e; ++i)
805
+ m += n += d[i];
806
+ n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);
807
+ }
808
+ a = n, b = m;
809
+ },
810
+ d: function () {
811
+ a %= 65521, b %= 65521;
812
+ return (a & 255) << 24 | (a & 0xFF00) << 8 | (b & 255) << 8 | (b >> 8);
813
+ }
814
+ };
815
+ };
816
+ ;
817
+ // deflate with opts
818
+ var dopt = function (dat, opt, pre, post, st) {
819
+ if (!st) {
820
+ st = { l: 1 };
821
+ if (opt.dictionary) {
822
+ var dict = opt.dictionary.subarray(-32768);
823
+ var newDat = new u8(dict.length + dat.length);
824
+ newDat.set(dict);
825
+ newDat.set(dat, dict.length);
826
+ dat = newDat;
827
+ st.w = dict.length;
828
+ }
829
+ }
830
+ return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? (st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20) : (12 + opt.mem), pre, post, st);
831
+ };
832
+ // Walmart object spread
833
+ var mrg = function (a, b) {
834
+ var o = {};
835
+ for (var k in a)
836
+ o[k] = a[k];
837
+ for (var k in b)
838
+ o[k] = b[k];
839
+ return o;
840
+ };
841
+ // worker clone
842
+ // This is possibly the craziest part of the entire codebase, despite how simple it may seem.
843
+ // The only parameter to this function is a closure that returns an array of variables outside of the function scope.
844
+ // We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.
845
+ // We will return an object mapping of true variable name to value (basically, the current scope as a JS object).
846
+ // The reason we can't just use the original variable names is minifiers mangling the toplevel scope.
847
+ // This took me three weeks to figure out how to do.
848
+ var wcln = function (fn, fnStr, td) {
849
+ var dt = fn();
850
+ var st = fn.toString();
851
+ var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\s+/g, '').split(',');
852
+ for (var i = 0; i < dt.length; ++i) {
853
+ var v = dt[i], k = ks[i];
854
+ if (typeof v == 'function') {
855
+ fnStr += ';' + k + '=';
856
+ var st_1 = v.toString();
857
+ if (v.prototype) {
858
+ // for global objects
859
+ if (st_1.indexOf('[native code]') != -1) {
860
+ var spInd = st_1.indexOf(' ', 8) + 1;
861
+ fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));
862
+ }
863
+ else {
864
+ fnStr += st_1;
865
+ for (var t in v.prototype)
866
+ fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();
867
+ }
868
+ }
869
+ else
870
+ fnStr += st_1;
871
+ }
872
+ else
873
+ td[k] = v;
874
+ }
875
+ return fnStr;
876
+ };
877
+ var ch = [];
878
+ // clone bufs
879
+ var cbfs = function (v) {
880
+ var tl = [];
881
+ for (var k in v) {
882
+ if (v[k].buffer) {
883
+ tl.push((v[k] = new v[k].constructor(v[k])).buffer);
884
+ }
885
+ }
886
+ return tl;
887
+ };
888
+ // use a worker to execute code
889
+ var wrkr = function (fns, init, id, cb) {
890
+ if (!ch[id]) {
891
+ var fnStr = '', td_1 = {}, m = fns.length - 1;
892
+ for (var i = 0; i < m; ++i)
893
+ fnStr = wcln(fns[i], fnStr, td_1);
894
+ ch[id] = { c: wcln(fns[m], fnStr, td_1), e: td_1 };
895
+ }
896
+ var td = mrg({}, ch[id].e);
897
+ return wk(ch[id].c + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);
898
+ };
899
+ // base async inflate fn
900
+ var bInflt = function () { return [u8, u16, i32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gopt]; };
901
+ var bDflt = function () { return [u8, u16, i32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };
902
+ // gzip extra
903
+ var gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };
904
+ // gunzip extra
905
+ var guze = function () { return [gzs, gzl]; };
906
+ // zlib extra
907
+ var zle = function () { return [zlh, wbytes, adler]; };
908
+ // unzlib extra
909
+ var zule = function () { return [zls]; };
910
+ // post buf
911
+ var pbf = function (msg) { return postMessage(msg, [msg.buffer]); };
912
+ // get opts
913
+ var gopt = function (o) { return o && {
914
+ out: o.size && new u8(o.size),
915
+ dictionary: o.dictionary
916
+ }; };
917
+ // async helper
918
+ var cbify = function (dat, opts, fns, init, id, cb) {
919
+ var w = wrkr(fns, init, id, function (err, dat) {
920
+ w.terminate();
921
+ cb(err, dat);
922
+ });
923
+ w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);
924
+ return function () { w.terminate(); };
925
+ };
926
+ // auto stream
927
+ var astrm = function (strm) {
928
+ strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };
929
+ return function (ev) {
930
+ if (ev.data[0]) {
931
+ strm.push(ev.data[0], ev.data[1]);
932
+ postMessage([ev.data[0].length]);
933
+ }
934
+ else
935
+ strm.flush(ev.data[1]);
936
+ };
937
+ };
938
+ // async stream attach
939
+ var astrmify = function (fns, strm, opts, init, id, flush, ext) {
940
+ var t;
941
+ var w = wrkr(fns, init, id, function (err, dat) {
942
+ if (err)
943
+ w.terminate(), strm.ondata.call(strm, err);
944
+ else if (!Array.isArray(dat))
945
+ ext(dat);
946
+ else if (dat.length == 1) {
947
+ strm.queuedSize -= dat[0];
948
+ if (strm.ondrain)
949
+ strm.ondrain(dat[0]);
950
+ }
951
+ else {
952
+ if (dat[1])
953
+ w.terminate();
954
+ strm.ondata.call(strm, err, dat[0], dat[1]);
955
+ }
956
+ });
957
+ w.postMessage(opts);
958
+ strm.queuedSize = 0;
959
+ strm.push = function (d, f) {
960
+ if (!strm.ondata)
961
+ err(5);
962
+ if (t)
963
+ strm.ondata(err(4, 0, 1), null, !!f);
964
+ strm.queuedSize += d.length;
965
+ // can fail for cross-realm Uint8Array, but ok - only a small performance penalty
966
+ w.postMessage([d, t = f], d.buffer instanceof ArrayBuffer ? [d.buffer] : []);
967
+ };
968
+ strm.terminate = function () { w.terminate(); };
969
+ if (flush) {
970
+ strm.flush = function (sync) { w.postMessage([0, sync]); };
971
+ }
972
+ };
973
+ // read 2 bytes
974
+ var b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };
975
+ // read 4 bytes
976
+ var b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };
977
+ // read 8 bytes
978
+ var b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };
979
+ // write bytes
980
+ var wbytes = function (d, b, v) {
981
+ for (; v; ++b)
982
+ d[b] = v, v >>>= 8;
983
+ };
984
+ // gzip header
985
+ var gzh = function (c, o) {
986
+ var fn = o.filename;
987
+ c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix
988
+ if (o.mtime != 0)
989
+ wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));
990
+ if (fn) {
991
+ c[3] = 8;
992
+ for (var i = 0; i <= fn.length; ++i)
993
+ c[i + 10] = fn.charCodeAt(i);
994
+ }
995
+ };
996
+ // gzip footer: -8 to -4 = CRC, -4 to -0 is length
997
+ // gzip start
998
+ var gzs = function (d) {
999
+ if (d[0] != 31 || d[1] != 139 || d[2] != 8)
1000
+ err(6, 'invalid gzip data');
1001
+ var flg = d[3];
1002
+ var st = 10;
1003
+ if (flg & 4)
1004
+ st += (d[10] | d[11] << 8) + 2;
1005
+ for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])
1006
+ ;
1007
+ return st + (flg & 2);
1008
+ };
1009
+ // gzip length
1010
+ var gzl = function (d) {
1011
+ var l = d.length;
1012
+ return (d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16 | d[l - 1] << 24) >>> 0;
1013
+ };
1014
+ // gzip header length
1015
+ var gzhl = function (o) { return 10 + (o.filename ? o.filename.length + 1 : 0); };
1016
+ // zlib header
1017
+ var zlh = function (c, o) {
1018
+ var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;
1019
+ c[0] = 120, c[1] = (fl << 6) | (o.dictionary && 32);
1020
+ c[1] |= 31 - ((c[0] << 8) | c[1]) % 31;
1021
+ if (o.dictionary) {
1022
+ var h = adler();
1023
+ h.p(o.dictionary);
1024
+ wbytes(c, 2, h.d());
1025
+ }
1026
+ };
1027
+ // zlib start
1028
+ var zls = function (d, dict) {
1029
+ if ((d[0] & 15) != 8 || (d[0] >> 4) > 7 || ((d[0] << 8 | d[1]) % 31))
1030
+ err(6, 'invalid zlib data');
1031
+ if ((d[1] >> 5 & 1) == +!dict)
1032
+ err(6, 'invalid zlib data: ' + (d[1] & 32 ? 'need' : 'unexpected') + ' dictionary');
1033
+ return (d[1] >> 3 & 4) + 2;
1034
+ };
1035
+ function StrmOpt(opts, cb) {
1036
+ if (typeof opts == 'function')
1037
+ cb = opts, opts = {};
1038
+ this.ondata = cb;
1039
+ return opts;
1040
+ }
1041
+ /**
1042
+ * Streaming DEFLATE compression
1043
+ */
1044
+ var Deflate = /*#__PURE__*/ (function () {
1045
+ function Deflate(opts, cb) {
1046
+ if (typeof opts == 'function')
1047
+ cb = opts, opts = {};
1048
+ this.ondata = cb;
1049
+ this.o = opts || {};
1050
+ this.s = { l: 0, i: 32768, w: 32768, z: 32768 };
1051
+ // Buffer length must always be 0 mod 32768 for index calculations to be correct when modifying head and prev
1052
+ // 98304 = 32768 (lookback) + 65536 (common chunk size)
1053
+ this.b = new u8(98304);
1054
+ if (this.o.dictionary) {
1055
+ var dict = this.o.dictionary.subarray(-32768);
1056
+ this.b.set(dict, 32768 - dict.length);
1057
+ this.s.i = 32768 - dict.length;
1058
+ }
1059
+ }
1060
+ Deflate.prototype.p = function (c, f) {
1061
+ this.ondata(dopt(c, this.o, 0, 0, this.s), f);
1062
+ };
1063
+ /**
1064
+ * Pushes a chunk to be deflated
1065
+ * @param chunk The chunk to push
1066
+ * @param final Whether this is the last chunk
1067
+ */
1068
+ Deflate.prototype.push = function (chunk, final) {
1069
+ if (!this.ondata)
1070
+ err(5);
1071
+ if (this.s.l)
1072
+ err(4);
1073
+ var endLen = chunk.length + this.s.z;
1074
+ if (endLen > this.b.length) {
1075
+ if (endLen > 2 * this.b.length - 32768) {
1076
+ var newBuf = new u8(endLen & -32768);
1077
+ newBuf.set(this.b.subarray(0, this.s.z));
1078
+ this.b = newBuf;
1079
+ }
1080
+ var split = this.b.length - this.s.z;
1081
+ this.b.set(chunk.subarray(0, split), this.s.z);
1082
+ this.s.z = this.b.length;
1083
+ this.p(this.b, false);
1084
+ this.b.set(this.b.subarray(-32768));
1085
+ this.b.set(chunk.subarray(split), 32768);
1086
+ this.s.z = chunk.length - split + 32768;
1087
+ this.s.i = 32766, this.s.w = 32768;
1088
+ }
1089
+ else {
1090
+ this.b.set(chunk, this.s.z);
1091
+ this.s.z += chunk.length;
1092
+ }
1093
+ this.s.l = final & 1;
1094
+ if (this.s.z > this.s.w + 8191 || final) {
1095
+ this.p(this.b, final || false);
1096
+ this.s.w = this.s.i, this.s.i -= 2;
1097
+ }
1098
+ if (final) {
1099
+ // cleanup unneeded buffers/state to reduce memory usage
1100
+ this.s = this.o = {};
1101
+ this.b = et;
1102
+ }
1103
+ };
1104
+ /**
1105
+ * Flushes buffered uncompressed data. Useful to immediately retrieve the
1106
+ * deflated output for small inputs.
1107
+ * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5
1108
+ * extra bytes, but guarantees all pushed data is immediately
1109
+ * decompressible. A separate DEFLATE stream may be concatenated
1110
+ * with the current output after a sync flush.
1111
+ */
1112
+ Deflate.prototype.flush = function (sync) {
1113
+ if (!this.ondata)
1114
+ err(5);
1115
+ if (this.s.l)
1116
+ err(4);
1117
+ this.p(this.b, false);
1118
+ this.s.w = this.s.i, this.s.i -= 2;
1119
+ // could technically skip writing the type-0 block for (this.s.r & 7) == 0,
1120
+ // but the deterministic trailer (00 00 FF FF) is useful in some situations
1121
+ if (sync) {
1122
+ var c = new u8(6);
1123
+ c[0] = this.s.r >> 3;
1124
+ // write empty, non-final type-0 block
1125
+ var ep = wfblk(c, this.s.r, et);
1126
+ this.s.r = 0;
1127
+ this.ondata(c.subarray(0, ep >> 3), false);
1128
+ }
1129
+ };
1130
+ return Deflate;
1131
+ }());
1132
+ export { Deflate };
1133
+ /**
1134
+ * Asynchronous streaming DEFLATE compression
1135
+ */
1136
+ var AsyncDeflate = /*#__PURE__*/ (function () {
1137
+ function AsyncDeflate(opts, cb) {
1138
+ astrmify([
1139
+ bDflt,
1140
+ function () { return [astrm, Deflate]; }
1141
+ ], this, StrmOpt.call(this, opts, cb), function (ev) {
1142
+ var strm = new Deflate(ev.data);
1143
+ onmessage = astrm(strm);
1144
+ }, 6, 1);
1145
+ }
1146
+ return AsyncDeflate;
1147
+ }());
1148
+ export { AsyncDeflate };
1149
+ export function deflate(data, opts, cb) {
1150
+ if (!cb)
1151
+ cb = opts, opts = {};
1152
+ if (typeof cb != 'function')
1153
+ err(7);
1154
+ return cbify(data, opts, [
1155
+ bDflt,
1156
+ ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);
1157
+ }
1158
+ /**
1159
+ * Compresses data with DEFLATE without any wrapper
1160
+ * @param data The data to compress
1161
+ * @param opts The compression options
1162
+ * @returns The deflated version of the data
1163
+ */
1164
+ export function deflateSync(data, opts) {
1165
+ return dopt(data, opts || {}, 0, 0);
1166
+ }
1167
+ /**
1168
+ * Streaming DEFLATE decompression
1169
+ */
1170
+ var Inflate = /*#__PURE__*/ (function () {
1171
+ function Inflate(opts, cb) {
1172
+ // no StrmOpt here to avoid adding to workerizer
1173
+ if (typeof opts == 'function')
1174
+ cb = opts, opts = {};
1175
+ this.ondata = cb;
1176
+ var dict = opts && opts.dictionary && opts.dictionary.subarray(-32768);
1177
+ this.s = { i: 0, b: dict ? dict.length : 0 };
1178
+ this.o = new u8(32768);
1179
+ this.p = new u8(0);
1180
+ if (dict)
1181
+ this.o.set(dict);
1182
+ }
1183
+ Inflate.prototype.e = function (c) {
1184
+ if (!this.ondata)
1185
+ err(5);
1186
+ if (this.d)
1187
+ err(4);
1188
+ if (!this.p.length)
1189
+ this.p = c;
1190
+ else if (c.length) {
1191
+ var n = new u8(this.p.length + c.length);
1192
+ n.set(this.p), n.set(c, this.p.length), this.p = n;
1193
+ }
1194
+ };
1195
+ Inflate.prototype.c = function (final) {
1196
+ this.s.i = +(this.d = final || false);
1197
+ var bts = this.s.b;
1198
+ var dt = inflt(this.p, this.s, this.o);
1199
+ this.ondata(slc(dt, bts, this.s.b), this.d);
1200
+ this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;
1201
+ this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;
1202
+ };
1203
+ /**
1204
+ * Pushes a chunk to be inflated
1205
+ * @param chunk The chunk to push
1206
+ * @param final Whether this is the final chunk
1207
+ */
1208
+ Inflate.prototype.push = function (chunk, final) {
1209
+ this.e(chunk), this.c(final);
1210
+ };
1211
+ return Inflate;
1212
+ }());
1213
+ export { Inflate };
1214
+ /**
1215
+ * Asynchronous streaming DEFLATE decompression
1216
+ */
1217
+ var AsyncInflate = /*#__PURE__*/ (function () {
1218
+ function AsyncInflate(opts, cb) {
1219
+ astrmify([
1220
+ bInflt,
1221
+ function () { return [astrm, Inflate]; }
1222
+ ], this, StrmOpt.call(this, opts, cb), function (ev) {
1223
+ var strm = new Inflate(ev.data);
1224
+ onmessage = astrm(strm);
1225
+ }, 7, 0);
1226
+ }
1227
+ return AsyncInflate;
1228
+ }());
1229
+ export { AsyncInflate };
1230
+ export function inflate(data, opts, cb) {
1231
+ if (!cb)
1232
+ cb = opts, opts = {};
1233
+ if (typeof cb != 'function')
1234
+ err(7);
1235
+ return cbify(data, opts, [
1236
+ bInflt
1237
+ ], function (ev) { return pbf(inflateSync(ev.data[0], gopt(ev.data[1]))); }, 1, cb);
1238
+ }
1239
+ export function inflateSync(data, opts) {
1240
+ return inflt(data, { i: 2 }, opts && opts.out, opts && opts.dictionary);
1241
+ }
1242
+ // before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.
1243
+ /**
1244
+ * Streaming GZIP compression
1245
+ */
1246
+ var Gzip = /*#__PURE__*/ (function () {
1247
+ function Gzip(opts, cb) {
1248
+ this.c = crc();
1249
+ this.l = 0;
1250
+ this.v = 1;
1251
+ Deflate.call(this, opts, cb);
1252
+ }
1253
+ /**
1254
+ * Pushes a chunk to be GZIPped
1255
+ * @param chunk The chunk to push
1256
+ * @param final Whether this is the last chunk
1257
+ */
1258
+ Gzip.prototype.push = function (chunk, final) {
1259
+ this.c.p(chunk);
1260
+ this.l += chunk.length;
1261
+ Deflate.prototype.push.call(this, chunk, final);
1262
+ };
1263
+ Gzip.prototype.p = function (c, f) {
1264
+ var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, this.s);
1265
+ if (this.v)
1266
+ gzh(raw, this.o), this.v = 0;
1267
+ if (f)
1268
+ wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);
1269
+ this.ondata(raw, f);
1270
+ };
1271
+ /**
1272
+ * Flushes buffered uncompressed data. Useful to immediately retrieve the
1273
+ * GZIPped output for small inputs.
1274
+ * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5
1275
+ * extra bytes, but guarantees all pushed data is immediately
1276
+ * decompressible.
1277
+ */
1278
+ Gzip.prototype.flush = function (sync) {
1279
+ Deflate.prototype.flush.call(this, sync);
1280
+ };
1281
+ return Gzip;
1282
+ }());
1283
+ export { Gzip };
1284
+ /**
1285
+ * Asynchronous streaming GZIP compression
1286
+ */
1287
+ var AsyncGzip = /*#__PURE__*/ (function () {
1288
+ function AsyncGzip(opts, cb) {
1289
+ astrmify([
1290
+ bDflt,
1291
+ gze,
1292
+ function () { return [astrm, Deflate, Gzip]; }
1293
+ ], this, StrmOpt.call(this, opts, cb), function (ev) {
1294
+ var strm = new Gzip(ev.data);
1295
+ onmessage = astrm(strm);
1296
+ }, 8, 1);
1297
+ }
1298
+ return AsyncGzip;
1299
+ }());
1300
+ export { AsyncGzip };
1301
+ export function gzip(data, opts, cb) {
1302
+ if (!cb)
1303
+ cb = opts, opts = {};
1304
+ if (typeof cb != 'function')
1305
+ err(7);
1306
+ return cbify(data, opts, [
1307
+ bDflt,
1308
+ gze,
1309
+ function () { return [gzipSync]; }
1310
+ ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);
1311
+ }
1312
+ /**
1313
+ * Compresses data with GZIP
1314
+ * @param data The data to compress
1315
+ * @param opts The compression options
1316
+ * @returns The gzipped version of the data
1317
+ */
1318
+ export function gzipSync(data, opts) {
1319
+ if (!opts)
1320
+ opts = {};
1321
+ var c = crc(), l = data.length;
1322
+ c.p(data);
1323
+ var d = dopt(data, opts, gzhl(opts), 8), s = d.length;
1324
+ return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;
1325
+ }
1326
+ /**
1327
+ * Streaming single or multi-member GZIP decompression
1328
+ */
1329
+ var Gunzip = /*#__PURE__*/ (function () {
1330
+ function Gunzip(opts, cb) {
1331
+ this.v = 1;
1332
+ this.r = 0;
1333
+ Inflate.call(this, opts, cb);
1334
+ }
1335
+ /**
1336
+ * Pushes a chunk to be GUNZIPped
1337
+ * @param chunk The chunk to push
1338
+ * @param final Whether this is the last chunk
1339
+ */
1340
+ Gunzip.prototype.push = function (chunk, final) {
1341
+ Inflate.prototype.e.call(this, chunk);
1342
+ this.r += chunk.length;
1343
+ if (this.v) {
1344
+ var p = this.p.subarray(this.v - 1);
1345
+ var s = p.length > 3 ? gzs(p) : 4;
1346
+ if (s > p.length) {
1347
+ if (!final)
1348
+ return;
1349
+ }
1350
+ else if (this.v > 1 && this.onmember) {
1351
+ this.onmember(this.r - p.length);
1352
+ }
1353
+ this.p = p.subarray(s), this.v = 0;
1354
+ }
1355
+ // necessary to prevent TS from using the closure value
1356
+ // This allows for workerization to function correctly
1357
+ Inflate.prototype.c.call(this, 0);
1358
+ // process concatenated GZIP
1359
+ if (this.s.f && !this.s.l) {
1360
+ this.v = shft(this.s.p) + 9;
1361
+ this.s = { i: 0 };
1362
+ this.o = new u8(0);
1363
+ this.push(new u8(0), final);
1364
+ }
1365
+ else if (final) {
1366
+ Inflate.prototype.c.call(this, final);
1367
+ }
1368
+ };
1369
+ return Gunzip;
1370
+ }());
1371
+ export { Gunzip };
1372
+ /**
1373
+ * Asynchronous streaming single or multi-member GZIP decompression
1374
+ */
1375
+ var AsyncGunzip = /*#__PURE__*/ (function () {
1376
+ function AsyncGunzip(opts, cb) {
1377
+ var _this = this;
1378
+ astrmify([
1379
+ bInflt,
1380
+ guze,
1381
+ function () { return [astrm, Inflate, Gunzip]; }
1382
+ ], this, StrmOpt.call(this, opts, cb), function (ev) {
1383
+ var strm = new Gunzip(ev.data);
1384
+ strm.onmember = function (offset) { return postMessage(offset); };
1385
+ onmessage = astrm(strm);
1386
+ }, 9, 0, function (offset) { return _this.onmember && _this.onmember(offset); });
1387
+ }
1388
+ return AsyncGunzip;
1389
+ }());
1390
+ export { AsyncGunzip };
1391
+ export function gunzip(data, opts, cb) {
1392
+ if (!cb)
1393
+ cb = opts, opts = {};
1394
+ if (typeof cb != 'function')
1395
+ err(7);
1396
+ return cbify(data, opts, [
1397
+ bInflt,
1398
+ guze,
1399
+ function () { return [gunzipSync]; }
1400
+ ], function (ev) { return pbf(gunzipSync(ev.data[0], ev.data[1])); }, 3, cb);
1401
+ }
1402
+ export function gunzipSync(data, opts) {
1403
+ var st = gzs(data);
1404
+ if (st + 8 > data.length)
1405
+ err(6, 'invalid gzip data');
1406
+ return inflt(data.subarray(st, -8), { i: 2 }, opts && opts.out || new u8(gzl(data)), opts && opts.dictionary);
1407
+ }
1408
+ /**
1409
+ * Streaming Zlib compression
1410
+ */
1411
+ var Zlib = /*#__PURE__*/ (function () {
1412
+ function Zlib(opts, cb) {
1413
+ this.c = adler();
1414
+ this.v = 1;
1415
+ Deflate.call(this, opts, cb);
1416
+ }
1417
+ /**
1418
+ * Pushes a chunk to be zlibbed
1419
+ * @param chunk The chunk to push
1420
+ * @param final Whether this is the last chunk
1421
+ */
1422
+ Zlib.prototype.push = function (chunk, final) {
1423
+ this.c.p(chunk);
1424
+ Deflate.prototype.push.call(this, chunk, final);
1425
+ };
1426
+ Zlib.prototype.p = function (c, f) {
1427
+ var raw = dopt(c, this.o, this.v && (this.o.dictionary ? 6 : 2), f && 4, this.s);
1428
+ if (this.v)
1429
+ zlh(raw, this.o), this.v = 0;
1430
+ if (f)
1431
+ wbytes(raw, raw.length - 4, this.c.d());
1432
+ this.ondata(raw, f);
1433
+ };
1434
+ /**
1435
+ * Flushes buffered uncompressed data. Useful to immediately retrieve the
1436
+ * zlibbed output for small inputs.
1437
+ * @param sync Whether to flush to a byte boundary. A sync flush takes 4-5
1438
+ * extra bytes, but guarantees all pushed data is immediately
1439
+ * decompressible.
1440
+ */
1441
+ Zlib.prototype.flush = function (sync) {
1442
+ Deflate.prototype.flush.call(this, sync);
1443
+ };
1444
+ return Zlib;
1445
+ }());
1446
+ export { Zlib };
1447
+ /**
1448
+ * Asynchronous streaming Zlib compression
1449
+ */
1450
+ var AsyncZlib = /*#__PURE__*/ (function () {
1451
+ function AsyncZlib(opts, cb) {
1452
+ astrmify([
1453
+ bDflt,
1454
+ zle,
1455
+ function () { return [astrm, Deflate, Zlib]; }
1456
+ ], this, StrmOpt.call(this, opts, cb), function (ev) {
1457
+ var strm = new Zlib(ev.data);
1458
+ onmessage = astrm(strm);
1459
+ }, 10, 1);
1460
+ }
1461
+ return AsyncZlib;
1462
+ }());
1463
+ export { AsyncZlib };
1464
+ export function zlib(data, opts, cb) {
1465
+ if (!cb)
1466
+ cb = opts, opts = {};
1467
+ if (typeof cb != 'function')
1468
+ err(7);
1469
+ return cbify(data, opts, [
1470
+ bDflt,
1471
+ zle,
1472
+ function () { return [zlibSync]; }
1473
+ ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);
1474
+ }
1475
+ /**
1476
+ * Compress data with Zlib
1477
+ * @param data The data to compress
1478
+ * @param opts The compression options
1479
+ * @returns The zlib-compressed version of the data
1480
+ */
1481
+ export function zlibSync(data, opts) {
1482
+ if (!opts)
1483
+ opts = {};
1484
+ var a = adler();
1485
+ a.p(data);
1486
+ var d = dopt(data, opts, opts.dictionary ? 6 : 2, 4);
1487
+ return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;
1488
+ }
1489
+ /**
1490
+ * Streaming Zlib decompression
1491
+ */
1492
+ var Unzlib = /*#__PURE__*/ (function () {
1493
+ function Unzlib(opts, cb) {
1494
+ Inflate.call(this, opts, cb);
1495
+ this.v = opts && opts.dictionary ? 2 : 1;
1496
+ }
1497
+ /**
1498
+ * Pushes a chunk to be unzlibbed
1499
+ * @param chunk The chunk to push
1500
+ * @param final Whether this is the last chunk
1501
+ */
1502
+ Unzlib.prototype.push = function (chunk, final) {
1503
+ Inflate.prototype.e.call(this, chunk);
1504
+ if (this.v) {
1505
+ if (this.p.length < 6 && !final)
1506
+ return;
1507
+ this.p = this.p.subarray(zls(this.p, this.v - 1)), this.v = 0;
1508
+ }
1509
+ if (final) {
1510
+ if (this.p.length < 4)
1511
+ err(6, 'invalid zlib data');
1512
+ this.p = this.p.subarray(0, -4);
1513
+ }
1514
+ // necessary to prevent TS from using the closure value
1515
+ // This allows for workerization to function correctly
1516
+ Inflate.prototype.c.call(this, final);
1517
+ };
1518
+ return Unzlib;
1519
+ }());
1520
+ export { Unzlib };
1521
+ /**
1522
+ * Asynchronous streaming Zlib decompression
1523
+ */
1524
+ var AsyncUnzlib = /*#__PURE__*/ (function () {
1525
+ function AsyncUnzlib(opts, cb) {
1526
+ astrmify([
1527
+ bInflt,
1528
+ zule,
1529
+ function () { return [astrm, Inflate, Unzlib]; }
1530
+ ], this, StrmOpt.call(this, opts, cb), function (ev) {
1531
+ var strm = new Unzlib(ev.data);
1532
+ onmessage = astrm(strm);
1533
+ }, 11, 0);
1534
+ }
1535
+ return AsyncUnzlib;
1536
+ }());
1537
+ export { AsyncUnzlib };
1538
+ export function unzlib(data, opts, cb) {
1539
+ if (!cb)
1540
+ cb = opts, opts = {};
1541
+ if (typeof cb != 'function')
1542
+ err(7);
1543
+ return cbify(data, opts, [
1544
+ bInflt,
1545
+ zule,
1546
+ function () { return [unzlibSync]; }
1547
+ ], function (ev) { return pbf(unzlibSync(ev.data[0], gopt(ev.data[1]))); }, 5, cb);
1548
+ }
1549
+ export function unzlibSync(data, opts) {
1550
+ return inflt(data.subarray(zls(data, opts && opts.dictionary), -4), { i: 2 }, opts && opts.out, opts && opts.dictionary);
1551
+ }
1552
+ // Default algorithm for compression (used because having a known output size allows faster decompression)
1553
+ export { gzip as compress, AsyncGzip as AsyncCompress };
1554
+ export { gzipSync as compressSync, Gzip as Compress };
1555
+ /**
1556
+ * Streaming GZIP, Zlib, or raw DEFLATE decompression
1557
+ */
1558
+ var Decompress = /*#__PURE__*/ (function () {
1559
+ function Decompress(opts, cb) {
1560
+ this.o = StrmOpt.call(this, opts, cb) || {};
1561
+ this.G = Gunzip;
1562
+ this.I = Inflate;
1563
+ this.Z = Unzlib;
1564
+ }
1565
+ // init substream
1566
+ // overriden by AsyncDecompress
1567
+ Decompress.prototype.i = function () {
1568
+ var _this = this;
1569
+ this.s.ondata = function (dat, final) {
1570
+ _this.ondata(dat, final);
1571
+ };
1572
+ };
1573
+ /**
1574
+ * Pushes a chunk to be decompressed
1575
+ * @param chunk The chunk to push
1576
+ * @param final Whether this is the last chunk
1577
+ */
1578
+ Decompress.prototype.push = function (chunk, final) {
1579
+ if (!this.ondata)
1580
+ err(5);
1581
+ if (!this.s) {
1582
+ if (this.p && this.p.length) {
1583
+ var n = new u8(this.p.length + chunk.length);
1584
+ n.set(this.p), n.set(chunk, this.p.length);
1585
+ }
1586
+ else
1587
+ this.p = chunk;
1588
+ if (this.p.length > 2) {
1589
+ this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)
1590
+ ? new this.G(this.o)
1591
+ : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))
1592
+ ? new this.I(this.o)
1593
+ : new this.Z(this.o);
1594
+ this.i();
1595
+ this.s.push(this.p, final);
1596
+ this.p = null;
1597
+ }
1598
+ }
1599
+ else
1600
+ this.s.push(chunk, final);
1601
+ };
1602
+ return Decompress;
1603
+ }());
1604
+ export { Decompress };
1605
+ /**
1606
+ * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression
1607
+ */
1608
+ var AsyncDecompress = /*#__PURE__*/ (function () {
1609
+ function AsyncDecompress(opts, cb) {
1610
+ Decompress.call(this, opts, cb);
1611
+ this.queuedSize = 0;
1612
+ this.G = AsyncGunzip;
1613
+ this.I = AsyncInflate;
1614
+ this.Z = AsyncUnzlib;
1615
+ }
1616
+ AsyncDecompress.prototype.i = function () {
1617
+ var _this = this;
1618
+ this.s.ondata = function (err, dat, final) {
1619
+ _this.ondata(err, dat, final);
1620
+ };
1621
+ this.s.ondrain = function (size) {
1622
+ _this.queuedSize -= size;
1623
+ if (_this.ondrain)
1624
+ _this.ondrain(size);
1625
+ };
1626
+ };
1627
+ /**
1628
+ * Pushes a chunk to be decompressed
1629
+ * @param chunk The chunk to push
1630
+ * @param final Whether this is the last chunk
1631
+ */
1632
+ AsyncDecompress.prototype.push = function (chunk, final) {
1633
+ this.queuedSize += chunk.length;
1634
+ Decompress.prototype.push.call(this, chunk, final);
1635
+ };
1636
+ return AsyncDecompress;
1637
+ }());
1638
+ export { AsyncDecompress };
1639
+ export function decompress(data, opts, cb) {
1640
+ if (!cb)
1641
+ cb = opts, opts = {};
1642
+ if (typeof cb != 'function')
1643
+ err(7);
1644
+ return (data[0] == 31 && data[1] == 139 && data[2] == 8)
1645
+ ? gunzip(data, opts, cb)
1646
+ : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))
1647
+ ? inflate(data, opts, cb)
1648
+ : unzlib(data, opts, cb);
1649
+ }
1650
+ /**
1651
+ * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
1652
+ * @param data The data to decompress
1653
+ * @param opts The decompression options
1654
+ * @returns The decompressed version of the data
1655
+ */
1656
+ export function decompressSync(data, opts) {
1657
+ return (data[0] == 31 && data[1] == 139 && data[2] == 8)
1658
+ ? gunzipSync(data, opts)
1659
+ : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))
1660
+ ? inflateSync(data, opts)
1661
+ : unzlibSync(data, opts);
1662
+ }
1663
+ // flatten a directory structure
1664
+ var fltn = function (d, p, t, o) {
1665
+ for (var k in d) {
1666
+ var val = d[k], n = p + k, op = o;
1667
+ if (Array.isArray(val))
1668
+ op = mrg(o, val[1]), val = val[0];
1669
+ if (ArrayBuffer.isView(val))
1670
+ t[n] = [val, op];
1671
+ else {
1672
+ t[n += '/'] = [new u8(0), op];
1673
+ fltn(val, n, t, o);
1674
+ }
1675
+ }
1676
+ };
1677
+ // text encoder
1678
+ var te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();
1679
+ // text decoder
1680
+ var td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();
1681
+ // text decoder stream
1682
+ var tds = 0;
1683
+ try {
1684
+ td.decode(et, { stream: true });
1685
+ tds = 1;
1686
+ }
1687
+ catch (e) { }
1688
+ // decode UTF8
1689
+ var dutf8 = function (d) {
1690
+ for (var r = '', i = 0;;) {
1691
+ var c = d[i++];
1692
+ var eb = (c > 127) + (c > 223) + (c > 239);
1693
+ if (i + eb > d.length)
1694
+ return { s: r, r: slc(d, i - 1) };
1695
+ if (!eb)
1696
+ r += String.fromCharCode(c);
1697
+ else if (eb == 3) {
1698
+ c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,
1699
+ r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));
1700
+ }
1701
+ else if (eb & 1)
1702
+ r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));
1703
+ else
1704
+ r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));
1705
+ }
1706
+ };
1707
+ /**
1708
+ * Streaming UTF-8 decoding
1709
+ */
1710
+ var DecodeUTF8 = /*#__PURE__*/ (function () {
1711
+ /**
1712
+ * Creates a UTF-8 decoding stream
1713
+ * @param cb The callback to call whenever data is decoded
1714
+ */
1715
+ function DecodeUTF8(cb) {
1716
+ this.ondata = cb;
1717
+ if (tds)
1718
+ this.t = new TextDecoder();
1719
+ else
1720
+ this.p = et;
1721
+ }
1722
+ /**
1723
+ * Pushes a chunk to be decoded from UTF-8 binary
1724
+ * @param chunk The chunk to push
1725
+ * @param final Whether this is the last chunk
1726
+ */
1727
+ DecodeUTF8.prototype.push = function (chunk, final) {
1728
+ if (!this.ondata)
1729
+ err(5);
1730
+ final = !!final;
1731
+ if (this.t) {
1732
+ this.ondata(this.t.decode(chunk, { stream: true }), final);
1733
+ if (final) {
1734
+ if (this.t.decode().length)
1735
+ err(8);
1736
+ this.t = null;
1737
+ }
1738
+ return;
1739
+ }
1740
+ if (!this.p)
1741
+ err(4);
1742
+ var dat = new u8(this.p.length + chunk.length);
1743
+ dat.set(this.p);
1744
+ dat.set(chunk, this.p.length);
1745
+ var _a = dutf8(dat), s = _a.s, r = _a.r;
1746
+ if (final) {
1747
+ if (r.length)
1748
+ err(8);
1749
+ this.p = null;
1750
+ }
1751
+ else
1752
+ this.p = r;
1753
+ this.ondata(s, final);
1754
+ };
1755
+ return DecodeUTF8;
1756
+ }());
1757
+ export { DecodeUTF8 };
1758
+ /**
1759
+ * Streaming UTF-8 encoding
1760
+ */
1761
+ var EncodeUTF8 = /*#__PURE__*/ (function () {
1762
+ /**
1763
+ * Creates a UTF-8 decoding stream
1764
+ * @param cb The callback to call whenever data is encoded
1765
+ */
1766
+ function EncodeUTF8(cb) {
1767
+ this.ondata = cb;
1768
+ }
1769
+ /**
1770
+ * Pushes a chunk to be encoded to UTF-8
1771
+ * @param chunk The string data to push
1772
+ * @param final Whether this is the last chunk
1773
+ */
1774
+ EncodeUTF8.prototype.push = function (chunk, final) {
1775
+ if (!this.ondata)
1776
+ err(5);
1777
+ if (this.d)
1778
+ err(4);
1779
+ this.ondata(strToU8(chunk), this.d = final || false);
1780
+ };
1781
+ return EncodeUTF8;
1782
+ }());
1783
+ export { EncodeUTF8 };
1784
+ /**
1785
+ * Converts a string into a Uint8Array for use with compression/decompression methods
1786
+ * @param str The string to encode
1787
+ * @param latin1 Whether or not to interpret the data as Latin-1. This should
1788
+ * not need to be true unless decoding a binary string.
1789
+ * @returns The string encoded in UTF-8/Latin-1 binary
1790
+ */
1791
+ export function strToU8(str, latin1) {
1792
+ if (latin1) {
1793
+ var ar_1 = new u8(str.length);
1794
+ for (var i = 0; i < str.length; ++i)
1795
+ ar_1[i] = str.charCodeAt(i);
1796
+ return ar_1;
1797
+ }
1798
+ if (te)
1799
+ return te.encode(str);
1800
+ var l = str.length;
1801
+ var ar = new u8(str.length + (str.length >> 1));
1802
+ var ai = 0;
1803
+ var w = function (v) { ar[ai++] = v; };
1804
+ for (var i = 0; i < l; ++i) {
1805
+ if (ai + 5 > ar.length) {
1806
+ var n = new u8(ai + 8 + ((l - i) << 1));
1807
+ n.set(ar);
1808
+ ar = n;
1809
+ }
1810
+ var c = str.charCodeAt(i);
1811
+ if (c < 128 || latin1)
1812
+ w(c);
1813
+ else if (c < 2048)
1814
+ w(192 | (c >> 6)), w(128 | (c & 63));
1815
+ else if (c > 55295 && c < 57344)
1816
+ c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),
1817
+ w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));
1818
+ else
1819
+ w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));
1820
+ }
1821
+ return slc(ar, 0, ai);
1822
+ }
1823
+ /**
1824
+ * Converts a Uint8Array to a string
1825
+ * @param dat The data to decode to string
1826
+ * @param latin1 Whether or not to interpret the data as Latin-1. This should
1827
+ * not need to be true unless encoding to binary string.
1828
+ * @returns The original UTF-8/Latin-1 string
1829
+ */
1830
+ export function strFromU8(dat, latin1) {
1831
+ if (latin1) {
1832
+ var r = '';
1833
+ for (var i = 0; i < dat.length; i += 16384)
1834
+ r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));
1835
+ return r;
1836
+ }
1837
+ else if (td) {
1838
+ return td.decode(dat);
1839
+ }
1840
+ else {
1841
+ var _a = dutf8(dat), s = _a.s, r = _a.r;
1842
+ if (r.length)
1843
+ err(8);
1844
+ return s;
1845
+ }
1846
+ }
1847
+ ;
1848
+ // deflate bit flag
1849
+ var dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };
1850
+ // skip local zip header
1851
+ var slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };
1852
+ // read zip header
1853
+ var zh = function (d, b, z) {
1854
+ var fnl = b2(d, b + 28), efl = b2(d, b + 30), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl;
1855
+ var _a = z64hs(d, es, efl, z, b4(d, b + 20), b4(d, b + 24), b4(d, b + 42)), sc = _a[0], su = _a[1], off = _a[2];
1856
+ return [b2(d, b + 10), sc, su, fn, es + efl + b2(d, b + 32), off];
1857
+ };
1858
+ // read zip64 header sizes
1859
+ var z64hs = function (d, b, l, z, sc, su, off) {
1860
+ var nsc = sc == 4294967295, nsu = su == 4294967295, noff = off == 4294967295, e = b + l;
1861
+ var nf = nsc + nsu + noff;
1862
+ if (z && nf) {
1863
+ for (; b + 4 < e; b += 4 + b2(d, b + 2)) {
1864
+ if (b2(d, b) == 1) {
1865
+ return [
1866
+ nsc ? b8(d, b + 4 + 8 * nsu) : sc,
1867
+ nsu ? b8(d, b + 4) : su,
1868
+ noff ? b8(d, b + 4 + 8 * (nsu + nsc)) : off,
1869
+ 1
1870
+ ];
1871
+ }
1872
+ }
1873
+ // z == 2 for unknown whether or not zip64
1874
+ if (z < 2)
1875
+ err(13);
1876
+ }
1877
+ return [sc, su, off, 0];
1878
+ };
1879
+ // extra field length
1880
+ var exfl = function (ex) {
1881
+ var le = 0;
1882
+ if (ex) {
1883
+ for (var k in ex) {
1884
+ var l = ex[k].length;
1885
+ if (l > 65535)
1886
+ err(9);
1887
+ le += l + 4;
1888
+ }
1889
+ }
1890
+ return le;
1891
+ };
1892
+ // write zip header
1893
+ var wzh = function (d, b, f, fn, u, c, ce, co) {
1894
+ var fl = fn.length, ex = f.extra, col = co && co.length;
1895
+ var exl = exfl(ex);
1896
+ wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;
1897
+ if (ce != null)
1898
+ d[b++] = 20, d[b++] = f.os;
1899
+ d[b] = 20, b += 2; // spec compliance? what's that?
1900
+ d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8;
1901
+ d[b++] = f.compression & 255, d[b++] = f.compression >> 8;
1902
+ var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;
1903
+ if (y < 0 || y > 119)
1904
+ err(10);
1905
+ wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >> 1)), b += 4;
1906
+ if (c != -1) {
1907
+ wbytes(d, b, f.crc);
1908
+ wbytes(d, b + 4, c < 0 ? -c - 2 : c);
1909
+ wbytes(d, b + 8, f.size);
1910
+ }
1911
+ wbytes(d, b + 12, fl);
1912
+ wbytes(d, b + 14, exl), b += 16;
1913
+ if (ce != null) {
1914
+ wbytes(d, b, col);
1915
+ wbytes(d, b + 6, f.attrs);
1916
+ wbytes(d, b + 10, ce), b += 14;
1917
+ }
1918
+ d.set(fn, b);
1919
+ b += fl;
1920
+ if (exl) {
1921
+ for (var k in ex) {
1922
+ var exf = ex[k], l = exf.length;
1923
+ wbytes(d, b, +k);
1924
+ wbytes(d, b + 2, l);
1925
+ d.set(exf, b + 4), b += 4 + l;
1926
+ }
1927
+ }
1928
+ if (col)
1929
+ d.set(co, b), b += col;
1930
+ return b;
1931
+ };
1932
+ // write zip footer (end of central directory)
1933
+ var wzf = function (o, b, c, d, e) {
1934
+ wbytes(o, b, 0x6054B50); // skip disk
1935
+ wbytes(o, b + 8, c);
1936
+ wbytes(o, b + 10, c);
1937
+ wbytes(o, b + 12, d);
1938
+ wbytes(o, b + 16, e);
1939
+ };
1940
+ /**
1941
+ * A pass-through stream to keep data uncompressed in a ZIP archive.
1942
+ */
1943
+ var ZipPassThrough = /*#__PURE__*/ (function () {
1944
+ /**
1945
+ * Creates a pass-through stream that can be added to ZIP archives
1946
+ * @param filename The filename to associate with this data stream
1947
+ */
1948
+ function ZipPassThrough(filename) {
1949
+ this.filename = filename;
1950
+ this.c = crc();
1951
+ this.size = 0;
1952
+ this.compression = 0;
1953
+ }
1954
+ /**
1955
+ * Processes a chunk and pushes to the output stream. You can override this
1956
+ * method in a subclass for custom behavior, but by default this passes
1957
+ * the data through. You must call this.ondata(err, chunk, final) at some
1958
+ * point in this method.
1959
+ * @param chunk The chunk to process
1960
+ * @param final Whether this is the last chunk
1961
+ */
1962
+ ZipPassThrough.prototype.process = function (chunk, final) {
1963
+ this.ondata(null, chunk, final);
1964
+ };
1965
+ /**
1966
+ * Pushes a chunk to be added. If you are subclassing this with a custom
1967
+ * compression algorithm, note that you must push data from the source
1968
+ * file only, pre-compression.
1969
+ * @param chunk The chunk to push
1970
+ * @param final Whether this is the last chunk
1971
+ */
1972
+ ZipPassThrough.prototype.push = function (chunk, final) {
1973
+ if (!this.ondata)
1974
+ err(5);
1975
+ this.c.p(chunk);
1976
+ this.size += chunk.length;
1977
+ if (final)
1978
+ this.crc = this.c.d();
1979
+ // we shouldn't really do this cast, but properly handling ArrayBufferLike
1980
+ // makes the API unergonomic with Buffer
1981
+ this.process(chunk, final || false);
1982
+ };
1983
+ return ZipPassThrough;
1984
+ }());
1985
+ export { ZipPassThrough };
1986
+ // I don't extend because TypeScript extension adds 1kB of runtime bloat
1987
+ /**
1988
+ * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate
1989
+ * for better performance
1990
+ */
1991
+ var ZipDeflate = /*#__PURE__*/ (function () {
1992
+ /**
1993
+ * Creates a DEFLATE stream that can be added to ZIP archives
1994
+ * @param filename The filename to associate with this data stream
1995
+ * @param opts The compression options
1996
+ */
1997
+ function ZipDeflate(filename, opts) {
1998
+ var _this = this;
1999
+ if (!opts)
2000
+ opts = {};
2001
+ ZipPassThrough.call(this, filename);
2002
+ this.d = new Deflate(opts, function (dat, final) {
2003
+ _this.ondata(null, dat, final);
2004
+ });
2005
+ this.compression = 8;
2006
+ this.flag = dbf(opts.level);
2007
+ }
2008
+ ZipDeflate.prototype.process = function (chunk, final) {
2009
+ try {
2010
+ this.d.push(chunk, final);
2011
+ }
2012
+ catch (e) {
2013
+ this.ondata(e, null, final);
2014
+ }
2015
+ };
2016
+ /**
2017
+ * Pushes a chunk to be deflated
2018
+ * @param chunk The chunk to push
2019
+ * @param final Whether this is the last chunk
2020
+ */
2021
+ ZipDeflate.prototype.push = function (chunk, final) {
2022
+ ZipPassThrough.prototype.push.call(this, chunk, final);
2023
+ };
2024
+ return ZipDeflate;
2025
+ }());
2026
+ export { ZipDeflate };
2027
+ /**
2028
+ * Asynchronous streaming DEFLATE compression for ZIP archives
2029
+ */
2030
+ var AsyncZipDeflate = /*#__PURE__*/ (function () {
2031
+ /**
2032
+ * Creates an asynchronous DEFLATE stream that can be added to ZIP archives
2033
+ * @param filename The filename to associate with this data stream
2034
+ * @param opts The compression options
2035
+ */
2036
+ function AsyncZipDeflate(filename, opts) {
2037
+ var _this = this;
2038
+ if (!opts)
2039
+ opts = {};
2040
+ ZipPassThrough.call(this, filename);
2041
+ this.d = new AsyncDeflate(opts, function (err, dat, final) {
2042
+ _this.ondata(err, dat, final);
2043
+ });
2044
+ this.compression = 8;
2045
+ this.flag = dbf(opts.level);
2046
+ this.terminate = this.d.terminate;
2047
+ }
2048
+ AsyncZipDeflate.prototype.process = function (chunk, final) {
2049
+ this.d.push(chunk, final);
2050
+ };
2051
+ /**
2052
+ * Pushes a chunk to be deflated
2053
+ * @param chunk The chunk to push
2054
+ * @param final Whether this is the last chunk
2055
+ */
2056
+ AsyncZipDeflate.prototype.push = function (chunk, final) {
2057
+ ZipPassThrough.prototype.push.call(this, chunk, final);
2058
+ };
2059
+ return AsyncZipDeflate;
2060
+ }());
2061
+ export { AsyncZipDeflate };
2062
+ // TODO: Better tree shaking
2063
+ /**
2064
+ * A zippable archive to which files can incrementally be added
2065
+ */
2066
+ var Zip = /*#__PURE__*/ (function () {
2067
+ /**
2068
+ * Creates an empty ZIP archive to which files can be added
2069
+ * @param cb The callback to call whenever data for the generated ZIP archive
2070
+ * is available
2071
+ */
2072
+ function Zip(cb) {
2073
+ this.ondata = cb;
2074
+ this.u = [];
2075
+ this.d = 1;
2076
+ }
2077
+ /**
2078
+ * Adds a file to the ZIP archive
2079
+ * @param file The file stream to add
2080
+ */
2081
+ Zip.prototype.add = function (file) {
2082
+ var _this = this;
2083
+ if (!this.ondata)
2084
+ err(5);
2085
+ // finishing or finished
2086
+ if (this.d & 2)
2087
+ this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);
2088
+ else {
2089
+ var f = strToU8(file.filename), fl_1 = f.length;
2090
+ var com = file.comment, o = com && strToU8(com);
2091
+ var u = fl_1 != file.filename.length || (o && (com.length != o.length));
2092
+ var hl_1 = fl_1 + exfl(file.extra) + 30;
2093
+ if (fl_1 > 65535)
2094
+ this.ondata(err(11, 0, 1), null, false);
2095
+ var header = new u8(hl_1);
2096
+ wzh(header, 0, file, f, u, -1);
2097
+ var chks_1 = [header];
2098
+ var pAll_1 = function () {
2099
+ for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {
2100
+ var chk = chks_2[_i];
2101
+ _this.ondata(null, chk, false);
2102
+ }
2103
+ chks_1 = [];
2104
+ };
2105
+ var tr_1 = this.d;
2106
+ this.d = 0;
2107
+ var ind_1 = this.u.length;
2108
+ var uf_1 = mrg(file, {
2109
+ f: f,
2110
+ u: u,
2111
+ o: o,
2112
+ t: function () {
2113
+ if (file.terminate)
2114
+ file.terminate();
2115
+ },
2116
+ r: function () {
2117
+ pAll_1();
2118
+ if (tr_1) {
2119
+ var nxt = _this.u[ind_1 + 1];
2120
+ if (nxt)
2121
+ nxt.r();
2122
+ else
2123
+ _this.d = 1;
2124
+ }
2125
+ tr_1 = 1;
2126
+ }
2127
+ });
2128
+ var cl_1 = 0;
2129
+ file.ondata = function (err, dat, final) {
2130
+ if (err) {
2131
+ _this.ondata(err, dat, final);
2132
+ _this.terminate();
2133
+ }
2134
+ else {
2135
+ cl_1 += dat.length;
2136
+ chks_1.push(dat);
2137
+ if (final) {
2138
+ var dd = new u8(16);
2139
+ wbytes(dd, 0, 0x8074B50);
2140
+ wbytes(dd, 4, file.crc);
2141
+ wbytes(dd, 8, cl_1);
2142
+ wbytes(dd, 12, file.size);
2143
+ chks_1.push(dd);
2144
+ uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;
2145
+ if (tr_1)
2146
+ uf_1.r();
2147
+ tr_1 = 1;
2148
+ }
2149
+ else if (tr_1)
2150
+ pAll_1();
2151
+ }
2152
+ };
2153
+ this.u.push(uf_1);
2154
+ }
2155
+ };
2156
+ /**
2157
+ * Ends the process of adding files and prepares to emit the final chunks.
2158
+ * This *must* be called after adding all desired files for the resulting
2159
+ * ZIP file to work properly.
2160
+ */
2161
+ Zip.prototype.end = function () {
2162
+ var _this = this;
2163
+ if (this.d & 2) {
2164
+ this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);
2165
+ return;
2166
+ }
2167
+ if (this.d)
2168
+ this.e();
2169
+ else
2170
+ this.u.push({
2171
+ r: function () {
2172
+ if (!(_this.d & 1))
2173
+ return;
2174
+ _this.u.splice(-1, 1);
2175
+ _this.e();
2176
+ },
2177
+ t: function () { }
2178
+ });
2179
+ this.d = 3;
2180
+ };
2181
+ Zip.prototype.e = function () {
2182
+ var bt = 0, l = 0, tl = 0;
2183
+ for (var _i = 0, _a = this.u; _i < _a.length; _i++) {
2184
+ var f = _a[_i];
2185
+ tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);
2186
+ }
2187
+ var out = new u8(tl + 22);
2188
+ for (var _b = 0, _c = this.u; _b < _c.length; _b++) {
2189
+ var f = _c[_b];
2190
+ wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o);
2191
+ bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;
2192
+ }
2193
+ wzf(out, bt, this.u.length, tl, l);
2194
+ this.ondata(null, out, true);
2195
+ this.d = 2;
2196
+ };
2197
+ /**
2198
+ * A method to terminate any internal workers used by the stream. Subsequent
2199
+ * calls to add() will fail.
2200
+ */
2201
+ Zip.prototype.terminate = function () {
2202
+ for (var _i = 0, _a = this.u; _i < _a.length; _i++) {
2203
+ var f = _a[_i];
2204
+ f.t();
2205
+ }
2206
+ this.d = 2;
2207
+ };
2208
+ return Zip;
2209
+ }());
2210
+ export { Zip };
2211
+ export function zip(data, opts, cb) {
2212
+ if (!cb)
2213
+ cb = opts, opts = {};
2214
+ if (typeof cb != 'function')
2215
+ err(7);
2216
+ var r = {};
2217
+ fltn(data, '', r, opts);
2218
+ var k = Object.keys(r);
2219
+ var lft = k.length, o = 0, tot = 0;
2220
+ var slft = lft, files = new Array(lft);
2221
+ var term = [];
2222
+ var tAll = function () {
2223
+ for (var i = 0; i < term.length; ++i)
2224
+ term[i]();
2225
+ };
2226
+ var cbd = function (a, b) {
2227
+ mt(function () { cb(a, b); });
2228
+ };
2229
+ mt(function () { cbd = cb; });
2230
+ var cbf = function () {
2231
+ var out = new u8(tot + 22), oe = o, cdl = tot - o;
2232
+ tot = 0;
2233
+ for (var i = 0; i < slft; ++i) {
2234
+ var f = files[i];
2235
+ try {
2236
+ var l = f.c.length;
2237
+ wzh(out, tot, f, f.f, f.u, l);
2238
+ var badd = 30 + f.f.length + exfl(f.extra);
2239
+ var loc = tot + badd;
2240
+ out.set(f.c, loc);
2241
+ wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;
2242
+ }
2243
+ catch (e) {
2244
+ return cbd(e, null);
2245
+ }
2246
+ }
2247
+ wzf(out, o, files.length, cdl, oe);
2248
+ cbd(null, out);
2249
+ };
2250
+ if (!lft)
2251
+ cbf();
2252
+ var _loop_1 = function (i) {
2253
+ var fn = k[i];
2254
+ var _a = r[fn], file = _a[0], p = _a[1];
2255
+ var c = crc(), size = file.length;
2256
+ c.p(file);
2257
+ var f = strToU8(fn), s = f.length;
2258
+ var com = p.comment, m = com && strToU8(com), ms = m && m.length;
2259
+ var exl = exfl(p.extra);
2260
+ var compression = p.level == 0 ? 0 : 8;
2261
+ var cbl = function (e, d) {
2262
+ if (e) {
2263
+ tAll();
2264
+ cbd(e, null);
2265
+ }
2266
+ else {
2267
+ var l = d.length;
2268
+ files[i] = mrg(p, {
2269
+ size: size,
2270
+ crc: c.d(),
2271
+ c: d,
2272
+ f: f,
2273
+ m: m,
2274
+ u: s != fn.length || (m && (com.length != ms)),
2275
+ compression: compression
2276
+ });
2277
+ o += 30 + s + exl + l;
2278
+ tot += 76 + 2 * (s + exl) + (ms || 0) + l;
2279
+ if (!--lft)
2280
+ cbf();
2281
+ }
2282
+ };
2283
+ if (s > 65535)
2284
+ cbl(err(11, 0, 1), null);
2285
+ if (!compression)
2286
+ cbl(null, file);
2287
+ else if (size < 160000) {
2288
+ try {
2289
+ cbl(null, deflateSync(file, p));
2290
+ }
2291
+ catch (e) {
2292
+ cbl(e, null);
2293
+ }
2294
+ }
2295
+ else
2296
+ term.push(deflate(file, p, cbl));
2297
+ };
2298
+ // Cannot use lft because it can decrease
2299
+ for (var i = 0; i < slft; ++i) {
2300
+ _loop_1(i);
2301
+ }
2302
+ return tAll;
2303
+ }
2304
+ /**
2305
+ * Synchronously creates a ZIP file. Prefer using `zip` for better performance
2306
+ * with more than one file.
2307
+ * @param data The directory structure for the ZIP archive
2308
+ * @param opts The main options, merged with per-file options
2309
+ * @returns The generated ZIP archive
2310
+ */
2311
+ export function zipSync(data, opts) {
2312
+ if (!opts)
2313
+ opts = {};
2314
+ var r = {};
2315
+ var files = [];
2316
+ fltn(data, '', r, opts);
2317
+ var o = 0;
2318
+ var tot = 0;
2319
+ for (var fn in r) {
2320
+ var _a = r[fn], file = _a[0], p = _a[1];
2321
+ var compression = p.level == 0 ? 0 : 8;
2322
+ var f = strToU8(fn), s = f.length;
2323
+ var com = p.comment, m = com && strToU8(com), ms = m && m.length;
2324
+ var exl = exfl(p.extra);
2325
+ if (s > 65535)
2326
+ err(11);
2327
+ var d = compression ? deflateSync(file, p) : file, l = d.length;
2328
+ var c = crc();
2329
+ c.p(file);
2330
+ files.push(mrg(p, {
2331
+ size: file.length,
2332
+ crc: c.d(),
2333
+ c: d,
2334
+ f: f,
2335
+ m: m,
2336
+ u: s != fn.length || (m && (com.length != ms)),
2337
+ o: o,
2338
+ compression: compression
2339
+ }));
2340
+ o += 30 + s + exl + l;
2341
+ tot += 76 + 2 * (s + exl) + (ms || 0) + l;
2342
+ }
2343
+ var out = new u8(tot + 22), oe = o, cdl = tot - o;
2344
+ for (var i = 0; i < files.length; ++i) {
2345
+ var f = files[i];
2346
+ wzh(out, f.o, f, f.f, f.u, f.c.length);
2347
+ var badd = 30 + f.f.length + exfl(f.extra);
2348
+ out.set(f.c, f.o + badd);
2349
+ wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);
2350
+ }
2351
+ wzf(out, o, files.length, cdl, oe);
2352
+ return out;
2353
+ }
2354
+ /**
2355
+ * Streaming pass-through decompression for ZIP archives
2356
+ */
2357
+ var UnzipPassThrough = /*#__PURE__*/ (function () {
2358
+ function UnzipPassThrough() {
2359
+ }
2360
+ UnzipPassThrough.prototype.push = function (chunk, final) {
2361
+ // same as ZipPassThrough: cast to retain Buffer ergonomics
2362
+ this.ondata(null, chunk, final);
2363
+ };
2364
+ UnzipPassThrough.compression = 0;
2365
+ return UnzipPassThrough;
2366
+ }());
2367
+ export { UnzipPassThrough };
2368
+ /**
2369
+ * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for
2370
+ * better performance.
2371
+ */
2372
+ var UnzipInflate = /*#__PURE__*/ (function () {
2373
+ /**
2374
+ * Creates a DEFLATE decompression that can be used in ZIP archives
2375
+ */
2376
+ function UnzipInflate() {
2377
+ var _this = this;
2378
+ this.i = new Inflate(function (dat, final) {
2379
+ _this.ondata(null, dat, final);
2380
+ });
2381
+ }
2382
+ UnzipInflate.prototype.push = function (chunk, final) {
2383
+ try {
2384
+ this.i.push(chunk, final);
2385
+ }
2386
+ catch (e) {
2387
+ this.ondata(e, null, final);
2388
+ }
2389
+ };
2390
+ UnzipInflate.compression = 8;
2391
+ return UnzipInflate;
2392
+ }());
2393
+ export { UnzipInflate };
2394
+ /**
2395
+ * Asynchronous streaming DEFLATE decompression for ZIP archives
2396
+ */
2397
+ var AsyncUnzipInflate = /*#__PURE__*/ (function () {
2398
+ /**
2399
+ * Creates a DEFLATE decompression that can be used in ZIP archives
2400
+ */
2401
+ function AsyncUnzipInflate(_, sz) {
2402
+ var _this = this;
2403
+ if (sz < 320000) {
2404
+ this.i = new Inflate(function (dat, final) {
2405
+ _this.ondata(null, dat, final);
2406
+ });
2407
+ }
2408
+ else {
2409
+ this.i = new AsyncInflate(function (err, dat, final) {
2410
+ _this.ondata(err, dat, final);
2411
+ });
2412
+ this.terminate = this.i.terminate;
2413
+ }
2414
+ }
2415
+ AsyncUnzipInflate.prototype.push = function (chunk, final) {
2416
+ if (this.i.terminate)
2417
+ chunk = slc(chunk, 0);
2418
+ this.i.push(chunk, final);
2419
+ };
2420
+ AsyncUnzipInflate.compression = 8;
2421
+ return AsyncUnzipInflate;
2422
+ }());
2423
+ export { AsyncUnzipInflate };
2424
+ /**
2425
+ * A ZIP archive decompression stream that emits files as they are discovered
2426
+ */
2427
+ var Unzip = /*#__PURE__*/ (function () {
2428
+ /**
2429
+ * Creates a ZIP decompression stream
2430
+ * @param cb The callback to call whenever a file in the ZIP archive is found
2431
+ */
2432
+ function Unzip(cb) {
2433
+ this.onfile = cb;
2434
+ this.k = [];
2435
+ this.o = {
2436
+ 0: UnzipPassThrough
2437
+ };
2438
+ this.p = et;
2439
+ }
2440
+ /**
2441
+ * Pushes a chunk to be unzipped
2442
+ * @param chunk The chunk to push
2443
+ * @param final Whether this is the last chunk
2444
+ */
2445
+ Unzip.prototype.push = function (chunk, final) {
2446
+ var _this = this;
2447
+ if (!this.onfile)
2448
+ err(5);
2449
+ if (!this.p)
2450
+ err(4);
2451
+ if (this.c > 0) {
2452
+ var len = Math.min(this.c, chunk.length);
2453
+ var toAdd = chunk.subarray(0, len);
2454
+ this.c -= len;
2455
+ if (this.d)
2456
+ this.d.push(toAdd, !this.c);
2457
+ else
2458
+ this.k[0].push(toAdd);
2459
+ chunk = chunk.subarray(len);
2460
+ if (chunk.length)
2461
+ return this.push(chunk, final);
2462
+ }
2463
+ else {
2464
+ var f = 0, i = 0, is = void 0, buf = void 0;
2465
+ if (!this.p.length)
2466
+ buf = chunk;
2467
+ else if (!chunk.length)
2468
+ buf = this.p;
2469
+ else {
2470
+ buf = new u8(this.p.length + chunk.length);
2471
+ buf.set(this.p), buf.set(chunk, this.p.length);
2472
+ }
2473
+ var l = buf.length, oc = this.c, add = oc && this.d;
2474
+ var _loop_2 = function () {
2475
+ var sig = b4(buf, i);
2476
+ if (sig == 0x4034B50) {
2477
+ f = 1, is = i;
2478
+ this_1.d = null;
2479
+ this_1.c = 0;
2480
+ var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);
2481
+ if (l > i + 30 + fnl + es) {
2482
+ var chks_3 = [];
2483
+ this_1.k.unshift(chks_3);
2484
+ f = 2;
2485
+ var lsc = b4(buf, i + 18), lsu = b4(buf, i + 22);
2486
+ var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);
2487
+ var _a = z64hs(buf, i, es, 2, lsc, lsu, 0), sc_1 = _a[0], su_1 = _a[1], z64 = _a[3];
2488
+ if (dd)
2489
+ sc_1 = -1 - z64;
2490
+ i += es;
2491
+ this_1.c = sc_1;
2492
+ var d_1;
2493
+ var file_1 = {
2494
+ name: fn_1,
2495
+ compression: cmp_1,
2496
+ start: function () {
2497
+ if (!file_1.ondata)
2498
+ err(5);
2499
+ if (!sc_1)
2500
+ file_1.ondata(null, et, true);
2501
+ else {
2502
+ var ctr = _this.o[cmp_1];
2503
+ if (!ctr)
2504
+ file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);
2505
+ d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);
2506
+ d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };
2507
+ for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {
2508
+ var dat = chks_4[_i];
2509
+ d_1.push(dat, false);
2510
+ }
2511
+ if (_this.k[0] == chks_3 && _this.c)
2512
+ _this.d = d_1;
2513
+ else
2514
+ d_1.push(et, true);
2515
+ }
2516
+ },
2517
+ terminate: function () {
2518
+ if (d_1 && d_1.terminate)
2519
+ d_1.terminate();
2520
+ }
2521
+ };
2522
+ if (sc_1 >= 0)
2523
+ file_1.size = sc_1, file_1.originalSize = su_1;
2524
+ this_1.onfile(file_1);
2525
+ }
2526
+ return "break";
2527
+ }
2528
+ else if (oc) {
2529
+ if (sig == 0x8074B50) {
2530
+ is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;
2531
+ return "break";
2532
+ }
2533
+ else if (sig == 0x2014B50) {
2534
+ is = i -= 4, f = 3, this_1.c = 0;
2535
+ return "break";
2536
+ }
2537
+ }
2538
+ };
2539
+ var this_1 = this;
2540
+ for (; i < l - 4; ++i) {
2541
+ var state_1 = _loop_2();
2542
+ if (state_1 === "break")
2543
+ break;
2544
+ }
2545
+ this.p = et;
2546
+ if (oc < 0) {
2547
+ var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);
2548
+ if (add)
2549
+ add.push(dat, !!f);
2550
+ else
2551
+ this.k[+(f == 2)].push(dat);
2552
+ }
2553
+ if (f & 2)
2554
+ return this.push(buf.subarray(i), final);
2555
+ this.p = buf.subarray(i);
2556
+ }
2557
+ if (final) {
2558
+ if (this.c)
2559
+ err(13);
2560
+ this.p = null;
2561
+ }
2562
+ };
2563
+ /**
2564
+ * Registers a decoder with the stream, allowing for files compressed with
2565
+ * the compression type provided to be expanded correctly
2566
+ * @param decoder The decoder constructor
2567
+ */
2568
+ Unzip.prototype.register = function (decoder) {
2569
+ this.o[decoder.compression] = decoder;
2570
+ };
2571
+ return Unzip;
2572
+ }());
2573
+ export { Unzip };
2574
+ var mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };
2575
+ export function unzip(data, opts, cb) {
2576
+ if (!cb)
2577
+ cb = opts, opts = {};
2578
+ if (typeof cb != 'function')
2579
+ err(7);
2580
+ var term = [];
2581
+ var tAll = function () {
2582
+ for (var i = 0; i < term.length; ++i)
2583
+ term[i]();
2584
+ };
2585
+ var files = {};
2586
+ var cbd = function (a, b) {
2587
+ mt(function () { cb(a, b); });
2588
+ };
2589
+ mt(function () { cbd = cb; });
2590
+ var e = data.length - 22;
2591
+ for (; b4(data, e) != 0x6054B50; --e) {
2592
+ if (!e || data.length - e > 65558) {
2593
+ cbd(err(13, 0, 1), null);
2594
+ return tAll;
2595
+ }
2596
+ }
2597
+ ;
2598
+ var lft = b2(data, e + 8);
2599
+ if (lft) {
2600
+ var c = lft;
2601
+ var o = b4(data, e + 16);
2602
+ var z = b4(data, e - 20) == 0x7064B50;
2603
+ if (z) {
2604
+ var ze = b4(data, e - 12);
2605
+ z = b4(data, ze) == 0x6064B50;
2606
+ if (z) {
2607
+ c = lft = b4(data, ze + 32);
2608
+ o = b4(data, ze + 48);
2609
+ }
2610
+ }
2611
+ var fltr = opts && opts.filter;
2612
+ var _loop_3 = function (i) {
2613
+ var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);
2614
+ o = no;
2615
+ var cbl = function (e, d) {
2616
+ if (e) {
2617
+ tAll();
2618
+ cbd(e, null);
2619
+ }
2620
+ else {
2621
+ if (d)
2622
+ files[fn] = d;
2623
+ if (!--lft)
2624
+ cbd(null, files);
2625
+ }
2626
+ };
2627
+ if (!fltr || fltr({
2628
+ name: fn,
2629
+ size: sc,
2630
+ originalSize: su,
2631
+ compression: c_1
2632
+ })) {
2633
+ if (!c_1)
2634
+ cbl(null, slc(data, b, b + sc));
2635
+ else if (c_1 == 8) {
2636
+ var infl = data.subarray(b, b + sc);
2637
+ // Synchronously decompress under 512KB, or barely-compressed data
2638
+ if (su < 524288 || sc > 0.8 * su) {
2639
+ try {
2640
+ cbl(null, inflateSync(infl, { out: new u8(su) }));
2641
+ }
2642
+ catch (e) {
2643
+ cbl(e, null);
2644
+ }
2645
+ }
2646
+ else
2647
+ term.push(inflate(infl, { size: su }, cbl));
2648
+ }
2649
+ else
2650
+ cbl(err(14, 'unknown compression type ' + c_1, 1), null);
2651
+ }
2652
+ else
2653
+ cbl(null, null);
2654
+ };
2655
+ for (var i = 0; i < c; ++i) {
2656
+ _loop_3(i);
2657
+ }
2658
+ }
2659
+ else
2660
+ cbd(null, {});
2661
+ return tAll;
2662
+ }
2663
+ /**
2664
+ * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better
2665
+ * performance with more than one file.
2666
+ * @param data The raw compressed ZIP file
2667
+ * @param opts The ZIP extraction options
2668
+ * @returns The decompressed files
2669
+ */
2670
+ export function unzipSync(data, opts) {
2671
+ var files = {};
2672
+ var e = data.length - 22;
2673
+ for (; b4(data, e) != 0x6054B50; --e) {
2674
+ if (!e || data.length - e > 65558)
2675
+ err(13);
2676
+ }
2677
+ ;
2678
+ var c = b2(data, e + 8);
2679
+ if (!c)
2680
+ return {};
2681
+ var o = b4(data, e + 16);
2682
+ var z = b4(data, e - 20) == 0x7064B50;
2683
+ if (z) {
2684
+ var ze = b4(data, e - 12);
2685
+ z = b4(data, ze) == 0x6064B50;
2686
+ if (z) {
2687
+ c = b4(data, ze + 32);
2688
+ o = b4(data, ze + 48);
2689
+ }
2690
+ }
2691
+ var fltr = opts && opts.filter;
2692
+ for (var i = 0; i < c; ++i) {
2693
+ var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);
2694
+ o = no;
2695
+ if (!fltr || fltr({
2696
+ name: fn,
2697
+ size: sc,
2698
+ originalSize: su,
2699
+ compression: c_2
2700
+ })) {
2701
+ if (!c_2)
2702
+ files[fn] = slc(data, b, b + sc);
2703
+ else if (c_2 == 8)
2704
+ files[fn] = inflateSync(data.subarray(b, b + sc), { out: new u8(su) });
2705
+ else
2706
+ err(14, 'unknown compression type ' + c_2);
2707
+ }
2708
+ }
2709
+ return files;
2710
+ }