text: var app=function(){"use strict";function t(){}function n(t){return t()}function e(){return Object.create(null)}function o(t){t.forEach(n)}function r(t){return"function"==typeof t}function c(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}function i(n,e,o){n.$$.on_destroy.push(function(n,...e){if(null==n)return t;const o=n.subscribe(...e);return o.unsubscribe?()=>o.unsubscribe():o}(e,o))}function u(t,n,e){return t.set(e),n}function l(t,n){t.appendChild(n)}function s(t,n,e){t.insertBefore(n,e||null)}function a(t){t.parentNode.removeChild(t)}function f(t){return document.createElement(t)}function d(t){return document.createTextNode(t)}function h(){return d(" ")}function p(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function m(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function $(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}let g;function b(t){g=t}function w(){if(!g)throw new Error("Function called outside component initialization");return g}const k=[],v=[],_=[],x=[],y=Promise.resolve();let j=!1;function A(t){_.push(t)}const I=new Set;let E=0;function C(){const t=g;do{for(;E<k.length;){const t=k[E];E++,b(t),T(t.$$)}for(b(null),k.length=0,E=0;v.length;)v.pop()();for(let t=0;t<_.length;t+=1){const n=_[t];I.has(n)||(I.add(n),n())}_.length=0}while(k.length);for(;x.length;)x.pop()();j=!1,I.clear(),b(t)}function T(t){if(null!==t.fragment){t.update(),o(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(A)}}const z=new Set;let S;function J(){S={r:0,c:[],p:S}}function P(){S.r||o(S.c),S=S.p}function L(t,n){t&&t.i&&(z.delete(t),t.i(n))}function N(t,n,e,o){if(t&&t.o){if(z.has(t))return;z.add(t),S.c.push((()=>{z.delete(t),o&&(e&&t.d(1),o())})),t.o(n)}}function R(t,n){const e=n.token={};function o(t,o,r,c){if(n.token!==e)return;n.resolved=c;let i=n.ctx;void 0!==r&&(i=i.slice(),i[r]=c);const u=t&&(n.current=t)(i);let l=!1;n.block&&(n.blocks?n.blocks.forEach(((t,e)=>{e!==o&&t&&(J(),N(t,1,1,(()=>{n.blocks[e]===t&&(n.blocks[e]=null)})),P())})):n.block.d(1),u.c(),L(u,1),u.m(n.mount(),n.anchor),l=!0),n.block=u,n.blocks&&(n.blocks[o]=u),l&&C()}if((r=t)&&"object"==typeof r&&"function"==typeof r.then){const e=w();if(t.then((t=>{b(e),o(n.then,1,n.value,t),b(null)}),(t=>{if(b(e),o(n.catch,2,n.error,t),b(null),!n.hasCatch)throw t})),n.current!==n.pending)return o(n.pending,0),!0}else{if(n.current!==n.then)return o(n.then,1,n.value,t),!0;n.resolved=t}var r}function W(t,n,e){const o=n.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,e)}function B(t){t&&t.c()}function H(t,e,c,i){const{fragment:u,on_mount:l,on_destroy:s,after_update:a}=t.$$;u&&u.m(e,c),i||A((()=>{const e=l.map(n).filter(r);s?s.push(...e):o(e),t.$$.on_mount=[]})),a.forEach(A)}function O(t,n){const e=t.$$;null!==e.fragment&&(o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function q(t,n){-1===t.$$.dirty[0]&&(k.push(t),j||(j=!0,y.then(C)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function D(n,r,c,i,u,l,s,f=[-1]){const d=g;b(n);const h=n.$$={fragment:null,ctx:null,props:l,update:t,not_equal:u,bound:e(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(r.context||(d?d.$$.context:[])),callbacks:e(),dirty:f,skip_bound:!1,root:r.target||d.$$.root};s&&s(h.root);let p=!1;if(h.ctx=c?c(n,r.props||{},((t,e,...o)=>{const r=o.length?o[0]:e;return h.ctx&&u(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),p&&q(n,t)),e})):[],h.update(),p=!0,o(h.before_update),h.fragment=!!i&&i(h.ctx),r.target){if(r.hydrate){const t=function(t){return Array.from(t.childNodes)}(r.target);h.fragment&&h.fragment.l(t),t.forEach(a)}else h.fragment&&h.fragment.c();r.intro&&L(n.$$.fragment),H(n,r.target,r.anchor,r.customElement),C()}b(d)}class F{$destroy(){O(this,1),this.$destroy=t}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const M=[];function G(n,e=t){let o;const r=new Set;function i(t){if(c(n,t)&&(n=t,o)){const t=!M.length;for(const t of r)t[1](),M.push(t,n);if(t){for(let t=0;t<M.length;t+=2)M[t][0](M[t+1]);M.length=0}}}return{set:i,update:function(t){i(t(n))},subscribe:function(c,u=t){const l=[c,u];return r.add(l),1===r.size&&(o=e(i)||t),c(n),()=>{r.delete(l),0===r.size&&(o(),o=null)}}}}const K=G({home:"This is a personal project of mine! I created my own API and built this website with React! Then, I decided that I would like to remake it in Svelete!",all:"Can't get enough of the jokes? Here's some more!",random:"Here is a random joke:",about:"This project was intended to be a fun project for me to use the concepts I have learned with Javascript. I created my own API and built this website with Svelte!"}),Q=G("This is a personal project of mine! I created my own API and built this website with React! Then, I decided that I would like to remake it in Svelete!"),U=G("Welcome to the Dad-a-Base!"),V=G(!1),X=G(!1);function Y(n){let e,o,r,c,i,u,g,b;return{c(){e=f("div"),o=f("span"),r=d(n[0]),c=h(),i=f("li"),u=d(n[1]),m(o,"class","material-icons"),m(e,"class","navlist-item svelte-ubxzqx")},m(t,a){s(t,e,a),l(e,o),l(o,r),l(e,c),l(e,i),l(i,u),g||(b=p(e,"click",n[7]),g=!0)},p(t,[n]){1&n&&$(r,t[0]),2&n&&$(u,t[1])},i:t,o:t,d(t){t&&a(e),g=!1,b()}}}function Z(t,n,e){let o,r,c;i(t,Q,(t=>e(4,o=t))),i(t,K,(t=>e(5,r=t))),i(t,U,(t=>e(6,c=t)));let{icon:l}=n,{text:s}=n,{current_heading:a}=n,{current_caption:f}=n;return t.$$set=t=>{"icon"in t&&e(0,l=t.icon),"text"in t&&e(1,s=t.text),"current_heading"in t&&e(2,a=t.current_heading),"current_caption"in t&&e(3,f=t.current_caption)},[l,s,a,f,o,r,c,()=>{u(Q,o=r[`${f}`],o),u(U,c=a,c),"all"===f?V.set(!0):V.set(!1),"random"===f?X.set(!0):X.set(!1)}]}class tt extends F{constructor(t){super(),D(this,t,Z,Y,c,{icon:0,text:1,current_heading:2,current_caption:3})}}function nt(t){let n,e,o,r,c,i=!0===t[1]?"menu_open":"menu";return{c(){n=f("p"),e=d(i),m(n,"class",o="material-icons hamburger "+(!0===t[2]?"purple":"white")+" svelte-1sfw850")},m(o,i){s(o,n,i),l(n,e),r||(c=p(n,"click",t[3]),r=!0)},p(t,r){2&r&&i!==(i=!0===t[1]?"menu_open":"menu")&&$(e,i),4&r&&o!==(o="material-icons hamburger "+(!0===t[2]?"purple":"white")+" svelte-1sfw850")&&m(n,"class",o)},d(t){t&&a(n),r=!1,c()}}}function et(t){let n,e,r,c,i,u,d,$,g,b,w,k,v,_;A(t[4]);let x=t[0]<500&&nt(t);return c=new tt({props:{icon:"home",current_heading:"Welcome to the Dad-a-Base!",text:"Home",current_caption:"home"}}),u=new tt({props:{icon:"explore",current_heading:"All Jokes",text:"All Jokes",current_caption:"all"}}),$=new tt({props:{icon:"shuffle_on",current_heading:"Random Joke",text:"Random Joke",current_caption:"random"}}),b=new tt({props:{icon:"contact_page",current_heading:"About This Project",text:"About",current_caption:"about"}}),{c(){n=f("nav"),x&&x.c(),e=h(),r=f("ul"),B(c.$$.fragment),i=h(),B(u.$$.fragment),d=h(),B($.$$.fragment),g=h(),B(b.$$.fragment),m(r,"class",w="navlist "+(t[0]<500?"mobile":"desktop")+" "+(!0===t[2]&&t[0]<500?"hidden":"")+" svelte-1sfw850"),m(n,"class","navbar svelte-1sfw850")},m(o,a){s(o,n,a),x&&x.m(n,null),l(n,e),l(n,r),H(c,r,null),l(r,i),H(u,r,null),l(r,d),H($,r,null),l(r,g),H(b,r,null),k=!0,v||(_=[p(window,"resize",t[4]),p(r,"click",t[3])],v=!0)},p(t,[o]){t[0]<500?x?x.p(t,o):(x=nt(t),x.c(),x.m(n,e)):x&&(x.d(1),x=null),(!k||5&o&&w!==(w="navlist "+(t[0]<500?"mobile":"desktop")+" "+(!0===t[2]&&t[0]<500?"hidden":"")+" svelte-1sfw850"))&&m(r,"class",w)},i(t){k||(L(c.$$.fragment,t),L(u.$$.fragment,t),L($.$$.fragment,t),L(b.$$.fragment,t),k=!0)},o(t){N(c.$$.fragment,t),N(u.$$.fragment,t),N($.$$.fragment,t),N(b.$$.fragment,t),k=!1},d(t){t&&a(n),x&&x.d(),O(c),O(u),O($),O(b),v=!1,o(_)}}}function ot(t,n,e){let o,r=!1,c=!0;return[o,r,c,function(){o<500&&(e(1,r=!1===r),e(2,c=!1===r))},function(){e(0,o=window.outerWidth)}]}class rt extends F{constructor(t){super(),D(this,t,ot,et,c,{})}}function ct(t,n,e){const o=t.slice();return o[2]=n[e],o}function it(n){return{c:t,m:t,p:t,d:t}}function ut(t){let n,e=t[1],o=[];for(let n=0;n<e.length;n+=1)o[n]=lt(ct(t,e,n));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();n=d("")},m(t,e){for(let n=0;n<o.length;n+=1)o[n].m(t,e);s(t,n,e)},p(t,r){if(1&r){let c;for(e=t[1],c=0;c<e.length;c+=1){const i=ct(t,e,c);o[c]?o[c].p(i,r):(o[c]=lt(i),o[c].c(),o[c].m(n.parentNode,n))}for(;c<o.length;c+=1)o[c].d(1);o.length=e.length}},d(t){!function(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}(o,t),t&&a(n)}}}function lt(n){let e,o,r,c,i=n[2].description+"";return{c(){e=f("div"),o=f("p"),r=d(i),c=h(),m(e,"class","card svelte-1on8s2w")},m(t,n){s(t,e,n),l(e,o),l(o,r),l(e,c)},p:t,d(t){t&&a(e)}}}function st(n){let e;return{c(){e=f("p"),e.textContent="Loading..."},m(t,n){s(t,e,n)},p:t,d(t){t&&a(e)}}}function at(n){let e,o={ctx:n,current:null,token:null,hasCatch:!1,pending:st,then:ut,catch:it,value:1};return R(n[0],o),{c(){e=f("div"),o.block.c()},m(t,n){s(t,e,n),o.block.m(e,o.anchor=null),o.mount=()=>e,o.anchor=null},p(t,[e]){W(o,n=t,e)},i:t,o:t,d(t){t&&a(e),o.block.d(),o.token=null,o=null}}}function ft(t){return[async function(){const t=await fetch("https://shielded-sierra-55191.herokuapp.com/api/jokes");return await t.json()}()]}class dt extends F{constructor(t){super(),D(this,t,ft,at,c,{})}}function ht(n){return{c:t,m:t,p:t,d:t}}function pt(n){let e,o,r,c=n[1].description+"";return{c(){e=f("div"),o=f("p"),r=d(c),m(e,"class","card")},m(t,n){s(t,e,n),l(e,o),l(o,r)},p:t,d(t){t&&a(e)}}}function mt(n){let e;return{c(){e=f("p"),e.textContent="Loading..."},m(t,n){s(t,e,n)},p:t,d(t){t&&a(e)}}}function $t(n){let e,o={ctx:n,current:null,token:null,hasCatch:!1,pending:mt,then:pt,catch:ht,value:1};return R(n[0],o),{c(){e=f("div"),o.block.c()},m(t,n){s(t,e,n),o.block.m(e,o.anchor=null),o.mount=()=>e,o.anchor=null},p(t,[e]){W(o,n=t,e)},i:t,o:t,d(t){t&&a(e),o.block.d(),o.token=null,o=null}}}function gt(t){return[async function(){const t=await fetch("https://shielded-sierra-55191.herokuapp.com/api/random");return await t.json()}()]}class bt extends F{constructor(t){super(),D(this,t,gt,$t,c,{})}}function wt(t){let n,e;return n=new dt({}),{c(){B(n.$$.fragment)},m(t,o){H(n,t,o),e=!0},i(t){e||(L(n.$$.fragment,t),e=!0)},o(t){N(n.$$.fragment,t),e=!1},d(t){O(n,t)}}}function kt(t){let n,e;return n=new bt({}),{c(){B(n.$$.fragment)},m(t,o){H(n,t,o),e=!0},i(t){e||(L(n.$$.fragment,t),e=!0)},o(t){N(n.$$.fragment,t),e=!1},d(t){O(n,t)}}}function vt(t){let n,e,o,r,c,i,u,g,b,w,k,v,_;A(t[5]),n=new rt({});let x=t[3]&&wt(),y=t[4]&&kt();return{c(){B(n.$$.fragment),e=h(),o=f("main"),r=f("h1"),c=d(t[1]),i=h(),u=f("p"),g=d(t[2]),b=h(),x&&x.c(),w=h(),y&&y.c(),m(o,"class","svelte-1akb2mf")},m(a,f){H(n,a,f),s(a,e,f),s(a,o,f),l(o,r),l(r,c),l(o,i),l(o,u),l(u,g),l(o,b),x&&x.m(o,null),l(o,w),y&&y.m(o,null),k=!0,v||(_=p(window,"resize",t[5]),v=!0)},p(t,[n]){(!k||2&n)&&$(c,t[1]),(!k||4&n)&&$(g,t[2]),t[3]?x?8&n&&L(x,1):(x=wt(),x.c(),L(x,1),x.m(o,w)):x&&(J(),N(x,1,1,(()=>{x=null})),P()),t[4]?y?16&n&&L(y,1):(y=kt(),y.c(),L(y,1),y.m(o,null)):y&&(J(),N(y,1,1,(()=>{y=null})),P())},i(t){k||(L(n.$$.fragment,t),L(x),L(y),k=!0)},o(t){N(n.$$.fragment,t),N(x),N(y),k=!1},d(t){O(n,t),t&&a(e),t&&a(o),x&&x.d(),y&&y.d(),v=!1,_()}}}function _t(t,n,e){let o,r,c,u,l;return i(t,U,(t=>e(1,o=t))),i(t,Q,(t=>e(2,r=t))),i(t,V,(t=>e(3,c=t))),i(t,X,(t=>e(4,u=t))),[l,o,r,c,u,function(){e(0,l=window.outerWidth)}]}return new class extends F{constructor(t){super(),D(this,t,_t,vt,c,{})}}({target:document.body,props:{name:"world"}})}();
  //# sourceMappingURL=bundle.js.map
  