diff --git a/.gitignore b/.gitignore
index 9f4a803..1cffac1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,6 @@ local-examples/
.DS_Store
.sass-cache/
_site/
+dist/
+!dist/frontend.js
+!dist/embed.js
diff --git a/assets/icon.icns b/assets/icon.icns
new file mode 100644
index 0000000..6bac6cc
Binary files /dev/null and b/assets/icon.icns differ
diff --git a/assets/icon.png b/assets/icon.png
new file mode 100644
index 0000000..cc565c8
Binary files /dev/null and b/assets/icon.png differ
diff --git a/dist/embed.js b/dist/embed.js
index bb92392..e7aef91 100644
--- a/dist/embed.js
+++ b/dist/embed.js
@@ -1,4 +1,4 @@
-!function(t,e){for(var s in e)t[s]=e[s]}(self,function(t){var e={};function s(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=t,s.c=e,s.d=function(t,e,n){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)s.d(n,r,function(e){return t[e]}.bind(null,r));return n},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/dist/",s(s.s=107)}({0:function(t,e,s){"use strict";s.d(e,"c",(function(){return d.e})),s.d(e,"d",(function(){return N})),s.d(e,"b",(function(){return C})),s.d(e,"a",(function(){return E}));var n=s(5),r=s(1);function i(t,e){const{element:{content:s},parts:n}=t,r=document.createTreeWalker(s,133,null,!1);let i=a(n),o=n[i],c=-1,l=0;const u=[];let d=null;for(;r.nextNode();){c++;const t=r.currentNode;for(t.previousSibling===d&&(d=null),e.has(t)&&(u.push(t),null===d&&(d=t)),null!==d&&l++;void 0!==o&&o.index===c;)o.index=null!==d?-1:o.index-l,i=a(n,i),o=n[i]}u.forEach(t=>t.parentNode.removeChild(t))}const o=t=>{let e=11===t.nodeType?0:1;const s=document.createTreeWalker(t,133,null,!1);for(;s.nextNode();)e++;return e},a=(t,e=-1)=>{for(let s=e+1;s "+e+" "+e+"
`:""}
`}`}script(){if("trypublic"===this.state||this.scriptLoaded)return a.c``;const e=document.createElement("script");return e.onload=()=>this.onLoad(),e.src="https://apis.google.com/js/platform.js",e}gauth(e,t){gapi.load("auth2",()=>{gapi.auth2.authorize({client_id:"160798412227-tko4c82uopud11q105b2lvbogsj77hlg.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/drive.file",response_type:"token",prompt:e},t)})}}class oe extends a.a{constructor(){super(),this.size="1.1em"}static get properties(){return{svg:{type:String},size:{type:String}}}static get styles(){return a.b`
@@ -854,7 +854,7 @@ const n=new WeakMap,s=Object(r.d)(e=>t=>{if(!(t instanceof r.b))throw new Error(
width: var(--fa-icon-width, 19px);
height: var(--fa-icon-height, 19px);
}
- `}render(){if(!this.svg)return a.c``;const e={width:this.size,height:this.size};return a.c``}}!async function(){const e=function(e){let t,i;new Promise((e,a)=>{t=e,i=a}),m(e,{registrationOptions:{scope:"./"},ready(e){console.log("Service worker is active."),t()},error(e){console.error("Error during service worker registration:",e),i()}})}("./sw.js");await e,customElements.define("app-main",Y),customElements.define("wr-index",X),customElements.define("wr-loader",J),customElements.define("wr-coll",Q),customElements.define("wr-coll-resources",te),customElements.define("wr-coll-curated",ee),customElements.define("wr-replay-page",ie),customElements.define("wr-gdrive",ae),customElements.define("fa-icon",oe)}()},26:function(e,t){function i(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,xhtml:!1},getDefaults:i,changeDefaults:function(t){e.exports.defaults=t}}},27:function(e,t){const i=/[&<>"']/,a=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,r=/[<>"']|&(?!#?\w+;)/g,n={"&":"&","<":"<",">":">",'"':""","'":"'"},s=e=>n[e];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(l,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const d=/(^|[^\[])\^/g;const b=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const h={},u=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,p=/^([^:]+:\/*[^/]*)[\s\S]*$/;function g(e,t){h[" "+e]||(u.test(e)?h[" "+e]=e+"/":h[" "+e]=v(e,"/",!0));const i=-1===(e=h[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(p,"$1")+t:e+t}function v(e,t,i){const a=e.length;if(0===a)return"";let o=0;for(;o(a=(a=a.source||a).replace(d,"$1"),e=e.replace(t,a),i),getRegex:()=>new RegExp(e,t)};return i},cleanUrl:function(e,t,i){if(e){let e;try{e=decodeURIComponent(c(i)).replace(b,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!f.test(i)&&(i=g(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(e){return null}return i},resolveUrl:g,noopTest:{exec:function(){}},merge:function(e){let t,i,a=1;for(;a
\n":"'+(i?e:r(e,!0))+"
"}blockquote(e){return""+(i?e:r(e,!0))+"\n"+e+"
\n"}html(e){return e}heading(e,t,i,a){return this.options.headerIds?"
\n":"
\n"}list(e,t,i){const a=t?"ol":"ul";return"<"+a+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+""+a+">\n"}listitem(e){return"\n\n"+e+"\n"+t+"
\n"}tablerow(e){return"\n"+e+" \n"}tablecell(e,t){const i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+""+i+">\n"}strong(e){return""+e+""}em(e){return""+e+""}codespan(e){return""+e+""}br(){return this.options.xhtml?"
":"
"}del(e){return""+e+""}link(e,t,i){if(null===(e=o(this.options.sanitize,this.options.baseUrl,e)))return i;let a='"+i+"",a}image(e,t,i){if(null===(e=o(this.options.sanitize,this.options.baseUrl,e)))return i;let a='":">",a}text(e){return e}}},58:function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}},59:function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},6:function(e,t,i){"use strict";i.d(t,"d",(function(){return n.a})),i.d(t,"a",(function(){return a.b})),i.d(t,"b",(function(){return a.e})),i.d(t,"c",(function(){return a.g})),i.d(t,"e",(function(){return s}));var a=i(2);
+const a="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=(e,t,i=null,a=null)=>{for(;t!==i;){const i=t.nextSibling;e.insertBefore(t,a),t=i}},r=(e,t,i=null)=>{for(;t!==i;){const i=t.nextSibling;e.removeChild(t),t=i}}},54:function(e,t,i){"use strict";const a=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],o=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],r=(e,t)=>{let i=e;return"string"==typeof t?i=e.toLocaleString(t):!0===t&&(i=e.toLocaleString()),i};e.exports=(e,t)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const i=(t=Object.assign({bits:!1},t)).bits?o:a;if(t.signed&&0===e)return" 0 "+i[0];const n=e<0,s=n?"-":t.signed?"+":"";if(n&&(e=-e),e<1){return s+r(e,t.locale)+" "+i[0]}const l=Math.min(Math.floor(Math.log10(e)/3),i.length-1);return e=Number((e/Math.pow(1e3,l)).toPrecision(3)),s+r(e,t.locale)+" "+i[l]}},55:function(e,t){e.exports=''},57:function(e,t,i){const{defaults:a}=i(27),{rtrim:o,splitCells:r,escape:n,findClosingBracket:s}=i(28);function l(e,t,i){const a=t.href,o=t.title?n(t.title):null;return"!"!==e[0].charAt(0)?{type:"link",raw:i,href:a,title:o,text:e[1]}:{type:"image",raw:i,text:n(e[1]),href:a,title:o}}e.exports=class{constructor(e){this.options=e||a}space(e){const t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}}code(e,t){const i=this.rules.block.code.exec(e);if(i){const e=t[t.length-1];if(e&&"paragraph"===e.type)return t.pop(),e.text+="\n"+i[0].trimRight(),e.raw+="\n"+i[0],e;{const e=i[0].replace(/^ {4}/gm,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?e:o(e,"\n")}}}}fences(e){const t=this.rules.block.fences.exec(e);if(t)return{type:"code",raw:t[0],lang:t[2]?t[2].trim():t[2],text:t[3]||""}}heading(e){const t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}}nptable(e){const t=this.rules.block.nptable.exec(e);if(t){const e={type:"table",header:r(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(e.header.length===e.align.length){let t,i=e.align.length;for(t=0;t ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}}list(e){const t=this.rules.block.list.exec(e);if(t){let e=t[0];const i=t[2],a=i.length>1,o={type:"list",raw:e,ordered:a,start:a?+i:"",loose:!1,items:[]},r=t[0].match(this.rules.block.item);let n,s,l,c,d,b,f,h=!1;const u=r.length;for(let t=0;t1?1===l.length:l.length>1||this.options.smartLists&&l!==i)&&(c=r.slice(t+1).join("\n"),o.raw=o.raw.substring(0,o.raw.length-c.length),t=u-1)),d=h||/\n\n(?!\s*$)/.test(n),t!==u-1&&(h="\n"===n.charAt(n.length-1),d||(d=h)),d&&(o.loose=!0),b=/^\[[ xX]\] /.test(n),f=void 0,b&&(f=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),o.items.push({raw:e,task:b,checked:f,loose:d,text:n});return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):n(t[0]):t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:r(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let i,a=e.align.length;for(i=0;i/i.test(a[0])&&(t=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:a[0],inLink:t,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):n(a[0]):a[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=s(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}let i=t[2],a="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e?(i=e[1],a=e[3]):a=""}else a=t[3]?t[3].slice(1,-1):"";return i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),l(t,{href:i?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let e=(i[2]||i[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return l(i,e,i[0])}}strong(e){const t=this.rules.inline.strong.exec(e);if(t)return{type:"strong",raw:t[0],text:t[4]||t[3]||t[2]||t[1]}}em(e){const t=this.rules.inline.em.exec(e);if(t)return{type:"em",raw:t[0],text:t[6]||t[5]||t[4]||t[3]||t[2]||t[1]}}codespan(e){const t=this.rules.inline.code.exec(e);if(t)return{type:"codespan",raw:t[0],text:n(t[2].trim(),!0)}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}}autolink(e,t){const i=this.rules.inline.autolink.exec(e);if(i){let e,a;return"@"===i[2]?(e=n(this.options.mangle?t(i[1]):i[1]),a="mailto:"+e):(e=n(i[1]),a=e),{type:"link",raw:i[0],text:e,href:a,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let i;if(i=this.rules.inline.url.exec(e)){let e,a;if("@"===i[2])e=n(this.options.mangle?t(i[0]):i[0]),a="mailto:"+e;else{let t;do{t=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(t!==i[0]);e=n(i[0]),a="www."===i[1]?"http://"+e:e}return{type:"link",raw:i[0],text:e,href:a,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t,i){const a=this.rules.inline.text.exec(e);if(a){let e;return e=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):n(a[0]):a[0]:n(this.options.smartypants?i(a[0]):a[0]),{type:"text",raw:a[0],text:e}}}}},58:function(e,t,i){const{defaults:a}=i(27),{cleanUrl:o,escape:r}=i(28);e.exports=class{constructor(e){this.options=e||a}code(e,t,i){const a=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,a);null!=t&&t!==e&&(i=!0,e=t)}return a?'
\n":"'+(i?e:r(e,!0))+"
"}blockquote(e){return""+(i?e:r(e,!0))+"\n"+e+"
\n"}html(e){return e}heading(e,t,i,a){return this.options.headerIds?"
\n":"
\n"}list(e,t,i){const a=t?"ol":"ul";return"<"+a+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+""+a+">\n"}listitem(e){return"\n\n"+e+"\n"+t+"
\n"}tablerow(e){return"\n"+e+" \n"}tablecell(e,t){const i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+""+i+">\n"}strong(e){return""+e+""}em(e){return""+e+""}codespan(e){return""+e+""}br(){return this.options.xhtml?"
":"
"}del(e){return""+e+""}link(e,t,i){if(null===(e=o(this.options.sanitize,this.options.baseUrl,e)))return i;let a='"+i+"",a}image(e,t,i){if(null===(e=o(this.options.sanitize,this.options.baseUrl,e)))return i;let a='":">",a}text(e){return e}}},59:function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}},6:function(e,t,i){"use strict";i.d(t,"d",(function(){return n.a})),i.d(t,"a",(function(){return a.b})),i.d(t,"b",(function(){return a.e})),i.d(t,"c",(function(){return a.g})),i.d(t,"e",(function(){return s}));var a=i(2);
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -909,7 +909,7 @@ const a="undefined"!=typeof window&&null!=window.customElements&&void 0!==window
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
-"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const s=(e,...t)=>new r.b(e,t,"html",o)},8:function(e,t,i){"use strict";i.d(t,"b",(function(){return o})),i.d(t,"a",(function(){return r}));var a=i(1);
+"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const s=(e,...t)=>new r.b(e,t,"html",o)},60:function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},8:function(e,t,i){"use strict";i.d(t,"b",(function(){return o})),i.d(t,"a",(function(){return r}));var a=i(1);
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -922,7 +922,7 @@ const a="undefined"!=typeof window&&null!=window.customElements&&void 0!==window
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
- */function o(e){let t=r.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},r.set(e.type,t));let i=t.stringsArray.get(e.strings);if(void 0!==i)return i;const o=e.strings.join(a.f);return i=t.keyString.get(o),void 0===i&&(i=new a.a(e,e.getTemplateElement()),t.keyString.set(o,i)),t.stringsArray.set(e.strings,i),i}const r=new Map},81:function(e,t,i){const a=i(102),o=i(104),r=i(56),n=i(57),s=i(58),l=i(59),{merge:c,checkSanitizeDeprecation:d,escape:b}=i(27),{getDefaults:f,changeDefaults:h,defaults:u}=i(26);function m(e,t,i){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(i||"function"==typeof t){i||(i=t,t=null),t=c({},m.defaults,t||{}),d(t);const r=t.highlight;let n,s,l=0;try{n=a.lex(e,t)}catch(e){return i(e)}s=n.length;const b=function(e){if(e)return t.highlight=r,i(e);let a;try{a=o.parse(n,t)}catch(t){e=t}return t.highlight=r,e?i(e):i(null,a)};if(!r||r.length<3)return b();if(delete t.highlight,!s)return b();for(;l
"+b(e.message+"",!0)+"";throw e}}m.options=m.setOptions=function(e){return c(m.defaults,e),h(m.defaults),m},m.getDefaults=f,m.defaults=u,m.use=function(e){const t=c({},e);if(e.renderer){const i=m.defaults.renderer||new n;for(const t in e.renderer){const a=i[t];i[t]=(...o)=>{let r=e.renderer[t].apply(i,o);return!1===r&&(r=a.apply(i,o)),r}}t.renderer=i}if(e.tokenizer){const i=m.defaults.tokenizer||new r;for(const t in e.tokenizer){const a=i[t];i[t]=(...o)=>{let r=e.tokenizer[t].apply(i,o);return!1===r&&(r=a.apply(i,o)),r}}t.tokenizer=i}m.setOptions(t)},m.Parser=o,m.parser=o.parse,m.Renderer=n,m.TextRenderer=s,m.Lexer=a,m.lexer=a.lex,m.Tokenizer=r,m.Slugger=l,m.parse=m,e.exports=m},82:function(e,t,i){var a=i(105);e.exports="string"==typeof a?a:a.toString()},83:function(e,t){e.exports=''},84:function(e,t){e.exports=''},85:function(e,t){e.exports=''},86:function(e,t){e.exports=''},87:function(e,t){e.exports=''},88:function(e,t){e.exports=''},89:function(e,t){e.exports=''},9:function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return s}));var a=i(5),o=i(2),r=i(8); + */function o(e){let t=r.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},r.set(e.type,t));let i=t.stringsArray.get(e.strings);if(void 0!==i)return i;const o=e.strings.join(a.f);return i=t.keyString.get(o),void 0===i&&(i=new a.a(e,e.getTemplateElement()),t.keyString.set(o,i)),t.stringsArray.set(e.strings,i),i}const r=new Map},82:function(e,t,i){const a=i(103),o=i(105),r=i(57),n=i(58),s=i(59),l=i(60),{merge:c,checkSanitizeDeprecation:d,escape:b}=i(28),{getDefaults:f,changeDefaults:h,defaults:u}=i(27);function m(e,t,i){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(i||"function"==typeof t){i||(i=t,t=null),t=c({},m.defaults,t||{}),d(t);const r=t.highlight;let n,s,l=0;try{n=a.lex(e,t)}catch(e){return i(e)}s=n.length;const b=function(e){if(e)return t.highlight=r,i(e);let a;try{a=o.parse(n,t)}catch(t){e=t}return t.highlight=r,e?i(e):i(null,a)};if(!r||r.length<3)return b();if(delete t.highlight,!s)return b();for(;l
"+b(e.message+"",!0)+"";throw e}}m.options=m.setOptions=function(e){return c(m.defaults,e),h(m.defaults),m},m.getDefaults=f,m.defaults=u,m.use=function(e){const t=c({},e);if(e.renderer){const i=m.defaults.renderer||new n;for(const t in e.renderer){const a=i[t];i[t]=(...o)=>{let r=e.renderer[t].apply(i,o);return!1===r&&(r=a.apply(i,o)),r}}t.renderer=i}if(e.tokenizer){const i=m.defaults.tokenizer||new r;for(const t in e.tokenizer){const a=i[t];i[t]=(...o)=>{let r=e.tokenizer[t].apply(i,o);return!1===r&&(r=a.apply(i,o)),r}}t.tokenizer=i}m.setOptions(t)},m.Parser=o,m.parser=o.parse,m.Renderer=n,m.TextRenderer=s,m.Lexer=a,m.lexer=a.lex,m.Tokenizer=r,m.Slugger=l,m.parse=m,e.exports=m},83:function(e,t,i){var a=i(106);e.exports="string"==typeof a?a:a.toString()},84:function(e,t){e.exports=''},85:function(e,t){e.exports=''},86:function(e,t){e.exports=''},87:function(e,t){e.exports=''},88:function(e,t){e.exports=''},89:function(e,t){e.exports=''},9:function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return s}));var a=i(5),o=i(2),r=i(8); /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -936,4 +936,4 @@ const a="undefined"!=typeof window&&null!=window.customElements&&void 0!==window * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -const n=new WeakMap,s=(e,t,i)=>{let s=n.get(t);void 0===s&&(Object(a.b)(t,t.firstChild),n.set(t,s=new o.e(Object.assign({templateFactory:r.b},i))),s.appendInto(t)),s.setValue(e),s.commit()}},90:function(e,t){e.exports=''},91:function(e,t){e.exports=''},92:function(e,t){e.exports=''}})); \ No newline at end of file +const n=new WeakMap,s=(e,t,i)=>{let s=n.get(t);void 0===s&&(Object(a.b)(t,t.firstChild),n.set(t,s=new o.e(Object.assign({templateFactory:r.b},i))),s.appendInto(t)),s.setValue(e),s.commit()}},90:function(e,t){e.exports=''},91:function(e,t){e.exports=''},92:function(e,t){e.exports=''},93:function(e,t){e.exports=''}})); \ No newline at end of file diff --git a/package.json b/package.json index b6c32fb..b0feeb9 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "replaywebpage", + "name": "ReplayWeb.page", "version": "1.0.0", "description": "Serverless Web Archive Replay", - "main": "index.js", + "main": "dist/electron.js", "repository": "https://github.com/webrecorder/replayweb.page", "author": "Ilya Kreymer
=0;){for(r=0,d=_[n]%1e7,m=_[n]/1e7|0,s=n+(o=u);s>n;)r=((h=d*(h=b[--o]%1e7)+(a=m*h+(c=b[o]/1e7|0)*d)%1e7*1e7+w[s]+r)/g|0)+(a/1e7|0)+m*c,w[s--]=h%g;w[s]=r}return r?++i:w.splice(0,1),H(t,w,i)},S.negated=function(){var t=new M(this);return t.s=-t.s||null,t},S.plus=function(t,e){var r,i=this,n=i.s;if(e=(t=new M(t,e)).s,!n||!e)return new M(NaN);if(n!=e)return t.s=-e,i.minus(t);var s=i.e/14,o=t.e/14,a=i.c,u=t.c;if(!s||!o){if(!a||!u)return new M(n/0);if(!a[0]||!u[0])return u[0]?t:new M(a[0]?i:0*n)}if(s=f(s),o=f(o),a=a.slice(),n=s-o){for(n>0?(o=s,r=u):(n=-n,r=a),r.reverse();n--;r.push(0));r.reverse()}for((n=a.length)-(e=u.length)<0&&(r=u,u=a,a=r,e=n),n=0;e;)n=(a[--e]=a[e]+u[e]+n)/l|0,a[e]=l===a[e]?0:a[e]%l;return n&&(a=[n].concat(a),++o),H(t,a,o)},S.precision=S.sd=function(t,e){var r,i,n,s=this;if(null!=t&&t!==!!t)return g(t,1,d),null==e?e=k:g(e,0,8),G(new M(s),t,e);if(!(r=s.c))return null;if(i=14*(n=r.length-1)+1,n=r[n]){for(;n%10==0;n/=10,i--);for(n=r[0];n>=10;n/=10,i++);}return t&&s.e+1>i&&(i=s.e+1),i},S.shiftedBy=function(t){return g(t,-9007199254740991,9007199254740991),this.times("1e"+t)},S.squareRoot=S.sqrt=function(){var t,e,i,n,s,o=this,a=o.c,u=o.s,h=o.e,c=D+4,l=new M("0.5");if(1!==u||!a||!a[0])return new M(!u||u<0&&(!a||a[0])?NaN:a?o:1/0);if(0==(u=Math.sqrt(+z(o)))||u==1/0?(((e=m(a)).length+h)%2==0&&(e+="0"),u=Math.sqrt(+e),h=f((h+1)/2)-(h<0||h%2),i=new M(e=u==1/0?"1e"+h:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+h)):i=new M(u+""),i.c[0])for((u=(h=i.e)+c)<3&&(u=0);;)if(s=i,i=l.times(s.plus(r(o,s,c,1))),m(s.c).slice(0,u)===(e=m(i.c)).slice(0,u)){if(i.e o){if(t.match_start=e,o=i,i>=a)break;d=h[s+o-1],f=h[s+o]}}}while((e=l[e&c])>u&&0!=--n);return o<=t.lookahead?o:t.lookahead}function g(t){var e,r,i,s,u,h,c,l,p,d,f=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-262)){n.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=r=t.hash_size;do{i=t.head[--e],t.head[e]=i>=f?i-f:0}while(--r);e=r=f;do{i=t.prev[--e],t.prev[e]=i>=f?i-f:0}while(--r);s+=f}if(0===t.strm.avail_in)break;if(h=t.strm,c=t.window,l=t.strstart+t.lookahead,p=s,d=void 0,(d=h.avail_in)>p&&(d=p),r=0===d?0:(h.avail_in-=d,n.arraySet(c,h.input,h.next_in,d,l),1===h.state.wrap?h.adler=o(h.adler,c,d,l):2===h.state.wrap&&(h.adler=a(h.adler,c,d,l)),h.next_in+=d,h.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),f(r)?i.showHidden=r:r&&e._extend(i,r),y(i.showHidden)&&(i.showHidden=!1),y(i.depth)&&(i.depth=2),y(i.colors)&&(i.colors=!1),y(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=u),c(i,t,i.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function h(t,e){return t}function c(t,r,i){if(t.customInspect&&r&&A(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(i,t);return g(n)||(n=c(t,n,i)),n}var s=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(g(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(w(e))return t.stylize(""+e,"number");if(f(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(s)return s;var o=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),v(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(r);if(0===o.length){if(A(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(b(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(v(r))return l(r)}var h,_="",T=!1,x=["{","}"];(d(r)&&(T=!0,x=["[","]"]),A(r))&&(_=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(_=" "+RegExp.prototype.toString.call(r)),E(r)&&(_=" "+Date.prototype.toUTCString.call(r)),v(r)&&(_=" "+l(r)),0!==o.length||T&&0!=r.length?i<0?b(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),h=T?function(t,e,r,i,n){for(var s=[],o=0,a=e.length;o=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(h,_,x)):x[0]+_+x[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,i,n,s){var o,a,u;if((u=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),D(i,n)||(o="["+n+"]"),a||(t.seen.indexOf(u.value)<0?(a=m(r)?c(t,u.value,null):c(t,u.value,r-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),y(o)){if(s&&n.match(/^\d+$/))return a;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+a}function d(t){return Array.isArray(t)}function f(t){return"boolean"==typeof t}function m(t){return null===t}function w(t){return"number"==typeof t}function g(t){return"string"==typeof t}function y(t){return void 0===t}function b(t){return _(t)&&"[object RegExp]"===T(t)}function _(t){return"object"==typeof t&&null!==t}function E(t){return _(t)&&"[object Date]"===T(t)}function v(t){return _(t)&&("[object Error]"===T(t)||t instanceof Error)}function A(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function x(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(y(s)&&(s=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!o[r])if(new RegExp("\\b"+r+"\\b","i").test(s)){var i=t.pid;o[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,i,t)}}else o[r]=function(){};return o[r]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=f,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=w,e.isString=g,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=y,e.isRegExp=b,e.isObject=_,e.isDate=E,e.isError=v,e.isFunction=A,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(189);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var t=new Date,e=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function D(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(190),e._extend=function(t,e){if(!e||!_(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(k&&t[k]){var e;if("function"!=typeof(e=t[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,i=new Promise((function(t,i){e=t,r=i})),n=[],s=0;s0&&(u=this._consume(),i++),u===a.EOF){n=!1;break}if(h=t[o],u!==h&&(r||u!==b(h))){n=!1;break}}if(!n)for(;i--;)this._unconsume();return n}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==u.SCRIPT_STRING.length)return!1;for(let t=0;t{const s=[],o=new C(r);o.on("data",t=>s.push(t)),o.on("error",n),o.on("finish",()=>i(e.concat(s))),o.pushAny(t),o.end()})}}t.exports=C}).call(this,r(14).Buffer)},,,,,,,,,,,,,function(t,e,r){"use strict";const i=r(123),{escapeString:n}=r(131);t.exports=class extends i{constructor(){super({sourceCodeLocationInfo:!0}),this.posTracker=this.locInfoMixin.posTracker}_transformChunk(t){super._transformChunk(t)}_getRawHtml(t){const e=this.posTracker.droppedBufferSize,r=t.startOffset-e,i=t.endOffset-e;return this.tokenizer.preprocessor.html.slice(r,i)}_handleToken(t){super._handleToken(t)||this.emitRaw(this._getRawHtml(t.location)),this.parserFeedbackSimulator.skipNextNewLine=!1}_emitToken(t,e){this.emit(t,e,this._getRawHtml(e.sourceCodeLocation))}emitDoctype(t){let e="",this.push(e)}emitStartTag(t){let e="<"+t.tagName;const r=t.attrs;for(let t=0;t0&&(0===t||1!==S))return-1;for(B[1]=0,A=1;A<15;A++)B[A+1]=B[A]+P[A];for(T=0;T852||2===t&&N>592)return 1;for(;;){b=A-k,l[T]852||2===t&&N>592)return 1;h[m=I&w]=C<<24|D<<16|g-c|0}}return 0!==I&&(h[g+I]=A-k<<24|64<<16|0),p.bits=C,0}},function(t,e,r){"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}},function(t,e,r){"use strict";var i=r(38),n=r(150),s=r(151),o=r(152),a=r(153);function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){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 c(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):-2}function l(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,c(t)):-2}function p(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)?-2:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,l(t))):-2}function d(t,e){var r,i;return t?(i=new h,t.state=i,i.window=null,0!==(r=p(t,e))&&(t.state=null),r):-2}var f,m,w=!0;function g(t){if(w){var e;for(f=new i.Buf32(512),m=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,f,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,m,0,t.work,{bits:5}),w=!1}t.lencode=f,t.lenbits=9,t.distcode=m,t.distbits=5}function y(t,e,r,n){var s,o=t.state;return null===o.window&&(o.wsize=1<0&&(0===t||1!==S))return-1;for(B[1]=0,A=1;A<15;A++)B[A+1]=B[A]+P[A];for(T=0;T852||2===t&&N>592)return 1;for(;;){b=A-k,l[T]852||2===t&&N>592)return 1;h[m=I&w]=C<<24|D<<16|g-c|0}}return 0!==I&&(h[g+I]=A-k<<24|64<<16|0),p.bits=C,0}},function(t,e,r){"use strict";var i=r(38),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 u(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=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function f(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(t).length;default:if(i)return W(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return D(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function w(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function g(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=u.from(e,i)),u.isBuffer(e))return 0===e.length?-1:y(t,e,r,i,n);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,i,n){var s,o=1,a=t.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,a/=2,u/=2,r/=2}function h(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(n){var c=-1;for(s=r;sa&&(r=a-u),s=r;s>=0;s--){for(var l=!0,p=0;pn&&(i=n):i=n;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var o=0;o>8,n=r%256,s.push(n),s.push(i);return s}(e,t.length-r),t,r,i)}function x(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;nt.length)throw new RangeError("Index out of range")}function O(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,s=Math.min(t.length-r,2);n