@checkly/playwright-core 1.48.10-alpha → 1.48.20

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 (51) hide show
  1. package/lib/cli/program.js +4 -2
  2. package/lib/generated/injectedScriptSource.js +1 -1
  3. package/lib/generated/pollingRecorderSource.js +1 -1
  4. package/lib/protocol/validator.js +1 -0
  5. package/lib/server/recorder/recorderApp.js +1 -1
  6. package/lib/server/recorder.js +2 -0
  7. package/lib/vite/recorder/assets/{codeMirrorModule-CND2fZ5Q.js → codeMirrorModule-d0KhC1qL.js} +11 -11
  8. package/lib/vite/recorder/assets/{index-CEc83sSS.js → index-Bxxcmxlu.js} +2 -2
  9. package/lib/vite/recorder/index.html +1 -1
  10. package/lib/vite/traceViewer/assets/codeMirrorModule-BTYWvxEC.js +16437 -0
  11. package/lib/vite/traceViewer/assets/codeMirrorModule-DZoSgqUd.js +24 -0
  12. package/lib/vite/traceViewer/assets/codeMirrorModule-DblsdhjA.js +16449 -0
  13. package/lib/vite/traceViewer/assets/codeMirrorModule-DtXZtbmO.js +16437 -0
  14. package/lib/vite/traceViewer/assets/codeMirrorModule-lDjkI8Ax.js +24 -0
  15. package/lib/vite/traceViewer/assets/inspectorTab-BB2Bm-wy.js +17361 -0
  16. package/lib/vite/traceViewer/assets/inspectorTab-BHcfR9dD.js +64 -0
  17. package/lib/vite/traceViewer/assets/inspectorTab-BPzhNk9r.js +64 -0
  18. package/lib/vite/traceViewer/assets/inspectorTab-C_OTuI8x.js +17361 -0
  19. package/lib/vite/traceViewer/assets/inspectorTab-DOc4D3cX.js +17361 -0
  20. package/lib/vite/traceViewer/assets/workbench-CWtpwfKK.js +1473 -0
  21. package/lib/vite/traceViewer/assets/workbench-DLv_q9ji.js +9 -0
  22. package/lib/vite/traceViewer/assets/workbench-DZqNXdoV.js +9 -0
  23. package/lib/vite/traceViewer/assets/workbench-I4s6sWjN.js +1473 -0
  24. package/lib/vite/traceViewer/assets/workbench-M-Dh_RgU.js +1473 -0
  25. package/lib/vite/traceViewer/embedded.BIubxTi3.js +2 -0
  26. package/lib/vite/traceViewer/embedded.CHH7D63q.js +106 -0
  27. package/lib/vite/traceViewer/embedded.Dxe2heQk.js +2 -0
  28. package/lib/vite/traceViewer/embedded.Zu332ZC1.js +106 -0
  29. package/lib/vite/traceViewer/embedded.html +3 -3
  30. package/lib/vite/traceViewer/embedded.ymLJ2mBS.js +106 -0
  31. package/lib/vite/traceViewer/index.Bfh46hDK.js +197 -0
  32. package/lib/vite/traceViewer/index.C8ZWP1Qw.js +197 -0
  33. package/lib/vite/traceViewer/index.CB297BuW.js +2 -0
  34. package/lib/vite/traceViewer/index.CLxsp2W_.js +197 -0
  35. package/lib/vite/traceViewer/index.DPD22sZn.js +2 -0
  36. package/lib/vite/traceViewer/index.html +3 -3
  37. package/lib/vite/traceViewer/recorder.BHq8OXiu.js +551 -0
  38. package/lib/vite/traceViewer/recorder.BaRuS6Pc.js +2 -0
  39. package/lib/vite/traceViewer/recorder.C88JDknq.js +2 -0
  40. package/lib/vite/traceViewer/recorder.Fwf59ZKh.js +551 -0
  41. package/lib/vite/traceViewer/recorder.html +2 -2
  42. package/lib/vite/traceViewer/recorder.zV_xPHM4.js +551 -0
  43. package/lib/vite/traceViewer/sw.bundle.js +3 -3
  44. package/lib/vite/traceViewer/uiMode.2tr9k625.js +5 -0
  45. package/lib/vite/traceViewer/uiMode.B11wexdJ.js +5 -0
  46. package/lib/vite/traceViewer/uiMode.BH2Nj2h0.js +1724 -0
  47. package/lib/vite/traceViewer/uiMode.CBRJkC_K.js +1724 -0
  48. package/lib/vite/traceViewer/uiMode.CpC2B27N.js +1724 -0
  49. package/lib/vite/traceViewer/uiMode.html +3 -3
  50. package/lib/vite/traceViewer/workbench.9Es1K_T7.css +549 -0
  51. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
