rebrowser-playwright-core 1.52.0 → 1.64.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/ThirdPartyNotices.txt +7 -1554
  2. package/bin/install_webkit_wsl.ps1 +33 -0
  3. package/bin/reinstall_chrome_beta_linux.sh +1 -1
  4. package/bin/reinstall_chrome_beta_mac.sh +1 -1
  5. package/bin/reinstall_chrome_stable_linux.sh +1 -1
  6. package/bin/reinstall_chrome_stable_mac.sh +1 -1
  7. package/bin/reinstall_msedge_beta_linux.sh +1 -1
  8. package/bin/reinstall_msedge_beta_mac.sh +1 -1
  9. package/bin/reinstall_msedge_dev_linux.sh +1 -1
  10. package/bin/reinstall_msedge_dev_mac.sh +1 -1
  11. package/bin/reinstall_msedge_stable_linux.sh +1 -1
  12. package/bin/reinstall_msedge_stable_mac.sh +1 -1
  13. package/browsers.json +16 -44
  14. package/cli.js +5 -1
  15. package/index.js +2 -17
  16. package/lib/bootstrap.js +149 -0
  17. package/lib/coreBundle.js +78218 -0
  18. package/lib/entry/cliDaemon.js +5 -0
  19. package/lib/entry/dashboardApp.js +3 -0
  20. package/lib/entry/mcp.js +10 -0
  21. package/lib/entry/oopBrowserDownload.js +3 -0
  22. package/lib/{server/deviceDescriptors.js → package.js} +18 -7
  23. package/lib/server/electron/loader.js +108 -14
  24. package/lib/serverRegistry.js +1939 -0
  25. package/lib/serverRegistry.js.LICENSE +65 -0
  26. package/lib/tools/cli-client/channelSessions.js +141 -0
  27. package/lib/tools/cli-client/cli.js +7 -0
  28. package/lib/tools/cli-client/help.json +808 -0
  29. package/lib/tools/cli-client/minimist.js +128 -0
  30. package/lib/tools/cli-client/output.js +352 -0
  31. package/lib/tools/cli-client/program.js +422 -0
  32. package/lib/tools/cli-client/registry.js +180 -0
  33. package/lib/tools/cli-client/session.js +261 -0
  34. package/lib/tools/dashboard/appIcon.png +0 -0
  35. package/lib/tools/skills/playwright-cli/SKILL.md +493 -0
  36. package/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
  37. package/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
  38. package/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
  39. package/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
  40. package/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
  41. package/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
  42. package/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
  43. package/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
  44. package/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
  45. package/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
  46. package/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
  47. package/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
  48. package/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
  49. package/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
  50. package/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
  51. package/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
  52. package/lib/tools/skills/playwright-trace/SKILL.md +174 -0
  53. package/lib/tools/utils/extension.js +112 -0
  54. package/lib/tools/utils/socketConnection.js +108 -0
  55. package/lib/utilsBundle.js +86038 -66
  56. package/lib/utilsBundle.js.LICENSE +1890 -0
  57. package/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
  58. package/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
  59. package/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  60. package/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  61. package/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  62. package/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  63. package/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
  64. package/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
  65. package/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  66. package/lib/vite/dashboard/index.html +29 -0
  67. package/lib/vite/dashboard/playwright-logo.svg +24 -0
  68. package/lib/vite/htmlReport/index.html +2 -61
  69. package/lib/vite/htmlReport/report.css +2 -0
  70. package/lib/vite/htmlReport/report.js +32 -0
  71. package/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  72. package/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js +32 -0
  73. package/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
  74. package/lib/vite/recorder/assets/index-Cn0mmDuv.js +129 -0
  75. package/lib/vite/recorder/index.html +3 -3
  76. package/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js +32 -0
  77. package/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +184 -0
  78. package/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  79. package/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js +7 -0
  80. package/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  81. package/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
  82. package/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  83. package/lib/vite/traceViewer/index.html +9 -8
  84. package/lib/vite/traceViewer/index.oNry3Hjv.js +1 -0
  85. package/lib/vite/traceViewer/manifest.webmanifest +16 -0
  86. package/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  87. package/lib/vite/traceViewer/snapshot.html +4 -15
  88. package/lib/vite/traceViewer/sw.bundle.js +4 -3
  89. package/lib/vite/traceViewer/uiMode.CYwC_gH1.js +5 -0
  90. package/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
  91. package/lib/vite/traceViewer/uiMode.html +6 -5
  92. package/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  93. package/lib/webp_codec.LICENSE +173 -0
  94. package/lib/webp_codec.wasm +0 -0
  95. package/lib/{utilsBundleImpl/xdg-open → xdg-open} +338 -137
  96. package/package.json +6 -16
  97. package/types/protocol.d.ts +10495 -8030
  98. package/types/structs.d.ts +8 -1
  99. package/types/types.d.ts +9256 -4825
  100. package/lib/androidServerImpl.js +0 -63
  101. package/lib/browserServerImpl.js +0 -88
  102. package/lib/cli/driver.js +0 -97
  103. package/lib/cli/program.js +0 -567
  104. package/lib/cli/programWithTestStub.js +0 -74
  105. package/lib/client/accessibility.js +0 -49
  106. package/lib/client/android.js +0 -365
  107. package/lib/client/api.js +0 -137
  108. package/lib/client/artifact.js +0 -79
  109. package/lib/client/browser.js +0 -136
  110. package/lib/client/browserContext.js +0 -539
  111. package/lib/client/browserType.js +0 -193
  112. package/lib/client/cdpSession.js +0 -51
  113. package/lib/client/channelOwner.js +0 -205
  114. package/lib/client/clientHelper.js +0 -64
  115. package/lib/client/clientInstrumentation.js +0 -55
  116. package/lib/client/clientStackTrace.js +0 -69
  117. package/lib/client/clock.js +0 -68
  118. package/lib/client/connection.js +0 -318
  119. package/lib/client/consoleMessage.js +0 -55
  120. package/lib/client/coverage.js +0 -44
  121. package/lib/client/dialog.js +0 -56
  122. package/lib/client/download.js +0 -62
  123. package/lib/client/electron.js +0 -133
  124. package/lib/client/elementHandle.js +0 -284
  125. package/lib/client/errors.js +0 -77
  126. package/lib/client/eventEmitter.js +0 -314
  127. package/lib/client/events.js +0 -98
  128. package/lib/client/fetch.js +0 -367
  129. package/lib/client/fileChooser.js +0 -46
  130. package/lib/client/fileUtils.js +0 -34
  131. package/lib/client/frame.js +0 -386
  132. package/lib/client/harRouter.js +0 -87
  133. package/lib/client/input.js +0 -82
  134. package/lib/client/jsHandle.js +0 -105
  135. package/lib/client/jsonPipe.js +0 -39
  136. package/lib/client/localUtils.js +0 -61
  137. package/lib/client/locator.js +0 -362
  138. package/lib/client/network.js +0 -751
  139. package/lib/client/page.js +0 -709
  140. package/lib/client/platform.js +0 -74
  141. package/lib/client/playwright.js +0 -85
  142. package/lib/client/selectors.js +0 -75
  143. package/lib/client/stream.js +0 -39
  144. package/lib/client/timeoutSettings.js +0 -75
  145. package/lib/client/tracing.js +0 -114
  146. package/lib/client/types.js +0 -28
  147. package/lib/client/video.js +0 -59
  148. package/lib/client/waiter.js +0 -142
  149. package/lib/client/webError.js +0 -39
  150. package/lib/client/webSocket.js +0 -111
  151. package/lib/client/worker.js +0 -63
  152. package/lib/client/writableStream.js +0 -39
  153. package/lib/generated/clockSource.js +0 -28
  154. package/lib/generated/consoleApiSource.js +0 -28
  155. package/lib/generated/injectedScriptSource.js +0 -28
  156. package/lib/generated/pollingRecorderSource.js +0 -28
  157. package/lib/generated/utilityScriptSource.js +0 -28
  158. package/lib/generated/webSocketMockSource.js +0 -378
  159. package/lib/inProcessFactory.js +0 -59
  160. package/lib/inprocess.js +0 -3
  161. package/lib/outofprocess.js +0 -78
  162. package/lib/protocol/debug.js +0 -211
  163. package/lib/protocol/serializers.js +0 -192
  164. package/lib/protocol/validator.js +0 -2825
  165. package/lib/protocol/validatorPrimitives.js +0 -179
  166. package/lib/remote/playwrightConnection.js +0 -266
  167. package/lib/remote/playwrightServer.js +0 -139
  168. package/lib/server/accessibility.js +0 -69
  169. package/lib/server/android/android.js +0 -451
  170. package/lib/server/android/backendAdb.js +0 -179
  171. package/lib/server/artifact.js +0 -127
  172. package/lib/server/bidi/bidiBrowser.js +0 -380
  173. package/lib/server/bidi/bidiChromium.js +0 -152
  174. package/lib/server/bidi/bidiConnection.js +0 -187
  175. package/lib/server/bidi/bidiExecutionContext.js +0 -220
  176. package/lib/server/bidi/bidiFirefox.js +0 -112
  177. package/lib/server/bidi/bidiInput.js +0 -146
  178. package/lib/server/bidi/bidiNetworkManager.js +0 -320
  179. package/lib/server/bidi/bidiOverCdp.js +0 -102
  180. package/lib/server/bidi/bidiPage.js +0 -530
  181. package/lib/server/bidi/bidiPdf.js +0 -106
  182. package/lib/server/bidi/third_party/bidiCommands.d.js +0 -22
  183. package/lib/server/bidi/third_party/bidiDeserializer.js +0 -98
  184. package/lib/server/bidi/third_party/bidiKeyboard.js +0 -256
  185. package/lib/server/bidi/third_party/bidiProtocol.js +0 -152
  186. package/lib/server/bidi/third_party/bidiSerializer.js +0 -148
  187. package/lib/server/bidi/third_party/firefoxPrefs.js +0 -259
  188. package/lib/server/browser.js +0 -140
  189. package/lib/server/browserContext.js +0 -650
  190. package/lib/server/browserType.js +0 -326
  191. package/lib/server/callLog.js +0 -82
  192. package/lib/server/chromium/chromium.js +0 -376
  193. package/lib/server/chromium/chromiumSwitches.js +0 -101
  194. package/lib/server/chromium/crAccessibility.js +0 -263
  195. package/lib/server/chromium/crBrowser.js +0 -498
  196. package/lib/server/chromium/crConnection.js +0 -324
  197. package/lib/server/chromium/crCoverage.js +0 -232
  198. package/lib/server/chromium/crDevTools.js +0 -117
  199. package/lib/server/chromium/crDragDrop.js +0 -126
  200. package/lib/server/chromium/crExecutionContext.js +0 -145
  201. package/lib/server/chromium/crInput.js +0 -184
  202. package/lib/server/chromium/crNetworkManager.js +0 -666
  203. package/lib/server/chromium/crPage.js +0 -1055
  204. package/lib/server/chromium/crPdf.js +0 -121
  205. package/lib/server/chromium/crProtocolHelper.js +0 -145
  206. package/lib/server/chromium/crServiceWorker.js +0 -130
  207. package/lib/server/chromium/defaultFontFamilies.js +0 -162
  208. package/lib/server/chromium/protocol.d.js +0 -16
  209. package/lib/server/chromium/videoRecorder.js +0 -121
  210. package/lib/server/clock.js +0 -137
  211. package/lib/server/codegen/csharp.js +0 -329
  212. package/lib/server/codegen/java.js +0 -270
  213. package/lib/server/codegen/javascript.js +0 -268
  214. package/lib/server/codegen/jsonl.js +0 -51
  215. package/lib/server/codegen/language.js +0 -111
  216. package/lib/server/codegen/languages.js +0 -68
  217. package/lib/server/codegen/python.js +0 -277
  218. package/lib/server/codegen/types.js +0 -16
  219. package/lib/server/console.js +0 -53
  220. package/lib/server/cookieStore.js +0 -204
  221. package/lib/server/debugController.js +0 -185
  222. package/lib/server/debugger.js +0 -136
  223. package/lib/server/deviceDescriptorsSource.json +0 -1669
  224. package/lib/server/dialog.js +0 -72
  225. package/lib/server/dispatchers/androidDispatcher.js +0 -293
  226. package/lib/server/dispatchers/artifactDispatcher.js +0 -118
  227. package/lib/server/dispatchers/browserContextDispatcher.js +0 -328
  228. package/lib/server/dispatchers/browserDispatcher.js +0 -151
  229. package/lib/server/dispatchers/browserTypeDispatcher.js +0 -55
  230. package/lib/server/dispatchers/cdpSessionDispatcher.js +0 -44
  231. package/lib/server/dispatchers/debugControllerDispatcher.js +0 -87
  232. package/lib/server/dispatchers/dialogDispatcher.js +0 -47
  233. package/lib/server/dispatchers/dispatcher.js +0 -346
  234. package/lib/server/dispatchers/electronDispatcher.js +0 -90
  235. package/lib/server/dispatchers/elementHandlerDispatcher.js +0 -191
  236. package/lib/server/dispatchers/frameDispatcher.js +0 -224
  237. package/lib/server/dispatchers/jsHandleDispatcher.js +0 -80
  238. package/lib/server/dispatchers/jsonPipeDispatcher.js +0 -58
  239. package/lib/server/dispatchers/localUtilsDispatcher.js +0 -155
  240. package/lib/server/dispatchers/networkDispatchers.js +0 -204
  241. package/lib/server/dispatchers/pageDispatcher.js +0 -328
  242. package/lib/server/dispatchers/playwrightDispatcher.js +0 -100
  243. package/lib/server/dispatchers/selectorsDispatcher.js +0 -40
  244. package/lib/server/dispatchers/streamDispatcher.js +0 -60
  245. package/lib/server/dispatchers/tracingDispatcher.js +0 -59
  246. package/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -154
  247. package/lib/server/dispatchers/writableStreamDispatcher.js +0 -73
  248. package/lib/server/dom.js +0 -869
  249. package/lib/server/download.js +0 -70
  250. package/lib/server/electron/electron.js +0 -277
  251. package/lib/server/errors.js +0 -69
  252. package/lib/server/fetch.js +0 -640
  253. package/lib/server/fileChooser.js +0 -43
  254. package/lib/server/fileUploadUtils.js +0 -84
  255. package/lib/server/firefox/ffAccessibility.js +0 -238
  256. package/lib/server/firefox/ffBrowser.js +0 -404
  257. package/lib/server/firefox/ffConnection.js +0 -147
  258. package/lib/server/firefox/ffExecutionContext.js +0 -149
  259. package/lib/server/firefox/ffInput.js +0 -159
  260. package/lib/server/firefox/ffNetworkManager.js +0 -254
  261. package/lib/server/firefox/ffPage.js +0 -501
  262. package/lib/server/firefox/firefox.js +0 -106
  263. package/lib/server/firefox/protocol.d.js +0 -16
  264. package/lib/server/formData.js +0 -147
  265. package/lib/server/frameSelectors.js +0 -137
  266. package/lib/server/frames.js +0 -1555
  267. package/lib/server/har/harRecorder.js +0 -147
  268. package/lib/server/har/harTracer.js +0 -606
  269. package/lib/server/harBackend.js +0 -157
  270. package/lib/server/helper.js +0 -100
  271. package/lib/server/index.js +0 -61
  272. package/lib/server/input.js +0 -280
  273. package/lib/server/instrumentation.js +0 -75
  274. package/lib/server/javascript.js +0 -299
  275. package/lib/server/launchApp.js +0 -110
  276. package/lib/server/localUtils.js +0 -211
  277. package/lib/server/macEditingCommands.js +0 -143
  278. package/lib/server/network.js +0 -583
  279. package/lib/server/page.js +0 -790
  280. package/lib/server/pageBinding.js +0 -88
  281. package/lib/server/pipeTransport.js +0 -89
  282. package/lib/server/playwright.js +0 -81
  283. package/lib/server/progress.js +0 -104
  284. package/lib/server/protocolError.js +0 -52
  285. package/lib/server/recorder/chat.js +0 -161
  286. package/lib/server/recorder/contextRecorder.js +0 -286
  287. package/lib/server/recorder/recorderApp.js +0 -184
  288. package/lib/server/recorder/recorderCollection.js +0 -116
  289. package/lib/server/recorder/recorderFrontend.js +0 -16
  290. package/lib/server/recorder/recorderRunner.js +0 -135
  291. package/lib/server/recorder/recorderUtils.js +0 -100
  292. package/lib/server/recorder/throttledFile.js +0 -57
  293. package/lib/server/recorder.js +0 -360
  294. package/lib/server/registry/browserFetcher.js +0 -175
  295. package/lib/server/registry/dependencies.js +0 -371
  296. package/lib/server/registry/index.js +0 -1271
  297. package/lib/server/registry/nativeDeps.js +0 -1105
  298. package/lib/server/registry/oopDownloadBrowserMain.js +0 -120
  299. package/lib/server/screenshotter.js +0 -332
  300. package/lib/server/selectors.js +0 -112
  301. package/lib/server/socksClientCertificatesInterceptor.js +0 -321
  302. package/lib/server/socksInterceptor.js +0 -95
  303. package/lib/server/storageScript.js +0 -154
  304. package/lib/server/timeoutSettings.js +0 -89
  305. package/lib/server/trace/recorder/snapshotter.js +0 -143
  306. package/lib/server/trace/recorder/snapshotterInjected.js +0 -539
  307. package/lib/server/trace/recorder/tracing.js +0 -593
  308. package/lib/server/trace/test/inMemorySnapshotter.js +0 -87
  309. package/lib/server/trace/viewer/traceViewer.js +0 -249
  310. package/lib/server/transport.js +0 -183
  311. package/lib/server/types.js +0 -28
  312. package/lib/server/usKeyboardLayout.js +0 -145
  313. package/lib/server/utils/ascii.js +0 -44
  314. package/lib/server/utils/comparators.js +0 -161
  315. package/lib/server/utils/crypto.js +0 -216
  316. package/lib/server/utils/debug.js +0 -47
  317. package/lib/server/utils/debugLogger.js +0 -114
  318. package/lib/server/utils/env.js +0 -68
  319. package/lib/server/utils/eventsHelper.js +0 -39
  320. package/lib/server/utils/expectUtils.js +0 -38
  321. package/lib/server/utils/fileUtils.js +0 -191
  322. package/lib/server/utils/happyEyeballs.js +0 -207
  323. package/lib/server/utils/hostPlatform.js +0 -109
  324. package/lib/server/utils/httpServer.js +0 -218
  325. package/lib/server/utils/image_tools/colorUtils.js +0 -89
  326. package/lib/server/utils/image_tools/compare.js +0 -109
  327. package/lib/server/utils/image_tools/imageChannel.js +0 -78
  328. package/lib/server/utils/image_tools/stats.js +0 -102
  329. package/lib/server/utils/linuxUtils.js +0 -71
  330. package/lib/server/utils/network.js +0 -217
  331. package/lib/server/utils/nodePlatform.js +0 -148
  332. package/lib/server/utils/pipeTransport.js +0 -84
  333. package/lib/server/utils/processLauncher.js +0 -238
  334. package/lib/server/utils/profiler.js +0 -65
  335. package/lib/server/utils/socksProxy.js +0 -511
  336. package/lib/server/utils/spawnAsync.js +0 -41
  337. package/lib/server/utils/task.js +0 -51
  338. package/lib/server/utils/userAgent.js +0 -98
  339. package/lib/server/utils/wsServer.js +0 -132
  340. package/lib/server/utils/zipFile.js +0 -74
  341. package/lib/server/utils/zones.js +0 -57
  342. package/lib/server/webkit/protocol.d.js +0 -16
  343. package/lib/server/webkit/webkit.js +0 -100
  344. package/lib/server/webkit/wkAccessibility.js +0 -237
  345. package/lib/server/webkit/wkBrowser.js +0 -312
  346. package/lib/server/webkit/wkConnection.js +0 -149
  347. package/lib/server/webkit/wkExecutionContext.js +0 -153
  348. package/lib/server/webkit/wkInput.js +0 -181
  349. package/lib/server/webkit/wkInterceptableRequest.js +0 -169
  350. package/lib/server/webkit/wkPage.js +0 -1114
  351. package/lib/server/webkit/wkProvisionalPage.js +0 -83
  352. package/lib/server/webkit/wkWorkers.js +0 -104
  353. package/lib/third_party/pixelmatch.js +0 -255
  354. package/lib/utils/isomorphic/ariaSnapshot.js +0 -384
  355. package/lib/utils/isomorphic/assert.js +0 -31
  356. package/lib/utils/isomorphic/builtins.js +0 -90
  357. package/lib/utils/isomorphic/colors.js +0 -72
  358. package/lib/utils/isomorphic/cssParser.js +0 -246
  359. package/lib/utils/isomorphic/cssTokenizer.js +0 -1051
  360. package/lib/utils/isomorphic/headers.js +0 -53
  361. package/lib/utils/isomorphic/locatorGenerators.js +0 -655
  362. package/lib/utils/isomorphic/locatorParser.js +0 -176
  363. package/lib/utils/isomorphic/locatorUtils.js +0 -81
  364. package/lib/utils/isomorphic/manualPromise.js +0 -115
  365. package/lib/utils/isomorphic/mimeType.js +0 -460
  366. package/lib/utils/isomorphic/multimap.js +0 -81
  367. package/lib/utils/isomorphic/rtti.js +0 -43
  368. package/lib/utils/isomorphic/selectorParser.js +0 -387
  369. package/lib/utils/isomorphic/semaphore.js +0 -54
  370. package/lib/utils/isomorphic/stackTrace.js +0 -158
  371. package/lib/utils/isomorphic/stringUtils.js +0 -176
  372. package/lib/utils/isomorphic/time.js +0 -44
  373. package/lib/utils/isomorphic/timeoutRunner.js +0 -67
  374. package/lib/utils/isomorphic/traceUtils.js +0 -59
  375. package/lib/utils/isomorphic/types.js +0 -16
  376. package/lib/utils/isomorphic/urlMatch.js +0 -167
  377. package/lib/utils/isomorphic/utilityScriptSerializers.js +0 -248
  378. package/lib/utils.js +0 -101
  379. package/lib/utilsBundleImpl/index.js +0 -208
  380. package/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +0 -1
  381. package/lib/vite/recorder/assets/codeMirrorModule-DVQi6prl.js +0 -24
  382. package/lib/vite/recorder/assets/index-97EUAAbk.js +0 -184
  383. package/lib/vite/recorder/assets/index-eHBmevrY.css +0 -1
  384. package/lib/vite/traceViewer/assets/codeMirrorModule-DwAiTpyC.js +0 -24
  385. package/lib/vite/traceViewer/assets/defaultSettingsView-DkkRvn5X.js +0 -265
  386. package/lib/vite/traceViewer/assets/xtermModule-BoAIEibi.js +0 -9
  387. package/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +0 -1
  388. package/lib/vite/traceViewer/defaultSettingsView.QdHITyLI.css +0 -1
  389. package/lib/vite/traceViewer/index.CFOW-Ezb.css +0 -1
  390. package/lib/vite/traceViewer/index.DvtSwn6E.js +0 -2
  391. package/lib/vite/traceViewer/uiMode.BatfzHMG.css +0 -1
  392. package/lib/vite/traceViewer/uiMode.Sdytl9wc.js +0 -5
  393. package/lib/vite/traceViewer/xtermModule.Beg8tuEN.css +0 -32
  394. package/lib/zipBundle.js +0 -34
  395. package/lib/zipBundleImpl.js +0 -5
