"use strict";(globalThis.webpackChunkscrollsequence2=globalThis.webpackChunkscrollsequence2||[]).push([[33],{33:(e,t,r)=>{r.r(t),r.d(t,{downloadWithProgress:()=>i,fetchFile:()=>o,importScript:()=>s,toBlobURL:()=>l});const a=new Error("failed to get response body reader"),n=new Error("failed to complete download"),o=async e=>{let t;if("string"==typeof e)t=/data:_data\/([a-zA-Z]*);base64,([^"]*)/.test(e)?atob(e.split(",")[1]).split("").map((e=>e.charCodeAt(0))):await(await fetch(e)).arrayBuffer();else if(e instanceof URL)t=await(await fetch(e)).arrayBuffer();else{if(!(e instanceof File||e instanceof Blob))return new Uint8Array;t=await(r=e,new Promise(((e,t)=>{const a=new FileReader;a.onload=()=>{const{result:t}=a;t instanceof ArrayBuffer?e(new Uint8Array(t)):e(new Uint8Array)},a.onerror=e=>{t(Error(`File could not be read! Code=${e?.target?.error?.code||-1}`))},a.readAsArrayBuffer(r)})))}var r;return new Uint8Array(t)},s=async e=>new Promise((t=>{const r=document.createElement("script"),a=()=>{r.removeEventListener("load",a),t()};r.src=e,r.type="text/javascript",r.addEventListener("load",a),document.getElementsByTagName("head")[0].appendChild(r)})),i=async(e,t)=>{const r=await fetch(e);let o;try{const s=parseInt(r.headers.get("Content-Length")||"-1"),i=r.body?.getReader();if(!i)throw a;const l=[];let c=0;for(;;){const{done:r,value:a}=await i.read(),o=a?a.length:0;if(r){if(-1!=s&&s!==c)throw n;t&&t({url:e,total:s,received:c,delta:o,done:r});break}l.push(a),c+=o,t&&t({url:e,total:s,received:c,delta:o,done:r})}const d=new Uint8Array(c);let f=0;for(const e of l)d.set(e,f),f+=e.length;o=d.buffer}catch(a){console.log("failed to send download progress event: ",a),o=await r.arrayBuffer(),t&&t({url:e,total:o.byteLength,received:o.byteLength,delta:0,done:!0})}return o},l=async(e,t,r=!1,a)=>{const n=r?await i(e,a):await(await fetch(e)).arrayBuffer(),o=new Blob([n],{type:t});return URL.createObjectURL(o)}}}]);