-
Notifications
You must be signed in to change notification settings - Fork 1
/
svelte-app.js
2 lines (2 loc) · 9.44 KB
/
svelte-app.js
1
2
var svelteApp=function(t){"use strict";function e(){}function n(t){return t()}function r(){return Object.create(null)}function o(t){t.forEach(n)}function l(t){return"function"==typeof t}function u(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){t.appendChild(e)}function s(t,e,n){t.insertBefore(e,n||null)}function i(t){t.parentNode&&t.parentNode.removeChild(t)}function f(t){return document.createElement(t)}function a(t){return document.createTextNode(t)}function h(){return a(" ")}function d(){return a("")}function p(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function $(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function g(t,e){t.value=null==e?"":e}let m;function y(t){m=t}function _(t){(function(){if(!m)throw new Error("Function called outside component initialization");return m})().$$.after_update.push(t)}const x=[],v=[];let b=[];const w=[],k=Promise.resolve();let E=!1;function M(t){b.push(t)}const A=new Set;let N=0;function T(){if(0!==N)return;const t=m;do{try{for(;N<x.length;){const t=x[N];N++,y(t),S(t.$$)}}catch(t){throw x.length=0,N=0,t}for(y(null),x.length=0,N=0;v.length;)v.pop()();for(let t=0;t<b.length;t+=1){const e=b[t];A.has(e)||(A.add(e),e())}b.length=0}while(x.length);for(;w.length;)w.pop()();E=!1,A.clear(),y(t)}function S(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(M)}}const O=new Set;let j;function C(){j={r:0,c:[],p:j}}function L(){j.r||o(j.c),j=j.p}function I(t,e){t&&t.i&&(O.delete(t),t.i(e))}function q(t,e,n,r){if(t&&t.o){if(O.has(t))return;O.add(t),j.c.push((()=>{O.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}function P(t,e){q(t,1,1,(()=>{e.delete(t.key)}))}function R(t,e,n,r,l,u,c,s,i,f,a,h){let d=t.length,p=u.length,$=d;const g={};for(;$--;)g[t[$].key]=$;const m=[],y=new Map,_=new Map,x=[];for($=p;$--;){const t=h(l,u,$),o=n(t);let s=c.get(o);s?r&&x.push((()=>s.p(t,e))):(s=f(o,t),s.c()),y.set(o,m[$]=s),o in g&&_.set(o,Math.abs($-g[o]))}const v=new Set,b=new Set;function w(t){I(t,1),t.m(s,a),c.set(t.key,t),a=t.first,p--}for(;d&&p;){const e=m[p-1],n=t[d-1],r=e.key,o=n.key;e===n?(a=e.first,d--,p--):y.has(o)?!c.has(r)||v.has(r)?w(e):b.has(o)?d--:_.get(r)>_.get(o)?(b.add(r),w(e)):(v.add(o),d--):(i(n,c),d--)}for(;d--;){const e=t[d];y.has(e.key)||i(e,c)}for(;p;)w(m[p-1]);return o(x),m}function X(t){t&&t.c()}function z(t,e,r,u){const{fragment:c,after_update:s}=t.$$;c&&c.m(e,r),u||M((()=>{const e=t.$$.on_mount.map(n).filter(l);t.$$.on_destroy?t.$$.on_destroy.push(...e):o(e),t.$$.on_mount=[]})),s.forEach(M)}function B(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];b.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),b=e}(n.after_update),o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function F(t,e){-1===t.$$.dirty[0]&&(x.push(t),E||(E=!0,k.then(T)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function D(t,n,l,u,c,s,f,a=[-1]){const h=m;y(t);const d=t.$$={fragment:null,ctx:[],props:s,update:e,not_equal:c,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(h?h.$$.context:[])),callbacks:r(),dirty:a,skip_bound:!1,root:n.target||h.$$.root};f&&f(d.root);let p=!1;if(d.ctx=l?l(t,n.props||{},((e,n,...r)=>{const o=r.length?r[0]:n;return d.ctx&&c(d.ctx[e],d.ctx[e]=o)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](o),p&&F(t,e)),n})):[],d.update(),p=!0,o(d.before_update),d.fragment=!!u&&u(d.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);d.fragment&&d.fragment.l(t),t.forEach(i)}else d.fragment&&d.fragment.c();n.intro&&I(t.$$.fragment),z(t,n.target,n.anchor,n.customElement),T()}y(h)}class G{$destroy(){B(this,1),this.$destroy=e}$on(t,n){if(!l(n))return e;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const t=r.indexOf(n);-1!==t&&r.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 H(t,e,n){const r=t.slice();return r[3]=e[n],r[5]=n,r}function J(t){let e,n,r=t[3]+"";return{c(){var t,o,l;e=f("span"),n=a(r),t=e,o="class",null==(l="highlight")?t.removeAttribute(o):t.getAttribute(o)!==l&&t.setAttribute(o,l)},m(t,r){s(t,e,r),c(e,n)},p(t,e){2&e&&r!==(r=t[3]+"")&&$(n,r)},d(t){t&&i(e)}}}function K(t){let e,n=t[3]+"";return{c(){e=a(n)},m(t,n){s(t,e,n)},p(t,r){2&r&&n!==(n=t[3]+"")&&$(e,n)},d(t){t&&i(e)}}}function Q(t){let e;let n=function(t,e){return t[5]%2==0?K:J}(t),r=n(t);return{c(){r.c(),e=d()},m(t,n){r.m(t,n),s(t,e,n)},p(t,e){r.p(t,e)},d(t){r.d(t),t&&i(e)}}}function U(t){let n,r,o,l=t[0].prettyTime+"",u=t[1],d=[];for(let e=0;e<u.length;e+=1)d[e]=Q(H(t,u,e));return{c(){n=f("p"),r=a(l),o=h();for(let t=0;t<d.length;t+=1)d[t].c()},m(t,e){s(t,n,e),c(n,r),c(n,o);for(let t=0;t<d.length;t+=1)d[t]&&d[t].m(n,null)},p(t,[e]){if(1&e&&l!==(l=t[0].prettyTime+"")&&$(r,l),2&e){let r;for(u=t[1],r=0;r<u.length;r+=1){const o=H(t,u,r);d[r]?d[r].p(o,e):(d[r]=Q(o),d[r].c(),d[r].m(n,null))}for(;r<d.length;r+=1)d[r].d(1);d.length=u.length}},i:e,o:e,d(t){t&&i(n),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(d,t)}}}function V(t,e,n){let r,{result:o}=e,{match:l}=e;return t.$$set=t=>{"result"in t&&n(2,o=t.result),"match"in t&&n(0,l=t.match)},t.$$.update=()=>{5&t.$$.dirty&&n(1,r=(()=>{const t=[];let e=0;for(const n of l.text.matchAll(o.query))t.push(l.text.slice(e,n.index)),t.push(n[0]),e=n.index+n[0].length;return t.push(l.text.slice(e)),t})())},[l,r,o]}class W extends G{constructor(t){super(),D(this,t,V,U,u,{result:2,match:0})}}function Y(t,e,n){const r=t.slice();return r[1]=e[n],r}function Z(t,e){let n,r,o;return r=new W({props:{result:e[0],match:e[1]}}),{key:t,first:null,c(){n=d(),X(r.$$.fragment),this.first=n},m(t,e){s(t,n,e),z(r,t,e),o=!0},p(t,n){e=t;const o={};1&n&&(o.result=e[0]),1&n&&(o.match=e[1]),r.$set(o)},i(t){o||(I(r.$$.fragment,t),o=!0)},o(t){q(r.$$.fragment,t),o=!1},d(t){t&&i(n),B(r,t)}}}function tt(t){let e,n,r,o,l,u=t[0].episode.title+"",p=[],g=new Map,m=t[0].matches;const y=t=>t[1].prettyTime;for(let e=0;e<m.length;e+=1){let n=Y(t,m,e),r=y(n);g.set(r,p[e]=Z(r,n))}return{c(){e=f("h4"),n=a(u),r=h();for(let t=0;t<p.length;t+=1)p[t].c();o=d()},m(t,u){s(t,e,u),c(e,n),s(t,r,u);for(let e=0;e<p.length;e+=1)p[e]&&p[e].m(t,u);s(t,o,u),l=!0},p(t,[e]){(!l||1&e)&&u!==(u=t[0].episode.title+"")&&$(n,u),1&e&&(m=t[0].matches,C(),p=R(p,e,y,1,t,m,g,o.parentNode,P,Z,o,Y),L())},i(t){if(!l){for(let t=0;t<m.length;t+=1)I(p[t]);l=!0}},o(t){for(let t=0;t<p.length;t+=1)q(p[t]);l=!1},d(t){t&&i(e),t&&i(r);for(let e=0;e<p.length;e+=1)p[e].d(t);t&&i(o)}}}function et(t,e,n){let{result:r}=e;return t.$$set=t=>{"result"in t&&n(0,r=t.result)},[r]}class nt extends G{constructor(t){super(),D(this,t,et,tt,u,{result:0})}}function rt(t,e,n){const r=t.slice();return r[4]=e[n],r}function ot(t,e){let n,r,o,l;return r=new nt({props:{result:e[4]}}),{key:t,first:null,c(){n=f("div"),X(r.$$.fragment),o=h(),this.first=n},m(t,e){s(t,n,e),z(r,n,null),c(n,o),l=!0},p(t,n){e=t;const o={};2&n&&(o.result=e[4]),r.$set(o)},i(t){l||(I(r.$$.fragment,t),l=!0)},o(t){q(r.$$.fragment,t),l=!1},d(t){t&&i(n),B(r)}}}function lt(t){let e,n,r,o,l,u,c=[],a=new Map,d=t[1];const $=t=>t[4].episode.day;for(let e=0;e<d.length;e+=1){let n=rt(t,d,e),r=$(n);a.set(r,c[e]=ot(r,n))}return{c(){e=f("input"),n=h(),r=f("div");for(let t=0;t<c.length;t+=1)c[t].c()},m(i,f){s(i,e,f),g(e,t[0]),s(i,n,f),s(i,r,f);for(let t=0;t<c.length;t+=1)c[t]&&c[t].m(r,null);o=!0,l||(u=p(e,"input",t[2]),l=!0)},p(t,[n]){1&n&&e.value!==t[0]&&g(e,t[0]),2&n&&(d=t[1],C(),c=R(c,n,$,1,t,d,a,r,P,ot,null,rt),L())},i(t){if(!o){for(let t=0;t<d.length;t+=1)I(c[t]);o=!0}},o(t){for(let t=0;t<c.length;t+=1)q(c[t]);o=!1},d(t){t&&i(e),t&&i(n),t&&i(r);for(let t=0;t<c.length;t+=1)c[t].d();l=!1,u()}}}function ut(t,e,n){let r,o,l="";return t.$$.update=()=>{1&t.$$.dirty&&n(1,[r,o]=runSearch(l),r)},[l,r,function(){l=this.value,n(0,l)}]}function ct(t,e,n){const r=t.slice();return r[7]=e[n],r}function st(t,e){let n,r,o,l;return r=new nt({props:{result:e[7]}}),{key:t,first:null,c(){n=f("div"),X(r.$$.fragment),o=h(),this.first=n},m(t,e){s(t,n,e),z(r,n,null),c(n,o),l=!0},p(t,n){e=t;const o={};2&n&&(o.result=e[7]),r.$set(o)},i(t){l||(I(r.$$.fragment,t),l=!0)},o(t){q(r.$$.fragment,t),l=!1},d(t){t&&i(n),B(r)}}}function it(t){let e,n,r,o,l,u,c=[],a=new Map,d=t[1];const $=t=>t[7].episode.day;for(let e=0;e<d.length;e+=1){let n=ct(t,d,e),r=$(n);a.set(r,c[e]=st(r,n))}return{c(){e=f("input"),n=h(),r=f("div");for(let t=0;t<c.length;t+=1)c[t].c()},m(i,f){s(i,e,f),g(e,t[0]),s(i,n,f),s(i,r,f);for(let t=0;t<c.length;t+=1)c[t]&&c[t].m(r,null);o=!0,l||(u=p(e,"input",t[6]),l=!0)},p(t,[n]){1&n&&e.value!==t[0]&&g(e,t[0]),2&n&&(d=t[1],C(),c=R(c,n,$,1,t,d,a,r,P,st,null,ct),L())},i(t){if(!o){for(let t=0;t<d.length;t+=1)I(c[t]);o=!0}},o(t){for(let t=0;t<c.length;t+=1)q(c[t]);o=!1},d(t){t&&i(e),t&&i(n),t&&i(r);for(let t=0;t<c.length;t+=1)c[t].d();l=!1,u()}}}function ft(t,e,n){let r,o="",l=[],u=0,c=o,s=null;return _((()=>{u<l.length?n(5,s=setTimeout((()=>{n(3,u+=MAX_INCREMENTAL)}),0)):console.log("done with incremental render")})),t.$$.update=()=>{49&t.$$.dirty&&o!==c&&(n(4,c=o),n(3,u=MAX_INCREMENTAL),clearTimeout(s),n(2,l=runSearch(o)[0])),12&t.$$.dirty&&n(1,r=l.slice(0,Math.min(u,l.length)))},[o,r,l,u,c,s,function(){o=this.value,n(0,o)}]}return t.SvelteIncremental=class extends G{constructor(t){super(),D(this,t,ft,it,u,{})}},t.SvelteNaive=class extends G{constructor(t){super(),D(this,t,ut,lt,u,{})}},Object.defineProperty(t,"__esModule",{value:!0}),t}({});
//# sourceMappingURL=bundle.js.map