@@ -1,3 +1,4 @@
1
- var Gr=Object.defineProperty;var Vr=(n,t,e)=>t in n?Gr(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var N=(n,t,e)=>Vr(n,typeof t!="symbol"?t+"":t,e);function Zr(n,t){const e=new Array(t.length).fill(0);return new Array(t.length).fill(0).map((r,s)=>(i,a)=>{e[s]=i/a*t[s]*1e3,n(e.reduce((o,l)=>o+l,0),1e3)})}function Kr(n){var t,e,r,s,i,a,o,l,_;if(n=n??globalThis,!n.__playwright_builtins__){const f={setTimeout:(t=n.setTimeout)==null?void 0:t.bind(n),clearTimeout:(e=n.clearTimeout)==null?void 0:e.bind(n),setInterval:(r=n.setInterval)==null?void 0:r.bind(n),clearInterval:(s=n.clearInterval)==null?void 0:s.bind(n),requestAnimationFrame:(i=n.requestAnimationFrame)==null?void 0:i.bind(n),cancelAnimationFrame:(a=n.cancelAnimationFrame)==null?void 0:a.bind(n),requestIdleCallback:(o=n.requestIdleCallback)==null?void 0:o.bind(n),cancelIdleCallback:(l=n.cancelIdleCallback)==null?void 0:l.bind(n),performance:n.performance,eval:(_=n.eval)==null?void 0:_.bind(n),Intl:n.Intl,Date:n.Date,Map:n.Map,Set:n.Set};Object.defineProperty(n,"__playwright_builtins__",{value:f,configurable:!1,enumerable:!1,writable:!1})}return n.__playwright_builtins__}const J=Kr();J.setTimeout;J.clearTimeout;J.setInterval;J.clearInterval;J.requestAnimationFrame;J.cancelAnimationFrame;J.requestIdleCallback;J.cancelIdleCallback;J.performance;J.Intl;J.Date;const Xr=J.Map;J.Set;const Nn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function $r(n){return n.replace(/[&<>"']/ug,t=>Nn[t])}function Jr(n){return n.replace(/[&<]/ug,t=>Nn[t])}function Lt(n,t,e){return n.find((r,s)=>{if(s===n.length-1)return!0;const i=n[s+1];return Math.abs(t(r)-e)<Math.abs(t(i)-e)})}function Ln(n){return Array.isArray(n)&&typeof n[0]=="string"}function Qr(n){return Array.isArray(n)&&Array.isArray(n[0])}class zr{constructor(t,e,r,s,i){N(this,"_htmlCache");N(this,"_snapshots");N(this,"_index");N(this,"snapshotName");N(this,"_resources");N(this,"_snapshot");N(this,"_callId");N(this,"_screencastFrames");this._htmlCache=t,this._resources=e,this._snapshots=r,this._index=i,this._snapshot=r[i],this._callId=r[i].callId,this._screencastFrames=s,this.snapshotName=r[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){var s;const{wallTime:t,timestamp:e}=this.snapshot(),r=t&&((s=this._screencastFrames[0])!=null&&s.frameSwapWallTime)?Lt(this._screencastFrames,i=>i.frameSwapWallTime,t):Lt(this._screencastFrames,i=>i.timestamp,e);return r==null?void 0:r.sha1}render(){const t=[],e=(i,a,o,l)=>{if(typeof i=="string"){o==="STYLE"||o==="style"?t.push(ss(i)):t.push(Jr(i));return}if(Qr(i)){const _=a-i[0][0];if(_>=0&&_<=a){const f=ts(this._snapshots[_]),b=i[0][1];if(b>=0&&b<f.length)return e(f[b],_,o,l)}}else if(Ln(i)){const[_,f,...b]=i,h=_==="NOSCRIPT"?"X-NOSCRIPT":_,S=Object.entries(f||{});t.push("<",h);const C="__playwright_current_src__",u=h==="IFRAME"||h==="FRAME",c=h==="A",d=h==="IMG",y=d&&S.some(m=>m[0]===C),g=h==="SOURCE"&&o==="PICTURE"&&(l==null?void 0:l.some(m=>m[0]===C));for(const[m,E]of S){let p=m;u&&m.toLowerCase()==="src"&&(p="__playwright_src__"),d&&m===C&&(p="src"),["src","srcset"].includes(m.toLowerCase())&&(y||g)&&(p="_"+p);let R=E;c&&m.toLowerCase()==="href"?R="link://"+E:(m.toLowerCase()==="href"||m.toLowerCase()==="src"||m===C)&&(R=it(E)),t.push(" ",p,'="',$r(R),'"')}t.push(">");for(const m of b)e(m,a,h,S);es.has(h)||t.push("</",h,">");return}else return},r=this._snapshot;return{html:this._htmlCache.getOrCompute(this,()=>{e(r.html,this._index,void 0,void 0);const a=(r.doctype?`<!DOCTYPE ${r.doctype}>`:"")+["<style>*,*::before,*::after { visibility: hidden }</style>",`<script>${ns(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join("")+t.join("");return{value:a,size:a.length}}),pageId:r.pageId,frameId:r.frameId,index:this._index}}resourceByUrl(t,e){const r=this._snapshot;let s,i;for(const o of this._resources){if(typeof o._monotonicTime=="number"&&o._monotonicTime>=r.timestamp)break;o.response.status!==304&&o.request.url===t&&o.request.method===e&&(o._frameref===r.frameId?s=o:i=o)}let a=s??i;if(a&&e.toUpperCase()==="GET"){for(const o of r.resourceOverrides)if(t===o.url&&o.sha1){a={...a,response:{...a.response,content:{...a.response.content,_sha1:o.sha1}}};break}}return a}}const es=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]);function ts(n){if(!n._nodes){const t=[],e=r=>{if(typeof r=="string")t.push(r);else if(Ln(r)){const[,,...s]=r;for(const i of s)e(i);t.push(r)}};e(n.html),n._nodes=t}return n._nodes}function ns(n,...t){function e(r,s,...i){const a=new URLSearchParams(location.search),o=a.has("shouldPopulateCanvasFromScreenshot"),l=a.has("isUnderTest"),_={viewport:s,frames:new WeakMap};window.__playwright_frame_bounding_rects__=_;const f="Recorded click position in absolute coordinates did not match the center of the clicked element. This is likely due to a difference between the test runner and the trace viewer operating systems.",b=[],h=[],S=[],C=[];let u=window;for(;u!==u.parent&&!u.location.pathname.match(/\/page@[a-z0-9]+$/);)u=u.parent;const c=g=>{for(const m of g.querySelectorAll("[__playwright_scroll_top_]"))b.push(m);for(const m of g.querySelectorAll("[__playwright_scroll_left_]"))h.push(m);for(const m of g.querySelectorAll("[__playwright_value_]")){const E=m;E.type!=="file"&&(E.value=E.getAttribute("__playwright_value_")),m.removeAttribute("__playwright_value_")}for(const m of g.querySelectorAll("[__playwright_checked_]"))m.checked=m.getAttribute("__playwright_checked_")==="true",m.removeAttribute("__playwright_checked_");for(const m of g.querySelectorAll("[__playwright_selected_]"))m.selected=m.getAttribute("__playwright_selected_")==="true",m.removeAttribute("__playwright_selected_");for(const m of g.querySelectorAll("[__playwright_popover_open_]")){try{m.showPopover()}catch{}m.removeAttribute("__playwright_popover_open_")}for(const m of g.querySelectorAll("[__playwright_dialog_open_]")){try{m.getAttribute("__playwright_dialog_open_")==="modal"?m.showModal():m.show()}catch{}m.removeAttribute("__playwright_dialog_open_")}for(const m of i)for(const E of g.querySelectorAll(`[__playwright_target__="${m}"]`)){const p=E.style;p.outline="2px solid #006ab1",p.backgroundColor="#6fa8dc7f",S.push(E)}for(const m of g.querySelectorAll("iframe, frame")){const E=m.getAttribute("__playwright_bounding_rect__");m.removeAttribute("__playwright_bounding_rect__");const p=E?JSON.parse(E):void 0;p&&_.frames.set(m,{boundingRect:p,scrollLeft:0,scrollTop:0});const R=m.getAttribute("__playwright_src__");if(!R)m.setAttribute("src",'data:text/html,<body style="background: #ddd"></body>');else{const T=new URL(r(window.location.href)),A=T.pathname.lastIndexOf("/snapshot/");A!==-1&&(T.pathname=T.pathname.substring(0,A+1)),T.pathname+=R.substring(1),m.setAttribute("src",T.toString())}}{const m=g.querySelector("body[__playwright_custom_elements__]");if(m&&window.customElements){const E=(m.getAttribute("__playwright_custom_elements__")||"").split(",");for(const p of E)window.customElements.define(p,class extends HTMLElement{})}}for(const m of g.querySelectorAll("template[__playwright_shadow_root_]")){const E=m,p=E.parentElement.attachShadow({mode:"open"});p.appendChild(E.content),E.remove(),c(p)}if("adoptedStyleSheets"in g){const m=[...g.adoptedStyleSheets];for(const E of g.querySelectorAll("template[__playwright_style_sheet_]")){const p=E,R=new CSSStyleSheet;R.replaceSync(p.getAttribute("__playwright_style_sheet_")),m.push(R)}g.adoptedStyleSheets=m}C.push(...g.querySelectorAll("canvas"))},d=()=>{window.removeEventListener("load",d);for(const E of b)E.scrollTop=+E.getAttribute("__playwright_scroll_top_"),E.removeAttribute("__playwright_scroll_top_"),_.frames.has(E)&&(_.frames.get(E).scrollTop=E.scrollTop);for(const E of h)E.scrollLeft=+E.getAttribute("__playwright_scroll_left_"),E.removeAttribute("__playwright_scroll_left_"),_.frames.has(E)&&(_.frames.get(E).scrollLeft=E.scrollTop);document.styleSheets[0].disabled=!0;const g=new URL(window.location.href).searchParams,m=window===u;if(g.get("pointX")&&g.get("pointY")){const E=+g.get("pointX"),p=+g.get("pointY"),R=g.has("hasInputTarget"),T=S.length>0,A=document.documentElement?[document.documentElement]:[];for(const x of T?S:A){const w=document.createElement("x-pw-pointer");if(w.style.position="fixed",w.style.backgroundColor="#f44336",w.style.width="20px",w.style.height="20px",w.style.borderRadius="10px",w.style.margin="-10px 0 0 -10px",w.style.zIndex="2147483646",w.style.display="flex",w.style.alignItems="center",w.style.justifyContent="center",T){const O=x.getBoundingClientRect(),I=O.left+O.width/2,v=O.top+O.height/2;if(w.style.left=I+"px",w.style.top=v+"px",m&&(Math.abs(I-E)>=10||Math.abs(v-p)>=10)){const k=document.createElement("x-pw-pointer-warning");k.textContent="⚠",k.style.fontSize="19px",k.style.color="white",k.style.marginTop="-3.5px",k.style.userSelect="none",w.appendChild(k),w.setAttribute("title",f)}document.documentElement.appendChild(w)}else m&&!R&&(w.style.left=E+"px",w.style.top=p+"px",document.documentElement.appendChild(w))}}if(C.length>0){let E=function(R,T){function A(){const x=document.createElement("canvas");x.width=x.width/Math.floor(x.width/24),x.height=x.height/Math.floor(x.height/24);const w=x.getContext("2d");return w.fillStyle="lightgray",w.fillRect(0,0,x.width,x.height),w.fillStyle="white",w.fillRect(0,0,x.width/2,x.height/2),w.fillRect(x.width/2,x.height/2,x.width,x.height),w.createPattern(x,"repeat")}R.fillStyle=A(),R.fillRect(0,0,T.width,T.height)};const p=new Image;p.onload=()=>{var R;for(const T of C){const A=T.getContext("2d"),x=T.getAttribute("__playwright_bounding_rect__");if(T.removeAttribute("__playwright_bounding_rect__"),!x)continue;let w;try{w=JSON.parse(x)}catch{continue}let O=window;for(;O!==u;){const U=O.frameElement;O=O.parent;const F=(R=O.__playwright_frame_bounding_rects__)==null?void 0:R.frames.get(U);if(!(F!=null&&F.boundingRect))break;const Y=F.boundingRect.left-F.scrollLeft,P=F.boundingRect.top-F.scrollTop;w.left+=Y,w.top+=P,w.right+=Y,w.bottom+=P}const{width:I,height:v}=u.__playwright_frame_bounding_rects__.viewport;w.left=w.left/I,w.top=w.top/v,w.right=w.right/I,w.bottom=w.bottom/v;const k=w.right>1||w.bottom>1;if(w.left>1||w.top>1){T.title="Playwright couldn't capture canvas contents because it's located outside the viewport.";continue}E(A,T),o?(A.drawImage(p,w.left*p.width,w.top*p.height,(w.right-w.left)*p.width,(w.bottom-w.top)*p.height,0,0,T.width,T.height),k?T.title="Playwright couldn't capture full canvas contents because it's located partially outside the viewport.":T.title="Canvas contents are displayed on a best-effort basis based on viewport screenshots taken during test execution."):T.title="Canvas content display is disabled.",l&&console.log("canvas drawn:",JSON.stringify([w.left,w.top,w.right-w.left,w.bottom-w.top].map(U=>Math.floor(U*100))))}},p.onerror=()=>{for(const R of C){const T=R.getContext("2d");E(T,R),R.title="Playwright couldn't show canvas contents because the screenshot failed to load."}},p.src=location.href.replace("/snapshot","/closest-screenshot")}},y=()=>c(document);window.addEventListener("load",d),window.addEventListener("DOMContentLoaded",y)}return`
2
- (${e.toString()})(${at.toString()}, ${JSON.stringify(n)}${t.map(r=>`, "${r}"`).join("")})`}const Mn=["about:","blob:","data:","file:","ftp:","http:","https:","mailto:","sftp:","ws:","wss:"],Mt="http://playwright.bloburl/#";function it(n){n.startsWith(Mt)&&(n=n.substring(Mt.length));try{const t=new URL(n);if(t.protocol==="javascript:"||t.protocol==="vbscript:")return"javascript:void(0)";const e=t.protocol==="blob:",r=t.protocol==="file:";if(!e&&!r&&Mn.includes(t.protocol))return n;const s="pw-"+t.protocol.slice(0,t.protocol.length-1);return r||(t.protocol="https:"),t.hostname=t.hostname?`${s}--${t.hostname}`:s,r&&(t.protocol="https:"),t.toString()}catch{return n}}const rs=/url\(['"]?([\w-]+:)\/\//ig;function ss(n){return n.replace(rs,(t,e)=>!(e==="blob:")&&!(e==="file:")&&Mn.includes(e)?t:t.replace(e+"//",`https://pw-${e.slice(0,-1)}--`))}function at(n){const t=new URL(n);return t.pathname.endsWith("/snapshot.html")?t.searchParams.get("r"):n}class is{constructor(t,e){N(this,"_snapshotStorage");N(this,"_resourceLoader");N(this,"_snapshotIds",new Map);this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,r){const s=this._snapshot(t,e);if(!s)return new Response(null,{status:404});const i=s.render();return this._snapshotIds.set(r,s),new Response(i.html,{status:200,headers:{"Content-Type":"text/html; charset=utf-8"}})}async serveClosestScreenshot(t,e){const r=this._snapshot(t,e),s=r==null?void 0:r.closestScreenshot();return s?new Response(await this._resourceLoader(s)):new Response(null,{status:404})}serveSnapshotInfo(t,e){const r=this._snapshot(t,e);return this._respondWithJson(r?{viewport:r.viewport(),url:r.snapshot().frameUrl,timestamp:r.snapshot().timestamp,wallTime:r.snapshot().wallTime}:{error:"No snapshot found"})}_snapshot(t,e){const r=e.get("name");return this._snapshotStorage.snapshotByName(t,r)}_respondWithJson(t){return new Response(JSON.stringify(t),{status:200,headers:{"Cache-Control":"public, max-age=31536000","Content-Type":"application/json"}})}async serveResource(t,e,r){let s;const i=this._snapshotIds.get(r);for(const S of t)if(s=i==null?void 0:i.resourceByUrl(as(S),e),s)break;if(!s)return new Response(null,{status:404});const a=s.response.content._sha1,o=a?await this._resourceLoader(a)||new Blob([]):new Blob([]);let l=s.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(l)&&!l.includes("charset")&&(l=`${l}; charset=utf-8`);const f=new Headers;l!=="x-unknown"&&f.set("Content-Type",l);for(const{name:S,value:C}of s.response.headers)f.set(S,C);f.delete("Content-Encoding"),f.delete("Access-Control-Allow-Origin"),f.set("Access-Control-Allow-Origin","*"),f.delete("Content-Length"),f.set("Content-Length",String(o.size)),f.set("Cache-Control","public, max-age=31536000");const{status:b}=s.response,h=b===101||b===204||b===205||b===304;return new Response(h?null:o,{headers:f,status:s.response.status,statusText:s.response.statusText})}}function as(n){try{const t=new URL(n);return t.hash="",t.toString()}catch{return n}}function os(n){const t=new Xr,{files:e,stacks:r}=n;for(const s of r){const[i,a]=s;t.set(`call@${i}`,a.map(o=>({file:e[o[0]],line:o[1],column:o[2],function:o[3]})))}return t}class cs{constructor(t){N(this,"_maxSize");N(this,"_map");N(this,"_size");this._maxSize=t,this._map=new Map,this._size=0}getOrCompute(t,e){if(this._map.has(t)){const s=this._map.get(t);return this._map.delete(t),this._map.set(t,s),s.value}const r=e();for(;this._map.size&&this._size+r.size>this._maxSize;){const[s,i]=this._map.entries().next().value;this._size-=i.size,this._map.delete(s)}return this._map.set(t,r),this._size+=r.size,r.value}}class ls{constructor(){N(this,"_frameSnapshots",new Map);N(this,"_cache",new cs(1e8));N(this,"_contextToResources",new Map)}addResource(t,e){e.request.url=it(e.request.url),this._ensureResourcesForContext(t).push(e)}addFrameSnapshot(t,e,r){for(const o of e.resourceOverrides)o.url=it(o.url);let s=this._frameSnapshots.get(e.frameId);s||(s={raw:[],renderers:[]},this._frameSnapshots.set(e.frameId,s),e.isMainFrame&&this._frameSnapshots.set(e.pageId,s)),s.raw.push(e);const i=this._ensureResourcesForContext(t),a=new zr(this._cache,i,s.raw,r,s.raw.length-1);return s.renderers.push(a),a}snapshotByName(t,e){const r=this._frameSnapshots.get(t);return r==null?void 0:r.renderers.find(s=>s.snapshotName===e)}snapshotsForTest(){return[...this._frameSnapshots.keys()]}finalize(){for(const t of this._contextToResources.values())t.sort((e,r)=>(e._monotonicTime||0)-(r._monotonicTime||0))}_ensureResourcesForContext(t){let e=this._contextToResources.get(t);return e||(e=[],this._contextToResources.set(t,e)),e}}class Un extends Error{constructor(t){super(t),this.name="TraceVersionError"}}const Ut=7;class fs{constructor(t,e){N(this,"_contextEntry");N(this,"_snapshotStorage");N(this,"_actionMap",new Map);N(this,"_version");N(this,"_pageEntries",new Map);N(this,"_jsHandles",new Map);N(this,"_consoleObjects",new Map);this._contextEntry=t,this._snapshotStorage=e}appendTrace(t){for(const e of t.split(`
3
- `))this._appendEvent(e)}actions(){return[...this._actionMap.values()]}_pageEntry(t){let e=this._pageEntries.get(t);return e||(e={pageId:t,screencastFrames:[]},this._pageEntries.set(t,e),this._contextEntry.pages.push(e)),e}_appendEvent(t){if(!t)return;const e=this._modernize(JSON.parse(t));for(const r of e)this._innerAppendEvent(r)}_innerAppendEvent(t){const e=this._contextEntry;switch(t.type){case"context-options":{if(t.version>Ut)throw new Un("The trace was created by a newer version of Playwright and is not supported by this version of the viewer. Please use latest Playwright to open the trace.");this._version=t.version,e.origin=t.origin,e.browserName=t.browserName,e.channel=t.channel,e.title=t.title,e.platform=t.platform,e.wallTime=t.wallTime,e.startTime=t.monotonicTime,e.sdkLanguage=t.sdkLanguage,e.options=t.options,e.testIdAttributeName=t.testIdAttributeName,e.contextId=t.contextId??"";break}case"screencast-frame":{this._pageEntry(t.pageId).screencastFrames.push(t);break}case"before":{this._actionMap.set(t.callId,{...t,type:"action",endTime:0,log:[]});break}case"input":{const r=this._actionMap.get(t.callId);r.inputSnapshot=t.inputSnapshot,r.point=t.point;break}case"log":{const r=this._actionMap.get(t.callId);if(!r)return;r.log.push({time:t.time,message:t.message});break}case"after":{const r=this._actionMap.get(t.callId);r.afterSnapshot=t.afterSnapshot,r.endTime=t.endTime,r.result=t.result,r.error=t.error,r.attachments=t.attachments,r.annotations=t.annotations,t.point&&(r.point=t.point);break}case"action":{this._actionMap.set(t.callId,{...t,log:[]});break}case"event":{e.events.push(t);break}case"stdout":{e.stdio.push(t);break}case"stderr":{e.stdio.push(t);break}case"error":{e.errors.push(t);break}case"console":{e.events.push(t);break}case"resource-snapshot":this._snapshotStorage.addResource(this._contextEntry.contextId,t.snapshot),e.resources.push(t.snapshot);break;case"frame-snapshot":this._snapshotStorage.addFrameSnapshot(this._contextEntry.contextId,t.snapshot,this._pageEntry(t.snapshot.pageId).screencastFrames);break}"pageId"in t&&t.pageId&&this._pageEntry(t.pageId),(t.type==="action"||t.type==="before")&&(e.startTime=Math.min(e.startTime,t.startTime)),(t.type==="action"||t.type==="after")&&(e.endTime=Math.max(e.endTime,t.endTime)),t.type==="event"&&(e.startTime=Math.min(e.startTime,t.time),e.endTime=Math.max(e.endTime,t.time)),t.type==="screencast-frame"&&(e.startTime=Math.min(e.startTime,t.timestamp),e.endTime=Math.max(e.endTime,t.timestamp))}_processedContextCreatedEvent(){return this._version!==void 0}_modernize(t){let e=this._version||t.version;if(e===void 0)return[t];let r=[t];for(;e<Ut;++e)r=this[`_modernize_${e}_to_${e+1}`].call(this,r);return r}_modernize_0_to_1(t){for(const e of t)e.type==="action"&&typeof e.metadata.error=="string"&&(e.metadata.error={error:{name:"Error",message:e.metadata.error}});return t}_modernize_1_to_2(t){var e;for(const r of t)r.type!=="frame-snapshot"||!r.snapshot.isMainFrame||(r.snapshot.viewport=((e=this._contextEntry.options)==null?void 0:e.viewport)||{width:1280,height:720});return t}_modernize_2_to_3(t){for(const e of t){if(e.type!=="resource-snapshot"||e.snapshot.request)continue;const r=e.snapshot;e.snapshot={_frameref:r.frameId,request:{url:r.url,method:r.method,headers:r.requestHeaders,postData:r.requestSha1?{_sha1:r.requestSha1}:void 0},response:{status:r.status,headers:r.responseHeaders,content:{mimeType:r.contentType,_sha1:r.responseSha1}},_monotonicTime:r.timestamp}}return t}_modernize_3_to_4(t){const e=[];for(const r of t){const s=this._modernize_event_3_to_4(r);s&&e.push(s)}return e}_modernize_event_3_to_4(t){var r,s,i,a;if(t.type!=="action"&&t.type!=="event")return t;const e=t.metadata;return e.internal||e.method.startsWith("tracing")?null:t.type==="event"?e.method==="__create__"&&e.type==="ConsoleMessage"?{type:"object",class:e.type,guid:e.params.guid,initializer:e.params.initializer}:{type:"event",time:e.startTime,class:e.type,method:e.method,params:e.params,pageId:e.pageId}:{type:"action",callId:e.id,startTime:e.startTime,endTime:e.endTime,apiName:e.apiName||e.type+"."+e.method,class:e.type,method:e.method,params:e.params,wallTime:e.wallTime||Date.now(),log:e.log,beforeSnapshot:(r=e.snapshots.find(o=>o.title==="before"))==null?void 0:r.snapshotName,inputSnapshot:(s=e.snapshots.find(o=>o.title==="input"))==null?void 0:s.snapshotName,afterSnapshot:(i=e.snapshots.find(o=>o.title==="after"))==null?void 0:i.snapshotName,error:(a=e.error)==null?void 0:a.error,result:e.result,point:e.point,pageId:e.pageId}}_modernize_4_to_5(t){const e=[];for(const r of t){const s=this._modernize_event_4_to_5(r);s&&e.push(s)}return e}_modernize_event_4_to_5(t){var e,r;if(t.type==="event"&&t.method==="__create__"&&t.class==="JSHandle"&&this._jsHandles.set(t.params.guid,t.params.initializer),t.type==="object"){if(t.class!=="ConsoleMessage")return null;const s=(e=t.initializer.args)==null?void 0:e.map(i=>{if(i.guid){const a=this._jsHandles.get(i.guid);return{preview:(a==null?void 0:a.preview)||"",value:""}}return{preview:i.preview||"",value:i.value||""}});return this._consoleObjects.set(t.guid,{type:t.initializer.type,text:t.initializer.text,location:t.initializer.location,args:s}),null}if(t.type==="event"&&t.method==="console"){const s=this._consoleObjects.get(((r=t.params.message)==null?void 0:r.guid)||"");return s?{type:"console",time:t.time,pageId:t.pageId,messageType:s.type,text:s.text,args:s.args,location:s.location}:null}return t}_modernize_5_to_6(t){const e=[];for(const r of t)if(e.push(r),!(r.type!=="after"||!r.log.length))for(const s of r.log)e.push({type:"log",callId:r.callId,message:s,time:-1});return e}_modernize_6_to_7(t){const e=[];if(!this._processedContextCreatedEvent()&&t[0].type!=="context-options"){const r={type:"context-options",origin:"testRunner",version:7,browserName:"",options:{},platform:process.platform,wallTime:0,monotonicTime:0,sdkLanguage:"javascript",contextId:""};e.push(r)}for(const r of t){if(r.type==="context-options"){e.push({...r,monotonicTime:0,origin:"library",contextId:""});continue}!this._contextEntry.wallTime&&r.type==="before"&&(this._contextEntry.wallTime=r.wallTime),!this._contextEntry.startTime&&r.type==="before"&&(this._contextEntry.startTime=r.startTime),e.push(r)}return e}}class us{constructor(){N(this,"contextEntries",[]);N(this,"_snapshotStorage");N(this,"_backend");N(this,"_resourceToContentType",new Map)}async load(t,e){var o,l;this._backend=t;const r=[];let s=!1;for(const _ of await this._backend.entryNames()){const f=_.match(/(.+)\.trace$/);f&&r.push(f[1]||""),_.includes("src@")&&(s=!0)}if(!r.length)throw new Error("Cannot find .trace file");this._snapshotStorage=new ls;const i=r.length*3;let a=0;for(const _ of r){const f=ds();f.traceUrl=t.traceURL(),f.hasSource=s;const b=new fs(f,this._snapshotStorage),h=await this._backend.readText(_+".trace")||"";b.appendTrace(h),e(++a,i);const S=await this._backend.readText(_+".network")||"";if(b.appendTrace(S),e(++a,i),f.actions=b.actions().sort((u,c)=>u.startTime-c.startTime),!t.isLive()){for(const u of f.actions.slice().reverse())if(!u.endTime&&!u.error)for(const c of f.actions)c.parentId===u.callId&&u.endTime<c.endTime&&(u.endTime=c.endTime)}const C=await this._backend.readText(_+".stacks");if(C){const u=os(JSON.parse(C));for(const c of f.actions)c.stack=c.stack||u.get(c.callId)}e(++a,i);for(const u of f.resources)(o=u.request.postData)!=null&&o._sha1&&this._resourceToContentType.set(u.request.postData._sha1,Wt(u.request.postData.mimeType)),(l=u.response.content)!=null&&l._sha1&&this._resourceToContentType.set(u.response.content._sha1,Wt(u.response.content.mimeType));this.contextEntries.push(f)}this._snapshotStorage.finalize()}async hasEntry(t){return this._backend.hasEntry(t)}async resourceForSha1(t){const e=await this._backend.readBlob("resources/"+t),r=this._resourceToContentType.get(t);return!e||r===void 0||r==="x-unknown"?e:new Blob([e],{type:r})}storage(){return this._snapshotStorage}}function Wt(n){const t=n.match(/^(.*);\s*charset=.*$/);return t?t[1]:n}function ds(){return{origin:"testRunner",traceUrl:"",startTime:Number.MAX_SAFE_INTEGER,wallTime:Number.MAX_SAFE_INTEGER,endTime:0,browserName:"",options:{deviceScaleFactor:1,isMobile:!1,viewport:{width:1280,height:800}},pages:[],resources:[],actions:[],events:[],errors:[],stdio:[],hasSource:!1,contextId:""}}const _s=15,L=0,te=1,hs=2,X=-2,H=-3,Ht=-4,ne=-5,$=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Wn=1440,ps=0,ms=4,ws=9,gs=5,bs=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ys=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],xs=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Es=[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,112,112],Ts=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Ss=[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],re=15;function ot(){const n=this;let t,e,r,s,i,a;function o(_,f,b,h,S,C,u,c,d,y,g){let m,E,p,R,T,A,x,w,O,I,v,k,D,U,F;I=0,T=b;do r[_[f+I]]++,I++,T--;while(T!==0);if(r[0]==b)return u[0]=-1,c[0]=0,L;for(w=c[0],A=1;A<=re&&r[A]===0;A++);for(x=A,w<A&&(w=A),T=re;T!==0&&r[T]===0;T--);for(p=T,w>T&&(w=T),c[0]=w,U=1<<A;A<T;A++,U<<=1)if((U-=r[A])<0)return H;if((U-=r[T])<0)return H;for(r[T]+=U,a[1]=A=0,I=1,D=2;--T!==0;)a[D]=A+=r[I],D++,I++;T=0,I=0;do(A=_[f+I])!==0&&(g[a[A]++]=T),I++;while(++T<b);for(b=a[p],a[0]=T=0,I=0,R=-1,k=-w,i[0]=0,v=0,F=0;x<=p;x++)for(m=r[x];m--!==0;){for(;x>k+w;){if(R++,k+=w,F=p-k,F=F>w?w:F,(E=1<<(A=x-k))>m+1&&(E-=m+1,D=x,A<F))for(;++A<F&&!((E<<=1)<=r[++D]);)E-=r[D];if(F=1<<A,y[0]+F>Wn)return H;i[R]=v=y[0],y[0]+=F,R!==0?(a[R]=T,s[0]=A,s[1]=w,A=T>>>k-w,s[2]=v-i[R-1]-A,d.set(s,(i[R-1]+A)*3)):u[0]=v}for(s[1]=x-k,I>=b?s[0]=192:g[I]<h?(s[0]=g[I]<256?0:96,s[2]=g[I++]):(s[0]=C[g[I]-h]+16+64,s[2]=S[g[I++]-h]),E=1<<x-k,A=T>>>k;A<F;A+=E)d.set(s,(v+A)*3);for(A=1<<x-1;(T&A)!==0;A>>>=1)T^=A;for(T^=A,O=(1<<k)-1;(T&O)!=a[R];)R--,k-=w,O=(1<<k)-1}return U!==0&&p!=1?ne:L}function l(_){let f;for(t||(t=[],e=[],r=new Int32Array(re+1),s=[],i=new Int32Array(re),a=new Int32Array(re+1)),e.length<_&&(e=[]),f=0;f<_;f++)e[f]=0;for(f=0;f<re+1;f++)r[f]=0;for(f=0;f<3;f++)s[f]=0;i.set(r.subarray(0,re),0),a.set(r.subarray(0,re+1),0)}n.inflate_trees_bits=function(_,f,b,h,S){let C;return l(19),t[0]=0,C=o(_,0,19,19,null,null,b,f,h,t,e),C==H?S.msg="oversubscribed dynamic bit lengths tree":(C==ne||f[0]===0)&&(S.msg="incomplete dynamic bit lengths tree",C=H),C},n.inflate_trees_dynamic=function(_,f,b,h,S,C,u,c,d){let y;return l(288),t[0]=0,y=o(b,0,_,257,xs,Es,C,h,c,t,e),y!=L||h[0]===0?(y==H?d.msg="oversubscribed literal/length tree":y!=Ht&&(d.msg="incomplete literal/length tree",y=H),y):(l(288),y=o(b,_,f,0,Ts,Ss,u,S,c,t,e),y!=L||S[0]===0&&_>257?(y==H?d.msg="oversubscribed distance tree":y==ne?(d.msg="incomplete distance tree",y=H):y!=Ht&&(d.msg="empty distance tree with lengths",y=H),y):L)}}ot.inflate_trees_fixed=function(n,t,e,r){return n[0]=ws,t[0]=gs,e[0]=bs,r[0]=ys,L};const Fe=0,Bt=1,jt=2,qt=3,Yt=4,Gt=5,Vt=6,$e=7,Zt=8,Ne=9;function Rs(){const n=this;let t,e=0,r,s=0,i=0,a=0,o=0,l=0,_=0,f=0,b,h=0,S,C=0;function u(c,d,y,g,m,E,p,R){let T,A,x,w,O,I,v,k,D,U,F,Y,P,he,M,W;v=R.next_in_index,k=R.avail_in,O=p.bitb,I=p.bitk,D=p.write,U=D<p.read?p.read-D-1:p.end-D,F=$[c],Y=$[d];do{for(;I<20;)k--,O|=(R.read_byte(v++)&255)<<I,I+=8;if(T=O&F,A=y,x=g,W=(x+T)*3,(w=A[W])===0){O>>=A[W+1],I-=A[W+1],p.win[D++]=A[W+2],U--;continue}do{if(O>>=A[W+1],I-=A[W+1],(w&16)!==0){for(w&=15,P=A[W+2]+(O&$[w]),O>>=w,I-=w;I<15;)k--,O|=(R.read_byte(v++)&255)<<I,I+=8;T=O&Y,A=m,x=E,W=(x+T)*3,w=A[W];do if(O>>=A[W+1],I-=A[W+1],(w&16)!==0){for(w&=15;I<w;)k--,O|=(R.read_byte(v++)&255)<<I,I+=8;if(he=A[W+2]+(O&$[w]),O>>=w,I-=w,U-=P,D>=he)M=D-he,D-M>0&&2>D-M?(p.win[D++]=p.win[M++],p.win[D++]=p.win[M++],P-=2):(p.win.set(p.win.subarray(M,M+2),D),D+=2,M+=2,P-=2);else{M=D-he;do M+=p.end;while(M<0);if(w=p.end-M,P>w){if(P-=w,D-M>0&&w>D-M)do p.win[D++]=p.win[M++];while(--w!==0);else p.win.set(p.win.subarray(M,M+w),D),D+=w,M+=w,w=0;M=0}}if(D-M>0&&P>D-M)do p.win[D++]=p.win[M++];while(--P!==0);else p.win.set(p.win.subarray(M,M+P),D),D+=P,M+=P,P=0;break}else if((w&64)===0)T+=A[W+2],T+=O&$[w],W=(x+T)*3,w=A[W];else return R.msg="invalid distance code",P=R.avail_in-k,P=I>>3<P?I>>3:P,k+=P,v-=P,I-=P<<3,p.bitb=O,p.bitk=I,R.avail_in=k,R.total_in+=v-R.next_in_index,R.next_in_index=v,p.write=D,H;while(!0);break}if((w&64)===0){if(T+=A[W+2],T+=O&$[w],W=(x+T)*3,(w=A[W])===0){O>>=A[W+1],I-=A[W+1],p.win[D++]=A[W+2],U--;break}}else return(w&32)!==0?(P=R.avail_in-k,P=I>>3<P?I>>3:P,k+=P,v-=P,I-=P<<3,p.bitb=O,p.bitk=I,R.avail_in=k,R.total_in+=v-R.next_in_index,R.next_in_index=v,p.write=D,te):(R.msg="invalid literal/length code",P=R.avail_in-k,P=I>>3<P?I>>3:P,k+=P,v-=P,I-=P<<3,p.bitb=O,p.bitk=I,R.avail_in=k,R.total_in+=v-R.next_in_index,R.next_in_index=v,p.write=D,H)}while(!0)}while(U>=258&&k>=10);return P=R.avail_in-k,P=I>>3<P?I>>3:P,k+=P,v-=P,I-=P<<3,p.bitb=O,p.bitk=I,R.avail_in=k,R.total_in+=v-R.next_in_index,R.next_in_index=v,p.write=D,L}n.init=function(c,d,y,g,m,E){t=Fe,_=c,f=d,b=y,h=g,S=m,C=E,r=null},n.proc=function(c,d,y){let g,m,E,p=0,R=0,T=0,A,x,w,O;for(T=d.next_in_index,A=d.avail_in,p=c.bitb,R=c.bitk,x=c.write,w=x<c.read?c.read-x-1:c.end-x;;)switch(t){case Fe:if(w>=258&&A>=10&&(c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,y=u(_,f,b,h,S,C,c,d),T=d.next_in_index,A=d.avail_in,p=c.bitb,R=c.bitk,x=c.write,w=x<c.read?c.read-x-1:c.end-x,y!=L)){t=y==te?$e:Ne;break}i=_,r=b,s=h,t=Bt;case Bt:for(g=i;R<g;){if(A!==0)y=L;else return c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);A--,p|=(d.read_byte(T++)&255)<<R,R+=8}if(m=(s+(p&$[g]))*3,p>>>=r[m+1],R-=r[m+1],E=r[m],E===0){a=r[m+2],t=Vt;break}if((E&16)!==0){o=E&15,e=r[m+2],t=jt;break}if((E&64)===0){i=E,s=m/3+r[m+2];break}if((E&32)!==0){t=$e;break}return t=Ne,d.msg="invalid literal/length code",y=H,c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);case jt:for(g=o;R<g;){if(A!==0)y=L;else return c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);A--,p|=(d.read_byte(T++)&255)<<R,R+=8}e+=p&$[g],p>>=g,R-=g,i=f,r=S,s=C,t=qt;case qt:for(g=i;R<g;){if(A!==0)y=L;else return c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);A--,p|=(d.read_byte(T++)&255)<<R,R+=8}if(m=(s+(p&$[g]))*3,p>>=r[m+1],R-=r[m+1],E=r[m],(E&16)!==0){o=E&15,l=r[m+2],t=Yt;break}if((E&64)===0){i=E,s=m/3+r[m+2];break}return t=Ne,d.msg="invalid distance code",y=H,c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);case Yt:for(g=o;R<g;){if(A!==0)y=L;else return c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);A--,p|=(d.read_byte(T++)&255)<<R,R+=8}l+=p&$[g],p>>=g,R-=g,t=Gt;case Gt:for(O=x-l;O<0;)O+=c.end;for(;e!==0;){if(w===0&&(x==c.end&&c.read!==0&&(x=0,w=x<c.read?c.read-x-1:c.end-x),w===0&&(c.write=x,y=c.inflate_flush(d,y),x=c.write,w=x<c.read?c.read-x-1:c.end-x,x==c.end&&c.read!==0&&(x=0,w=x<c.read?c.read-x-1:c.end-x),w===0)))return c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);c.win[x++]=c.win[O++],w--,O==c.end&&(O=0),e--}t=Fe;break;case Vt:if(w===0&&(x==c.end&&c.read!==0&&(x=0,w=x<c.read?c.read-x-1:c.end-x),w===0&&(c.write=x,y=c.inflate_flush(d,y),x=c.write,w=x<c.read?c.read-x-1:c.end-x,x==c.end&&c.read!==0&&(x=0,w=x<c.read?c.read-x-1:c.end-x),w===0)))return c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);y=L,c.win[x++]=a,w--,t=Fe;break;case $e:if(R>7&&(R-=8,A++,T--),c.write=x,y=c.inflate_flush(d,y),x=c.write,w=x<c.read?c.read-x-1:c.end-x,c.read!=c.write)return c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);t=Zt;case Zt:return y=te,c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);case Ne:return y=H,c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y);default:return y=X,c.bitb=p,c.bitk=R,d.avail_in=A,d.total_in+=T-d.next_in_index,d.next_in_index=T,c.write=x,c.inflate_flush(d,y)}},n.free=function(){}}const Kt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ge=0,Je=1,Xt=2,$t=3,Jt=4,Qt=5,Le=6,Me=7,zt=8,pe=9;function As(n,t){const e=this;let r=ge,s=0,i=0,a=0,o;const l=[0],_=[0],f=new Rs;let b=0,h=new Int32Array(Wn*3);const S=0,C=new ot;e.bitk=0,e.bitb=0,e.win=new Uint8Array(t),e.end=t,e.read=0,e.write=0,e.reset=function(u,c){c&&(c[0]=S),r==Le&&f.free(u),r=ge,e.bitk=0,e.bitb=0,e.read=e.write=0},e.reset(n,null),e.inflate_flush=function(u,c){let d,y,g;return y=u.next_out_index,g=e.read,d=(g<=e.write?e.write:e.end)-g,d>u.avail_out&&(d=u.avail_out),d!==0&&c==ne&&(c=L),u.avail_out-=d,u.total_out+=d,u.next_out.set(e.win.subarray(g,g+d),y),y+=d,g+=d,g==e.end&&(g=0,e.write==e.end&&(e.write=0),d=e.write-g,d>u.avail_out&&(d=u.avail_out),d!==0&&c==ne&&(c=L),u.avail_out-=d,u.total_out+=d,u.next_out.set(e.win.subarray(g,g+d),y),y+=d,g+=d),u.next_out_index=y,e.read=g,c},e.proc=function(u,c){let d,y,g,m,E,p,R,T;for(m=u.next_in_index,E=u.avail_in,y=e.bitb,g=e.bitk,p=e.write,R=p<e.read?e.read-p-1:e.end-p;;){let A,x,w,O,I,v,k,D;switch(r){case ge:for(;g<3;){if(E!==0)c=L;else return e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);E--,y|=(u.read_byte(m++)&255)<<g,g+=8}switch(d=y&7,b=d&1,d>>>1){case 0:y>>>=3,g-=3,d=g&7,y>>>=d,g-=d,r=Je;break;case 1:A=[],x=[],w=[[]],O=[[]],ot.inflate_trees_fixed(A,x,w,O),f.init(A[0],x[0],w[0],0,O[0],0),y>>>=3,g-=3,r=Le;break;case 2:y>>>=3,g-=3,r=$t;break;case 3:return y>>>=3,g-=3,r=pe,u.msg="invalid block type",c=H,e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c)}break;case Je:for(;g<32;){if(E!==0)c=L;else return e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);E--,y|=(u.read_byte(m++)&255)<<g,g+=8}if((~y>>>16&65535)!=(y&65535))return r=pe,u.msg="invalid stored block lengths",c=H,e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);s=y&65535,y=g=0,r=s!==0?Xt:b!==0?Me:ge;break;case Xt:if(E===0||R===0&&(p==e.end&&e.read!==0&&(p=0,R=p<e.read?e.read-p-1:e.end-p),R===0&&(e.write=p,c=e.inflate_flush(u,c),p=e.write,R=p<e.read?e.read-p-1:e.end-p,p==e.end&&e.read!==0&&(p=0,R=p<e.read?e.read-p-1:e.end-p),R===0)))return e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);if(c=L,d=s,d>E&&(d=E),d>R&&(d=R),e.win.set(u.read_buf(m,d),p),m+=d,E-=d,p+=d,R-=d,(s-=d)!==0)break;r=b!==0?Me:ge;break;case $t:for(;g<14;){if(E!==0)c=L;else return e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);E--,y|=(u.read_byte(m++)&255)<<g,g+=8}if(i=d=y&16383,(d&31)>29||(d>>5&31)>29)return r=pe,u.msg="too many length or distance symbols",c=H,e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);if(d=258+(d&31)+(d>>5&31),!o||o.length<d)o=[];else for(T=0;T<d;T++)o[T]=0;y>>>=14,g-=14,a=0,r=Jt;case Jt:for(;a<4+(i>>>10);){for(;g<3;){if(E!==0)c=L;else return e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);E--,y|=(u.read_byte(m++)&255)<<g,g+=8}o[Kt[a++]]=y&7,y>>>=3,g-=3}for(;a<19;)o[Kt[a++]]=0;if(l[0]=7,d=C.inflate_trees_bits(o,l,_,h,u),d!=L)return c=d,c==H&&(o=null,r=pe),e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);a=0,r=Qt;case Qt:for(;d=i,!(a>=258+(d&31)+(d>>5&31));){let U,F;for(d=l[0];g<d;){if(E!==0)c=L;else return e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);E--,y|=(u.read_byte(m++)&255)<<g,g+=8}if(d=h[(_[0]+(y&$[d]))*3+1],F=h[(_[0]+(y&$[d]))*3+2],F<16)y>>>=d,g-=d,o[a++]=F;else{for(T=F==18?7:F-14,U=F==18?11:3;g<d+T;){if(E!==0)c=L;else return e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);E--,y|=(u.read_byte(m++)&255)<<g,g+=8}if(y>>>=d,g-=d,U+=y&$[T],y>>>=T,g-=T,T=a,d=i,T+U>258+(d&31)+(d>>5&31)||F==16&&T<1)return o=null,r=pe,u.msg="invalid bit length repeat",c=H,e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);F=F==16?o[T-1]:0;do o[T++]=F;while(--U!==0);a=T}}if(_[0]=-1,I=[],v=[],k=[],D=[],I[0]=9,v[0]=6,d=i,d=C.inflate_trees_dynamic(257+(d&31),1+(d>>5&31),o,I,v,k,D,h,u),d!=L)return d==H&&(o=null,r=pe),c=d,e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);f.init(I[0],v[0],h,k[0],h,D[0]),r=Le;case Le:if(e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,(c=f.proc(e,u,c))!=te)return e.inflate_flush(u,c);if(c=L,f.free(u),m=u.next_in_index,E=u.avail_in,y=e.bitb,g=e.bitk,p=e.write,R=p<e.read?e.read-p-1:e.end-p,b===0){r=ge;break}r=Me;case Me:if(e.write=p,c=e.inflate_flush(u,c),p=e.write,R=p<e.read?e.read-p-1:e.end-p,e.read!=e.write)return e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);r=zt;case zt:return c=te,e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);case pe:return c=H,e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c);default:return c=X,e.bitb=y,e.bitk=g,u.avail_in=E,u.total_in+=m-u.next_in_index,u.next_in_index=m,e.write=p,e.inflate_flush(u,c)}}},e.free=function(u){e.reset(u,null),e.win=null,h=null},e.set_dictionary=function(u,c,d){e.win.set(u.subarray(c,c+d),0),e.read=e.write=d},e.sync_point=function(){return r==Je?1:0}}const Cs=32,Is=8,Os=0,en=1,tn=2,nn=3,rn=4,sn=5,Qe=6,Ee=7,an=12,se=13,ks=[0,0,255,255];function Ds(){const n=this;n.mode=0,n.method=0,n.was=[0],n.need=0,n.marker=0,n.wbits=0;function t(e){return!e||!e.istate?X:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=Ee,e.istate.blocks.reset(e,null),L)}n.inflateEnd=function(e){return n.blocks&&n.blocks.free(e),n.blocks=null,L},n.inflateInit=function(e,r){return e.msg=null,n.blocks=null,r<8||r>15?(n.inflateEnd(e),X):(n.wbits=r,e.istate.blocks=new As(e,1<<r),t(e),L)},n.inflate=function(e,r){let s,i;if(!e||!e.istate||!e.next_in)return X;const a=e.istate;for(r=r==ms?ne:L,s=ne;;)switch(a.mode){case Os:if(e.avail_in===0)return s;if(s=r,e.avail_in--,e.total_in++,((a.method=e.read_byte(e.next_in_index++))&15)!=Is){a.mode=se,e.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=se,e.msg="invalid win size",a.marker=5;break}a.mode=en;case en:if(e.avail_in===0)return s;if(s=r,e.avail_in--,e.total_in++,i=e.read_byte(e.next_in_index++)&255,((a.method<<8)+i)%31!==0){a.mode=se,e.msg="incorrect header check",a.marker=5;break}if((i&Cs)===0){a.mode=Ee;break}a.mode=tn;case tn:if(e.avail_in===0)return s;s=r,e.avail_in--,e.total_in++,a.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,a.mode=nn;case nn:if(e.avail_in===0)return s;s=r,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,a.mode=rn;case rn:if(e.avail_in===0)return s;s=r,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,a.mode=sn;case sn:return e.avail_in===0?s:(s=r,e.avail_in--,e.total_in++,a.need+=e.read_byte(e.next_in_index++)&255,a.mode=Qe,hs);case Qe:return a.mode=se,e.msg="need dictionary",a.marker=0,X;case Ee:if(s=a.blocks.proc(e,s),s==H){a.mode=se,a.marker=0;break}if(s==L&&(s=r),s!=te)return s;s=r,a.blocks.reset(e,a.was),a.mode=an;case an:return e.avail_in=0,te;case se:return H;default:return X}},n.inflateSetDictionary=function(e,r,s){let i=0,a=s;if(!e||!e.istate||e.istate.mode!=Qe)return X;const o=e.istate;return a>=1<<o.wbits&&(a=(1<<o.wbits)-1,i=s-a),o.blocks.set_dictionary(r,i,a),o.mode=Ee,L},n.inflateSync=function(e){let r,s,i,a,o;if(!e||!e.istate)return X;const l=e.istate;if(l.mode!=se&&(l.mode=se,l.marker=0),(r=e.avail_in)===0)return ne;for(s=e.next_in_index,i=l.marker;r!==0&&i<4;)e.read_byte(s)==ks[i]?i++:e.read_byte(s)!==0?i=0:i=4-i,s++,r--;return e.total_in+=s-e.next_in_index,e.next_in_index=s,e.avail_in=r,l.marker=i,i!=4?H:(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,l.mode=Ee,L)},n.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?X:e.istate.blocks.sync_point()}}function Hn(){}Hn.prototype={inflateInit(n){const t=this;return t.istate=new Ds,n||(n=_s),t.istate.inflateInit(t,n)},inflate(n){const t=this;return t.istate?t.istate.inflate(t,n):X},inflateEnd(){const n=this;if(!n.istate)return X;const t=n.istate.inflateEnd(n);return n.istate=null,t},inflateSync(){const n=this;return n.istate?n.istate.inflateSync(n):X},inflateSetDictionary(n,t){const e=this;return e.istate?e.istate.inflateSetDictionary(e,n,t):X},read_byte(n){return this.next_in[n]},read_buf(n,t){return this.next_in.subarray(n,n+t)}};function Ps(n){const t=this,e=new Hn,r=n&&n.chunkSize?Math.floor(n.chunkSize*2):128*1024,s=ps,i=new Uint8Array(r);let a=!1;e.inflateInit(),e.next_out=i,t.append=function(o,l){const _=[];let f,b,h=0,S=0,C=0;if(o.length!==0){e.next_in_index=0,e.next_in=o,e.avail_in=o.length;do{if(e.next_out_index=0,e.avail_out=r,e.avail_in===0&&!a&&(e.next_in_index=0,a=!0),f=e.inflate(s),a&&f===ne){if(e.avail_in!==0)throw new Error("inflating: bad input")}else if(f!==L&&f!==te)throw new Error("inflating: "+e.msg);if((a||f===te)&&e.avail_in===o.length)throw new Error("inflating: bad input");e.next_out_index&&(e.next_out_index===r?_.push(new Uint8Array(i)):_.push(i.subarray(0,e.next_out_index))),C+=e.next_out_index,l&&e.next_in_index>0&&e.next_in_index!=h&&(l(e.next_in_index),h=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return _.length>1?(b=new Uint8Array(C),_.forEach(function(u){b.set(u,S),S+=u.length})):b=_[0]?new Uint8Array(_[0]):new Uint8Array,b}},t.flush=function(){e.inflateEnd()}}const me=4294967295,oe=65535,vs=8,Fs=0,Ns=99,Ls=67324752,Ms=134695760,on=33639248,Us=101010256,cn=101075792,Ws=117853008,ce=22,ze=20,et=56,Hs=1,Bs=39169,js=10,qs=1,Ys=21589,Gs=28789,Vs=25461,Zs=6534,ln=1,Ks=6,fn=8,un=2048,dn=16,_n=16384,hn=73,pn="/",V=void 0,de="undefined",ke="function";class mn{constructor(t){return class extends TransformStream{constructor(e,r){const s=new t(r);super({transform(i,a){a.enqueue(s.append(i))},flush(i){const a=s.flush();a&&i.enqueue(a)}})}}}}const Xs=64;let Bn=2;try{typeof navigator!=de&&navigator.hardwareConcurrency&&(Bn=navigator.hardwareConcurrency)}catch{}const $s={chunkSize:512*1024,maxWorkers:Bn,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:V,CompressionStreamNative:typeof CompressionStream!=de&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=de&&DecompressionStream},le=Object.assign({},$s);function jn(){return le}function Js(n){return Math.max(n.chunkSize,Xs)}function qn(n){const{baseURL:t,chunkSize:e,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:_,DecompressionStream:f,workerScripts:b}=n;if(ie("baseURL",t),ie("chunkSize",e),ie("maxWorkers",r),ie("terminateWorkerTimeout",s),ie("useCompressionStream",i),ie("useWebWorkers",a),o&&(le.CompressionStream=new mn(o)),l&&(le.DecompressionStream=new mn(l)),ie("CompressionStream",_),ie("DecompressionStream",f),b!==V){const{deflate:h,inflate:S}=b;if((h||S)&&(le.workerScripts||(le.workerScripts={})),h){if(!Array.isArray(h))throw new Error("workerScripts.deflate must be an array");le.workerScripts.deflate=h}if(S){if(!Array.isArray(S))throw new Error("workerScripts.inflate must be an array");le.workerScripts.inflate=S}}}function ie(n,t){t!==V&&(le[n]=t)}function Qs(){return"application/octet-stream"}const Yn=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t=t>>>1;Yn[n]=t}class je{constructor(t){this.crc=t||-1}append(t){let e=this.crc|0;for(let r=0,s=t.length|0;r<s;r++)e=e>>>8^Yn[(e^t[r])&255];this.crc=e}get(){return~this.crc}}class Gn extends TransformStream{constructor(){let t;const e=new je;super({transform(r,s){e.append(r),s.enqueue(r)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function zs(n){if(typeof TextEncoder==de){n=unescape(encodeURIComponent(n));const t=new Uint8Array(n.length);for(let e=0;e<t.length;e++)t[e]=n.charCodeAt(e);return t}else return new TextEncoder().encode(n)}const K={concat(n,t){if(n.length===0||t.length===0)return n.concat(t);const e=n[n.length-1],r=K.getPartial(e);return r===32?n.concat(t):K._shiftRight(t,r,e|0,n.slice(0,n.length-1))},bitLength(n){const t=n.length;if(t===0)return 0;const e=n[t-1];return(t-1)*32+K.getPartial(e)},clamp(n,t){if(n.length*32<t)return n;n=n.slice(0,Math.ceil(t/32));const e=n.length;return t=t&31,e>0&&t&&(n[e-1]=K.partial(t,n[e-1]&2147483648>>t-1,1)),n},partial(n,t,e){return n===32?t:(e?t|0:t<<32-n)+n*1099511627776},getPartial(n){return Math.round(n/1099511627776)||32},_shiftRight(n,t,e,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(e),e=0;if(t===0)return r.concat(n);for(let a=0;a<n.length;a++)r.push(e|n[a]>>>t),e=n[a]<<32-t;const s=n.length?n[n.length-1]:0,i=K.getPartial(s);return r.push(K.partial(t+i&31,t+i>32?e:r.pop(),1)),r}},qe={bytes:{fromBits(n){const e=K.bitLength(n)/8,r=new Uint8Array(e);let s;for(let i=0;i<e;i++)(i&3)===0&&(s=n[i/4]),r[i]=s>>>24,s<<=8;return r},toBits(n){const t=[];let e,r=0;for(e=0;e<n.length;e++)r=r<<8|n[e],(e&3)===3&&(t.push(r),r=0);return e&3&&t.push(K.partial(8*(e&3),r)),t}}},Vn={};Vn.sha1=class{constructor(n){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],n?(t._h=n._h.slice(0),t._buffer=n._buffer.slice(0),t._length=n._length):t.reset()}reset(){const n=this;return n._h=n._init.slice(0),n._buffer=[],n._length=0,n}update(n){const t=this;typeof n=="string"&&(n=qe.utf8String.toBits(n));const e=t._buffer=K.concat(t._buffer,n),r=t._length,s=t._length=r+K.bitLength(n);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(e);let a=0;for(let o=t.blockSize+r-(t.blockSize+r&t.blockSize-1);o<=s;o+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return e.splice(0,16*a),t}finalize(){const n=this;let t=n._buffer;const e=n._h;t=K.concat(t,[K.partial(1,1)]);for(let r=t.length+2;r&15;r++)t.push(0);for(t.push(Math.floor(n._length/4294967296)),t.push(n._length|0);t.length;)n._block(t.splice(0,16));return n.reset(),e}_f(n,t,e,r){if(n<=19)return t&e|~t&r;if(n<=39)return t^e^r;if(n<=59)return t&e|t&r|e&r;if(n<=79)return t^e^r}_S(n,t){return t<<n|t>>>32-n}_block(n){const t=this,e=t._h,r=Array(80);for(let _=0;_<16;_++)r[_]=n[_];let s=e[0],i=e[1],a=e[2],o=e[3],l=e[4];for(let _=0;_<=79;_++){_>=16&&(r[_]=t._S(1,r[_-3]^r[_-8]^r[_-14]^r[_-16]));const f=t._S(5,s)+t._f(_,i,a,o)+l+r[_]+t._key[Math.floor(_/20)]|0;l=o,o=a,a=t._S(30,i),i=s,s=f}e[0]=e[0]+s|0,e[1]=e[1]+i|0,e[2]=e[2]+a|0,e[3]=e[3]+o|0,e[4]=e[4]+l|0}};const Zn={};Zn.aes=class{constructor(n){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const e=t._tables[0][4],r=t._tables[1],s=n.length;let i,a,o,l=1;if(s!==4&&s!==6&&s!==8)throw new Error("invalid aes key size");for(t._key=[a=n.slice(0),o=[]],i=s;i<4*s+28;i++){let _=a[i-1];(i%s===0||s===8&&i%s===4)&&(_=e[_>>>24]<<24^e[_>>16&255]<<16^e[_>>8&255]<<8^e[_&255],i%s===0&&(_=_<<8^_>>>24^l<<24,l=l<<1^(l>>7)*283)),a[i]=a[i-s]^_}for(let _=0;i;_++,i--){const f=a[_&3?i:i-4];i<=4||_<4?o[_]=f:o[_]=r[0][e[f>>>24]]^r[1][e[f>>16&255]]^r[2][e[f>>8&255]]^r[3][e[f&255]]}}encrypt(n){return this._crypt(n,0)}decrypt(n){return this._crypt(n,1)}_precompute(){const n=this._tables[0],t=this._tables[1],e=n[4],r=t[4],s=[],i=[];let a,o,l,_;for(let f=0;f<256;f++)i[(s[f]=f<<1^(f>>7)*283)^f]=f;for(let f=a=0;!e[f];f^=o||1,a=i[a]||1){let b=a^a<<1^a<<2^a<<3^a<<4;b=b>>8^b&255^99,e[f]=b,r[b]=f,_=s[l=s[o=s[f]]];let h=_*16843009^l*65537^o*257^f*16843008,S=s[b]*257^b*16843008;for(let C=0;C<4;C++)n[C][f]=S=S<<24^S>>>8,t[C][b]=h=h<<24^h>>>8}for(let f=0;f<5;f++)n[f]=n[f].slice(0),t[f]=t[f].slice(0)}_crypt(n,t){if(n.length!==4)throw new Error("invalid aes block size");const e=this._key[t],r=e.length/4-2,s=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],l=i[2],_=i[3],f=i[4];let b=n[0]^e[0],h=n[t?3:1]^e[1],S=n[2]^e[2],C=n[t?1:3]^e[3],u=4,c,d,y;for(let g=0;g<r;g++)c=a[b>>>24]^o[h>>16&255]^l[S>>8&255]^_[C&255]^e[u],d=a[h>>>24]^o[S>>16&255]^l[C>>8&255]^_[b&255]^e[u+1],y=a[S>>>24]^o[C>>16&255]^l[b>>8&255]^_[h&255]^e[u+2],C=a[C>>>24]^o[b>>16&255]^l[h>>8&255]^_[S&255]^e[u+3],u+=4,b=c,h=d,S=y;for(let g=0;g<4;g++)s[t?3&-g:g]=f[b>>>24]<<24^f[h>>16&255]<<16^f[S>>8&255]<<8^f[C&255]^e[u++],c=b,b=h,h=S,S=C,C=c;return s}};const ei={getRandomValues(n){const t=new Uint32Array(n.buffer),e=r=>{let s=987654321;const i=4294967295;return function(){return s=36969*(s&65535)+(s>>16)&i,r=18e3*(r&65535)+(r>>16)&i,(((s<<16)+r&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,s;r<n.length;r+=4){const i=e((s||Math.random())*4294967296);s=i()*987654071,t[r/4]=i()*4294967296|0}return n}},Kn={};Kn.ctrGladman=class{constructor(n,t){this._prf=n,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(n){return this.calculate(this._prf,n,this._iv)}incWord(n){if((n>>24&255)===255){let t=n>>16&255,e=n>>8&255,r=n&255;t===255?(t=0,e===255?(e=0,r===255?r=0:++r):++e):++t,n=0,n+=t<<16,n+=e<<8,n+=r}else n+=1<<24;return n}incCounter(n){(n[0]=this.incWord(n[0]))===0&&(n[1]=this.incWord(n[1]))}calculate(n,t,e){let r;if(!(r=t.length))return[];const s=K.bitLength(t);for(let i=0;i<r;i+=4){this.incCounter(e);const a=n.encrypt(e);t[i]^=a[0],t[i+1]^=a[1],t[i+2]^=a[2],t[i+3]^=a[3]}return K.clamp(t,s)}};const we={importKey(n){return new we.hmacSha1(qe.bytes.toBits(n))},pbkdf2(n,t,e,r){if(e=e||1e4,r<0||e<0)throw new Error("invalid params to pbkdf2");const s=(r>>5)+1<<2;let i,a,o,l,_;const f=new ArrayBuffer(s),b=new DataView(f);let h=0;const S=K;for(t=qe.bytes.toBits(t),_=1;h<(s||1);_++){for(i=a=n.encrypt(S.concat(t,[_])),o=1;o<e;o++)for(a=n.encrypt(a),l=0;l<a.length;l++)i[l]^=a[l];for(o=0;h<(s||1)&&o<i.length;o++)b.setInt32(h,i[o]),h+=4}return f.slice(0,r/8)}};we.hmacSha1=class{constructor(n){const t=this,e=t._hash=Vn.sha1,r=[[],[]];t._baseHash=[new e,new e];const s=t._baseHash[0].blockSize/32;n.length>s&&(n=new e().update(n).finalize());for(let i=0;i<s;i++)r[0][i]=n[i]^909522486,r[1][i]=n[i]^1549556828;t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new e(t._baseHash[0])}reset(){const n=this;n._resultHash=new n._hash(n._baseHash[0]),n._updated=!1}update(n){const t=this;t._updated=!0,t._resultHash.update(n)}digest(){const n=this,t=n._resultHash.finalize(),e=new n._hash(n._baseHash[1]).update(t).finalize();return n.reset(),e}encrypt(n){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(n),this.digest(n)}};const ti=typeof crypto!=de&&typeof crypto.getRandomValues==ke,wt="Invalid password",gt="Invalid signature",bt="zipjs-abort-check-password";function Xn(n){return ti?crypto.getRandomValues(n):ei.getRandomValues(n)}const be=16,ni="raw",$n={name:"PBKDF2"},ri={name:"HMAC"},si="SHA-1",ii=Object.assign({hash:ri},$n),ct=Object.assign({iterations:1e3,hash:{name:si}},$n),ai=["deriveBits"],Re=[8,12,16],Te=[16,24,32],ae=10,oi=[0,0,0,0],Ge=typeof crypto!=de,De=Ge&&crypto.subtle,Jn=Ge&&typeof De!=de,z=qe.bytes,ci=Zn.aes,li=Kn.ctrGladman,fi=we.hmacSha1;let wn=Ge&&Jn&&typeof De.importKey==ke,gn=Ge&&Jn&&typeof De.deriveBits==ke;class ui extends TransformStream{constructor({password:t,rawPassword:e,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(a=>this.resolveReady=a),password:er(t,e),signed:r,strength:s-1,pending:new Uint8Array})},async transform(a,o){const l=this,{password:_,strength:f,resolveReady:b,ready:h}=l;_?(await _i(l,f,_,Q(a,0,Re[f]+2)),a=Q(a,Re[f]+2),i?o.error(new Error(bt)):b()):await h;const S=new Uint8Array(a.length-ae-(a.length-ae)%be);o.enqueue(Qn(l,a,S,0,ae,!0))},async flush(a){const{signed:o,ctr:l,hmac:_,pending:f,ready:b}=this;if(_&&l){await b;const h=Q(f,0,f.length-ae),S=Q(f,f.length-ae);let C=new Uint8Array;if(h.length){const u=Ce(z,h);_.update(u);const c=l.update(u);C=Ae(z,c)}if(o){const u=Q(Ae(z,_.digest()),0,ae);for(let c=0;c<ae;c++)if(u[c]!=S[c])throw new Error(gt)}a.enqueue(C)}}})}}class di extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){let s;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:er(t,e),strength:r-1,pending:new Uint8Array})},async transform(i,a){const o=this,{password:l,strength:_,resolveReady:f,ready:b}=o;let h=new Uint8Array;l?(h=await hi(o,_,l),f()):await b;const S=new Uint8Array(h.length+i.length-i.length%be);S.set(h,0),a.enqueue(Qn(o,i,S,h.length,0))},async flush(i){const{ctr:a,hmac:o,pending:l,ready:_}=this;if(o&&a){await _;let f=new Uint8Array;if(l.length){const b=a.update(Ce(z,l));o.update(b),f=Ae(z,b)}s.signature=Ae(z,o.digest()).slice(0,ae),i.enqueue(yt(f,s.signature))}}}),s=this}}function Qn(n,t,e,r,s,i){const{ctr:a,hmac:o,pending:l}=n,_=t.length-s;l.length&&(t=yt(l,t),e=wi(e,_-_%be));let f;for(f=0;f<=_-be;f+=be){const b=Ce(z,Q(t,f,f+be));i&&o.update(b);const h=a.update(b);i||o.update(h),e.set(Ae(z,h),f+r)}return n.pending=Q(t,f),e}async function _i(n,t,e,r){const s=await zn(n,t,e,Q(r,0,Re[t])),i=Q(r,Re[t]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(wt)}async function hi(n,t,e){const r=Xn(new Uint8Array(Re[t])),s=await zn(n,t,e,r);return yt(r,s)}async function zn(n,t,e,r){n.password=null;const s=await pi(ni,e,ii,!1,ai),i=await mi(Object.assign({salt:r},ct),s,8*(Te[t]*2+2)),a=new Uint8Array(i),o=Ce(z,Q(a,0,Te[t])),l=Ce(z,Q(a,Te[t],Te[t]*2)),_=Q(a,Te[t]*2);return Object.assign(n,{keys:{key:o,authentication:l,passwordVerification:_},ctr:new li(new ci(o),Array.from(oi)),hmac:new fi(l)}),_}async function pi(n,t,e,r,s){if(wn)try{return await De.importKey(n,t,e,r,s)}catch{return wn=!1,we.importKey(t)}else return we.importKey(t)}async function mi(n,t,e){if(gn)try{return await De.deriveBits(n,t,e)}catch{return gn=!1,we.pbkdf2(t,n.salt,ct.iterations,e)}else return we.pbkdf2(t,n.salt,ct.iterations,e)}function er(n,t){return t===V?zs(n):t}function yt(n,t){let e=n;return n.length+t.length&&(e=new Uint8Array(n.length+t.length),e.set(n,0),e.set(t,n.length)),e}function wi(n,t){if(t&&t>n.length){const e=n;n=new Uint8Array(t),n.set(e,0)}return n}function Q(n,t,e){return n.subarray(t,e)}function Ae(n,t){return n.fromBits(t)}function Ce(n,t){return n.toBits(t)}const ye=12;class gi extends TransformStream{constructor({password:t,passwordVerification:e,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),tr(this,t)},transform(s,i){const a=this;if(a.password){const o=bn(a,s.subarray(0,ye));if(a.password=null,o[ye-1]!=a.passwordVerification)throw new Error(wt);s=s.subarray(ye)}r?i.error(new Error(bt)):i.enqueue(bn(a,s))}})}}class bi extends TransformStream{constructor({password:t,passwordVerification:e}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),tr(this,t)},transform(r,s){const i=this;let a,o;if(i.password){i.password=null;const l=Xn(new Uint8Array(ye));l[ye-1]=i.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(yn(i,l),0),o=ye}else a=new Uint8Array(r.length),o=0;a.set(yn(i,r),o),s.enqueue(a)}})}}function bn(n,t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=nr(n)^t[r],xt(n,e[r]);return e}function yn(n,t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=nr(n)^t[r],xt(n,t[r]);return e}function tr(n,t){const e=[305419896,591751049,878082192];Object.assign(n,{keys:e,crcKey0:new je(e[0]),crcKey2:new je(e[2])});for(let r=0;r<t.length;r++)xt(n,t.charCodeAt(r))}function xt(n,t){let[e,r,s]=n.keys;n.crcKey0.append([t]),e=~n.crcKey0.get(),r=xn(Math.imul(xn(r+rr(e)),134775813)+1),n.crcKey2.append([r>>>24]),s=~n.crcKey2.get(),n.keys=[e,r,s]}function nr(n){const t=n.keys[2]|2;return rr(Math.imul(t,t^1)>>>8)}function rr(n){return n&255}function xn(n){return n&4294967295}const En="deflate-raw";class yi extends TransformStream{constructor(t,{chunkSize:e,CompressionStream:r,CompressionStreamNative:s}){super({});const{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:_,level:f}=t,b=this;let h,S,C=sr(super.readable);(!a||l)&&_&&(h=new Gn,C=ee(C,h)),i&&(C=ar(C,o,{level:f,chunkSize:e},s,r)),a&&(l?C=ee(C,new bi(t)):(S=new di(t),C=ee(C,S))),ir(b,C,()=>{let u;a&&!l&&(u=S.signature),(!a||l)&&_&&(u=new DataView(h.value.buffer).getUint32(0)),b.signature=u})}}class xi extends TransformStream{constructor(t,{chunkSize:e,DecompressionStream:r,DecompressionStreamNative:s}){super({});const{zipCrypto:i,encrypted:a,signed:o,signature:l,compressed:_,useCompressionStream:f}=t;let b,h,S=sr(super.readable);a&&(i?S=ee(S,new gi(t)):(h=new ui(t),S=ee(S,h))),_&&(S=ar(S,f,{chunkSize:e},s,r)),(!a||i)&&o&&(b=new Gn,S=ee(S,b)),ir(this,S,()=>{if((!a||i)&&o){const C=new DataView(b.value.buffer);if(l!=C.getUint32(0,!1))throw new Error(gt)}})}}function sr(n){return ee(n,new TransformStream({transform(t,e){t&&t.length&&e.enqueue(t)}}))}function ir(n,t,e){t=ee(t,new TransformStream({flush:e})),Object.defineProperty(n,"readable",{get(){return t}})}function ar(n,t,e,r,s){try{const i=t&&r?r:s;n=ee(n,new i(En,e))}catch{if(t)try{n=ee(n,new s(En,e))}catch{return n}else return n}return n}function ee(n,t){return n.pipeThrough(t)}const Ei="message",Ti="start",Si="pull",Tn="data",Ri="ack",Sn="close",Ai="deflate",or="inflate";class Ci extends TransformStream{constructor(t,e){super({});const r=this,{codecType:s}=t;let i;s.startsWith(Ai)?i=yi:s.startsWith(or)&&(i=xi);let a=0,o=0;const l=new i(t,e),_=super.readable,f=new TransformStream({transform(h,S){h&&h.length&&(o+=h.length,S.enqueue(h))},flush(){Object.assign(r,{inputSize:o})}}),b=new TransformStream({transform(h,S){h&&h.length&&(a+=h.length,S.enqueue(h))},flush(){const{signature:h}=l;Object.assign(r,{signature:h,outputSize:a,inputSize:o})}});Object.defineProperty(r,"readable",{get(){return _.pipeThrough(f).pipeThrough(l).pipeThrough(b)}})}}class Ii extends TransformStream{constructor(t){let e;super({transform:r,flush(s){e&&e.length&&s.enqueue(e)}});function r(s,i){if(e){const a=new Uint8Array(e.length+s.length);a.set(e),a.set(s,e.length),s=a,e=null}s.length>t?(i.enqueue(s.slice(0,t)),r(s.slice(t),i)):e=s}}}let cr=typeof Worker!=de;class tt{constructor(t,{readable:e,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:_},f){const{signal:b}=a;return Object.assign(t,{busy:!0,readable:e.pipeThrough(new Ii(i.chunkSize)).pipeThrough(new Oi(e,a),{signal:b}),writable:r,options:Object.assign({},s),scripts:_,transferStreams:l,terminate(){return new Promise(h=>{const{worker:S,busy:C}=t;S?(C?t.resolveTerminated=h:(S.terminate(),h()),t.interface=null):h()})},onTaskFinished(){const{resolveTerminated:h}=t;h&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),h()),t.busy=!1,f(t)}}),(o&&cr?ki:lr)(t,i)}}class Oi extends TransformStream{constructor(t,{onstart:e,onprogress:r,size:s,onend:i}){let a=0;super({async start(){e&&await nt(e,s)},async transform(o,l){a+=o.length,r&&await nt(r,a,s),l.enqueue(o)},async flush(){t.size=a,i&&await nt(i,a)}})}}async function nt(n,...t){try{await n(...t)}catch{}}function lr(n,t){return{run:()=>Di(n,t)}}function ki(n,t){const{baseURL:e,chunkSize:r}=t;if(!n.interface){let s;try{s=Fi(n.scripts[0],e,n)}catch{return cr=!1,lr(n,t)}Object.assign(n,{worker:s,interface:{run:()=>Pi(n,{chunkSize:r})}})}return n.interface}async function Di({options:n,readable:t,writable:e,onTaskFinished:r},s){try{const i=new Ci(n,s);await t.pipeThrough(i).pipeTo(e,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:l}=i;return{signature:a,inputSize:o,outputSize:l}}finally{r()}}async function Pi(n,t){let e,r;const s=new Promise((h,S)=>{e=h,r=S});Object.assign(n,{reader:null,writer:null,resolveResult:e,rejectResult:r,result:s});const{readable:i,options:a,scripts:o}=n,{writable:l,closed:_}=vi(n.writable),f=Ue({type:Ti,scripts:o.slice(1),options:a,config:t,readable:i,writable:l},n);f||Object.assign(n,{reader:i.getReader(),writer:l.getWriter()});const b=await s;return f||await l.getWriter().close(),await _,b}function vi(n){let t;const e=new Promise(s=>t=s);return{writable:new WritableStream({async write(s){const i=n.getWriter();await i.ready,await i.write(s),i.releaseLock()},close(){t()},abort(s){return n.getWriter().abort(s)}}),closed:e}}let Rn=!0,An=!0;function Fi(n,t,e){const r={type:"module"};let s,i;typeof n==ke&&(n=n());try{s=new URL(n,t)}catch{s=n}if(Rn)try{i=new Worker(s)}catch{Rn=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(Ei,a=>Ni(a,e)),i}function Ue(n,{worker:t,writer:e,onTaskFinished:r,transferStreams:s}){try{const{value:i,readable:a,writable:o}=n,l=[];if(i&&(i.byteLength<i.buffer.byteLength?n.value=i.buffer.slice(0,i.byteLength):n.value=i.buffer,l.push(n.value)),s&&An?(a&&l.push(a),o&&l.push(o)):n.readable=n.writable=null,l.length)try{return t.postMessage(n,l),!0}catch{An=!1,n.readable=n.writable=null,t.postMessage(n)}else t.postMessage(n)}catch(i){throw e&&e.releaseLock(),r(),i}}async function Ni({data:n},t){const{type:e,value:r,messageId:s,result:i,error:a}=n,{reader:o,writer:l,resolveResult:_,rejectResult:f,onTaskFinished:b}=t;try{if(a){const{message:S,stack:C,code:u,name:c}=a,d=new Error(S);Object.assign(d,{stack:C,code:u,name:c}),h(d)}else{if(e==Si){const{value:S,done:C}=await o.read();Ue({type:Tn,value:S,done:C,messageId:s},t)}e==Tn&&(await l.ready,await l.write(new Uint8Array(r)),Ue({type:Ri,messageId:s},t)),e==Sn&&h(null,i)}}catch(S){Ue({type:Sn,messageId:s},t),h(S)}function h(S,C){S?f(S):_(C),l&&l.releaseLock(),b()}}let fe=[];const rt=[];let Cn=0;async function Li(n,t){const{options:e,config:r}=t,{transferStreams:s,useWebWorkers:i,useCompressionStream:a,codecType:o,compressed:l,signed:_,encrypted:f}=e,{workerScripts:b,maxWorkers:h}=r;t.transferStreams=s||s===V;const S=!l&&!_&&!f&&!t.transferStreams;return t.useWebWorkers=!S&&(i||i===V&&r.useWebWorkers),t.scripts=t.useWebWorkers&&b?b[o]:[],e.useCompressionStream=a||a===V&&r.useCompressionStream,(await C()).run();async function C(){const c=fe.find(d=>!d.busy);if(c)return lt(c),new tt(c,n,t,u);if(fe.length<h){const d={indexWorker:Cn};return Cn++,fe.push(d),new tt(d,n,t,u)}else return new Promise(d=>rt.push({resolve:d,stream:n,workerOptions:t}))}function u(c){if(rt.length){const[{resolve:d,stream:y,workerOptions:g}]=rt.splice(0,1);d(new tt(c,y,g,u))}else c.worker?(lt(c),Mi(c,t)):fe=fe.filter(d=>d!=c)}}function Mi(n,t){const{config:e}=t,{terminateWorkerTimeout:r}=e;Number.isFinite(r)&&r>=0&&(n.terminated?n.terminated=!1:n.terminateTimeout=setTimeout(async()=>{fe=fe.filter(s=>s!=n);try{await n.terminate()}catch{}},r))}function lt(n){const{terminateTimeout:t}=n;t&&(clearTimeout(t),n.terminateTimeout=null)}async function Ui(){await Promise.allSettled(fe.map(n=>(lt(n),n.terminate())))}const fr="HTTP error ",Pe="HTTP Range not supported",ur="Writer iterator completed too soon",Wi="text/plain",Hi="Content-Length",Bi="Content-Range",ji="Accept-Ranges",qi="Range",Yi="Content-Type",Gi="HEAD",Et="GET",dr="bytes",Vi=64*1024,Tt="writable";class Ve{constructor(){this.size=0}init(){this.initialized=!0}}class _e extends Ve{get readable(){const t=this,{chunkSize:e=Vi}=t,r=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:i=0,size:a,diskNumberStart:o}=r,{chunkOffset:l}=this;s.enqueue(await G(t,i+l,Math.min(e,a-l),o)),l+e>a?s.close():this.chunkOffset+=e}});return r}}class St extends Ve{constructor(){super();const t=this,e=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,Tt,{get(){return e}})}writeUint8Array(){}}class Zi extends _e{constructor(t){super();let e=t.length;for(;t.charAt(e-1)=="=";)e--;const r=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:r,size:Math.floor((e-r)*.75)})}readUint8Array(t,e){const{dataStart:r,dataURI:s}=this,i=new Uint8Array(e),a=Math.floor(t/3)*4,o=atob(s.substring(a+r,Math.ceil((t+e)/3)*4+r)),l=t-Math.floor(a/4)*3;for(let _=l;_<l+e;_++)i[_-l]=o.charCodeAt(_);return i}}class Ki extends St{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){const e=this;let r=0,s=e.pending;const i=e.pending.length;for(e.pending="",r=0;r<Math.floor((i+t.length)/3)*3-i;r++)s+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.pending+=String.fromCharCode(t[r]);s.length>2?e.data+=btoa(s):e.pending=s}getData(){return this.data+btoa(this.pending)}}class Rt extends _e{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,e){const r=this,s=t+e;let a=await(t||s<r.size?r.blob.slice(t,s):r.blob).arrayBuffer();return a.byteLength>e&&(a=a.slice(t,s)),new Uint8Array(a)}}class _r extends Ve{constructor(t){super();const e=this,r=new TransformStream,s=[];t&&s.push([Yi,t]),Object.defineProperty(e,Tt,{get(){return r.writable}}),e.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class Xi extends Rt{constructor(t){super(new Blob([t],{type:Wi}))}}class $i extends _r{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:e}=this,r=await super.getData();if(r.text&&e)return r.text();{const s=new FileReader;return new Promise((i,a)=>{Object.assign(s,{onload:({target:o})=>i(o.result),onerror:()=>a(s.error)}),s.readAsText(r,t)})}}}class Ji extends _e{constructor(t,e){super(),hr(this,t,e)}async init(){await pr(this,ft,In),super.init()}readUint8Array(t,e){return mr(this,t,e,ft,In)}}class Qi extends _e{constructor(t,e){super(),hr(this,t,e)}async init(){await pr(this,ut,On),super.init()}readUint8Array(t,e){return mr(this,t,e,ut,On)}}function hr(n,t,e){const{preventHeadRequest:r,useRangeHeader:s,forceRangeRequests:i,combineSizeEocd:a}=e;e=Object.assign({},e),delete e.preventHeadRequest,delete e.useRangeHeader,delete e.forceRangeRequests,delete e.combineSizeEocd,delete e.useXHR,Object.assign(n,{url:t,options:e,preventHeadRequest:r,useRangeHeader:s,forceRangeRequests:i,combineSizeEocd:a})}async function pr(n,t,e){const{url:r,preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=n;if(na(r)&&(i||a)&&(typeof s>"u"||s)){const l=await t(Et,n,wr(n,o?-22:void 0));if(!a&&l.headers.get(ji)!=dr)throw new Error(Pe);{o&&(n.eocdCache=new Uint8Array(await l.arrayBuffer()));let _;const f=l.headers.get(Bi);if(f){const b=f.trim().split(/\s*\/\s*/);if(b.length){const h=b[1];h&&h!="*"&&(_=Number(h))}}_===V?await kn(n,t,e):n.size=_}}else await kn(n,t,e)}async function mr(n,t,e,r,s){const{useRangeHeader:i,forceRangeRequests:a,eocdCache:o,size:l,options:_}=n;if(i||a){if(o&&t==l-ce&&e==ce)return o;const f=await r(Et,n,wr(n,t,e));if(f.status!=206)throw new Error(Pe);return new Uint8Array(await f.arrayBuffer())}else{const{data:f}=n;return f||await s(n,_),new Uint8Array(n.data.subarray(t,t+e))}}function wr(n,t=0,e=1){return Object.assign({},At(n),{[qi]:dr+"="+(t<0?t:t+"-"+(t+e-1))})}function At({options:n}){const{headers:t}=n;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function In(n){await gr(n,ft)}async function On(n){await gr(n,ut)}async function gr(n,t){const e=await t(Et,n,At(n));n.data=new Uint8Array(await e.arrayBuffer()),n.size||(n.size=n.data.length)}async function kn(n,t,e){if(n.preventHeadRequest)await e(n,n.options);else{const s=(await t(Gi,n,At(n))).headers.get(Hi);s?n.size=Number(s):await e(n,n.options)}}async function ft(n,{options:t,url:e},r){const s=await fetch(e,Object.assign({},t,{method:n,headers:r}));if(s.status<400)return s;throw s.status==416?new Error(Pe):new Error(fr+(s.statusText||s.status))}function ut(n,{url:t},e){return new Promise((r,s)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status<400){const a=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(o=>{const l=o.trim().split(/\s*:\s*/);l[0]=l[0].trim().replace(/^[a-z]|-[a-z]/g,_=>_.toUpperCase()),a.push(l)}),r({status:i.status,arrayBuffer:()=>i.response,headers:new Map(a)})}else s(i.status==416?new Error(Pe):new Error(fr+(i.statusText||i.status)))},!1),i.addEventListener("error",a=>s(a.detail?a.detail.error:new Error("Network error")),!1),i.open(n,t),e)for(const a of Object.entries(e))i.setRequestHeader(a[0],a[1]);i.responseType="arraybuffer",i.send()})}class br extends _e{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR?new Qi(t,e):new Ji(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class zi extends br{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}}class ea extends _e{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,e){return this.array.slice(t,t+e)}}class ta extends St{init(t=0){Object.assign(this,{offset:0,array:new Uint8Array(t)}),super.init()}writeUint8Array(t){const e=this;if(e.offset+t.length>e.array.length){const r=e.array;e.array=new Uint8Array(r.length+t.length),e.array.set(r)}e.array.set(t,e.offset),e.offset+=t.length}getData(){return this.array}}class Ct extends _e{constructor(t){super(),this.readers=t}async init(){const t=this,{readers:e}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(e.map(async(r,s)=>{await r.init(),s!=e.length-1&&(t.lastDiskOffset+=r.size),t.size+=r.size})),super.init()}async readUint8Array(t,e,r=0){const s=this,{readers:i}=this;let a,o=r;o==-1&&(o=i.length-1);let l=t;for(;l>=i[o].size;)l-=i[o].size,o++;const _=i[o],f=_.size;if(l+e<=f)a=await G(_,l,e);else{const b=f-l;a=new Uint8Array(e),a.set(await G(_,l,b)),a.set(await s.readUint8Array(t+b,e-b,r),b)}return s.lastDiskNumber=Math.max(o,s.lastDiskNumber),a}}class Ye extends Ve{constructor(t,e=4294967295){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});let s,i,a;const o=new WritableStream({async write(f){const{availableSize:b}=r;if(a)f.length>=b?(await l(f.slice(0,b)),await _(),r.diskOffset+=s.size,r.diskNumber++,a=null,await this.write(f.slice(b))):await l(f);else{const{value:h,done:S}=await t.next();if(S&&!h)throw new Error(ur);s=h,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await Ie(s),i=h.writable,a=i.getWriter(),await this.write(f)}},async close(){await a.ready,await _()}});Object.defineProperty(r,Tt,{get(){return o}});async function l(f){const b=f.length;b&&(await a.ready,await a.write(f),s.size+=b,r.size+=b,r.availableSize-=b)}async function _(){i.size=s.size,await a.close()}}}function na(n){const{baseURL:t}=jn(),{protocol:e}=new URL(n,t);return e=="http:"||e=="https:"}async function Ie(n,t){if(n.init&&!n.initialized)await n.init(t);else return Promise.resolve()}function yr(n){return Array.isArray(n)&&(n=new Ct(n)),n instanceof ReadableStream&&(n={readable:n}),n}function xr(n){n.writable===V&&typeof n.next==ke&&(n=new Ye(n)),n instanceof WritableStream&&(n={writable:n});const{writable:t}=n;return t.size===V&&(t.size=0),n instanceof Ye||Object.assign(n,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),n}function G(n,t,e,r){return n.readUint8Array(t,e,r)}const ra=Ct,sa=Ye,Er="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),ia=Er.length==256;function aa(n){if(ia){let t="";for(let e=0;e<n.length;e++)t+=Er[n[e]];return t}else return new TextDecoder().decode(n)}function We(n,t){return t&&t.trim().toLowerCase()=="cp437"?aa(n):new TextDecoder(t).decode(n)}const Tr="filename",Sr="rawFilename",Rr="comment",Ar="rawComment",Cr="uncompressedSize",Ir="compressedSize",Or="offset",dt="diskNumberStart",_t="lastModDate",ht="rawLastModDate",kr="lastAccessDate",oa="rawLastAccessDate",Dr="creationDate",ca="rawCreationDate",la="internalFileAttribute",fa="internalFileAttributes",ua="externalFileAttribute",da="externalFileAttributes",_a="msDosCompatible",ha="zip64",pa="encrypted",ma="version",wa="versionMadeBy",ga="zipCrypto",ba="directory",ya="executable",xa=[Tr,Sr,Ir,Cr,_t,ht,Rr,Ar,kr,Dr,Or,dt,dt,la,fa,ua,da,_a,ha,pa,ma,wa,ga,ba,ya,"bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Dn{constructor(t){xa.forEach(e=>this[e]=t[e])}}const He="File format is not recognized",Pr="End of central directory not found",vr="End of Zip64 central directory locator not found",Fr="Central directory header not found",Nr="Local file header not found",Lr="Zip64 extra field not found",Mr="File contains encrypted entry",Ur="Encryption method not supported",pt="Compression method not supported",mt="Split zip file",Pn="utf-8",vn="cp437",Ea=[[Cr,me],[Ir,me],[Or,me],[dt,oe]],Ta={[oe]:{getValue:B,bytes:4},[me]:{getValue:Be,bytes:8}};class Wr{constructor(t,e={}){Object.assign(this,{reader:yr(t),options:e,config:jn()})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;const{config:s}=e;if(await Ie(r),(r.size===V||!r.readUint8Array)&&(r=new Rt(await new Response(r.readable).blob()),await Ie(r)),r.size<ce)throw new Error(He);r.chunkSize=Js(s);const i=await ka(r,Us,r.size,ce,oe*16);if(!i){const x=await G(r,0,4),w=q(x);throw B(w)==Ms?new Error(mt):new Error(Pr)}const a=q(i);let o=B(a,12),l=B(a,16);const _=i.offset,f=j(a,20),b=_+ce+f;let h=j(a,4);const S=r.lastDiskNumber||0;let C=j(a,6),u=j(a,8),c=0,d=0;if(l==me||o==me||u==oe||C==oe){const x=await G(r,i.offset-ze,ze),w=q(x);if(B(w,0)==Ws){l=Be(w,8);let O=await G(r,l,et,-1),I=q(O);const v=i.offset-ze-et;if(B(I,0)!=cn&&l!=v){const k=l;l=v,c=l-k,O=await G(r,l,et,-1),I=q(O)}if(B(I,0)!=cn)throw new Error(vr);h==oe&&(h=B(I,16)),C==oe&&(C=B(I,20)),u==oe&&(u=Be(I,32)),o==me&&(o=Be(I,40)),l-=o}}if(l>=r.size&&(c=r.size-l-o-ce,l=r.size-o-ce),S!=h)throw new Error(mt);if(l<0)throw new Error(He);let y=0,g=await G(r,l,o,C),m=q(g);if(o){const x=i.offset-o;if(B(m,y)!=on&&l!=x){const w=l;l=x,c+=l-w,g=await G(r,l,o,C),m=q(g)}}const E=i.offset-l-(r.lastDiskOffset||0);if(o!=E&&E>=0&&(o=E,g=await G(r,l,o,C),m=q(g)),l<0||l>=r.size)throw new Error(He);const p=Z(e,t,"filenameEncoding"),R=Z(e,t,"commentEncoding");for(let x=0;x<u;x++){const w=new Ra(r,s,e.options);if(B(m,y)!=on)throw new Error(Fr);Hr(w,m,y+6);const O=!!w.bitFlag.languageEncodingFlag,I=y+46,v=I+w.filenameLength,k=v+w.extraFieldLength,D=j(m,y+4),U=D>>8==0,F=D>>8==3,Y=g.subarray(I,v),P=j(m,y+32),he=k+P,M=g.subarray(k,he),W=O,It=O,Ze=B(m,y+38),Ot=U&&(xe(m,y+38)&dn)==dn||F&&(Ze>>16&_n)==_n||Y.length&&Y[Y.length-1]==pn.charCodeAt(0),qr=F&&(Ze>>16&hn)==hn,kt=B(m,y+42)+c;Object.assign(w,{versionMadeBy:D,msDosCompatible:U,compressedSize:0,uncompressedSize:0,commentLength:P,directory:Ot,offset:kt,diskNumberStart:j(m,y+34),internalFileAttributes:j(m,y+36),externalFileAttributes:Ze,rawFilename:Y,filenameUTF8:W,commentUTF8:It,rawExtraField:g.subarray(v,k),executable:qr}),w.internalFileAttribute=w.internalFileAttributes,w.externalFileAttribute=w.externalFileAttributes;const Dt=Z(e,t,"decodeText")||We,Pt=W?Pn:p||vn,vt=It?Pn:R||vn;let ve=Dt(Y,Pt);ve===V&&(ve=We(Y,Pt));let Ke=Dt(M,vt);Ke===V&&(Ke=We(M,vt)),Object.assign(w,{rawComment:M,filename:ve,comment:Ke,directory:Ot||ve.endsWith(pn)}),d=Math.max(kt,d),Br(w,w,m,y+6),w.zipCrypto=w.encrypted&&!w.extraFieldAES;const Xe=new Dn(w);Xe.getData=(Nt,Yr)=>w.getData(Nt,Xe,Yr),y=he;const{onprogress:Ft}=t;if(Ft)try{await Ft(x+1,u,new Dn(w))}catch{}yield Xe}const T=Z(e,t,"extractPrependedData"),A=Z(e,t,"extractAppendedData");return T&&(e.prependedData=d>0?await G(r,0,d):new Uint8Array),e.comment=f?await G(r,_+ce,f):new Uint8Array,A&&(e.appendedData=b<r.size?await G(r,b,r.size-b):new Uint8Array),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){}}class Sa{constructor(t={}){const{readable:e,writable:r}=new TransformStream,s=new Wr(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(i){const{done:a,value:o}=await s.next();if(a)return i.close();const l={...o,readable:function(){const{readable:_,writable:f}=new TransformStream;if(o.getData)return o.getData(f),_}()};delete l.getData,i.enqueue(l)}}),this.writable=r}}class Ra{constructor(t,e,r){Object.assign(this,{reader:t,config:e,options:r})}async getData(t,e,r={}){const s=this,{reader:i,offset:a,diskNumberStart:o,extraFieldAES:l,compressionMethod:_,config:f,bitFlag:b,signature:h,rawLastModDate:S,uncompressedSize:C,compressedSize:u}=s,c=e.localDirectory={},d=await G(i,a,30,o),y=q(d);let g=Z(s,r,"password"),m=Z(s,r,"rawPassword");const E=Z(s,r,"passThrough");if(g=g&&g.length&&g,m=m&&m.length&&m,l&&l.originalCompressionMethod!=Ns)throw new Error(pt);if(_!=Fs&&_!=vs&&!E)throw new Error(pt);if(B(y,0)!=Ls)throw new Error(Nr);Hr(c,y,4),c.rawExtraField=c.extraFieldLength?await G(i,a+30+c.filenameLength,c.extraFieldLength,o):new Uint8Array,Br(s,c,y,4,!0),Object.assign(e,{lastAccessDate:c.lastAccessDate,creationDate:c.creationDate});const p=s.encrypted&&c.encrypted&&!E,R=p&&!l;if(E||(e.zipCrypto=R),p){if(!R&&l.strength===V)throw new Error(Ur);if(!g&&!m)throw new Error(Mr)}const T=a+30+c.filenameLength+c.extraFieldLength,A=u,x=i.readable;Object.assign(x,{diskNumberStart:o,offset:T,size:A});const w=Z(s,r,"signal"),O=Z(s,r,"checkPasswordOnly");O&&(t=new WritableStream),t=xr(t),await Ie(t,E?u:C);const{writable:I}=t,{onstart:v,onprogress:k,onend:D}=r,U={options:{codecType:or,password:g,rawPassword:m,zipCrypto:R,encryptionStrength:l&&l.strength,signed:Z(s,r,"checkSignature")&&!E,passwordVerification:R&&(b.dataDescriptor?S>>>8&255:h>>>24&255),signature:h,compressed:_!=0&&!E,encrypted:s.encrypted&&!E,useWebWorkers:Z(s,r,"useWebWorkers"),useCompressionStream:Z(s,r,"useCompressionStream"),transferStreams:Z(s,r,"transferStreams"),checkPasswordOnly:O},config:f,streamOptions:{signal:w,size:A,onstart:v,onprogress:k,onend:D}};let F=0;try{({outputSize:F}=await Li({readable:x,writable:I},U))}catch(Y){if(!O||Y.message!=bt)throw Y}finally{const Y=Z(s,r,"preventClose");I.size+=F,!Y&&!I.locked&&await I.getWriter().close()}return O?V:t.getData?t.getData():I}}function Hr(n,t,e){const r=n.rawBitFlag=j(t,e+2),s=(r&ln)==ln,i=B(t,e+6);Object.assign(n,{encrypted:s,version:j(t,e),bitFlag:{level:(r&Ks)>>1,dataDescriptor:(r&fn)==fn,languageEncodingFlag:(r&un)==un},rawLastModDate:i,lastModDate:Da(i),filenameLength:j(t,e+22),extraFieldLength:j(t,e+24)})}function Br(n,t,e,r,s){const{rawExtraField:i}=t,a=t.extraField=new Map,o=q(new Uint8Array(i));let l=0;try{for(;l<i.length;){const d=j(o,l),y=j(o,l+2);a.set(d,{type:d,data:i.slice(l+4,l+4+y)}),l+=4+y}}catch{}const _=j(e,r+4);Object.assign(t,{signature:B(e,r+10),uncompressedSize:B(e,r+18),compressedSize:B(e,r+14)});const f=a.get(Hs);f&&(Aa(f,t),t.extraFieldZip64=f);const b=a.get(Gs);b&&(Fn(b,Tr,Sr,t,n),t.extraFieldUnicodePath=b);const h=a.get(Vs);h&&(Fn(h,Rr,Ar,t,n),t.extraFieldUnicodeComment=h);const S=a.get(Bs);S?(Ca(S,t,_),t.extraFieldAES=S):t.compressionMethod=_;const C=a.get(js);C&&(Ia(C,t),t.extraFieldNTFS=C);const u=a.get(Ys);u&&(Oa(u,t,s),t.extraFieldExtendedTimestamp=u);const c=a.get(Zs);c&&(t.extraFieldUSDZ=c)}function Aa(n,t){t.zip64=!0;const e=q(n.data),r=Ea.filter(([s,i])=>t[s]==i);for(let s=0,i=0;s<r.length;s++){const[a,o]=r[s];if(t[a]==o){const l=Ta[o];t[a]=n[a]=l.getValue(e,i),i+=l.bytes}else if(n[a])throw new Error(Lr)}}function Fn(n,t,e,r,s){const i=q(n.data),a=new je;a.append(s[e]);const o=q(new Uint8Array(4));o.setUint32(0,a.get(),!0);const l=B(i,1);Object.assign(n,{version:xe(i,0),[t]:We(n.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&l==B(o,0)}),n.valid&&(r[t]=n[t],r[t+"UTF8"]=!0)}function Ca(n,t,e){const r=q(n.data),s=xe(r,4);Object.assign(n,{vendorVersion:xe(r,0),vendorId:xe(r,2),strength:s,originalCompressionMethod:e,compressionMethod:j(r,5)}),t.compressionMethod=n.compressionMethod}function Ia(n,t){const e=q(n.data);let r=4,s;try{for(;r<n.data.length&&!s;){const i=j(e,r),a=j(e,r+2);i==qs&&(s=n.data.slice(r+4,r+4+a)),r+=4+a}}catch{}try{if(s&&s.length==24){const i=q(s),a=i.getBigUint64(0,!0),o=i.getBigUint64(8,!0),l=i.getBigUint64(16,!0);Object.assign(n,{rawLastModDate:a,rawLastAccessDate:o,rawCreationDate:l});const _=st(a),f=st(o),b=st(l),h={lastModDate:_,lastAccessDate:f,creationDate:b};Object.assign(n,h),Object.assign(t,h)}}catch{}}function Oa(n,t,e){const r=q(n.data),s=xe(r,0),i=[],a=[];e?((s&1)==1&&(i.push(_t),a.push(ht)),(s&2)==2&&(i.push(kr),a.push(oa)),(s&4)==4&&(i.push(Dr),a.push(ca))):n.data.length>=5&&(i.push(_t),a.push(ht));let o=1;i.forEach((l,_)=>{if(n.data.length>=o+4){const f=B(r,o);t[l]=n[l]=new Date(f*1e3);const b=a[_];n[b]=f}o+=4})}async function ka(n,t,e,r,s){const i=new Uint8Array(4),a=q(i);Pa(a,0,t);const o=r+s;return await l(r)||await l(Math.min(o,e));async function l(_){const f=e-_,b=await G(n,f,_);for(let h=b.length-r;h>=0;h--)if(b[h]==i[0]&&b[h+1]==i[1]&&b[h+2]==i[2]&&b[h+3]==i[3])return{offset:f+h,buffer:b.slice(h,h+r).buffer}}}function Z(n,t,e){return t[e]===V?n.options[e]:t[e]}function Da(n){const t=(n&4294901760)>>16,e=n&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(e&63488)>>11,(e&2016)>>5,(e&31)*2,0)}catch{}}function st(n){return new Date(Number(n/BigInt(1e4)-BigInt(116444736e5)))}function xe(n,t){return n.getUint8(t)}function j(n,t){return n.getUint16(t,!0)}function B(n,t){return n.getUint32(t,!0)}function Be(n,t){return Number(n.getBigUint64(t,!0))}function Pa(n,t,e){n.setUint32(t,e,!0)}function q(n){return new DataView(n.buffer)}qn({Inflate:Ps});const va=Object.freeze(Object.defineProperty({__proto__:null,BlobReader:Rt,BlobWriter:_r,Data64URIReader:Zi,Data64URIWriter:Ki,ERR_BAD_FORMAT:He,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Fr,ERR_ENCRYPTED:Mr,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:vr,ERR_EOCDR_NOT_FOUND:Pr,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Lr,ERR_HTTP_RANGE:Pe,ERR_INVALID_PASSWORD:wt,ERR_INVALID_SIGNATURE:gt,ERR_ITERATOR_COMPLETED_TOO_SOON:ur,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Nr,ERR_SPLIT_ZIP_FILE:mt,ERR_UNSUPPORTED_COMPRESSION:pt,ERR_UNSUPPORTED_ENCRYPTION:Ur,HttpRangeReader:zi,HttpReader:br,Reader:_e,SplitDataReader:Ct,SplitDataWriter:Ye,SplitZipReader:ra,SplitZipWriter:sa,TextReader:Xi,TextWriter:$i,Uint8ArrayReader:ea,Uint8ArrayWriter:ta,Writer:St,ZipReader:Wr,ZipReaderStream:Sa,configure:qn,getMimeType:Qs,initReader:yr,initStream:Ie,initWriter:xr,readUint8Array:G,terminateWorkers:Ui},Symbol.toStringTag,{value:"Module"})),Se=va;class Fa{constructor(t,e,r){N(this,"_zipReader");N(this,"_entriesPromise");N(this,"_traceURL");this._traceURL=t,Se.configure({baseURL:self.location.href}),this._zipReader=new Se.ZipReader(new Se.HttpReader(La(t,e),{mode:"cors",preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:r}).then(s=>{const i=new Map;for(const a of s)i.set(a.filename,a);return i})}isLive(){return!1}traceURL(){return this._traceURL}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(t){return(await this._entriesPromise).has(t)}async readText(t){var i;const r=(await this._entriesPromise).get(t);if(!r)return;const s=new Se.TextWriter;return await((i=r.getData)==null?void 0:i.call(r,s)),s.getData()}async readBlob(t){const r=(await this._entriesPromise).get(t);if(!r)return;const s=new Se.BlobWriter;return await r.getData(s),s.getData()}}class Na{constructor(t,e){N(this,"_entriesPromise");N(this,"_path");N(this,"_server");this._path=t,this._server=e,this._entriesPromise=e.readFile(t).then(async r=>{if(!r)throw new Error("File not found");const s=await r.json(),i=new Map;for(const a of s.entries)i.set(a.name,a.path);return i})}isLive(){return!0}traceURL(){return this._path}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(t){return(await this._entriesPromise).has(t)}async readText(t){const e=await this._readEntry(t);return e==null?void 0:e.text()}async readBlob(t){const e=await this._readEntry(t);return(e==null?void 0:e.status)===200?await(e==null?void 0:e.blob()):void 0}async _readEntry(t){const r=(await this._entriesPromise).get(t);if(r)return this._server.readFile(r)}}function La(n,t){let e=n.startsWith("http")||n.startsWith("blob")?n:t.getFileURL(n).toString();return e.startsWith("https://www.dropbox.com/")&&(e="https://dl.dropboxusercontent.com/"+e.substring(24)),e}class Ma{constructor(t){this.baseUrl=t}getFileURL(t){const e=new URL("trace/file",this.baseUrl);return e.searchParams.set("path",t),e}async readFile(t){const e=await fetch(this.getFileURL(t));if(e.status!==404)return e}}self.addEventListener("install",function(n){self.skipWaiting()});self.addEventListener("activate",function(n){n.waitUntil(self.clients.claim())});const Ua=new URL(self.registration.scope).pathname,ue=new Map,Oe=new Map;async function Wa(n,t,e,r,s){var _;await jr();const i=(e==null?void 0:e.id)??"";let a=Oe.get(i);if(!a){const f=new URL((e==null?void 0:e.url)??self.registration.scope),b=new URL(f.searchParams.get("server")??"../",f);a={limit:r,traceUrls:new Set,traceViewerServer:new Ma(b)},Oe.set(i,a)}a.traceUrls.add(n);const o=new us;try{const[f,b]=Zr(s,[.5,.4,.1]),h=n.endsWith("json")?new Na(n,a.traceViewerServer):new Fa(n,a.traceViewerServer,f);await o.load(h,b)}catch(f){throw console.error(f),(_=f==null?void 0:f.message)!=null&&_.includes("Cannot find .trace file")&&await o.hasEntry("index.html")?new Error("Could not load trace. Did you upload a Playwright HTML report instead? Make sure to extract the archive first and then double-click the index.html file or put it on a web server."):f instanceof Un?new Error(`Could not load trace from ${t||n}. ${f.message}`):t?new Error(`Could not load trace from ${t}. Make sure to upload a valid Playwright trace.`):new Error(`Could not load trace from ${n}. Make sure a valid Playwright Trace is accessible over this url.`)}const l=new is(o.storage(),f=>o.resourceForSha1(f));return ue.set(n,{traceModel:o,snapshotServer:l}),o}async function Ha(n){var l;if(n.request.url.startsWith("chrome-extension://"))return fetch(n.request);if(n.request.headers.get("x-pw-serviceworker")==="forward"){const _=new Request(n.request);return _.headers.delete("x-pw-serviceworker"),fetch(_)}const t=n.request,e=await self.clients.get(n.clientId),r=self.registration.scope.startsWith("https://");if(t.url.startsWith(self.registration.scope)){const _=new URL(at(t.url)),f=_.pathname.substring(Ua.length-1);if(f==="/ping")return await jr(),new Response(null,{status:200});const b=_.searchParams.get("trace");if(f==="/contexts")try{const h=_.searchParams.has("limit")?+_.searchParams.get("limit"):void 0,S=await Wa(b,_.searchParams.get("traceFileName"),e,h,(C,u)=>{e.postMessage({method:"progress",params:{done:C,total:u}})});return new Response(JSON.stringify(S.contextEntries),{status:200,headers:{"Content-Type":"application/json"}})}catch(h){return new Response(JSON.stringify({error:h==null?void 0:h.message}),{status:500,headers:{"Content-Type":"application/json"}})}if(f.startsWith("/snapshotInfo/")){const{snapshotServer:h}=ue.get(b)||{};if(!h)return new Response(null,{status:404});const S=f.substring(14);return h.serveSnapshotInfo(S,_.searchParams)}if(f.startsWith("/snapshot/")){const{snapshotServer:h}=ue.get(b)||{};if(!h)return new Response(null,{status:404});const S=f.substring(10),C=h.serveSnapshot(S,_.searchParams,_.href);return r&&C.headers.set("Content-Security-Policy","upgrade-insecure-requests"),C}if(f.startsWith("/closest-screenshot/")){const{snapshotServer:h}=ue.get(b)||{};if(!h)return new Response(null,{status:404});const S=f.substring(20);return h.serveClosestScreenshot(S,_.searchParams)}if(f.startsWith("/sha1/")){const h=f.slice(6);for(const S of ue.values()){const C=await S.traceModel.resourceForSha1(h);if(C)return new Response(C,{status:200,headers:Ba(_.searchParams)})}return new Response(null,{status:404})}if(f.startsWith("/file/")){const h=_.searchParams.get("path"),S=(l=Oe.get(n.clientId??""))==null?void 0:l.traceViewerServer;if(!S)throw new Error("client is not initialized");const C=await S.readFile(h);return C||new Response(null,{status:404})}return fetch(n.request)}const s=at(e.url),i=new URL(s).searchParams.get("trace"),{snapshotServer:a}=ue.get(i)||{};if(!a)return new Response(null,{status:404});const o=[t.url];return r&&t.url.startsWith("https://")&&o.push(t.url.replace(/^https/,"http")),a.serveResource(o,t.method,s)}function Ba(n){const t=n.get("dn"),e=n.get("dct");if(!t)return;const r=new Headers;return r.set("Content-Disposition",`attachment; filename="attachment"; filename*=UTF-8''${encodeURIComponent(t)}`),e&&r.set("Content-Type",e),r}async function jr(){const n=await self.clients.matchAll(),t=new Set;for(const[e,r]of Oe){if(!n.find(s=>s.id===e)){Oe.delete(e);continue}if(r.limit!==void 0){const s=[...r.traceUrls];r.traceUrls=new Set(s.slice(s.length-r.limit))}r.traceUrls.forEach(s=>t.add(s))}for(const e of ue.keys())t.has(e)||ue.delete(e)}self.addEventListener("fetch",function(n){n.respondWith(Ha(n))});
1
+ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};function n(e){let t;for(let n of Object.keys(e)){let r=e[n];r&&(t||={},t[n]=r,e[n]=0)}return t}function r(e){let t;for(let n of Object.keys(e)){let r=e[n];r.some(Boolean)&&(t||={},t[n]=r.slice(),r.fill(0))}return t}var i=class{constructor(e,t){this._snapshotIds=new Map,this._snapshotStorage=e,this._resourceLoader=t}serveSnapshot(e,t,n){let r=this._snapshot(e,t);if(!r)return new Response(null,{status:404});let i=r.render();return this._snapshotIds.set(n,r),new Response(i.html,{status:200,headers:{"Content-Type":`text/html; charset=utf-8`,"Content-Security-Policy":`script-src 'nonce-${i.scriptNonce}'; object-src 'none'`}})}async serveClosestScreenshot(e,t){let n=this._snapshot(e,t)?.closestScreenshot();return n?new Response(await this._resourceLoader(n)):new Response(null,{status:404})}serveSnapshotInfo(e,t){let n=this._snapshot(e,t);return this._respondWithJson(n?{viewport:n.viewport(),url:n.snapshot().frameUrl,timestamp:n.snapshot().timestamp,wallTime:n.snapshot().wallTime}:{error:`No snapshot found`})}_snapshot(e,t){return this._snapshotStorage.snapshotForCall(e,t.get(`phase`),t.get(`frameId`)||void 0)}_respondWithJson(e){return new Response(JSON.stringify(e),{status:200,headers:{"Cache-Control":`public, max-age=31536000`,"Content-Type":`application/json`}})}async serveResource(e,t,n){let r,i=this._snapshotIds.get(n);for(let n of e)if(r=i?.resourceByUrl(a(n),t),r)break;if(!r)return new Response(null,{status:404});let o=r.response.content._file,s=o&&await this._resourceLoader(o)||new Blob([]),c=r.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(c)&&!c.includes(`charset`)&&(c=`${c}; charset=utf-8`);let l=new Headers;c!==`x-unknown`&&l.set(`Content-Type`,c);for(let{name:e,value:t}of r.response.headers)l.set(e,t);l.delete(`Content-Encoding`),l.delete(`Access-Control-Allow-Origin`),l.set(`Access-Control-Allow-Origin`,`*`),l.delete(`Content-Length`),l.set(`Content-Length`,String(s.size)),this._snapshotStorage.hasResourceOverride(r.request.url)?l.set(`Cache-Control`,`no-store, no-cache, max-age=0`):l.set(`Cache-Control`,`public, max-age=31536000`);let{status:u}=r.response;return new Response(u===101||u===204||u===205||u===304?null:s,{headers:l,status:r.response.status,statusText:r.response.statusText})}};function a(e){try{let t=new URL(e);return t.hash=``,t.toString()}catch{return e}}var o={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function s(e){return e.replace(/[&<>"']/gu,e=>o[e])}function c(e){return e.replace(/[&<]/gu,e=>o[e])}function l(e,t,n){return e.find((r,i)=>{if(i===e.length-1)return!0;let a=e[i+1];return Math.abs(t(r)-n)<Math.abs(t(a)-n)})}function u(e){return Array.isArray(e)&&typeof e[0]==`string`}function d(e){return Array.isArray(e)&&Array.isArray(e[0])}var f=class{constructor(e,t,n,r,i){this._htmlCache=e,this._resources=t,this._snapshots=n,this._index=i,this._snapshot=n[i],this._callId=n[i].callId,this._screencastFrames=r,this.snapshotName=n[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){let{wallTime:e,timestamp:t}=this.snapshot();return(e&&this._screencastFrames[0]?.frameSwapWallTime?l(this._screencastFrames,e=>e.frameSwapWallTime,e):l(this._screencastFrames,e=>e.timestamp,t))?.file}render(){let e=[],t=(n,r,i,a)=>{if(typeof n==`string`){e.push(c(n));return}if(d(n)){let e=r-n[0][0];if(e>=0&&e<=r){let r=h(this._snapshots[e]),o=n[0][1];if(o>=0&&o<r.length)return t(r[o],e,i,a)}}else if(u(n)){let[o,c,...l]=n;if(o.toUpperCase()===`SCRIPT`||/[\s=<>\/]/.test(o))return;let u=o.toUpperCase(),d=u===`NOSCRIPT`?`X-NOSCRIPT`:o,f=Object.entries(c||{});e.push(`<`,d);let h=`__playwright_current_src__`,g=u===`IFRAME`||u===`FRAME`,_=u===`A`,v=u===`IMG`,y=u===`META`,x=v&&f.some(e=>e[0]===h),C=u===`SOURCE`&&i===`PICTURE`&&a?.some(e=>e[0]===h),w=y&&f.some(e=>e[0].toLowerCase()===`http-equiv`&&!m.has(e[1].trim().toLowerCase()));for(let[t,n]of f){let r=t;if(t.toLowerCase().startsWith(`on`))continue;g&&t.toLowerCase()===`src`&&(r=`__playwright_src__`),g&&(t.toLowerCase()===`srcdoc`||t.toLowerCase()===`sandbox`)&&(r=`__playwright_`+t.toLowerCase()+`__`),u===`OBJECT`&&t.toLowerCase()===`data`&&(r=`__playwright_data__`),u===`EMBED`&&t.toLowerCase()===`src`&&(r=`__playwright_src__`),v&&t===h&&(r=`src`),[`src`,`srcset`].includes(t.toLowerCase())&&(x||C)&&(r=`_`+r),w&&(t.toLowerCase()===`http-equiv`||t.toLowerCase()===`content`)&&(r=`_`+t);let i=n;!_&&(t.toLowerCase()===`href`||t.toLowerCase()===`src`||t===h)&&(i=b(n)),e.push(` `,r,`="`,s(i),`"`)}if(u===`STYLE`){let t=typeof l[0]==`string`?l[0]:``;e.push(` `,`__playwright_style_content__`,`="`,s(S(t)),`"`),e.push(`></`,d,`>`);return}e.push(`>`);for(let e of l)t(e,r,d,f);p.has(d)||e.push(`</`,d,`>`);return}else return},n=this._snapshot,{html:r,scriptNonce:i}=this._htmlCache.getOrCompute(this,()=>{t(n.html,this._index,void 0,void 0);let r=n.doctype?.replace(/[^a-zA-Z0-9]/g,``),i=r?`<!DOCTYPE ${r}>`:``,a=g(),o=i+[`<style>*,*::before,*::after { visibility: hidden }</style>`,`<script nonce="${a}">${_(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join(``)+e.join(``);return{value:{html:o,scriptNonce:a},size:o.length}});return{html:r,scriptNonce:i,pageId:n.pageId,frameId:n.frameId,index:this._index}}resourceByUrl(e,t){let n=this._snapshot,r,i;for(let a of this._resources){if(typeof a._monotonicTime==`number`&&a._monotonicTime>=n.timestamp)break;a.response.status!==304&&a.request.url===e&&a.request.method===t&&(a._frameref===n.frameId?r=a:i=a)}let a=r??i;if(a&&t.toUpperCase()===`GET`){let t=n.resourceOverrides.find(t=>t.url===e);if(t?.ref){let n=this._index-t.ref;n>=0&&n<this._snapshots.length&&(t=this._snapshots[n].resourceOverrides.find(t=>t.url===e))}t?.file&&(a={...a,response:{...a.response,content:{...a.response.content,_file:t.file}}})}return a}},p=new Set([`AREA`,`BASE`,`BR`,`COL`,`COMMAND`,`EMBED`,`HR`,`IMG`,`INPUT`,`KEYGEN`,`LINK`,`MENUITEM`,`META`,`PARAM`,`SOURCE`,`TRACK`,`WBR`]),m=new Set([`content-type`,`content-language`,`default-style`,`x-ua-compatible`]);function h(e){if(!e._nodes){let t=[],n=e=>{if(typeof e==`string`)t.push(e);else if(u(e)){let[,,...r]=e;for(let e of r)n(e);t.push(e)}};n(e.html),e._nodes=t}return e._nodes}function g(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}function _(e,...t){function n(e,t,...n){let r=window,i=new URLSearchParams(r.location.search),a=i.has(`shouldPopulateCanvasFromScreenshot`),o=i.has(`isUnderTest`),s={viewport:t,frames:new WeakMap};r.__playwright_frame_bounding_rects__=s;let c=[],l=[],u=[],d=[],f=r;for(;f!==f.parent&&new URLSearchParams(f.location.search).has(`frameId`);)f=f.parent;let p=t=>{for(let e of t.querySelectorAll(`[__playwright_scroll_top_]`))c.push(e);for(let e of t.querySelectorAll(`[__playwright_scroll_left_]`))l.push(e);for(let e of t.querySelectorAll(`style[__playwright_style_content__]`))e.textContent=e.getAttribute(`__playwright_style_content__`),e.removeAttribute(`__playwright_style_content__`);for(let e of t.querySelectorAll(`[__playwright_value_]`)){let t=e;t.type!==`file`&&(t.value=t.getAttribute(`__playwright_value_`)),e.removeAttribute(`__playwright_value_`)}for(let e of t.querySelectorAll(`[__playwright_checked_]`))e.checked=e.getAttribute(`__playwright_checked_`)===`true`,e.removeAttribute(`__playwright_checked_`);for(let e of t.querySelectorAll(`[__playwright_selected_]`))e.selected=e.getAttribute(`__playwright_selected_`)===`true`,e.removeAttribute(`__playwright_selected_`);for(let e of t.querySelectorAll(`[__playwright_popover_open_]`)){try{e.showPopover()}catch{}e.removeAttribute(`__playwright_popover_open_`)}for(let e of t.querySelectorAll(`[__playwright_dialog_open_]`)){try{e.getAttribute(`__playwright_dialog_open_`)===`modal`?e.showModal():e.show()}catch{}e.removeAttribute(`__playwright_dialog_open_`)}let i=e=>{let t=e.style;t.outline=`2px solid #006ab1`,t.backgroundColor=`#6fa8dc7f`,u.push(e)};for(let e of t.querySelectorAll(`[__playwright_target__=""]`))i(e);for(let e of n)if(e)for(let n of t.querySelectorAll(`[__playwright_target__="${e}"]`))i(n);for(let n of t.querySelectorAll(`iframe, frame`)){let t=n.getAttribute(`__playwright_bounding_rect__`);n.removeAttribute(`__playwright_bounding_rect__`);let i=t?JSON.parse(t):void 0;i&&s.frames.set(n,{boundingRect:i,scrollLeft:0,scrollTop:0});let a=n.getAttribute(`__playwright_src__`);if(!a)n.setAttribute(`src`,e);else{let e=a.substring(a.lastIndexOf(`/`)+1),t=new URL(r.location.href);t.searchParams.set(`frameId`,e),n.setAttribute(`src`,t.toString())}}{let e=t.querySelector(`body[__playwright_custom_elements__]`);if(e&&r.customElements){let t=(e.getAttribute(`__playwright_custom_elements__`)||``).split(`,`);for(let e of t)r.customElements.define(e,class extends HTMLElement{})}}for(let e of t.querySelectorAll(`template[__playwright_shadow_root_]`)){let t=e,n=t.parentElement.attachShadow({mode:`open`});n.appendChild(t.content),t.remove(),p(n)}for(let e of t.querySelectorAll(`a`))e.addEventListener(`click`,e=>{e.preventDefault()});if(`adoptedStyleSheets`in t){let e=[...t.adoptedStyleSheets];for(let n of t.querySelectorAll(`template[__playwright_style_sheet_]`)){let t=n,r=new CSSStyleSheet;r.replaceSync(t.getAttribute(`__playwright_style_sheet_`)),e.push(r)}t.adoptedStyleSheets=e}d.push(...t.querySelectorAll(`canvas`))},m=()=>{r.removeEventListener(`load`,m);for(let e of c)e.scrollTop=+e.getAttribute(`__playwright_scroll_top_`),e.removeAttribute(`__playwright_scroll_top_`),s.frames.has(e)&&(s.frames.get(e).scrollTop=e.scrollTop);for(let e of l)e.scrollLeft=+e.getAttribute(`__playwright_scroll_left_`),e.removeAttribute(`__playwright_scroll_left_`),s.frames.has(e)&&(s.frames.get(e).scrollLeft=e.scrollLeft);r.document.styleSheets[0].disabled=!0;let e=new URL(r.location.href).searchParams;if(r===f&&e.get(`pointX`)&&e.get(`pointY`)){let t=+e.get(`pointX`),n=+e.get(`pointY`),i=r.document.createElement(`x-pw-pointer`);i.style.position=`fixed`,i.style.backgroundColor=`#f44336`,i.style.width=`20px`,i.style.height=`20px`,i.style.borderRadius=`10px`,i.style.margin=`-10px 0 0 -10px`,i.style.zIndex=`2147483646`,i.style.display=`flex`,i.style.alignItems=`center`,i.style.justifyContent=`center`;let a=u[0],o=a?.getBoundingClientRect(),s=a?{x:o.left+o.width/2,y:o.top+o.height/2}:null;if(i.style.left=(s?.x??t)+`px`,i.style.top=(s?.y??n)+`px`,!(!s||Math.abs(s.x-t)<=10&&Math.abs(s.y-n)<=10)){let e=r.document.createElement(`x-pw-pointer-warning`);e.textContent=`⚠`,e.style.fontSize=`19px`,e.style.color=`white`,e.style.marginTop=`-3.5px`,e.style.userSelect=`none`,i.appendChild(e),i.setAttribute(`title`,`Recorded click position in absolute coordinates did not match the center of the clicked element. This is either due to the use of provided offset, or due to a difference between the test runner and the trace viewer operating systems.`)}r.document.documentElement.appendChild(i)}if(d.length>0){function e(e,t){function n(){let e=r.document.createElement(`canvas`);e.width/=Math.floor(e.width/24),e.height/=Math.floor(e.height/24);let t=e.getContext(`2d`);return t.fillStyle=`lightgray`,t.fillRect(0,0,e.width,e.height),t.fillStyle=`white`,t.fillRect(0,0,e.width/2,e.height/2),t.fillRect(e.width/2,e.height/2,e.width,e.height),t.createPattern(e,`repeat`)}e.fillStyle=n(),e.fillRect(0,0,t.width,t.height)}let t=new Image;t.onload=()=>{for(let n of d){let i=n.getContext(`2d`),s=n.getAttribute(`__playwright_bounding_rect__`);if(n.removeAttribute(`__playwright_bounding_rect__`),!s)continue;let c;try{c=JSON.parse(s)}catch{continue}let l=r;for(;l!==f;){let e=l.frameElement;l=l.parent;let t=l.__playwright_frame_bounding_rects__?.frames.get(e);if(!t?.boundingRect)break;let n=t.boundingRect.left-t.scrollLeft,r=t.boundingRect.top-t.scrollTop;c.left+=n,c.top+=r,c.right+=n,c.bottom+=r}let{width:u,height:d}=f.__playwright_frame_bounding_rects__.viewport;c.left/=u,c.top/=d,c.right/=u,c.bottom/=d;let p=c.right>1||c.bottom>1;if(c.left>1||c.top>1){n.title=`Playwright couldn't capture canvas contents because it's located outside the viewport.`;continue}e(i,n),a?(i.drawImage(t,c.left*t.width,c.top*t.height,(c.right-c.left)*t.width,(c.bottom-c.top)*t.height,0,0,n.width,n.height),p?n.title=`Playwright couldn't capture full canvas contents because it's located partially outside the viewport.`:n.title=`Canvas contents are displayed on a best-effort basis based on viewport screenshots taken during test execution.`):n.title=`Canvas content display is disabled.`,o&&console.log(`canvas drawn:`,JSON.stringify([c.left,c.top,c.right-c.left,c.bottom-c.top].map(e=>Math.floor(e*100))))}},t.onerror=()=>{for(let t of d)e(t.getContext(`2d`),t),t.title=`Playwright couldn't show canvas contents because the screenshot failed to load.`},t.src=location.href.replace(`/snapshot`,`/closest-screenshot`)}};r.addEventListener(`load`,m),r.addEventListener(`DOMContentLoaded`,()=>p(r.document))}let r=e=>JSON.stringify(e).replace(/</g,`\\u003c`);return`\n(${n.toString()})(${r(C)},${r(e)}${t.map(e=>`, ${r(String(e))}`).join(``)})`}var v=[`about:`,`blob:`,`data:`,`file:`,`ftp:`,`http:`,`https:`,`mailto:`,`sftp:`,`ws:`,`wss:`],y=`http://playwright.bloburl/#`;function b(e){e.startsWith(y)&&(e=e.substring(27));try{let t=new URL(e);if(t.protocol===`javascript:`||t.protocol===`vbscript:`)return`javascript:void(0)`;let n=t.protocol===`blob:`,r=t.protocol===`file:`;if(!n&&!r&&v.includes(t.protocol))return e;let i=`pw-`+t.protocol.slice(0,t.protocol.length-1);return r||(t.protocol=`https:`),t.hostname=t.hostname?`${i}--${t.hostname}`:i,r&&(t.protocol=`https:`),t.toString()}catch{return e}}var x=/url\(['"]?([\w-]+:)\/\//gi;function S(e){return e.replace(x,(e,t)=>t!==`blob:`&&t!==`file:`&&v.includes(t)?e:e.replace(t+`//`,`https://pw-${t.slice(0,-1)}--`))}var C=`data:text/html;base64,`+btoa(`<body></body><style>body { color-scheme: light dark; background: light-dark(white, #333) }</style>`),w=class{constructor(e){this._maxSize=e,this._map=new Map,this._size=0}getOrCompute(e,t){if(this._map.has(e)){let t=this._map.get(e);return this._map.delete(e),this._map.set(e,t),t.value}let n=t();for(;this._map.size&&this._size+n.size>this._maxSize;){let[e,t]=this._map.entries().next().value;this._size-=t.size,this._map.delete(e)}return this._map.set(e,n),this._size+=n.size,n.value}},T=class{constructor(){this._snapshotsByFrameId=new Map,this._renderersByCallIdAndPhase=new Map,this._cache=new w(1e8),this._resources=[],this._resourceUrlsWithOverrides=new Set}addResource(e){e.request.url=b(e.request.url),this._resources.push(e)}addFrameSnapshot(e,t){for(let t of e.resourceOverrides)t.url=b(t.url);let n=this._snapshotsByFrameId.get(e.frameId);n||(n=[],this._snapshotsByFrameId.set(e.frameId,n)),n.push(e);let r=new f(this._cache,this._resources,n,t,n.length-1);if(e.phase){let t=E(e.callId,e.phase),n=this._renderersByCallIdAndPhase.get(t);n||(n=[],this._renderersByCallIdAndPhase.set(t,n)),n.push(r)}return r}snapshotForCall(e,t,n){return(this._renderersByCallIdAndPhase.get(E(e,t))||[]).find(e=>n?e.snapshot().frameId===n:e.snapshot().isMainFrame)}snapshotsForTest(){return[...this._renderersByCallIdAndPhase.keys()]}finalize(){this._resources.sort((e,t)=>(e._monotonicTime||0)-(t._monotonicTime||0));for(let e of this._snapshotsByFrameId.values())for(let t of e)for(let e of t.resourceOverrides)this._resourceUrlsWithOverrides.add(e.url)}hasResourceOverride(e){return this._resourceUrlsWithOverrides.has(e)}};function E(e,t){return`${e}/${t}`}function D(e){return`call@${e}`}function O(e){let t=new Map,{files:n,stacks:r}=e;for(let e of r){let[r,i]=e;t.set(r,i.map(e=>({file:n[e[0]],line:e[1],column:e[2],function:e[3]})))}return t}var k=class extends Error{constructor(e){super(e),this.name=`TraceVersionError`}},ee=10,te=0,ne=class{constructor(e,t){this._actionMap=new Map,this._pageEntries=new Map,this._jsHandles=new Map,this._consoleObjects=new Map,this._snapshotPhases=new Map,this._legacyCallIdToStepId=new Map,this._contextEntry=e,this._snapshotStorage=t}appendTrace(e){for(let t of e.split(`
2
+ `))this._appendEvent(t)}appendStacks(e){let t=JSON.parse(e),n=t.stacks.map(([e,...t])=>{let n=typeof e==`number`?D(e):e;return[this._legacyCallIdToStepId.get(n)??n,...t]}),r=O({files:t.files,stacks:n});for(let e of this._actionMap.values())e.stack=e.stack||r.get(e.callId)}actions(){return[...this._actionMap.values()]}_collectSnapshotPhase(e,t){e&&this._snapshotPhases.set(e,t)}_pageEntry(e){let t=this._pageEntries.get(e);return t||(t={pageId:e,screencastFrames:[]},this._pageEntries.set(e,t),this._contextEntry.pages.push(t)),t}_appendEvent(e){if(!e)return;let t=this._modernize(JSON.parse(e));for(let e of t)this._innerAppendEvent(e)}_innerAppendEvent(e){let t=this._contextEntry;switch(e.type){case`context-options`:if(e.version>ee)throw new k(`The trace was created by a newer version of Playwright and is not supported by this version of the viewer. Please use latest Playwright to open the trace.`);this._version=e.version,t.origin=e.origin,t.browserName=e.browserName,t.channel=e.channel,t.title=e.title,t.platform=e.platform,t.playwrightVersion=e.playwrightVersion,t.wallTime=e.wallTime,t.monotonicTime=e.monotonicTime,t.startTime=e.monotonicTime,t.sdkLanguage=e.sdkLanguage,t.options=e.options,t.testIdAttributeName=e.testIdAttributeName,t.testTimeout=e.testTimeout,t.annotations=e.annotations;break;case`screencast-frame`:this._pageEntry(e.pageId).screencastFrames.push(e);break;case`screenshot`:t.screenshots.push(e);break;case`video`:t.videos.push(e);break;case`aria-snapshot`:t.ariaSnapshots.push(e);break;case`before`:this._actionMap.set(e.callId,{...e,type:`action`,endTime:0,log:[]});break;case`input`:{let t=this._actionMap.get(e.callId);t.point=e.point,t.box=e.box;break}case`log`:{let t=this._actionMap.get(e.callId);if(!t)return;t.log.push({time:e.time,message:e.message});break}case`after`:{let t=this._actionMap.get(e.callId);t.endTime=e.endTime,t.result=e.result,t.error=e.error,t.attachments=e.attachments,t.annotations=e.annotations,e.point&&(t.point=e.point);break}case`action`:this._actionMap.set(e.callId,{...e,log:[]});break;case`event`:(e.method===`page`||e.method===`pageClosed`)&&e.params?.pageId&&this._pageEntry(e.params.pageId),t.events.push(e);break;case`stdout`:t.stdio.push(e);break;case`stderr`:t.stdio.push(e);break;case`error`:t.errors.push(e);break;case`console`:t.events.push(e);break;case`resource-snapshot`:this._snapshotStorage.addResource(e.snapshot),t.resources.push(e.snapshot);break;case`frame-snapshot`:{let n=e.snapshot;this._snapshotStorage.addFrameSnapshot(n,this._pageEntry(n.pageId).screencastFrames),n.isMainFrame&&n.phase&&t.domSnapshots.push({callId:n.callId,phase:n.phase});break}}`pageId`in e&&e.pageId&&this._pageEntry(e.pageId),(e.type===`action`||e.type===`before`)&&(t.startTime=Math.min(t.startTime,e.startTime)),(e.type===`action`||e.type===`after`)&&(t.endTime=Math.max(t.endTime,e.endTime)),e.type===`event`&&(t.startTime=Math.min(t.startTime,e.time),t.endTime=Math.max(t.endTime,e.time)),e.type===`screencast-frame`&&(t.startTime=Math.min(t.startTime,e.timestamp),t.endTime=Math.max(t.endTime,e.timestamp))}_processedContextCreatedEvent(){return this._version!==void 0}_modernize(e){let t=this._version??e.version??6,n=[e];for(;t<ee;++t)n=this[`_modernize_${t}_to_${t+1}`].call(this,n);return n}_modernize_0_to_1(e){for(let t of e)t.type===`action`&&typeof t.metadata.error==`string`&&(t.metadata.error={error:{name:`Error`,message:t.metadata.error}});return e}_modernize_1_to_2(e){for(let t of e)t.type!==`frame-snapshot`||!t.snapshot.isMainFrame||(t.snapshot.viewport=this._contextEntry.options?.viewport||{width:1280,height:720});return e}_modernize_2_to_3(e){for(let t of e){if(t.type!==`resource-snapshot`||t.snapshot.request)continue;let e=t.snapshot;t.snapshot={_frameref:e.frameId,request:{url:e.url,method:e.method,headers:e.requestHeaders,postData:e.requestSha1?{_sha1:e.requestSha1}:void 0},response:{status:e.status,headers:e.responseHeaders,content:{mimeType:e.contentType,_sha1:e.responseSha1}},_monotonicTime:e.timestamp}}return e}_modernize_3_to_4(e){let t=[];for(let n of e){let e=this._modernize_event_3_to_4(n);e&&t.push(e)}return t}_modernize_event_3_to_4(e){if(e.type!==`action`&&e.type!==`event`)return e;let t=e.metadata;return t.internal||t.method.startsWith(`tracing`)?null:e.type===`event`?t.method===`__create__`&&t.type===`ConsoleMessage`?{type:`object`,class:t.type,guid:t.params.guid,initializer:t.params.initializer}:{type:`event`,time:t.startTime,class:t.type,method:t.method,params:t.params,pageId:t.pageId}:{type:`action`,callId:t.id,startTime:t.startTime,endTime:t.endTime,apiName:t.apiName||t.type+`.`+t.method,class:t.type,method:t.method,params:t.params,wallTime:t.wallTime||Date.now(),log:t.log,beforeSnapshot:t.snapshots.find(e=>e.title===`before`)?.snapshotName,inputSnapshot:t.snapshots.find(e=>e.title===`input`)?.snapshotName,afterSnapshot:t.snapshots.find(e=>e.title===`after`)?.snapshotName,error:t.error?.error,result:t.result,point:t.point,pageId:t.pageId}}_modernize_4_to_5(e){let t=[];for(let n of e){let e=this._modernize_event_4_to_5(n);e&&t.push(e)}return t}_modernize_event_4_to_5(e){if(e.type===`event`&&e.method===`__create__`&&e.class===`JSHandle`&&this._jsHandles.set(e.params.guid,e.params.initializer),e.type===`object`){if(e.class!==`ConsoleMessage`)return null;let t=e.initializer.args?.map(e=>e.guid?{preview:this._jsHandles.get(e.guid)?.preview||``,value:``}:{preview:e.preview||``,value:e.value||``});return this._consoleObjects.set(e.guid,{type:e.initializer.type,text:e.initializer.text,location:e.initializer.location,args:t}),null}if(e.type===`event`&&e.method===`console`){let t=this._consoleObjects.get(e.params.message?.guid||``);return t?{type:`console`,time:e.time,pageId:e.pageId,messageType:t.type,text:t.text,args:t.args,location:t.location}:null}return e}_modernize_5_to_6(e){let t=[];for(let n of e)if(t.push(n),!(n.type!==`after`||!n.log.length))for(let e of n.log)t.push({type:`log`,callId:n.callId,message:e,time:-1});return t}_modernize_6_to_7(e){let t=[];!this._processedContextCreatedEvent()&&e[0].type!==`context-options`&&t.push({type:`context-options`,origin:`testRunner`,version:6,browserName:``,options:{},platform:`unknown`,wallTime:0,monotonicTime:0,sdkLanguage:`javascript`,contextId:``});for(let n of e){if(n.type===`context-options`){t.push({...n,monotonicTime:0,origin:`library`,contextId:``});continue}if(n.type===`before`||n.type===`action`){this._contextEntry.monotonicTime||(this._contextEntry.monotonicTime=n.startTime,this._contextEntry.wallTime=n.wallTime);let e=n,r=n;r.stepId=`${e.apiName}@${e.wallTime}`,t.push(r)}else t.push(n)}return t}_modernize_7_to_8(e){let t=[];for(let n of e)if(n.type===`before`||n.type===`action`){let e=n,r=n;e.apiName&&(r.title=e.apiName,delete r.apiName),r.stepId=e.stepId??e.callId,t.push(r)}else t.push(n);return t}_modernize_8_to_9(e){for(let t of e){if(t.type===`before`||t.type===`input`||t.type===`after`||t.type===`action`){let e=t;this._collectSnapshotPhase(e.beforeSnapshot,`before`),this._collectSnapshotPhase(e.inputSnapshot,`action`),this._collectSnapshotPhase(e.afterSnapshot,`after`),delete e.beforeSnapshot,delete e.inputSnapshot,delete e.afterSnapshot}if(t.type===`after`||t.type===`action`)for(let e of t.attachments||[])e.sha1&&(e.file=`resources/`+e.sha1,delete e.sha1);if(t.type===`screencast-frame`&&t.sha1&&(t.file=`resources/`+t.sha1,delete t.sha1),t.type===`frame-snapshot`){t.snapshot.snapshotName&&(t.snapshot.phase=this._snapshotPhases.get(t.snapshot.snapshotName));for(let e of t.snapshot.resourceOverrides||[])e.sha1&&(e.file=`resources/`+e.sha1,delete e.sha1)}if(t.type===`resource-snapshot`){let e=t.snapshot.request?.postData;e?._sha1&&(e._file=`resources/`+e._sha1,delete e._sha1);let n=t.snapshot.response?.content;n?._sha1&&(n._file=`resources/`+n._sha1,delete n._sha1),t.snapshot._apiRequest&&(this._apiRequestRef||=`api-request-context@`+ ++te,t.snapshot._apiRequestRef=this._apiRequestRef,delete t.snapshot._apiRequest)}}return e}_modernize_9_to_10(e){for(let t of e)(t.type===`before`||t.type===`action`)&&(t.stepId&&t.stepId!==t.callId&&this._legacyCallIdToStepId.set(t.callId,t.stepId),delete t.stepId,t.parentId&&=this._legacyCallIdToStepId.get(t.parentId)??t.parentId),(t.type===`before`||t.type===`input`||t.type===`after`||t.type===`action`||t.type===`log`)&&(t.callId=this._legacyCallIdToStepId.get(t.callId)??t.callId),t.type===`frame-snapshot`&&(t.snapshot.callId=this._legacyCallIdToStepId.get(t.snapshot.callId)??t.snapshot.callId);return e}},re=class{constructor(){this.contextEntries=[],this._resourceToContentType=new Map}async load(e,t,n){this._backend=e;let r=t?.match(/(.+)\.trace$/)?.[1],i=[],a=!1;for(let e of await this._backend.entryNames()){let t=e.match(/(.+)\.trace$/);t&&(!r||r===t[1])&&i.push(t[1]||``),(e.startsWith(`src/`)||e.includes(`src@`))&&(a=!0)}if(!i.length)throw Error(`Cannot find .trace file`);this._snapshotStorage=new T;let o=i.length*3,s=0;for(let t of i){let r=ie();r.hasSource=a;let i=new ne(r,this._snapshotStorage),c=await this._backend.readText(t+`.trace`)||``;i.appendTrace(c),n?.(++s,o);let l=await this._backend.readText(t+`.network`)||``;i.appendTrace(l),n?.(++s,o);let u=await this._backend.readText(t+`.stacks`);if(u&&i.appendStacks(u),n?.(++s,o),r.actions=i.actions().sort((e,t)=>e.startTime-t.startTime),!e.isLive()){for(let e of r.actions.slice().reverse())if(!e.endTime&&!e.error)for(let t of r.actions)t.parentId===e.callId&&e.endTime<t.endTime&&(e.endTime=t.endTime)}for(let e of r.resources)e.request.postData?._file&&this._resourceToContentType.set(e.request.postData._file,A(e.request.postData.mimeType)),e.response.content?._file&&this._resourceToContentType.set(e.response.content._file,A(e.response.content.mimeType));this.contextEntries.push(r)}this._snapshotStorage.finalize()}async hasEntry(e){return this._backend.hasEntry(e)}async resourceEntry(e){let t=await this._backend.readBlob(e),n=this._resourceToContentType.get(e);return!t||n===void 0||n===`x-unknown`?t:new Blob([t],{type:n})}storage(){return this._snapshotStorage}};function A(e){let t=e.match(/^(.*);\s*charset=.*$/);return t?t[1]:e}function ie(){return{origin:`testRunner`,startTime:2**53-1,wallTime:2**53-1,monotonicTime:0,endTime:0,browserName:``,options:{deviceScaleFactor:1,isMobile:!1,viewport:{width:1280,height:800}},pages:[],resources:[],actions:[],screenshots:[],ariaSnapshots:[],domSnapshots:[],videos:[],events:[],errors:[],stdio:[],hasSource:!1}}function j(e,t){let n=Array(t.length).fill(0);return Array(t.length).fill(0).map((r,i)=>(r,a)=>{n[i]=r/a*t[i]*1e3,e(n.reduce((e,t)=>e+t,0),1e3)})}var ae=15,M=0,N=1,oe=2,P=-2,F=-3,se=-4,I=-5,L=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ce=1440,le=0,ue=4,de=9,fe=5,pe=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],me=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],he=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],ge=[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,112,112],_e=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],ve=[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],ye=15;function be(){let e=this,t,n,r,i,a,o;function s(e,t,n,s,c,l,u,d,f,p,m){let h,g,_,v,y,b,x,S,C,w,T,E,D,O,k;w=0,y=n;do r[e[t+w]]++,w++,y--;while(y!==0);if(r[0]==n)return u[0]=-1,d[0]=0,M;for(S=d[0],b=1;b<=ye&&r[b]===0;b++);for(x=b,S<b&&(S=b),y=ye;y!==0&&r[y]===0;y--);for(_=y,S>y&&(S=y),d[0]=S,O=1<<b;b<y;b++,O<<=1)if((O-=r[b])<0)return F;if((O-=r[y])<0)return F;for(r[y]+=O,o[1]=b=0,w=1,D=2;--y!==0;)o[D]=b+=r[w],D++,w++;y=0,w=0;do(b=e[t+w])!==0&&(m[o[b]++]=y),w++;while(++y<n);for(n=o[_],o[0]=y=0,w=0,v=-1,E=-S,a[0]=0,T=0,k=0;x<=_;x++)for(h=r[x];h--!==0;){for(;x>E+S;){if(v++,E+=S,k=_-E,k=k>S?S:k,(g=1<<(b=x-E))>h+1&&(g-=h+1,D=x,b<k))for(;++b<k&&!((g<<=1)<=r[++D]);)g-=r[D];if(k=1<<b,p[0]+k>ce)return F;a[v]=T=p[0],p[0]+=k,v===0?u[0]=T:(o[v]=y,i[0]=b,i[1]=S,b=y>>>E-S,i[2]=T-a[v-1]-b,f.set(i,(a[v-1]+b)*3))}for(i[1]=x-E,w>=n?i[0]=192:m[w]<s?(i[0]=m[w]<256?0:96,i[2]=m[w++]):(i[0]=l[m[w]-s]+16+64,i[2]=c[m[w++]-s]),g=1<<x-E,b=y>>>E;b<k;b+=g)f.set(i,(T+b)*3);for(b=1<<x-1;(y&b)!==0;b>>>=1)y^=b;for(y^=b,C=(1<<E)-1;(y&C)!=o[v];)v--,E-=S,C=(1<<E)-1}return O!==0&&_!=1?I:M}function c(e){let s;for(t||(t=[],n=[],r=new Int32Array(16),i=[],a=new Int32Array(ye),o=new Int32Array(16)),n.length<e&&(n=[]),s=0;s<e;s++)n[s]=0;for(s=0;s<16;s++)r[s]=0;for(s=0;s<3;s++)i[s]=0;a.set(r.subarray(0,ye),0),o.set(r.subarray(0,16),0)}e.inflate_trees_bits=function(e,r,i,a,o){let l;return c(19),t[0]=0,l=s(e,0,19,19,null,null,i,r,a,t,n),l==F?o.msg=`oversubscribed dynamic bit lengths tree`:(l==I||r[0]===0)&&(o.msg=`incomplete dynamic bit lengths tree`,l=F),l},e.inflate_trees_dynamic=function(e,r,i,a,o,l,u,d,f){let p;return c(288),t[0]=0,p=s(i,0,e,257,he,ge,l,a,d,t,n),p!=M||a[0]===0?(p==F?f.msg=`oversubscribed literal/length tree`:p!=se&&(f.msg=`incomplete literal/length tree`,p=F),p):(c(288),p=s(i,e,r,0,_e,ve,u,o,d,t,n),p!=M||o[0]===0&&e>257?(p==F?f.msg=`oversubscribed distance tree`:p==I?(f.msg=`incomplete distance tree`,p=F):p!=se&&(f.msg=`empty distance tree with lengths`,p=F),p):M)}}be.inflate_trees_fixed=function(e,t,n,r){return e[0]=de,t[0]=fe,n[0]=pe,r[0]=me,M};var xe=0,Se=1,Ce=2,we=3,Te=4,Ee=5,De=6,Oe=7,ke=8,Ae=9;function je(){let e=this,t,n=0,r,i=0,a=0,o=0,s=0,c=0,l=0,u=0,d,f=0,p,m=0;function h(e,t,n,r,i,a,o,s){let c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;m=s.next_in_index,h=s.avail_in,f=o.bitb,p=o.bitk,g=o.write,_=g<o.read?o.read-g-1:o.end-g,v=L[e],y=L[t];do{for(;p<20;)h--,f|=(s.read_byte(m++)&255)<<p,p+=8;if(c=f&v,l=n,u=r,C=(u+c)*3,(d=l[C])===0){f>>=l[C+1],p-=l[C+1],o.win[g++]=l[C+2],_--;continue}do{if(f>>=l[C+1],p-=l[C+1],d&16){for(d&=15,b=l[C+2]+(f&L[d]),f>>=d,p-=d;p<15;)h--,f|=(s.read_byte(m++)&255)<<p,p+=8;c=f&y,l=i,u=a,C=(u+c)*3,d=l[C];do if(f>>=l[C+1],p-=l[C+1],d&16){for(d&=15;p<d;)h--,f|=(s.read_byte(m++)&255)<<p,p+=8;if(x=l[C+2]+(f&L[d]),f>>=d,p-=d,_-=b,g>=x)S=g-x,g-S>0&&2>g-S?(o.win[g++]=o.win[S++],o.win[g++]=o.win[S++],b-=2):(o.win.set(o.win.subarray(S,S+2),g),g+=2,S+=2,b-=2);else{S=g-x;do S+=o.end;while(S<0);if(d=o.end-S,b>d){if(b-=d,g-S>0&&d>g-S)do o.win[g++]=o.win[S++];while(--d!==0);else o.win.set(o.win.subarray(S,S+d),g),g+=d,S+=d,d=0;S=0}}if(g-S>0&&b>g-S)do o.win[g++]=o.win[S++];while(--b!==0);else o.win.set(o.win.subarray(S,S+b),g),g+=b,S+=b,b=0;break}else if(!(d&64))c+=l[C+2],c+=f&L[d],C=(u+c)*3,d=l[C];else return s.msg=`invalid distance code`,b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,F;while(!0);break}if(!(d&64)){if(c+=l[C+2],c+=f&L[d],C=(u+c)*3,(d=l[C])===0){f>>=l[C+1],p-=l[C+1],o.win[g++]=l[C+2],_--;break}}else if(d&32)return b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,N;else return s.msg=`invalid literal/length code`,b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,F}while(!0)}while(_>=258&&h>=10);return b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,M}e.init=function(e,n,i,a,o,s){t=xe,l=e,u=n,d=i,f=a,p=o,m=s,r=null},e.proc=function(e,g,_){let v,y,b,x=0,S=0,C=0,w,T,E,D;for(C=g.next_in_index,w=g.avail_in,x=e.bitb,S=e.bitk,T=e.write,E=T<e.read?e.read-T-1:e.end-T;;)switch(t){case xe:if(E>=258&&w>=10&&(e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,_=h(l,u,d,f,p,m,e,g),C=g.next_in_index,w=g.avail_in,x=e.bitb,S=e.bitk,T=e.write,E=T<e.read?e.read-T-1:e.end-T,_!=M)){t=_==N?Oe:Ae;break}a=l,r=d,i=f,t=Se;case Se:for(v=a;S<v;){if(w!==0)_=M;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}if(y=(i+(x&L[v]))*3,x>>>=r[y+1],S-=r[y+1],b=r[y],b===0){o=r[y+2],t=De;break}if(b&16){s=b&15,n=r[y+2],t=Ce;break}if(!(b&64)){a=b,i=y/3+r[y+2];break}if(b&32){t=Oe;break}return t=Ae,g.msg=`invalid literal/length code`,_=F,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);case Ce:for(v=s;S<v;){if(w!==0)_=M;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}n+=x&L[v],x>>=v,S-=v,a=u,r=p,i=m,t=we;case we:for(v=a;S<v;){if(w!==0)_=M;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}if(y=(i+(x&L[v]))*3,x>>=r[y+1],S-=r[y+1],b=r[y],b&16){s=b&15,c=r[y+2],t=Te;break}if(!(b&64)){a=b,i=y/3+r[y+2];break}return t=Ae,g.msg=`invalid distance code`,_=F,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);case Te:for(v=s;S<v;){if(w!==0)_=M;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}c+=x&L[v],x>>=v,S-=v,t=Ee;case Ee:for(D=T-c;D<0;)D+=e.end;for(;n!==0;){if(E===0&&(T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0&&(e.write=T,_=e.inflate_flush(g,_),T=e.write,E=T<e.read?e.read-T-1:e.end-T,T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0)))return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);e.win[T++]=e.win[D++],E--,D==e.end&&(D=0),n--}t=xe;break;case De:if(E===0&&(T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0&&(e.write=T,_=e.inflate_flush(g,_),T=e.write,E=T<e.read?e.read-T-1:e.end-T,T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0)))return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);_=M,e.win[T++]=o,E--,t=xe;break;case Oe:if(S>7&&(S-=8,w++,C--),e.write=T,_=e.inflate_flush(g,_),T=e.write,E=T<e.read?e.read-T-1:e.end-T,e.read!=e.write)return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);t=ke;case ke:return _=N,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);case Ae:return _=F,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);default:return _=P,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_)}},e.free=function(){}}var Me=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ne=0,Pe=1,Fe=2,Ie=3,Le=4,Re=5,ze=6,Be=7,Ve=8,R=9;function He(e,t){let n=this,r=Ne,i=0,a=0,o=0,s,c=[0],l=[0],u=new je,d=0,f=new Int32Array(ce*3),p=new be;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(e,t){t&&(t[0]=0),r==ze&&u.free(e),r=Ne,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(e,t){let r,i,a;return i=e.next_out_index,a=n.read,r=(a<=n.write?n.write:n.end)-a,r>e.avail_out&&(r=e.avail_out),r!==0&&t==I&&(t=M),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(a,a+r),i),i+=r,a+=r,a==n.end&&(a=0,n.write==n.end&&(n.write=0),r=n.write-a,r>e.avail_out&&(r=e.avail_out),r!==0&&t==I&&(t=M),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(a,a+r),i),i+=r,a+=r),e.next_out_index=i,n.read=a,t},n.proc=function(e,t){let m,h,g,_,v,y,b,x;for(_=e.next_in_index,v=e.avail_in,h=n.bitb,g=n.bitk,y=n.write,b=y<n.read?n.read-y-1:n.end-y;;){let S,C,w,T,E,D,O,k;switch(r){case Ne:for(;g<3;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}switch(m=h&7,d=m&1,m>>>1){case 0:h>>>=3,g-=3,m=g&7,h>>>=m,g-=m,r=Pe;break;case 1:S=[],C=[],w=[[]],T=[[]],be.inflate_trees_fixed(S,C,w,T),u.init(S[0],C[0],w[0],0,T[0],0),h>>>=3,g-=3,r=ze;break;case 2:h>>>=3,g-=3,r=Ie;break;case 3:return h>>>=3,g-=3,r=R,e.msg=`invalid block type`,t=F,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t)}break;case Pe:for(;g<32;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if((~h>>>16&65535)!=(h&65535))return r=R,e.msg=`invalid stored block lengths`,t=F,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);i=h&65535,h=g=0,r=i===0?d===0?Ne:Be:Fe;break;case Fe:if(v===0||b===0&&(y==n.end&&n.read!==0&&(y=0,b=y<n.read?n.read-y-1:n.end-y),b===0&&(n.write=y,t=n.inflate_flush(e,t),y=n.write,b=y<n.read?n.read-y-1:n.end-y,y==n.end&&n.read!==0&&(y=0,b=y<n.read?n.read-y-1:n.end-y),b===0)))return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);if(t=M,m=i,m>v&&(m=v),m>b&&(m=b),n.win.set(e.read_buf(_,m),y),_+=m,v-=m,y+=m,b-=m,(i-=m)!==0)break;r=d===0?Ne:Be;break;case Ie:for(;g<14;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if(a=m=h&16383,(m&31)>29||(m>>5&31)>29)return r=R,e.msg=`too many length or distance symbols`,t=F,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);if(m=258+(m&31)+(m>>5&31),!s||s.length<m)s=[];else for(x=0;x<m;x++)s[x]=0;h>>>=14,g-=14,o=0,r=Le;case Le:for(;o<4+(a>>>10);){for(;g<3;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}s[Me[o++]]=h&7,h>>>=3,g-=3}for(;o<19;)s[Me[o++]]=0;if(c[0]=7,m=p.inflate_trees_bits(s,c,l,f,e),m!=M)return t=m,t==F&&(s=null,r=R),n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);o=0,r=Re;case Re:for(;m=a,!(o>=258+(m&31)+(m>>5&31));){let i,u;for(m=c[0];g<m;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if(m=f[(l[0]+(h&L[m]))*3+1],u=f[(l[0]+(h&L[m]))*3+2],u<16)h>>>=m,g-=m,s[o++]=u;else{for(x=u==18?7:u-14,i=u==18?11:3;g<m+x;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if(h>>>=m,g-=m,i+=h&L[x],h>>>=x,g-=x,x=o,m=a,x+i>258+(m&31)+(m>>5&31)||u==16&&x<1)return s=null,r=R,e.msg=`invalid bit length repeat`,t=F,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);u=u==16?s[x-1]:0;do s[x++]=u;while(--i!==0);o=x}}if(l[0]=-1,E=[],D=[],O=[],k=[],E[0]=9,D[0]=6,m=a,m=p.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),s,E,D,O,k,f,e),m!=M)return m==F&&(s=null,r=R),t=m,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);u.init(E[0],D[0],f,O[0],f,k[0]),r=ze;case ze:if(n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,(t=u.proc(n,e,t))!=N)return n.inflate_flush(e,t);if(t=M,u.free(e),_=e.next_in_index,v=e.avail_in,h=n.bitb,g=n.bitk,y=n.write,b=y<n.read?n.read-y-1:n.end-y,d===0){r=Ne;break}r=Be;case Be:if(n.write=y,t=n.inflate_flush(e,t),y=n.write,b=y<n.read?n.read-y-1:n.end-y,n.read!=n.write)return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);r=Ve;case Ve:return t=N,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);case R:return t=F,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);default:return t=P,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t)}}},n.free=function(e){n.reset(e,null),n.win=null,f=null},n.set_dictionary=function(e,t,r){n.win.set(e.subarray(t,t+r),0),n.read=n.write=r},n.sync_point=function(){return+(r==Pe)}}var Ue=32,We=8,Ge=0,Ke=1,qe=2,Je=3,Ye=4,Xe=5,Ze=6,Qe=7,$e=12,z=13,et=[0,0,255,255];function tt(){let e=this;e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0;function t(e){return!e||!e.istate?P:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=Qe,e.istate.blocks.reset(e,null),M)}e.inflateEnd=function(t){return e.blocks&&e.blocks.free(t),e.blocks=null,M},e.inflateInit=function(n,r){return n.msg=null,e.blocks=null,r<8||r>15?(e.inflateEnd(n),P):(e.wbits=r,n.istate.blocks=new He(n,1<<r),t(n),M)},e.inflate=function(e,t){let n,r;if(!e||!e.istate||!e.next_in)return P;let i=e.istate;for(t=t==ue?I:M,n=I;;)switch(i.mode){case Ge:if(e.avail_in===0)return n;if(n=t,e.avail_in--,e.total_in++,((i.method=e.read_byte(e.next_in_index++))&15)!=We){i.mode=z,e.msg=`unknown compression method`,i.marker=5;break}if((i.method>>4)+8>i.wbits){i.mode=z,e.msg=`invalid win size`,i.marker=5;break}i.mode=Ke;case Ke:if(e.avail_in===0)return n;if(n=t,e.avail_in--,e.total_in++,r=e.read_byte(e.next_in_index++)&255,((i.method<<8)+r)%31!=0){i.mode=z,e.msg=`incorrect header check`,i.marker=5;break}if((r&Ue)===0){i.mode=Qe;break}i.mode=qe;case qe:if(e.avail_in===0)return n;n=t,e.avail_in--,e.total_in++,i.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,i.mode=Je;case Je:if(e.avail_in===0)return n;n=t,e.avail_in--,e.total_in++,i.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,i.mode=Ye;case Ye:if(e.avail_in===0)return n;n=t,e.avail_in--,e.total_in++,i.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,i.mode=Xe;case Xe:return e.avail_in===0?n:(n=t,e.avail_in--,e.total_in++,i.need+=e.read_byte(e.next_in_index++)&255,i.mode=Ze,oe);case Ze:return i.mode=z,e.msg=`need dictionary`,i.marker=0,P;case Qe:if(n=i.blocks.proc(e,n),n==F){i.mode=z,i.marker=0;break}if(n==M&&(n=t),n!=N)return n;n=t,i.blocks.reset(e,i.was),i.mode=$e;case $e:return e.avail_in=0,N;case z:return F;default:return P}},e.inflateSetDictionary=function(e,t,n){let r=0,i=n;if(!e||!e.istate||e.istate.mode!=Ze)return P;let a=e.istate;return i>=1<<a.wbits&&(i=(1<<a.wbits)-1,r=n-i),a.blocks.set_dictionary(t,r,i),a.mode=Qe,M},e.inflateSync=function(e){let n,r,i,a,o;if(!e||!e.istate)return P;let s=e.istate;if(s.mode!=z&&(s.mode=z,s.marker=0),(n=e.avail_in)===0)return I;for(r=e.next_in_index,i=s.marker;n!==0&&i<4;)e.read_byte(r)==et[i]?i++:i=e.read_byte(r)===0?4-i:0,r++,n--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=n,s.marker=i,i==4?(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,s.mode=Qe,M):F},e.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?P:e.istate.blocks.sync_point()}}function nt(){}nt.prototype={inflateInit(e){let t=this;return t.istate=new tt,e||=ae,t.istate.inflateInit(t,e)},inflate(e){let t=this;return t.istate?t.istate.inflate(t,e):P},inflateEnd(){let e=this;if(!e.istate)return P;let t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){let e=this;return e.istate?e.istate.inflateSync(e):P},inflateSetDictionary(e,t){let n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):P},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};function rt(e){let t=this,n=new nt,r=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,i=le,a=new Uint8Array(r),o=!1;n.inflateInit(),n.next_out=a,t.append=function(e,t){let s=[],c,l,u=0,d=0,f=0;if(e.length!==0){n.next_in_index=0,n.next_in=e,n.avail_in=e.length;do{if(n.next_out_index=0,n.avail_out=r,n.avail_in===0&&!o&&(n.next_in_index=0,o=!0),c=n.inflate(i),o&&c===I){if(n.avail_in!==0)throw Error(`inflating: bad input`)}else if(c!==M&&c!==N)throw Error(`inflating: `+n.msg);if((o||c===N)&&n.avail_in===e.length)throw Error(`inflating: bad input`);n.next_out_index&&(n.next_out_index===r?s.push(new Uint8Array(a)):s.push(a.subarray(0,n.next_out_index))),f+=n.next_out_index,t&&n.next_in_index>0&&n.next_in_index!=u&&(t(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return s.length>1?(l=new Uint8Array(f),s.forEach(function(e){l.set(e,d),d+=e.length})):l=s[0]?new Uint8Array(s[0]):new Uint8Array,l}},t.flush=function(){n.inflateEnd()}}var it=4294967295,at=65535,ot=101010256,st=39169,ct=21589,lt=28789,ut=25461,dt=6534,ft=2048,pt=`undefined`,mt=class{constructor(e){return class extends TransformStream{constructor(t,n){let r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){let t=r.flush();t&&e.enqueue(t)}})}}}},ht=64,gt=2;try{typeof navigator<`u`&&navigator.hardwareConcurrency&&(gt=navigator.hardwareConcurrency)}catch{}var B=Object.assign({},{chunkSize:512*1024,maxWorkers:gt,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:void 0,CompressionStreamNative:typeof CompressionStream<`u`&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream<`u`&&DecompressionStream});function _t(){return B}function vt(e){return Math.max(e.chunkSize,ht)}function yt(e){let{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:a,useWebWorkers:o,Deflate:s,Inflate:c,CompressionStream:l,DecompressionStream:u,workerScripts:d}=e;if(V(`baseURL`,t),V(`chunkSize`,n),V(`maxWorkers`,r),V(`terminateWorkerTimeout`,i),V(`useCompressionStream`,a),V(`useWebWorkers`,o),s&&(B.CompressionStream=new mt(s)),c&&(B.DecompressionStream=new mt(c)),V(`CompressionStream`,l),V(`DecompressionStream`,u),d!==void 0){let{deflate:e,inflate:t}=d;if((e||t)&&(B.workerScripts||={}),e){if(!Array.isArray(e))throw Error(`workerScripts.deflate must be an array`);B.workerScripts.deflate=e}if(t){if(!Array.isArray(t))throw Error(`workerScripts.inflate must be an array`);B.workerScripts.inflate=t}}}function V(e,t){t!==void 0&&(B[e]=t)}function bt(){return`application/octet-stream`}var xt=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t>>>=1;xt[e]=t}var St=class{constructor(e){this.crc=e||-1}append(e){let t=this.crc|0;for(let n=0,r=e.length|0;n<r;n++)t=t>>>8^xt[(t^e[n])&255];this.crc=t}get(){return~this.crc}},Ct=class extends TransformStream{constructor(){let e,t=new St;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){let n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}};function wt(e){if(typeof TextEncoder>`u`){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}else return new TextEncoder().encode(e)}var H={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],r=H.getPartial(n);return r===32?e.concat(t):H._shiftRight(t,r,n|0,e.slice(0,e.length-1))},bitLength(e){let t=e.length;if(t===0)return 0;let n=e[t-1];return(t-1)*32+H.getPartial(n)},clamp(e,t){if(e.length*32<t)return e;e=e.slice(0,Math.ceil(t/32));let n=e.length;return t&=31,n>0&&t&&(e[n-1]=H.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let i=0;i<e.length;i++)r.push(n|e[i]>>>t),n=e[i]<<32-t;let i=e.length?e[e.length-1]:0,a=H.getPartial(i);return r.push(H.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},Tt={bytes:{fromBits(e){let t=H.bitLength(e)/8,n=new Uint8Array(t),r;for(let i=0;i<t;i++)i&3||(r=e[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(e){let t=[],n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],(n&3)==3&&(t.push(r),r=0);return n&3&&t.push(H.partial(8*(n&3),r)),t}}},Et={};Et.sha1=class{constructor(e){let t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){let e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){let t=this;typeof e==`string`&&(e=Tt.utf8String.toBits(e));let n=t._buffer=H.concat(t._buffer,e),r=t._length,i=t._length=r+H.bitLength(e);if(i>9007199254740991)throw Error(`Cannot hash more than 2^53 - 1 bits`);let a=new Uint32Array(n),o=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);e<=i;e+=t.blockSize)t._block(a.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),t}finalize(){let e=this,t=e._buffer,n=e._h;t=H.concat(t,[H.partial(1,1)]);for(let e=t.length+2;e&15;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r}_S(e,t){return t<<e|t>>>32-e}_block(e){let t=this,n=t._h,r=Array(80);for(let t=0;t<16;t++)r[t]=e[t];let i=n[0],a=n[1],o=n[2],s=n[3],c=n[4];for(let e=0;e<=79;e++){e>=16&&(r[e]=t._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));let n=t._S(5,i)+t._f(e,a,o,s)+c+r[e]+t._key[Math.floor(e/20)]|0;c=s,s=o,o=t._S(30,a),a=i,i=n}n[0]=n[0]+i|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0}};var Dt={};Dt.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],r=t._tables[1],i=e.length,a,o,s,c=1;if(i!==4&&i!==6&&i!==8)throw Error(`invalid aes key size`);for(t._key=[o=e.slice(0),s=[]],a=i;a<4*i+28;a++){let e=o[a-1];(a%i===0||i===8&&a%i===4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[e&255],a%i===0&&(e=e<<8^e>>>24^c<<24,c=c<<1^(c>>7)*283)),o[a]=o[a-i]^e}for(let e=0;a;e++,a--){let t=o[e&3?a:a-4];a<=4||e<4?s[e]=t:s[e]=r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[t&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],a=[],o,s,c,l;for(let e=0;e<256;e++)a[(i[e]=e<<1^(e>>7)*283)^e]=e;for(let u=o=0;!n[u];u^=s||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^a&255^99,n[u]=a,r[a]=u,l=i[c=i[s=i[u]]];let d=l*16843009^c*65537^s*257^u*16843008,f=i[a]*257^a*16843008;for(let n=0;n<4;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=d=d<<24^d>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(e.length!==4)throw Error(`invalid aes block size`);let n=this._key[t],r=n.length/4-2,i=[0,0,0,0],a=this._tables[t],o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],d=e[0]^n[0],f=e[t?3:1]^n[1],p=e[2]^n[2],m=e[t?1:3]^n[3],h=4,g,_,v;for(let e=0;e<r;e++)g=o[d>>>24]^s[f>>16&255]^c[p>>8&255]^l[m&255]^n[h],_=o[f>>>24]^s[p>>16&255]^c[m>>8&255]^l[d&255]^n[h+1],v=o[p>>>24]^s[m>>16&255]^c[d>>8&255]^l[f&255]^n[h+2],m=o[m>>>24]^s[d>>16&255]^c[f>>8&255]^l[p&255]^n[h+3],h+=4,d=g,f=_,p=v;for(let e=0;e<4;e++)i[t?3&-e:e]=u[d>>>24]<<24^u[f>>16&255]<<16^u[p>>8&255]<<8^u[m&255]^n[h++],g=d,d=f,f=p,p=m,m=g;return i}};var Ot={getRandomValues(e){let t=new Uint32Array(e.buffer),n=e=>{let t=987654321,n=4294967295;return function(){return t=36969*(t&65535)+(t>>16)&n,e=18e3*(e&65535)+(e>>16)&n,(((t<<16)+e&n)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r<e.length;r+=4){let e=n((i||Math.random())*4294967296);i=e()*987654071,t[r/4]=e()*4294967296|0}return e}},kt={};kt.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)==255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];let i=H.bitLength(t);for(let i=0;i<r;i+=4){this.incCounter(n);let r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return H.clamp(t,i)}};var At={importKey(e){return new At.hmacSha1(Tt.bytes.toBits(e))},pbkdf2(e,t,n,r){if(n||=1e4,r<0||n<0)throw Error(`invalid params to pbkdf2`);let i=(r>>5)+1<<2,a,o,s,c,l,u=new ArrayBuffer(i),d=new DataView(u),f=0,p=H;for(t=Tt.bytes.toBits(t),l=1;f<(i||1);l++){for(a=o=e.encrypt(p.concat(t,[l])),s=1;s<n;s++)for(o=e.encrypt(o),c=0;c<o.length;c++)a[c]^=o[c];for(s=0;f<(i||1)&&s<a.length;s++)d.setInt32(f,a[s]),f+=4}return u.slice(0,r/8)}};At.hmacSha1=class{constructor(e){let t=this,n=t._hash=Et.sha1,r=[[],[]];t._baseHash=[new n,new n];let i=t._baseHash[0].blockSize/32;e.length>i&&(e=new n().update(e).finalize());for(let t=0;t<i;t++)r[0][t]=e[t]^909522486,r[1][t]=e[t]^1549556828;t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){let e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){let t=this;t._updated=!0,t._resultHash.update(e)}digest(){let e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw Error(`encrypt on already updated hmac called!`);return this.update(e),this.digest(e)}};var jt=typeof crypto<`u`&&typeof crypto.getRandomValues==`function`,Mt=`Invalid password`,Nt=`Invalid signature`,Pt=`zipjs-abort-check-password`;function Ft(e){return jt?crypto.getRandomValues(e):Ot.getRandomValues(e)}var It=16,Lt=`raw`,Rt={name:`PBKDF2`},zt={name:`HMAC`},Bt=`SHA-1`,Vt=Object.assign({hash:zt},Rt),Ht=Object.assign({iterations:1e3,hash:{name:Bt}},Rt),Ut=[`deriveBits`],Wt=[8,12,16],Gt=[16,24,32],U=10,Kt=[0,0,0,0],qt=typeof crypto!=pt,Jt=qt&&crypto.subtle,Yt=qt&&Jt!==void 0,W=Tt.bytes,Xt=Dt.aes,Zt=kt.ctrGladman,Qt=At.hmacSha1,$t=qt&&Yt&&typeof Jt.importKey==`function`,en=qt&&Yt&&typeof Jt.deriveBits==`function`,tn=class extends TransformStream{constructor({password:e,rawPassword:t,signed:n,encryptionStrength:r,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(e=>this.resolveReady=e),password:un(e,t),signed:n,strength:r-1,pending:new Uint8Array})},async transform(e,t){let n=this,{password:r,strength:a,resolveReady:o,ready:s}=n;r?(await an(n,a,r,G(e,0,Wt[a]+2)),e=G(e,Wt[a]+2),i?t.error(Error(Pt)):o()):await s;let c=new Uint8Array(e.length-U-(e.length-U)%It);t.enqueue(rn(n,e,c,0,U,!0))},async flush(e){let{signed:t,ctr:n,hmac:r,pending:i,ready:a}=this;if(r&&n){await a;let o=G(i,0,i.length-U),s=G(i,i.length-U),c=new Uint8Array;if(o.length){let e=mn(W,o);r.update(e),c=pn(W,n.update(e))}if(t){let e=G(pn(W,r.digest()),0,U);for(let t=0;t<U;t++)if(e[t]!=s[t])throw Error(Nt)}e.enqueue(c)}}})}},nn=class extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:n}){let r;super({start(){Object.assign(this,{ready:new Promise(e=>this.resolveReady=e),password:un(e,t),strength:n-1,pending:new Uint8Array})},async transform(e,t){let n=this,{password:r,strength:i,resolveReady:a,ready:o}=n,s=new Uint8Array;r?(s=await on(n,i,r),a()):await o;let c=new Uint8Array(s.length+e.length-e.length%It);c.set(s,0),t.enqueue(rn(n,e,c,s.length,0))},async flush(e){let{ctr:t,hmac:n,pending:i,ready:a}=this;if(n&&t){await a;let o=new Uint8Array;if(i.length){let e=t.update(mn(W,i));n.update(e),o=pn(W,e)}r.signature=pn(W,n.digest()).slice(0,U),e.enqueue(dn(o,r.signature))}}}),r=this}};function rn(e,t,n,r,i,a){let{ctr:o,hmac:s,pending:c}=e,l=t.length-i;c.length&&(t=dn(c,t),n=fn(n,l-l%It));let u;for(u=0;u<=l-It;u+=It){let e=mn(W,G(t,u,u+It));a&&s.update(e);let i=o.update(e);a||s.update(i),n.set(pn(W,i),u+r)}return e.pending=G(t,u),n}async function an(e,t,n,r){let i=await sn(e,t,n,G(r,0,Wt[t])),a=G(r,Wt[t]);if(i[0]!=a[0]||i[1]!=a[1])throw Error(Mt)}async function on(e,t,n){let r=Ft(new Uint8Array(Wt[t]));return dn(r,await sn(e,t,n,r))}async function sn(e,t,n,r){e.password=null;let i=await cn(Lt,n,Vt,!1,Ut),a=await ln(Object.assign({salt:r},Ht),i,8*(Gt[t]*2+2)),o=new Uint8Array(a),s=mn(W,G(o,0,Gt[t])),c=mn(W,G(o,Gt[t],Gt[t]*2)),l=G(o,Gt[t]*2);return Object.assign(e,{keys:{key:s,authentication:c,passwordVerification:l},ctr:new Zt(new Xt(s),Array.from(Kt)),hmac:new Qt(c)}),l}async function cn(e,t,n,r,i){if($t)try{return await Jt.importKey(e,t,n,r,i)}catch{return $t=!1,At.importKey(t)}else return At.importKey(t)}async function ln(e,t,n){if(en)try{return await Jt.deriveBits(e,t,n)}catch{return en=!1,At.pbkdf2(t,e.salt,Ht.iterations,n)}else return At.pbkdf2(t,e.salt,Ht.iterations,n)}function un(e,t){return t===void 0?wt(e):t}function dn(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function fn(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function G(e,t,n){return e.subarray(t,n)}function pn(e,t){return e.fromBits(t)}function mn(e,t){return e.toBits(t)}var hn=12,gn=class extends TransformStream{constructor({password:e,passwordVerification:t,checkPasswordOnly:n}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),bn(this,e)},transform(e,t){let r=this;if(r.password){let t=vn(r,e.subarray(0,hn));if(r.password=null,t.at(-1)!=r.passwordVerification)throw Error(Mt);e=e.subarray(hn)}n?t.error(Error(Pt)):t.enqueue(vn(r,e))}})}},_n=class extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),bn(this,e)},transform(e,t){let n=this,r,i;if(n.password){n.password=null;let t=Ft(new Uint8Array(hn));t[hn-1]=n.passwordVerification,r=new Uint8Array(e.length+t.length),r.set(yn(n,t),0),i=hn}else r=new Uint8Array(e.length),i=0;r.set(yn(n,e),i),t.enqueue(r)}})}};function vn(e,t){let n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Sn(e)^t[r],xn(e,n[r]);return n}function yn(e,t){let n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Sn(e)^t[r],xn(e,t[r]);return n}function bn(e,t){let n=[305419896,591751049,878082192];Object.assign(e,{keys:n,crcKey0:new St(n[0]),crcKey2:new St(n[2])});for(let n=0;n<t.length;n++)xn(e,t.charCodeAt(n))}function xn(e,t){let[n,r,i]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=wn(Math.imul(wn(r+Cn(n)),134775813)+1),e.crcKey2.append([r>>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function Sn(e){let t=e.keys[2]|2;return Cn(Math.imul(t,t^1)>>>8)}function Cn(e){return e&255}function wn(e){return e&4294967295}var Tn=`Invalid uncompressed size`,En=`deflate-raw`,Dn=class extends TransformStream{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});let{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:s,signed:c,level:l}=e,u=this,d,f,p=super.readable;(!a||s)&&c&&(d=new Ct,p=K(p,d)),i&&(p=An(p,o,{level:l,chunkSize:t},r,n)),a&&(s?p=K(p,new _n(e)):(f=new nn(e),p=K(p,f))),kn(u,p,()=>{let e;a&&!s&&(e=f.signature),(!a||s)&&c&&(e=new DataView(d.value.buffer).getUint32(0)),u.signature=e})}},On=class extends TransformStream{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});let{zipCrypto:i,encrypted:a,signed:o,signature:s,compressed:c,useCompressionStream:l}=e,u,d,f=super.readable;a&&(i?f=K(f,new gn(e)):(d=new tn(e),f=K(f,d))),c&&(f=An(f,l,{chunkSize:t},r,n)),(!a||i)&&o&&(u=new Ct,f=K(f,u)),kn(this,f,()=>{if((!a||i)&&o&&s!=new DataView(u.value.buffer).getUint32(0,!1))throw Error(Nt)})}};function kn(e,t,n){t=K(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function An(e,t,n,r,i){try{e=K(e,new(t&&r?r:i)(En,n))}catch(r){if(t)e=K(e,new i(En,n));else throw r}return e}function K(e,t){return e.pipeThrough(t)}var jn=`message`,Mn=`start`,Nn=`data`,Pn=`close`,Fn=`inflate`,In=class extends TransformStream{constructor(e,t){super({});let n=this,{codecType:r}=e,i;r.startsWith(`deflate`)?i=Dn:r.startsWith(`inflate`)&&(i=On),n.outputSize=0;let a=0,o=new i(e,t),s=super.readable,c=new TransformStream({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){Object.assign(n,{inputSize:a})}}),l=new TransformStream({transform(t,r){if(t&&t.length&&(r.enqueue(t),n.outputSize+=t.length,e.outputSize&&n.outputSize>e.outputSize))throw Error(Tn)},flush(){let{signature:e}=o;Object.assign(n,{signature:e,inputSize:a})}});Object.defineProperty(n,"readable",{get(){return s.pipeThrough(c).pipeThrough(o).pipeThrough(l)}})}},Ln=class extends TransformStream{constructor(e){let t;super({transform:n,flush(e){t&&t.length&&e.enqueue(t)}});function n(r,i){if(t){let e=new Uint8Array(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(i.enqueue(r.slice(0,e)),n(r.slice(e),i)):t=r}}},Rn=typeof Worker!=pt,zn=class{constructor(e,{readable:t,writable:n},{options:r,config:i,streamOptions:a,useWebWorkers:o,transferStreams:s,scripts:c},l){let{signal:u}=a;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new Ln(i.chunkSize)).pipeThrough(new Bn(a),{signal:u}),writable:n,options:Object.assign({},r),scripts:c,transferStreams:s,terminate(){return new Promise(t=>{let{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})},onTaskFinished(){let{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,l(e)}}),(o&&Rn?Un:Hn)(e,i)}},Bn=class extends TransformStream{constructor({onstart:e,onprogress:t,size:n,onend:r}){let i=0;super({async start(){e&&await Vn(e,n)},async transform(e,r){i+=e.length,t&&await Vn(t,i,n),r.enqueue(e)},async flush(){r&&await Vn(r,i)}})}};async function Vn(e,...t){try{await e(...t)}catch{}}function Hn(e,t){return{run:()=>Wn(e,t)}}function Un(e,t){let{baseURL:n,chunkSize:r}=t;if(!e.interface){let i;try{i=Yn(e.scripts[0],n,e)}catch{return Rn=!1,Hn(e,t)}Object.assign(e,{worker:i,interface:{run:()=>Gn(e,{chunkSize:r})}})}return e.interface}async function Wn({options:e,readable:t,writable:n,onTaskFinished:r},i){let a;try{a=new In(e,i),await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});let{signature:r,inputSize:o,outputSize:s}=a;return{signature:r,inputSize:o,outputSize:s}}catch(e){throw a&&(e.outputSize=a.outputSize),e}finally{r()}}async function Gn(e,t){let n,r,i=new Promise((e,t)=>{n=e,r=t});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});let{readable:a,options:o,scripts:s}=e,{writable:c,closed:l}=Kn(e.writable),u=Xn({type:Mn,scripts:s.slice(1),options:o,config:t,readable:a,writable:c},e);u||Object.assign(e,{reader:a.getReader(),writer:c.getWriter()});let d=await i;return u||await c.getWriter().close(),await l,d}function Kn(e){let t,n=new Promise(e=>t=e);return{writable:new WritableStream({async write(t){let n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort(t){return e.getWriter().abort(t)}}),closed:n}}var qn=!0,Jn=!0;function Yn(e,t,n){let r={type:`module`},i,a;typeof e==`function`&&(e=e());try{i=new URL(e,t)}catch{i=e}if(qn)try{a=new Worker(i)}catch{qn=!1,a=new Worker(i,r)}else a=new Worker(i,r);return a.addEventListener(jn,e=>Zn(e,n)),a}function Xn(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:n,readable:r,writable:a}=e,o=[];if(n&&(n.byteLength<n.buffer.byteLength?e.value=n.buffer.slice(0,n.byteLength):e.value=n.buffer,o.push(e.value)),i&&Jn?(r&&o.push(r),a&&o.push(a)):e.readable=e.writable=null,o.length)try{return t.postMessage(e,o),!0}catch{Jn=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),r(),e}}async function Zn({data:e},t){let{type:n,value:r,messageId:i,result:a,error:o}=e,{reader:s,writer:c,resolveResult:l,rejectResult:u,onTaskFinished:d}=t;try{if(o){let{message:e,stack:t,code:n,name:r,outputSize:i}=o,a=Error(e);Object.assign(a,{stack:t,code:n,name:r,outputSize:i}),f(a)}else{if(n==`pull`){let{value:e,done:n}=await s.read();Xn({type:Nn,value:e,done:n,messageId:i},t)}n==`data`&&(await c.ready,await c.write(new Uint8Array(r)),Xn({type:`ack`,messageId:i},t)),n==`close`&&f(null,a)}}catch(e){Xn({type:Pn,messageId:i},t),f(e)}function f(e,t){e?u(e):l(t),c&&c.releaseLock(),d()}}var q=[],Qn=[],$n=0;async function er(e,t){let{options:n,config:r}=t,{transferStreams:i,useWebWorkers:a,useCompressionStream:o,codecType:s,compressed:c,signed:l,encrypted:u}=n,{workerScripts:d,maxWorkers:f}=r;return t.transferStreams=i||i===void 0,t.useWebWorkers=!(!c&&!l&&!u&&!t.transferStreams)&&(a||a===void 0&&r.useWebWorkers),t.scripts=t.useWebWorkers&&d?d[s]:[],n.useCompressionStream=o||o===void 0&&r.useCompressionStream,(await p()).run();async function p(){let n=q.find(e=>!e.busy);if(n)return nr(n),new zn(n,e,t,m);if(q.length<f){let n={indexWorker:$n};return $n++,q.push(n),new zn(n,e,t,m)}else return new Promise(n=>Qn.push({resolve:n,stream:e,workerOptions:t}))}function m(e){if(Qn.length){let[{resolve:t,stream:n,workerOptions:r}]=Qn.splice(0,1);t(new zn(e,n,r,m))}else e.worker?(nr(e),tr(e,t)):q=q.filter(t=>t!=e)}}function tr(e,t){let{config:n}=t,{terminateWorkerTimeout:r}=n;Number.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{q=q.filter(t=>t!=e);try{await e.terminate()}catch{}},r))}function nr(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}async function rr(){await Promise.allSettled(q.map(e=>(nr(e),e.terminate())))}var ir=`HTTP error `,ar=`HTTP Range not supported`,or=`Writer iterator completed too soon`,sr=`Writer not initialized`,cr=`text/plain`,lr=`Content-Length`,ur=`Content-Range`,dr=`Accept-Ranges`,fr=`Range`,pr=`Content-Type`,mr=`HEAD`,hr=`GET`,gr=`bytes`,_r=64*1024,vr=`writable`,yr=class{constructor(){this.size=0}init(){this.initialized=!0}},J=class extends yr{get readable(){let e=this,{chunkSize:t=_r}=e,n=new ReadableStream({start(){this.chunkOffset=0},async pull(r){let{offset:i=0,size:a,diskNumberStart:o}=n,{chunkOffset:s}=this,c=a===void 0?t:Math.min(t,a-s),l=await Y(e,i+s,c,o);r.enqueue(l),s+t>a||a===void 0&&!l.length&&c?r.close():this.chunkOffset+=t}});return n}},br=class extends yr{constructor(){super();let e=this,t=new WritableStream({write(t){if(!e.initialized)throw Error(sr);return e.writeUint8Array(t)}});Object.defineProperty(e,vr,{get(){return t}})}writeUint8Array(){}},xr=class extends J{constructor(e){super();let t=e.length;for(;e.charAt(t-1)==`=`;)t--;let n=e.indexOf(`,`)+1;Object.assign(this,{dataURI:e,dataStart:n,size:Math.floor((t-n)*.75)})}readUint8Array(e,t){let{dataStart:n,dataURI:r}=this,i=new Uint8Array(t),a=Math.floor(e/3)*4,o=atob(r.substring(a+n,Math.ceil((e+t)/3)*4+n)),s=e-Math.floor(a/4)*3,c=0;for(let e=s;e<s+t&&e<o.length;e++)i[e-s]=o.charCodeAt(e),c++;return c<i.length?i.subarray(0,c):i}},Sr=class extends br{constructor(e){super(),Object.assign(this,{data:`data:`+(e||``)+`;base64,`,pending:[]})}writeUint8Array(e){let t=this,n=0,r=t.pending,i=t.pending.length;for(t.pending=``,n=0;n<Math.floor((i+e.length)/3)*3-i;n++)r+=String.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=String.fromCharCode(e[n]);r.length&&(r.length>2?t.data+=btoa(r):t.pending+=r)}getData(){return this.data+btoa(this.pending)}},Cr=class extends J{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){let n=this,r=e+t,i=await(e||r<n.size?n.blob.slice(e,r):n.blob).arrayBuffer();return i.byteLength>t&&(i=i.slice(e,r)),new Uint8Array(i)}},wr=class extends yr{constructor(e){super();let t=this,n=new TransformStream,r=[];e&&r.push([pr,e]),Object.defineProperty(t,vr,{get(){return n.writable}}),t.blob=new Response(n.readable,{headers:r}).blob()}getData(){return this.blob}},Tr=class extends Cr{constructor(e){super(new Blob([e],{type:cr}))}},Er=class extends wr{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||e.toLowerCase()==`utf-8`})}async getData(){let{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{let t=new FileReader;return new Promise((r,i)=>{Object.assign(t,{onload:({target:e})=>r(e.result),onerror:()=>i(t.error)}),t.readAsText(n,e)})}}},Dr=class extends J{constructor(e,t){super(),kr(this,e,t)}async init(){await Ar(this,Rr,Pr),super.init()}readUint8Array(e,t){return jr(this,e,t,Rr,Pr)}},Or=class extends J{constructor(e,t){super(),kr(this,e,t)}async init(){await Ar(this,zr,Fr),super.init()}readUint8Array(e,t){return jr(this,e,t,zr,Fr)}};function kr(e,t,n){let{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.combineSizeEocd,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o})}async function Ar(e,t,n){let{url:r,preventHeadRequest:i,useRangeHeader:a,forceRangeRequests:o,combineSizeEocd:s}=e;if(Jr(r)&&(a||o)&&(i===void 0||i)){let r=await t(hr,e,Mr(e,s?-22:void 0));if(!o&&r.headers.get(dr)!=gr)throw Error(ar);{s&&(e.eocdCache=new Uint8Array(await r.arrayBuffer()));let i,a=r.headers.get(ur);if(a){let e=a.trim().split(/\s*\/\s*/);if(e.length){let t=e[1];t&&t!=`*`&&(i=Number(t))}}i===void 0?await Lr(e,t,n):e.size=i}}else await Lr(e,t,n)}async function jr(e,t,n,r,i){let{useRangeHeader:a,forceRangeRequests:o,eocdCache:s,size:c,options:l}=e;if(a||o){if(s&&t==c-22&&n==22)return s;if(t>=c)return new Uint8Array;{t+n>c&&(n=c-t);let i=await r(hr,e,Mr(e,t,n));if(i.status!=206)throw Error(ar);return new Uint8Array(await i.arrayBuffer())}}else{let{data:r}=e;return r||await i(e,l),new Uint8Array(e.data.subarray(t,t+n))}}function Mr(e,t=0,n=1){return Object.assign({},Nr(e),{[fr]:`bytes=`+(t<0?t:t+`-`+(t+n-1))})}function Nr({options:e}){let{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function Pr(e){await Ir(e,Rr)}async function Fr(e){await Ir(e,zr)}async function Ir(e,t){let n=await t(hr,e,Nr(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||=e.data.length}async function Lr(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{let r=(await t(mr,e,Nr(e))).headers.get(lr);r?e.size=Number(r):await n(e,e.options)}}async function Rr(e,{options:t,url:n},r){let i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?Error(ar):Error(ir+(i.statusText||i.status))}function zr(e,{url:t},n){return new Promise((r,i)=>{let a=new XMLHttpRequest;if(a.addEventListener(`load`,()=>{if(a.status<400){let e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(t=>{let n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,e=>e.toUpperCase()),e.push(n)}),r({status:a.status,arrayBuffer:()=>a.response,headers:new Map(e)})}else i(a.status==416?Error(ar):Error(ir+(a.statusText||a.status)))},!1),a.addEventListener(`error`,e=>i(e.detail?e.detail.error:Error(`Network error`)),!1),a.open(e,t),n)for(let e of Object.entries(n))a.setRequestHeader(e[0],e[1]);a.responseType=`arraybuffer`,a.send()})}var Br=class extends J{constructor(e,t={}){super(),Object.assign(this,{url:e,reader:t.useXHR?new Or(e,t):new Dr(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}},Vr=class extends Br{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},Hr=class extends J{constructor(e){super(),e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Object.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},Ur=class extends br{init(e=0){Object.assign(this,{offset:0,array:new Uint8Array(e)}),super.init()}writeUint8Array(e){let t=this;if(t.offset+e.length>t.array.length){let n=t.array;t.array=new Uint8Array(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},Wr=class extends J{constructor(e){super(),this.readers=e}async init(){let e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(t.map(async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size})),super.init()}async readUint8Array(e,t,n=0){let r=this,{readers:i}=this,a,o=n;o==-1&&(o=i.length-1);let s=e;for(;i[o]&&s>=i[o].size;)s-=i[o].size,o++;let c=i[o];if(c){let i=c.size;if(s+t<=i)a=await Y(c,s,t);else{let o=i-s;a=new Uint8Array(t);let l=await Y(c,s,o);a.set(l,0);let u=await r.readUint8Array(e+o,t-o,n);a.set(u,o),l.length+u.length<t&&(a=a.subarray(0,l.length+u.length))}}else a=new Uint8Array;return r.lastDiskNumber=Math.max(o,r.lastDiskNumber),a}},Gr=class extends yr{constructor(e,t=4294967295){super();let n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let r,i,a,o=new WritableStream({async write(t){let{availableSize:o}=n;if(a)t.length>=o?(await s(t.subarray(0,o)),await c(),n.diskOffset+=r.size,n.diskNumber++,a=null,await this.write(t.subarray(o))):await s(t);else{let{value:o,done:s}=await e.next();if(s&&!o)throw Error(or);r=o,r.size=0,r.maxSize&&(n.maxSize=r.maxSize),n.availableSize=n.maxSize,await Yr(r),i=o.writable,a=i.getWriter(),await this.write(t)}},async close(){await a.ready,await c()}});Object.defineProperty(n,vr,{get(){return o}});async function s(e){let t=e.length;t&&(await a.ready,await a.write(e),r.size+=t,n.size+=t,n.availableSize-=t)}async function c(){await a.close()}}},Kr=class{constructor(e){return Array.isArray(e)&&(e=new Wr(e)),e instanceof ReadableStream&&(e={readable:e}),e}},qr=class{constructor(e){return e.writable===void 0&&typeof e.next==`function`&&(e=new Gr(e)),e instanceof WritableStream&&(e={writable:e}),e.size===void 0&&(e.size=0),e instanceof Gr||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}};function Jr(e){let{baseURL:t}=_t(),{protocol:n}=new URL(e,t);return n==`http:`||n==`https:`}async function Yr(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function Y(e,t,n,r){return e.readUint8Array(t,n,r)}var Xr=Wr,Zr=Gr,Qr=`\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ `.split(``),$r=Qr.length==256;function ei(e){if($r){let t=``;for(let n=0;n<e.length;n++)t+=Qr[e[n]];return t}else return new TextDecoder().decode(e)}function ti(e,t){return t&&t.trim().toLowerCase()==`cp437`?ei(e):new TextDecoder(t).decode(e)}var ni=`filename`,ri=`rawFilename`,ii=`comment`,ai=`rawComment`,oi=`uncompressedSize`,si=`compressedSize`,ci=`offset`,li=`diskNumberStart`,ui=`lastModDate`,di=`rawLastModDate`,fi=`lastAccessDate`,pi=`rawLastAccessDate`,mi=`creationDate`,hi=`rawCreationDate`,gi=[ni,ri,si,oi,ui,di,ii,ai,fi,mi,ci,li,li,`internalFileAttribute`,`internalFileAttributes`,`externalFileAttribute`,`externalFileAttributes`,`msDosCompatible`,`zip64`,`encrypted`,`version`,`versionMadeBy`,`zipCrypto`,`directory`,`executable`,`compressionMethod`,`signature`,`extraField`,`bitFlag`,`filenameUTF8`,`commentUTF8`,`rawExtraField`,`extraFieldZip64`,`extraFieldUnicodePath`,`extraFieldUnicodeComment`,`extraFieldAES`,`extraFieldNTFS`,`extraFieldExtendedTimestamp`],_i=class{constructor(e){gi.forEach(t=>this[t]=e[t])}},vi=`filenameEncoding`,yi=`commentEncoding`,bi=`extractPrependedData`,xi=`extractAppendedData`,Si=`password`,Ci=`rawPassword`,wi=`passThrough`,Ti=`signal`,Ei=`checkPasswordOnly`,Di=`checkOverlappingEntryOnly`,Oi=`checkOverlappingEntry`,ki=`useWebWorkers`,Ai=`useCompressionStream`,ji=`transferStreams`,Mi=`File format is not recognized`,Ni=`End of central directory not found`,Pi=`End of Zip64 central directory locator not found`,Fi=`Central directory header not found`,Ii=`Local file header not found`,Li=`Zip64 extra field not found`,Ri=`File contains encrypted entry`,zi=`Encryption method not supported`,Bi=`Compression method not supported`,Vi=`Split zip file`,Hi=`Overlapping entry found`,Ui=`utf-8`,Wi=`cp437`,Gi=[[oi,it],[si,it],[ci,it],[li,at]],Ki={[at]:{getValue:Q,bytes:4},[it]:{getValue:ca,bytes:8}},qi=class{constructor(e,t={}){Object.assign(this,{reader:new Kr(e),options:t,config:_t(),readRanges:[]})}async*getEntriesGenerator(e={}){let t=this,{reader:n}=t,{config:r}=t;if(await Yr(n),(n.size===void 0||!n.readUint8Array)&&(n=new Cr(await new Response(n.readable).blob()),await Yr(n)),n.size<22)throw Error(Mi);n.chunkSize=vt(r);let i=await ia(n,ot,n.size,22,at*16);if(!i)throw Q($(await Y(n,0,4)))==134695760?Error(Vi):Error(Ni);let a=$(i),o=Q(a,12),s=Q(a,16),c=i.offset,l=Z(a,20),u=c+22+l,d=Z(a,4),f=n.lastDiskNumber||0,p=Z(a,6),m=Z(a,8),h=0,g=0;if(s==4294967295||o==4294967295||m==65535||p==65535){let e=$(await Y(n,i.offset-20,20));if(Q(e,0)==117853008){s=ca(e,8);let t=await Y(n,s,56,-1),r=$(t),a=i.offset-20-56;if(Q(r,0)!=101075792&&s!=a){let e=s;s=a,s>e&&(h=s-e),t=await Y(n,s,56,-1),r=$(t)}if(Q(r,0)!=101075792)throw Error(Pi);d==65535&&(d=Q(r,16)),p==65535&&(p=Q(r,20)),m==65535&&(m=ca(r,32)),o==4294967295&&(o=ca(r,40)),s-=o}}if(s>=n.size&&(h=n.size-s-o-22,s=n.size-o-22),f!=d)throw Error(Vi);if(s<0)throw Error(Mi);let _=0,v=await Y(n,s,o,p),y=$(v);if(o){let e=i.offset-o;if(Q(y,_)!=33639248&&s!=e){let t=s;s=e,s>t&&(h+=s-t),v=await Y(n,s,o,p),y=$(v)}}let b=i.offset-s-(n.lastDiskOffset||0);if(o!=b&&b>=0&&(o=b,v=await Y(n,s,o,p),y=$(v)),s<0||s>=n.size)throw Error(Mi);let x=X(t,e,vi),S=X(t,e,yi);for(let i=0;i<m;i++){let a=new Yi(n,r,t.options);if(Q(y,_)!=33639248)throw Error(Fi);Xi(a,y,_+6);let o=!!a.bitFlag.languageEncodingFlag,s=_+46,c=s+a.filenameLength,l=c+a.extraFieldLength,u=Z(y,_+4),d=u>>8==0,f=u>>8==3,p=v.subarray(s,c),b=Z(y,_+32),C=l+b,w=v.subarray(l,C),T=o,E=o,D=Q(y,_+38),O=d&&(sa(y,_+38)&16)==16||f&&(D>>16&61440)==16384||p.length&&p.at(-1)==47,k=f&&(D>>16&73)!=0,ee=Q(y,_+42)+h;Object.assign(a,{versionMadeBy:u,msDosCompatible:d,compressedSize:0,uncompressedSize:0,commentLength:b,directory:O,offset:ee,diskNumberStart:Z(y,_+34),internalFileAttributes:Z(y,_+36),externalFileAttributes:D,rawFilename:p,filenameUTF8:T,commentUTF8:E,rawExtraField:v.subarray(c,l),executable:k}),a.internalFileAttribute=a.internalFileAttributes,a.externalFileAttribute=a.externalFileAttributes;let te=X(t,e,`decodeText`)||ti,ne=T?Ui:x||Wi,re=E?Ui:S||Wi,A=te(p,ne);A===void 0&&(A=ti(p,ne));let ie=te(w,re);ie===void 0&&(ie=ti(w,re)),Object.assign(a,{rawComment:w,filename:A,comment:ie,directory:O||A.endsWith(`/`)}),g=Math.max(ee,g),Zi(a,a,y,_+6),a.zipCrypto=a.encrypted&&!a.extraFieldAES;let j=new _i(a);j.getData=(e,n)=>a.getData(e,j,t.readRanges,n),j.arrayBuffer=async e=>{let n=new TransformStream,[r]=await Promise.all([new Response(n.readable).arrayBuffer(),a.getData(n,j,t.readRanges,e)]);return r},_=C;let{onprogress:ae}=e;if(ae)try{await ae(i+1,m,new _i(a))}catch{}yield j}let C=X(t,e,bi),w=X(t,e,xi);return C&&(t.prependedData=g>0?await Y(n,0,g):new Uint8Array),t.comment=l?await Y(n,c+22,l):new Uint8Array,w&&(t.appendedData=u<n.size?await Y(n,u,n.size-u):new Uint8Array),!0}async getEntries(e={}){let t=[];for await(let n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}},Ji=class{constructor(e={}){let{readable:t,writable:n}=new TransformStream,r=new qi(t,e).getEntriesGenerator();this.readable=new ReadableStream({async pull(e){let{done:t,value:n}=await r.next();if(t)return e.close();let i={...n,readable:(function(){let{readable:e,writable:t}=new TransformStream;if(n.getData)return n.getData(t),e})()};delete i.getData,e.enqueue(i)}}),this.writable=n}},Yi=class{constructor(e,t,n){Object.assign(this,{reader:e,config:t,options:n})}async getData(e,t,n,r={}){let i=this,{reader:a,offset:o,diskNumberStart:s,extraFieldAES:c,extraFieldZip64:l,compressionMethod:u,config:d,bitFlag:f,signature:p,rawLastModDate:m,uncompressedSize:h,compressedSize:g}=i,{dataDescriptor:_}=f,v=t.localDirectory={},y=$(await Y(a,o,30,s)),b=X(i,r,Si),x=X(i,r,Ci),S=X(i,r,wi);if(b=b&&b.length&&b,x=x&&x.length&&x,c&&c.originalCompressionMethod!=99||u!=0&&u!=8&&!S)throw Error(Bi);if(Q(y,0)!=67324752)throw Error(Ii);Xi(v,y,4);let{extraFieldLength:C,filenameLength:w,lastAccessDate:T,creationDate:E}=v;v.rawExtraField=C?await Y(a,o+30+w,C,s):new Uint8Array,Zi(i,v,y,4,!0),Object.assign(t,{lastAccessDate:T,creationDate:E});let D=i.encrypted&&v.encrypted&&!S,O=D&&!c;if(S||(t.zipCrypto=O),D){if(!O&&c.strength===void 0)throw Error(zi);if(!b&&!x)throw Error(Ri)}let k=o+30+w+C,ee=g,te=a.readable;Object.assign(te,{diskNumberStart:s,offset:k,size:ee});let ne=X(i,r,Ti),re=X(i,r,Ei),A=X(i,r,Oi),ie=X(i,r,Di);ie&&(A=!0);let{onstart:j,onprogress:ae,onend:M}=r,N={options:{codecType:Fn,password:b,rawPassword:x,zipCrypto:O,encryptionStrength:c&&c.strength,signed:X(i,r,`checkSignature`)&&!S,passwordVerification:O&&(_?m>>>8&255:p>>>24&255),outputSize:h,signature:p,compressed:u!=0&&!S,encrypted:i.encrypted&&!S,useWebWorkers:X(i,r,ki),useCompressionStream:X(i,r,Ai),transferStreams:X(i,r,ji),checkPasswordOnly:re},config:d,streamOptions:{signal:ne,size:ee,onstart:j,onprogress:ae,onend:M}};A&&await ra({reader:a,fileEntry:t,offset:o,diskNumberStart:s,signature:p,compressedSize:g,uncompressedSize:h,dataOffset:k,dataDescriptor:_||v.bitFlag.dataDescriptor,extraFieldZip64:l||v.extraFieldZip64,readRanges:n});let oe;try{if(!ie){re&&(e=new WritableStream),e=new qr(e),await Yr(e,S?g:h),{writable:oe}=e;let{outputSize:t}=await er({readable:te,writable:oe},N);if(e.size+=t,t!=(S?g:h))throw Error(Tn)}}catch(t){if(t.outputSize!==void 0&&(e.size+=t.outputSize),!re||t.message!=`zipjs-abort-check-password`)throw t}finally{!X(i,r,`preventClose`)&&oe&&!oe.locked&&await oe.getWriter().close()}return re||ie?void 0:e.getData?e.getData():oe}};function Xi(e,t,n){let r=e.rawBitFlag=Z(t,n+2),i=(r&1)==1,a=Q(t,n+6);Object.assign(e,{encrypted:i,version:Z(t,n),bitFlag:{level:(r&6)>>1,dataDescriptor:(r&8)==8,languageEncodingFlag:(r&ft)==ft},rawLastModDate:a,lastModDate:aa(a),filenameLength:Z(t,n+22),extraFieldLength:Z(t,n+24)})}function Zi(e,t,n,r,i){let{rawExtraField:a}=t,o=t.extraField=new Map,s=$(new Uint8Array(a)),c=0;try{for(;c<a.length;){let e=Z(s,c),t=Z(s,c+2);o.set(e,{type:e,data:a.slice(c+4,c+4+t)}),c+=4+t}}catch{}let l=Z(n,r+4);Object.assign(t,{signature:Q(n,r+10),compressedSize:Q(n,r+14),uncompressedSize:Q(n,r+18)});let u=o.get(1);u&&(Qi(u,t),t.extraFieldZip64=u);let d=o.get(lt);d&&($i(d,ni,ri,t,e),t.extraFieldUnicodePath=d);let f=o.get(ut);f&&($i(f,ii,ai,t,e),t.extraFieldUnicodeComment=f);let p=o.get(st);p?(ea(p,t,l),t.extraFieldAES=p):t.compressionMethod=l;let m=o.get(10);m&&(ta(m,t),t.extraFieldNTFS=m);let h=o.get(ct);h&&(na(h,t,i),t.extraFieldExtendedTimestamp=h);let g=o.get(dt);g&&(t.extraFieldUSDZ=g)}function Qi(e,t){t.zip64=!0;let n=$(e.data),r=Gi.filter(([e,n])=>t[e]==n);for(let i=0,a=0;i<r.length;i++){let[o,s]=r[i];if(t[o]==s){let r=Ki[s];t[o]=e[o]=r.getValue(n,a),a+=r.bytes}else if(e[o])throw Error(Li)}}function $i(e,t,n,r,i){let a=$(e.data),o=new St;o.append(i[n]);let s=$(new Uint8Array(4));s.setUint32(0,o.get(),!0);let c=Q(a,1);Object.assign(e,{version:sa(a,0),[t]:ti(e.data.subarray(5)),valid:!i.bitFlag.languageEncodingFlag&&c==Q(s,0)}),e.valid&&(r[t]=e[t],r[t+`UTF8`]=!0)}function ea(e,t,n){let r=$(e.data),i=sa(r,4);Object.assign(e,{vendorVersion:sa(r,0),vendorId:sa(r,2),strength:i,originalCompressionMethod:n,compressionMethod:Z(r,5)}),t.compressionMethod=e.compressionMethod}function ta(e,t){let n=$(e.data),r=4,i;try{for(;r<e.data.length&&!i;){let t=Z(n,r),a=Z(n,r+2);t==1&&(i=e.data.slice(r+4,r+4+a)),r+=4+a}}catch{}try{if(i&&i.length==24){let n=$(i),r=n.getBigUint64(0,!0),a=n.getBigUint64(8,!0),o=n.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:r,rawLastAccessDate:a,rawCreationDate:o});let s={lastModDate:oa(r),lastAccessDate:oa(a),creationDate:oa(o)};Object.assign(e,s),Object.assign(t,s)}}catch{}}function na(e,t,n){let r=$(e.data),i=sa(r,0),a=[],o=[];n?((i&1)==1&&(a.push(ui),o.push(di)),(i&2)==2&&(a.push(fi),o.push(pi)),(i&4)==4&&(a.push(mi),o.push(hi))):e.data.length>=5&&(a.push(ui),o.push(di));let s=1;a.forEach((n,i)=>{if(e.data.length>=s+4){let a=Q(r,s);t[n]=e[n]=new Date(a*1e3);let c=o[i];e[c]=a}s+=4})}async function ra({reader:e,fileEntry:t,offset:n,diskNumberStart:r,signature:i,compressedSize:a,uncompressedSize:o,dataOffset:s,dataDescriptor:c,extraFieldZip64:l,readRanges:u}){let d=0;if(r)for(let t=0;t<r;t++){let n=e.readers[t];d+=n.size}let f=0;if(c&&(f=l?20:12),f){let n=await Y(e,s+a,f+4,r);if(Q($(n),0)==134695760){let e=Q($(n),4),r,s;l?(r=ca($(n),8),s=ca($(n),16)):(r=Q($(n),8),s=Q($(n),12)),(t.encrypted&&!t.zipCrypto||e==i)&&r==a&&s==o&&(f+=4)}}let p={start:d+n,end:d+s+a+f,fileEntry:t};for(let e of u)if(e.fileEntry!=t&&p.start>=e.start&&p.start<e.end){let t=Error(Hi);throw t.overlappingEntry=e.fileEntry,t}u.push(p)}async function ia(e,t,n,r,i){let a=new Uint8Array(4);la($(a),0,t);let o=r+i;return await s(r)||await s(Math.min(o,n));async function s(t){let i=n-t,o=await Y(e,i,t);for(let e=o.length-r;e>=0;e--)if(o[e]==a[0]&&o[e+1]==a[1]&&o[e+2]==a[2]&&o[e+3]==a[3])return{offset:i+e,buffer:o.slice(e,e+r).buffer}}}function X(e,t,n){return t[n]===void 0?e.options[n]:t[n]}function aa(e){let t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function oa(e){return new Date(Number(e/BigInt(1e4)-BigInt(0xa9730b66800)))}function sa(e,t){return e.getUint8(t)}function Z(e,t){return e.getUint16(t,!0)}function Q(e,t){return e.getUint32(t,!0)}function ca(e,t){return Number(e.getBigUint64(t,!0))}function la(e,t,n){e.setUint32(t,n,!0)}function $(e){return new DataView(e.buffer)}var ua=t({BlobReader:()=>Cr,BlobWriter:()=>wr,Data64URIReader:()=>xr,Data64URIWriter:()=>Sr,ERR_BAD_FORMAT:()=>Mi,ERR_CENTRAL_DIRECTORY_NOT_FOUND:()=>Fi,ERR_ENCRYPTED:()=>Ri,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:()=>Pi,ERR_EOCDR_NOT_FOUND:()=>Ni,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:()=>Li,ERR_HTTP_RANGE:()=>ar,ERR_INVALID_PASSWORD:()=>Mt,ERR_INVALID_SIGNATURE:()=>Nt,ERR_INVALID_UNCOMPRESSED_SIZE:()=>Tn,ERR_ITERATOR_COMPLETED_TOO_SOON:()=>or,ERR_LOCAL_FILE_HEADER_NOT_FOUND:()=>Ii,ERR_OVERLAPPING_ENTRY:()=>Hi,ERR_SPLIT_ZIP_FILE:()=>Vi,ERR_UNSUPPORTED_COMPRESSION:()=>Bi,ERR_UNSUPPORTED_ENCRYPTION:()=>zi,ERR_WRITER_NOT_INITIALIZED:()=>sr,GenericReader:()=>Kr,GenericWriter:()=>qr,HttpRangeReader:()=>Vr,HttpReader:()=>Br,Reader:()=>J,SplitDataReader:()=>Wr,SplitDataWriter:()=>Gr,SplitZipReader:()=>Xr,SplitZipWriter:()=>Zr,TextReader:()=>Tr,TextWriter:()=>Er,Uint8ArrayReader:()=>Hr,Uint8ArrayWriter:()=>Ur,Writer:()=>br,ZipReader:()=>qi,ZipReaderStream:()=>Ji,configure:()=>yt,getMimeType:()=>bt,initStream:()=>Yr,readUint8Array:()=>Y,terminateWorkers:()=>rr});yt({Inflate:rt});var da=ua,fa=class{constructor(e,t){da.configure({baseURL:self.location.href}),this._zipReader=new da.ZipReader(new da.HttpReader(this._resolveTraceURI(e),{mode:`cors`,preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:t}).then(e=>{let t=new Map;for(let n of e)t.set(n.filename,n);return t})}_resolveTraceURI(e){return e.startsWith(`https://www.dropbox.com/`)?`https://dl.dropboxusercontent.com/`+e.substring(24):e}isLive(){return!1}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(e){return(await this._entriesPromise).has(e)}async readText(e){let t=(await this._entriesPromise).get(e);if(!t)return;let n=new da.TextWriter;return await t.getData?.(n),n.getData()}async readBlob(e){let t=(await this._entriesPromise).get(e);if(!t)return;let n=new da.BlobWriter;return await t.getData(n),n.getData()}},pa=class{constructor(e){this._entriesPromise=this._readFile(e).then(async e=>{if(!e)throw Error(`File not found`);let t=await e.json(),n=new Map;for(let e of t.entries)n.set(e.name,e.path);return n})}isLive(){return!0}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(e){return(await this._entriesPromise).has(e)}async readText(e){return(await this._readEntry(e))?.text()}async readBlob(e){let t=await this._readEntry(e);return t?.status===200?await t?.blob():void 0}async _readEntry(e){let t=(await this._entriesPromise).get(e);if(t)return this._readFile(t)}async _readFile(e){let t=await fetch(e);if(t.status!==404)return t}};self.addEventListener(`install`,function(e){self.skipWaiting()}),self.addEventListener(`activate`,function(e){e.waitUntil(self.clients.claim())});var ma=new URL(self.registration.scope).pathname,ha=new Map,ga=new Map,_a=self.registration.scope.startsWith(`https://`);function va(){ha.clear(),ga.clear()}async function ya(e,t,n){try{return{loadedTrace:await ba(e,t,n)}}catch(e){return{errorResponse:new Response(JSON.stringify({error:e?.message}),{status:500,headers:{"Content-Type":`application/json`}})}}}function ba(e,t,n){let r=t.searchParams.get(`trace`);if(!r)throw Error(`trace parameter is missing`);ga.set(e,r);let i=ha.get(r);if(i)return i;let a=xa(r,n);return ha.set(r,a),a.catch(()=>ha.delete(r)),a}async function xa(e,t){await Ta();let n=new re;try{let[r,i]=j(t,[.5,.4,.1]),a=Oa(e)||e.endsWith(`traces.dir`)?new pa(e):new fa(e,r);await n.load(a,void 0,i)}catch(t){if(console.error(t),t?.message?.includes(`Cannot find .trace file`)&&await n.hasEntry(`index.html`))throw Error(`Could not load trace. Did you upload a Playwright HTML report instead? Make sure to extract the archive first and then double-click the index.html file or put it on a web server.`);if(t instanceof k)throw Error(`Could not load trace from ${e}. ${t.message}`);let r=`Could not load trace from ${e}. Make sure a valid Playwright Trace is accessible over this url.`,i=await navigator.permissions.query({name:`local-network-access`}).catch(()=>{});throw i&&i.state!==`granted`&&(r+=`
3
+
4
+ If your trace is in a local or private network, please grant permission for Local Network Access.`),Error(r)}return{traceLoader:n,snapshotServer:new i(n.storage(),e=>n.resourceEntry(e))}}async function Sa(e){let t=e.request;if(t.url.startsWith(`chrome-extension://`))return fetch(t);let n=new URL(t.url),r;if(t.url.startsWith(self.registration.scope)&&(r=n.pathname.substring(ma.length-1)),r===`/restartServiceWorker`)return va(),new Response(null,{status:200});if(r===`/ping`)return new Response(null,{status:200});if(r===`/coverage`)return new Response(JSON.stringify(Ca()),{status:200,headers:{"Content-Type":`application/json`}});let i=!!e.resultingClientId,a=e.clientId?await self.clients.get(e.clientId):void 0;if(i&&!r?.startsWith(`/file/`)){if(r?.startsWith(`/snapshot/`)){let{errorResponse:t,loadedTrace:i}=await ya(e.resultingClientId,n,Da);if(t)return t;let a=decodeURIComponent(r.substring(10)),o=i.snapshotServer.serveSnapshot(a,n.searchParams,n.href);return _a&&o.headers.append(`Content-Security-Policy`,`upgrade-insecure-requests`),o}return fetch(e.request)}if(!r){if(!a)return new Response(`Sub-resource without a client`,{status:500});let{snapshotServer:e}=await ba(a.id,new URL(a.url),Ea(a));if(!e)return new Response(null,{status:404});let n=[t.url];return _a&&t.url.startsWith(`https://`)&&n.push(t.url.replace(/^https/,`http`)),e.serveResource(n,t.method,a.url)}if(r===`/contexts`||r.startsWith(`/snapshotInfo/`)||r.startsWith(`/closest-screenshot/`)||r.startsWith(`/file/`)){if(!a)return new Response(`Sub-resource without a client`,{status:500});let{errorResponse:e,loadedTrace:t}=await ya(a.id,n,Ea(a));if(e)return e;if(r===`/contexts`)return new Response(JSON.stringify(t.traceLoader.contextEntries),{status:200,headers:{"Content-Type":`application/json`}});if(r.startsWith(`/snapshotInfo/`)){let e=decodeURIComponent(r.substring(14));return t.snapshotServer.serveSnapshotInfo(e,n.searchParams)}if(r.startsWith(`/closest-screenshot/`)){let e=decodeURIComponent(r.substring(20));return t.snapshotServer.serveClosestScreenshot(e,n.searchParams)}if(r.startsWith(`/file/`)){let e=await t.traceLoader.resourceEntry(r.slice(6));return e?new Response(e,{status:200,headers:wa(n.searchParams)}):new Response(null,{status:404})}}return fetch(e.request)}function Ca(){let e=self.__coverage__||{},t=JSON.parse(JSON.stringify(e));for(let t of Object.values(e))n(t.s),n(t.f),r(t.b);return t}function wa(e){let t=e.get(`dn`),n=e.get(`dct`);if(!t)return;let r=new Headers;return r.set(`Content-Disposition`,`attachment; filename="attachment"; filename*=UTF-8''${encodeURIComponent(t)}`),n&&r.set(`Content-Type`,n),r}async function Ta(){let e=await self.clients.matchAll(),t=new Set;for(let[n,r]of ga){if(!e.find(e=>e.id===n)){ga.delete(n);continue}t.add(r)}for(let e of ha.keys())t.has(e)||ha.delete(e)}function Ea(e){return(t,n)=>{e.postMessage({method:`progress`,params:{done:t,total:n}})}}function Da(e,t){}function Oa(e){return!!new URL(e,`http://localhost`).searchParams.get(`path`)?.endsWith(`.json`)}self.addEventListener(`fetch`,function(e){if(e.request.headers.get(`x-pw-serviceworker`)===`skip`)return!1;e.respondWith(Sa(e))});
@@ -0,0 +1,5 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/xtermModule-B794rD2Z.js","./assets/defaultSettingsView-D-g2vrvf.js","./assets/urlMatch-L3liM589.js","./defaultSettingsView.C8BeHuxd.css","./xtermModule.kHJ-D0s7.css"])))=>i.map(i=>d[i]);
2
+ import{C as e,D as t,E as n,S as r,T as i,_ as a,a as o,b as s,c,d as l,f as u,g as d,h as f,i as p,k as m,l as h,m as g,n as _,p as v,r as y,t as b,u as x,v as S,w as C,x as w,y as T}from"./assets/defaultSettingsView-D-g2vrvf.js";import"./assets/urlMatch-L3liM589.js";var E=m(t()),D=m(S(),1),O=class{constructor(e,t={}){this.isListing=!1,this._tests=new Map,this._rootSuite=new k(``,`root`),this._options=t,this._reporter=e}reset(){this._rootSuite._entries=[],this._tests.clear()}dispatch(e){let{method:t,params:n}=e;if(t===`onConfigure`){this._onConfigure(n.config);return}if(t===`onProject`){this._onProject(n.project);return}if(t===`onBegin`){this._onBegin();return}if(t===`onTestBegin`){this._onTestBegin(n.testId,n.result);return}if(t===`onTestPaused`){this._onTestPaused(n.testId,n.resultId,n.errors);return}if(t===`onTestEnd`){this._onTestEnd(n.test,n.result);return}if(t===`onStepBegin`){this._onStepBegin(n.testId,n.resultId,n.step);return}if(t===`onAttach`){this._onAttach(n.testId,n.resultId,n.attachments);return}if(t===`onStepEnd`){this._onStepEnd(n.testId,n.resultId,n.step);return}if(t===`onError`){this._onError(n.error,n.workerInfo);return}if(t===`onStdIO`){this._onStdIO(n.type,n.testId,n.resultId,n.data,n.isBase64);return}if(t===`onEnd`)return this._onEnd(n.result);if(t===`onExit`)return this._onExit()}_onConfigure(e){this._rootDir=e.rootDir,this._config=this._parseConfig(e),this._reporter.onConfigure?.(this._config)}_onProject(e){let t=this._options.mergeProjects?this._rootSuite.suites.find(t=>t.project().name===e.name):void 0;t||(t=new k(e.name,`project`),this._rootSuite._addSuite(t));let n=this._parseProject(e);t._project=n;let r=-1;this._options.mergeProjects&&(r=this._config.projects.findIndex(t=>t.name===e.name)),r===-1?this._config.projects.push(n):this._config.projects[r]=n;for(let n of e.suites)this._mergeSuiteInto(n,t)}_onBegin(){this._reporter.onBegin?.(this._rootSuite)}_onTestBegin(e,t){let n=this._tests.get(e);this._options.clearPreviousResultsWhenTestBegins&&(n.results=[]);let r=n._createTestResult(t.id);r.retry=t.retry,r.workerIndex=t.workerIndex,r.parallelIndex=t.parallelIndex,r.setStartTimeNumber(t.startTime),this._reporter.onTestBegin?.(n,r)}_onTestPaused(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t);i.errors.push(...n),i.error=i.errors[0],this._reporter.onTestPaused?.(r,i)}_onTestEnd(e,t){let n=this._tests.get(e.testId);n.timeout=e.timeout,n.expectedStatus=e.expectedStatus;let r=n.results.find(e=>e._id===t.id);r.duration=t.duration,r.status=t.status,r.errors.push(...t.errors??[]),r.error=r.errors[0],t.attachments&&(r.attachments=this._parseAttachments(t.attachments)),t.annotations&&(this._absoluteAnnotationLocationsInplace(t.annotations),r.annotations=t.annotations,n.annotations=t.annotations),this._reporter.onTestEnd?.(n,r),r._stepMap=new Map}_onStepBegin(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t),a=n.parentStepId?i._stepMap.get(n.parentStepId):void 0,o=new ee(n,a,this._absoluteLocation(n.location),i);a?a.steps.push(o):i.steps.push(o),i._stepMap.set(n.id,o),this._reporter.onStepBegin?.(r,i,o)}_onStepEnd(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t),a=i._stepMap.get(n.id);a._endPayload=n,a.duration=n.duration,a.error=n.error,this._reporter.onStepEnd?.(r,i,a)}_onAttach(e,t,n){this._tests.get(e).results.find(e=>e._id===t).attachments.push(...n.map(e=>({name:e.name,contentType:e.contentType,path:e.path,body:e.base64&&globalThis.Buffer?Buffer.from(e.base64,`base64`):void 0})))}_onError(e,t){let n;if(t){let e=this._config.projects.find(e=>e.name===t.projectName);e&&(n={workerIndex:t.workerIndex,parallelIndex:t.parallelIndex,config:this._config,project:e})}this._reporter.onError?.(e,n)}_onStdIO(e,t,n,r,i){let a=i?globalThis.Buffer?Buffer.from(r,`base64`):atob(r):r,o=t?this._tests.get(t):void 0,s=o&&n?o.results.find(e=>e._id===n):void 0;e===`stdout`?(s?.stdout.push(a),this._reporter.onStdOut?.(a,o,s)):(s?.stderr.push(a),this._reporter.onStdErr?.(a,o,s))}async _onEnd(e){await this._reporter.onEnd?.(F(e))}_onExit(){return this._reporter.onExit?.()}_parseConfig(e){let t=I(e);return this._options.configOverrides&&(t.configFile=this._options.configOverrides.configFile,t.reportSlowTests=this._options.configOverrides.reportSlowTests,t.quiet=this._options.configOverrides.quiet,t.reporter=[...this._options.configOverrides.reporter]),t}_parseProject(e){return{metadata:e.metadata,name:e.name,outputDir:this._absolutePath(e.outputDir),repeatEach:e.repeatEach,retries:e.retries,testDir:this._absolutePath(e.testDir),testIgnore:N(e.testIgnore),testMatch:N(e.testMatch),timeout:e.timeout,grep:N(e.grep),grepInvert:N(e.grepInvert),dependencies:e.dependencies,teardown:e.teardown,snapshotDir:this._absolutePath(e.snapshotDir),ignoreSnapshots:e.ignoreSnapshots??!1,use:e.use}}_parseAttachments(e){return e.map(e=>({...e,body:e.base64&&globalThis.Buffer?Buffer.from(e.base64,`base64`):void 0}))}_mergeSuiteInto(e,t){let n=t.suites.find(t=>t.title===e.title);n||(n=new k(e.title,t.type===`project`?`file`:`describe`),t._addSuite(n)),n.location=this._absoluteLocation(e.location),e.entries.forEach(e=>{`testId`in e?this._mergeTestInto(e,n):this._mergeSuiteInto(e,n)})}_mergeTestInto(e,t){let n=this._options.mergeTestCases?t.tests.find(t=>t.title===e.title&&t.repeatEachIndex===e.repeatEachIndex):void 0;n||(n=new A(e.testId,e.title,this._absoluteLocation(e.location),e.repeatEachIndex),t._addTest(n),this._tests.set(n.id,n)),this._updateTest(e,n)}_updateTest(e,t){return t.id=e.testId,t.location=this._absoluteLocation(e.location),t.retries=e.retries,t.tags=e.tags??[],t.annotations=e.annotations??[],this._absoluteAnnotationLocationsInplace(t.annotations),t}_absoluteAnnotationLocationsInplace(e){for(let t of e)t.location&&=this._absoluteLocation(t.location)}_absoluteLocation(e){return e&&{...e,file:this._absolutePath(e.file)}}_absolutePath(e){if(e!==void 0)return this._options.resolvePath?this._options.resolvePath(this._rootDir,e):this._rootDir+`/`+e}},k=class{constructor(e,t){this._entries=[],this._requireFile=``,this._parallelMode=`none`,this.title=e,this._type=t}get type(){return this._type}get suites(){return this._entries.filter(e=>e.type!==`test`)}get tests(){return this._entries.filter(e=>e.type===`test`)}entries(){return this._entries}allTests(){let e=[],t=n=>{for(let r of n.entries())r.type===`test`?e.push(r):t(r)};return t(this),e}titlePath(){let e=this.parent?this.parent.titlePath():[];return(this.title||this._type!==`describe`)&&e.push(this.title),e}project(){return this._project??this.parent?.project()}_addTest(e){e.parent=this,this._entries.push(e)}_addSuite(e){e.parent=this,this._entries.push(e)}skip(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}fixme(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}fail(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}exclude(){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}},A=class{constructor(e,t,n,r){this.fn=()=>{},this.results=[],this.type=`test`,this.expectedStatus=`passed`,this.timeout=0,this.annotations=[],this.retries=0,this.tags=[],this.repeatEachIndex=0,this.id=e,this.title=t,this.location=n,this.repeatEachIndex=r}titlePath(){let e=this.parent?this.parent.titlePath():[];return e.push(this.title),e}outcome(){return P(this)}ok(){let e=this.outcome();return e===`expected`||e===`flaky`||e===`skipped`}_createTestResult(e){let t=new j(this.results.length,e);return this.results.push(t),t}skip(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}fixme(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}fail(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}exclude(){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}},ee=class{constructor(e,t,n,r){this.duration=-1,this.steps=[],this._startTime=0,this.title=e.title,this.subtitle=e.subtitle,this.category=e.category,this.params=e.params,this.location=n,this.parent=t,this._startTime=e.startTime,this._result=r}titlePath(){return[...this.parent?.titlePath()||[],this.title]}get startTime(){return new Date(this._startTime)}set startTime(e){this._startTime=+e}get attachments(){return this._endPayload?.attachments?.map(e=>this._result.attachments[e])??[]}get annotations(){return this._endPayload?.annotations??[]}},j=class{constructor(e,t){this.parallelIndex=-1,this.workerIndex=-1,this.duration=-1,this.stdout=[],this.stderr=[],this.attachments=[],this.annotations=[],this.status=`skipped`,this.steps=[],this.errors=[],this._stepMap=new Map,this._startTime=0,this.retry=e,this._id=t}setStartTimeNumber(e){this._startTime=e}get startTime(){return new Date(this._startTime)}set startTime(e){this._startTime=+e}},M={argv:[],failOnFlakyTests:!1,forbidOnly:!1,fullyParallel:!1,globalSetup:null,globalTeardown:null,globalTimeout:0,grep:/.*/,grepInvert:null,maxFailures:0,metadata:{},preserveOutput:`always`,projects:[],filteredProjects:[],reporter:[[{}.CI?`dot`:`list`]],reportSlowTests:{max:5,threshold:3e5},configFile:``,rootDir:``,quiet:!1,shard:null,tags:[],updateSnapshots:`default`,updateSourceMethod:`patch`,version:``,workers:0,webServer:null};function N(e){return e.map(e=>e.s===void 0?new RegExp(e.r.source,e.r.flags):e.s)}function P(e){let t=0,n=0,r=0,i=0,a=0;for(let o of e.results)o.status===`interrupted`?++i:o.status===`skipped`&&e.expectedStatus===`skipped`?++t:o.status===`skipped`?++n:o.status===e.expectedStatus?++r:++a;return r===0&&a===0?`skipped`:a===0?`expected`:r===0&&t===0?`unexpected`:`flaky`}function F(e){return{status:e.status,startTime:new Date(e.startTime),duration:e.duration}}function I(e){return{...M,...e}}var te=class{constructor(e,t,n,r,i,a){this._treeItemById=new Map,this._treeItemByTestId=new Map;let o=r&&[...r.values()].some(Boolean);this.pathSeparator=i,this.rootItem={kind:`group`,subKind:`folder`,id:e,title:``,location:{file:``,line:0,column:0},duration:0,parent:void 0,children:[],status:`none`,hasLoadErrors:!1},this._treeItemById.set(e,this.rootItem);let s=(e,t,n,r)=>{for(let i of r===`tests`?[]:t.suites){if(!i.title){s(e,i,n,`all`);continue}let r=n.children.find(e=>e.kind===`group`&&e.title===i.title);r||(r={kind:`group`,subKind:`describe`,id:`suite:`+t.titlePath().join(``)+``+i.title,title:i.title,location:i.location,duration:0,parent:n,children:[],status:`none`,hasLoadErrors:!1},this._addChild(n,r)),s(e,i,r,`all`)}for(let i of r===`suites`?[]:t.tests){let t=i.title,r=n.children.find(e=>e.kind!==`group`&&e.title===t);r||(r={kind:`case`,id:`test:`+i.titlePath().join(``),title:t,parent:n,children:[],tests:[],location:i.location,duration:0,status:`none`,project:void 0,test:void 0,tags:i.tags},this._addChild(n,r));let a=i.results[0],o=`none`;a?.[R]===`scheduled`?o=`scheduled`:a?.[R]===`running`?o=`running`:a?.status===`skipped`?o=`skipped`:a?.status===`interrupted`?o=`none`:a&&i.outcome()!==`expected`?o=`failed`:a&&i.outcome()===`expected`&&(o=`passed`),r.tests.push(i);let s={kind:`test`,id:i.id,title:e.name,location:i.location,test:i,parent:r,children:[],status:o,duration:i.results.length?Math.max(0,i.results[0].duration):0,project:e};this._addChild(r,s),this._treeItemByTestId.set(i.id,s),r.duration=r.children.reduce((e,t)=>e+t.duration,0)}};for(let e of t?.suites||[])if(!(o&&!r.get(e.title)))for(let t of e.suites)if(a){if(s(e.project(),t,this.rootItem,`suites`),t.tests.length){let n=this._defaultDescribeItem();s(e.project(),t,n,`tests`)}}else{let n=this._fileItem(t.location.file.split(i),!0);s(e.project(),t,n,`all`)}for(let e of n){if(!e.location)continue;let t=this._fileItem(e.location.file.split(i),!0);t.hasLoadErrors=!0}}_addChild(e,t){e.children.push(t),t.parent=e,this._treeItemById.set(t.id,t)}filterTree(e,t,n){let r=e.trim().toLowerCase().split(` `),i=[...t.values()].some(Boolean),a=e=>{let a=[...e.tests[0].titlePath(),...e.tests[0].tags].join(` `).toLowerCase();return!r.every(e=>a.includes(e))&&!e.tests.some(e=>n?.has(e.id))?!1:(e.children=e.children.filter(e=>!i||n?.has(e.test.id)||t.get(e.status)),e.tests=e.children.map(e=>e.test),!!e.children.length)},o=e=>{let t=[];for(let n of e.children)n.kind===`case`?a(n)&&t.push(n):(o(n),(n.children.length||n.hasLoadErrors)&&t.push(n));e.children=t};o(this.rootItem)}_fileItem(e,t){if(e.length===0)return this.rootItem;let n=e.join(this.pathSeparator),r=this._treeItemById.get(n);if(r)return r;let i=this._fileItem(e.slice(0,e.length-1),!1),a={kind:`group`,subKind:t?`file`:`folder`,id:n,title:e[e.length-1],location:{file:n,line:0,column:0},duration:0,parent:i,children:[],status:`none`,hasLoadErrors:!1};return this._addChild(i,a),a}_defaultDescribeItem(){let e=this._treeItemById.get(`<anonymous>`);return e||(e={kind:`group`,subKind:`describe`,id:`<anonymous>`,title:`<anonymous>`,location:{file:``,line:0,column:0},duration:0,parent:this.rootItem,children:[],status:`none`,hasLoadErrors:!1},this._addChild(this.rootItem,e)),e}sortAndPropagateStatus(){L(this.rootItem)}flattenForSingleProject(){let e=t=>{t.kind===`case`&&t.children.length===1?(t.project=t.children[0].project,t.test=t.children[0].test,t.children=[],this._treeItemByTestId.set(t.test.id,t)):t.children.forEach(e)};e(this.rootItem)}shortenRoot(){let e=this.rootItem;for(;e.children.length===1&&e.children[0].kind===`group`&&e.children[0].subKind===`folder`;)e=e.children[0];e.location=this.rootItem.location,this.rootItem=e}fileNames(){let e=new Set,t=n=>{n.kind===`group`&&n.subKind===`file`?e.add(n.id):n.children.forEach(t)};return t(this.rootItem),[...e]}flatTreeItems(){let e=[],t=n=>{e.push(n),n.children.forEach(t)};return t(this.rootItem),e}treeItemById(e){return this._treeItemById.get(e)}collectTestIds(e){return ne(e)}};function L(e){for(let t of e.children)L(t);e.kind===`group`&&e.children.sort((e,t)=>e.location.file.localeCompare(t.location.file)||e.location.line-t.location.line);let t=e.children.length>0,n=e.children.length>0,r=!1,i=!1,a=!1;for(let o of e.children)n&&=o.status===`skipped`,t&&=o.status===`passed`||o.status===`skipped`,r||=o.status===`failed`,i||=o.status===`running`,a||=o.status===`scheduled`;i?e.status=`running`:a?e.status=`scheduled`:r?e.status=`failed`:n?e.status=`skipped`:t&&(e.status=`passed`)}function ne(e){let t=new Set,n=new Set,r=e=>{if(e.kind!==`test`&&e.kind!==`case`){e.children.forEach(r);return}let i=e;for(;i&&i.parent&&!(i.kind===`group`&&i.subKind===`file`);)i=i.parent;n.add(i.location.file),e.kind===`case`?e.tests.forEach(e=>t.add(e.id)):t.add(e.id)};return r(e),{testIds:t,locations:n}}var R=Symbol(`statusEx`),re=class{constructor(e){this.loadErrors=[],this.progress={total:0,passed:0,failed:0,skipped:0},this._lastRunTestCount=0,this._receiver=new O(this._createReporter(),{mergeProjects:!0,mergeTestCases:!0,resolvePath:ie(e.pathSeparator),clearPreviousResultsWhenTestBegins:!0}),this._options=e}_createReporter(){return{version:()=>`v2`,onConfigure:e=>{this.config=e,this._lastRunReceiver=new O({version:()=>`v2`,onBegin:e=>{this._lastRunTestCount=e.allTests().length,this._lastRunReceiver=void 0}},{mergeProjects:!0,mergeTestCases:!1,resolvePath:ie(this._options.pathSeparator)}),this._lastRunReceiver.dispatch({method:`onConfigure`,params:{config:e}})},onBegin:e=>{if(this.rootSuite||=e,this._testResultsSnapshot){for(let e of this.rootSuite.allTests())e.results=this._testResultsSnapshot?.get(e.id)||e.results;this._testResultsSnapshot=void 0}this.progress.total=this._lastRunTestCount,this.progress.passed=0,this.progress.failed=0,this.progress.skipped=0,this._options.onUpdate(!0)},onEnd:()=>{this._options.onUpdate(!0)},onTestBegin:(e,t)=>{t[R]=`running`,this._options.onUpdate()},onTestEnd:(e,t)=>{e.outcome()===`skipped`?++this.progress.skipped:e.outcome()===`unexpected`?++this.progress.failed:++this.progress.passed,t[R]=t.status,this._options.onUpdate()},onError:e=>this._handleOnError(e),printsToStdio:()=>!1}}processGlobalReport(e){let t=new O({version:()=>`v2`,onConfigure:e=>{this.config=e},onError:e=>this._handleOnError(e)});for(let n of e)t.dispatch(n)}processListReport(e){let t=this.rootSuite?.allTests()||[];this._testResultsSnapshot=new Map(t.map(e=>[e.id,e.results])),this._receiver.reset();for(let t of e)this._receiver.dispatch(t)}processTestReportEvent(e){this._lastRunReceiver?.dispatch(e)?.catch(()=>{}),this._receiver.dispatch(e)?.catch(()=>{})}_handleOnError(e){this.loadErrors.push(e),this._options.onError?.(e),this._options.onUpdate()}asModel(){return{rootSuite:this.rootSuite||new k(``,`root`),config:this.config,loadErrors:this.loadErrors,progress:this.progress}}};function ie(e){return(t,n)=>{let r=[];for(let i of[...t.split(e),...n.split(e)]){let t=e===`\\`&&r.length===1&&r[0].endsWith(`:`),n=!r.length;if(!(!i&&!n&&!t)&&i!==`.`){if(i===`..`){r.pop();continue}r.push(i)}}return r.join(e)}}var z=d(),ae=({source:e})=>{let[t,n]=i(),[a,o]=E.useState(w()),[s]=E.useState(x(()=>import(`./assets/xtermModule-B794rD2Z.js`).then(e=>e.default),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),c=E.useRef(null);return E.useEffect(()=>(T(o),()=>r(o)),[]),E.useEffect(()=>{let t=e.write,r=e.clear;return(async()=>{let{Terminal:t,FitAddon:r}=await s,i=n.current;if(!i)return;let o=a===`dark-mode`?se:oe;if(c.current&&c.current.terminal.options.theme===o)return;c.current&&(i.textContent=``);let l=new t({convertEol:!0,fontSize:13,scrollback:1e4,fontFamily:`monospace`,theme:o}),u=new r;l.loadAddon(u);for(let t of e.pending)l.write(t);e.write=(t=>{e.pending.push(t),l.write(t)}),e.clear=()=>{e.pending=[],l.clear()},l.open(i),u.fit(),c.current={terminal:l,fitAddon:u}})(),()=>{e.clear=r,e.write=t}},[s,c,n,e,a]),E.useEffect(()=>{setTimeout(()=>{c.current&&(c.current.fitAddon.fit(),e.resize(c.current.terminal.cols,c.current.terminal.rows))},250)},[t,e]),(0,z.jsx)(`div`,{"data-testid":`output`,className:`xterm-wrapper`,style:{flex:`auto`},ref:n})},oe={foreground:`#383a42`,background:`#fafafa`,cursor:`#383a42`,black:`#000000`,red:`#e45649`,green:`#50a14f`,yellow:`#c18401`,blue:`#4078f2`,magenta:`#a626a4`,cyan:`#0184bc`,white:`#a0a0a0`,brightBlack:`#000000`,brightRed:`#e06c75`,brightGreen:`#98c379`,brightYellow:`#d19a66`,brightBlue:`#4078f2`,brightMagenta:`#a626a4`,brightCyan:`#0184bc`,brightWhite:`#383a42`,selectionBackground:`#d7d7d7`,selectionForeground:`#383a42`},se={foreground:`#f8f8f2`,background:`#1e1e1e`,cursor:`#f8f8f0`,black:`#000000`,red:`#ff5555`,green:`#50fa7b`,yellow:`#f1fa8c`,blue:`#bd93f9`,magenta:`#ff79c6`,cyan:`#8be9fd`,white:`#bfbfbf`,brightBlack:`#4d4d4d`,brightRed:`#ff6e6e`,brightGreen:`#69ff94`,brightYellow:`#ffffa5`,brightBlue:`#d6acff`,brightMagenta:`#ff92df`,brightCyan:`#a4ffff`,brightWhite:`#e6e6e6`,selectionBackground:`#44475a`,selectionForeground:`#f8f8f2`},ce=({filterText:e,setFilterText:t,statusFilters:n,setStatusFilters:r,projectFilters:i,setProjectFilters:a,onlyChanged:o,setOnlyChanged:s,testModel:c,runTests:l})=>{let[u,d]=E.useState(!1),f=E.useRef(null);E.useEffect(()=>{f.current?.focus()},[]);let p=[...n.entries()].filter(([e,t])=>t).map(([e])=>e).join(` `)||`all`,m=[...i.entries()].filter(([e,t])=>t).map(([e])=>e).join(` `)||`all`;return(0,z.jsxs)(`div`,{className:`filters`,children:[(0,z.jsx)(h,{expanded:u,setExpanded:d,title:(0,z.jsx)(`input`,{ref:f,type:`search`,placeholder:`Filter (e.g. text, @tag)`,"aria-label":`Filter (e.g. text, @tag)`,spellCheck:!1,value:e,onChange:e=>{t(e.target.value)},onKeyDown:e=>{e.key===`Enter`&&l()}})}),(0,z.jsxs)(`button`,{className:`filter-summary`,"aria-expanded":u,title:`Status: `+p+`
3
+ Projects: `+m+(o?`
4
+ Only changed`:``),onClick:()=>d(!u),children:[(0,z.jsx)(`span`,{className:`filter-label`,children:`Status:`}),` `,p,(0,z.jsx)(`span`,{className:`filter-label`,children:`Projects:`}),` `,m,o&&(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(`span`,{className:`filter-label`,children:`Only changed`})})]}),u&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`hbox`,style:{marginLeft:14,maxHeight:200,overflowY:`auto`},children:[(0,z.jsx)(`div`,{className:`filter-list`,role:`list`,"data-testid":`status-filters`,children:[...n.entries()].map(([e,t])=>(0,z.jsx)(`div`,{className:`filter-entry`,role:`listitem`,children:(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>{let t=new Map(n);t.set(e,!t.get(e)),r(t)}}),(0,z.jsx)(`div`,{children:e})]})},e))}),(0,z.jsx)(`div`,{className:`filter-list`,role:`list`,"data-testid":`project-filters`,children:[...i.entries()].map(([e,t])=>(0,z.jsx)(`div`,{className:`filter-entry`,role:`listitem`,children:(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>{let t=new Map(i);t.set(e,!t.get(e)),a(t);let n=c?.config?.configFile;n&&C.setObject(n+`:projects`,[...t.entries()].filter(([e,t])=>t).map(([e])=>e))}}),(0,z.jsx)(`div`,{children:e||`untitled`})]})},e))})]}),(0,z.jsx)(`div`,{className:`filter-entry`,style:{marginLeft:24},children:(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:o,onChange:()=>s(!o)}),(0,z.jsx)(`div`,{children:`Show only changed files`})]})})]})]})},le=({tag:t,style:n,onClick:r})=>(0,z.jsx)(`span`,{className:e(`tag`,`tag-color-${ue(t)}`),onClick:r,style:{margin:`6px 0 0 6px`,...n},title:`Click to filter by tag: ${t}`,children:t});function ue(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<8)-t);return Math.abs(t%6)}var de=v,fe=({filterText:e,testModel:t,testServerConnection:n,testTree:r,runTests:i,runningState:a,watchAll:o,watchedTreeIds:s,setWatchedTreeIds:d,isLoading:f,onItemSelected:p,requestedCollapseAllCount:m,requestedExpandAllCount:h,setFilterText:_,onRevealSource:v})=>{let[y,b]=E.useState({expandedItems:new Map}),[x,S]=E.useState(),[C,w]=E.useState(m),[T,D]=E.useState(h);E.useEffect(()=>{if(C!==m){y.expandedItems.clear();for(let e of r.flatTreeItems())y.expandedItems.set(e.id,!1);w(m),S(void 0),b({...y});return}if(T!==h){y.expandedItems.clear();for(let e of r.flatTreeItems())y.expandedItems.set(e.id,!0);D(h),S(void 0),b({...y});return}if(!a||a.itemSelectedByUser)return;let e,t=n=>{n.children.forEach(t),!e&&n.status===`failed`&&(n.kind===`test`&&a.testIds.has(n.test.id)||n.kind===`case`&&a.testIds.has(n.tests[0]?.id))&&(e=n)};t(r.rootItem),e&&S(e.id)},[a,S,r,C,w,m,T,D,h,y,b]);let O=E.useMemo(()=>{if(x)return r.treeItemById(x)},[x,r]);E.useEffect(()=>{if(!t)return;let e=pe(O,t),n;O?.kind===`test`?n=O.test:O?.kind===`case`&&O.tests.length===1&&(n=O.tests[0]),p({treeItem:O,testCase:n,testFile:e})},[t,O,p]),E.useEffect(()=>{if(!f)if(o)n?.watchNoReply({fileNames:r.fileNames()});else{let e=new Set;for(let t of s.value){let n=r.treeItemById(t)?.location.file;n&&e.add(n)}n?.watchNoReply({fileNames:[...e]})}},[f,r,o,s,n]);let k=e=>{S(e.id),i(`bounce-if-busy`,r.collectTestIds(e))},A=(t,n)=>{if(t.preventDefault(),t.stopPropagation(),t.metaKey||t.ctrlKey){let t=e.split(` `);t.includes(n)?_(t.filter(e=>e!==n).join(` `).trim()):_((e+` `+n).trim())}else _((e.split(` `).filter(e=>!e.startsWith(`@`)).join(` `)+` `+n).trim())};return(0,z.jsx)(de,{name:`tests`,treeState:y,setTreeState:b,rootItem:r.rootItem,dataTestId:`test-tree`,render:e=>{let t=e.id.replace(/[^\w\d-_]/g,`-`),n=t+`-label`,r=t+`-time`;return(0,z.jsxs)(`div`,{className:`hbox ui-mode-tree-item`,"aria-labelledby":`${n} ${r}`,children:[(0,z.jsxs)(`div`,{id:n,className:`ui-mode-tree-item-title`,children:[(0,z.jsx)(`span`,{children:e.title}),e.kind===`case`?e.tags.map(e=>(0,z.jsx)(le,{tag:e.slice(1),onClick:t=>A(t,e)},e)):null]}),!!e.duration&&e.status!==`skipped`&&(0,z.jsx)(`div`,{id:r,className:`ui-mode-tree-item-time`,children:g(e.duration)}),(0,z.jsxs)(c,{noMinHeight:!0,noShadow:!0,children:[(0,z.jsx)(u,{icon:`play`,title:`Run`,onClick:()=>k(e),disabled:!!a&&!a.completed}),(0,z.jsx)(u,{icon:`go-to-file`,title:`Show source`,onClick:v,style:e.kind===`group`&&e.subKind===`folder`?{visibility:`hidden`}:{}}),!o&&(0,z.jsx)(u,{icon:`eye`,title:`Watch`,onClick:()=>{s.value.has(e.id)?s.value.delete(e.id):s.value.add(e.id),d({...s})},toggled:s.value.has(e.id)})]})]})},icon:e=>l(e.status),title:e=>e.title,selectedItem:O,onAccepted:k,onSelected:e=>{a&&(a.itemSelectedByUser=!0),S(e.id)},isError:e=>e.kind===`group`?e.hasLoadErrors:!1,autoExpandDepth:e?5:1,noItemsMessage:f?`Loading…`:`No tests`})};function pe(e,t){if(!(!e||!t))return{file:e.location.file,line:e.location.line,column:e.location.column,source:{errors:t.loadErrors.filter(t=>t.location?.file===e.location.file).map(e=>({line:e.location.line,message:e.message})),content:void 0}}}function B(e){return`.playwright-artifacts-${e}`}var me=({item:e,rootDir:t,onOpenExternally:n,revealSource:r,pathSeparator:i,onModelChange:o})=>{let[s,c]=E.useState(void 0),[l,u]=E.useState(0),d=E.useRef(null),{outputDir:f}=E.useMemo(()=>({outputDir:e.testCase?he(e.testCase):void 0}),[e]);return E.useEffect(()=>{d.current&&clearTimeout(d.current);let t=e.testCase?.results[0];if(!t||e.treeItem?.status===`scheduled`){c(void 0);return}let n=t&&t.duration>=0&&t.attachments.find(e=>e.name===`trace`);if(n&&n.path){V(n.path,t.startTime.getTime()).then(e=>c({model:e,isLive:!1}));return}if(!f){c(void 0);return}let r=[f,B(t.workerIndex),`traces`,`${e.testCase?.id}.json`].join(i);return d.current=setTimeout(async()=>{try{c({model:await V(r,Date.now()),isLive:!0})}catch{let e=new a(``,[]);e.errorDescriptors.push(...t.errors.flatMap(e=>e.message?[{message:e.message}]:[])),c({model:e,isLive:!1})}finally{u(l+1)}},500),()=>{d.current&&clearTimeout(d.current)}},[f,e,c,l,u,i]),E.useEffect(()=>{o?.(s?.model)},[s,o]),(0,z.jsx)(p,{model:s?.model,showSourcesFirst:!0,rootDir:t,fallbackLocation:e.testFile,isLive:s?.isLive,status:e.treeItem?.status,defaultAnnotations:e.testCase?.annotations??[],onOpenExternally:n,revealSource:r},`workbench`)},he=e=>{for(let t=e.parent;t;t=t.parent)if(t.project())return t.project()?.outputDir};async function V(e,t){let n=`file?path=${encodeURIComponent(e)}&timestamp=${t}`,r=new URLSearchParams;return r.set(`trace`,n),new a(n,await(await fetch(`contexts?${r.toString()}`)).json())}var ge={cols:80,rows:24},H={pending:[],clear:()=>{},write:e=>H.pending.push(e),resize:()=>{}},U=new URLSearchParams(window.location.search),W=new URL(U.get(`server`)??`../`,window.location.href),_e=new URL(U.get(`ws`),W);_e.protocol=_e.protocol===`https:`?`wss:`:`ws:`;var G={args:U.getAll(`arg`),grep:U.get(`grep`)||void 0,grepInvert:U.get(`grepInvert`)||void 0,projects:U.getAll(`project`),workers:U.get(`workers`)||void 0,headed:U.has(`headed`),updateSnapshots:U.get(`updateSnapshots`)||void 0,reporters:U.has(`reporter`)?U.getAll(`reporter`):void 0,pathSeparator:U.get(`pathSeparator`)||`/`};G.updateSnapshots&&![`all`,`changed`,`none`,`missing`,`default`].includes(G.updateSnapshots)&&(G.updateSnapshots=void 0);var ve=navigator.platform===`MacIntel`;function ye(e){return e.startsWith(`/`)&&(e=e.substring(1)),e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function be(e,t,n){let r=e.passed+e.failed+e.skipped,i=t?r/t*100|0:0,a=[];return e.passed>0&&a.push(`${e.passed} passed`),e.failed>0&&a.push((0,z.jsxs)(`span`,{className:`status-line-failed`,children:[e.failed,` failed`]},`failed`)),e.skipped>0&&a.push(`${e.skipped} skipped`),(0,z.jsx)(`div`,{"data-testid":`status-line`,className:`status-line`,children:(0,z.jsxs)(`div`,{children:[n&&`Running `,r,`/`,t,` (`,i,`%)`,a.length>0&&` — `,a.map((e,t)=>(0,z.jsxs)(E.Fragment,{children:[t>0?`, `:``,e]},t))]})})}var xe=({})=>{let[t,r]=E.useState(``),[i,a]=E.useState(!1),[s,l]=E.useState(!1),[d,p]=E.useState(new Map([[`passed`,!1],[`failed`,!1],[`skipped`,!1]])),[m,h]=E.useState(new Map),[g,v]=E.useState(),[x,S]=E.useState(),[w,T]=E.useState({}),[D,O]=E.useState(!1),[A,ee]=E.useState(),j=A&&!A.completed,[M,N]=n(`watch-all`,!1),[P,F]=E.useState({value:new Set}),I=E.useRef(Promise.resolve()),L=E.useRef({testIds:new Set,locations:new Set}),[ne,ie]=E.useState(0),[oe,se]=E.useState(0),[le,ue]=E.useState(!1),[de,pe]=E.useState(!0),[B,he]=E.useState(),[V,U]=E.useState(),[W,xe]=E.useState(!1),[K,Se]=E.useState(!1),[Ce,we]=E.useState(!1),[Te,Ee]=E.useState(),De=E.useCallback(()=>we(!0),[we]),[Oe,ke]=n(`single-worker`,!1),[q,Ae]=n(`updateSnapshots`,`default`),[J,je]=n(`only-changed`,!1),[Me,Ne]=n(`stop-on-failure`,!1),[Y]=n(`mergeFiles`,!1),Pe=E.useRef(null),X=E.useCallback(()=>{he(e=>(e?.close(),new _(new y(_e))))},[]);E.useEffect(()=>{Pe.current?.focus(),O(!0),X()},[X]),E.useEffect(()=>{if(!B)return;let e=[B.onStdio(e=>{if(e.buffer){let t=atob(e.buffer);H.write(t)}else H.write(e.text);e.type===`stderr`&&l(!0)}),B.onClose(()=>ue(!0))];return H.resize=(e,t)=>{ge={cols:e,rows:t},B.resizeTerminalNoReply({cols:e,rows:t})},()=>{for(let t of e)t.dispose()}},[B]),E.useEffect(()=>{if(!B)return;let e,t=new re({onUpdate:n=>{clearTimeout(e),e=void 0,n?v(t.asModel()):e||=setTimeout(()=>{v(t.asModel())},250)},onError:e=>{H.write((e.stack||e.value||``)+`
5
+ `),l(!0)},pathSeparator:G.pathSeparator});return U(t),v(void 0),O(!0),F({value:new Set}),(async()=>{try{await B.initialize({interceptStdio:!0,watchTestDirs:!0});let{status:e,report:n}=await B.runGlobalSetup({});if(t.processGlobalReport(n),e!==`passed`)return;let r=await B.listTests({projects:G.projects,locations:G.args,grep:G.grep,grepInvert:G.grepInvert,onlyChanged:J});t.processListReport(r.report),B.onReport(e=>{t.processTestReportEvent(e)});let{hasBrowsers:i}=await B.checkBrowsers({});pe(i)}finally{O(!1)}})(),()=>{clearTimeout(e)}},[J,B]),E.useEffect(()=>{if(!g)return;let{config:e,rootSuite:t}=g,n=e.configFile?C.getObject(e.configFile+`:projects`,void 0):void 0,r=new Map(m);for(let e of r.keys())t.suites.find(t=>t.title===e)||r.delete(e);for(let e of t.suites)r.has(e.title)||r.set(e.title,!!n?.includes(e.title));!n&&r.size&&![...r.values()].includes(!0)&&r.set(r.entries().next().value[0],!0),(m.size!==r.size||[...m].some(([e,t])=>r.get(e)!==t))&&h(r)},[m,g]),E.useEffect(()=>{j&&g?.progress?S(g.progress):g||S(void 0)},[g,j]);let{testTree:Z}=E.useMemo(()=>{if(!g)return{testTree:new te(``,new k(``,`root`),[],m,G.pathSeparator,Y)};let e=new te(``,g.rootSuite,g.loadErrors,m,G.pathSeparator,Y);return e.filterTree(t,d,j?A?.testIds:void 0),e.sortAndPropagateStatus(),e.shortenRoot(),e.flattenForSingleProject(),{testTree:e}},[t,g,d,m,A,j,Y]),Q=E.useCallback((e,t)=>{if(!(!B||!g)&&!(e===`bounce-if-busy`&&j)){for(let e of t.testIds)L.current.testIds.add(e);for(let e of t.locations)L.current.locations.add(e);I.current=I.current.then(async()=>{let{testIds:e,locations:t}=L.current;if(L.current={testIds:new Set,locations:new Set},!e.size)return;for(let t of g.rootSuite?.allTests()||[])if(e.has(t.id)){t.results=[];let e=t._createTestResult(`pending`);e[R]=`scheduled`}v({...g});let n=` [`+new Date().toLocaleTimeString()+`]`;H.write(`\x1B[2m—`.repeat(Math.max(0,ge.cols-n.length))+n+`\x1B[22m`),S({total:0,passed:0,failed:0,skipped:0}),ee({testIds:e}),await B.runTests({locations:[...t].map(ye),grep:G.grep,grepInvert:G.grepInvert,testIds:[...e],projects:[...m].filter(([e,t])=>t).map(([e])=>e),updateSnapshots:q,reporters:G.reporters,workers:Oe?1:void 0,maxFailures:Me?1:void 0,trace:`on`});for(let e of g.rootSuite?.allTests()||[])e.results[0]?.duration===-1&&(e.results=[]);v({...g}),ee(e=>e?{...e,completed:!0}:void 0)})}},[m,j,g,B,q,Oe,Me]),$=E.useCallback(()=>Q(`bounce-if-busy`,Z.collectTestIds(Z.rootItem)),[Q,Z]);E.useEffect(()=>{if(!B||!V)return;let e=B.onTestFilesChanged(async e=>{if(I.current=I.current.then(async()=>{O(!0);try{let e=await B.listTests({projects:G.projects,locations:G.args,grep:G.grep,grepInvert:G.grepInvert,onlyChanged:J});V.processListReport(e.report)}catch(e){console.log(e)}finally{O(!1)}}),await I.current,e.testFiles.length===0)return;let t=V.asModel(),n=new te(``,t.rootSuite,t.loadErrors,m,G.pathSeparator,Y),r=[],i=[],a=new Set(e.testFiles);if(M){let e=t=>{let o=t.location.file;if(o&&a.has(o)){let e=n.collectTestIds(t);r.push(...e.locations),i.push(...e.testIds)}t.kind===`group`&&t.subKind===`folder`&&t.children.forEach(e)};e(n.rootItem)}else for(let e of P.value){let t=n.treeItemById(e);if(!t)continue;let o=t;for(;!(o.kind===`group`&&(o.subKind===`file`||o.subKind===`folder`))&&o.parent;)o=o.parent;let s=o?.location.file;if(s&&a.has(s)){let e=n.collectTestIds(t);r.push(...e.locations),i.push(...e.testIds)}}Q(`queue-if-busy`,{locations:r,testIds:i})});return()=>e.dispose()},[Q,B,M,P,V,m,Y,J]),E.useEffect(()=>{if(!B)return;let e=e=>{e.code===`Backquote`&&e.ctrlKey?(e.preventDefault(),a(!i)):e.code===`F5`&&e.shiftKey?(e.preventDefault(),B?.stopTestsNoReply({})):e.code===`F5`&&(e.preventDefault(),$())};return addEventListener(`keydown`,e),()=>{removeEventListener(`keydown`,e)}},[$,X,B,i]);let Fe=E.useRef(null),Ie=E.useCallback(e=>{e.preventDefault(),e.stopPropagation(),Fe.current?.showModal()},[]),Le=E.useCallback(e=>{e.preventDefault(),e.stopPropagation(),Fe.current?.close()},[]),Re=E.useCallback(e=>{Le(e),a(!0),B?.installBrowsers({}).then(async()=>{a(!1);let{hasBrowsers:e}=await B?.checkBrowsers({});pe(e)})},[Le,B]);return(0,z.jsxs)(`div`,{className:`vbox ui-mode`,children:[!de&&(0,z.jsxs)(`dialog`,{ref:Fe,children:[(0,z.jsxs)(`div`,{className:`title`,children:[(0,z.jsx)(`span`,{className:`codicon codicon-lightbulb`}),`Install browsers`]}),(0,z.jsxs)(`div`,{className:`body`,children:[`Playwright did not find installed browsers.`,(0,z.jsx)(`br`,{}),"Would you like to run `playwright install`?",(0,z.jsx)(`br`,{}),(0,z.jsx)(`button`,{className:`button`,onClick:Re,children:`Install`}),(0,z.jsx)(`button`,{className:`button secondary`,onClick:Le,children:`Dismiss`})]})]}),le&&(0,z.jsxs)(`div`,{className:`disconnected`,children:[(0,z.jsx)(`div`,{className:`title`,children:`UI Mode disconnected`}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`a`,{href:`#`,onClick:()=>window.location.href=`/`,children:`Reload the page`}),` to reconnect`]})]}),(0,z.jsx)(f,{sidebarSize:250,minSidebarSize:150,orientation:`horizontal`,sidebarIsFirst:!0,settingName:`testListSidebar`,main:(0,z.jsxs)(`div`,{className:`vbox`,children:[(0,z.jsxs)(`div`,{className:e(`vbox`,!i&&`hidden`),children:[(0,z.jsxs)(c,{children:[(0,z.jsx)(`div`,{className:`section-title`,style:{flex:`none`},children:`Output`}),(0,z.jsx)(u,{icon:`circle-slash`,title:`Clear output`,onClick:()=>{H.clear(),l(!1)}}),(0,z.jsx)(`div`,{className:`spacer`}),(0,z.jsx)(u,{icon:`close`,title:`Close`,onClick:()=>a(!1)})]}),(0,z.jsx)(ae,{source:H})]}),(0,z.jsx)(`div`,{className:e(`vbox`,i&&`hidden`),children:(0,z.jsx)(me,{pathSeparator:G.pathSeparator,item:w,onModelChange:Ee,rootDir:g?.config?.rootDir,revealSource:Ce,onOpenExternally:e=>B?.openNoReply({location:{file:e.file,line:e.line,column:e.column}})})})]}),sidebar:(0,z.jsxs)(`div`,{className:`vbox ui-mode-sidebar`,children:[(0,z.jsxs)(c,{noShadow:!0,noMinHeight:!0,children:[(0,z.jsx)(`img`,{src:`playwright-logo.svg`,alt:`Playwright logo`}),(0,z.jsx)(`div`,{className:`section-title`,children:`Playwright`}),(0,z.jsx)(u,{icon:`refresh`,title:`Reload`,onClick:()=>X(),disabled:j||D}),(0,z.jsx)(`div`,{style:{position:`relative`},children:(0,z.jsx)(u,{icon:`terminal`,title:`Toggle output — `+(ve?"⌃`":"Ctrl + `"),toggled:i,errorBadge:s?`Output contains error`:void 0,onClick:()=>{a(!i)}})}),!de&&(0,z.jsx)(u,{icon:`lightbulb-autofix`,style:{color:`var(--vscode-list-warningForeground)`},title:`Playwright browsers are missing`,onClick:Ie})]}),(0,z.jsx)(ce,{filterText:t,setFilterText:r,statusFilters:d,setStatusFilters:p,projectFilters:m,setProjectFilters:h,onlyChanged:J,setOnlyChanged:je,testModel:g,runTests:$}),(0,z.jsxs)(c,{className:`section-toolbar`,noMinHeight:!0,children:[!j&&!x&&(0,z.jsx)(`div`,{className:`section-title`,children:`Tests`}),x&&be(x,j?A.testIds.size:x.total,!!j),(0,z.jsx)(u,{icon:`play`,title:`Run all — F5`,onClick:$,disabled:j||D}),(0,z.jsx)(u,{icon:`debug-stop`,title:`Stop — `+(ve?`⇧F5`:`Shift + F5`),onClick:()=>B?.stopTests({}),disabled:!j||D,testId:`stop-button`}),(0,z.jsx)(u,{icon:`eye`,title:`Watch all`,toggled:M,onClick:()=>{F({value:new Set}),N(!M)}}),(0,z.jsx)(u,{icon:`collapse-all`,title:`Collapse all`,onClick:()=>{ie(ne+1)}}),(0,z.jsx)(u,{icon:`expand-all`,title:`Expand all`,onClick:()=>{se(oe+1)}})]}),(0,z.jsx)(fe,{filterText:t,testModel:g,testTree:Z,testServerConnection:B,runningState:A,runTests:Q,onItemSelected:T,watchAll:M,watchedTreeIds:P,setWatchedTreeIds:F,isLoading:D,requestedCollapseAllCount:ne,requestedExpandAllCount:oe,setFilterText:r,onRevealSource:De}),(0,z.jsxs)(c,{noShadow:!0,noMinHeight:!0,className:`settings-toolbar`,onClick:()=>Se(!K),children:[(0,z.jsx)(`span`,{className:`codicon codicon-${K?`chevron-down`:`chevron-right`}`,style:{marginLeft:5},title:K?`Hide Testing Options`:`Show Testing Options`}),(0,z.jsx)(`div`,{className:`section-title`,children:`Testing Options`})]}),K&&(0,z.jsx)(o,{settings:[{type:`check`,value:Oe,set:ke,name:`Single worker`},{type:`check`,value:Me,set:Ne,name:`Stop on first failure`},{type:`select`,options:[{label:`Default`,value:`default`},{label:`All`,value:`all`},{label:`Changed`,value:`changed`},{label:`Missing`,value:`missing`},{label:`None`,value:`none`}],value:q,set:Ae,name:`Update snapshots`}]}),(0,z.jsxs)(c,{noShadow:!0,noMinHeight:!0,className:`settings-toolbar`,onClick:()=>xe(!W),children:[(0,z.jsx)(`span`,{className:`codicon codicon-${W?`chevron-down`:`chevron-right`}`,style:{marginLeft:5},title:W?`Hide Settings`:`Show Settings`}),(0,z.jsx)(`div`,{className:`section-title`,children:`Settings`})]}),W&&(0,z.jsx)(b,{location:`ui-mode`,model:Te})]})})]})};(async()=>{if(s(),window.location.protocol!==`file:`){if(!navigator.serviceWorker)throw Error(`Service workers are not supported.\nMake sure to serve the website (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register(`sw.bundle.js`),navigator.serviceWorker.controller||await new Promise(e=>{navigator.serviceWorker.oncontrollerchange=()=>e()}),setInterval(function(){fetch(`ping`)},1e4)}D.createRoot(document.querySelector(`#root`)).render((0,z.jsx)(xe,{}))})();