- var Lr=Object.defineProperty;var Fr=(n,t,e)=>t in n?Lr(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var U=(n,t,e)=>Fr(n,typeof t!="symbol"?t+"":t,e);function Mr(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)})}const Sn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ur(n){return n.replace(/[&<>"']/ug,t=>Sn[t])}function vr(n){return n.replace(/[&<]/ug,t=>Sn[t])}function An(n){return Array.isArray(n)&&typeof n[0]=="string"}function Hr(n){return Array.isArray(n)&&Array.isArray(n[0])}let Ge=0;const te=new Map,Wr=3e8;function Br(n,t){if(te.has(n)){const r=te.get(n);return te.delete(n),te.set(n,r),r}const e=t();for(;te.size&&Ge+e.length>Wr;){const[r,s]=te.entries().next().value;Ge-=s.length,te.delete(r)}return te.set(n,e),Ge+=e.length,e}class jr{constructor(t,e,r){U(this,"_snapshots");U(this,"_index");U(this,"snapshotName");U(this,"_resources");U(this,"_snapshot");U(this,"_callId");this._resources=t,this._snapshots=e,this._index=r,this._snapshot=e[r],this._callId=e[r].callId,this.snapshotName=e[r].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}render(){const t=[],e=(i,a,o,l)=>{if(typeof i=="string"){o==="STYLE"||o==="style"?t.push(Zr(i)):t.push(vr(i));return}if(Hr(i)){const _=a-i[0][0];if(_>=0&&_<=a){const d=Gr(this._snapshots[_]),p=i[0][1];if(p>=0&&p<d.length)return e(d[p],_,o,l)}}else if(An(i)){const[_,d,...p]=i,h=_==="NOSCRIPT"?"X-NOSCRIPT":_,g=Object.entries(d||{});t.push("<",h);const E="__playwright_current_src__",f=h==="IFRAME"||h==="FRAME",c=h==="A",u=h==="IMG",m=u&&g.some(y=>y[0]===E),w=h==="SOURCE"&&o==="PICTURE"&&(l==null?void 0:l.some(y=>y[0]===E));for(const[y,C]of g){let b=y;f&&y.toLowerCase()==="src"&&(b="__playwright_src__"),u&&y===E&&(b="src"),["src","srcset"].includes(y.toLowerCase())&&(m||w)&&(b="_"+b);let x=C;c&&y.toLowerCase()==="href"?x="link://"+C:(y.toLowerCase()==="href"||y.toLowerCase()==="src"||y===E)&&(x=et(C)),t.push(" ",b,'="',Ur(x),'"')}t.push(">");for(const y of p)e(y,a,h,g);qr.has(h)||t.push("</",h,">");return}else return},r=this._snapshot;return{html:Br(this,()=>{e(r.html,this._index,void 0,void 0);const i=t.join("");return(r.doctype?`<!DOCTYPE ${r.doctype}>`:"")+["<style>*,*::before,*::after { visibility: hidden }</style>",`<script>${Yr(this._callId,this.snapshotName)}<\/script>`].join("")+i}),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 qr=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]);function Gr(n){if(!n._nodes){const t=[],e=r=>{if(typeof r=="string")t.push(r);else if(An(r)){const[,,...s]=r;for(const i of s)e(i);t.push(r)}};e(n.html),n._nodes=t}return n._nodes}function Yr(...n){function t(e,...r){const s="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.",i=[],a=[],o=[],l=p=>{for(const h of p.querySelectorAll("[__playwright_scroll_top_]"))i.push(h);for(const h of p.querySelectorAll("[__playwright_scroll_left_]"))a.push(h);for(const h of p.querySelectorAll("[__playwright_value_]")){const g=h;g.type!=="file"&&(g.value=g.getAttribute("__playwright_value_")),h.removeAttribute("__playwright_value_")}for(const h of p.querySelectorAll("[__playwright_checked_]"))h.checked=h.getAttribute("__playwright_checked_")==="true",h.removeAttribute("__playwright_checked_");for(const h of p.querySelectorAll("[__playwright_selected_]"))h.selected=h.getAttribute("__playwright_selected_")==="true",h.removeAttribute("__playwright_selected_");for(const h of r)for(const g of p.querySelectorAll(`[__playwright_target__="${h}"]`)){const E=g.style;E.outline="2px solid #006ab1",E.backgroundColor="#6fa8dc7f",o.push(g)}for(const h of p.querySelectorAll("iframe, frame")){const g=h.getAttribute("__playwright_src__");if(!g)h.setAttribute("src",'data:text/html,<body style="background: #ddd"></body>');else{const E=new URL(e(window.location.href)),f=E.pathname.lastIndexOf("/snapshot/");f!==-1&&(E.pathname=E.pathname.substring(0,f+1)),E.pathname+=g.substring(1),h.setAttribute("src",E.toString())}}{const h=p.querySelector("body[__playwright_custom_elements__]");if(h&&window.customElements){const g=(h.getAttribute("__playwright_custom_elements__")||"").split(",");for(const E of g)window.customElements.define(E,class extends HTMLElement{})}}for(const h of p.querySelectorAll("template[__playwright_shadow_root_]")){const g=h,E=g.parentElement.attachShadow({mode:"open"});E.appendChild(g.content),g.remove(),l(E)}if("adoptedStyleSheets"in p){const h=[...p.adoptedStyleSheets];for(const g of p.querySelectorAll("template[__playwright_style_sheet_]")){const E=g,f=new CSSStyleSheet;f.replaceSync(E.getAttribute("__playwright_style_sheet_")),h.push(f)}p.adoptedStyleSheets=h}},_=()=>{window.removeEventListener("load",_);for(const h of i)h.scrollTop=+h.getAttribute("__playwright_scroll_top_"),h.removeAttribute("__playwright_scroll_top_");for(const h of a)h.scrollLeft=+h.getAttribute("__playwright_scroll_left_"),h.removeAttribute("__playwright_scroll_left_");document.styleSheets[0].disabled=!0;const p=new URL(window.location.href).searchParams;if(p.get("pointX")&&p.get("pointY")){const h=+p.get("pointX"),g=+p.get("pointY"),E=p.has("hasInputTarget"),f=window.location.pathname.match(/\/page@[a-z0-9]+$/),c=o.length>0,u=document.documentElement?[document.documentElement]:[];for(const m of c?o:u){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",c){const y=m.getBoundingClientRect(),C=y.left+y.width/2,b=y.top+y.height/2;if(w.style.left=C+"px",w.style.top=b+"px",f&&(Math.abs(C-h)>=10||Math.abs(b-g)>=10)){const x=document.createElement("x-pw-pointer-warning");x.textContent="⚠",x.style.fontSize="19px",x.style.color="white",x.style.marginTop="-3.5px",x.style.userSelect="none",w.appendChild(x),w.setAttribute("title",s)}document.documentElement.appendChild(w)}else f&&!E&&(w.style.left=h+"px",w.style.top=g+"px",document.documentElement.appendChild(w))}}},d=()=>l(document);window.addEventListener("load",_),window.addEventListener("DOMContentLoaded",d)}return`
2
- (${t.toString()})(${tt.toString()}${n.map(e=>`, "${e}"`).join("")})`}const Rn=["about:","blob:","data:","file:","ftp:","http:","https:","mailto:","sftp:","ws:","wss:"],Dt="http://playwright.bloburl/#";function et(n){n.startsWith(Dt)&&(n=n.substring(Dt.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&&Rn.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 Vr=/url\(['"]?([\w-]+:)\/\//ig;function Zr(n){return n.replace(Vr,(t,e)=>!(e==="blob:")&&!(e==="file:")&&Rn.includes(e)?t:t.replace(e+"//",`https://pw-${e.slice(0,-1)}--`))}function tt(n){const t=new URL(n);return t.pathname.endsWith("/snapshot.html")?t.searchParams.get("r"):n}class Kr{constructor(t,e){U(this,"_snapshotStorage");U(this,"_resourceLoader");U(this,"_snapshotIds",new Map);this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,r){const s=this._snapshot(t.substring(9),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"}})}serveSnapshotInfo(t,e){const r=this._snapshot(t.substring(13),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.slice(1),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 g of t)if(s=i==null?void 0:i.resourceByUrl(Xr(g),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 d=new Headers;l!=="x-unknown"&&d.set("Content-Type",l);for(const{name:g,value:E}of s.response.headers)d.set(g,E);d.delete("Content-Encoding"),d.delete("Access-Control-Allow-Origin"),d.set("Access-Control-Allow-Origin","*"),d.delete("Content-Length"),d.set("Content-Length",String(o.size)),d.set("Cache-Control","public, max-age=31536000");const{status:p}=s.response,h=p===101||p===204||p===205||p===304;return new Response(h?null:o,{headers:d,status:s.response.status,statusText:s.response.statusText})}}function Xr(n){try{const t=new URL(n);return t.hash="",t.toString()}catch{return n}}function $r(n){const t=new Map,{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 Jr{constructor(){U(this,"_resources",[]);U(this,"_frameSnapshots",new Map)}addResource(t){t.request.url=et(t.request.url),this._resources.push(t)}addFrameSnapshot(t){for(const s of t.resourceOverrides)s.url=et(s.url);let e=this._frameSnapshots.get(t.frameId);e||(e={raw:[],renderers:[]},this._frameSnapshots.set(t.frameId,e),t.isMainFrame&&this._frameSnapshots.set(t.pageId,e)),e.raw.push(t);const r=new jr(this._resources,e.raw,e.raw.length-1);return e.renderers.push(r),r}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(){this._resources.sort((t,e)=>(t._monotonicTime||0)-(e._monotonicTime||0))}}class Cn extends Error{constructor(t){super(t),this.name="TraceVersionError"}}const It=7;class Qr{constructor(t,e){U(this,"_contextEntry");U(this,"_snapshotStorage");U(this,"_actionMap",new Map);U(this,"_version");U(this,"_pageEntries",new Map);U(this,"_jsHandles",new Map);U(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>It)throw new Cn("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;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,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(t.snapshot),e.resources.push(t.snapshot);break;case"frame-snapshot":this._snapshotStorage.addFrameSnapshot(t.snapshot);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<It;++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"};e.push(r)}for(const r of t){if(r.type==="context-options"){e.push({...r,monotonicTime:0,origin:"library"});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 zr{constructor(){U(this,"contextEntries",[]);U(this,"_snapshotStorage");U(this,"_backend");U(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 d=_.match(/(.+)\.trace/);d&&r.push(d[1]||""),_.includes("src@")&&(s=!0)}if(!r.length)throw new Error("Cannot find .trace file");this._snapshotStorage=new Jr;const i=r.length*3;let a=0;for(const _ of r){const d=es();d.traceUrl=t.traceURL(),d.hasSource=s;const p=new Qr(d,this._snapshotStorage),h=await this._backend.readText(_+".trace")||"";p.appendTrace(h),e(++a,i);const g=await this._backend.readText(_+".network")||"";if(p.appendTrace(g),e(++a,i),d.actions=p.actions().sort((f,c)=>f.startTime-c.startTime),!t.isLive()){for(const f of d.actions.slice().reverse())if(!f.endTime&&!f.error)for(const c of d.actions)c.parentId===f.callId&&f.endTime<c.endTime&&(f.endTime=c.endTime)}const E=await this._backend.readText(_+".stacks");if(E){const f=$r(JSON.parse(E));for(const c of d.actions)c.stack=c.stack||f.get(c.callId)}e(++a,i);for(const f of d.resources)(o=f.request.postData)!=null&&o._sha1&&this._resourceToContentType.set(f.request.postData._sha1,Nt(f.request.postData.mimeType)),(l=f.response.content)!=null&&l._sha1&&this._resourceToContentType.set(f.response.content._sha1,Nt(f.response.content.mimeType));this.contextEntries.push(d)}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 Nt(n){const t=n.match(/^(.*);\s*charset=.*$/);return t?t[1]:n}function es(){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}}const ts=15,L=0,z=1,ns=2,V=-2,W=-3,Pt=-4,ee=-5,Z=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],On=1440,rs=0,ss=4,is=9,as=5,os=[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],cs=[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],ls=[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],fs=[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],us=[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],ds=[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],ne=15;function nt(){const n=this;let t,e,r,s,i,a;function o(_,d,p,h,g,E,f,c,u,m,w){let y,C,b,x,A,R,T,S,D,O,P,N,k,v,F;O=0,A=p;do r[_[d+O]]++,O++,A--;while(A!==0);if(r[0]==p)return f[0]=-1,c[0]=0,L;for(S=c[0],R=1;R<=ne&&r[R]===0;R++);for(T=R,S<R&&(S=R),A=ne;A!==0&&r[A]===0;A--);for(b=A,S>A&&(S=A),c[0]=S,v=1<<R;R<A;R++,v<<=1)if((v-=r[R])<0)return W;if((v-=r[A])<0)return W;for(r[A]+=v,a[1]=R=0,O=1,k=2;--A!==0;)a[k]=R+=r[O],k++,O++;A=0,O=0;do(R=_[d+O])!==0&&(w[a[R]++]=A),O++;while(++A<p);for(p=a[b],a[0]=A=0,O=0,x=-1,N=-S,i[0]=0,P=0,F=0;T<=b;T++)for(y=r[T];y--!==0;){for(;T>N+S;){if(x++,N+=S,F=b-N,F=F>S?S:F,(C=1<<(R=T-N))>y+1&&(C-=y+1,k=T,R<F))for(;++R<F&&!((C<<=1)<=r[++k]);)C-=r[k];if(F=1<<R,m[0]+F>On)return W;i[x]=P=m[0],m[0]+=F,x!==0?(a[x]=A,s[0]=R,s[1]=S,R=A>>>N-S,s[2]=P-i[x-1]-R,u.set(s,(i[x-1]+R)*3)):f[0]=P}for(s[1]=T-N,O>=p?s[0]=192:w[O]<h?(s[0]=w[O]<256?0:96,s[2]=w[O++]):(s[0]=E[w[O]-h]+16+64,s[2]=g[w[O++]-h]),C=1<<T-N,R=A>>>N;R<F;R+=C)u.set(s,(P+R)*3);for(R=1<<T-1;A&R;R>>>=1)A^=R;for(A^=R,D=(1<<N)-1;(A&D)!=a[x];)x--,N-=S,D=(1<<N)-1}return v!==0&&b!=1?ee:L}function l(_){let d;for(t||(t=[],e=[],r=new Int32Array(ne+1),s=[],i=new Int32Array(ne),a=new Int32Array(ne+1)),e.length<_&&(e=[]),d=0;d<_;d++)e[d]=0;for(d=0;d<ne+1;d++)r[d]=0;for(d=0;d<3;d++)s[d]=0;i.set(r.subarray(0,ne),0),a.set(r.subarray(0,ne+1),0)}n.inflate_trees_bits=function(_,d,p,h,g){let E;return l(19),t[0]=0,E=o(_,0,19,19,null,null,p,d,h,t,e),E==W?g.msg="oversubscribed dynamic bit lengths tree":(E==ee||d[0]===0)&&(g.msg="incomplete dynamic bit lengths tree",E=W),E},n.inflate_trees_dynamic=function(_,d,p,h,g,E,f,c,u){let m;return l(288),t[0]=0,m=o(p,0,_,257,ls,fs,E,h,c,t,e),m!=L||h[0]===0?(m==W?u.msg="oversubscribed literal/length tree":m!=Pt&&(u.msg="incomplete literal/length tree",m=W),m):(l(288),m=o(p,_,d,0,us,ds,f,g,c,t,e),m!=L||g[0]===0&&_>257?(m==W?u.msg="oversubscribed distance tree":m==ee?(u.msg="incomplete distance tree",m=W):m!=Pt&&(u.msg="empty distance tree with lengths",m=W),m):L)}}nt.inflate_trees_fixed=function(n,t,e,r){return n[0]=is,t[0]=as,e[0]=os,r[0]=cs,L};const De=0,Lt=1,Ft=2,Mt=3,Ut=4,vt=5,Ht=6,Ye=7,Wt=8,Ie=9;function _s(){const n=this;let t,e=0,r,s=0,i=0,a=0,o=0,l=0,_=0,d=0,p,h=0,g,E=0;function f(c,u,m,w,y,C,b,x){let A,R,T,S,D,O,P,N,k,v,F,ye,I,fe,M,H;P=x.next_in_index,N=x.avail_in,D=b.bitb,O=b.bitk,k=b.write,v=k<b.read?b.read-k-1:b.end-k,F=Z[c],ye=Z[u];do{for(;O<20;)N--,D|=(x.read_byte(P++)&255)<<O,O+=8;if(A=D&F,R=m,T=w,H=(T+A)*3,(S=R[H])===0){D>>=R[H+1],O-=R[H+1],b.win[k++]=R[H+2],v--;continue}do{if(D>>=R[H+1],O-=R[H+1],S&16){for(S&=15,I=R[H+2]+(D&Z[S]),D>>=S,O-=S;O<15;)N--,D|=(x.read_byte(P++)&255)<<O,O+=8;A=D&ye,R=y,T=C,H=(T+A)*3,S=R[H];do if(D>>=R[H+1],O-=R[H+1],S&16){for(S&=15;O<S;)N--,D|=(x.read_byte(P++)&255)<<O,O+=8;if(fe=R[H+2]+(D&Z[S]),D>>=S,O-=S,v-=I,k>=fe)M=k-fe,k-M>0&&2>k-M?(b.win[k++]=b.win[M++],b.win[k++]=b.win[M++],I-=2):(b.win.set(b.win.subarray(M,M+2),k),k+=2,M+=2,I-=2);else{M=k-fe;do M+=b.end;while(M<0);if(S=b.end-M,I>S){if(I-=S,k-M>0&&S>k-M)do b.win[k++]=b.win[M++];while(--S!==0);else b.win.set(b.win.subarray(M,M+S),k),k+=S,M+=S,S=0;M=0}}if(k-M>0&&I>k-M)do b.win[k++]=b.win[M++];while(--I!==0);else b.win.set(b.win.subarray(M,M+I),k),k+=I,M+=I,I=0;break}else if(!(S&64))A+=R[H+2],A+=D&Z[S],H=(T+A)*3,S=R[H];else return x.msg="invalid distance code",I=x.avail_in-N,I=O>>3<I?O>>3:I,N+=I,P-=I,O-=I<<3,b.bitb=D,b.bitk=O,x.avail_in=N,x.total_in+=P-x.next_in_index,x.next_in_index=P,b.write=k,W;while(!0);break}if(S&64)return S&32?(I=x.avail_in-N,I=O>>3<I?O>>3:I,N+=I,P-=I,O-=I<<3,b.bitb=D,b.bitk=O,x.avail_in=N,x.total_in+=P-x.next_in_index,x.next_in_index=P,b.write=k,z):(x.msg="invalid literal/length code",I=x.avail_in-N,I=O>>3<I?O>>3:I,N+=I,P-=I,O-=I<<3,b.bitb=D,b.bitk=O,x.avail_in=N,x.total_in+=P-x.next_in_index,x.next_in_index=P,b.write=k,W);if(A+=R[H+2],A+=D&Z[S],H=(T+A)*3,(S=R[H])===0){D>>=R[H+1],O-=R[H+1],b.win[k++]=R[H+2],v--;break}}while(!0)}while(v>=258&&N>=10);return I=x.avail_in-N,I=O>>3<I?O>>3:I,N+=I,P-=I,O-=I<<3,b.bitb=D,b.bitk=O,x.avail_in=N,x.total_in+=P-x.next_in_index,x.next_in_index=P,b.write=k,L}n.init=function(c,u,m,w,y,C){t=De,_=c,d=u,p=m,h=w,g=y,E=C,r=null},n.proc=function(c,u,m){let w,y,C,b=0,x=0,A=0,R,T,S,D;for(A=u.next_in_index,R=u.avail_in,b=c.bitb,x=c.bitk,T=c.write,S=T<c.read?c.read-T-1:c.end-T;;)switch(t){case De:if(S>=258&&R>=10&&(c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,m=f(_,d,p,h,g,E,c,u),A=u.next_in_index,R=u.avail_in,b=c.bitb,x=c.bitk,T=c.write,S=T<c.read?c.read-T-1:c.end-T,m!=L)){t=m==z?Ye:Ie;break}i=_,r=p,s=h,t=Lt;case Lt:for(w=i;x<w;){if(R!==0)m=L;else return c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);R--,b|=(u.read_byte(A++)&255)<<x,x+=8}if(y=(s+(b&Z[w]))*3,b>>>=r[y+1],x-=r[y+1],C=r[y],C===0){a=r[y+2],t=Ht;break}if(C&16){o=C&15,e=r[y+2],t=Ft;break}if(!(C&64)){i=C,s=y/3+r[y+2];break}if(C&32){t=Ye;break}return t=Ie,u.msg="invalid literal/length code",m=W,c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);case Ft:for(w=o;x<w;){if(R!==0)m=L;else return c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);R--,b|=(u.read_byte(A++)&255)<<x,x+=8}e+=b&Z[w],b>>=w,x-=w,i=d,r=g,s=E,t=Mt;case Mt:for(w=i;x<w;){if(R!==0)m=L;else return c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);R--,b|=(u.read_byte(A++)&255)<<x,x+=8}if(y=(s+(b&Z[w]))*3,b>>=r[y+1],x-=r[y+1],C=r[y],C&16){o=C&15,l=r[y+2],t=Ut;break}if(!(C&64)){i=C,s=y/3+r[y+2];break}return t=Ie,u.msg="invalid distance code",m=W,c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);case Ut:for(w=o;x<w;){if(R!==0)m=L;else return c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);R--,b|=(u.read_byte(A++)&255)<<x,x+=8}l+=b&Z[w],b>>=w,x-=w,t=vt;case vt:for(D=T-l;D<0;)D+=c.end;for(;e!==0;){if(S===0&&(T==c.end&&c.read!==0&&(T=0,S=T<c.read?c.read-T-1:c.end-T),S===0&&(c.write=T,m=c.inflate_flush(u,m),T=c.write,S=T<c.read?c.read-T-1:c.end-T,T==c.end&&c.read!==0&&(T=0,S=T<c.read?c.read-T-1:c.end-T),S===0)))return c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);c.win[T++]=c.win[D++],S--,D==c.end&&(D=0),e--}t=De;break;case Ht:if(S===0&&(T==c.end&&c.read!==0&&(T=0,S=T<c.read?c.read-T-1:c.end-T),S===0&&(c.write=T,m=c.inflate_flush(u,m),T=c.write,S=T<c.read?c.read-T-1:c.end-T,T==c.end&&c.read!==0&&(T=0,S=T<c.read?c.read-T-1:c.end-T),S===0)))return c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);m=L,c.win[T++]=a,S--,t=De;break;case Ye:if(x>7&&(x-=8,R++,A--),c.write=T,m=c.inflate_flush(u,m),T=c.write,S=T<c.read?c.read-T-1:c.end-T,c.read!=c.write)return c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);t=Wt;case Wt:return m=z,c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);case Ie:return m=W,c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);default:return m=V,c.bitb=b,c.bitk=x,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m)}},n.free=function(){}}const Bt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],pe=0,Ve=1,jt=2,qt=3,Gt=4,Yt=5,Ne=6,Pe=7,Vt=8,ue=9;function hs(n,t){const e=this;let r=pe,s=0,i=0,a=0,o;const l=[0],_=[0],d=new _s;let p=0,h=new Int32Array(On*3);const g=0,E=new nt;e.bitk=0,e.bitb=0,e.win=new Uint8Array(t),e.end=t,e.read=0,e.write=0,e.reset=function(f,c){c&&(c[0]=g),r==Ne&&d.free(f),r=pe,e.bitk=0,e.bitb=0,e.read=e.write=0},e.reset(n,null),e.inflate_flush=function(f,c){let u,m,w;return m=f.next_out_index,w=e.read,u=(w<=e.write?e.write:e.end)-w,u>f.avail_out&&(u=f.avail_out),u!==0&&c==ee&&(c=L),f.avail_out-=u,f.total_out+=u,f.next_out.set(e.win.subarray(w,w+u),m),m+=u,w+=u,w==e.end&&(w=0,e.write==e.end&&(e.write=0),u=e.write-w,u>f.avail_out&&(u=f.avail_out),u!==0&&c==ee&&(c=L),f.avail_out-=u,f.total_out+=u,f.next_out.set(e.win.subarray(w,w+u),m),m+=u,w+=u),f.next_out_index=m,e.read=w,c},e.proc=function(f,c){let u,m,w,y,C,b,x,A;for(y=f.next_in_index,C=f.avail_in,m=e.bitb,w=e.bitk,b=e.write,x=b<e.read?e.read-b-1:e.end-b;;){let R,T,S,D,O,P,N,k;switch(r){case pe:for(;w<3;){if(C!==0)c=L;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}switch(u=m&7,p=u&1,u>>>1){case 0:m>>>=3,w-=3,u=w&7,m>>>=u,w-=u,r=Ve;break;case 1:R=[],T=[],S=[[]],D=[[]],nt.inflate_trees_fixed(R,T,S,D),d.init(R[0],T[0],S[0],0,D[0],0),m>>>=3,w-=3,r=Ne;break;case 2:m>>>=3,w-=3,r=qt;break;case 3:return m>>>=3,w-=3,r=ue,f.msg="invalid block type",c=W,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c)}break;case Ve:for(;w<32;){if(C!==0)c=L;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}if((~m>>>16&65535)!=(m&65535))return r=ue,f.msg="invalid stored block lengths",c=W,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);s=m&65535,m=w=0,r=s!==0?jt:p!==0?Pe:pe;break;case jt:if(C===0||x===0&&(b==e.end&&e.read!==0&&(b=0,x=b<e.read?e.read-b-1:e.end-b),x===0&&(e.write=b,c=e.inflate_flush(f,c),b=e.write,x=b<e.read?e.read-b-1:e.end-b,b==e.end&&e.read!==0&&(b=0,x=b<e.read?e.read-b-1:e.end-b),x===0)))return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);if(c=L,u=s,u>C&&(u=C),u>x&&(u=x),e.win.set(f.read_buf(y,u),b),y+=u,C-=u,b+=u,x-=u,(s-=u)!==0)break;r=p!==0?Pe:pe;break;case qt:for(;w<14;){if(C!==0)c=L;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}if(i=u=m&16383,(u&31)>29||(u>>5&31)>29)return r=ue,f.msg="too many length or distance symbols",c=W,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);if(u=258+(u&31)+(u>>5&31),!o||o.length<u)o=[];else for(A=0;A<u;A++)o[A]=0;m>>>=14,w-=14,a=0,r=Gt;case Gt:for(;a<4+(i>>>10);){for(;w<3;){if(C!==0)c=L;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}o[Bt[a++]]=m&7,m>>>=3,w-=3}for(;a<19;)o[Bt[a++]]=0;if(l[0]=7,u=E.inflate_trees_bits(o,l,_,h,f),u!=L)return c=u,c==W&&(o=null,r=ue),e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);a=0,r=Yt;case Yt:for(;u=i,!(a>=258+(u&31)+(u>>5&31));){let v,F;for(u=l[0];w<u;){if(C!==0)c=L;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}if(u=h[(_[0]+(m&Z[u]))*3+1],F=h[(_[0]+(m&Z[u]))*3+2],F<16)m>>>=u,w-=u,o[a++]=F;else{for(A=F==18?7:F-14,v=F==18?11:3;w<u+A;){if(C!==0)c=L;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}if(m>>>=u,w-=u,v+=m&Z[A],m>>>=A,w-=A,A=a,u=i,A+v>258+(u&31)+(u>>5&31)||F==16&&A<1)return o=null,r=ue,f.msg="invalid bit length repeat",c=W,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);F=F==16?o[A-1]:0;do o[A++]=F;while(--v!==0);a=A}}if(_[0]=-1,O=[],P=[],N=[],k=[],O[0]=9,P[0]=6,u=i,u=E.inflate_trees_dynamic(257+(u&31),1+(u>>5&31),o,O,P,N,k,h,f),u!=L)return u==W&&(o=null,r=ue),c=u,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);d.init(O[0],P[0],h,N[0],h,k[0]),r=Ne;case Ne:if(e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,(c=d.proc(e,f,c))!=z)return e.inflate_flush(f,c);if(c=L,d.free(f),y=f.next_in_index,C=f.avail_in,m=e.bitb,w=e.bitk,b=e.write,x=b<e.read?e.read-b-1:e.end-b,p===0){r=pe;break}r=Pe;case Pe:if(e.write=b,c=e.inflate_flush(f,c),b=e.write,x=b<e.read?e.read-b-1:e.end-b,e.read!=e.write)return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);r=Vt;case Vt:return c=z,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);case ue:return c=W,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);default:return c=V,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c)}}},e.free=function(f){e.reset(f,null),e.win=null,h=null},e.set_dictionary=function(f,c,u){e.win.set(f.subarray(c,c+u),0),e.read=e.write=u},e.sync_point=function(){return r==Ve?1:0}}const ps=32,ms=8,ws=0,Zt=1,Kt=2,Xt=3,$t=4,Jt=5,Ze=6,xe=7,Qt=12,re=13,bs=[0,0,255,255];function gs(){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?V:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=xe,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),V):(n.wbits=r,e.istate.blocks=new hs(e,1<<r),t(e),L)},n.inflate=function(e,r){let s,i;if(!e||!e.istate||!e.next_in)return V;const a=e.istate;for(r=r==ss?ee:L,s=ee;;)switch(a.mode){case ws: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)!=ms){a.mode=re,e.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=re,e.msg="invalid win size",a.marker=5;break}a.mode=Zt;case Zt: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=re,e.msg="incorrect header check",a.marker=5;break}if(!(i&ps)){a.mode=xe;break}a.mode=Kt;case Kt: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=Xt;case Xt: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=$t;case $t: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=Jt;case Jt: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=Ze,ns);case Ze:return a.mode=re,e.msg="need dictionary",a.marker=0,V;case xe:if(s=a.blocks.proc(e,s),s==W){a.mode=re,a.marker=0;break}if(s==L&&(s=r),s!=z)return s;s=r,a.blocks.reset(e,a.was),a.mode=Qt;case Qt:return e.avail_in=0,z;case re:return W;default:return V}},n.inflateSetDictionary=function(e,r,s){let i=0,a=s;if(!e||!e.istate||e.istate.mode!=Ze)return V;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=xe,L},n.inflateSync=function(e){let r,s,i,a,o;if(!e||!e.istate)return V;const l=e.istate;if(l.mode!=re&&(l.mode=re,l.marker=0),(r=e.avail_in)===0)return ee;for(s=e.next_in_index,i=l.marker;r!==0&&i<4;)e.read_byte(s)==bs[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?W:(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,l.mode=xe,L)},n.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?V:e.istate.blocks.sync_point()}}function kn(){}kn.prototype={inflateInit(n){const t=this;return t.istate=new gs,n||(n=ts),t.istate.inflateInit(t,n)},inflate(n){const t=this;return t.istate?t.istate.inflate(t,n):V},inflateEnd(){const n=this;if(!n.istate)return V;const t=n.istate.inflateEnd(n);return n.istate=null,t},inflateSync(){const n=this;return n.istate?n.istate.inflateSync(n):V},inflateSetDictionary(n,t){const e=this;return e.istate?e.istate.inflateSetDictionary(e,n,t):V},read_byte(n){return this.next_in[n]},read_buf(n,t){return this.next_in.subarray(n,n+t)}};function ys(n){const t=this,e=new kn,r=n&&n.chunkSize?Math.floor(n.chunkSize*2):128*1024,s=rs,i=new Uint8Array(r);let a=!1;e.inflateInit(),e.next_out=i,t.append=function(o,l){const _=[];let d,p,h=0,g=0,E=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),d=e.inflate(s),a&&d===ee){if(e.avail_in!==0)throw new Error("inflating: bad input")}else if(d!==L&&d!==z)throw new Error("inflating: "+e.msg);if((a||d===z)&&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))),E+=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?(p=new Uint8Array(E),_.forEach(function(f){p.set(f,g),g+=f.length})):p=_[0]?new Uint8Array(_[0]):new Uint8Array,p}},t.flush=function(){e.inflateEnd()}}const _e=4294967295,oe=65535,xs=8,Es=0,Ts=99,Ss=67324752,As=134695760,zt=33639248,Rs=101010256,en=101075792,Cs=117853008,me=22,Ke=20,Xe=56,Os=1,ks=39169,Ds=10,Is=1,Ns=21589,Ps=28789,Ls=25461,Fs=6534,tn=1,Ms=6,nn=8,rn=2048,sn=16,Us="/",$=void 0,Me="undefined",Dn="function";class an{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 vs=64;let In=2;try{typeof navigator!=Me&&navigator.hardwareConcurrency&&(In=navigator.hardwareConcurrency)}catch{}const Hs={chunkSize:512*1024,maxWorkers:In,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:$,CompressionStreamNative:typeof CompressionStream!=Me&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Me&&DecompressionStream},ce=Object.assign({},Hs);function Nn(){return ce}function Ws(n){return Math.max(n.chunkSize,vs)}function Pn(n){const{baseURL:t,chunkSize:e,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:_,DecompressionStream:d,workerScripts:p}=n;if(se("baseURL",t),se("chunkSize",e),se("maxWorkers",r),se("terminateWorkerTimeout",s),se("useCompressionStream",i),se("useWebWorkers",a),o&&(ce.CompressionStream=new an(o)),l&&(ce.DecompressionStream=new an(l)),se("CompressionStream",_),se("DecompressionStream",d),p!==$){const{deflate:h,inflate:g}=p;if((h||g)&&(ce.workerScripts||(ce.workerScripts={})),h){if(!Array.isArray(h))throw new Error("workerScripts.deflate must be an array");ce.workerScripts.deflate=h}if(g){if(!Array.isArray(g))throw new Error("workerScripts.inflate must be an array");ce.workerScripts.inflate=g}}}function se(n,t){t!==$&&(ce[n]=t)}function Bs(){return"application/octet-stream"}const Ln=[];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;Ln[n]=t}class Ue{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^Ln[(e^t[r])&255];this.crc=e}get(){return~this.crc}}class Fn extends TransformStream{constructor(){let t;const e=new Ue;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 js(n){if(typeof TextEncoder>"u"){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 Y={concat(n,t){if(n.length===0||t.length===0)return n.concat(t);const e=n[n.length-1],r=Y.getPartial(e);return r===32?n.concat(t):Y._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+Y.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]=Y.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=Y.getPartial(s);return r.push(Y.partial(t+i&31,t+i>32?e:r.pop(),1)),r}},ve={bytes:{fromBits(n){const e=Y.bitLength(n)/8,r=new Uint8Array(e);let s;for(let i=0;i<e;i++)i&3||(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(Y.partial(8*(e&3),r)),t}}},Mn={};Mn.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=ve.utf8String.toBits(n));const e=t._buffer=Y.concat(t._buffer,n),r=t._length,s=t._length=r+Y.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=Y.concat(t,[Y.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 d=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=d}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 Un={};Un.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 d=a[_&3?i:i-4];i<=4||_<4?o[_]=d:o[_]=r[0][e[d>>>24]]^r[1][e[d>>16&255]]^r[2][e[d>>8&255]]^r[3][e[d&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 d=0;d<256;d++)i[(s[d]=d<<1^(d>>7)*283)^d]=d;for(let d=a=0;!e[d];d^=o||1,a=i[a]||1){let p=a^a<<1^a<<2^a<<3^a<<4;p=p>>8^p&255^99,e[d]=p,r[p]=d,_=s[l=s[o=s[d]]];let h=_*16843009^l*65537^o*257^d*16843008,g=s[p]*257^p*16843008;for(let E=0;E<4;E++)n[E][d]=g=g<<24^g>>>8,t[E][p]=h=h<<24^h>>>8}for(let d=0;d<5;d++)n[d]=n[d].slice(0),t[d]=t[d].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],d=i[4];let p=n[0]^e[0],h=n[t?3:1]^e[1],g=n[2]^e[2],E=n[t?1:3]^e[3],f=4,c,u,m;for(let w=0;w<r;w++)c=a[p>>>24]^o[h>>16&255]^l[g>>8&255]^_[E&255]^e[f],u=a[h>>>24]^o[g>>16&255]^l[E>>8&255]^_[p&255]^e[f+1],m=a[g>>>24]^o[E>>16&255]^l[p>>8&255]^_[h&255]^e[f+2],E=a[E>>>24]^o[p>>16&255]^l[h>>8&255]^_[g&255]^e[f+3],f+=4,p=c,h=u,g=m;for(let w=0;w<4;w++)s[t?3&-w:w]=d[p>>>24]<<24^d[h>>16&255]<<16^d[g>>8&255]<<8^d[E&255]^e[f++],c=p,p=h,h=g,g=E,E=c;return s}};const qs={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}},vn={};vn.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=Y.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 Y.clamp(t,s)}};const he={importKey(n){return new he.hmacSha1(ve.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 d=new ArrayBuffer(s),p=new DataView(d);let h=0;const g=Y;for(t=ve.bytes.toBits(t),_=1;h<(s||1);_++){for(i=a=n.encrypt(g.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++)p.setInt32(h,i[o]),h+=4}return d.slice(0,r/8)}};he.hmacSha1=class{constructor(n){const t=this,e=t._hash=Mn.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 Gs=typeof crypto<"u"&&typeof crypto.getRandomValues=="function",ht="Invalid password",pt="Invalid signature",mt="zipjs-abort-check-password";function Hn(n){return Gs?crypto.getRandomValues(n):qs.getRandomValues(n)}const we=16,Ys="raw",Wn={name:"PBKDF2"},Vs={name:"HMAC"},Zs="SHA-1",Ks=Object.assign({hash:Vs},Wn),rt=Object.assign({iterations:1e3,hash:{name:Zs}},Wn),Xs=["deriveBits"],Se=[8,12,16],Ee=[16,24,32],ie=10,$s=[0,0,0,0],Bn="undefined",jn="function",Be=typeof crypto!=Bn,Oe=Be&&crypto.subtle,qn=Be&&typeof Oe!=Bn,J=ve.bytes,Js=Un.aes,Qs=vn.ctrGladman,zs=he.hmacSha1;let on=Be&&qn&&typeof Oe.importKey==jn,cn=Be&&qn&&typeof Oe.deriveBits==jn;class ei extends TransformStream{constructor({password:t,signed:e,encryptionStrength:r,checkPasswordOnly:s}){super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:t,signed:e,strength:r-1,pending:new Uint8Array})},async transform(i,a){const o=this,{password:l,strength:_,resolveReady:d,ready:p}=o;l?(await ni(o,_,l,X(i,0,Se[_]+2)),i=X(i,Se[_]+2),s?a.error(new Error(mt)):d()):await p;const h=new Uint8Array(i.length-ie-(i.length-ie)%we);a.enqueue(Gn(o,i,h,0,ie,!0))},async flush(i){const{signed:a,ctr:o,hmac:l,pending:_,ready:d}=this;if(l&&o){await d;const p=X(_,0,_.length-ie),h=X(_,_.length-ie);let g=new Uint8Array;if(p.length){const E=Re(J,p);l.update(E);const f=o.update(E);g=Ae(J,f)}if(a){const E=X(Ae(J,l.digest()),0,ie);for(let f=0;f<ie;f++)if(E[f]!=h[f])throw new Error(pt)}i.enqueue(g)}}})}}class ti extends TransformStream{constructor({password:t,encryptionStrength:e}){let r;super({start(){Object.assign(this,{ready:new Promise(s=>this.resolveReady=s),password:t,strength:e-1,pending:new Uint8Array})},async transform(s,i){const a=this,{password:o,strength:l,resolveReady:_,ready:d}=a;let p=new Uint8Array;o?(p=await ri(a,l,o),_()):await d;const h=new Uint8Array(p.length+s.length-s.length%we);h.set(p,0),i.enqueue(Gn(a,s,h,p.length,0))},async flush(s){const{ctr:i,hmac:a,pending:o,ready:l}=this;if(a&&i){await l;let _=new Uint8Array;if(o.length){const d=i.update(Re(J,o));a.update(d),_=Ae(J,d)}r.signature=Ae(J,a.digest()).slice(0,ie),s.enqueue(wt(_,r.signature))}}}),r=this}}function Gn(n,t,e,r,s,i){const{ctr:a,hmac:o,pending:l}=n,_=t.length-s;l.length&&(t=wt(l,t),e=ai(e,_-_%we));let d;for(d=0;d<=_-we;d+=we){const p=Re(J,X(t,d,d+we));i&&o.update(p);const h=a.update(p);i||o.update(h),e.set(Ae(J,h),d+r)}return n.pending=X(t,d),e}async function ni(n,t,e,r){const s=await Yn(n,t,e,X(r,0,Se[t])),i=X(r,Se[t]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(ht)}async function ri(n,t,e){const r=Hn(new Uint8Array(Se[t])),s=await Yn(n,t,e,r);return wt(r,s)}async function Yn(n,t,e,r){n.password=null;const s=js(e),i=await si(Ys,s,Ks,!1,Xs),a=await ii(Object.assign({salt:r},rt),i,8*(Ee[t]*2+2)),o=new Uint8Array(a),l=Re(J,X(o,0,Ee[t])),_=Re(J,X(o,Ee[t],Ee[t]*2)),d=X(o,Ee[t]*2);return Object.assign(n,{keys:{key:l,authentication:_,passwordVerification:d},ctr:new Qs(new Js(l),Array.from($s)),hmac:new zs(_)}),d}async function si(n,t,e,r,s){if(on)try{return await Oe.importKey(n,t,e,r,s)}catch{return on=!1,he.importKey(t)}else return he.importKey(t)}async function ii(n,t,e){if(cn)try{return await Oe.deriveBits(n,t,e)}catch{return cn=!1,he.pbkdf2(t,n.salt,rt.iterations,e)}else return he.pbkdf2(t,n.salt,rt.iterations,e)}function wt(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 ai(n,t){if(t&&t>n.length){const e=n;n=new Uint8Array(t),n.set(e,0)}return n}function X(n,t,e){return n.subarray(t,e)}function Ae(n,t){return n.fromBits(t)}function Re(n,t){return n.toBits(t)}const be=12;class oi extends TransformStream{constructor({password:t,passwordVerification:e,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),Vn(this,t)},transform(s,i){const a=this;if(a.password){const o=ln(a,s.subarray(0,be));if(a.password=null,o[be-1]!=a.passwordVerification)throw new Error(ht);s=s.subarray(be)}r?i.error(new Error(mt)):i.enqueue(ln(a,s))}})}}class ci extends TransformStream{constructor({password:t,passwordVerification:e}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),Vn(this,t)},transform(r,s){const i=this;let a,o;if(i.password){i.password=null;const l=Hn(new Uint8Array(be));l[be-1]=i.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(fn(i,l),0),o=be}else a=new Uint8Array(r.length),o=0;a.set(fn(i,r),o),s.enqueue(a)}})}}function ln(n,t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=Zn(n)^t[r],bt(n,e[r]);return e}function fn(n,t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=Zn(n)^t[r],bt(n,t[r]);return e}function Vn(n,t){const e=[305419896,591751049,878082192];Object.assign(n,{keys:e,crcKey0:new Ue(e[0]),crcKey2:new Ue(e[2])});for(let r=0;r<t.length;r++)bt(n,t.charCodeAt(r))}function bt(n,t){let[e,r,s]=n.keys;n.crcKey0.append([t]),e=~n.crcKey0.get(),r=un(Math.imul(un(r+Kn(e)),134775813)+1),n.crcKey2.append([r>>>24]),s=~n.crcKey2.get(),n.keys=[e,r,s]}function Zn(n){const t=n.keys[2]|2;return Kn(Math.imul(t,t^1)>>>8)}function Kn(n){return n&255}function un(n){return n&4294967295}const dn="deflate-raw";class li extends TransformStream{constructor(t,{chunkSize:e,CompressionStream:r,CompressionStreamNative:s}){super({});const{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:_,level:d}=t,p=this;let h,g,E=Xn(super.readable);(!a||l)&&_&&(h=new Fn,E=Q(E,h)),i&&(E=Jn(E,o,{level:d,chunkSize:e},s,r)),a&&(l?E=Q(E,new ci(t)):(g=new ti(t),E=Q(E,g))),$n(p,E,()=>{let f;a&&!l&&(f=g.signature),(!a||l)&&_&&(f=new DataView(h.value.buffer).getUint32(0)),p.signature=f})}}class fi extends TransformStream{constructor(t,{chunkSize:e,DecompressionStream:r,DecompressionStreamNative:s}){super({});const{zipCrypto:i,encrypted:a,signed:o,signature:l,compressed:_,useCompressionStream:d}=t;let p,h,g=Xn(super.readable);a&&(i?g=Q(g,new oi(t)):(h=new ei(t),g=Q(g,h))),_&&(g=Jn(g,d,{chunkSize:e},s,r)),(!a||i)&&o&&(p=new Fn,g=Q(g,p)),$n(this,g,()=>{if((!a||i)&&o){const E=new DataView(p.value.buffer);if(l!=E.getUint32(0,!1))throw new Error(pt)}})}}function Xn(n){return Q(n,new TransformStream({transform(t,e){t&&t.length&&e.enqueue(t)}}))}function $n(n,t,e){t=Q(t,new TransformStream({flush:e})),Object.defineProperty(n,"readable",{get(){return t}})}function Jn(n,t,e,r,s){try{const i=t&&r?r:s;n=Q(n,new i(dn,e))}catch(i){if(t)n=Q(n,new s(dn,e));else throw i}return n}function Q(n,t){return n.pipeThrough(t)}const ui="message",di="start",_i="pull",_n="data",hi="ack",pi="close",mi="deflate",Qn="inflate";class wi extends TransformStream{constructor(t,e){super({});const r=this,{codecType:s}=t;let i;s.startsWith(mi)?i=li:s.startsWith(Qn)&&(i=fi);let a=0;const o=new i(t,e),l=super.readable,_=new TransformStream({transform(d,p){d&&d.length&&(a+=d.length,p.enqueue(d))},flush(){const{signature:d}=o;Object.assign(r,{signature:d,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(_)}})}}const bi=typeof Worker!=Me;class $e{constructor(t,{readable:e,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:_},d){const{signal:p}=a;return Object.assign(t,{busy:!0,readable:e.pipeThrough(new gi(e,a,i),{signal:p}),writable:r,options:Object.assign({},s),scripts:_,transferStreams:l,terminate(){const{worker:h,busy:g}=t;h&&!g&&(h.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,d(t)}}),(o&&bi?xi:yi)(t,i)}}class gi extends TransformStream{constructor(t,{onstart:e,onprogress:r,size:s,onend:i},{chunkSize:a}){let o=0;super({start(){e&&Je(e,s)},async transform(l,_){o+=l.length,r&&await Je(r,o,s),_.enqueue(l)},flush(){t.size=o,i&&Je(i,o)}},{highWaterMark:1,size:()=>a})}}async function Je(n,...t){try{await n(...t)}catch{}}function yi(n,t){return{run:()=>Ei(n,t)}}function xi(n,{baseURL:t,chunkSize:e}){return n.interface||Object.assign(n,{worker:Ai(n.scripts[0],t,n),interface:{run:()=>Ti(n,{chunkSize:e})}}),n.interface}async function Ei({options:n,readable:t,writable:e,onTaskFinished:r},s){const i=new wi(n,s);try{await t.pipeThrough(i).pipeTo(e,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=i;return{signature:a,size:o}}finally{r()}}async function Ti(n,t){let e,r;const s=new Promise((h,g)=>{e=h,r=g});Object.assign(n,{reader:null,writer:null,resolveResult:e,rejectResult:r,result:s});const{readable:i,options:a,scripts:o}=n,{writable:l,closed:_}=Si(n.writable);st({type:di,scripts:o.slice(1),options:a,config:t,readable:i,writable:l},n)||Object.assign(n,{reader:i.getReader(),writer:l.getWriter()});const p=await s;try{await l.getWriter().close()}catch{}return await _,p}function Si(n){const t=n.getWriter();let e;const r=new Promise(i=>e=i);return{writable:new WritableStream({async write(i){await t.ready,await t.write(i)},close(){t.releaseLock(),e()},abort(i){return t.abort(i)}}),closed:r}}let hn=!0,pn=!0;function Ai(n,t,e){const r={type:"module"};let s,i;typeof n==Dn&&(n=n());try{s=new URL(n,t)}catch{s=n}if(hn)try{i=new Worker(s)}catch{hn=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(ui,a=>Ri(a,e)),i}function st(n,{worker:t,writer:e,onTaskFinished:r,transferStreams:s}){try{let{value:i,readable:a,writable:o}=n;const 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&&pn?(a&&l.push(a),o&&l.push(o)):n.readable=n.writable=null,l.length)try{return t.postMessage(n,l),!0}catch{pn=!1,n.readable=n.writable=null,t.postMessage(n)}else t.postMessage(n)}catch(i){throw e&&e.releaseLock(),r(),i}}async function Ri({data:n},t){const{type:e,value:r,messageId:s,result:i,error:a}=n,{reader:o,writer:l,resolveResult:_,rejectResult:d,onTaskFinished:p}=t;try{if(a){const{message:g,stack:E,code:f,name:c}=a,u=new Error(g);Object.assign(u,{stack:E,code:f,name:c}),h(u)}else{if(e==_i){const{value:g,done:E}=await o.read();st({type:_n,value:g,done:E,messageId:s},t)}e==_n&&(await l.ready,await l.write(new Uint8Array(r)),st({type:hi,messageId:s},t)),e==pi&&h(null,i)}}catch(g){h(g)}function h(g,E){g?d(g):_(E),l&&l.releaseLock(),p()}}let ae=[];const Qe=[];let mn=0;async function Ci(n,t){const{options:e,config:r}=t,{transferStreams:s,useWebWorkers:i,useCompressionStream:a,codecType:o,compressed:l,signed:_,encrypted:d}=e,{workerScripts:p,maxWorkers:h,terminateWorkerTimeout:g}=r;t.transferStreams=s||s===$;const E=!l&&!_&&!d&&!t.transferStreams;t.useWebWorkers=!E&&(i||i===$&&r.useWebWorkers),t.scripts=t.useWebWorkers&&p?p[o]:[],e.useCompressionStream=a||a===$&&r.useCompressionStream;let f;const c=ae.find(m=>!m.busy);if(c)it(c),f=new $e(c,n,t,u);else if(ae.length<h){const m={indexWorker:mn};mn++,ae.push(m),f=new $e(m,n,t,u)}else f=await new Promise(m=>Qe.push({resolve:m,stream:n,workerOptions:t}));return f.run();function u(m){if(Qe.length){const[{resolve:w,stream:y,workerOptions:C}]=Qe.splice(0,1);w(new $e(m,y,C,u))}else m.worker?(it(m),Number.isFinite(g)&&g>=0&&(m.terminateTimeout=setTimeout(()=>{ae=ae.filter(w=>w!=m),m.terminate()},g))):ae=ae.filter(w=>w!=m)}}function it(n){const{terminateTimeout:t}=n;t&&(clearTimeout(t),n.terminateTimeout=null)}function Oi(){ae.forEach(n=>{it(n),n.terminate()})}const zn="HTTP error ",ke="HTTP Range not supported",er="Writer iterator completed too soon",ki="text/plain",Di="Content-Length",Ii="Content-Range",Ni="Accept-Ranges",Pi="Range",Li="Content-Type",Fi="HEAD",gt="GET",tr="bytes",Mi=64*1024,yt="writable";class je{constructor(){this.size=0}init(){this.initialized=!0}}class le extends je{get readable(){const t=this,{chunkSize:e=Mi}=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 xt extends je{constructor(){super();const t=this,e=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,yt,{get(){return e}})}writeUint8Array(){}}class Ui extends le{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 vi extends xt{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 Et extends le{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 nr extends je{constructor(t){super();const e=this,r=new TransformStream,s=[];t&&s.push([Li,t]),Object.defineProperty(e,yt,{get(){return r.writable}}),e.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class Hi extends Et{constructor(t){super(new Blob([t],{type:ki}))}}class Wi extends nr{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 Bi extends le{constructor(t,e){super(),rr(this,t,e)}async init(){await sr(this,at,wn),super.init()}readUint8Array(t,e){return ir(this,t,e,at,wn)}}class ji extends le{constructor(t,e){super(),rr(this,t,e)}async init(){await sr(this,ot,bn),super.init()}readUint8Array(t,e){return ir(this,t,e,ot,bn)}}function rr(n,t,e){const{preventHeadRequest:r,useRangeHeader:s,forceRangeRequests:i}=e;e=Object.assign({},e),delete e.preventHeadRequest,delete e.useRangeHeader,delete e.forceRangeRequests,delete e.useXHR,Object.assign(n,{url:t,options:e,preventHeadRequest:r,useRangeHeader:s,forceRangeRequests:i})}async function sr(n,t,e){const{url:r,useRangeHeader:s,forceRangeRequests:i}=n;if(Vi(r)&&(s||i)){const{headers:a}=await t(gt,n,ar(n));if(!i&&a.get(Ni)!=tr)throw new Error(ke);{let o;const l=a.get(Ii);if(l){const _=l.trim().split(/\s*\/\s*/);if(_.length){const d=_[1];d&&d!="*"&&(o=Number(d))}}o===$?await gn(n,t,e):n.size=o}}else await gn(n,t,e)}async function ir(n,t,e,r,s){const{useRangeHeader:i,forceRangeRequests:a,options:o}=n;if(i||a){const l=await r(gt,n,ar(n,t,e));if(l.status!=206)throw new Error(ke);return new Uint8Array(await l.arrayBuffer())}else{const{data:l}=n;return l||await s(n,o),new Uint8Array(n.data.subarray(t,t+e))}}function ar(n,t=0,e=1){return Object.assign({},Tt(n),{[Pi]:tr+"="+t+"-"+(t+e-1)})}function Tt({options:n}){const{headers:t}=n;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function wn(n){await or(n,at)}async function bn(n){await or(n,ot)}async function or(n,t){const e=await t(gt,n,Tt(n));n.data=new Uint8Array(await e.arrayBuffer()),n.size||(n.size=n.data.length)}async function gn(n,t,e){if(n.preventHeadRequest)await e(n,n.options);else{const s=(await t(Fi,n,Tt(n))).headers.get(Di);s?n.size=Number(s):await e(n,n.options)}}async function at(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(ke):new Error(zn+(s.statusText||s.status))}function ot(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(ke):new Error(zn+(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 cr extends le{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR?new ji(t,e):new Bi(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 qi extends cr{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}}class Gi extends le{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,e){return this.array.slice(t,t+e)}}class Yi extends xt{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 St extends le{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],d=_.size;if(l+e<=d)a=await G(_,l,e);else{const p=d-l;a=new Uint8Array(e),a.set(await G(_,l,p)),a.set(await s.readUint8Array(t+p,e-p,r),p)}return s.lastDiskNumber=Math.max(o,s.lastDiskNumber),a}}class He extends je{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(d){const{availableSize:p}=r;if(a)d.length>=p?(await l(d.slice(0,p)),await _(),r.diskOffset+=s.size,r.diskNumber++,a=null,await this.write(d.slice(p))):await l(d);else{const{value:h,done:g}=await t.next();if(g&&!h)throw new Error(er);s=h,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await Ce(s),i=h.writable,a=i.getWriter(),await this.write(d)}},async close(){await a.ready,await _()}});Object.defineProperty(r,yt,{get(){return o}});async function l(d){const p=d.length;p&&(await a.ready,await a.write(d),s.size+=p,r.size+=p,r.availableSize-=p)}async function _(){i.size=s.size,await a.close()}}}function Vi(n){const{baseURL:t}=Nn(),{protocol:e}=new URL(n,t);return e=="http:"||e=="https:"}async function Ce(n,t){n.init&&!n.initialized&&await n.init(t)}function lr(n){return Array.isArray(n)&&(n=new St(n)),n instanceof ReadableStream&&(n={readable:n}),n}function fr(n){n.writable===$&&typeof n.next==Dn&&(n=new He(n)),n instanceof WritableStream&&(n={writable:n});const{writable:t}=n;return t.size===$&&(t.size=0),n instanceof He||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 Zi=St,Ki=He,ur="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Xi=ur.length==256;function $i(n){if(Xi){let t="";for(let e=0;e<n.length;e++)t+=ur[n[e]];return t}else return new TextDecoder().decode(n)}function ct(n,t){return t&&t.trim().toLowerCase()=="cp437"?$i(n):new TextDecoder(t).decode(n)}const dr="filename",_r="rawFilename",hr="comment",pr="rawComment",mr="uncompressedSize",wr="compressedSize",br="offset",lt="diskNumberStart",ft="lastModDate",ut="rawLastModDate",gr="lastAccessDate",Ji="rawLastAccessDate",yr="creationDate",Qi="rawCreationDate",zi="internalFileAttribute",ea="externalFileAttribute",ta="msDosCompatible",na="zip64",ra=[dr,_r,wr,mr,ft,ut,hr,pr,gr,yr,br,lt,lt,zi,ea,ta,na,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class yn{constructor(t){ra.forEach(e=>this[e]=t[e])}}const Le="File format is not recognized",xr="End of central directory not found",Er="End of Zip64 central directory not found",Tr="End of Zip64 central directory locator not found",Sr="Central directory header not found",Ar="Local file header not found",Rr="Zip64 extra field not found",Cr="File contains encrypted entry",Or="Encryption method not supported",dt="Compression method not supported",_t="Split zip file",xn="utf-8",En="cp437",sa=[[mr,_e],[wr,_e],[br,_e],[lt,oe]],ia={[oe]:{getValue:B,bytes:4},[_e]:{getValue:Fe,bytes:8}};class aa{constructor(t,e={}){Object.assign(this,{reader:lr(t),options:e,config:Nn()})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;const{config:s}=e;if(await Ce(r),(r.size===$||!r.readUint8Array)&&(r=new Et(await new Response(r.readable).blob()),await Ce(r)),r.size<me)throw new Error(Le);r.chunkSize=Ws(s);const i=await da(r,Rs,r.size,me,oe*16);if(!i){const T=await G(r,0,4),S=q(T);throw B(S)==As?new Error(_t):new Error(xr)}const a=q(i);let o=B(a,12),l=B(a,16);const _=i.offset,d=j(a,20),p=_+me+d;let h=j(a,4);const g=r.lastDiskNumber||0;let E=j(a,6),f=j(a,8),c=0,u=0;if(l==_e||o==_e||f==oe||E==oe){const T=await G(r,i.offset-Ke,Ke),S=q(T);if(B(S,0)!=Cs)throw new Error(Er);l=Fe(S,8);let D=await G(r,l,Xe,-1),O=q(D);const P=i.offset-Ke-Xe;if(B(O,0)!=en&&l!=P){const N=l;l=P,c=l-N,D=await G(r,l,Xe,-1),O=q(D)}if(B(O,0)!=en)throw new Error(Tr);h==oe&&(h=B(O,16)),E==oe&&(E=B(O,20)),f==oe&&(f=Fe(O,32)),o==_e&&(o=Fe(O,40)),l-=o}if(l>=r.size&&(c=r.size-l-o-me,l=r.size-o-me),g!=h)throw new Error(_t);if(l<0)throw new Error(Le);let m=0,w=await G(r,l,o,E),y=q(w);if(o){const T=i.offset-o;if(B(y,m)!=zt&&l!=T){const S=l;l=T,c+=l-S,w=await G(r,l,o,E),y=q(w)}}const C=i.offset-l-(r.lastDiskOffset||0);if(o!=C&&C>=0&&(o=C,w=await G(r,l,o,E),y=q(w)),l<0||l>=r.size)throw new Error(Le);const b=K(e,t,"filenameEncoding"),x=K(e,t,"commentEncoding");for(let T=0;T<f;T++){const S=new oa(r,s,e.options);if(B(y,m)!=zt)throw new Error(Sr);kr(S,y,m+6);const D=!!S.bitFlag.languageEncodingFlag,O=m+46,P=O+S.filenameLength,N=P+S.extraFieldLength,k=j(y,m+4),v=(k&0)==0,F=w.subarray(O,P),ye=j(y,m+32),I=N+ye,fe=w.subarray(N,I),M=D,H=D,At=v&&(ge(y,m+38)&sn)==sn,Rt=B(y,m+42)+c;Object.assign(S,{versionMadeBy:k,msDosCompatible:v,compressedSize:0,uncompressedSize:0,commentLength:ye,directory:At,offset:Rt,diskNumberStart:j(y,m+34),internalFileAttribute:j(y,m+36),externalFileAttribute:B(y,m+38),rawFilename:F,filenameUTF8:M,commentUTF8:H,rawExtraField:w.subarray(P,N)});const[Ct,Nr]=await Promise.all([ct(F,M?xn:b||En),ct(fe,H?xn:x||En)]);Object.assign(S,{rawComment:fe,filename:Ct,comment:Nr,directory:At||Ct.endsWith(Us)}),u=Math.max(Rt,u),await Dr(S,S,y,m+6);const qe=new yn(S);qe.getData=(kt,Pr)=>S.getData(kt,qe,Pr),m=I;const{onprogress:Ot}=t;if(Ot)try{await Ot(T+1,f,new yn(S))}catch{}yield qe}const A=K(e,t,"extractPrependedData"),R=K(e,t,"extractAppendedData");return A&&(e.prependedData=u>0?await G(r,0,u):new Uint8Array),e.comment=d?await G(r,_+me,d):new Uint8Array,R&&(e.appendedData=p<r.size?await G(r,p,r.size-p):new Uint8Array),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){}}class oa{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:d,bitFlag:p,signature:h,rawLastModDate:g,uncompressedSize:E,compressedSize:f}=s,c=e.localDirectory={},u=await G(i,a,30,o),m=q(u);let w=K(s,r,"password");if(w=w&&w.length&&w,l&&l.originalCompressionMethod!=Ts)throw new Error(dt);if(_!=Es&&_!=xs)throw new Error(dt);if(B(m,0)!=Ss)throw new Error(Ar);kr(c,m,4),c.rawExtraField=c.extraFieldLength?await G(i,a+30+c.filenameLength,c.extraFieldLength,o):new Uint8Array,await Dr(s,c,m,4,!0),Object.assign(e,{lastAccessDate:c.lastAccessDate,creationDate:c.creationDate});const y=s.encrypted&&c.encrypted,C=y&&!l;if(y){if(!C&&l.strength===$)throw new Error(Or);if(!w)throw new Error(Cr)}const b=a+30+c.filenameLength+c.extraFieldLength,x=f,A=i.readable;Object.assign(A,{diskNumberStart:o,offset:b,size:x});const R=K(s,r,"signal"),T=K(s,r,"checkPasswordOnly");T&&(t=new WritableStream),t=fr(t),await Ce(t,E);const{writable:S}=t,{onstart:D,onprogress:O,onend:P}=r,N={options:{codecType:Qn,password:w,zipCrypto:C,encryptionStrength:l&&l.strength,signed:K(s,r,"checkSignature"),passwordVerification:C&&(p.dataDescriptor?g>>>8&255:h>>>24&255),signature:h,compressed:_!=0,encrypted:y,useWebWorkers:K(s,r,"useWebWorkers"),useCompressionStream:K(s,r,"useCompressionStream"),transferStreams:K(s,r,"transferStreams"),checkPasswordOnly:T},config:d,streamOptions:{signal:R,size:x,onstart:D,onprogress:O,onend:P}};let k=0;try{({outputSize:k}=await Ci({readable:A,writable:S},N))}catch(v){if(!T||v.message!=mt)throw v}finally{const v=K(s,r,"preventClose");S.size+=k,!v&&!S.locked&&await S.getWriter().close()}return T?void 0:t.getData?t.getData():S}}function kr(n,t,e){const r=n.rawBitFlag=j(t,e+2),s=(r&tn)==tn,i=B(t,e+6);Object.assign(n,{encrypted:s,version:j(t,e),bitFlag:{level:(r&Ms)>>1,dataDescriptor:(r&nn)==nn,languageEncodingFlag:(r&rn)==rn},rawLastModDate:i,lastModDate:_a(i),filenameLength:j(t,e+22),extraFieldLength:j(t,e+24)})}async function Dr(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 u=j(o,l),m=j(o,l+2);a.set(u,{type:u,data:i.slice(l+4,l+4+m)}),l+=4+m}}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 d=a.get(Os);d&&(ca(d,t),t.extraFieldZip64=d);const p=a.get(Ps);p&&(await Tn(p,dr,_r,t,n),t.extraFieldUnicodePath=p);const h=a.get(Ls);h&&(await Tn(h,hr,pr,t,n),t.extraFieldUnicodeComment=h);const g=a.get(ks);g?(la(g,t,_),t.extraFieldAES=g):t.compressionMethod=_;const E=a.get(Ds);E&&(fa(E,t),t.extraFieldNTFS=E);const f=a.get(Ns);f&&(ua(f,t,s),t.extraFieldExtendedTimestamp=f);const c=a.get(Fs);c&&(t.extraFieldUSDZ=c)}function ca(n,t){t.zip64=!0;const e=q(n.data),r=sa.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=ia[o];t[a]=n[a]=l.getValue(e,i),i+=l.bytes}else if(n[a])throw new Error(Rr)}}async function Tn(n,t,e,r,s){const i=q(n.data),a=new Ue;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:ge(i,0),[t]:ct(n.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&l==B(o,0)}),n.valid&&(r[t]=n[t],r[t+"UTF8"]=!0)}function la(n,t,e){const r=q(n.data),s=ge(r,4);Object.assign(n,{vendorVersion:ge(r,0),vendorId:ge(r,2),strength:s,originalCompressionMethod:e,compressionMethod:j(r,5)}),t.compressionMethod=n.compressionMethod}function fa(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==Is&&(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 _=ze(a),d=ze(o),p=ze(l),h={lastModDate:_,lastAccessDate:d,creationDate:p};Object.assign(n,h),Object.assign(t,h)}}catch{}}function ua(n,t,e){const r=q(n.data),s=ge(r,0),i=[],a=[];e?((s&1)==1&&(i.push(ft),a.push(ut)),(s&2)==2&&(i.push(gr),a.push(Ji)),(s&4)==4&&(i.push(yr),a.push(Qi))):n.data.length>=5&&(i.push(ft),a.push(ut));let o=1;i.forEach((l,_)=>{if(n.data.length>=o+4){const d=B(r,o);t[l]=n[l]=new Date(d*1e3);const p=a[_];n[p]=d}o+=4})}async function da(n,t,e,r,s){const i=new Uint8Array(4),a=q(i);ha(a,0,t);const o=r+s;return await l(r)||await l(Math.min(o,e));async function l(_){const d=e-_,p=await G(n,d,_);for(let h=p.length-r;h>=0;h--)if(p[h]==i[0]&&p[h+1]==i[1]&&p[h+2]==i[2]&&p[h+3]==i[3])return{offset:d+h,buffer:p.slice(h,h+r).buffer}}}function K(n,t,e){return t[e]===$?n.options[e]:t[e]}function _a(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 ze(n){return new Date(Number(n/BigInt(1e4)-BigInt(116444736e5)))}function ge(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 Fe(n,t){return Number(n.getBigUint64(t,!0))}function ha(n,t,e){n.setUint32(t,e,!0)}function q(n){return new DataView(n.buffer)}Pn({Inflate:ys});const pa=Object.freeze(Object.defineProperty({__proto__:null,BlobReader:Et,BlobWriter:nr,Data64URIReader:Ui,Data64URIWriter:vi,ERR_BAD_FORMAT:Le,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Sr,ERR_ENCRYPTED:Cr,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Tr,ERR_EOCDR_NOT_FOUND:xr,ERR_EOCDR_ZIP64_NOT_FOUND:Er,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Rr,ERR_HTTP_RANGE:ke,ERR_INVALID_PASSWORD:ht,ERR_INVALID_SIGNATURE:pt,ERR_ITERATOR_COMPLETED_TOO_SOON:er,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Ar,ERR_SPLIT_ZIP_FILE:_t,ERR_UNSUPPORTED_COMPRESSION:dt,ERR_UNSUPPORTED_ENCRYPTION:Or,HttpRangeReader:qi,HttpReader:cr,Reader:le,SplitDataReader:St,SplitDataWriter:He,SplitZipReader:Zi,SplitZipWriter:Ki,TextReader:Hi,TextWriter:Wi,Uint8ArrayReader:Gi,Uint8ArrayWriter:Yi,Writer:xt,ZipReader:aa,configure:Pn,getMimeType:Bs,initReader:lr,initStream:Ce,initWriter:fr,readUint8Array:G,terminateWorkers:Oi},Symbol.toStringTag,{value:"Module"})),Te=pa;class ma{constructor(t,e){U(this,"_zipReader");U(this,"_entriesPromise");U(this,"_traceURL");this._traceURL=t,Te.configure({baseURL:self.location.href}),this._zipReader=new Te.ZipReader(new Te.HttpReader(ba(t),{mode:"cors",preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:e}).then(r=>{const s=new Map;for(const i of r)s.set(i.filename,i);return s})}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 Te.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 Te.BlobWriter;return await r.getData(s),s.getData()}}class wa{constructor(t){U(this,"_entriesPromise");U(this,"_traceURL");this._traceURL=t,this._entriesPromise=fetch("/trace/file?path="+encodeURIComponent(t)).then(async e=>{const r=JSON.parse(await e.text()),s=new Map;for(const i of r.entries)s.set(i.name,i.path);return s})}isLive(){return!0}traceURL(){return this._traceURL}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 fetch("/trace/file?path="+encodeURIComponent(r))}}function ba(n){let t=n.startsWith("http")||n.startsWith("blob")?n:`file?path=${encodeURIComponent(n)}`;return t.startsWith("https://www.dropbox.com/")&&(t="https://dl.dropboxusercontent.com/"+t.substring(24)),t}self.addEventListener("install",function(n){self.skipWaiting()});self.addEventListener("activate",function(n){n.waitUntil(self.clients.claim())});const ga=new URL(self.registration.scope).pathname,de=new Map,We=new Map;async function ya(n,t,e,r){var o;await Ir();let s=We.get(e);s||(s=new Set,We.set(e,s)),s.add(n);const i=new zr;try{const[l,_]=Mr(r,[.5,.4,.1]),d=n.endsWith("json")?new wa(n):new ma(n,l);await i.load(d,_)}catch(l){throw console.error(l),(o=l==null?void 0:l.message)!=null&&o.includes("Cannot find .trace file")&&await i.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."):l instanceof Cn?new Error(`Could not load trace from ${t||n}. ${l.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 a=new Kr(i.storage(),l=>i.resourceForSha1(l));return de.set(n,{traceModel:i,snapshotServer:a}),i}async function xa(n){if(n.request.url.startsWith("chrome-extension://"))return fetch(n.request);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 l=new URL(tt(t.url)),_=l.pathname.substring(ga.length-1);if(_==="/ping")return await Ir(),new Response(null,{status:200});const d=l.searchParams.get("trace");if(_==="/contexts")try{const p=await ya(d,l.searchParams.get("traceFileName"),n.clientId,(h,g)=>{e.postMessage({method:"progress",params:{done:h,total:g}})});return new Response(JSON.stringify(p.contextEntries),{status:200,headers:{"Content-Type":"application/json"}})}catch(p){return new Response(JSON.stringify({error:p==null?void 0:p.message}),{status:500,headers:{"Content-Type":"application/json"}})}if(_.startsWith("/snapshotInfo/")){const{snapshotServer:p}=de.get(d)||{};return p?p.serveSnapshotInfo(_,l.searchParams):new Response(null,{status:404})}if(_.startsWith("/snapshot/")){const{snapshotServer:p}=de.get(d)||{};if(!p)return new Response(null,{status:404});const h=p.serveSnapshot(_,l.searchParams,l.href);return r&&h.headers.set("Content-Security-Policy","upgrade-insecure-requests"),h}if(_.startsWith("/sha1/")){const p=_.slice(6);for(const h of de.values()){const g=await h.traceModel.resourceForSha1(p);if(g)return new Response(g,{status:200,headers:Ea(l.searchParams)})}return new Response(null,{status:404})}return fetch(n.request)}const s=tt(e.url),i=new URL(s).searchParams.get("trace"),{snapshotServer:a}=de.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 Ea(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 Ir(){const n=await self.clients.matchAll(),t=new Set;for(const[e,r]of We)n.find(s=>s.id===e)?r.forEach(s=>t.add(s)):We.delete(e);for(const e of de.keys())t.has(e)||de.delete(e)}self.addEventListener("fetch",function(n){n.respondWith(xa(n))});
1
+ var Nr=Object.defineProperty;var Pr=(n,t,e)=>t in n?Nr(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var L=(n,t,e)=>Pr(n,typeof t!="symbol"?t+"":t,e);function Lr(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)})}const En={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ur(n){return n.replace(/[&<>"']/ug,t=>En[t])}function Fr(n){return n.replace(/[&<]/ug,t=>En[t])}function Tn(n){return Array.isArray(n)&&typeof n[0]=="string"}function Mr(n){return Array.isArray(n)&&Array.isArray(n[0])}class vr{constructor(t,e,r,s){L(this,"_htmlCache");L(this,"_snapshots");L(this,"_index");L(this,"snapshotName");L(this,"_resources");L(this,"_snapshot");L(this,"_callId");this._htmlCache=t,this._resources=e,this._snapshots=r,this._index=s,this._snapshot=r[s],this._callId=r[s].callId,this.snapshotName=r[s].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}render(){const t=[],e=(i,a,o,l)=>{if(typeof i=="string"){o==="STYLE"||o==="style"?t.push(qr(i)):t.push(Fr(i));return}if(Mr(i)){const d=a-i[0][0];if(d>=0&&d<=a){const _=Wr(this._snapshots[d]),h=i[0][1];if(h>=0&&h<_.length)return e(_[h],d,o,l)}}else if(Tn(i)){const[d,_,...h]=i,p=d==="NOSCRIPT"?"X-NOSCRIPT":d,g=Object.entries(_||{});t.push("<",p);const x="__playwright_current_src__",f=p==="IFRAME"||p==="FRAME",c=p==="A",u=p==="IMG",m=u&&g.some(y=>y[0]===x),w=p==="SOURCE"&&o==="PICTURE"&&(l==null?void 0:l.some(y=>y[0]===x));for(const[y,C]of g){let b=y;f&&y.toLowerCase()==="src"&&(b="__playwright_src__"),u&&y===x&&(b="src"),["src","srcset"].includes(y.toLowerCase())&&(m||w)&&(b="_"+b);let E=C;c&&y.toLowerCase()==="href"?E="link://"+C:(y.toLowerCase()==="href"||y.toLowerCase()==="src"||y===x)&&(E=Qe(C)),t.push(" ",b,'="',Ur(E),'"')}t.push(">");for(const y of h)e(y,a,p,g);Hr.has(p)||t.push("</",p,">");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>${Br(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 Hr=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]);function Wr(n){if(!n._nodes){const t=[],e=r=>{if(typeof r=="string")t.push(r);else if(Tn(r)){const[,,...s]=r;for(const i of s)e(i);t.push(r)}};e(n.html),n._nodes=t}return n._nodes}function Br(...n){function t(e,...r){const s="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.",i=[],a=[],o=[],l=h=>{for(const p of h.querySelectorAll("[__playwright_scroll_top_]"))i.push(p);for(const p of h.querySelectorAll("[__playwright_scroll_left_]"))a.push(p);for(const p of h.querySelectorAll("[__playwright_value_]")){const g=p;g.type!=="file"&&(g.value=g.getAttribute("__playwright_value_")),p.removeAttribute("__playwright_value_")}for(const p of h.querySelectorAll("[__playwright_checked_]"))p.checked=p.getAttribute("__playwright_checked_")==="true",p.removeAttribute("__playwright_checked_");for(const p of h.querySelectorAll("[__playwright_selected_]"))p.selected=p.getAttribute("__playwright_selected_")==="true",p.removeAttribute("__playwright_selected_");for(const p of r)for(const g of h.querySelectorAll(`[__playwright_target__="${p}"]`)){const x=g.style;x.outline="2px solid #006ab1",x.backgroundColor="#6fa8dc7f",o.push(g)}for(const p of h.querySelectorAll("iframe, frame")){const g=p.getAttribute("__playwright_src__");if(!g)p.setAttribute("src",'data:text/html,<body style="background: #ddd"></body>');else{const x=new URL(e(window.location.href)),f=x.pathname.lastIndexOf("/snapshot/");f!==-1&&(x.pathname=x.pathname.substring(0,f+1)),x.pathname+=g.substring(1),p.setAttribute("src",x.toString())}}{const p=h.querySelector("body[__playwright_custom_elements__]");if(p&&window.customElements){const g=(p.getAttribute("__playwright_custom_elements__")||"").split(",");for(const x of g)window.customElements.define(x,class extends HTMLElement{})}}for(const p of h.querySelectorAll("template[__playwright_shadow_root_]")){const g=p,x=g.parentElement.attachShadow({mode:"open"});x.appendChild(g.content),g.remove(),l(x)}if("adoptedStyleSheets"in h){const p=[...h.adoptedStyleSheets];for(const g of h.querySelectorAll("template[__playwright_style_sheet_]")){const x=g,f=new CSSStyleSheet;f.replaceSync(x.getAttribute("__playwright_style_sheet_")),p.push(f)}h.adoptedStyleSheets=p}},d=()=>{window.removeEventListener("load",d);for(const p of i)p.scrollTop=+p.getAttribute("__playwright_scroll_top_"),p.removeAttribute("__playwright_scroll_top_");for(const p of a)p.scrollLeft=+p.getAttribute("__playwright_scroll_left_"),p.removeAttribute("__playwright_scroll_left_");document.styleSheets[0].disabled=!0;const h=new URL(window.location.href).searchParams;if(h.get("pointX")&&h.get("pointY")){const p=+h.get("pointX"),g=+h.get("pointY"),x=h.has("hasInputTarget"),f=window.location.pathname.match(/\/page@[a-z0-9]+$/),c=o.length>0,u=document.documentElement?[document.documentElement]:[];for(const m of c?o:u){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",c){const y=m.getBoundingClientRect(),C=y.left+y.width/2,b=y.top+y.height/2;if(w.style.left=C+"px",w.style.top=b+"px",f&&(Math.abs(C-p)>=10||Math.abs(b-g)>=10)){const E=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",w.appendChild(E),w.setAttribute("title",s)}document.documentElement.appendChild(w)}else f&&!x&&(w.style.left=p+"px",w.style.top=g+"px",document.documentElement.appendChild(w))}}},_=()=>l(document);window.addEventListener("load",d),window.addEventListener("DOMContentLoaded",_)}return`
2
+ (${t.toString()})(${ze.toString()}${n.map(e=>`, "${e}"`).join("")})`}const Sn=["about:","blob:","data:","file:","ftp:","http:","https:","mailto:","sftp:","ws:","wss:"],Ot="http://playwright.bloburl/#";function Qe(n){n.startsWith(Ot)&&(n=n.substring(Ot.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&&Sn.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 jr=/url\(['"]?([\w-]+:)\/\//ig;function qr(n){return n.replace(jr,(t,e)=>!(e==="blob:")&&!(e==="file:")&&Sn.includes(e)?t:t.replace(e+"//",`https://pw-${e.slice(0,-1)}--`))}function ze(n){const t=new URL(n);return t.pathname.endsWith("/snapshot.html")?t.searchParams.get("r"):n}class Gr{constructor(t,e){L(this,"_snapshotStorage");L(this,"_resourceLoader");L(this,"_snapshotIds",new Map);this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,r){const s=this._snapshot(t.substring(9),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"}})}serveSnapshotInfo(t,e){const r=this._snapshot(t.substring(13),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.slice(1),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 g of t)if(s=i==null?void 0:i.resourceByUrl(Yr(g),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 _=new Headers;l!=="x-unknown"&&_.set("Content-Type",l);for(const{name:g,value:x}of s.response.headers)_.set(g,x);_.delete("Content-Encoding"),_.delete("Access-Control-Allow-Origin"),_.set("Access-Control-Allow-Origin","*"),_.delete("Content-Length"),_.set("Content-Length",String(o.size)),_.set("Cache-Control","public, max-age=31536000");const{status:h}=s.response,p=h===101||h===204||h===205||h===304;return new Response(p?null:o,{headers:_,status:s.response.status,statusText:s.response.statusText})}}function Yr(n){try{const t=new URL(n);return t.hash="",t.toString()}catch{return n}}function Vr(n){const t=new Map,{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 Zr{constructor(t){L(this,"_maxSize");L(this,"_map");L(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 Kr{constructor(){L(this,"_resources",[]);L(this,"_frameSnapshots",new Map);L(this,"_cache",new Zr(1e8))}addResource(t){t.request.url=Qe(t.request.url),this._resources.push(t)}addFrameSnapshot(t){for(const s of t.resourceOverrides)s.url=Qe(s.url);let e=this._frameSnapshots.get(t.frameId);e||(e={raw:[],renderers:[]},this._frameSnapshots.set(t.frameId,e),t.isMainFrame&&this._frameSnapshots.set(t.pageId,e)),e.raw.push(t);const r=new vr(this._cache,this._resources,e.raw,e.raw.length-1);return e.renderers.push(r),r}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(){this._resources.sort((t,e)=>(t._monotonicTime||0)-(e._monotonicTime||0))}}class An extends Error{constructor(t){super(t),this.name="TraceVersionError"}}const kt=7;class Xr{constructor(t,e){L(this,"_contextEntry");L(this,"_snapshotStorage");L(this,"_actionMap",new Map);L(this,"_version");L(this,"_pageEntries",new Map);L(this,"_jsHandles",new Map);L(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>kt)throw new An("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;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,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(t.snapshot),e.resources.push(t.snapshot);break;case"frame-snapshot":this._snapshotStorage.addFrameSnapshot(t.snapshot);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<kt;++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"};e.push(r)}for(const r of t){if(r.type==="context-options"){e.push({...r,monotonicTime:0,origin:"library"});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 $r{constructor(){L(this,"contextEntries",[]);L(this,"_snapshotStorage");L(this,"_backend");L(this,"_resourceToContentType",new Map)}async load(t,e){var o,l;this._backend=t;const r=[];let s=!1;for(const d of await this._backend.entryNames()){const _=d.match(/(.+)\.trace/);_&&r.push(_[1]||""),d.includes("src@")&&(s=!0)}if(!r.length)throw new Error("Cannot find .trace file");this._snapshotStorage=new Kr;const i=r.length*3;let a=0;for(const d of r){const _=Jr();_.traceUrl=t.traceURL(),_.hasSource=s;const h=new Xr(_,this._snapshotStorage),p=await this._backend.readText(d+".trace")||"";h.appendTrace(p),e(++a,i);const g=await this._backend.readText(d+".network")||"";if(h.appendTrace(g),e(++a,i),_.actions=h.actions().sort((f,c)=>f.startTime-c.startTime),!t.isLive()){for(const f of _.actions.slice().reverse())if(!f.endTime&&!f.error)for(const c of _.actions)c.parentId===f.callId&&f.endTime<c.endTime&&(f.endTime=c.endTime)}const x=await this._backend.readText(d+".stacks");if(x){const f=Vr(JSON.parse(x));for(const c of _.actions)c.stack=c.stack||f.get(c.callId)}e(++a,i);for(const f of _.resources)(o=f.request.postData)!=null&&o._sha1&&this._resourceToContentType.set(f.request.postData._sha1,Dt(f.request.postData.mimeType)),(l=f.response.content)!=null&&l._sha1&&this._resourceToContentType.set(f.response.content._sha1,Dt(f.response.content.mimeType));this.contextEntries.push(_)}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 Dt(n){const t=n.match(/^(.*);\s*charset=.*$/);return t?t[1]:n}function Jr(){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}}const Qr=15,U=0,z=1,zr=2,V=-2,W=-3,It=-4,ee=-5,Z=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Rn=1440,es=0,ts=4,ns=9,rs=5,ss=[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],is=[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],as=[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],os=[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],cs=[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],ls=[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],te=15;function et(){const n=this;let t,e,r,s,i,a;function o(d,_,h,p,g,x,f,c,u,m,w){let y,C,b,E,A,R,T,S,D,O,P,N,k,v,F;O=0,A=h;do r[d[_+O]]++,O++,A--;while(A!==0);if(r[0]==h)return f[0]=-1,c[0]=0,U;for(S=c[0],R=1;R<=te&&r[R]===0;R++);for(T=R,S<R&&(S=R),A=te;A!==0&&r[A]===0;A--);for(b=A,S>A&&(S=A),c[0]=S,v=1<<R;R<A;R++,v<<=1)if((v-=r[R])<0)return W;if((v-=r[A])<0)return W;for(r[A]+=v,a[1]=R=0,O=1,k=2;--A!==0;)a[k]=R+=r[O],k++,O++;A=0,O=0;do(R=d[_+O])!==0&&(w[a[R]++]=A),O++;while(++A<h);for(h=a[b],a[0]=A=0,O=0,E=-1,N=-S,i[0]=0,P=0,F=0;T<=b;T++)for(y=r[T];y--!==0;){for(;T>N+S;){if(E++,N+=S,F=b-N,F=F>S?S:F,(C=1<<(R=T-N))>y+1&&(C-=y+1,k=T,R<F))for(;++R<F&&!((C<<=1)<=r[++k]);)C-=r[k];if(F=1<<R,m[0]+F>Rn)return W;i[E]=P=m[0],m[0]+=F,E!==0?(a[E]=A,s[0]=R,s[1]=S,R=A>>>N-S,s[2]=P-i[E-1]-R,u.set(s,(i[E-1]+R)*3)):f[0]=P}for(s[1]=T-N,O>=h?s[0]=192:w[O]<p?(s[0]=w[O]<256?0:96,s[2]=w[O++]):(s[0]=x[w[O]-p]+16+64,s[2]=g[w[O++]-p]),C=1<<T-N,R=A>>>N;R<F;R+=C)u.set(s,(P+R)*3);for(R=1<<T-1;A&R;R>>>=1)A^=R;for(A^=R,D=(1<<N)-1;(A&D)!=a[E];)E--,N-=S,D=(1<<N)-1}return v!==0&&b!=1?ee:U}function l(d){let _;for(t||(t=[],e=[],r=new Int32Array(te+1),s=[],i=new Int32Array(te),a=new Int32Array(te+1)),e.length<d&&(e=[]),_=0;_<d;_++)e[_]=0;for(_=0;_<te+1;_++)r[_]=0;for(_=0;_<3;_++)s[_]=0;i.set(r.subarray(0,te),0),a.set(r.subarray(0,te+1),0)}n.inflate_trees_bits=function(d,_,h,p,g){let x;return l(19),t[0]=0,x=o(d,0,19,19,null,null,h,_,p,t,e),x==W?g.msg="oversubscribed dynamic bit lengths tree":(x==ee||_[0]===0)&&(g.msg="incomplete dynamic bit lengths tree",x=W),x},n.inflate_trees_dynamic=function(d,_,h,p,g,x,f,c,u){let m;return l(288),t[0]=0,m=o(h,0,d,257,as,os,x,p,c,t,e),m!=U||p[0]===0?(m==W?u.msg="oversubscribed literal/length tree":m!=It&&(u.msg="incomplete literal/length tree",m=W),m):(l(288),m=o(h,d,_,0,cs,ls,f,g,c,t,e),m!=U||g[0]===0&&d>257?(m==W?u.msg="oversubscribed distance tree":m==ee?(u.msg="incomplete distance tree",m=W):m!=It&&(u.msg="empty distance tree with lengths",m=W),m):U)}}et.inflate_trees_fixed=function(n,t,e,r){return n[0]=ns,t[0]=rs,e[0]=ss,r[0]=is,U};const ke=0,Nt=1,Pt=2,Lt=3,Ut=4,Ft=5,Mt=6,qe=7,vt=8,De=9;function fs(){const n=this;let t,e=0,r,s=0,i=0,a=0,o=0,l=0,d=0,_=0,h,p=0,g,x=0;function f(c,u,m,w,y,C,b,E){let A,R,T,S,D,O,P,N,k,v,F,ge,I,le,M,H;P=E.next_in_index,N=E.avail_in,D=b.bitb,O=b.bitk,k=b.write,v=k<b.read?b.read-k-1:b.end-k,F=Z[c],ge=Z[u];do{for(;O<20;)N--,D|=(E.read_byte(P++)&255)<<O,O+=8;if(A=D&F,R=m,T=w,H=(T+A)*3,(S=R[H])===0){D>>=R[H+1],O-=R[H+1],b.win[k++]=R[H+2],v--;continue}do{if(D>>=R[H+1],O-=R[H+1],S&16){for(S&=15,I=R[H+2]+(D&Z[S]),D>>=S,O-=S;O<15;)N--,D|=(E.read_byte(P++)&255)<<O,O+=8;A=D&ge,R=y,T=C,H=(T+A)*3,S=R[H];do if(D>>=R[H+1],O-=R[H+1],S&16){for(S&=15;O<S;)N--,D|=(E.read_byte(P++)&255)<<O,O+=8;if(le=R[H+2]+(D&Z[S]),D>>=S,O-=S,v-=I,k>=le)M=k-le,k-M>0&&2>k-M?(b.win[k++]=b.win[M++],b.win[k++]=b.win[M++],I-=2):(b.win.set(b.win.subarray(M,M+2),k),k+=2,M+=2,I-=2);else{M=k-le;do M+=b.end;while(M<0);if(S=b.end-M,I>S){if(I-=S,k-M>0&&S>k-M)do b.win[k++]=b.win[M++];while(--S!==0);else b.win.set(b.win.subarray(M,M+S),k),k+=S,M+=S,S=0;M=0}}if(k-M>0&&I>k-M)do b.win[k++]=b.win[M++];while(--I!==0);else b.win.set(b.win.subarray(M,M+I),k),k+=I,M+=I,I=0;break}else if(!(S&64))A+=R[H+2],A+=D&Z[S],H=(T+A)*3,S=R[H];else return E.msg="invalid distance code",I=E.avail_in-N,I=O>>3<I?O>>3:I,N+=I,P-=I,O-=I<<3,b.bitb=D,b.bitk=O,E.avail_in=N,E.total_in+=P-E.next_in_index,E.next_in_index=P,b.write=k,W;while(!0);break}if(S&64)return S&32?(I=E.avail_in-N,I=O>>3<I?O>>3:I,N+=I,P-=I,O-=I<<3,b.bitb=D,b.bitk=O,E.avail_in=N,E.total_in+=P-E.next_in_index,E.next_in_index=P,b.write=k,z):(E.msg="invalid literal/length code",I=E.avail_in-N,I=O>>3<I?O>>3:I,N+=I,P-=I,O-=I<<3,b.bitb=D,b.bitk=O,E.avail_in=N,E.total_in+=P-E.next_in_index,E.next_in_index=P,b.write=k,W);if(A+=R[H+2],A+=D&Z[S],H=(T+A)*3,(S=R[H])===0){D>>=R[H+1],O-=R[H+1],b.win[k++]=R[H+2],v--;break}}while(!0)}while(v>=258&&N>=10);return I=E.avail_in-N,I=O>>3<I?O>>3:I,N+=I,P-=I,O-=I<<3,b.bitb=D,b.bitk=O,E.avail_in=N,E.total_in+=P-E.next_in_index,E.next_in_index=P,b.write=k,U}n.init=function(c,u,m,w,y,C){t=ke,d=c,_=u,h=m,p=w,g=y,x=C,r=null},n.proc=function(c,u,m){let w,y,C,b=0,E=0,A=0,R,T,S,D;for(A=u.next_in_index,R=u.avail_in,b=c.bitb,E=c.bitk,T=c.write,S=T<c.read?c.read-T-1:c.end-T;;)switch(t){case ke:if(S>=258&&R>=10&&(c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,m=f(d,_,h,p,g,x,c,u),A=u.next_in_index,R=u.avail_in,b=c.bitb,E=c.bitk,T=c.write,S=T<c.read?c.read-T-1:c.end-T,m!=U)){t=m==z?qe:De;break}i=d,r=h,s=p,t=Nt;case Nt:for(w=i;E<w;){if(R!==0)m=U;else return c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);R--,b|=(u.read_byte(A++)&255)<<E,E+=8}if(y=(s+(b&Z[w]))*3,b>>>=r[y+1],E-=r[y+1],C=r[y],C===0){a=r[y+2],t=Mt;break}if(C&16){o=C&15,e=r[y+2],t=Pt;break}if(!(C&64)){i=C,s=y/3+r[y+2];break}if(C&32){t=qe;break}return t=De,u.msg="invalid literal/length code",m=W,c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);case Pt:for(w=o;E<w;){if(R!==0)m=U;else return c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);R--,b|=(u.read_byte(A++)&255)<<E,E+=8}e+=b&Z[w],b>>=w,E-=w,i=_,r=g,s=x,t=Lt;case Lt:for(w=i;E<w;){if(R!==0)m=U;else return c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);R--,b|=(u.read_byte(A++)&255)<<E,E+=8}if(y=(s+(b&Z[w]))*3,b>>=r[y+1],E-=r[y+1],C=r[y],C&16){o=C&15,l=r[y+2],t=Ut;break}if(!(C&64)){i=C,s=y/3+r[y+2];break}return t=De,u.msg="invalid distance code",m=W,c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);case Ut:for(w=o;E<w;){if(R!==0)m=U;else return c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);R--,b|=(u.read_byte(A++)&255)<<E,E+=8}l+=b&Z[w],b>>=w,E-=w,t=Ft;case Ft:for(D=T-l;D<0;)D+=c.end;for(;e!==0;){if(S===0&&(T==c.end&&c.read!==0&&(T=0,S=T<c.read?c.read-T-1:c.end-T),S===0&&(c.write=T,m=c.inflate_flush(u,m),T=c.write,S=T<c.read?c.read-T-1:c.end-T,T==c.end&&c.read!==0&&(T=0,S=T<c.read?c.read-T-1:c.end-T),S===0)))return c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);c.win[T++]=c.win[D++],S--,D==c.end&&(D=0),e--}t=ke;break;case Mt:if(S===0&&(T==c.end&&c.read!==0&&(T=0,S=T<c.read?c.read-T-1:c.end-T),S===0&&(c.write=T,m=c.inflate_flush(u,m),T=c.write,S=T<c.read?c.read-T-1:c.end-T,T==c.end&&c.read!==0&&(T=0,S=T<c.read?c.read-T-1:c.end-T),S===0)))return c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);m=U,c.win[T++]=a,S--,t=ke;break;case qe:if(E>7&&(E-=8,R++,A--),c.write=T,m=c.inflate_flush(u,m),T=c.write,S=T<c.read?c.read-T-1:c.end-T,c.read!=c.write)return c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);t=vt;case vt:return m=z,c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);case De:return m=W,c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m);default:return m=V,c.bitb=b,c.bitk=E,u.avail_in=R,u.total_in+=A-u.next_in_index,u.next_in_index=A,c.write=T,c.inflate_flush(u,m)}},n.free=function(){}}const Ht=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],he=0,Ge=1,Wt=2,Bt=3,jt=4,qt=5,Ie=6,Ne=7,Gt=8,fe=9;function us(n,t){const e=this;let r=he,s=0,i=0,a=0,o;const l=[0],d=[0],_=new fs;let h=0,p=new Int32Array(Rn*3);const g=0,x=new et;e.bitk=0,e.bitb=0,e.win=new Uint8Array(t),e.end=t,e.read=0,e.write=0,e.reset=function(f,c){c&&(c[0]=g),r==Ie&&_.free(f),r=he,e.bitk=0,e.bitb=0,e.read=e.write=0},e.reset(n,null),e.inflate_flush=function(f,c){let u,m,w;return m=f.next_out_index,w=e.read,u=(w<=e.write?e.write:e.end)-w,u>f.avail_out&&(u=f.avail_out),u!==0&&c==ee&&(c=U),f.avail_out-=u,f.total_out+=u,f.next_out.set(e.win.subarray(w,w+u),m),m+=u,w+=u,w==e.end&&(w=0,e.write==e.end&&(e.write=0),u=e.write-w,u>f.avail_out&&(u=f.avail_out),u!==0&&c==ee&&(c=U),f.avail_out-=u,f.total_out+=u,f.next_out.set(e.win.subarray(w,w+u),m),m+=u,w+=u),f.next_out_index=m,e.read=w,c},e.proc=function(f,c){let u,m,w,y,C,b,E,A;for(y=f.next_in_index,C=f.avail_in,m=e.bitb,w=e.bitk,b=e.write,E=b<e.read?e.read-b-1:e.end-b;;){let R,T,S,D,O,P,N,k;switch(r){case he:for(;w<3;){if(C!==0)c=U;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}switch(u=m&7,h=u&1,u>>>1){case 0:m>>>=3,w-=3,u=w&7,m>>>=u,w-=u,r=Ge;break;case 1:R=[],T=[],S=[[]],D=[[]],et.inflate_trees_fixed(R,T,S,D),_.init(R[0],T[0],S[0],0,D[0],0),m>>>=3,w-=3,r=Ie;break;case 2:m>>>=3,w-=3,r=Bt;break;case 3:return m>>>=3,w-=3,r=fe,f.msg="invalid block type",c=W,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c)}break;case Ge:for(;w<32;){if(C!==0)c=U;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}if((~m>>>16&65535)!=(m&65535))return r=fe,f.msg="invalid stored block lengths",c=W,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);s=m&65535,m=w=0,r=s!==0?Wt:h!==0?Ne:he;break;case Wt:if(C===0||E===0&&(b==e.end&&e.read!==0&&(b=0,E=b<e.read?e.read-b-1:e.end-b),E===0&&(e.write=b,c=e.inflate_flush(f,c),b=e.write,E=b<e.read?e.read-b-1:e.end-b,b==e.end&&e.read!==0&&(b=0,E=b<e.read?e.read-b-1:e.end-b),E===0)))return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);if(c=U,u=s,u>C&&(u=C),u>E&&(u=E),e.win.set(f.read_buf(y,u),b),y+=u,C-=u,b+=u,E-=u,(s-=u)!==0)break;r=h!==0?Ne:he;break;case Bt:for(;w<14;){if(C!==0)c=U;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}if(i=u=m&16383,(u&31)>29||(u>>5&31)>29)return r=fe,f.msg="too many length or distance symbols",c=W,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);if(u=258+(u&31)+(u>>5&31),!o||o.length<u)o=[];else for(A=0;A<u;A++)o[A]=0;m>>>=14,w-=14,a=0,r=jt;case jt:for(;a<4+(i>>>10);){for(;w<3;){if(C!==0)c=U;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}o[Ht[a++]]=m&7,m>>>=3,w-=3}for(;a<19;)o[Ht[a++]]=0;if(l[0]=7,u=x.inflate_trees_bits(o,l,d,p,f),u!=U)return c=u,c==W&&(o=null,r=fe),e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);a=0,r=qt;case qt:for(;u=i,!(a>=258+(u&31)+(u>>5&31));){let v,F;for(u=l[0];w<u;){if(C!==0)c=U;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}if(u=p[(d[0]+(m&Z[u]))*3+1],F=p[(d[0]+(m&Z[u]))*3+2],F<16)m>>>=u,w-=u,o[a++]=F;else{for(A=F==18?7:F-14,v=F==18?11:3;w<u+A;){if(C!==0)c=U;else return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);C--,m|=(f.read_byte(y++)&255)<<w,w+=8}if(m>>>=u,w-=u,v+=m&Z[A],m>>>=A,w-=A,A=a,u=i,A+v>258+(u&31)+(u>>5&31)||F==16&&A<1)return o=null,r=fe,f.msg="invalid bit length repeat",c=W,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);F=F==16?o[A-1]:0;do o[A++]=F;while(--v!==0);a=A}}if(d[0]=-1,O=[],P=[],N=[],k=[],O[0]=9,P[0]=6,u=i,u=x.inflate_trees_dynamic(257+(u&31),1+(u>>5&31),o,O,P,N,k,p,f),u!=U)return u==W&&(o=null,r=fe),c=u,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);_.init(O[0],P[0],p,N[0],p,k[0]),r=Ie;case Ie:if(e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,(c=_.proc(e,f,c))!=z)return e.inflate_flush(f,c);if(c=U,_.free(f),y=f.next_in_index,C=f.avail_in,m=e.bitb,w=e.bitk,b=e.write,E=b<e.read?e.read-b-1:e.end-b,h===0){r=he;break}r=Ne;case Ne:if(e.write=b,c=e.inflate_flush(f,c),b=e.write,E=b<e.read?e.read-b-1:e.end-b,e.read!=e.write)return e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);r=Gt;case Gt:return c=z,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);case fe:return c=W,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c);default:return c=V,e.bitb=m,e.bitk=w,f.avail_in=C,f.total_in+=y-f.next_in_index,f.next_in_index=y,e.write=b,e.inflate_flush(f,c)}}},e.free=function(f){e.reset(f,null),e.win=null,p=null},e.set_dictionary=function(f,c,u){e.win.set(f.subarray(c,c+u),0),e.read=e.write=u},e.sync_point=function(){return r==Ge?1:0}}const ds=32,_s=8,hs=0,Yt=1,Vt=2,Zt=3,Kt=4,Xt=5,Ye=6,ye=7,$t=12,ne=13,ps=[0,0,255,255];function ms(){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?V:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=ye,e.istate.blocks.reset(e,null),U)}n.inflateEnd=function(e){return n.blocks&&n.blocks.free(e),n.blocks=null,U},n.inflateInit=function(e,r){return e.msg=null,n.blocks=null,r<8||r>15?(n.inflateEnd(e),V):(n.wbits=r,e.istate.blocks=new us(e,1<<r),t(e),U)},n.inflate=function(e,r){let s,i;if(!e||!e.istate||!e.next_in)return V;const a=e.istate;for(r=r==ts?ee:U,s=ee;;)switch(a.mode){case hs: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)!=_s){a.mode=ne,e.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=ne,e.msg="invalid win size",a.marker=5;break}a.mode=Yt;case Yt: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=ne,e.msg="incorrect header check",a.marker=5;break}if(!(i&ds)){a.mode=ye;break}a.mode=Vt;case Vt: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=Zt;case Zt: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=Kt;case Kt: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=Xt;case Xt: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=Ye,zr);case Ye:return a.mode=ne,e.msg="need dictionary",a.marker=0,V;case ye:if(s=a.blocks.proc(e,s),s==W){a.mode=ne,a.marker=0;break}if(s==U&&(s=r),s!=z)return s;s=r,a.blocks.reset(e,a.was),a.mode=$t;case $t:return e.avail_in=0,z;case ne:return W;default:return V}},n.inflateSetDictionary=function(e,r,s){let i=0,a=s;if(!e||!e.istate||e.istate.mode!=Ye)return V;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=ye,U},n.inflateSync=function(e){let r,s,i,a,o;if(!e||!e.istate)return V;const l=e.istate;if(l.mode!=ne&&(l.mode=ne,l.marker=0),(r=e.avail_in)===0)return ee;for(s=e.next_in_index,i=l.marker;r!==0&&i<4;)e.read_byte(s)==ps[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?W:(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,l.mode=ye,U)},n.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?V:e.istate.blocks.sync_point()}}function Cn(){}Cn.prototype={inflateInit(n){const t=this;return t.istate=new ms,n||(n=Qr),t.istate.inflateInit(t,n)},inflate(n){const t=this;return t.istate?t.istate.inflate(t,n):V},inflateEnd(){const n=this;if(!n.istate)return V;const t=n.istate.inflateEnd(n);return n.istate=null,t},inflateSync(){const n=this;return n.istate?n.istate.inflateSync(n):V},inflateSetDictionary(n,t){const e=this;return e.istate?e.istate.inflateSetDictionary(e,n,t):V},read_byte(n){return this.next_in[n]},read_buf(n,t){return this.next_in.subarray(n,n+t)}};function ws(n){const t=this,e=new Cn,r=n&&n.chunkSize?Math.floor(n.chunkSize*2):128*1024,s=es,i=new Uint8Array(r);let a=!1;e.inflateInit(),e.next_out=i,t.append=function(o,l){const d=[];let _,h,p=0,g=0,x=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),_=e.inflate(s),a&&_===ee){if(e.avail_in!==0)throw new Error("inflating: bad input")}else if(_!==U&&_!==z)throw new Error("inflating: "+e.msg);if((a||_===z)&&e.avail_in===o.length)throw new Error("inflating: bad input");e.next_out_index&&(e.next_out_index===r?d.push(new Uint8Array(i)):d.push(i.subarray(0,e.next_out_index))),x+=e.next_out_index,l&&e.next_in_index>0&&e.next_in_index!=p&&(l(e.next_in_index),p=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return d.length>1?(h=new Uint8Array(x),d.forEach(function(f){h.set(f,g),g+=f.length})):h=d[0]?new Uint8Array(d[0]):new Uint8Array,h}},t.flush=function(){e.inflateEnd()}}const de=4294967295,ae=65535,bs=8,gs=0,ys=99,xs=67324752,Es=134695760,Jt=33639248,Ts=101010256,Qt=101075792,Ss=117853008,pe=22,Ve=20,Ze=56,As=1,Rs=39169,Cs=10,Os=1,ks=21589,Ds=28789,Is=25461,Ns=6534,zt=1,Ps=6,en=8,tn=2048,nn=16,Ls="/",$=void 0,Ue="undefined",On="function";class rn{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 Us=64;let kn=2;try{typeof navigator!=Ue&&navigator.hardwareConcurrency&&(kn=navigator.hardwareConcurrency)}catch{}const Fs={chunkSize:512*1024,maxWorkers:kn,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:$,CompressionStreamNative:typeof CompressionStream!=Ue&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Ue&&DecompressionStream},oe=Object.assign({},Fs);function Dn(){return oe}function Ms(n){return Math.max(n.chunkSize,Us)}function In(n){const{baseURL:t,chunkSize:e,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:a,Deflate:o,Inflate:l,CompressionStream:d,DecompressionStream:_,workerScripts:h}=n;if(re("baseURL",t),re("chunkSize",e),re("maxWorkers",r),re("terminateWorkerTimeout",s),re("useCompressionStream",i),re("useWebWorkers",a),o&&(oe.CompressionStream=new rn(o)),l&&(oe.DecompressionStream=new rn(l)),re("CompressionStream",d),re("DecompressionStream",_),h!==$){const{deflate:p,inflate:g}=h;if((p||g)&&(oe.workerScripts||(oe.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");oe.workerScripts.deflate=p}if(g){if(!Array.isArray(g))throw new Error("workerScripts.inflate must be an array");oe.workerScripts.inflate=g}}}function re(n,t){t!==$&&(oe[n]=t)}function vs(){return"application/octet-stream"}const Nn=[];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;Nn[n]=t}class Fe{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^Nn[(e^t[r])&255];this.crc=e}get(){return~this.crc}}class Pn extends TransformStream{constructor(){let t;const e=new Fe;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 Hs(n){if(typeof TextEncoder>"u"){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 Y={concat(n,t){if(n.length===0||t.length===0)return n.concat(t);const e=n[n.length-1],r=Y.getPartial(e);return r===32?n.concat(t):Y._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+Y.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]=Y.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=Y.getPartial(s);return r.push(Y.partial(t+i&31,t+i>32?e:r.pop(),1)),r}},Me={bytes:{fromBits(n){const e=Y.bitLength(n)/8,r=new Uint8Array(e);let s;for(let i=0;i<e;i++)i&3||(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(Y.partial(8*(e&3),r)),t}}},Ln={};Ln.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=Me.utf8String.toBits(n));const e=t._buffer=Y.concat(t._buffer,n),r=t._length,s=t._length=r+Y.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=Y.concat(t,[Y.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 d=0;d<16;d++)r[d]=n[d];let s=e[0],i=e[1],a=e[2],o=e[3],l=e[4];for(let d=0;d<=79;d++){d>=16&&(r[d]=t._S(1,r[d-3]^r[d-8]^r[d-14]^r[d-16]));const _=t._S(5,s)+t._f(d,i,a,o)+l+r[d]+t._key[Math.floor(d/20)]|0;l=o,o=a,a=t._S(30,i),i=s,s=_}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 Un={};Un.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 d=a[i-1];(i%s===0||s===8&&i%s===4)&&(d=e[d>>>24]<<24^e[d>>16&255]<<16^e[d>>8&255]<<8^e[d&255],i%s===0&&(d=d<<8^d>>>24^l<<24,l=l<<1^(l>>7)*283)),a[i]=a[i-s]^d}for(let d=0;i;d++,i--){const _=a[d&3?i:i-4];i<=4||d<4?o[d]=_:o[d]=r[0][e[_>>>24]]^r[1][e[_>>16&255]]^r[2][e[_>>8&255]]^r[3][e[_&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,d;for(let _=0;_<256;_++)i[(s[_]=_<<1^(_>>7)*283)^_]=_;for(let _=a=0;!e[_];_^=o||1,a=i[a]||1){let h=a^a<<1^a<<2^a<<3^a<<4;h=h>>8^h&255^99,e[_]=h,r[h]=_,d=s[l=s[o=s[_]]];let p=d*16843009^l*65537^o*257^_*16843008,g=s[h]*257^h*16843008;for(let x=0;x<4;x++)n[x][_]=g=g<<24^g>>>8,t[x][h]=p=p<<24^p>>>8}for(let _=0;_<5;_++)n[_]=n[_].slice(0),t[_]=t[_].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],d=i[3],_=i[4];let h=n[0]^e[0],p=n[t?3:1]^e[1],g=n[2]^e[2],x=n[t?1:3]^e[3],f=4,c,u,m;for(let w=0;w<r;w++)c=a[h>>>24]^o[p>>16&255]^l[g>>8&255]^d[x&255]^e[f],u=a[p>>>24]^o[g>>16&255]^l[x>>8&255]^d[h&255]^e[f+1],m=a[g>>>24]^o[x>>16&255]^l[h>>8&255]^d[p&255]^e[f+2],x=a[x>>>24]^o[h>>16&255]^l[p>>8&255]^d[g&255]^e[f+3],f+=4,h=c,p=u,g=m;for(let w=0;w<4;w++)s[t?3&-w:w]=_[h>>>24]<<24^_[p>>16&255]<<16^_[g>>8&255]<<8^_[x&255]^e[f++],c=h,h=p,p=g,g=x,x=c;return s}};const Ws={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}},Fn={};Fn.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=Y.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 Y.clamp(t,s)}};const _e={importKey(n){return new _e.hmacSha1(Me.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,d;const _=new ArrayBuffer(s),h=new DataView(_);let p=0;const g=Y;for(t=Me.bytes.toBits(t),d=1;p<(s||1);d++){for(i=a=n.encrypt(g.concat(t,[d])),o=1;o<e;o++)for(a=n.encrypt(a),l=0;l<a.length;l++)i[l]^=a[l];for(o=0;p<(s||1)&&o<i.length;o++)h.setInt32(p,i[o]),p+=4}return _.slice(0,r/8)}};_e.hmacSha1=class{constructor(n){const t=this,e=t._hash=Ln.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 Bs=typeof crypto<"u"&&typeof crypto.getRandomValues=="function",dt="Invalid password",_t="Invalid signature",ht="zipjs-abort-check-password";function Mn(n){return Bs?crypto.getRandomValues(n):Ws.getRandomValues(n)}const me=16,js="raw",vn={name:"PBKDF2"},qs={name:"HMAC"},Gs="SHA-1",Ys=Object.assign({hash:qs},vn),tt=Object.assign({iterations:1e3,hash:{name:Gs}},vn),Vs=["deriveBits"],Te=[8,12,16],xe=[16,24,32],se=10,Zs=[0,0,0,0],Hn="undefined",Wn="function",We=typeof crypto!=Hn,Ce=We&&crypto.subtle,Bn=We&&typeof Ce!=Hn,J=Me.bytes,Ks=Un.aes,Xs=Fn.ctrGladman,$s=_e.hmacSha1;let sn=We&&Bn&&typeof Ce.importKey==Wn,an=We&&Bn&&typeof Ce.deriveBits==Wn;class Js extends TransformStream{constructor({password:t,signed:e,encryptionStrength:r,checkPasswordOnly:s}){super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:t,signed:e,strength:r-1,pending:new Uint8Array})},async transform(i,a){const o=this,{password:l,strength:d,resolveReady:_,ready:h}=o;l?(await zs(o,d,l,X(i,0,Te[d]+2)),i=X(i,Te[d]+2),s?a.error(new Error(ht)):_()):await h;const p=new Uint8Array(i.length-se-(i.length-se)%me);a.enqueue(jn(o,i,p,0,se,!0))},async flush(i){const{signed:a,ctr:o,hmac:l,pending:d,ready:_}=this;if(l&&o){await _;const h=X(d,0,d.length-se),p=X(d,d.length-se);let g=new Uint8Array;if(h.length){const x=Ae(J,h);l.update(x);const f=o.update(x);g=Se(J,f)}if(a){const x=X(Se(J,l.digest()),0,se);for(let f=0;f<se;f++)if(x[f]!=p[f])throw new Error(_t)}i.enqueue(g)}}})}}class Qs extends TransformStream{constructor({password:t,encryptionStrength:e}){let r;super({start(){Object.assign(this,{ready:new Promise(s=>this.resolveReady=s),password:t,strength:e-1,pending:new Uint8Array})},async transform(s,i){const a=this,{password:o,strength:l,resolveReady:d,ready:_}=a;let h=new Uint8Array;o?(h=await ei(a,l,o),d()):await _;const p=new Uint8Array(h.length+s.length-s.length%me);p.set(h,0),i.enqueue(jn(a,s,p,h.length,0))},async flush(s){const{ctr:i,hmac:a,pending:o,ready:l}=this;if(a&&i){await l;let d=new Uint8Array;if(o.length){const _=i.update(Ae(J,o));a.update(_),d=Se(J,_)}r.signature=Se(J,a.digest()).slice(0,se),s.enqueue(pt(d,r.signature))}}}),r=this}}function jn(n,t,e,r,s,i){const{ctr:a,hmac:o,pending:l}=n,d=t.length-s;l.length&&(t=pt(l,t),e=ri(e,d-d%me));let _;for(_=0;_<=d-me;_+=me){const h=Ae(J,X(t,_,_+me));i&&o.update(h);const p=a.update(h);i||o.update(p),e.set(Se(J,p),_+r)}return n.pending=X(t,_),e}async function zs(n,t,e,r){const s=await qn(n,t,e,X(r,0,Te[t])),i=X(r,Te[t]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(dt)}async function ei(n,t,e){const r=Mn(new Uint8Array(Te[t])),s=await qn(n,t,e,r);return pt(r,s)}async function qn(n,t,e,r){n.password=null;const s=Hs(e),i=await ti(js,s,Ys,!1,Vs),a=await ni(Object.assign({salt:r},tt),i,8*(xe[t]*2+2)),o=new Uint8Array(a),l=Ae(J,X(o,0,xe[t])),d=Ae(J,X(o,xe[t],xe[t]*2)),_=X(o,xe[t]*2);return Object.assign(n,{keys:{key:l,authentication:d,passwordVerification:_},ctr:new Xs(new Ks(l),Array.from(Zs)),hmac:new $s(d)}),_}async function ti(n,t,e,r,s){if(sn)try{return await Ce.importKey(n,t,e,r,s)}catch{return sn=!1,_e.importKey(t)}else return _e.importKey(t)}async function ni(n,t,e){if(an)try{return await Ce.deriveBits(n,t,e)}catch{return an=!1,_e.pbkdf2(t,n.salt,tt.iterations,e)}else return _e.pbkdf2(t,n.salt,tt.iterations,e)}function pt(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 ri(n,t){if(t&&t>n.length){const e=n;n=new Uint8Array(t),n.set(e,0)}return n}function X(n,t,e){return n.subarray(t,e)}function Se(n,t){return n.fromBits(t)}function Ae(n,t){return n.toBits(t)}const we=12;class si extends TransformStream{constructor({password:t,passwordVerification:e,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),Gn(this,t)},transform(s,i){const a=this;if(a.password){const o=on(a,s.subarray(0,we));if(a.password=null,o[we-1]!=a.passwordVerification)throw new Error(dt);s=s.subarray(we)}r?i.error(new Error(ht)):i.enqueue(on(a,s))}})}}class ii extends TransformStream{constructor({password:t,passwordVerification:e}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),Gn(this,t)},transform(r,s){const i=this;let a,o;if(i.password){i.password=null;const l=Mn(new Uint8Array(we));l[we-1]=i.passwordVerification,a=new Uint8Array(r.length+l.length),a.set(cn(i,l),0),o=we}else a=new Uint8Array(r.length),o=0;a.set(cn(i,r),o),s.enqueue(a)}})}}function on(n,t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=Yn(n)^t[r],mt(n,e[r]);return e}function cn(n,t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=Yn(n)^t[r],mt(n,t[r]);return e}function Gn(n,t){const e=[305419896,591751049,878082192];Object.assign(n,{keys:e,crcKey0:new Fe(e[0]),crcKey2:new Fe(e[2])});for(let r=0;r<t.length;r++)mt(n,t.charCodeAt(r))}function mt(n,t){let[e,r,s]=n.keys;n.crcKey0.append([t]),e=~n.crcKey0.get(),r=ln(Math.imul(ln(r+Vn(e)),134775813)+1),n.crcKey2.append([r>>>24]),s=~n.crcKey2.get(),n.keys=[e,r,s]}function Yn(n){const t=n.keys[2]|2;return Vn(Math.imul(t,t^1)>>>8)}function Vn(n){return n&255}function ln(n){return n&4294967295}const fn="deflate-raw";class ai extends TransformStream{constructor(t,{chunkSize:e,CompressionStream:r,CompressionStreamNative:s}){super({});const{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:l,signed:d,level:_}=t,h=this;let p,g,x=Zn(super.readable);(!a||l)&&d&&(p=new Pn,x=Q(x,p)),i&&(x=Xn(x,o,{level:_,chunkSize:e},s,r)),a&&(l?x=Q(x,new ii(t)):(g=new Qs(t),x=Q(x,g))),Kn(h,x,()=>{let f;a&&!l&&(f=g.signature),(!a||l)&&d&&(f=new DataView(p.value.buffer).getUint32(0)),h.signature=f})}}class oi extends TransformStream{constructor(t,{chunkSize:e,DecompressionStream:r,DecompressionStreamNative:s}){super({});const{zipCrypto:i,encrypted:a,signed:o,signature:l,compressed:d,useCompressionStream:_}=t;let h,p,g=Zn(super.readable);a&&(i?g=Q(g,new si(t)):(p=new Js(t),g=Q(g,p))),d&&(g=Xn(g,_,{chunkSize:e},s,r)),(!a||i)&&o&&(h=new Pn,g=Q(g,h)),Kn(this,g,()=>{if((!a||i)&&o){const x=new DataView(h.value.buffer);if(l!=x.getUint32(0,!1))throw new Error(_t)}})}}function Zn(n){return Q(n,new TransformStream({transform(t,e){t&&t.length&&e.enqueue(t)}}))}function Kn(n,t,e){t=Q(t,new TransformStream({flush:e})),Object.defineProperty(n,"readable",{get(){return t}})}function Xn(n,t,e,r,s){try{const i=t&&r?r:s;n=Q(n,new i(fn,e))}catch(i){if(t)n=Q(n,new s(fn,e));else throw i}return n}function Q(n,t){return n.pipeThrough(t)}const ci="message",li="start",fi="pull",un="data",ui="ack",di="close",_i="deflate",$n="inflate";class hi extends TransformStream{constructor(t,e){super({});const r=this,{codecType:s}=t;let i;s.startsWith(_i)?i=ai:s.startsWith($n)&&(i=oi);let a=0;const o=new i(t,e),l=super.readable,d=new TransformStream({transform(_,h){_&&_.length&&(a+=_.length,h.enqueue(_))},flush(){const{signature:_}=o;Object.assign(r,{signature:_,size:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(o).pipeThrough(d)}})}}const pi=typeof Worker!=Ue;class Ke{constructor(t,{readable:e,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:d},_){const{signal:h}=a;return Object.assign(t,{busy:!0,readable:e.pipeThrough(new mi(e,a,i),{signal:h}),writable:r,options:Object.assign({},s),scripts:d,transferStreams:l,terminate(){const{worker:p,busy:g}=t;p&&!g&&(p.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,_(t)}}),(o&&pi?bi:wi)(t,i)}}class mi extends TransformStream{constructor(t,{onstart:e,onprogress:r,size:s,onend:i},{chunkSize:a}){let o=0;super({start(){e&&Xe(e,s)},async transform(l,d){o+=l.length,r&&await Xe(r,o,s),d.enqueue(l)},flush(){t.size=o,i&&Xe(i,o)}},{highWaterMark:1,size:()=>a})}}async function Xe(n,...t){try{await n(...t)}catch{}}function wi(n,t){return{run:()=>gi(n,t)}}function bi(n,{baseURL:t,chunkSize:e}){return n.interface||Object.assign(n,{worker:Ei(n.scripts[0],t,n),interface:{run:()=>yi(n,{chunkSize:e})}}),n.interface}async function gi({options:n,readable:t,writable:e,onTaskFinished:r},s){const i=new hi(n,s);try{await t.pipeThrough(i).pipeTo(e,{preventClose:!0,preventAbort:!0});const{signature:a,size:o}=i;return{signature:a,size:o}}finally{r()}}async function yi(n,t){let e,r;const s=new Promise((p,g)=>{e=p,r=g});Object.assign(n,{reader:null,writer:null,resolveResult:e,rejectResult:r,result:s});const{readable:i,options:a,scripts:o}=n,{writable:l,closed:d}=xi(n.writable);nt({type:li,scripts:o.slice(1),options:a,config:t,readable:i,writable:l},n)||Object.assign(n,{reader:i.getReader(),writer:l.getWriter()});const h=await s;try{await l.getWriter().close()}catch{}return await d,h}function xi(n){const t=n.getWriter();let e;const r=new Promise(i=>e=i);return{writable:new WritableStream({async write(i){await t.ready,await t.write(i)},close(){t.releaseLock(),e()},abort(i){return t.abort(i)}}),closed:r}}let dn=!0,_n=!0;function Ei(n,t,e){const r={type:"module"};let s,i;typeof n==On&&(n=n());try{s=new URL(n,t)}catch{s=n}if(dn)try{i=new Worker(s)}catch{dn=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(ci,a=>Ti(a,e)),i}function nt(n,{worker:t,writer:e,onTaskFinished:r,transferStreams:s}){try{let{value:i,readable:a,writable:o}=n;const 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&&_n?(a&&l.push(a),o&&l.push(o)):n.readable=n.writable=null,l.length)try{return t.postMessage(n,l),!0}catch{_n=!1,n.readable=n.writable=null,t.postMessage(n)}else t.postMessage(n)}catch(i){throw e&&e.releaseLock(),r(),i}}async function Ti({data:n},t){const{type:e,value:r,messageId:s,result:i,error:a}=n,{reader:o,writer:l,resolveResult:d,rejectResult:_,onTaskFinished:h}=t;try{if(a){const{message:g,stack:x,code:f,name:c}=a,u=new Error(g);Object.assign(u,{stack:x,code:f,name:c}),p(u)}else{if(e==fi){const{value:g,done:x}=await o.read();nt({type:un,value:g,done:x,messageId:s},t)}e==un&&(await l.ready,await l.write(new Uint8Array(r)),nt({type:ui,messageId:s},t)),e==di&&p(null,i)}}catch(g){p(g)}function p(g,x){g?_(g):d(x),l&&l.releaseLock(),h()}}let ie=[];const $e=[];let hn=0;async function Si(n,t){const{options:e,config:r}=t,{transferStreams:s,useWebWorkers:i,useCompressionStream:a,codecType:o,compressed:l,signed:d,encrypted:_}=e,{workerScripts:h,maxWorkers:p,terminateWorkerTimeout:g}=r;t.transferStreams=s||s===$;const x=!l&&!d&&!_&&!t.transferStreams;t.useWebWorkers=!x&&(i||i===$&&r.useWebWorkers),t.scripts=t.useWebWorkers&&h?h[o]:[],e.useCompressionStream=a||a===$&&r.useCompressionStream;let f;const c=ie.find(m=>!m.busy);if(c)rt(c),f=new Ke(c,n,t,u);else if(ie.length<p){const m={indexWorker:hn};hn++,ie.push(m),f=new Ke(m,n,t,u)}else f=await new Promise(m=>$e.push({resolve:m,stream:n,workerOptions:t}));return f.run();function u(m){if($e.length){const[{resolve:w,stream:y,workerOptions:C}]=$e.splice(0,1);w(new Ke(m,y,C,u))}else m.worker?(rt(m),Number.isFinite(g)&&g>=0&&(m.terminateTimeout=setTimeout(()=>{ie=ie.filter(w=>w!=m),m.terminate()},g))):ie=ie.filter(w=>w!=m)}}function rt(n){const{terminateTimeout:t}=n;t&&(clearTimeout(t),n.terminateTimeout=null)}function Ai(){ie.forEach(n=>{rt(n),n.terminate()})}const Jn="HTTP error ",Oe="HTTP Range not supported",Qn="Writer iterator completed too soon",Ri="text/plain",Ci="Content-Length",Oi="Content-Range",ki="Accept-Ranges",Di="Range",Ii="Content-Type",Ni="HEAD",wt="GET",zn="bytes",Pi=64*1024,bt="writable";class Be{constructor(){this.size=0}init(){this.initialized=!0}}class ce extends Be{get readable(){const t=this,{chunkSize:e=Pi}=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 gt extends Be{constructor(){super();const t=this,e=new WritableStream({write(r){return t.writeUint8Array(r)}});Object.defineProperty(t,bt,{get(){return e}})}writeUint8Array(){}}class Li extends ce{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 d=l;d<l+e;d++)i[d-l]=o.charCodeAt(d);return i}}class Ui extends gt{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 yt extends ce{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 er extends Be{constructor(t){super();const e=this,r=new TransformStream,s=[];t&&s.push([Ii,t]),Object.defineProperty(e,bt,{get(){return r.writable}}),e.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class Fi extends yt{constructor(t){super(new Blob([t],{type:Ri}))}}class Mi extends er{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 vi extends ce{constructor(t,e){super(),tr(this,t,e)}async init(){await nr(this,st,pn),super.init()}readUint8Array(t,e){return rr(this,t,e,st,pn)}}class Hi extends ce{constructor(t,e){super(),tr(this,t,e)}async init(){await nr(this,it,mn),super.init()}readUint8Array(t,e){return rr(this,t,e,it,mn)}}function tr(n,t,e){const{preventHeadRequest:r,useRangeHeader:s,forceRangeRequests:i}=e;e=Object.assign({},e),delete e.preventHeadRequest,delete e.useRangeHeader,delete e.forceRangeRequests,delete e.useXHR,Object.assign(n,{url:t,options:e,preventHeadRequest:r,useRangeHeader:s,forceRangeRequests:i})}async function nr(n,t,e){const{url:r,useRangeHeader:s,forceRangeRequests:i}=n;if(qi(r)&&(s||i)){const{headers:a}=await t(wt,n,sr(n));if(!i&&a.get(ki)!=zn)throw new Error(Oe);{let o;const l=a.get(Oi);if(l){const d=l.trim().split(/\s*\/\s*/);if(d.length){const _=d[1];_&&_!="*"&&(o=Number(_))}}o===$?await wn(n,t,e):n.size=o}}else await wn(n,t,e)}async function rr(n,t,e,r,s){const{useRangeHeader:i,forceRangeRequests:a,options:o}=n;if(i||a){const l=await r(wt,n,sr(n,t,e));if(l.status!=206)throw new Error(Oe);return new Uint8Array(await l.arrayBuffer())}else{const{data:l}=n;return l||await s(n,o),new Uint8Array(n.data.subarray(t,t+e))}}function sr(n,t=0,e=1){return Object.assign({},xt(n),{[Di]:zn+"="+t+"-"+(t+e-1)})}function xt({options:n}){const{headers:t}=n;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function pn(n){await ir(n,st)}async function mn(n){await ir(n,it)}async function ir(n,t){const e=await t(wt,n,xt(n));n.data=new Uint8Array(await e.arrayBuffer()),n.size||(n.size=n.data.length)}async function wn(n,t,e){if(n.preventHeadRequest)await e(n,n.options);else{const s=(await t(Ni,n,xt(n))).headers.get(Ci);s?n.size=Number(s):await e(n,n.options)}}async function st(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(Oe):new Error(Jn+(s.statusText||s.status))}function it(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,d=>d.toUpperCase()),a.push(l)}),r({status:i.status,arrayBuffer:()=>i.response,headers:new Map(a)})}else s(i.status==416?new Error(Oe):new Error(Jn+(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 ar extends ce{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR?new Hi(t,e):new vi(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 Wi extends ar{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}}class Bi extends ce{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,e){return this.array.slice(t,t+e)}}class ji extends gt{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 Et extends ce{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 d=i[o],_=d.size;if(l+e<=_)a=await G(d,l,e);else{const h=_-l;a=new Uint8Array(e),a.set(await G(d,l,h)),a.set(await s.readUint8Array(t+h,e-h,r),h)}return s.lastDiskNumber=Math.max(o,s.lastDiskNumber),a}}class ve extends Be{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(_){const{availableSize:h}=r;if(a)_.length>=h?(await l(_.slice(0,h)),await d(),r.diskOffset+=s.size,r.diskNumber++,a=null,await this.write(_.slice(h))):await l(_);else{const{value:p,done:g}=await t.next();if(g&&!p)throw new Error(Qn);s=p,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await Re(s),i=p.writable,a=i.getWriter(),await this.write(_)}},async close(){await a.ready,await d()}});Object.defineProperty(r,bt,{get(){return o}});async function l(_){const h=_.length;h&&(await a.ready,await a.write(_),s.size+=h,r.size+=h,r.availableSize-=h)}async function d(){i.size=s.size,await a.close()}}}function qi(n){const{baseURL:t}=Dn(),{protocol:e}=new URL(n,t);return e=="http:"||e=="https:"}async function Re(n,t){n.init&&!n.initialized&&await n.init(t)}function or(n){return Array.isArray(n)&&(n=new Et(n)),n instanceof ReadableStream&&(n={readable:n}),n}function cr(n){n.writable===$&&typeof n.next==On&&(n=new ve(n)),n instanceof WritableStream&&(n={writable:n});const{writable:t}=n;return t.size===$&&(t.size=0),n instanceof ve||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 Gi=Et,Yi=ve,lr="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Vi=lr.length==256;function Zi(n){if(Vi){let t="";for(let e=0;e<n.length;e++)t+=lr[n[e]];return t}else return new TextDecoder().decode(n)}function at(n,t){return t&&t.trim().toLowerCase()=="cp437"?Zi(n):new TextDecoder(t).decode(n)}const fr="filename",ur="rawFilename",dr="comment",_r="rawComment",hr="uncompressedSize",pr="compressedSize",mr="offset",ot="diskNumberStart",ct="lastModDate",lt="rawLastModDate",wr="lastAccessDate",Ki="rawLastAccessDate",br="creationDate",Xi="rawCreationDate",$i="internalFileAttribute",Ji="externalFileAttribute",Qi="msDosCompatible",zi="zip64",ea=[fr,ur,pr,hr,ct,lt,dr,_r,wr,br,mr,ot,ot,$i,Ji,Qi,zi,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class bn{constructor(t){ea.forEach(e=>this[e]=t[e])}}const Pe="File format is not recognized",gr="End of central directory not found",yr="End of Zip64 central directory not found",xr="End of Zip64 central directory locator not found",Er="Central directory header not found",Tr="Local file header not found",Sr="Zip64 extra field not found",Ar="File contains encrypted entry",Rr="Encryption method not supported",ft="Compression method not supported",ut="Split zip file",gn="utf-8",yn="cp437",ta=[[hr,de],[pr,de],[mr,de],[ot,ae]],na={[ae]:{getValue:B,bytes:4},[de]:{getValue:Le,bytes:8}};class ra{constructor(t,e={}){Object.assign(this,{reader:or(t),options:e,config:Dn()})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;const{config:s}=e;if(await Re(r),(r.size===$||!r.readUint8Array)&&(r=new yt(await new Response(r.readable).blob()),await Re(r)),r.size<pe)throw new Error(Pe);r.chunkSize=Ms(s);const i=await la(r,Ts,r.size,pe,ae*16);if(!i){const T=await G(r,0,4),S=q(T);throw B(S)==Es?new Error(ut):new Error(gr)}const a=q(i);let o=B(a,12),l=B(a,16);const d=i.offset,_=j(a,20),h=d+pe+_;let p=j(a,4);const g=r.lastDiskNumber||0;let x=j(a,6),f=j(a,8),c=0,u=0;if(l==de||o==de||f==ae||x==ae){const T=await G(r,i.offset-Ve,Ve),S=q(T);if(B(S,0)!=Ss)throw new Error(yr);l=Le(S,8);let D=await G(r,l,Ze,-1),O=q(D);const P=i.offset-Ve-Ze;if(B(O,0)!=Qt&&l!=P){const N=l;l=P,c=l-N,D=await G(r,l,Ze,-1),O=q(D)}if(B(O,0)!=Qt)throw new Error(xr);p==ae&&(p=B(O,16)),x==ae&&(x=B(O,20)),f==ae&&(f=Le(O,32)),o==de&&(o=Le(O,40)),l-=o}if(l>=r.size&&(c=r.size-l-o-pe,l=r.size-o-pe),g!=p)throw new Error(ut);if(l<0)throw new Error(Pe);let m=0,w=await G(r,l,o,x),y=q(w);if(o){const T=i.offset-o;if(B(y,m)!=Jt&&l!=T){const S=l;l=T,c+=l-S,w=await G(r,l,o,x),y=q(w)}}const C=i.offset-l-(r.lastDiskOffset||0);if(o!=C&&C>=0&&(o=C,w=await G(r,l,o,x),y=q(w)),l<0||l>=r.size)throw new Error(Pe);const b=K(e,t,"filenameEncoding"),E=K(e,t,"commentEncoding");for(let T=0;T<f;T++){const S=new sa(r,s,e.options);if(B(y,m)!=Jt)throw new Error(Er);Cr(S,y,m+6);const D=!!S.bitFlag.languageEncodingFlag,O=m+46,P=O+S.filenameLength,N=P+S.extraFieldLength,k=j(y,m+4),v=(k&0)==0,F=w.subarray(O,P),ge=j(y,m+32),I=N+ge,le=w.subarray(N,I),M=D,H=D,Tt=v&&(be(y,m+38)&nn)==nn,St=B(y,m+42)+c;Object.assign(S,{versionMadeBy:k,msDosCompatible:v,compressedSize:0,uncompressedSize:0,commentLength:ge,directory:Tt,offset:St,diskNumberStart:j(y,m+34),internalFileAttribute:j(y,m+36),externalFileAttribute:B(y,m+38),rawFilename:F,filenameUTF8:M,commentUTF8:H,rawExtraField:w.subarray(P,N)});const[At,Dr]=await Promise.all([at(F,M?gn:b||yn),at(le,H?gn:E||yn)]);Object.assign(S,{rawComment:le,filename:At,comment:Dr,directory:Tt||At.endsWith(Ls)}),u=Math.max(St,u),await Or(S,S,y,m+6);const je=new bn(S);je.getData=(Ct,Ir)=>S.getData(Ct,je,Ir),m=I;const{onprogress:Rt}=t;if(Rt)try{await Rt(T+1,f,new bn(S))}catch{}yield je}const A=K(e,t,"extractPrependedData"),R=K(e,t,"extractAppendedData");return A&&(e.prependedData=u>0?await G(r,0,u):new Uint8Array),e.comment=_?await G(r,d+pe,_):new Uint8Array,R&&(e.appendedData=h<r.size?await G(r,h,r.size-h):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,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:d,config:_,bitFlag:h,signature:p,rawLastModDate:g,uncompressedSize:x,compressedSize:f}=s,c=e.localDirectory={},u=await G(i,a,30,o),m=q(u);let w=K(s,r,"password");if(w=w&&w.length&&w,l&&l.originalCompressionMethod!=ys)throw new Error(ft);if(d!=gs&&d!=bs)throw new Error(ft);if(B(m,0)!=xs)throw new Error(Tr);Cr(c,m,4),c.rawExtraField=c.extraFieldLength?await G(i,a+30+c.filenameLength,c.extraFieldLength,o):new Uint8Array,await Or(s,c,m,4,!0),Object.assign(e,{lastAccessDate:c.lastAccessDate,creationDate:c.creationDate});const y=s.encrypted&&c.encrypted,C=y&&!l;if(y){if(!C&&l.strength===$)throw new Error(Rr);if(!w)throw new Error(Ar)}const b=a+30+c.filenameLength+c.extraFieldLength,E=f,A=i.readable;Object.assign(A,{diskNumberStart:o,offset:b,size:E});const R=K(s,r,"signal"),T=K(s,r,"checkPasswordOnly");T&&(t=new WritableStream),t=cr(t),await Re(t,x);const{writable:S}=t,{onstart:D,onprogress:O,onend:P}=r,N={options:{codecType:$n,password:w,zipCrypto:C,encryptionStrength:l&&l.strength,signed:K(s,r,"checkSignature"),passwordVerification:C&&(h.dataDescriptor?g>>>8&255:p>>>24&255),signature:p,compressed:d!=0,encrypted:y,useWebWorkers:K(s,r,"useWebWorkers"),useCompressionStream:K(s,r,"useCompressionStream"),transferStreams:K(s,r,"transferStreams"),checkPasswordOnly:T},config:_,streamOptions:{signal:R,size:E,onstart:D,onprogress:O,onend:P}};let k=0;try{({outputSize:k}=await Si({readable:A,writable:S},N))}catch(v){if(!T||v.message!=ht)throw v}finally{const v=K(s,r,"preventClose");S.size+=k,!v&&!S.locked&&await S.getWriter().close()}return T?void 0:t.getData?t.getData():S}}function Cr(n,t,e){const r=n.rawBitFlag=j(t,e+2),s=(r&zt)==zt,i=B(t,e+6);Object.assign(n,{encrypted:s,version:j(t,e),bitFlag:{level:(r&Ps)>>1,dataDescriptor:(r&en)==en,languageEncodingFlag:(r&tn)==tn},rawLastModDate:i,lastModDate:fa(i),filenameLength:j(t,e+22),extraFieldLength:j(t,e+24)})}async function Or(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 u=j(o,l),m=j(o,l+2);a.set(u,{type:u,data:i.slice(l+4,l+4+m)}),l+=4+m}}catch{}const d=j(e,r+4);Object.assign(t,{signature:B(e,r+10),uncompressedSize:B(e,r+18),compressedSize:B(e,r+14)});const _=a.get(As);_&&(ia(_,t),t.extraFieldZip64=_);const h=a.get(Ds);h&&(await xn(h,fr,ur,t,n),t.extraFieldUnicodePath=h);const p=a.get(Is);p&&(await xn(p,dr,_r,t,n),t.extraFieldUnicodeComment=p);const g=a.get(Rs);g?(aa(g,t,d),t.extraFieldAES=g):t.compressionMethod=d;const x=a.get(Cs);x&&(oa(x,t),t.extraFieldNTFS=x);const f=a.get(ks);f&&(ca(f,t,s),t.extraFieldExtendedTimestamp=f);const c=a.get(Ns);c&&(t.extraFieldUSDZ=c)}function ia(n,t){t.zip64=!0;const e=q(n.data),r=ta.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=na[o];t[a]=n[a]=l.getValue(e,i),i+=l.bytes}else if(n[a])throw new Error(Sr)}}async function xn(n,t,e,r,s){const i=q(n.data),a=new Fe;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:be(i,0),[t]:at(n.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&l==B(o,0)}),n.valid&&(r[t]=n[t],r[t+"UTF8"]=!0)}function aa(n,t,e){const r=q(n.data),s=be(r,4);Object.assign(n,{vendorVersion:be(r,0),vendorId:be(r,2),strength:s,originalCompressionMethod:e,compressionMethod:j(r,5)}),t.compressionMethod=n.compressionMethod}function oa(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==Os&&(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 d=Je(a),_=Je(o),h=Je(l),p={lastModDate:d,lastAccessDate:_,creationDate:h};Object.assign(n,p),Object.assign(t,p)}}catch{}}function ca(n,t,e){const r=q(n.data),s=be(r,0),i=[],a=[];e?((s&1)==1&&(i.push(ct),a.push(lt)),(s&2)==2&&(i.push(wr),a.push(Ki)),(s&4)==4&&(i.push(br),a.push(Xi))):n.data.length>=5&&(i.push(ct),a.push(lt));let o=1;i.forEach((l,d)=>{if(n.data.length>=o+4){const _=B(r,o);t[l]=n[l]=new Date(_*1e3);const h=a[d];n[h]=_}o+=4})}async function la(n,t,e,r,s){const i=new Uint8Array(4),a=q(i);ua(a,0,t);const o=r+s;return await l(r)||await l(Math.min(o,e));async function l(d){const _=e-d,h=await G(n,_,d);for(let p=h.length-r;p>=0;p--)if(h[p]==i[0]&&h[p+1]==i[1]&&h[p+2]==i[2]&&h[p+3]==i[3])return{offset:_+p,buffer:h.slice(p,p+r).buffer}}}function K(n,t,e){return t[e]===$?n.options[e]:t[e]}function fa(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 Je(n){return new Date(Number(n/BigInt(1e4)-BigInt(116444736e5)))}function be(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 Le(n,t){return Number(n.getBigUint64(t,!0))}function ua(n,t,e){n.setUint32(t,e,!0)}function q(n){return new DataView(n.buffer)}In({Inflate:ws});const da=Object.freeze(Object.defineProperty({__proto__:null,BlobReader:yt,BlobWriter:er,Data64URIReader:Li,Data64URIWriter:Ui,ERR_BAD_FORMAT:Pe,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Er,ERR_ENCRYPTED:Ar,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:xr,ERR_EOCDR_NOT_FOUND:gr,ERR_EOCDR_ZIP64_NOT_FOUND:yr,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Sr,ERR_HTTP_RANGE:Oe,ERR_INVALID_PASSWORD:dt,ERR_INVALID_SIGNATURE:_t,ERR_ITERATOR_COMPLETED_TOO_SOON:Qn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Tr,ERR_SPLIT_ZIP_FILE:ut,ERR_UNSUPPORTED_COMPRESSION:ft,ERR_UNSUPPORTED_ENCRYPTION:Rr,HttpRangeReader:Wi,HttpReader:ar,Reader:ce,SplitDataReader:Et,SplitDataWriter:ve,SplitZipReader:Gi,SplitZipWriter:Yi,TextReader:Fi,TextWriter:Mi,Uint8ArrayReader:Bi,Uint8ArrayWriter:ji,Writer:gt,ZipReader:ra,configure:In,getMimeType:vs,initReader:or,initStream:Re,initWriter:cr,readUint8Array:G,terminateWorkers:Ai},Symbol.toStringTag,{value:"Module"})),Ee=da;class _a{constructor(t,e){L(this,"_zipReader");L(this,"_entriesPromise");L(this,"_traceURL");this._traceURL=t,Ee.configure({baseURL:self.location.href}),this._zipReader=new Ee.ZipReader(new Ee.HttpReader(pa(t),{mode:"cors",preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:e}).then(r=>{const s=new Map;for(const i of r)s.set(i.filename,i);return s})}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 Ee.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 Ee.BlobWriter;return await r.getData(s),s.getData()}}class ha{constructor(t){L(this,"_entriesPromise");L(this,"_traceURL");this._traceURL=t,this._entriesPromise=fetch("/trace/file?path="+encodeURIComponent(t)).then(async e=>{const r=JSON.parse(await e.text()),s=new Map;for(const i of r.entries)s.set(i.name,i.path);return s})}isLive(){return!0}traceURL(){return this._traceURL}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 fetch("/trace/file?path="+encodeURIComponent(r))}}function pa(n){let t=n.startsWith("http")||n.startsWith("blob")?n:`file?path=${encodeURIComponent(n)}`;return t.startsWith("https://www.dropbox.com/")&&(t="https://dl.dropboxusercontent.com/"+t.substring(24)),t}self.addEventListener("install",function(n){self.skipWaiting()});self.addEventListener("activate",function(n){n.waitUntil(self.clients.claim())});const ma=new URL(self.registration.scope).pathname,ue=new Map,He=new Map;async function wa(n,t,e,r,s){var l;await kr();let i=He.get(e);i||(i={limit:r,traceUrls:new Set},He.set(e,i)),i.traceUrls.add(n);const a=new $r;try{const[d,_]=Lr(s,[.5,.4,.1]),h=n.endsWith("json")?new ha(n):new _a(n,d);await a.load(h,_)}catch(d){throw console.error(d),(l=d==null?void 0:d.message)!=null&&l.includes("Cannot find .trace file")&&await a.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."):d instanceof An?new Error(`Could not load trace from ${t||n}. ${d.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 o=new Gr(a.storage(),d=>a.resourceForSha1(d));return ue.set(n,{traceModel:a,snapshotServer:o}),a}async function ba(n){if(n.request.url.startsWith("chrome-extension://"))return fetch(n.request);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 l=new URL(ze(t.url)),d=l.pathname.substring(ma.length-1);if(d==="/ping")return await kr(),new Response(null,{status:200});const _=l.searchParams.get("trace");if(d==="/contexts")try{const h=l.searchParams.has("limit")?+l.searchParams.get("limit"):void 0,p=await wa(_,l.searchParams.get("traceFileName"),n.clientId,h,(g,x)=>{e.postMessage({method:"progress",params:{done:g,total:x}})});return new Response(JSON.stringify(p.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(d.startsWith("/snapshotInfo/")){const{snapshotServer:h}=ue.get(_)||{};return h?h.serveSnapshotInfo(d,l.searchParams):new Response(null,{status:404})}if(d.startsWith("/snapshot/")){const{snapshotServer:h}=ue.get(_)||{};if(!h)return new Response(null,{status:404});const p=h.serveSnapshot(d,l.searchParams,l.href);return r&&p.headers.set("Content-Security-Policy","upgrade-insecure-requests"),p}if(d.startsWith("/sha1/")){const h=d.slice(6);for(const p of ue.values()){const g=await p.traceModel.resourceForSha1(h);if(g)return new Response(g,{status:200,headers:ga(l.searchParams)})}return new Response(null,{status:404})}return fetch(n.request)}const s=ze(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 ga(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 kr(){const n=await self.clients.matchAll(),t=new Set;for(const[e,r]of He){if(!n.find(s=>s.id===e)){He.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(ba(n))});
@@ -0,0 +1,5 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/xtermModule-BeNbaIVa.js","./xtermModule.DSXBckUd.css"])))=>i.map(i=>d[i]);
2
+ import{u as Me,r as V,b as De,_ as Le,d as Fe,e as Oe,j as o,R as h,s as me,f as re,m as We,g as $,T as M,M as Ue,h as Ae,i as ze,S as Ve,a as Ke,c as He}from"./assets/inspectorTab-BHcfR9dD.js";import{T as $e,W as qe}from"./assets/testServerConnection-DeE2kSzz.js";import{E as Ye,t as Qe,T as Xe,W as Ge}from"./assets/workbench-DZqNXdoV.js";var Je={};class se{constructor(e,t={}){this.isListing=!1,this._tests=new Map,this._rootSuite=new q("","root"),this._options=t,this._reporter=e}reset(){this._rootSuite._entries=[],this._tests.clear()}dispatch(e){const{method:t,params:s}=e;if(t==="onConfigure"){this._onConfigure(s.config);return}if(t==="onProject"){this._onProject(s.project);return}if(t==="onBegin"){this._onBegin();return}if(t==="onTestBegin"){this._onTestBegin(s.testId,s.result);return}if(t==="onTestEnd"){this._onTestEnd(s.test,s.result);return}if(t==="onStepBegin"){this._onStepBegin(s.testId,s.resultId,s.step);return}if(t==="onStepEnd"){this._onStepEnd(s.testId,s.resultId,s.step);return}if(t==="onError"){this._onError(s.error);return}if(t==="onStdIO"){this._onStdIO(s.type,s.testId,s.resultId,s.data,s.isBase64);return}if(t==="onEnd")return this._onEnd(s.result);if(t==="onExit")return this._onExit()}_onConfigure(e){var t,s;this._rootDir=e.rootDir,this._config=this._parseConfig(e),(s=(t=this._reporter).onConfigure)==null||s.call(t,this._config)}_onProject(e){let t=this._options.mergeProjects?this._rootSuite.suites.find(s=>s.project().name===e.name):void 0;t||(t=new q(e.name,"project"),this._rootSuite._addSuite(t)),t._project=this._parseProject(e);for(const s of e.suites)this._mergeSuiteInto(s,t)}_onBegin(){var e,t;(t=(e=this._reporter).onBegin)==null||t.call(e,this._rootSuite)}_onTestBegin(e,t){var c,a;const s=this._tests.get(e);this._options.clearPreviousResultsWhenTestBegins&&(s.results=[]);const r=s._createTestResult(t.id);r.retry=t.retry,r.workerIndex=t.workerIndex,r.parallelIndex=t.parallelIndex,r.setStartTimeNumber(t.startTime),(a=(c=this._reporter).onTestBegin)==null||a.call(c,s,r)}_onTestEnd(e,t){var c,a,m;const s=this._tests.get(e.testId);s.timeout=e.timeout,s.expectedStatus=e.expectedStatus,s.annotations=e.annotations;const r=s.results.find(l=>l._id===t.id);r.duration=t.duration,r.status=t.status,r.errors=t.errors,r.error=(c=r.errors)==null?void 0:c[0],r.attachments=this._parseAttachments(t.attachments),(m=(a=this._reporter).onTestEnd)==null||m.call(a,s,r),r._stepMap=new Map}_onStepBegin(e,t,s){var _,n;const r=this._tests.get(e),c=r.results.find(f=>f._id===t),a=s.parentStepId?c._stepMap.get(s.parentStepId):void 0,m=this._absoluteLocation(s.location),l=new et(s,a,m);a?a.steps.push(l):c.steps.push(l),c._stepMap.set(s.id,l),(n=(_=this._reporter).onStepBegin)==null||n.call(_,r,c,l)}_onStepEnd(e,t,s){var m,l;const r=this._tests.get(e),c=r.results.find(_=>_._id===t),a=c._stepMap.get(s.id);a.duration=s.duration,a.error=s.error,(l=(m=this._reporter).onStepEnd)==null||l.call(m,r,c,a)}_onError(e){var t,s;(s=(t=this._reporter).onError)==null||s.call(t,e)}_onStdIO(e,t,s,r,c){var _,n,f,S;const a=c?globalThis.Buffer?Buffer.from(r,"base64"):atob(r):r,m=t?this._tests.get(t):void 0,l=m&&s?m.results.find(d=>d._id===s):void 0;e==="stdout"?(l==null||l.stdout.push(a),(n=(_=this._reporter).onStdOut)==null||n.call(_,a,m,l)):(l==null||l.stderr.push(a),(S=(f=this._reporter).onStdErr)==null||S.call(f,a,m,l))}async _onEnd(e){var t,s;await((s=(t=this._reporter).onEnd)==null?void 0:s.call(t,{status:e.status,startTime:new Date(e.startTime),duration:e.duration}))}_onExit(){var e,t;return(t=(e=this._reporter).onExit)==null?void 0:t.call(e)}_parseConfig(e){const t={...st,...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:Z(e.testIgnore),testMatch:Z(e.testMatch),timeout:e.timeout,grep:Z(e.grep),grepInvert:Z(e.grepInvert),dependencies:e.dependencies,teardown:e.teardown,snapshotDir:this._absolutePath(e.snapshotDir),use:{}}}_parseAttachments(e){return e.map(t=>({...t,body:t.base64&&globalThis.Buffer?Buffer.from(t.base64,"base64"):void 0}))}_mergeSuiteInto(e,t){let s=t.suites.find(r=>r.title===e.title);s||(s=new q(e.title,t.type==="project"?"file":"describe"),t._addSuite(s)),s.location=this._absoluteLocation(e.location),e.entries.forEach(r=>{"testId"in r?this._mergeTestInto(r,s):this._mergeSuiteInto(r,s)})}_mergeTestInto(e,t){let s=this._options.mergeTestCases?t.tests.find(r=>r.title===e.title&&r.repeatEachIndex===e.repeatEachIndex):void 0;s||(s=new Ze(e.testId,e.title,this._absoluteLocation(e.location),e.repeatEachIndex),t._addTest(s),this._tests.set(s.id,s)),this._updateTest(e,s)}_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??[],t}_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}}class q{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(){const e=[],t=s=>{for(const r of s.entries())r.type==="test"?e.push(r):t(r)};return t(this),e}titlePath(){const e=this.parent?this.parent.titlePath():[];return(this.title||this._type!=="describe")&&e.push(this.title),e}project(){var e;return this._project??((e=this.parent)==null?void 0:e.project())}_addTest(e){e.parent=this,this._entries.push(e)}_addSuite(e){e.parent=this,this._entries.push(e)}}class Ze{constructor(e,t,s,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=s,this.repeatEachIndex=r}titlePath(){const e=this.parent?this.parent.titlePath():[];return e.push(this.title),e}outcome(){return it(this)}ok(){const e=this.outcome();return e==="expected"||e==="flaky"||e==="skipped"}_createTestResult(e){const t=new tt(this.results.length,e);return this.results.push(t),t}}class et{constructor(e,t,s){this.duration=-1,this.steps=[],this._startTime=0,this.title=e.title,this.category=e.category,this.location=s,this.parent=t,this._startTime=e.startTime}titlePath(){var t;return[...((t=this.parent)==null?void 0:t.titlePath())||[],this.title]}get startTime(){return new Date(this._startTime)}set startTime(e){this._startTime=+e}}class tt{constructor(e,t){this.parallelIndex=-1,this.workerIndex=-1,this.duration=-1,this.stdout=[],this.stderr=[],this.attachments=[],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}}const st={forbidOnly:!1,fullyParallel:!1,globalSetup:null,globalTeardown:null,globalTimeout:0,grep:/.*/,grepInvert:null,maxFailures:0,metadata:{},preserveOutput:"always",projects:[],reporter:[[Je.CI?"dot":"list"]],reportSlowTests:{max:5,threshold:15e3},configFile:"",rootDir:"",quiet:!1,shard:null,updateSnapshots:"missing",version:"",workers:0,webServer:null};function Z(i){return i.map(e=>e.s!==void 0?e.s:new RegExp(e.r.source,e.r.flags))}function it(i){let e=0,t=0,s=0;for(const r of i.results)r.status==="interrupted"||(r.status==="skipped"&&i.expectedStatus==="skipped"?++e:r.status==="skipped"||(r.status===i.expectedStatus?++t:++s));return t===0&&s===0?"skipped":s===0?"expected":t===0&&e===0?"unexpected":"flaky"}class ie{constructor(e,t,s,r,c){this._treeItemById=new Map,this._treeItemByTestId=new Map;const a=r&&[...r.values()].some(Boolean);this.pathSeparator=c,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);const m=(l,_,n)=>{for(const f of _.suites){const S=f.title||"<anonymous>";let d=n.children.find(p=>p.kind==="group"&&p.title===S);d||(d={kind:"group",subKind:"describe",id:"suite:"+_.titlePath().join("")+""+S,title:S,location:f.location,duration:0,parent:n,children:[],status:"none",hasLoadErrors:!1},this._addChild(n,d)),m(l,f,d)}for(const f of _.tests){const S=f.title;let d=n.children.find(E=>E.kind!=="group"&&E.title===S);d||(d={kind:"case",id:"test:"+f.titlePath().join(""),title:S,parent:n,children:[],tests:[],location:f.location,duration:0,status:"none",project:void 0,test:void 0,tags:f.tags},this._addChild(n,d));const p=f.results[0];let x="none";(p==null?void 0:p[Y])==="scheduled"?x="scheduled":(p==null?void 0:p[Y])==="running"?x="running":(p==null?void 0:p.status)==="skipped"?x="skipped":(p==null?void 0:p.status)==="interrupted"?x="none":p&&f.outcome()!=="expected"?x="failed":p&&f.outcome()==="expected"&&(x="passed"),d.tests.push(f);const R={kind:"test",id:f.id,title:l.name,location:f.location,test:f,parent:d,children:[],status:x,duration:f.results.length?Math.max(0,f.results[0].duration):0,project:l};this._addChild(d,R),this._treeItemByTestId.set(f.id,R),d.duration=d.children.reduce((E,I)=>E+I.duration,0)}};for(const l of(t==null?void 0:t.suites)||[])if(!(a&&!r.get(l.title)))for(const _ of l.suites){const n=this._fileItem(_.location.file.split(c),!0);m(l.project(),_,n)}for(const l of s){if(!l.location)continue;const _=this._fileItem(l.location.file.split(c),!0);_.hasLoadErrors=!0}}_addChild(e,t){e.children.push(t),t.parent=e,this._treeItemById.set(t.id,t)}filterTree(e,t,s){const r=e.trim().toLowerCase().split(" "),c=[...t.values()].some(Boolean),a=l=>{const _=[...l.tests[0].titlePath(),...l.tests[0].tags].join(" ").toLowerCase();return!r.every(n=>_.includes(n))&&!l.tests.some(n=>s==null?void 0:s.has(n.id))?!1:(l.children=l.children.filter(n=>!c||(s==null?void 0:s.has(n.test.id))||t.get(n.status)),l.tests=l.children.map(n=>n.test),!!l.children.length)},m=l=>{const _=[];for(const n of l.children)n.kind==="case"?a(n)&&_.push(n):(m(n),(n.children.length||n.hasLoadErrors)&&_.push(n));l.children=_};m(this.rootItem)}_fileItem(e,t){if(e.length===0)return this.rootItem;const s=e.join(this.pathSeparator),r=this._treeItemById.get(s);if(r)return r;const c=this._fileItem(e.slice(0,e.length-1),!1),a={kind:"group",subKind:t?"file":"folder",id:s,title:e[e.length-1],location:{file:s,line:0,column:0},duration:0,parent:c,children:[],status:"none",hasLoadErrors:!1};return this._addChild(c,a),a}sortAndPropagateStatus(){_e(this.rootItem)}flattenForSingleProject(){const 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}testIds(){const e=new Set,t=s=>{s.kind==="case"&&s.tests.forEach(r=>e.add(r.id)),s.children.forEach(t)};return t(this.rootItem),e}fileNames(){const e=new Set,t=s=>{s.kind==="group"&&s.subKind==="file"?e.add(s.id):s.children.forEach(t)};return t(this.rootItem),[...e]}flatTreeItems(){const e=[],t=s=>{e.push(s),s.children.forEach(t)};return t(this.rootItem),e}treeItemById(e){return this._treeItemById.get(e)}collectTestIds(e){return e?rt(e):new Set}}function _e(i){for(const a of i.children)_e(a);i.kind==="group"&&i.children.sort((a,m)=>a.location.file.localeCompare(m.location.file)||a.location.line-m.location.line);let e=i.children.length>0,t=i.children.length>0,s=!1,r=!1,c=!1;for(const a of i.children)t=t&&a.status==="skipped",e=e&&(a.status==="passed"||a.status==="skipped"),s=s||a.status==="failed",r=r||a.status==="running",c=c||a.status==="scheduled";r?i.status="running":c?i.status="scheduled":s?i.status="failed":t?i.status="skipped":e&&(i.status="passed")}function rt(i){const e=new Set,t=s=>{var r;s.kind==="case"?s.tests.map(c=>c.id).forEach(c=>e.add(c)):s.kind==="test"?e.add(s.id):(r=s.children)==null||r.forEach(t)};return t(i),e}const Y=Symbol("statusEx");class ot{constructor(e){this.loadErrors=[],this.progress={total:0,passed:0,failed:0,skipped:0},this._lastRunTestCount=0,this._receiver=new se(this._createReporter(),{mergeProjects:!0,mergeTestCases:!0,resolvePath:(t,s)=>t+e.pathSeparator+s,clearPreviousResultsWhenTestBegins:!0}),this._options=e}_createReporter(){return{version:()=>"v2",onConfigure:e=>{this.config=e,this._lastRunReceiver=new se({version:()=>"v2",onBegin:t=>{this._lastRunTestCount=t.allTests().length,this._lastRunReceiver=void 0}},{mergeProjects:!0,mergeTestCases:!1,resolvePath:(t,s)=>t+this._options.pathSeparator+s})},onBegin:e=>{var t;if(this.rootSuite||(this.rootSuite=e),this._testResultsSnapshot){for(const s of this.rootSuite.allTests())s.results=((t=this._testResultsSnapshot)==null?void 0:t.get(s.id))||s.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[Y]="running",this._options.onUpdate()},onTestEnd:(e,t)=>{e.outcome()==="skipped"?++this.progress.skipped:e.outcome()==="unexpected"?++this.progress.failed:++this.progress.passed,t[Y]=t.status,this._options.onUpdate()},onError:e=>this._handleOnError(e),printsToStdio:()=>!1}}processGlobalReport(e){const t=new se({version:()=>"v2",onConfigure:s=>{this.config=s},onError:s=>this._handleOnError(s)});for(const s of e)t.dispatch(s)}processListReport(e){var s;const t=((s=this.rootSuite)==null?void 0:s.allTests())||[];this._testResultsSnapshot=new Map(t.map(r=>[r.id,r.results])),this._receiver.reset();for(const r of e)this._receiver.dispatch(r)}processTestReportEvent(e){var t,s,r;(s=(t=this._lastRunReceiver)==null?void 0:t.dispatch(e))==null||s.catch(()=>{}),(r=this._receiver.dispatch(e))==null||r.catch(()=>{})}_handleOnError(e){var t,s;this.loadErrors.push(e),(s=(t=this._options).onError)==null||s.call(t,e),this._options.onUpdate()}asModel(){return{rootSuite:this.rootSuite||new q("","root"),config:this.config,loadErrors:this.loadErrors,progress:this.progress}}}const nt=({source:i})=>{const[e,t]=Me(),[s,r]=V.useState(De()),[c]=V.useState(Le(()=>import("./assets/xtermModule-BeNbaIVa.js"),__vite__mapDeps([0,1]),import.meta.url).then(m=>m.default)),a=V.useRef(null);return V.useEffect(()=>(Fe(r),()=>Oe(r)),[]),V.useEffect(()=>{const m=i.write,l=i.clear;return(async()=>{const{Terminal:_,FitAddon:n}=await c,f=t.current;if(!f)return;const S=s==="dark-mode"?lt:at;if(a.current&&a.current.terminal.options.theme===S)return;a.current&&(f.textContent="");const d=new _({convertEol:!0,fontSize:13,scrollback:1e4,fontFamily:"var(--vscode-editor-font-family)",theme:S}),p=new n;d.loadAddon(p);for(const x of i.pending)d.write(x);i.write=x=>{i.pending.push(x),d.write(x)},i.clear=()=>{i.pending=[],d.clear()},d.open(f),p.fit(),a.current={terminal:d,fitAddon:p}})(),()=>{i.clear=l,i.write=m}},[c,a,t,i,s]),V.useEffect(()=>{setTimeout(()=>{a.current&&(a.current.fitAddon.fit(),i.resize(a.current.terminal.cols,a.current.terminal.rows))},250)},[e,i]),o.jsx("div",{"data-testid":"output",className:"xterm-wrapper",style:{flex:"auto"},ref:t})},at={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"},lt={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"},ct=({filterText:i,setFilterText:e,statusFilters:t,setStatusFilters:s,projectFilters:r,setProjectFilters:c,testModel:a,runTests:m})=>{const[l,_]=h.useState(!1),n=h.useRef(null);h.useEffect(()=>{var d;(d=n.current)==null||d.focus()},[]);const f=[...t.entries()].filter(([d,p])=>p).map(([d])=>d).join(" ")||"all",S=[...r.entries()].filter(([d,p])=>p).map(([d])=>d).join(" ")||"all";return o.jsxs("div",{className:"filters",children:[o.jsx(Ye,{expanded:l,setExpanded:_,title:o.jsx("input",{ref:n,type:"search",placeholder:"Filter (e.g. text, @tag)",spellCheck:!1,value:i,onChange:d=>{e(d.target.value)},onKeyDown:d=>{d.key==="Enter"&&m()}})}),o.jsxs("div",{className:"filter-summary",title:"Status: "+f+`
3
+ Projects: `+S,onClick:()=>_(!l),children:[o.jsx("span",{className:"filter-label",children:"Status:"})," ",f,o.jsx("span",{className:"filter-label",children:"Projects:"})," ",S]}),l&&o.jsxs("div",{className:"hbox",style:{marginLeft:14,maxHeight:200,overflowY:"auto"},children:[o.jsx("div",{className:"filter-list",children:[...t.entries()].map(([d,p])=>o.jsx("div",{className:"filter-entry",children:o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:p,onClick:()=>{const x=new Map(t);x.set(d,!x.get(d)),s(x)}}),o.jsx("div",{children:d})]})},d))}),o.jsx("div",{className:"filter-list",children:[...r.entries()].map(([d,p])=>o.jsx("div",{className:"filter-entry",children:o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:p,onClick:()=>{var E;const x=new Map(r);x.set(d,!x.get(d)),c(x);const R=(E=a==null?void 0:a.config)==null?void 0:E.configFile;R&&me.setObject(R+":projects",[...x.entries()].filter(([I,W])=>W).map(([I])=>I))}}),o.jsx("div",{children:d||"untitled"})]})},d))})]})]})},dt=({tag:i,style:e,onClick:t})=>o.jsx("span",{className:re("tag",`tag-color-${ut(i)}`),onClick:t,style:{margin:"6px 0 0 6px",...e},title:`Click to filter by tag: ${i}`,children:i});function ut(i){let e=0;for(let t=0;t<i.length;t++)e=i.charCodeAt(t)+((e<<8)-e);return Math.abs(e%6)}const ht=Xe,ft=({filterText:i,testModel:e,testServerConnection:t,testTree:s,runTests:r,runningState:c,watchAll:a,watchedTreeIds:m,setWatchedTreeIds:l,isLoading:_,onItemSelected:n,requestedCollapseAllCount:f,setFilterText:S,onRevealSource:d})=>{const[p,x]=h.useState({expandedItems:new Map}),[R,E]=h.useState(),[I,W]=h.useState(f);h.useEffect(()=>{if(I!==f){p.expandedItems.clear();for(const b of s.flatTreeItems())p.expandedItems.set(b.id,!1);W(f),E(void 0),x({...p});return}if(!c||c.itemSelectedByUser)return;let u;const B=b=>{var L;b.children.forEach(B),!u&&b.status==="failed"&&(b.kind==="test"&&c.testIds.has(b.test.id)||b.kind==="case"&&c.testIds.has((L=b.tests[0])==null?void 0:L.id))&&(u=b)};B(s.rootItem),u&&E(u.id)},[c,E,s,I,W,f,p,x]);const{selectedTreeItem:D}=h.useMemo(()=>{if(!e)return{selectedTreeItem:void 0};const u=R?s.treeItemById(R):void 0,B=pt(u,e);let b;return(u==null?void 0:u.kind)==="test"?b=u.test:(u==null?void 0:u.kind)==="case"&&u.tests.length===1&&(b=u.tests[0]),n({treeItem:u,testCase:b,testFile:B}),{selectedTreeItem:u}},[n,R,e,s]);h.useEffect(()=>{if(!_)if(a)t==null||t.watchNoReply({fileNames:s.fileNames()});else{const u=new Set;for(const B of m.value){const b=s.treeItemById(B),L=b==null?void 0:b.location.file;L&&u.add(L)}t==null||t.watchNoReply({fileNames:[...u]})}},[_,s,a,m,t]);const K=u=>{E(u.id),r("bounce-if-busy",s.collectTestIds(u))},N=(u,B)=>{if(u.preventDefault(),u.stopPropagation(),u.metaKey||u.ctrlKey){const b=i.split(" ");b.includes(B)?S(b.filter(L=>L!==B).join(" ").trim()):S((i+" "+B).trim())}else S((i.split(" ").filter(b=>!b.startsWith("@")).join(" ")+" "+B).trim())};return o.jsx(ht,{name:"tests",treeState:p,setTreeState:x,rootItem:s.rootItem,dataTestId:"test-tree",render:u=>o.jsxs("div",{className:"hbox ui-mode-list-item",children:[o.jsxs("div",{className:"ui-mode-list-item-title",children:[o.jsx("span",{title:u.title,children:u.title}),u.kind==="case"?u.tags.map(B=>o.jsx(dt,{tag:B.slice(1),onClick:b=>N(b,B)},B)):null]}),!!u.duration&&u.status!=="skipped"&&o.jsx("div",{className:"ui-mode-list-item-time",children:We(u.duration)}),o.jsxs($,{noMinHeight:!0,noShadow:!0,children:[o.jsx(M,{icon:"play",title:"Run",onClick:()=>K(u),disabled:!!c&&!c.completed}),o.jsx(M,{icon:"go-to-file",title:"Show source",onClick:d,style:u.kind==="group"&&u.subKind==="folder"?{visibility:"hidden"}:{}}),!a&&o.jsx(M,{icon:"eye",title:"Watch",onClick:()=>{m.value.has(u.id)?m.value.delete(u.id):m.value.add(u.id),l({...m})},toggled:m.value.has(u.id)})]})]}),icon:u=>Qe(u.status),selectedItem:D,onAccepted:K,onSelected:u=>{c&&(c.itemSelectedByUser=!0),E(u.id)},isError:u=>u.kind==="group"?u.hasLoadErrors:!1,autoExpandDepth:i?5:1,noItemsMessage:_?"Loading…":"No tests"})};function pt(i,e){if(!(!i||!e))return{file:i.location.file,line:i.location.line,column:i.location.column,source:{errors:e.loadErrors.filter(t=>{var s;return((s=t.location)==null?void 0:s.file)===i.location.file}).map(t=>({line:t.location.line,message:t.message})),content:void 0}}}function gt(i){return`.playwright-artifacts-${i}`}const mt=({item:i,rootDir:e,onOpenExternally:t,revealSource:s,pathSeparator:r})=>{var f,S;const[c,a]=h.useState(),[m,l]=h.useState(0),_=h.useRef(null),{outputDir:n}=h.useMemo(()=>({outputDir:i.testCase?_t(i.testCase):void 0}),[i]);return h.useEffect(()=>{var R,E;_.current&&clearTimeout(_.current);const d=(R=i.testCase)==null?void 0:R.results[0];if(!d){a(void 0);return}const p=d&&d.duration>=0&&d.attachments.find(I=>I.name==="trace");if(p&&p.path){fe(p.path).then(I=>a({model:I,isLive:!1}));return}if(!n){a(void 0);return}const x=[n,gt(d.workerIndex),"traces",`${(E=i.testCase)==null?void 0:E.id}.json`].join(r);return _.current=setTimeout(async()=>{try{const I=await fe(x);a({model:I,isLive:!0})}catch{a(void 0)}finally{l(m+1)}},500),()=>{_.current&&clearTimeout(_.current)}},[n,i,a,m,l,r]),o.jsx(Ge,{model:c==null?void 0:c.model,showSourcesFirst:!0,rootDir:e,fallbackLocation:i.testFile,isLive:c==null?void 0:c.isLive,status:(f=i.treeItem)==null?void 0:f.status,annotations:((S=i.testCase)==null?void 0:S.annotations)||[],onOpenExternally:t,revealSource:s},"workbench")},_t=i=>{var e;for(let t=i.parent;t;t=t.parent)if(t.project())return(e=t.project())==null?void 0:e.outputDir};async function fe(i){const e=new URLSearchParams;e.set("trace",i),e.set("limit","1");const s=await(await fetch(`contexts?${e.toString()}`)).json();return new Ue(s)}const wt=({settings:i})=>o.jsx("div",{className:"vbox settings-view",children:i.map(({value:e,set:t,title:s})=>o.jsx("div",{className:"setting",children:o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:e,onClick:()=>t(!e)}),s]})},s))});let pe={cols:80,rows:24};const A={pending:[],clear:()=>{},write:i=>A.pending.push(i),resize:()=>{}},O=new URLSearchParams(window.location.search),vt=O.get("ws"),we=new URL(`../${vt}`,window.location.toString());we.protocol=window.location.protocol==="https:"?"wss:":"ws:";const y={args:O.getAll("arg"),grep:O.get("grep")||void 0,grepInvert:O.get("grepInvert")||void 0,projects:O.getAll("project"),workers:O.get("workers")||void 0,headed:O.has("headed"),updateSnapshots:O.get("updateSnapshots")||void 0,reporters:O.has("reporter")?O.getAll("reporter"):void 0,pathSeparator:O.get("pathSeparator")||"/"};y.updateSnapshots&&!["all","none","missing"].includes(y.updateSnapshots)&&(y.updateSnapshots=void 0);const ge=navigator.platform==="MacIntel",St=({})=>{var he;const[i,e]=h.useState(""),[t,s]=h.useState(!1),[r,c]=h.useState(!1),[a,m]=h.useState(new Map([["passed",!1],["failed",!1],["skipped",!1]])),[l,_]=h.useState(new Map),[n,f]=h.useState(),[S,d]=h.useState(),[p,x]=h.useState({}),[R,E]=h.useState(new Set),[I,W]=h.useState(!1),[D,K]=h.useState(),N=D&&!D.completed,[u,B]=Ae("watch-all",!1),[b,L]=h.useState({value:new Set}),H=h.useRef(Promise.resolve()),Q=h.useRef(new Set),[oe,ve]=h.useState(0),[Se,xe]=h.useState(!1),[ne,ae]=h.useState(!0),[v,be]=h.useState(),[X,Te]=h.useState(),[G,ke]=h.useState(!1);h.useState(!1);const[je,le]=h.useState(!1),ye=h.useCallback(()=>le(!0),[le]),Ee=!1,[ce,xt]=h.useState(!1),[de,bt]=h.useState(!1),[ue,Tt]=h.useState(!1),[Ie,Re]=ze(),Be=h.useRef(null),J=h.useCallback(()=>{be(new $e(new qe(we)))},[]);h.useEffect(()=>{var w;(w=Be.current)==null||w.focus(),W(!0),J()},[J]),h.useEffect(()=>{if(!v)return;const w=[v.onStdio(g=>{if(g.buffer){const T=atob(g.buffer);A.write(T)}else A.write(g.text);g.type==="stderr"&&c(!0)}),v.onClose(()=>xe(!0))];return A.resize=(g,T)=>{pe={cols:g,rows:T},v.resizeTerminalNoReply({cols:g,rows:T})},()=>{for(const g of w)g.dispose()}},[v]),h.useEffect(()=>{if(!v)return;let w;const g=new ot({onUpdate:T=>{clearTimeout(w),w=void 0,T?f(g.asModel()):w||(w=setTimeout(()=>{f(g.asModel())},250))},onError:T=>{A.write((T.stack||T.value||"")+`
4
+ `),c(!0)},pathSeparator:y.pathSeparator});return Te(g),f(void 0),W(!0),L({value:new Set}),(async()=>{try{await v.initialize({interceptStdio:!0,watchTestDirs:!0});const{status:T,report:j}=await v.runGlobalSetup({});if(g.processGlobalReport(j),T!=="passed")return;const C=await v.listTests({projects:y.projects,locations:y.args,grep:y.grep,grepInvert:y.grepInvert});g.processListReport(C.report),v.onReport(P=>{g.processTestReportEvent(P)});const{hasBrowsers:F}=await v.checkBrowsers({});ae(F)}finally{W(!1)}})(),()=>{clearTimeout(w)}},[v]),h.useEffect(()=>{if(!n)return;const{config:w,rootSuite:g}=n,T=w.configFile?me.getObject(w.configFile+":projects",void 0):void 0,j=new Map(l);for(const C of j.keys())g.suites.find(F=>F.title===C)||j.delete(C);for(const C of g.suites)j.has(C.title)||j.set(C.title,!!(T!=null&&T.includes(C.title)));!T&&j.size&&![...j.values()].includes(!0)&&j.set(j.entries().next().value[0],!0),(l.size!==j.size||[...l].some(([C,F])=>j.get(C)!==F))&&_(j)},[l,n]),h.useEffect(()=>{N&&(n!=null&&n.progress)?d(n.progress):n||d(void 0)},[n,N]);const{testTree:Ce}=h.useMemo(()=>{if(!n)return{testTree:new ie("",new q("","root"),[],l,y.pathSeparator)};const w=new ie("",n.rootSuite,n.loadErrors,l,y.pathSeparator);return w.filterTree(i,a,N?D==null?void 0:D.testIds:void 0),w.sortAndPropagateStatus(),w.shortenRoot(),w.flattenForSingleProject(),E(w.testIds()),{testTree:w}},[i,n,a,l,E,D,N]),z=h.useCallback((w,g)=>{!v||!n||w==="bounce-if-busy"&&N||(Q.current=new Set([...Q.current,...g]),H.current=H.current.then(async()=>{var C,F,P;const T=Q.current;if(Q.current=new Set,!T.size)return;{for(const k of((C=n.rootSuite)==null?void 0:C.allTests())||[])if(T.has(k.id)){k.results=[];const U=k._createTestResult("pending");U[Y]="scheduled"}f({...n})}const j=" ["+new Date().toLocaleTimeString()+"]";A.write("\x1B[2m—".repeat(Math.max(0,pe.cols-j.length))+j+"\x1B[22m"),d({total:0,passed:0,failed:0,skipped:0}),K({testIds:T}),await v.runTests({locations:y.args,grep:y.grep,grepInvert:y.grepInvert,testIds:[...T],projects:[...l].filter(([k,U])=>U).map(([k])=>k),...ce?{workers:"1"}:{},...de?{headed:!0}:{},...ue?{updateSnapshots:"all"}:{},reporters:y.reporters,trace:"on"});for(const k of((F=n.rootSuite)==null?void 0:F.allTests())||[])((P=k.results[0])==null?void 0:P.duration)===-1&&(k.results=[]);f({...n}),K(k=>k?{...k,completed:!0}:void 0)}))},[l,N,n,v,ce,de,ue]);h.useEffect(()=>{if(!v||!X)return;const w=v.onTestFilesChanged(async g=>{if(H.current=H.current.then(async()=>{W(!0);try{const P=await v.listTests({projects:y.projects,locations:y.args,grep:y.grep,grepInvert:y.grepInvert});X.processListReport(P.report)}catch(P){console.log(P)}finally{W(!1)}}),await H.current,g.testFiles.length===0)return;const T=X.asModel(),j=new ie("",T.rootSuite,T.loadErrors,l,y.pathSeparator),C=[],F=new Set(g.testFiles);if(u){const P=k=>{const U=k.location.file;U&&F.has(U)&&C.push(...j.collectTestIds(k)),k.kind==="group"&&k.subKind==="folder"&&k.children.forEach(P)};P(j.rootItem)}else for(const P of b.value){const k=j.treeItemById(P),U=k==null?void 0:k.location.file;U&&F.has(U)&&C.push(...j.collectTestIds(k))}z("queue-if-busy",new Set(C))});return()=>w.dispose()},[z,v,u,b,X,l]),h.useEffect(()=>{if(!v)return;const w=g=>{g.code==="Backquote"&&g.ctrlKey?(g.preventDefault(),s(!t)):g.code==="F5"&&g.shiftKey?(g.preventDefault(),v==null||v.stopTestsNoReply({})):g.code==="F5"&&(g.preventDefault(),z("bounce-if-busy",R))};return addEventListener("keydown",w),()=>{removeEventListener("keydown",w)}},[z,J,v,R,t]);const ee=h.useRef(null),Ne=h.useCallback(w=>{var g;w.preventDefault(),w.stopPropagation(),(g=ee.current)==null||g.showModal()},[]),te=h.useCallback(w=>{var g;w.preventDefault(),w.stopPropagation(),(g=ee.current)==null||g.close()},[]),Pe=h.useCallback(w=>{te(w),s(!0),v==null||v.installBrowsers({}).then(async()=>{s(!1);const{hasBrowsers:g}=await(v==null?void 0:v.checkBrowsers({}));ae(g)})},[te,v]);return o.jsxs("div",{className:"vbox ui-mode",children:[!ne&&o.jsxs("dialog",{ref:ee,children:[o.jsxs("div",{className:"title",children:[o.jsx("span",{className:"codicon codicon-lightbulb"}),"Install browsers"]}),o.jsxs("div",{className:"body",children:["Playwright did not find installed browsers.",o.jsx("br",{}),"Would you like to run `playwright install`?",o.jsx("br",{}),o.jsx("button",{className:"button",onClick:Pe,children:"Install"}),o.jsx("button",{className:"button secondary",onClick:te,children:"Dismiss"})]})]}),Se&&o.jsxs("div",{className:"disconnected",children:[o.jsx("div",{className:"title",children:"UI Mode disconnected"}),o.jsxs("div",{children:[o.jsx("a",{href:"#",onClick:()=>window.location.href="/",children:"Reload the page"})," to reconnect"]})]}),o.jsx(Ve,{sidebarSize:250,minSidebarSize:150,orientation:"horizontal",sidebarIsFirst:!0,settingName:"testListSidebar",main:o.jsxs("div",{className:"vbox",children:[o.jsxs("div",{className:re("vbox",!t&&"hidden"),children:[o.jsxs($,{children:[o.jsx("div",{className:"section-title",style:{flex:"none"},children:"Output"}),o.jsx(M,{icon:"circle-slash",title:"Clear output",onClick:()=>{A.clear(),c(!1)}}),o.jsx("div",{className:"spacer"}),o.jsx(M,{icon:"close",title:"Close",onClick:()=>s(!1)})]}),o.jsx(nt,{source:A})]}),o.jsx("div",{className:re("vbox",t&&"hidden"),children:o.jsx(mt,{pathSeparator:y.pathSeparator,item:p,rootDir:(he=n==null?void 0:n.config)==null?void 0:he.rootDir,revealSource:je,onOpenExternally:w=>v==null?void 0:v.openNoReply({location:{file:w.file,line:w.line,column:w.column}})})})]}),sidebar:o.jsxs("div",{className:"vbox ui-mode-sidebar",children:[o.jsxs($,{noShadow:!0,noMinHeight:!0,children:[o.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"}),o.jsx("div",{className:"section-title",children:"Playwright"}),o.jsx(M,{icon:"refresh",title:"Reload",onClick:()=>J(),disabled:N||I}),o.jsxs("div",{style:{position:"relative"},children:[o.jsx(M,{icon:"terminal",title:"Toggle output — "+(ge?"⌃`":"Ctrl + `"),toggled:t,onClick:()=>{s(!t)}}),r&&o.jsx("div",{title:"Output contains error",style:{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:"50%",backgroundColor:"var(--vscode-notificationsErrorIcon-foreground)"}})]}),!ne&&o.jsx(M,{icon:"lightbulb-autofix",style:{color:"var(--vscode-list-warningForeground)"},title:"Playwright browsers are missing",onClick:Ne})]}),o.jsx(ct,{filterText:i,setFilterText:e,statusFilters:a,setStatusFilters:m,projectFilters:l,setProjectFilters:_,testModel:n,runTests:()=>z("bounce-if-busy",R)}),o.jsxs($,{noMinHeight:!0,children:[!N&&!S&&o.jsx("div",{className:"section-title",children:"Tests"}),!N&&S&&o.jsx("div",{"data-testid":"status-line",className:"status-line",children:o.jsxs("div",{children:[S.passed,"/",S.total," passed (",S.passed/S.total*100|0,"%)"]})}),N&&S&&o.jsx("div",{"data-testid":"status-line",className:"status-line",children:o.jsxs("div",{children:["Running ",S.passed,"/",D.testIds.size," passed (",S.passed/D.testIds.size*100|0,"%)"]})}),o.jsx(M,{icon:"play",title:"Run all — F5",onClick:()=>z("bounce-if-busy",R),disabled:N||I}),o.jsx(M,{icon:"debug-stop",title:"Stop — "+(ge?"⇧F5":"Shift + F5"),onClick:()=>v==null?void 0:v.stopTests({}),disabled:!N||I}),o.jsx(M,{icon:"eye",title:"Watch all",toggled:u,onClick:()=>{L({value:new Set}),B(!u)}}),o.jsx(M,{icon:"collapse-all",title:"Collapse all",onClick:()=>{ve(oe+1)}})]}),o.jsx(ft,{filterText:i,testModel:n,testTree:Ce,testServerConnection:v,runningState:D,runTests:z,onItemSelected:x,watchAll:u,watchedTreeIds:b,setWatchedTreeIds:L,isLoading:I,requestedCollapseAllCount:oe,setFilterText:e,onRevealSource:ye}),Ee,o.jsxs($,{noShadow:!0,noMinHeight:!0,className:"settings-toolbar",onClick:()=>ke(!G),children:[o.jsx("span",{className:`codicon codicon-${G?"chevron-down":"chevron-right"}`,style:{marginLeft:5},title:G?"Hide Settings":"Show Settings"}),o.jsx("div",{className:"section-title",children:"Settings"})]}),G&&o.jsx(wt,{settings:[{value:Ie,set:Re,title:"Dark mode"}]})]})})]})};(async()=>{if(Ke(),window.location.protocol!=="file:"){if(window.location.href.includes("isUnderTest=true")&&await new Promise(i=>setTimeout(i,1e3)),!navigator.serviceWorker)throw new Error(`Service workers are not supported.
5
+ Make sure to serve the website (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(i=>{navigator.serviceWorker.oncontrollerchange=()=>i()}),setInterval(function(){fetch("ping")},1e4)}He(document.querySelector("#root")).render(o.jsx(St,{}))})();