10&&(e="..."+e.substr(-10));var r=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+t+" bytes: "+e+" <-");throw r.position=t,r},d=function(t){if(!/^[A-Z2-7=]+$/.test(t))throw new Error("Invalid base32 characters");for(var e,r,i,n,s,o,a,u,c=[],l=0,d=(t=t.replace(/=/g,"")).length,f=0,p=d>>3<<3;f>>2),c[l++]=255&(r<<6|i<<1|n>>>4),c[l++]=255&(n<<4|s>>>1),c[l++]=255&(s<<7|o<<2|a>>>3),c[l++]=255&(a<<5|u);var m=d-p;return 2===m?(e=h[t.charAt(f++)],r=h[t.charAt(f++)],c[l++]=255&(e<<3|r>>>2)):4===m?(e=h[t.charAt(f++)],r=h[t.charAt(f++)],i=h[t.charAt(f++)],n=h[t.charAt(f++)],c[l++]=255&(e<<3|r>>>2),c[l++]=255&(r<<6|i<<1|n>>>4)):5===m?(e=h[t.charAt(f++)],r=h[t.charAt(f++)],i=h[t.charAt(f++)],n=h[t.charAt(f++)],s=h[t.charAt(f++)],c[l++]=255&(e<<3|r>>>2),c[l++]=255&(r<<6|i<<1|n>>>4),c[l++]=255&(n<<4|s>>>1)):7===m&&(e=h[t.charAt(f++)],r=h[t.charAt(f++)],i=h[t.charAt(f++)],n=h[t.charAt(f++)],s=h[t.charAt(f++)],o=h[t.charAt(f++)],a=h[t.charAt(f++)],c[l++]=255&(e<<3|r>>>2),c[l++]=255&(r<<6|i<<1|n>>>4),c[l++]=255&(n<<4|s>>>1),c[l++]=255&(s<<7|o<<2|a>>>3)),c},f=function(t,e){if(!e)return function(t){for(var e,r,i="",n=t.length,s=0,o=0;s191&&e<=223?(r=31&e,o=1):e<=239?(r=15&e,o=2):e<=247?(r=7&e,o=3):l(s,i);for(var a=0;a191)&&l(s,i),r<<=6,r+=63&e;r>=55296&&r<=57343&&l(s,i),r>1114111&&l(s,i),r<=65535?i+=String.fromCharCode(r):(r-=65536,i+=String.fromCharCode(55296+(r>>10)),i+=String.fromCharCode(56320+(1023&r)))}return i}(d(t));if(!/^[A-Z2-7=]+$/.test(t))throw new Error("Invalid base32 characters");var r,i,n,s,o,a,u,c,f="",p=t.indexOf("=");-1===p&&(p=t.length);for(var m=0,w=p>>3<<3;m>>2))+String.fromCharCode(255&(i<<6|n<<1|s>>>4))+String.fromCharCode(255&(s<<4|o>>>1))+String.fromCharCode(255&(o<<7|a<<2|u>>>3))+String.fromCharCode(255&(u<<5|c));var g=p-w;return 2===g?(r=h[t.charAt(m++)],i=h[t.charAt(m++)],f+=String.fromCharCode(255&(r<<3|i>>>2))):4===g?(r=h[t.charAt(m++)],i=h[t.charAt(m++)],n=h[t.charAt(m++)],s=h[t.charAt(m++)],f+=String.fromCharCode(255&(r<<3|i>>>2))+String.fromCharCode(255&(i<<6|n<<1|s>>>4))):5===g?(r=h[t.charAt(m++)],i=h[t.charAt(m++)],n=h[t.charAt(m++)],s=h[t.charAt(m++)],o=h[t.charAt(m++)],f+=String.fromCharCode(255&(r<<3|i>>>2))+String.fromCharCode(255&(i<<6|n<<1|s>>>4))+String.fromCharCode(255&(s<<4|o>>>1))):7===g&&(r=h[t.charAt(m++)],i=h[t.charAt(m++)],n=h[t.charAt(m++)],s=h[t.charAt(m++)],o=h[t.charAt(m++)],a=h[t.charAt(m++)],u=h[t.charAt(m++)],f+=String.fromCharCode(255&(r<<3|i>>>2))+String.fromCharCode(255&(i<<6|n<<1|s>>>4))+String.fromCharCode(255&(s<<4|o>>>1))+String.fromCharCode(255&(o<<7|a<<2|u>>>3))),f},p={encode:function(t,e){var r="string"!=typeof t;return r&&t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),r?function(t){for(var e,r,i,n,s,o="",a=t.length,h=0,c=5*parseInt(a/5);h>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[31&(i<<1|n>>>7)]+u[n>>>2&31]+u[31&(n<<3|s>>>5)]+u[31&s];var l=a-c;return 1===l?(e=t[h],o+=u[e>>>3]+u[e<<2&31]+"======"):2===l?(e=t[h++],r=t[h],o+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[r<<4&31]+"===="):3===l?(e=t[h++],r=t[h++],i=t[h],o+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[i<<1&31]+"==="):4===l&&(e=t[h++],r=t[h++],i=t[h++],n=t[h],o+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[31&(i<<1|n>>>7)]+u[n>>>2&31]+u[n<<3&31]+"="),o}(t):e?function(t){for(var e,r,i,n,s,o="",a=t.length,h=0,c=5*parseInt(a/5);h>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[31&(i<<1|n>>>7)]+u[n>>>2&31]+u[31&(n<<3|s>>>5)]+u[31&s];var l=a-c;return 1===l?(e=t.charCodeAt(h),o+=u[e>>>3]+u[e<<2&31]+"======"):2===l?(e=t.charCodeAt(h++),r=t.charCodeAt(h),o+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[r<<4&31]+"===="):3===l?(e=t.charCodeAt(h++),r=t.charCodeAt(h++),i=t.charCodeAt(h),o+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[i<<1&31]+"==="):4===l&&(e=t.charCodeAt(h++),r=t.charCodeAt(h++),i=t.charCodeAt(h++),n=t.charCodeAt(h),o+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[31&(i<<1|n>>>7)]+u[n>>>2&31]+u[n<<3&31]+"="),o}(t):function(t){var e,r,i,n,s,o,a,h=!1,l="",d=0,f=0,p=t.length;do{for(c[0]=c[5],c[1]=c[6],c[2]=c[7],a=f;d>6,c[a++]=128|63&o):o<55296||o>=57344?(c[a++]=224|o>>12,c[a++]=128|o>>6&63,c[a++]=128|63&o):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++d)),c[a++]=240|o>>18,c[a++]=128|o>>12&63,c[a++]=128|o>>6&63,c[a++]=128|63&o);a-f,f=a-5,d===p&&++d,d>p&&a<6&&(h=!0),e=c[0],a>4?(r=c[1],i=c[2],n=c[3],s=c[4],l+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[31&(i<<1|n>>>7)]+u[n>>>2&31]+u[31&(n<<3|s>>>5)]+u[31&s]):1===a?l+=u[e>>>3]+u[e<<2&31]+"======":2===a?(r=c[1],l+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[r<<4&31]+"===="):3===a?(r=c[1],i=c[2],l+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[i<<1&31]+"==="):(r=c[1],i=c[2],n=c[3],l+=u[e>>>3]+u[31&(e<<2|r>>>6)]+u[r>>>1&31]+u[31&(r<<4|i>>>4)]+u[31&(i<<1|n>>>7)]+u[n>>>2&31]+u[n<<3&31]+"=")}while(!h);return l}(t)},decode:f};f.asBytes=d,o?t.exports=p:(s.base32=p,a&&(void 0===(n=function(){return p}.call(p,r,p,t))||(t.exports=n)))}()}).call(this,r(14),r(6))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r(161);var i=/\\(u\{([0-9A-Fa-f]+)\}|u([0-9A-Fa-f]{4})|x([0-9A-Fa-f]{2})|([1-7][0-7]{0,2}|[0-7]{2,3})|(['"tbrnfv0\\]))|\\U([0-9A-Fa-f]{8})/g,n={0:"\0",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v","'":"'",'"':'"',"\\":"\\"},s=function(t){return String.fromCodePoint(parseInt(t,16))};e.default=function(t){return t.replace(i,(function(t,e,r,i,o,a,u,h){return void 0!==r?s(r):void 0!==i?s(i):void 0!==o?s(o):void 0!==a?(c=a,String.fromCodePoint(parseInt(c,8))):void 0!==h?s(h):n[u];var c}))},t.exports=e.default},function(t,e){var r={};r[e.ACCEPTED=202]="Accepted",r[e.BAD_GATEWAY=502]="Bad Gateway",r[e.BAD_REQUEST=400]="Bad Request",r[e.CONFLICT=409]="Conflict",r[e.CONTINUE=100]="Continue",r[e.CREATED=201]="Created",r[e.EXPECTATION_FAILED=417]="Expectation Failed",r[e.FAILED_DEPENDENCY=424]="Failed Dependency",r[e.FORBIDDEN=403]="Forbidden",r[e.GATEWAY_TIMEOUT=504]="Gateway Timeout",r[e.GONE=410]="Gone",r[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP Version Not Supported",r[e.IM_A_TEAPOT=418]="I'm a teapot",r[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="Insufficient Space on Resource",r[e.INSUFFICIENT_STORAGE=507]="Insufficient Storage",r[e.INTERNAL_SERVER_ERROR=500]="Server Error",r[e.LENGTH_REQUIRED=411]="Length Required",r[e.LOCKED=423]="Locked",r[e.METHOD_FAILURE=420]="Method Failure",r[e.METHOD_NOT_ALLOWED=405]="Method Not Allowed",r[e.MOVED_PERMANENTLY=301]="Moved Permanently",r[e.MOVED_TEMPORARILY=302]="Moved Temporarily",r[e.MULTI_STATUS=207]="Multi-Status",r[e.MULTIPLE_CHOICES=300]="Multiple Choices",r[e.NETWORK_AUTHENTICATION_REQUIRED=511]="Network Authentication Required",r[e.NO_CONTENT=204]="No Content",r[e.NON_AUTHORITATIVE_INFORMATION=203]="Non Authoritative Information",r[e.NOT_ACCEPTABLE=406]="Not Acceptable",r[e.NOT_FOUND=404]="Not Found",r[e.NOT_IMPLEMENTED=501]="Not Implemented",r[e.NOT_MODIFIED=304]="Not Modified",r[e.OK=200]="OK",r[e.PARTIAL_CONTENT=206]="Partial Content",r[e.PAYMENT_REQUIRED=402]="Payment Required",r[e.PERMANENT_REDIRECT=308]="Permanent Redirect",r[e.PRECONDITION_FAILED=412]="Precondition Failed",r[e.PRECONDITION_REQUIRED=428]="Precondition Required",r[e.PROCESSING=102]="Processing",r[e.PROXY_AUTHENTICATION_REQUIRED=407]="Proxy Authentication Required",r[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="Request Header Fields Too Large",r[e.REQUEST_TIMEOUT=408]="Request Timeout",r[e.REQUEST_TOO_LONG=413]="Request Entity Too Large",r[e.REQUEST_URI_TOO_LONG=414]="Request-URI Too Long",r[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="Requested Range Not Satisfiable",r[e.RESET_CONTENT=205]="Reset Content",r[e.SEE_OTHER=303]="See Other",r[e.SERVICE_UNAVAILABLE=503]="Service Unavailable",r[e.SWITCHING_PROTOCOLS=101]="Switching Protocols",r[e.TEMPORARY_REDIRECT=307]="Temporary Redirect",r[e.TOO_MANY_REQUESTS=429]="Too Many Requests",r[e.UNAUTHORIZED=401]="Unauthorized",r[e.UNPROCESSABLE_ENTITY=422]="Unprocessable Entity",r[e.UNSUPPORTED_MEDIA_TYPE=415]="Unsupported Media Type",r[e.USE_PROXY=305]="Use Proxy",e.getStatusText=function(t){if(r.hasOwnProperty(t))return r[t];throw new Error("Status code does not exist: "+t)},e.getStatusCode=function(t){for(key in r)if(r[key]===t)return parseInt(key,10);throw new Error("Reason phrase does not exist: "+t)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return n}));var i=r(112);class n{constructor(e){this.bundle=new i.Bundle(t.from(e))}load(t){this.db=t;const e=this.bundle.primaryURL,r=e;this.db.addPage({url:e,date:"",title:r});for(const t of this.bundle.urls){const e=this.bundle.getResponse(t),r=(new Date).getTime();this.db.addResource({url:t,ts:r,status:e.status,respHeaders:e.headers,payload:e.body})}}}}).call(this,r(3).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(187);e.Bundle=i.Bundle,e.Response=i.Response;var n=r(200);e.BundleBuilder=n.BundleBuilder},function(t,e,r){(function(e,r,i){t.exports=function t(e,r,i){function n(o,a){if(!r[o]){if(!e[o]){if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var h=r[o]={exports:{}};e[o][0].call(h.exports,(function(t){return n(e[o][1][t]||t)}),h,h.exports,t,e,r,i)}return r[o].exports}for(var s=!1,o=0;o>2,a=(3&e)<<4|r>>4,u=1