You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
12 KiB
JavaScript

var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function o(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(t,e,n,r){return t[1]&&r?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](r(e))):n.ctx}function a(t,e,n,r,o,i,a){const l=function(t,e,n,r){if(t[2]&&r){const o=t[2](r(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|o[r];return t}return e.dirty|o}return e.dirty}(e,r,o,i);if(l){const o=s(e,n,r,a);t.p(o,l)}}function l(t,e){t.appendChild(e)}function c(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode.removeChild(t)}function h(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function p(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function g(){return f(" ")}function d(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function $(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function W(t,e){for(let n=0;n<t.options.length;n+=1){const r=t.options[n];if(r.__value===e)return void(r.selected=!0)}}function x(t,e,n){t.classList[n?"add":"remove"](e)}let y;function b(t){y=t}const w=[],v=[],k=[],_=[],z=Promise.resolve();let j=!1;function T(t){k.push(t)}let E=!1;const C=new Set;function S(){if(!E){E=!0;do{for(let t=0;t<w.length;t+=1){const e=w[t];b(e),L(e.$$)}for(b(null),w.length=0;v.length;)v.pop()();for(let t=0;t<k.length;t+=1){const e=k[t];C.has(e)||(C.add(e),e())}k.length=0}while(w.length);for(;_.length;)_.pop()();j=!1,E=!1,C.clear()}}function L(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(T)}}const M=new Set;let A;function H(){A={r:0,c:[],p:A}}function N(){A.r||r(A.c),A=A.p}function B(t,e){t&&t.i&&(M.delete(t),t.i(e))}function I(t,e,n,r){if(t&&t.o){if(M.has(t))return;M.add(t),A.c.push((()=>{M.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}}function O(t){t&&t.c()}function P(t,n,i){const{fragment:s,on_mount:a,on_destroy:l,after_update:c}=t.$$;s&&s.m(n,i),T((()=>{const n=a.map(e).filter(o);l?l.push(...n):r(n),t.$$.on_mount=[]})),c.forEach(T)}function q(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function D(t,e){-1===t.$$.dirty[0]&&(w.push(t),j||(j=!0,z.then(S)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function R(e,o,i,s,a,l,c=[-1]){const h=y;b(e);const p=o.props||{},f=e.$$={fragment:null,ctx:null,props:l,update:t,not_equal:a,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(h?h.$$.context:[]),callbacks:n(),dirty:c,skip_bound:!1};let g=!1;if(f.ctx=i?i(e,p,((t,n,...r)=>{const o=r.length?r[0]:n;return f.ctx&&a(f.ctx[t],f.ctx[t]=o)&&(!f.skip_bound&&f.bound[t]&&f.bound[t](o),g&&D(e,t)),n})):[],f.update(),g=!0,r(f.before_update),f.fragment=!!s&&s(f.ctx),o.target){if(o.hydrate){const t=function(t){return Array.from(t.childNodes)}(o.target);f.fragment&&f.fragment.l(t),t.forEach(u)}else f.fragment&&f.fragment.c();o.intro&&B(e.$$.fragment),P(e,o.target,o.anchor),S()}b(h)}class F{$destroy(){q(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function J(t){let e,n;const r=t[2].default,o=function(t,e,n,r){if(t){const o=s(t,e,n,r);return t[0](o)}}(r,t,t[1],null);return{c(){e=p("a"),o&&o.c(),m(e,"href",t[0]),m(e,"rel","noopener"),m(e,"target","_blank")},m(t,r){c(t,e,r),o&&o.m(e,null),n=!0},p(t,[i]){o&&o.p&&2&i&&a(o,r,t,t[1],i,null,null),(!n||1&i)&&m(e,"href",t[0])},i(t){n||(B(o,t),n=!0)},o(t){I(o,t),n=!1},d(t){t&&u(e),o&&o.d(t)}}}function U(t,e,n){let{$$slots:r={},$$scope:o}=e,{href:i}=e;return t.$$set=t=>{"href"in t&&n(0,i=t.href),"$$scope"in t&&n(1,o=t.$$scope)},[i,o,r]}class G extends F{constructor(t){super(),R(this,t,U,J,i,{href:0})}}function K(t){let e;return{c(){e=f("Phantomas")},m(t,n){c(t,e,n)},d(t){t&&u(e)}}}function Q(t){let e,n,r,o,i,s,a,h,d,$,W,x,y,b;return h=new G({props:{href:"https://github.com/macbre/phantomas",$$slots:{default:[K]},$$scope:{ctx:t}}}),{c(){e=p("article"),n=p("header"),n.innerHTML="<h1>Technical Details</h1>",r=g(),o=p("p"),o.textContent="The values shown in the list are URL, Total Weight, Content Ratio.",i=g(),s=p("p"),a=f("Websites listed here are downloaded and analyzed with\n "),O(h.$$.fragment),d=f(".\n The total weight is counted and then the size of actual content is measured\n and shown as a ratio."),$=g(),W=p("p"),W.textContent="For example: If a website has a total weight of 100kb and 60kb are the\n documents structure, text, images, videos and so on, then the content ratio\n is 60%. The rest are extras like CSS, JavaScript and so on. It is hard to\n say what a good ratio is but my gut feeling is that everything above 20% is\n pretty good already.",x=g(),y=p("p"),y.innerHTML="<strong>Disclaimer:</strong> Currently, inline scripts and styles are\n measured as content due to technical limitations of Phantomas. This will\n hopefully be fixed soon.",m(e,"id","info-popup")},m(t,u){c(t,e,u),l(e,n),l(e,r),l(e,o),l(e,i),l(e,s),l(s,a),P(h,s,null),l(s,d),l(e,$),l(e,W),l(e,x),l(e,y),b=!0},p(t,[e]){const n={};1&e&&(n.$$scope={dirty:e,ctx:t}),h.$set(n)},i(t){b||(B(h.$$.fragment,t),b=!0)},o(t){I(h.$$.fragment,t),b=!1},d(t){t&&u(e),q(h)}}}class V extends F{constructor(t){super(),R(this,t,null,Q,i,{})}}var X=[{url:"https://koehr.in",contentWeight:23078,extraWeight:66537,stamp:1606004545427},{url:"https://koehr.tech",contentWeight:4964,extraWeight:20108,stamp:1606004547391},{url:"https://sjmulder.nl",contentWeight:2361,extraWeight:0,stamp:1606004663706},{url:"http://cyberia.host",contentWeight:1191,extraWeight:0,stamp:1606004664417},{url:"https://text.npr.org",contentWeight:2760,extraWeight:0,stamp:1606004665037},{url:"https://playerone.kevincox.ca",contentWeight:1904,extraWeight:42661,stamp:1606004665881},{url:"https://dotfilehub.com",contentWeight:961,extraWeight:1281,stamp:1606004667422},{url:"https://manpages.bsd.lv",contentWeight:7045,extraWeight:1346,stamp:1606004669823},{url:"https://danluu.com",contentWeight:2895,extraWeight:0,stamp:1606004670441},{url:"https://gtf.io",contentWeight:2040,extraWeight:2752,stamp:1606004671103},{url:"http://minid.net",contentWeight:4110,extraWeight:0,stamp:1606004672171},{url:"https://250kb.club",contentWeight:1682,extraWeight:8330,stamp:1606070901151},{url:"https://subreply.com",contentWeight:6713,extraWeight:52472,stamp:1606070902296},{url:"https://seirdy.one",contentWeight:1554,extraWeight:1951,stamp:1606070903577},{url:"https://richj.co",contentWeight:2119,extraWeight:1840,stamp:1606070904708},{url:"https://mkws.sh/",contentWeight:75059,extraWeight:7051,stamp:1606070907275},{url:"https://porkbrain.com",contentWeight:89742,extraWeight:1941,stamp:1606070908242},{url:"https://pgjones.dev",contentWeight:15979,extraWeight:187928,stamp:1606070910182},{url:"https://jaime.gomezobregon.com",contentWeight:21100,extraWeight:71592,stamp:1606070911329},{url:"https://lawzava.com",contentWeight:2324,extraWeight:2267,stamp:1606070912369},{url:"https://www.cleanpython.com/",contentWeight:7781,extraWeight:126068,stamp:1606070914335},{url:"https://monokai.nl",contentWeight:4823,extraWeight:85479,stamp:1606070915137},{url:"https://flatpackapps.com",contentWeight:41219,extraWeight:1262,stamp:1606070917537},{url:"https://frontaid.io",contentWeight:59536,extraWeight:103859,stamp:1606070918722},{url:"https://worldti.me",contentWeight:3099,extraWeight:39571,stamp:1606070920657},{url:"https://sneak.berlin",contentWeight:187882,extraWeight:1257173,stamp:1606070922342},{url:"https://plumebio.com",contentWeight:1994,extraWeight:1598,stamp:1606070924010},{url:"https://jeremysarber.com",contentWeight:2522,extraWeight:0,stamp:1606070925135},{url:"https://kunalmarwaha.com/",contentWeight:917,extraWeight:850,stamp:1606084225033},{url:"https://weboas.is/",contentWeight:20293,extraWeight:93372,stamp:1606084229149},{url:"https://jlelse.blog/",contentWeight:3834,extraWeight:1363,stamp:1606084229673}];function Y(t,e,n){const r=t.slice();return r[7]=e[n],r}function Z(t,e,n){const r=t.slice();return r[10]=e[n],r}function tt(e){let n,r,o,i,s=e[10]+"";return{c(){n=p("option"),r=f("content-"),o=f(s),n.__value=i=e[10],n.value=n.__value},m(t,e){c(t,n,e),l(n,r),l(n,o)},p:t,d(t){t&&u(n)}}}function et(t){let e,n;return e=new V({}),{c(){O(e.$$.fragment)},m(t,r){P(e,t,r),n=!0},i(t){n||(B(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function nt(t){let e,n=ct(t[7].url)+"";return{c(){e=f(n)},m(t,n){c(t,e,n)},p(t,r){4&r&&n!==(n=ct(t[7].url)+"")&&$(e,n)},d(t){t&&u(e)}}}function rt(t){let e,n,r,o,i,s,a,h,d,W,y,b,w,v,k,_,z,j,T,E=t[7].size+"",C=t[7].ratio+"";return o=new G({props:{href:t[7].url,$$slots:{default:[nt]},$$scope:{ctx:t}}}),{c(){e=p("li"),n=p("div"),r=p("span"),O(o.$$.fragment),i=g(),s=p("span"),a=f(E),h=f("kb"),d=g(),W=p("span"),y=f(C),b=f("%"),w=g(),v=p("div"),k=g(),_=p("div"),z=g(),m(r,"class","url"),m(s,"class","size"),m(W,"class","ratio"),m(n,"class","entry"),m(v,"class","entry-size-bar"),x(v,"highlighted","size"===t[0]),x(v,"yellow",t[7].size>it),x(v,"red",t[7].size>st),m(_,"class","entry-ratio-bar"),x(_,"highlighted","ratio"===t[0]),x(_,"yellow",t[7].ratio>at),x(_,"red",t[7].ratio>lt),m(e,"style",j=`--size:${t[7].size};--ratio:${t[7].ratio}%`)},m(t,u){c(t,e,u),l(e,n),l(n,r),P(o,r,null),l(n,i),l(n,s),l(s,a),l(s,h),l(n,d),l(n,W),l(W,y),l(W,b),l(e,w),l(e,v),l(e,k),l(e,_),l(e,z),T=!0},p(t,n){const r={};4&n&&(r.href=t[7].url),8196&n&&(r.$$scope={dirty:n,ctx:t}),o.$set(r),(!T||4&n)&&E!==(E=t[7].size+"")&&$(a,E),(!T||4&n)&&C!==(C=t[7].ratio+"")&&$(y,C),1&n&&x(v,"highlighted","size"===t[0]),4&n&&x(v,"yellow",t[7].size>it),4&n&&x(v,"red",t[7].size>st),1&n&&x(_,"highlighted","ratio"===t[0]),4&n&&x(_,"yellow",t[7].ratio>at),4&n&&x(_,"red",t[7].ratio>lt),(!T||4&n&&j!==(j=`--size:${t[7].size};--ratio:${t[7].ratio}%`))&&m(e,"style",j)},i(t){T||(B(o.$$.fragment,t),T=!0)},o(t){I(o.$$.fragment,t),T=!1},d(t){t&&u(e),q(o)}}}function ot(t){let e,n,o,i,s,a,x,y,b,w,v,k,_,z=t[1]?"x":"How does this work?",j=t[3],E=[];for(let e=0;e<j.length;e+=1)E[e]=tt(Z(t,j,e));let C=t[1]&&et(),S=t[2],L=[];for(let e=0;e<S.length;e+=1)L[e]=rt(Y(t,S,e));const M=t=>I(L[t],1,1,(()=>{L[t]=null}));return{c(){e=p("aside"),n=p("div"),o=f("Sort by:\n "),i=p("select");for(let t=0;t<E.length;t+=1)E[t].c();s=g(),a=p("button"),x=f(z),y=g(),C&&C.c(),b=g(),w=p("ol");for(let t=0;t<L.length;t+=1)L[t].c();void 0===t[0]&&T((()=>t[5].call(i))),m(a,"class","info-toggle")},m(r,u){c(r,e,u),l(e,n),l(n,o),l(n,i);for(let t=0;t<E.length;t+=1)E[t].m(i,null);W(i,t[0]),l(e,s),l(e,a),l(a,x),c(r,y,u),C&&C.m(r,u),c(r,b,u),c(r,w,u);for(let t=0;t<L.length;t+=1)L[t].m(w,null);v=!0,k||(_=[d(i,"change",t[5]),d(a,"click",t[4])],k=!0)},p(t,[e]){if(8&e){let n;for(j=t[3],n=0;n<j.length;n+=1){const r=Z(t,j,n);E[n]?E[n].p(r,e):(E[n]=tt(r),E[n].c(),E[n].m(i,null))}for(;n<E.length;n+=1)E[n].d(1);E.length=j.length}if(9&e&&W(i,t[0]),(!v||2&e)&&z!==(z=t[1]?"x":"How does this work?")&&$(x,z),t[1]?C?2&e&&B(C,1):(C=et(),C.c(),B(C,1),C.m(b.parentNode,b)):C&&(H(),I(C,1,1,(()=>{C=null})),N()),5&e){let n;for(S=t[2],n=0;n<S.length;n+=1){const r=Y(t,S,n);L[n]?(L[n].p(r,e),B(L[n],1)):(L[n]=rt(r),L[n].c(),B(L[n],1),L[n].m(w,null))}for(H(),n=S.length;n<L.length;n+=1)M(n);N()}},i(t){if(!v){B(C);for(let t=0;t<S.length;t+=1)B(L[t]);v=!0}},o(t){I(C),L=L.filter(Boolean);for(let t=0;t<L.length;t+=1)I(L[t]);v=!1},d(t){t&&u(e),h(E,t),t&&u(y),C&&C.d(t),t&&u(b),t&&u(w),h(L,t),k=!1,r(_)}}}const it=200,st=225,at=50,lt=25;function ct(t){return t.replaceAll(/(^https?:\/\/|\/$)/g,"")}function ut(t,e,n){const r=X.reduce(((t,e)=>{const n=e.contentWeight+e.extraWeight;if(n>256e3)return t;const r=Math.round(n/1024),o=Math.round(100*e.contentWeight/n);return t.push({url:e.url,size:r,ratio:o}),t}),[]),o=["size","ratio"];let i,s=o[0],a=!1;return t.$$.update=()=>{1&t.$$.dirty&&n(2,i=r.sort(((t,e)=>"size"===s?t.size-e.size:e.ratio-t.ratio)))},[s,a,i,o,function(){n(1,a=!a)},function(){s=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(0,s),n(3,o)}]}return new class extends F{constructor(t){super(),R(this,t,ut,ot,i,{})}}({target:document.getElementById("members-table")})}();
//# sourceMappingURL=bundle.js.map