From 8bfd93837d928ef834d57d4274d40917c81b239e Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Wed, 19 Oct 2022 11:41:20 -0700 Subject: [PATCH] dependencies: update to wombat 2.13.4 fidelity: fix replay of tiktok via webrecorder/wabac.js#85 bump to 1.7.2 --- CHANGES.md | 4 ++++ _data/package.json | 4 ++-- package.json | 4 ++-- sw.js | 2 +- ui.js | 2 +- yarn.lock | 8 ++++---- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b4130c9..7b0fca8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ ## CHANGES +v1.7.2 +- Fidelity: Fix replay of TikTok +- Dependencies: Update to wabac.js 2.13.4 + v1.7.1 - Electron App: Fix electron app not loading preload.js, regression in 1.7.0 - Fidelity: Fixed embedded tweet video issue (via wabac.js) diff --git a/_data/package.json b/_data/package.json index 767e2c1..af1c73e 100644 --- a/_data/package.json +++ b/_data/package.json @@ -1,7 +1,7 @@ { "name": "replaywebpage", "productName": "ReplayWeb.page", - "version": "1.7.1", + "version": "1.7.2", "description": "Serverless Web Archive Replay", "repository": "https://github.com/webrecorder/replayweb.page", "homepage": "https://replayweb.page/", @@ -9,7 +9,7 @@ "license": "AGPL-3.0-or-later", "dependencies": { "@fortawesome/fontawesome-free": "^5.15.4", - "@webrecorder/wabac": "^2.13.3", + "@webrecorder/wabac": "^2.13.4", "auto-js-ipfs": "^1.3.9", "bulma": "^0.9.3", "electron-log": "^4.4.1", diff --git a/package.json b/package.json index 767e2c1..af1c73e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "replaywebpage", "productName": "ReplayWeb.page", - "version": "1.7.1", + "version": "1.7.2", "description": "Serverless Web Archive Replay", "repository": "https://github.com/webrecorder/replayweb.page", "homepage": "https://replayweb.page/", @@ -9,7 +9,7 @@ "license": "AGPL-3.0-or-later", "dependencies": { "@fortawesome/fontawesome-free": "^5.15.4", - "@webrecorder/wabac": "^2.13.3", + "@webrecorder/wabac": "^2.13.4", "auto-js-ipfs": "^1.3.9", "bulma": "^0.9.3", "electron-log": "^4.4.1", diff --git a/sw.js b/sw.js index 63153d9..4f75aa8 100644 --- a/sw.js +++ b/sw.js @@ -31,7 +31,7 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */!function(t){!function(e){var i="object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),s=o(t);function o(t,e){return function(r,i){"function"!=typeof t[r]&&Object.defineProperty(t,r,{configurable:!0,writable:!0,value:i}),e&&e(r,i)}}void 0===i.Reflect?i.Reflect=t:s=o(i.Reflect,s),function(t){var e=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",s=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,c=!o&&!a,l={create:o?function(){return nt(Object.create(null))}:a?function(){return nt({__proto__:null})}:function(){return nt({})},has:c?function(t,r){return e.call(t,r)}:function(t,e){return e in t},get:c?function(t,r){return e.call(t,r)?t[r]:void 0}:function(t,e){return t[e]}},h=Object.getPrototypeOf(Function),u="object"==typeof n&&n.env&&"true"===n.env.REFLECT_METADATA_USE_MAP_POLYFILL,d=u||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?et():Map,f=u||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?rt():Set,p=new(u||"function"!=typeof WeakMap?it():WeakMap);function g(t,e,r,i){if(U(r)){if(!q(t))throw new TypeError;if(!V(e))throw new TypeError;return x(t,e)}if(!q(t))throw new TypeError;if(!F(e))throw new TypeError;if(!F(i)&&!U(i)&&!M(i))throw new TypeError;return M(i)&&(i=void 0),I(t,e,r=Q(r),i)}function w(t,e){function r(r,i){if(!F(r))throw new TypeError;if(!U(i)&&!K(i))throw new TypeError;N(t,e,r,i)}return r}function m(t,e,r,i){if(!F(r))throw new TypeError;return U(i)||(i=Q(i)),N(t,e,r,i)}function y(t,e,r){if(!F(e))throw new TypeError;return U(r)||(r=Q(r)),k(t,e,r)}function b(t,e,r){if(!F(e))throw new TypeError;return U(r)||(r=Q(r)),C(t,e,r)}function v(t,e,r){if(!F(e))throw new TypeError;return U(r)||(r=Q(r)),R(t,e,r)}function _(t,e,r){if(!F(e))throw new TypeError;return U(r)||(r=Q(r)),B(t,e,r)}function A(t,e){if(!F(t))throw new TypeError;return U(e)||(e=Q(e)),O(t,e)}function E(t,e){if(!F(t))throw new TypeError;return U(e)||(e=Q(e)),L(t,e)}function S(t,e,r){if(!F(e))throw new TypeError;U(r)||(r=Q(r));var i=T(e,r,!1);if(U(i))return!1;if(!i.delete(t))return!1;if(i.size>0)return!0;var n=p.get(e);return n.delete(r),n.size>0||p.delete(e),!0}function x(t,e){for(var r=t.length-1;r>=0;--r){var i=(0,t[r])(e);if(!U(i)&&!M(i)){if(!V(i))throw new TypeError;e=i}}return e}function I(t,e,r,i){for(var n=t.length-1;n>=0;--n){var s=(0,t[n])(e,r,i);if(!U(s)&&!M(s)){if(!F(s))throw new TypeError;i=s}}return i}function T(t,e,r){var i=p.get(t);if(U(i)){if(!r)return;i=new d,p.set(t,i)}var n=i.get(e);if(U(n)){if(!r)return;n=new d,i.set(e,n)}return n}function k(t,e,r){if(C(t,e,r))return!0;var i=tt(e);return!M(i)&&k(t,i,r)}function C(t,e,r){var i=T(e,r,!1);return!U(i)&&W(i.has(t))}function R(t,e,r){if(C(t,e,r))return B(t,e,r);var i=tt(e);return M(i)?void 0:R(t,i,r)}function B(t,e,r){var i=T(e,r,!1);if(!U(i))return i.get(t)}function N(t,e,r,i){T(r,i,!0).set(t,e)}function O(t,e){var r=L(t,e),i=tt(t);if(null===i)return r;var n=O(i,e);if(n.length<=0)return r;if(r.length<=0)return n;for(var s=new f,o=[],a=0,c=r;a=0&&t=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var r=this._find(t,!0);return this._values[r]=e,this},e.prototype.delete=function(e){var r=this._find(e,!1);if(r>=0){for(var i=this._keys.length,n=r+1;n{ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ -var i=r(8764),n=i.Buffer;function s(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(s(i,e),e.Buffer=o),o.prototype=Object.create(n.prototype),s(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},2830:(t,e,r)=>{t.exports=n;var i=r(7187).EventEmitter;function n(){i.call(this)}r(5717)(n,i),n.Readable=r(9481),n.Writable=r(4229),n.Duplex=r(6753),n.Transform=r(4605),n.PassThrough=r(1318),n.finished=r(8610),n.pipeline=r(9946),n.Stream=n,n.prototype.pipe=function(t,e){var r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function s(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",s),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",c));var o=!1;function a(){o||(o=!0,t.end())}function c(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function l(t){if(h(),0===i.listenerCount(this,"error"))throw t}function h(){r.removeListener("data",n),t.removeListener("drain",s),r.removeListener("end",a),r.removeListener("close",c),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",h),r.removeListener("close",h),t.removeListener("close",h)}return r.on("error",l),t.on("error",l),r.on("end",h),r.on("close",h),t.on("close",h),t.emit("pipe",r),t}},2553:(t,e,r)=>{"use strict";var i=r(9509).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=l,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=h,this.end=u,e=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function h(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function u(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.s=s,s.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return n>0&&(t.lastNeed=n-1),n;if(--i=0)return n>0&&(t.lastNeed=n-2),n;if(--i=0)return n>0&&(2===n?n=0:t.lastNeed=n-3),n;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},4153:t=>{const e=/0x[a-zA-Z0-9]+/,r=/^([\-\+])?(0*)(\.[0-9]+(e\-?[0-9]+)?|[0-9]+(\.[0-9]+(e\-?[0-9]+)?)?)$/,i={hex:!0,leadingZeros:!0,decimalPoint:"."};t.exports=function(t,n={}){if(n=Object.assign({},i,n),!t||"string"!=typeof t)return t;let s=t.trim();if(void 0!==n.skipLike&&n.skipLike.test(s))return t;if(n.hex&&e.test(s))return Number.parseInt(s,16);{const e=r.exec(s);if(e){e[1];const r=e[2],i=e[3];e[4]||e[6];return 1===r.length&&"."===i[0]?Number(t):!n.leadingZeros&&r.length>0?t:Number(s)}return t}}},2511:function(t,e,r){var i;/*! https://mths.be/punycode v1.3.2 by @mathias */t=r.nmd(t),function(n){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof r.g&&r.g;s.global!==s&&s.window!==s&&s.self;var o,a=2147483647,c=36,l=/^xn--/,h=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,p=String.fromCharCode;function g(t){throw RangeError(d[t])}function w(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function m(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+w((t=t.replace(u,".")).split("."),e).join(".")}function y(t){for(var e,r,i=[],n=0,s=t.length;n=55296&&e<=56319&&n65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function v(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,r){var i=0;for(t=r?f(t/700):t>>1,t+=f(t/e);t>455;i+=c)t=f(t/35);return f(i+36*t/(t+38))}function A(t){var e,r,i,n,s,o,l,h,u,d,p,w=[],m=t.length,y=0,v=128,A=72;for((r=t.lastIndexOf("-"))<0&&(r=0),i=0;i=128&&g("not-basic"),w.push(t.charCodeAt(i));for(n=r>0?r+1:0;n=m&&g("invalid-input"),((h=(p=t.charCodeAt(n++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:c)>=c||h>f((a-y)/o))&&g("overflow"),y+=h*o,!(h<(u=l<=A?1:l>=A+26?26:l-A));l+=c)o>f(a/(d=c-u))&&g("overflow"),o*=d;A=_(y-s,e=w.length+1,0==s),f(y/e)>a-v&&g("overflow"),v+=f(y/e),y%=e,w.splice(y++,0,v)}return b(w)}function E(t){var e,r,i,n,s,o,l,h,u,d,w,m,b,A,E,S=[];for(m=(t=y(t)).length,e=128,r=0,s=72,o=0;o=e&&wf((a-r)/(b=i+1))&&g("overflow"),r+=(l-e)*b,e=l,o=0;oa&&g("overflow"),w==e){for(h=r,u=c;!(h<(d=u<=s?1:u>=s+26?26:u-s));u+=c)E=h-d,A=c-d,S.push(p(v(d+E%A,0))),h=f(E/A);S.push(p(v(h,0))),s=_(r,b,i==n),r=0,++i}++r,++e}return S.join("")}o={version:"1.3.2",ucs2:{decode:y,encode:b},decode:A,encode:E,toASCII:function(t){return m(t,(function(t){return h.test(t)?"xn--"+E(t):t}))},toUnicode:function(t){return m(t,(function(t){return l.test(t)?A(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return o}.call(e,r,e,t))||(t.exports=i)}()},8575:(t,e,r)=>{"use strict";var i=r(2511),n=r(2502);function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){n.isString(t)&&(t=b(t));return t instanceof s?t.format():s.prototype.format.call(t)},e.Url=s;var o=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(l),u=["%","/","?",";","#"].concat(h),d=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(7673);function b(t,e,r){if(t&&n.isObject(t)&&t instanceof s)return t;var i=new s;return i.parse(t,e,r),i}s.prototype.parse=function(t,e,r){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var s=t.indexOf("?"),a=-1!==s&&s127?O+="x":O+=N[L];if(!O.match(f)){var U=R.slice(0,T),M=R.slice(T+1),D=N.match(p);D&&(U.push(D[1]),M.unshift(D[2])),M.length&&(b="/"+M.join(".")+b),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=i.toASCII(this.hostname));var F=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+F,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[A])for(T=0,B=h.length;T0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift());return r.search=t.search,r.query=t.query,n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=E.slice(-1)[0],I=(r.host||t.host||E.length>1)&&("."===x||".."===x)||""===x,T=0,k=E.length;k>=0;k--)"."===(x=E[k])?E.splice(k,1):".."===x?(E.splice(k,1),T++):T&&(E.splice(k,1),T--);if(!_&&!A)for(;T--;T)E.unshift("..");!_||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),I&&"/"!==E.join("/").substr(-1)&&E.push("");var C,R=""===E[0]||E[0]&&"/"===E[0].charAt(0);S&&(r.hostname=r.host=R?"":E.length?E.shift():"",(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift()));return(_=_||r.host&&E.length)&&!R&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},s.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},2502:t=>{"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},4927:(t,e,r)=>{function i(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(i("noDeprecation"))return t;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},2043:(t,e,r)=>{"use strict";!function(){var e,i,n,s=0,o=[];for(i=0;i<256;i++)o[i]=(i+256).toString(16).substr(1);function a(){var t,r=(t=16,(!e||s+t>c.BUFFER_SIZE)&&(s=0,e=c.randomBytes(c.BUFFER_SIZE)),e.slice(s,s+=t));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,r}function c(){var t=a();return o[t[0]]+o[t[1]]+o[t[2]]+o[t[3]]+"-"+o[t[4]]+o[t[5]]+"-"+o[t[6]]+o[t[7]]+"-"+o[t[8]]+o[t[9]]+"-"+o[t[10]]+o[t[11]]+o[t[12]]+o[t[13]]+o[t[14]]+o[t[15]]}c.BUFFER_SIZE=4096,c.bin=a,c.clearBuffer=function(){e=null,s=0},c.test=function(t){return"string"==typeof t&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)},"undefined"!=typeof crypto?n=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(n=window.msCrypto),n=n||r(9061),t.exports=c,c.randomBytes=function(){if(n){if(n.randomBytes)return n.randomBytes;if(n.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(t){var e=new Uint8Array(t);return n.getRandomValues(e),Array.from(e)}:function(t){var e=new Uint8Array(t);return n.getRandomValues(e),e}}return function(t){var e,r=[];for(e=0;e{"use strict";var i=r(9270),n=r(899),s=r(9684),o=r(8587),a=r(4861),c=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=n.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(o[r]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var h;if(h="string"==typeof e.dictionary?s.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=i.deflateSetDictionary(this.strm,h)))throw new Error(o[r]);this._dict_set=!0}}function h(t,e){var r=new l(e);if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}l.prototype.push=function(t,e){var r,o,a=this.strm,l=this.options.chunkSize;if(this.ended)return!1;o=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=s.string2buf(t):"[object ArrayBuffer]"===c.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new n.Buf8(l),a.next_out=0,a.avail_out=l),1!==(r=i.deflate(a,o))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(s.buf2binstring(n.shrinkBuf(a.output,a.next_out))):this.onData(n.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==r);return 4===o?(r=i.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==o||(this.onEnd(0),a.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}},2725:(t,e,r)=>{"use strict";var i=r(5433),n=r(899),s=r(9684),o=r(7468),a=r(8587),c=r(4861),l=r(1706),h=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,e.windowBits);if(r!==o.Z_OK)throw new Error(a[r]);if(this.header=new l,i.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=s.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=i.inflateSetDictionary(this.strm,e.dictionary))!==o.Z_OK))throw new Error(a[r])}function d(t,e){var r=new u(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(t,e){var r,a,c,l,u,d=this.strm,f=this.options.chunkSize,p=this.options.dictionary,g=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof t?d.input=s.binstring2buf(t):"[object ArrayBuffer]"===h.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new n.Buf8(f),d.next_out=0,d.avail_out=f),(r=i.inflate(d,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&p&&(r=i.inflateSetDictionary(this.strm,p)),r===o.Z_BUF_ERROR&&!0===g&&(r=o.Z_OK,g=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==o.Z_STREAM_END&&(0!==d.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(c=s.utf8border(d.output,d.next_out),l=d.next_out-c,u=s.buf2string(d.output,c),d.next_out=l,d.avail_out=f-l,l&&n.arraySet(d.output,d.output,c,l,0),this.onData(u)):this.onData(n.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(g=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),d.avail_out=0,!0)},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.T_=u},899:(t,e)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),n);else for(var s=0;s{"use strict";var i=r(899),n=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var o=new i.Buf8(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function c(t,e){if(e<65534&&(t.subarray&&s||!t.subarray&&n))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",o=0;o>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},e.buf2binstring=function(t){return c(t,t.length)},e.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;r4)l[i++]=65533,r+=s-1;else{for(n&=2===s?31:3===s?15:7;s>1&&r1?l[i++]=65533:n<65536?l[i++]=n:(n-=65536,l[i++]=55296|n>>10&1023,l[i++]=56320|1023&n)}return c(l,i)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+o[t[r]]>e?r:e}},3441:t=>{"use strict";t.exports=function(t,e,r,i){for(var n=65535&t|0,s=t>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{s=s+(n=n+e[i++]|0)|0}while(--o);n%=65521,s%=65521}return n|s<<16|0}},7468:t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},7613:t=>{"use strict";var e=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,r,i,n){var s=e,o=n+i;t^=-1;for(var a=n;a>>8^s[255&(t^r[a])];return-1^t}},9270:(t,e,r)=>{"use strict";var i,n=r(899),s=r(6329),o=r(3441),a=r(7613),c=r(8587),l=-2,h=258,u=262,d=103,f=113,p=666;function g(t,e){return t.msg=c[e],e}function w(t){return(t<<1)-(t>4?9:0)}function m(t){for(var e=t.length;--e>=0;)t[e]=0}function y(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(n.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function b(t,e){s._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,y(t.strm)}function v(t,e){t.pending_buf[t.pending++]=e}function _(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function A(t,e){var r,i,n=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match,c=t.strstart>t.w_size-u?t.strstart-(t.w_size-u):0,l=t.window,d=t.w_mask,f=t.prev,p=t.strstart+h,g=l[s+o-1],w=l[s+o];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do{if(l[(r=e)+o]===w&&l[r+o-1]===g&&l[r]===l[s]&&l[++r]===l[s+1]){s+=2,r++;do{}while(l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&l[++s]===l[++r]&&so){if(t.match_start=e,o=i,i>=a)break;g=l[s+o-1],w=l[s+o]}}}while((e=f[e&d])>c&&0!=--n);return o<=t.lookahead?o:t.lookahead}function E(t){var e,r,i,s,c,l,h,d,f,p,g=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=g+(g-u)){n.arraySet(t.window,t.window,g,g,0),t.match_start-=g,t.strstart-=g,t.block_start-=g,e=r=t.hash_size;do{i=t.head[--e],t.head[e]=i>=g?i-g:0}while(--r);e=r=g;do{i=t.prev[--e],t.prev[e]=i>=g?i-g:0}while(--r);s+=g}if(0===t.strm.avail_in)break;if(l=t.strm,h=t.window,d=t.strstart+t.lookahead,f=s,p=void 0,(p=l.avail_in)>f&&(p=f),r=0===p?0:(l.avail_in-=p,n.arraySet(h,l.input,l.next_in,p,d),1===l.state.wrap?l.adler=o(l.adler,h,p,d):2===l.state.wrap&&(l.adler=a(l.adler,h,p,d)),l.next_in+=p,l.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(c=t.strstart-t.insert,t.ins_h=t.window[c],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=s._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=(t.ins_h<15&&(a=2,i-=16),s<1||s>9||8!==r||i<8||i>15||e<0||e>9||o<0||o>4)return g(t,l);8===i&&(i=9);var c=new T;return t.state=c,c.strm=t,c.wrap=a,c.gzhead=null,c.w_bits=i,c.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(E(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,b(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-u&&(b(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(b(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(b(t,!1),t.strm.avail_out),1)})),new I(4,4,8,4,S),new I(4,5,16,8,S),new I(4,6,32,32,S),new I(4,4,16,16,x),new I(8,16,32,32,x),new I(8,16,128,128,x),new I(8,32,128,256,x),new I(32,128,258,1024,x),new I(32,258,258,4096,x)],e.deflateInit=function(t,e){return R(t,e,8,15,8,0)},e.deflateInit2=R,e.deflateReset=C,e.deflateResetKeep=k,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?l:(t.state.gzhead=e,0):l},e.deflate=function(t,e){var r,n,o,c;if(!t||!t.state||e>5||e<0)return t?g(t,l):l;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||n.status===p&&4!==e)return g(t,0===t.avail_out?-5:l);if(n.strm=t,r=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,v(n,31),v(n,139),v(n,8),n.gzhead?(v(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),v(n,255&n.gzhead.time),v(n,n.gzhead.time>>8&255),v(n,n.gzhead.time>>16&255),v(n,n.gzhead.time>>24&255),v(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),v(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(v(n,255&n.gzhead.extra.length),v(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=a(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(v(n,0),v(n,0),v(n,0),v(n,0),v(n,0),v(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),v(n,3),n.status=f);else{var u=8+(n.w_bits-8<<4)<<8;u|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(u|=32),u+=31-u%31,n.status=f,_(n,u),0!==n.strstart&&(_(n,t.adler>>>16),_(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),y(t),o=n.pending,n.pending!==n.pending_buf_size));)v(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),y(t),o=n.pending,n.pending===n.pending_buf_size)){c=1;break}c=n.gzindexo&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),0===c&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),y(t),o=n.pending,n.pending===n.pending_buf_size)){c=1;break}c=n.gzindexo&&(t.adler=a(t.adler,n.pending_buf,n.pending-o,o)),0===c&&(n.status=d)}else n.status=d;if(n.status===d&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&y(t),n.pending+2<=n.pending_buf_size&&(v(n,255&t.adler),v(n,t.adler>>8&255),t.adler=0,n.status=f)):n.status=f),0!==n.pending){if(y(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&w(e)<=w(r)&&4!==e)return g(t,-5);if(n.status===p&&0!==t.avail_in)return g(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&n.status!==p){var A=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(E(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(b(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(b(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(b(t,!1),0===t.strm.avail_out)?1:2}(n,e):3===n.strategy?function(t,e){for(var r,i,n,o,a=t.window;;){if(t.lookahead<=h){if(E(t),t.lookahead<=h&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=a[n=t.strstart-1])===a[++n]&&i===a[++n]&&i===a[++n]){o=t.strstart+h;do{}while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=s._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(b(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(b(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(b(t,!1),0===t.strm.avail_out)?1:2}(n,e):i[n.level].func(n,e);if(3!==A&&4!==A||(n.status=p),1===A||3===A)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===A&&(1===e?s._tr_align(n):5!==e&&(s._tr_stored_block(n,0,0,!1),3===e&&(m(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),y(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(v(n,255&t.adler),v(n,t.adler>>8&255),v(n,t.adler>>16&255),v(n,t.adler>>24&255),v(n,255&t.total_in),v(n,t.total_in>>8&255),v(n,t.total_in>>16&255),v(n,t.total_in>>24&255)):(_(n,t.adler>>>16),_(n,65535&t.adler)),y(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==d&&e!==f&&e!==p?g(t,l):(t.state=null,e===f?g(t,-3):0):l},e.deflateSetDictionary=function(t,e){var r,i,s,a,c,h,u,d,f=e.length;if(!t||!t.state)return l;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return l;for(1===a&&(t.adler=o(t.adler,e,f,0)),r.wrap=0,f>=r.w_size&&(0===a&&(m(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new n.Buf8(r.w_size),n.arraySet(d,e,f-r.w_size,r.w_size,0),e=d,f=r.w_size),c=t.avail_in,h=t.next_in,u=t.input,t.avail_in=f,t.next_in=0,t.input=e,E(r);r.lookahead>=3;){i=r.strstart,s=r.lookahead-2;do{r.ins_h=(r.ins_h<{"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},136:t=>{"use strict";t.exports=function(t,e){var r,i,n,s,o,a,c,l,h,u,d,f,p,g,w,m,y,b,v,_,A,E,S,x,I;r=t.state,i=t.next_in,x=t.input,n=i+(t.avail_in-5),s=t.next_out,I=t.output,o=s-(e-t.avail_out),a=s+(t.avail_out-257),c=r.dmax,l=r.wsize,h=r.whave,u=r.wnext,d=r.window,f=r.hold,p=r.bits,g=r.lencode,w=r.distcode,m=(1<>>=v=b>>>24,p-=v,0===(v=b>>>16&255))I[s++]=65535&b;else{if(!(16&v)){if(0==(64&v)){b=g[(65535&b)+(f&(1<>>=v,p-=v),p<15&&(f+=x[i++]<>>=v=b>>>24,p-=v,!(16&(v=b>>>16&255))){if(0==(64&v)){b=w[(65535&b)+(f&(1<c){t.msg="invalid distance too far back",r.mode=30;break t}if(f>>>=v,p-=v,A>(v=s-o)){if((v=A-v)>h&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(E=0,S=d,0===u){if(E+=l-v,v<_){_-=v;do{I[s++]=d[E++]}while(--v);E=s-A,S=I}}else if(u2;)I[s++]=S[E++],I[s++]=S[E++],I[s++]=S[E++],_-=3;_&&(I[s++]=S[E++],_>1&&(I[s++]=S[E++]))}else{E=s-A;do{I[s++]=I[E++],I[s++]=I[E++],I[s++]=I[E++],_-=3}while(_>2);_&&(I[s++]=I[E++],_>1&&(I[s++]=I[E++]))}break}}break}}while(i>3,f&=(1<<(p-=_<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i{"use strict";var i=r(899),n=r(3441),s=r(7613),o=r(136),a=r(4639),c=-2,l=12,h=30;function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):c}function p(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,f(t)):c}function g(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?c:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,p(t))):c}function w(t,e){var r,i;return t?(i=new d,t.state=i,i.window=null,0!==(r=g(t,e))&&(t.state=null),r):c}var m,y,b=!0;function v(t){if(b){var e;for(m=new i.Buf32(512),y=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,m,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,y,0,t.work,{bits:5}),b=!1}t.lencode=m,t.lenbits=9,t.distcode=y,t.distbits=5}function _(t,e,r,n){var s,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(i.arraySet(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((s=o.wsize-o.wnext)>n&&(s=n),i.arraySet(o.window,e,r-n,s,o.wnext),(n-=s)?(i.arraySet(o.window,e,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=s(r.check,D,2,0),y=0,b=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){t.msg="incorrect header check",r.mode=h;break}if(8!=(15&y)){t.msg="unknown compression method",r.mode=h;break}if(b-=4,O=8+(15&(y>>>=4)),0===r.wbits)r.wbits=O;else if(O>r.wbits){t.msg="invalid window size",r.mode=h;break}r.dmax=1<>8&1),512&r.flags&&(D[0]=255&y,D[1]=y>>>8&255,r.check=s(r.check,D,2,0)),y=0,b=0,r.mode=3;case 3:for(;b<32;){if(0===w)break t;w--,y+=d[p++]<>>8&255,D[2]=y>>>16&255,D[3]=y>>>24&255,r.check=s(r.check,D,4,0)),y=0,b=0,r.mode=4;case 4:for(;b<16;){if(0===w)break t;w--,y+=d[p++]<>8),512&r.flags&&(D[0]=255&y,D[1]=y>>>8&255,r.check=s(r.check,D,2,0)),y=0,b=0,r.mode=5;case 5:if(1024&r.flags){for(;b<16;){if(0===w)break t;w--,y+=d[p++]<>>8&255,r.check=s(r.check,D,2,0)),y=0,b=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((S=r.length)>w&&(S=w),S&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,d,p,S,O)),512&r.flags&&(r.check=s(r.check,d,S,p)),w-=S,p+=S,r.length-=S),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===w)break t;S=0;do{O=d[p+S++],r.head&&O&&r.length<65536&&(r.head.name+=String.fromCharCode(O))}while(O&&S>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=l;break;case 10:for(;b<32;){if(0===w)break t;w--,y+=d[p++]<>>=7&b,b-=7&b,r.mode=27;break}for(;b<3;){if(0===w)break t;w--,y+=d[p++]<>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6===e){y>>>=2,b-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=h}y>>>=2,b-=2;break;case 14:for(y>>>=7&b,b-=7&b;b<32;){if(0===w)break t;w--,y+=d[p++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=h;break}if(r.length=65535&y,y=0,b=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(S=r.length){if(S>w&&(S=w),S>m&&(S=m),0===S)break t;i.arraySet(f,d,p,S,g),w-=S,p+=S,m-=S,g+=S,r.length-=S;break}r.mode=l;break;case 17:for(;b<14;){if(0===w)break t;w--,y+=d[p++]<>>=5,b-=5,r.ndist=1+(31&y),y>>>=5,b-=5,r.ncode=4+(15&y),y>>>=4,b-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=h;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,b-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},L=a(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,L){t.msg="invalid code lengths set",r.mode=h;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,C=65535&M,!((T=M>>>24)<=b);){if(0===w)break t;w--,y+=d[p++]<>>=T,b-=T,r.lens[r.have++]=C;else{if(16===C){for(U=T+2;b>>=T,b-=T,0===r.have){t.msg="invalid bit length repeat",r.mode=h;break}O=r.lens[r.have-1],S=3+(3&y),y>>>=2,b-=2}else if(17===C){for(U=T+3;b>>=T)),y>>>=3,b-=3}else{for(U=T+7;b>>=T)),y>>>=7,b-=7}if(r.have+S>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=h;break}for(;S--;)r.lens[r.have++]=O}}if(r.mode===h)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=h;break}if(r.lenbits=9,P={bits:r.lenbits},L=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,L){t.msg="invalid literal/lengths set",r.mode=h;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},L=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,L){t.msg="invalid distances set",r.mode=h;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(w>=6&&m>=258){t.next_out=g,t.avail_out=m,t.next_in=p,t.avail_in=w,r.hold=y,r.bits=b,o(t,E),g=t.next_out,f=t.output,m=t.avail_out,p=t.next_in,d=t.input,w=t.avail_in,y=r.hold,b=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;k=(M=r.lencode[y&(1<>>16&255,C=65535&M,!((T=M>>>24)<=b);){if(0===w)break t;w--,y+=d[p++]<>R)])>>>16&255,C=65535&M,!(R+(T=M>>>24)<=b);){if(0===w)break t;w--,y+=d[p++]<>>=R,b-=R,r.back+=R}if(y>>>=T,b-=T,r.back+=T,r.length=C,0===k){r.mode=26;break}if(32&k){r.back=-1,r.mode=l;break}if(64&k){t.msg="invalid literal/length code",r.mode=h;break}r.extra=15&k,r.mode=22;case 22:if(r.extra){for(U=r.extra;b>>=r.extra,b-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;k=(M=r.distcode[y&(1<>>16&255,C=65535&M,!((T=M>>>24)<=b);){if(0===w)break t;w--,y+=d[p++]<>R)])>>>16&255,C=65535&M,!(R+(T=M>>>24)<=b);){if(0===w)break t;w--,y+=d[p++]<>>=R,b-=R,r.back+=R}if(y>>>=T,b-=T,r.back+=T,64&k){t.msg="invalid distance code",r.mode=h;break}r.offset=C,r.extra=15&k,r.mode=24;case 24:if(r.extra){for(U=r.extra;b>>=r.extra,b-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=h;break}r.mode=25;case 25:if(0===m)break t;if(S=E-m,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=h;break}S>r.wnext?(S-=r.wnext,x=r.wsize-S):x=r.wnext-S,S>r.length&&(S=r.length),I=r.window}else I=f,x=g-r.offset,S=r.length;S>m&&(S=m),m-=S,r.length-=S;do{f[g++]=I[x++]}while(--S);0===r.length&&(r.mode=21);break;case 26:if(0===m)break t;f[g++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;b<32;){if(0===w)break t;w--,y|=d[p++]<{"use strict";var i=r(899),n=15,s=[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],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[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,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,l,h,u,d,f){var p,g,w,m,y,b,v,_,A,E=f.bits,S=0,x=0,I=0,T=0,k=0,C=0,R=0,B=0,N=0,O=0,L=null,P=0,U=new i.Buf16(16),M=new i.Buf16(16),D=null,F=0;for(S=0;S<=n;S++)U[S]=0;for(x=0;x=1&&0===U[T];T--);if(k>T&&(k=T),0===T)return h[u++]=20971520,h[u++]=20971520,f.bits=1,0;for(I=1;I0&&(0===t||1!==T))return-1;for(M[1]=0,S=1;S852||2===t&&N>592)return 1;for(;;){v=S-R,d[x]b?(_=D[F+d[x]],A=L[P+d[x]]):(_=96,A=0),p=1<>R)+(g-=p)]=v<<24|_<<16|A|0}while(0!==g);for(p=1<>=1;if(0!==p?(O&=p-1,O+=p):O=0,x++,0==--U[S]){if(S===T)break;S=e[r+d[x]]}if(S>k&&(O&m)!==w){for(0===R&&(R=k),y+=I,B=1<<(C=S-R);C+R852||2===t&&N>592)return 1;h[w=O&m]=k<<24|C<<16|y-u|0}}return 0!==O&&(h[y+O]=S-R<<24|64<<16|0),f.bits=k,0}},8587:t=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},6329:(t,e,r)=>{"use strict";var i=r(899);function n(t){for(var e=t.length;--e>=0;)t[e]=0}var s=256,o=286,a=30,c=15,l=[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],h=[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],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);n(f);var p=new Array(60);n(p);var g=new Array(512);n(g);var w=new Array(256);n(w);var m=new Array(29);n(m);var y,b,v,_=new Array(a);function A(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function E(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function S(t){return t<256?g[t]:g[256+(t>>>7)]}function x(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function I(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function C(t,e,r){var i,n,s=new Array(16),o=0;for(i=1;i<=c;i++)s[i]=o=o+r[i-1]<<1;for(n=0;n<=e;n++){var a=t[2*n+1];0!==a&&(t[2*n]=k(s[a]++,a))}}function R(t){var e;for(e=0;e8?x(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function N(t,e,r,i){var n=2*e,s=2*r;return t[n]>1;r>=1;r--)O(t,s,r);n=l;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],O(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,s[2*n]=s[2*r]+s[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,s[2*r+1]=s[2*i+1]=n,t.heap[1]=n++,O(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,s,o,a,l=e.dyn_tree,h=e.max_code,u=e.stat_desc.static_tree,d=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,g=e.stat_desc.max_length,w=0;for(s=0;s<=c;s++)t.bl_count[s]=0;for(l[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(s=l[2*l[2*(i=t.heap[r])+1]+1]+1)>g&&(s=g,w++),l[2*i+1]=s,i>h||(t.bl_count[s]++,o=0,i>=p&&(o=f[i-p]),a=l[2*i],t.opt_len+=a*(s+o),d&&(t.static_len+=a*(u[2*i+1]+o)));if(0!==w){do{for(s=g-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[g]--,w-=2}while(w>0);for(s=g;0!==s;s--)for(i=t.bl_count[s];0!==i;)(n=t.heap[--r])>h||(l[2*n+1]!==s&&(t.opt_len+=(s-l[2*n+1])*l[2*n],l[2*n+1]=s),i--)}}(t,e),C(s,h,t.bl_count)}function U(t,e,r){var i,n,s=-1,o=e[1],a=0,c=7,l=4;for(0===o&&(c=138,l=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=o,o=e[2*(i+1)+1],++a>=7;i0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*d[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=n&&(n=o)):n=o=r+5,r+4<=n&&-1!==e?F(t,e,r,i):4===t.strategy||o===n?(I(t,2+(i?1:0),3),L(t,f,p)):(I(t,4+(i?1:0),3),function(t,e,r,i){var n;for(I(t,e-257,5),I(t,r-1,5),I(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(w[r]+s+1)]++,t.dyn_dtree[2*S(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){I(t,2,3),T(t,256,f),function(t){16===t.bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},4861:t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},6760:t=>{t.exports=function(){for(var t={},r=0;r{},4616:()=>{},9061:()=>{},338:(t,e)=>{"use strict";const r="https://w3s.link/";function i(t){const{hostname:e,protocol:r,pathname:i}=new URL(t),n=r.slice(0,-1);if(!e){const[t,...e]=i.slice(2).split("/");return{type:n,cid:t,path:"/"+e.join("/")}}return{type:n,cid:e,path:i}}async function n(t){return h(t)?t:u(t)?a(t):t}async function s(t){return new Response(t).blob()}async function*o(t){const e=await t.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)return;yield r}}finally{e.releaseLock()}}function a(t){let e=t;return e.next||(e=t[Symbol.asyncIterator]()),new ReadableStream({async pull(t){const{value:r,done:i}=await e.next();i?await t.close():await t.enqueue(r)}})}async function c(t){if(!t.ok){const e=await t.text(),r=t.status;throw new Error(`HTTP Error ${r}: ${e}`)}}async function l({url:t,file:e,fileName:r="",parameterName:i="file",fetch:n=globalThis.fetch,signal:o}){const l=new FormData,f=new Headers;d(t,f);const p=await async function(t){if(h(t))return await s(t);if(u(t)){const e=a(t);return await s(e)}return new Blob([t])}(e);r?l.append(i,p,r):l.append(i,p);const g=await n(t,{method:"POST",body:l,headers:f,signal:o});return await c(g),g}function h(t){return"function"==typeof t.getReader}function u(t){return t[Symbol.asyncIterator]}function d(t,e){if(t.password)if(t.username){const r=`Basic ${btoa(`${t.username}:${t.password}`)}`;e.append("Authorization",r),t.username="",t.password=""}else{const r=`Bearer ${t.password}`;e.append("Authorization",r),t.password=""}}async function f({url:t,fetch:e=globalThis.fetch,signal:r}){const i=await e(t,{method:"HEAD",signal:r});await c(i);const n=i.headers.get("Content-Length");return parseInt(n,10)}async function*p({url:t,start:e,end:r,signal:i,fetch:n=globalThis.fetch}){const s=new Headers;Number.isInteger(e)&&(Number.isInteger(r)?s.set("Range",`bytes=${e}-${r}`):s.set("Range",`bytes=${e}-`));const a=await n(t,{headers:s,signal:i});await c(a),yield*o(a.body)}function g(t,e=w()){const{cid:r,path:n,type:s}=i(t);return new URL(`/${s}/${r}${n}`,e)}function w(){if(!globalThis.location)return r;const{pathname:t,hostname:e,protocol:i}=globalThis.location;if(t.startsWith("/ipfs/")||t.startsWith("/ipns/"))return`${i}//${e}/`;const[n,...s]=e.split(".");return 59===n.length&&s.length>=2?`${i}//${s.join(".")}/`:r}let m=!1;const y=[45001,45002,45003,45004,45005],b="https://api.web3.storage/",v="https://api.estuary.tech/",_="http://localhost:5001/",A="agregore",E="daemon",S="web3.storage",x="estuary",I="readonly",T=[A,E,S,x,I];class k{async*get(t,{start:e,end:r,signal:i=null}={}){throw new Error("Not Implemented")}async getSize(t,e=null){throw new Error("Not Implemented")}async uploadCAR(t,e=null){throw new Error("Not Implemented")}async uploadFile(t,e,r=null){throw new Error("Not Implemented")}}class C{async list(){throw new Error("Not Implemented")}async add(t,{name:e,meta:r}={}){throw new Error("Not Implemented")}async remove(t){throw new Error("Not Implemented")}}async function R({daemonURL:t=_,web3StorageToken:e,web3StorageURL:r=b,estuaryToken:i,estuaryURL:n=v,publicGatewayURL:s=w(),readonly:o=!0,timeout:a=1e3,fetch:c=globalThis.fetch}={}){const l=[],h=[];if(h.push(H(c).then((t=>t&&l.push({type:A,fetch:c})))),h.push(F().then((t=>t&&l.push({type:E,url:t,fetch:c})))),t&&h.push(j(t,a,c).then((e=>e&&l.push({type:E,url:t,fetch:c})))),i){const t=n,e=i;l.push({type:x,url:t,authorization:e,fetch:c,publicGatewayURL:s})}if(e){const t=r,i=e;l.push({type:S,url:t,authorization:i,fetch:c,publicGatewayURL:s})}return o&&s&&l.push({type:I,fetch:c,publicGatewayURL:s}),await Promise.allSettled(h),l}function B(t,e=T){const r=t.filter((({type:t})=>e.includes(t))).sort((({type:t},{type:r})=>e.indexOf(t)-e.indexOf(r)))[0];if(!r)throw new Error("Unable to find valid type");return r}async function N(t){const{type:e}=t;let r=null;if(e===A)r=new P(t.fetch||globalThis.fetch);else if(e===E)r=new M(t.url);else if(e===S)r=new U(t.authorization,t.url,t.publicGatewayURL);else if(e===x)r=new L(t.authorization,t.url,t.publicGatewayURL);else{if(e!==I)throw new TypeError(`Unknown API type: ${e}.`);r=new O(t.publicGatewayURL)}return{api:r,pins:new C}}class O extends k{constructor(t=w()){super(),this.gatewayURL=t}async*get(t,{start:e,end:r,signal:i=null}={}){yield*async function*({url:t,start:e,end:r,signal:i,gatewayURL:n=w()}){const s=g(t,n);yield*p({url:s,start:e,end:r,signal:i})}({url:t,start:e,end:r,gatewayURL:this.gatewayURL,signal:i})}async getSize(t,e=null){const{cid:r,path:n,type:s}=i(t);return f({url:new URL(`/${s}/${r}${n}`,this.gatewayURL),signal:e})}}class L extends O{constructor(t,e=v,r=w()){super(r),this.authorization=t,this.url=e}async uploadCAR(t,e=null){throw new Error("Not Implemented")}async uploadFile(t,e,r=null){const i=new URL("/content/add",this.url);i.password=this.authorization;const n=await l({url:i,file:t,fileName:e,parameterName:"data",signal:r}),{cid:s}=await n.json();return`ipfs://${s}/`}}class P extends k{constructor(t=globalThis.fetch){super(),this.fetch=t}async*get(t,{start:e,end:r,signal:i=null}={}){const{fetch:n}=this;yield*p({url:t,start:e,end:r,fetch:n,signal:i})}async getSize(t,e=null){const{fetch:r}=this;return f({url:t,fetch:r,signal:e})}async uploadCAR(t,e=null){const r=await n(t),{fetch:i}=this,s=await i("ipfs://localhost",{method:"POST",headers:{"Content-Type":"application/vnd.ipld.car"},signal:e,body:r});await c(s);return(await s.text()).split("\n")}async uploadFile(t,e=null){const r=await n(t),{fetch:i}=this,s=await i("ipfs://localhost",{method:"POST",headers:{"Content-Type":"application/octet-stream"},signal:e,body:r});return await c(s),s.headers.get("Location")}}class U extends O{constructor(t,e=b,r=w()){super(r),this.authorization=t,this.url=e}async uploadCAR(t,e=null){const r=new URL("/car",this.url);r.password=this.authorization;const i=await async function({url:t,fileIterator:e,signal:r}){const i=new Headers;i.set("Content-Type","application/octet-stream"),d(t,i);const s=await n(e),o=await fetch(t,{method:"POST",signal:r,body:s,headers:i});return await c(o),o}({url:r,fileIterator:t,signal:e});return(await i.text()).split("\n").filter((t=>t)).map((t=>{const{cid:e}=JSON.parse(t);return`ipfs://${e}/`}))}async uploadFile(t,{fileName:e="",signal:r=null}={}){const i=new URL("/upload",this.url);i.password=this.authorization;const n=await l({url:i,file:t,fileName:e,signal:r}),{cid:s}=await n.json();return`ipfs://${s}/`}}class M extends k{constructor(t=_){super(),this.url=t}async*get(t,{start:e,end:r,signal:n=null}={}){const{cid:s,path:a,type:l}=i(t),h=new URL(`/api/v0/cat?arg=/${l}/${s}${a}`,this.url);e&&h.searchParams.set("offset",e),r&&h.searchParams.set("length",(e||0)+r);const u=await fetch(h,{method:"POST",signal:n});await c(u),yield*o(u.body)}async getSize(t,e=null){try{const{cid:r,path:n,type:s}=i(t),o=`/api/v0/file/ls?arg=/${s}/${r}${n}&size=true`,a=new URL(o,this.url),l=await fetch(a,{method:"POST",signal:e});await c(l);const{Objects:h}=await l.json(),[{Size:u}]=Object.values(h);return u}catch(r){return m&&console.warn(r),this._getSizeWithDag(t,e)}}async _getSizeWithDag(t,e=null){const{cid:r,path:n,type:s}=i(t),o=new URL(`/api/v0/dag/stat?arg=/${s}/${r}${n}`,this.url),a=await fetch(o,{method:"POST",signal:e});await c(a);const{Size:l}=await a.json();return parseInt(l,10)}async uploadCAR(t,e=null){const r=new URL("/api/v0/dag/import?allow-big-block=true&pin-roots=true",this.url),i=await l({url:r,file:t,signal:e});return(await i.text()).split("\n").filter((t=>t)).map((t=>{const{Root:e}=JSON.parse(t);return`ipfs://${e.Cid["/"]}/`}))}async uploadFile(t,e="",r=null){const i=new URL("/api/v0/add?cid-version=1&inline=false&raw-leaves=true",this.url),n=t.name&&t instanceof Blob;(e||n)&&i.searchParams.set("wrap-with-directory","true");const s=await l({url:i,file:t,fileName:e,signal:r}),o=await s.text(),[a]=o.split("\n"),{Hash:c}=JSON.parse(a);return`ipfs://${c}/`}}e.Fd=!1;const D=!!(globalThis&&globalThis.chrome&&globalThis.chrome.webRequest&&globalThis.chrome.webRequest.onBeforeSendHeaders&&globalThis.chrome.webRequest.onBeforeSendHeaders.addListener);async function F(){if("undefined"==typeof navigator)return!1;if(!navigator.brave&&!navigator.brave.isBrave())return!1;const t=y.map((t=>`http://localhost:${t}/`));try{const i=Promise.any(t.map((t=>j(t).then((e=>{if(e)return t;throw new Error("Not found")})))));return!!i&&(D&&!e.Fd&&(r=i,e.Fd=!0,globalThis.chrome.webRequest.onBeforeSendHeaders.addListener((t=>{const{requestHeaders:e}=t;for(const t of e)if("origin"===t.name.toLowerCase())return t.value=r,{requestHeaders:e};return t.requestHeaders.push({name:"Origin",value:r}),{requestHeaders:e}}),{urls:[r+"/*"]},["blocking","requestHeaders","extraHeaders"])),i)}catch{return!1}var r}async function H(t=globalThis.fetch){try{return await t("ipfs://localhost/"),!0}catch(t){return m&&console.warn("Unable to detect Agregore",t),!1}}async function j(t=_,e=1e3,r=globalThis.fetch){try{const i=new AbortController,{signal:n}=i;setTimeout((()=>i.abort()),e);const s=await r(new URL("/api/v0/version",t),{signal:n});return!!s.ok||405===s.status}catch(e){return m&&console.warn("Unable to detect Kubo Daemon",e,t),!1}}e.Ue=async function({chooseOrder:t=T,...e}={}){return N(B(await R(e),t))}}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={id:i,loaded:!1,exports:{}};return t[i].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}r.amdO={},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var i={};(()=>{"use strict";r.r(i);var t={};r.r(t),r.d(t,{Any:()=>eh,BaseBlock:()=>mc,BaseStringBlock:()=>bc,BitString:()=>gl,BmpString:()=>Ul,Boolean:()=>ul,CharacterString:()=>Vl,Choice:()=>rh,Constructed:()=>ol,DATE:()=>Zl,DateTime:()=>Yl,Duration:()=>$l,EndOfContent:()=>cl,Enumerated:()=>_l,GeneralString:()=>Gl,GeneralizedTime:()=>Jl,GraphicString:()=>Ql,HexBlock:()=>uc,IA5String:()=>zl,Integer:()=>vl,Null:()=>ll,NumericString:()=>Fl,ObjectIdentifier:()=>Sl,OctetString:()=>fl,Primitive:()=>rl,PrintableString:()=>Hl,RawData:()=>nh,RelativeObjectIdentifier:()=>Tl,Repeated:()=>ih,Sequence:()=>kl,Set:()=>Cl,TIME:()=>th,TeletexString:()=>jl,TimeOfDay:()=>Xl,UTCTime:()=>Kl,UniversalString:()=>Dl,Utf8String:()=>Ll,ValueBlock:()=>fc,VideotexString:()=>Wl,ViewWriter:()=>tc,VisibleString:()=>ql,compareSchema:()=>sh,fromBER:()=>nl,verifySchema:()=>oh});const e='\n\n\n\n\nReplayWeb.page\n\n