diff --git a/main.js b/main.js
index 9db9ea1..50ebebe 100644
--- a/main.js
+++ b/main.js
@@ -3,7 +3,7 @@
object-assign
(c) Sindre Sorhus
@license MIT
-*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,u=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;lc;)i.call(a,n=u[c++])&&s.push(t?[n,a[n]]:a[n]);return s}}},function(t,e,n){var r=n(8),o=n(90),i=n(30);t.exports=function(t,e,n,a){var u=String(i(t)),l=u.length,c=void 0===n?" ":String(n),s=r(e);if(s<=l||""==c)return u;var f=s-l,p=o.call(c,Math.ceil(f/c.length));return p.length>f&&(p=p.slice(0,f)),a?p+u:u+p}},function(t,e,n){"use strict";var r=n(68),o=n(6),i=n(8),a=n(25),u=n(7)("isConcatSpreadable");t.exports=function t(e,n,l,c,s,f,p,d){for(var h,v,m=s,y=0,g=!!p&&a(p,d,3);y0)m=t(e,n,h,i(h.length),m,f-1)-1;else{if(m>=9007199254740991)throw TypeError();e[m]=h}m++}y++}return m}},function(t,e,n){var r=n(42),o=n(69),i=n(3),a=n(4).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(29),o=n(8);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){"use strict";var r=n(38),o=n(36).getWeak,i=n(3),a=n(6),u=n(40),l=n(39),c=n(27),s=n(22),f=n(50),p=c(5),d=c(6),h=0,v=function(t){return t._l||(t._l=new m)},m=function(){this.a=[]},y=function(t,e){return p(t.a,function(t){return t[0]===e})};m.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=d(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var c=t(function(t,r){u(t,c,e,"_i"),t._t=e,t._i=h++,t._l=void 0,void 0!=r&&l(r,n,t[i],t)});return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?v(f(this,e)).delete(t):n&&s(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?v(f(this,e)).has(t):n&&s(n,this._i)}}),c},def:function(t,e,n){var r=o(i(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},function(t,e,n){"use strict";var r,o=n(27)(0),i=n(17),a=n(36),u=n(134),l=n(114),c=n(6),s=n(5),f=n(50),p=a.getWeak,d=Object.isExtensible,h=l.ufstore,v={},m=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(c(t)){var e=p(t);return!0===e?h(f(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return l.def(f(this,"WeakMap"),t,e)}},g=t.exports=n(61)("WeakMap",m,y,l,!0,!0);s(function(){return 7!=(new g).set((Object.freeze||Object)(v),7).get(v)})&&(u((r=l.getConstructor(m,"WeakMap")).prototype,y),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=g.prototype,n=e[t];i(e,t,function(e,o){if(c(e)&&!d(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},function(t,e,n){"use strict";var r=n(117),o=n(50);t.exports=n(61)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r=n(9).f,o=n(43),i=n(38),a=n(25),u=n(40),l=n(39),c=n(86),s=n(122),f=n(41),p=n(10),d=n(36).fastKey,h=n(50),v=p?"_s":"size",m=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var s=t(function(t,r){u(t,s,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,void 0!=r&&l(r,n,t[c],t)});return i(s.prototype,{clear:function(){for(var t=h(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=h(this,e),r=m(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[v]--}return!!r},forEach:function(t){h(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!m(h(this,e),t)}}),p&&r(s.prototype,"size",{get:function(){return h(this,e)[v]}}),s},def:function(t,e,n){var r,o,i=m(t,e);return i?i.v=n:(t._l=i={i:o=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[v]++,"F"!==o&&(t._i[o]=i)),t},getEntry:m,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=h(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?s(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,s(1))},n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var r=n(117),o=n(50);t.exports=n(61)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(o(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){var r=n(3),o=n(6),i=n(74);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){n(10)&&"g"!=/./g.flags&&n(9).f(RegExp.prototype,"flags",{configurable:!0,get:n(65)})},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(13),o=n(44),i=n(8);t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),u=o(t,a),l=o(e,a),c=arguments.length>2?arguments[2]:void 0,s=Math.min((void 0===c?a:o(c,a))-l,a-u),f=1;for(l0;)l in n?n[u]=n[l]:delete n[u],u+=f,l+=f;return n}},function(t,e,n){var r=n(15),o=n(13),i=n(56),a=n(8);t.exports=function(t,e,n,u,l){r(e);var c=o(t),s=i(c),f=a(c.length),p=l?f-1:0,d=l?-1:1;if(n<2)for(;;){if(p in s){u=s[p],p+=d;break}if(p+=d,l?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;l?p>=0:f>p;p+=d)p in s&&(u=e(u,s[p],p,c));return u}},function(t,e,n){var r=n(3);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(89),o=Math.pow,i=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),l=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),c=r(t);return ou||n!=n?c*(1/0):c*n}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(6),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e,n){var r=n(24);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(4).parseFloat,o=n(52).trim;t.exports=1/r(n(92)+"-0")!=-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(4).parseInt,o=n(52).trim,i=n(92),a=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){"use strict";var r=n(15),o=n(6),i=n(132),a=[].slice,u={};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),l=function(){var r=n.concat(a.call(arguments));return this instanceof l?function(t,e,n){if(!(e in u)){for(var r=[],o=0;oc;)for(var p,d=u(arguments[c++]),h=s?r(d).concat(s(d)):r(d),v=h.length,m=0;v>m;)f.call(d,p=h[m++])&&(n[p]=d[p]);return n}:l},function(t,e,n){var r=n(21),o=n(42).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},function(t,e,n){var r=n(9),o=n(3),i=n(45);t.exports=n(10)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),u=a.length,l=0;u>l;)r.f(t,n=a[l++],e[n]);return t}},function(t,e,n){var r=n(22),o=n(21),i=n(70)(!1),a=n(96)("IE_PROTO");t.exports=function(t,e){var n,u=o(t),l=0,c=[];for(n in u)n!=a&&r(u,n)&&c.push(n);for(;e.length>l;)r(u,n=e[l++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){e.f=n(7)},function(t,e,n){t.exports=!n(10)&&!n(5)(function(){return 7!=Object.defineProperty(n(98)("div"),"a",{get:function(){return 7}}).a})},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(t){if(n(371),n(174),n(173),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var e="defineProperty";function r(t,n,r){t[n]||Object[e](t,n,{writable:!0,configurable:!0,value:r})}r(String.prototype,"padLeft","".padStart),r(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&r(Array,t,Function.call.bind([][t]))})}).call(this,n(140))},function(t,e,n){"use strict";e.__esModule=!0;var r=n(2),o=(i(r),i(n(1)));function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var c=0;e.default=function(t){var e,n,i="__create-react-context-"+c+++"__",s=function(t){function e(){var n,r;a(this,e);for(var o=arguments.length,i=Array(o),l=0;l[removed too quickly to be archived]
":(0,a.parse)(e.body),l="/r/"+e.subreddit+"/comments/"+e.link_id+"/_/"+e.id+"/";return o.default.createElement("div",{id:e.id,className:n},o.default.createElement("div",{className:"comment-head"},o.default.createElement("a",{href:"#",onClick:function(){return!1},className:"author"},"[–]"),o.default.createElement("span",{className:"space"}),o.default.createElement("a",{href:"[deleted]"!==e.author?"https://www.reddit.com/user/"+e.author:void 0,className:"author comment-author"},e.author,e.deleted&&" (deleted by user)"),o.default.createElement("span",{className:"space"}),o.default.createElement("span",{className:"comment-score"},(0,a.prettyScore)(e.score)," point",1!==e.score&&"s"),o.default.createElement("span",{className:"space"}),o.default.createElement("span",{className:"comment-time"},(0,a.prettyDate)(e.created_utc))),o.default.createElement("div",{className:"comment-body",dangerouslySetInnerHTML:{__html:u}}),o.default.createElement("div",{className:"comment-links"},o.default.createElement(i.Link,{to:l},"permalink"),o.default.createElement("a",{href:"https://www.reddit.com"+l},"reddit"),o.default.createElement("a",{href:"https://snew.github.io"+l},"ceddit")),o.default.createElement("div",null,e.replies.map(function(n){return o.default.createElement(t,r({key:n.id},n,{depth:e.depth+1}))})))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e0&&t(e.replies,n)})},s=function t(e,n){if(0===e.length)return!1;for(var r=!1,o=e.length-1;o>=0;o--){var i=e[o],a=t(i.replies,n),u=n(i);a||u?r=!0:e.splice(o,1)}return r};e.default=(0,a.connect)(function(t){console.time("render comment section");var e=function(t,e,n,r){var o=function(t,e,n){var r={};return t.forEach(function(t){t.replies=[],e.includes(t.id)?t.removed=!0:n.includes(t.id)&&(t.deleted=!0),r[t.id]=t}),r}(t,n,r),i=[];return Object.keys(o).forEach(function(t){var n=o[t],r=n.parent_id;if(r===e)i.push(n);else{if(void 0===o[r])return void console.error("MISSING PARENT ID:",r,"for comment",n);o[r].replies.push(n)}}),void 0!==o[e]?(o[e].replies=i,[o[e]]):i}(t.comments,t.root,t.removed,t.deleted),n=t.global.state,l=n.commentFilter,f=n.commentSort;return l===a.filter.removedDeleted?s(e,u.showRemovedAndDeleted):l===a.filter.removed?s(e,u.showRemoved):l===a.filter.deleted&&s(e,u.showDeleted),f===a.sort.top?c(e,u.topSort):f===a.sort.bottom?c(e,u.bottomSort):f===a.sort.new?c(e,u.newSort):f===a.sort.old&&c(e,u.oldSort),console.timeEnd("render comment section"),0!==e.length?e.map(function(t){return o.default.createElement(i.default,r({key:t.id},t,{depth:0}))}):o.default.createElement("p",null,"No comments found")})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getComments=e.getPost=void 0;var r=n(37);e.getPost=function(t){var e={query:{term:{id:(0,r.toBase10)(t)}}};return window.fetch("https://elastic.pushshift.io/rs/submissions/_search?source="+JSON.stringify(e)).then(function(t){return t.json()}).then(function(t){var e=t.hits.hits[0]._source;return e.id=(0,r.toBase36)(e.id),e}).catch(function(){throw new Error("Could not get removed post")})},e.getComments=function(t){var e={query:{match:{link_id:(0,r.toBase10)(t)}},size:1e4,_source:["author","body","created_utc","parent_id","score","subreddit","link_id"]};return window.fetch("https://elastic.pushshift.io/rc/comments/_search?source="+JSON.stringify(e)).then(function(t){return t.json()}).then(function(e){return e.hits.hits.map(function(e){return e._source.id=(0,r.toBase36)(e._id),e._source.link_id=(0,r.toBase36)(e._source.link_id),e._source.parent_id?e._source.parent_id=(0,r.toBase36)(e._source.parent_id):e._source.parent_id=t,e._source})}).catch(function(){throw new Error("Could not get removed comments")})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return"all"===t.toLowerCase()&&(t=""),window.fetch("https://removeddit.com/api/threads?subreddit="+t+"&page="+(e-1)).then(function(t){return t.json()}).catch(function(){throw new Error("Could not get removed threads")})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;ec;)i.call(a,n=u[c++])&&s.push(t?[n,a[n]]:a[n]);return s}}},function(t,e,n){var r=n(8),o=n(90),i=n(30);t.exports=function(t,e,n,a){var u=String(i(t)),l=u.length,c=void 0===n?" ":String(n),s=r(e);if(s<=l||""==c)return u;var f=s-l,p=o.call(c,Math.ceil(f/c.length));return p.length>f&&(p=p.slice(0,f)),a?p+u:u+p}},function(t,e,n){"use strict";var r=n(68),o=n(6),i=n(8),a=n(25),u=n(7)("isConcatSpreadable");t.exports=function t(e,n,l,c,s,f,p,d){for(var h,v,m=s,y=0,g=!!p&&a(p,d,3);y0)m=t(e,n,h,i(h.length),m,f-1)-1;else{if(m>=9007199254740991)throw TypeError();e[m]=h}m++}y++}return m}},function(t,e,n){var r=n(42),o=n(69),i=n(3),a=n(4).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(29),o=n(8);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){"use strict";var r=n(38),o=n(36).getWeak,i=n(3),a=n(6),u=n(40),l=n(39),c=n(27),s=n(22),f=n(50),p=c(5),d=c(6),h=0,v=function(t){return t._l||(t._l=new m)},m=function(){this.a=[]},y=function(t,e){return p(t.a,function(t){return t[0]===e})};m.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=d(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var c=t(function(t,r){u(t,c,e,"_i"),t._t=e,t._i=h++,t._l=void 0,void 0!=r&&l(r,n,t[i],t)});return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?v(f(this,e)).delete(t):n&&s(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?v(f(this,e)).has(t):n&&s(n,this._i)}}),c},def:function(t,e,n){var r=o(i(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},function(t,e,n){"use strict";var r,o=n(27)(0),i=n(17),a=n(36),u=n(134),l=n(114),c=n(6),s=n(5),f=n(50),p=a.getWeak,d=Object.isExtensible,h=l.ufstore,v={},m=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(c(t)){var e=p(t);return!0===e?h(f(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return l.def(f(this,"WeakMap"),t,e)}},g=t.exports=n(61)("WeakMap",m,y,l,!0,!0);s(function(){return 7!=(new g).set((Object.freeze||Object)(v),7).get(v)})&&(u((r=l.getConstructor(m,"WeakMap")).prototype,y),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=g.prototype,n=e[t];i(e,t,function(e,o){if(c(e)&&!d(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},function(t,e,n){"use strict";var r=n(117),o=n(50);t.exports=n(61)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r=n(9).f,o=n(43),i=n(38),a=n(25),u=n(40),l=n(39),c=n(86),s=n(122),f=n(41),p=n(10),d=n(36).fastKey,h=n(50),v=p?"_s":"size",m=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var s=t(function(t,r){u(t,s,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,void 0!=r&&l(r,n,t[c],t)});return i(s.prototype,{clear:function(){for(var t=h(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=h(this,e),r=m(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[v]--}return!!r},forEach:function(t){h(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!m(h(this,e),t)}}),p&&r(s.prototype,"size",{get:function(){return h(this,e)[v]}}),s},def:function(t,e,n){var r,o,i=m(t,e);return i?i.v=n:(t._l=i={i:o=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[v]++,"F"!==o&&(t._i[o]=i)),t},getEntry:m,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=h(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?s(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,s(1))},n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var r=n(117),o=n(50);t.exports=n(61)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(o(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){var r=n(3),o=n(6),i=n(74);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){n(10)&&"g"!=/./g.flags&&n(9).f(RegExp.prototype,"flags",{configurable:!0,get:n(65)})},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(13),o=n(44),i=n(8);t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),u=o(t,a),l=o(e,a),c=arguments.length>2?arguments[2]:void 0,s=Math.min((void 0===c?a:o(c,a))-l,a-u),f=1;for(l0;)l in n?n[u]=n[l]:delete n[u],u+=f,l+=f;return n}},function(t,e,n){var r=n(15),o=n(13),i=n(56),a=n(8);t.exports=function(t,e,n,u,l){r(e);var c=o(t),s=i(c),f=a(c.length),p=l?f-1:0,d=l?-1:1;if(n<2)for(;;){if(p in s){u=s[p],p+=d;break}if(p+=d,l?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;l?p>=0:f>p;p+=d)p in s&&(u=e(u,s[p],p,c));return u}},function(t,e,n){var r=n(3);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(89),o=Math.pow,i=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),l=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),c=r(t);return ou||n!=n?c*(1/0):c*n}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(6),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e,n){var r=n(24);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(4).parseFloat,o=n(52).trim;t.exports=1/r(n(92)+"-0")!=-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(4).parseInt,o=n(52).trim,i=n(92),a=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){"use strict";var r=n(15),o=n(6),i=n(132),a=[].slice,u={};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),l=function(){var r=n.concat(a.call(arguments));return this instanceof l?function(t,e,n){if(!(e in u)){for(var r=[],o=0;oc;)for(var p,d=u(arguments[c++]),h=s?r(d).concat(s(d)):r(d),v=h.length,m=0;v>m;)f.call(d,p=h[m++])&&(n[p]=d[p]);return n}:l},function(t,e,n){var r=n(21),o=n(42).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},function(t,e,n){var r=n(9),o=n(3),i=n(45);t.exports=n(10)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),u=a.length,l=0;u>l;)r.f(t,n=a[l++],e[n]);return t}},function(t,e,n){var r=n(22),o=n(21),i=n(70)(!1),a=n(96)("IE_PROTO");t.exports=function(t,e){var n,u=o(t),l=0,c=[];for(n in u)n!=a&&r(u,n)&&c.push(n);for(;e.length>l;)r(u,n=e[l++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){e.f=n(7)},function(t,e,n){t.exports=!n(10)&&!n(5)(function(){return 7!=Object.defineProperty(n(98)("div"),"a",{get:function(){return 7}}).a})},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(t){if(n(371),n(174),n(173),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var e="defineProperty";function r(t,n,r){t[n]||Object[e](t,n,{writable:!0,configurable:!0,value:r})}r(String.prototype,"padLeft","".padStart),r(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&r(Array,t,Function.call.bind([][t]))})}).call(this,n(140))},function(t,e,n){"use strict";e.__esModule=!0;var r=n(2),o=(i(r),i(n(1)));function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var c=0;e.default=function(t){var e,n,i="__create-react-context-"+c+++"__",s=function(t){function e(){var n,r;a(this,e);for(var o=arguments.length,i=Array(o),l=0;l[removed too quickly to be archived]":(0,a.parse)(e.body),l="/r/"+e.subreddit+"/comments/"+e.link_id+"/_/"+e.id+"/";return o.default.createElement("div",{id:e.id,className:n},o.default.createElement("div",{className:"comment-head"},o.default.createElement("a",{href:"#",onClick:function(){return!1},className:"author"},"[–]"),o.default.createElement("span",{className:"space"}),o.default.createElement("a",{href:"[deleted]"!==e.author?"https://www.reddit.com/user/"+e.author:void 0,className:"author comment-author"},e.author,e.deleted&&" (deleted by user)"),o.default.createElement("span",{className:"space"}),o.default.createElement("span",{className:"comment-score"},(0,a.prettyScore)(e.score)," point",1!==e.score&&"s"),o.default.createElement("span",{className:"space"}),o.default.createElement("span",{className:"comment-time"},(0,a.prettyDate)(e.created_utc))),o.default.createElement("div",{className:"comment-body",dangerouslySetInnerHTML:{__html:u}}),o.default.createElement("div",{className:"comment-links"},o.default.createElement(i.Link,{to:l},"permalink"),o.default.createElement("a",{href:"https://www.reddit.com"+l},"reddit"),o.default.createElement("a",{href:"https://snew.github.io"+l},"ceddit")),o.default.createElement("div",null,e.replies.map(function(n){return o.default.createElement(t,r({key:n.id},n,{depth:e.depth+1}))})))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e0&&t(e.replies,n)})},s=function t(e,n){if(0===e.length)return!1;for(var r=!1,o=e.length-1;o>=0;o--){var i=e[o],a=t(i.replies,n),u=n(i);a||u?r=!0:e.splice(o,1)}return r};e.default=(0,a.connect)(function(t){console.time("render comment section");var e=function(t,e,n,r){var o=function(t,e,n){var r={};return t.forEach(function(t){t.replies=[],e.includes(t.id)?t.removed=!0:n.includes(t.id)&&(t.deleted=!0),r[t.id]=t}),r}(t,n,r),i=[];return Object.keys(o).forEach(function(t){var n=o[t],r=n.parent_id;if(r===e)i.push(n);else{if(void 0===o[r])return void console.error("MISSING PARENT ID:",r,"for comment",n);o[r].replies.push(n)}}),void 0!==o[e]?(o[e].replies=i,[o[e]]):i}(t.comments,t.root,t.removed,t.deleted),n=t.global.state,l=n.commentFilter,f=n.commentSort;return l===a.filter.removedDeleted?s(e,u.showRemovedAndDeleted):l===a.filter.removed?s(e,u.showRemoved):l===a.filter.deleted&&s(e,u.showDeleted),f===a.sort.top?c(e,u.topSort):f===a.sort.bottom?c(e,u.bottomSort):f===a.sort.new?c(e,u.newSort):f===a.sort.old&&c(e,u.oldSort),console.timeEnd("render comment section"),0!==e.length?e.map(function(t){return o.default.createElement(i.default,r({key:t.id},t,{depth:0}))}):o.default.createElement("p",null,"No comments found")})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getComments=e.getPost=void 0;var r=n(37);e.getPost=function(t){var e={query:{term:{id:(0,r.toBase10)(t)}}};return window.fetch("https://elastic.pushshift.io/rs/submissions/_search?source="+JSON.stringify(e)).then(function(t){return t.json()}).then(function(t){var e=t.hits.hits[0]._source;return e.id=(0,r.toBase36)(e.id),e}).catch(function(){throw new Error("Could not get removed post")})},e.getComments=function(t){var e={query:{match:{link_id:(0,r.toBase10)(t)}},size:25e3,_source:["author","body","created_utc","parent_id","score","subreddit","link_id"]};return window.fetch("https://elastic.pushshift.io/rc/comments/_search?source="+JSON.stringify(e)).then(function(t){return t.json()}).then(function(e){return e.hits.hits.map(function(e){return e._source.id=(0,r.toBase36)(e._id),e._source.link_id=(0,r.toBase36)(e._source.link_id),e._source.parent_id?e._source.parent_id=(0,r.toBase36)(e._source.parent_id):e._source.parent_id=t,e._source})}).catch(function(){throw new Error("Could not get removed comments")})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return"all"===t.toLowerCase()&&(t=""),window.fetch("https://removeddit.com/api/threads?subreddit="+t+"&page="+(e-1)).then(function(t){return t.json()}).catch(function(){throw new Error("Could not get removed threads")})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e