Files: d118d1c2ea174b51ca37f6c0c981c07850a83897 / bundle.js
42681 bytesRaw
1 | !function(){var e,t,n,r=e={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var a,h=[],u=!1,l=-1;function c(){u&&a&&(u=!1,a.length?h=a.concat(h):l=-1,h.length&&f())}function f(){if(!u){var e=s(c);u=!0;for(var t=h.length;t;){for(a=h,h=[];++l<t;)a&&a[l].run();l=-1,t=h.length}a=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function d(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new p(e,t)),1!==h.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0};var m={};(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}m.resolve=function(){for(var r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,o="/"===s.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+r||"."},m.normalize=function(e){var o=m.isAbsolute(e),i="/"===r(e,-1);return(e=t(n(e.split("/"),function(e){return!!e}),!o).join("/"))||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},m.isAbsolute=function(e){return"/"===e.charAt(0)},m.join=function(){var e=Array.prototype.slice.call(arguments,0);return m.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))};var r="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e);var v={exports:{}};function g(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(function(e){!function(t){var n="object"==typeof v.exports&&v.exports&&!v.exports.nodeType&&v.exports,r=v&&!v.nodeType&&v,o="object"==typeof e&&e;o.global!==o&&o.window!==o&&o.self!==o||(t=o);var i,s,a=2147483647,h=36,u=1,l=26,c=38,f=700,p=72,d=128,m="-",g=/^xn--/,y=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=h-u,_=Math.floor,E=String.fromCharCode;function T(e){throw new RangeError(b[e])}function O(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function x(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+O((e=e.replace(w,".")).split("."),t).join(".")}function S(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function N(e){return O(e,function(e){var t="";return e>65535&&(t+=E((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+E(e)}).join("")}function C(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,n){var r=0;for(e=n?_(e/f):e>>1,e+=_(e/t);e>A*l>>1;r+=h)e=_(e/A);return _(r+(A+1)*e/(e+c))}function L(e){var t,n,r,o,i,s,c,f,v,g,y,w=[],b=e.length,A=0,E=d,O=p;for((n=e.lastIndexOf(m))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&T("not-basic"),w.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<b;){for(i=A,s=1,c=h;o>=b&&T("invalid-input"),((f=(y=e.charCodeAt(o++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:h)>=h||f>_((a-A)/s))&&T("overflow"),A+=f*s,!(f<(v=c<=O?u:c>=O+l?l:c-O));c+=h)s>_(a/(g=h-v))&&T("overflow"),s*=g;O=k(A-i,t=w.length+1,0==i),_(A/t)>a-E&&T("overflow"),E+=_(A/t),A%=t,w.splice(A++,0,E)}return N(w)}function R(e){var t,n,r,o,i,s,c,f,v,g,y,w,b,A,O,x=[];for(w=(e=S(e)).length,t=d,n=0,i=p,s=0;s<w;++s)(y=e[s])<128&&x.push(E(y));for(r=o=x.length,o&&x.push(m);r<w;){for(c=a,s=0;s<w;++s)(y=e[s])>=t&&y<c&&(c=y);for(c-t>_((a-n)/(b=r+1))&&T("overflow"),n+=(c-t)*b,t=c,s=0;s<w;++s)if((y=e[s])<t&&++n>a&&T("overflow"),y==t){for(f=n,v=h;!(f<(g=v<=i?u:v>=i+l?l:v-i));v+=h)O=f-g,A=h-g,x.push(E(C(g+O%A,0))),f=_(O/A);x.push(E(C(f,0))),i=k(n,b,r==o),n=0,++r}++n,++t}return x.join("")}if(i={version:"1.4.1",ucs2:{decode:S,encode:N},decode:L,encode:R,toASCII:function(e){return x(e,function(e){return y.test(e)?"xn--"+R(e):e})},toUnicode:function(e){return x(e,function(e){return g.test(e)?L(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return i});else if(n&&r)if(v.exports==n)r.exports=i;else for(s in i)i.hasOwnProperty(s)&&(n[s]=i[s]);else t.punycode=i}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),v=v.exports;var y=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},w=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},b=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function A(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var _=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},E={parse:function(e,t,n,r){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(t);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var a=e.length;s>0&&a>s&&(a=s);for(var h=0;h<a;++h){var u,l,c,f,p=e[h].replace(i,"%20"),d=p.indexOf(n);d>=0?(u=p.substr(0,d),l=p.substr(d+1)):(u=p,l=""),c=decodeURIComponent(u),f=decodeURIComponent(l),g(o,c)?y(o[c])?o[c].push(f):o[c]=[o[c],f]:o[c]=f}return o},stringify:function(e,t,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?A(_(e),function(r){var o=encodeURIComponent(w(r))+n;return b(e[r])?A(e[r],function(e){return o+encodeURIComponent(w(e))}).join(t):o+encodeURIComponent(w(e[r]))}).join(t):r?encodeURIComponent(w(r))+n+encodeURIComponent(w(e)):""}},T={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}},O={};function x(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}O.format=function(e){return T.isString(e)&&(e=U(e)),e instanceof x?e.format():x.prototype.format.call(e)};var S=/^([a-z0-9.+-]+:)/i,N=/:[0-9]*$/,C=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,k=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),L=["'"].concat(k),R=["%","/","?",";","#"].concat(L),I=["/","?","#"],j=/^[+a-z0-9A-Z_-]{0,63}$/,P=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,D={javascript:!0,"javascript:":!0},M={javascript:!0,"javascript:":!0},q={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function U(e,t,n){if(e&&T.isObject(e)&&e instanceof x)return e;var r=new x;return r.parse(e,t,n),r}x.prototype.parse=function(e,t,n){if(!T.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),o=-1!==r&&r<e.indexOf("#")?"?":"#",i=e.split(o);i[0]=i[0].replace(/\\/g,"/");var s=e=i.join(o);if(s=s.trim(),!n&&1===e.split("#").length){var a=C.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=t?E.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var h=S.exec(s);if(h){var u=(h=h[0]).toLowerCase();this.protocol=u,s=s.substr(h.length)}if(n||h||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===s.substr(0,2);!l||h&&M[h]||(s=s.substr(2),this.slashes=!0)}if(!M[h]&&(l||h&&!q[h])){for(var c,f,p=-1,d=0;d<I.length;d++)-1!==(m=s.indexOf(I[d]))&&(-1===p||m<p)&&(p=m);for(-1!==(f=-1===p?s.lastIndexOf("@"):s.lastIndexOf("@",p))&&(c=s.slice(0,f),s=s.slice(f+1),this.auth=decodeURIComponent(c)),p=-1,d=0;d<R.length;d++){var m;-1!==(m=s.indexOf(R[d]))&&(-1===p||m<p)&&(p=m)}-1===p&&(p=s.length),this.host=s.slice(0,p),s=s.slice(p),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var y=this.hostname.split(/\./),w=(d=0,y.length);d<w;d++){var b=y[d];if(b&&!b.match(j)){for(var A="",_=0,O=b.length;_<O;_++)b.charCodeAt(_)>127?A+="x":A+=b[_];if(!A.match(j)){var x=y.slice(0,d),N=y.slice(d+1),k=b.match(P);k&&(x.push(k[1]),N.unshift(k[2])),N.length&&(s="/"+N.join(".")+s),this.hostname=x.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),g||(this.hostname=v.toASCII(this.hostname));var U=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+U,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!D[u])for(d=0,w=L.length;d<w;d++){var G=L[d];if(-1!==s.indexOf(G)){var V=encodeURIComponent(G);V===G&&(V=escape(G)),s=s.split(G).join(V)}}var F=s.indexOf("#");-1!==F&&(this.hash=s.substr(F),s=s.slice(0,F));var W=s.indexOf("?");if(-1!==W?(this.search=s.substr(W),this.query=s.substr(W+1),t&&(this.query=E.parse(this.query)),s=s.slice(0,W)):t&&(this.search="",this.query={}),s&&(this.pathname=s),q[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var H=this.search||"";this.path=U+H}return this.href=this.format(),this},x.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&T.isObject(this.query)&&Object.keys(this.query).length&&(i=E.stringify(this.query));var s=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||q[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(s=s.replace("#","%23"))+r},x.prototype.resolve=function(e){return this.resolveObject(U(e,!1,!0)).format()},x.prototype.resolveObject=function(e){if(T.isString(e)){var t=new x;t.parse(e,!1,!0),e=t}for(var n=new x,r=Object.keys(this),o=0;o<r.length;o++){var i=r[o];n[i]=this[i]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),a=0;a<s.length;a++){var h=s[a];"protocol"!==h&&(n[h]=e[h])}return q[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!q[e.protocol]){for(var u=Object.keys(e),l=0;l<u.length;l++){var c=u[l];n[c]=e[c]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||M[e.protocol])n.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var p=n.pathname||"",d=n.search||"";n.path=p+d}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var m=n.pathname&&"/"===n.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),g=v||m||n.host&&e.pathname,y=g,w=n.pathname&&n.pathname.split("/")||[],b=(f=e.pathname&&e.pathname.split("/")||[],n.protocol&&!q[n.protocol]);if(b&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),g=g&&(""===f[0]||""===w[0])),v)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=f;else if(f.length)w||(w=[]),w.pop(),w=w.concat(f),n.search=e.search,n.query=e.query;else if(!T.isNullOrUndefined(e.search))return b&&(n.hostname=n.host=w.shift(),(S=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=S.shift(),n.host=n.hostname=S.shift())),n.search=e.search,n.query=e.query,T.isNull(n.pathname)&&T.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var A=w.slice(-1)[0],_=(n.host||e.host||w.length>1)&&("."===A||".."===A)||""===A,E=0,O=w.length;O>=0;O--)"."===(A=w[O])?w.splice(O,1):".."===A?(w.splice(O,1),E++):E&&(w.splice(O,1),E--);if(!g&&!y)for(;E--;E)w.unshift("..");!g||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),_&&"/"!==w.join("/").substr(-1)&&w.push("");var S,N=""===w[0]||w[0]&&"/"===w[0].charAt(0);return b&&(n.hostname=n.host=N?"":w.length?w.shift():"",(S=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=S.shift(),n.host=n.hostname=S.shift())),(g=g||n.host&&w.length)&&!N&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),T.isNull(n.pathname)&&T.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},x.prototype.parseHost=function(){var e=this.host,t=N.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var $=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)G.call(n,r)&&(e[r]=n[r])}return e},G=Object.prototype.hasOwnProperty,V={};(function(e){V=n;var t=n.events={INSTALLED:"sw:installed",UPDATED:"sw:updated",REDUNDANT:"sw:redundant",POST_MESSAGE:"sw:postMessage",MESSAGE:"sw:message",SYNC:"sw:sync",NOTIFICATION_REQUEST:"sw:notificationRequest",ERROR:"log:error"};function n(n,r){return n=n||"/sw.js",r=r||{},function(o,i){i.on(o.events.DOMCONTENTLOADED,function(){if((r=$({scope:"/"},r)).electron){r.scope=m.join(e,r.scope),n=O.format({pathname:m.join(e,n.replace(/^\//,"")),protocol:"file:",slashes:!0}),delete r.electron}if(window.onmessage=function(e){i.emit(t.MESSAGE,{data:e.data,channel:"window",port:null})},window.MessageChannel){var s=new MessageChannel;s.port1.onmessage=function(e){i.emit(t.MESSAGE,{data:e.data,channel:"messageChannel",port:"port1"})},s.port2.onmessage=function(e){i.emit(t.MESSAGE,{data:e.data,channel:"messageChannel",port:"port2"})}}i.on(t.NOTIFICATION_REQUEST,function(e){Notification.requestPermission(function(t){"function"==typeof t&&e(t)})}),navigator.serviceWorker&&navigator.onLine&&(navigator.serviceWorker.onmessage=function(e){i.emit(t.MESSAGE,{data:e.data,channel:"navigator.serviceWorker",port:null})},navigator.serviceWorker.register(n,r).then(function(e){e.onupdatefound=function(){var n=e.installing;n.onstatechange=function(){"installed"===n.state?navigator.serviceWorker.controller?i.emit(t.UPDATED,e):i.emit(t.INSTALLED,e):"redundant"===n.state&&i.emit(t.REDUNDANT,e)}},e.sync&&function(e){e.sync.getTags().then(function(e){o.syncTags=e}).catch(function(e){i.emit(t.ERROR,e)})}(e)}).catch(function(e){i.emit(t.ERROR,e)}),navigator.serviceWorker.ready.then(function(e){new Promise(function(n){var r=e.active;"activated"!==r.state?(r.addEventListener("statechange",n,{once:!0}),i.on(t.POST_MESSAGE,function(e){r.postMessage(e)})):n()}).then(function(){e.navigationPreload&&e.navigationPreload.enable()}),i.on(t.SYNC,function(n){e.sync.register(n).then(function(){return e.sync.getTags()}).then(function(e){o.syncTags=e}).catch(function(e){i.emit(t.ERROR,e)})})}).catch(function(e){i.emit(t.ERROR,e)}))})}}}).call(this,"/node_modules/choo-service-worker");var F=/\n[\s]+$/,W=/^\n[\s]+/,H=/[\s]+$/,B=/^[\s]+/,z=/[\n\s]+/g,K=["a","abbr","b","bdi","bdo","br","cite","data","dfn","em","i","kbd","mark","q","rp","rt","rtc","ruby","s","amp","small","span","strong","sub","sup","time","u","var","wbr"],Y=["code","pre","textarea"],Z=function e(t,n){if(Array.isArray(n))for(var r,o,i=t.nodeName.toLowerCase(),s=!1,a=0,h=n.length;a<h;a++){var u=n[a];if(Array.isArray(u))e(t,u);else{("number"==typeof u||"boolean"==typeof u||"function"==typeof u||u instanceof Date||u instanceof RegExp)&&(u=u.toString());var l=t.childNodes[t.childNodes.length-1];if("string"==typeof u)s=!0,l&&"#text"===l.nodeName?l.nodeValue+=u:(u=document.createTextNode(u),t.appendChild(u),l=u),a===h-1&&(s=!1,-1===K.indexOf(i)&&-1===Y.indexOf(i)?""===(r=l.nodeValue.replace(W,"").replace(H,"").replace(F,"").replace(z," "))?t.removeChild(l):l.nodeValue=r:-1===Y.indexOf(i)&&(o=0===a?"":" ",r=l.nodeValue.replace(W,o).replace(B," ").replace(H,"").replace(F,"").replace(z," "),l.nodeValue=r));else if(u&&u.nodeType){s&&(s=!1,-1===K.indexOf(i)&&-1===Y.indexOf(i)?""===(r=l.nodeValue.replace(W,"").replace(F,"").replace(z," "))?t.removeChild(l):l.nodeValue=r:-1===Y.indexOf(i)&&(r=l.nodeValue.replace(B," ").replace(W,"").replace(F,"").replace(z," "),l.nodeValue=r));var c=u.nodeName;c&&(i=c.toLowerCase()),t.appendChild(u)}}}},Q={class:"className",for:"htmlFor","http-equiv":"httpEquiv"},X=1,J=2,ee=3,te=4,ne=5,re=6,oe=7,ie=8,se=9,ae=10,he=11,ue=12,le=13;function ce(e){return e===se||e===ae}Object.prototype.hasOwnProperty;var fe=RegExp("^("+["area","base","basefont","bgsound","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr","!--","animate","animateTransform","circle","cursor","desc","ellipse","feBlend","feColorMatrix","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","font-face-format","font-face-name","font-face-uri","glyph","glyphRef","hkern","image","line","missing-glyph","mpath","path","polygon","polyline","rect","set","stop","tref","use","view","vkern"].join("|")+")(?:[.#][a-zA-Z0-9\x7f-\uffff_:-]+)*$"),pe={},de="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xlink",ve=["autofocus","checked","defaultchecked","disabled","formnovalidate","indeterminate","readonly","required","selected","willvalidate"],ge="!--",ye=["svg","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"];function we(e,t,n){var r;-1!==ye.indexOf(e)&&(t.namespace=de);var o=!1;if(t.namespace&&(o=t.namespace,delete t.namespace),o)r=document.createElementNS(o,e);else{if(e===ge)return document.createComment(t.comment);r=document.createElement(e)}for(var i in t)if(t.hasOwnProperty(i)){var s=i.toLowerCase(),a=t[i];if("classname"===s&&(s="class",i="class"),"htmlFor"===i&&(i="for"),-1!==ve.indexOf(s))if("true"===a)a=s;else if("false"===a)continue;"on"===s.slice(0,2)?r[i]=a:o?"xlink:href"===i?r.setAttributeNS(me,i,a):/^xmlns($|:)/i.test(i)||r.setAttributeNS(null,i,a):r.setAttribute(i,a)}return Z(r,n),r}(pe=function(e,t){t||(t={});var n=t.concat||function(e,t){return String(e)+String(t)};return!1!==t.attrToProp&&(e=function(e){return function(t,n,r){for(var o in n)o in Q&&(n[Q[o]]=n[o],delete n[o]);return e(t,n,r)}}(e)),function(o){for(var i=X,s="",a=arguments.length,h=[],u=0;u<o.length;u++)if(u<a-1){var l=arguments[u+1],c=E(o[u]),f=i;f===ae&&(f=ie),f===se&&(f=ie),f===oe&&(f=ie),f===te&&(f=ne),f===J?"/"===s?(c.push([J,"/",l]),s=""):c.push([J,l]):c.push([0,f,l]),h.push.apply(h,c)}else h.push.apply(h,E(o[u]));var p,d=[null,{},[]],m=[[d,-1]];for(u=0;u<h.length;u++){var v=m[m.length-1][0],g=(c=h[u])[0];if(g===J&&/^\//.test(c[1])){var y=m[m.length-1][1];m.length>1&&(m.pop(),m[m.length-1][0][2][y]=e(v[0],v[1],v[2].length?v[2]:void 0))}else if(g===J){var w=[c[1],{},[]];v[2].push(w),m.push([w,v[2].length-1])}else if(g===ne||0===g&&c[1]===ne){for(var b,A="";u<h.length;u++)if(h[u][0]===ne)A=n(A,h[u][1]);else{if(0!==h[u][0]||h[u][1]!==ne)break;if("object"!=typeof h[u][2]||A)A=n(A,h[u][2]);else for(b in h[u][2])h[u][2].hasOwnProperty(b)&&!v[1][b]&&(v[1][b]=h[u][2][b])}h[u][0]===he&&u++;for(var _=u;u<h.length;u++)if(h[u][0]===ie||h[u][0]===ne)v[1][A]?""===h[u][1]||(v[1][A]=n(v[1][A],h[u][1])):v[1][A]=r(h[u][1]);else{if(0!==h[u][0]||h[u][1]!==ie&&h[u][1]!==ne){!A.length||v[1][A]||u!==_||h[u][0]!==ee&&h[u][0]!==ue||(v[1][A]=A.toLowerCase()),h[u][0]===ee&&u--;break}v[1][A]?""===h[u][2]||(v[1][A]=n(v[1][A],h[u][2])):v[1][A]=r(h[u][2])}}else if(g===ne)v[1][c[1]]=!0;else if(0===g&&c[1]===ne)v[1][c[2]]=!0;else if(g===ee)p=v[0],fe.test(p)&&m.length&&(y=m[m.length-1][1],m.pop(),m[m.length-1][0][2][y]=e(v[0],v[1],v[2].length?v[2]:void 0));else if(0===g&&c[1]===X)void 0===c[2]||null===c[2]?c[2]="":c[2]||(c[2]=n("",c[2])),Array.isArray(c[2][0])?v[2].push.apply(v[2],c[2]):v[2].push(c[2]);else if(g===X)v[2].push(c[1]);else if(g!==he&&g!==ue)throw new Error("unhandled: "+g)}if(d[2].length>1&&/^\s*$/.test(d[2][0])&&d[2].shift(),d[2].length>2||2===d[2].length&&/\S/.test(d[2][1]))throw new Error("multiple root elements must be wrapped in an enclosing tag");return Array.isArray(d[2][0])&&"string"==typeof d[2][0][0]&&Array.isArray(d[2][0][2])&&(d[2][0]=e(d[2][0][0],d[2][0][1],d[2][0][2])),d[2][0];function E(e){var n=[];i===oe&&(i=te);for(var r=0;r<e.length;r++){var o=e.charAt(r);i===X&&"<"===o?(s.length&&n.push([X,s]),s="",i=J):">"!==o||ce(i)||i===le?i===le&&/-$/.test(s)&&"-"===o?(t.comments&&n.push([ie,s.substr(0,s.length-1)],[ee]),s="",i=X):i===J&&/^!--$/.test(s)?(t.comments&&n.push([J,s],[ne,"comment"],[he]),s=o,i=le):i===X||i===le?s+=o:i===J&&"/"===o&&s.length||(i===J&&/\s/.test(o)?(s.length&&n.push([J,s]),s="",i=te):i===J?s+=o:i===te&&/[^\s"'=/]/.test(o)?(i=ne,s=o):i===te&&/\s/.test(o)?(s.length&&n.push([ne,s]),n.push([ue])):i===ne&&/\s/.test(o)?(n.push([ne,s]),s="",i=re):i===ne&&"="===o?(n.push([ne,s],[he]),s="",i=oe):i===ne?s+=o:i!==re&&i!==te||"="!==o?i!==re&&i!==te||/\s/.test(o)?i===oe&&'"'===o?i=ae:i===oe&&"'"===o?i=se:i===ae&&'"'===o?(n.push([ie,s],[ue]),s="",i=te):i===se&&"'"===o?(n.push([ie,s],[ue]),s="",i=te):i!==oe||/\s/.test(o)?i===ie&&/\s/.test(o)?(n.push([ie,s],[ue]),s="",i=te):i!==ie&&i!==se&&i!==ae||(s+=o):(i=ie,r--):(n.push([ue]),/[\w-]/.test(o)?(s+=o,i=ne):i=te):(n.push([he]),i=oe)):(i===J&&s.length?n.push([J,s]):i===ne?n.push([ne,s]):i===ie&&s.length&&n.push([ie,s]),n.push([ee]),s="",i=X)}return i===X&&s.length?(n.push([X,s]),s=""):i===ie&&s.length?(n.push([ie,s]),s=""):i===ae&&s.length?(n.push([ie,s]),s=""):i===se&&s.length?(n.push([ie,s]),s=""):i===ne&&(n.push([ne,s]),s=""),n}};function r(e){return"function"==typeof e?e:"string"==typeof e?e:e&&"object"==typeof e?e:n("",e)}}(we,{comments:!0})).default=pe,pe.createElement=we;var be=pe,Ae={};function _e(e){if(!(this instanceof _e))return new _e(e);"number"==typeof e&&(e={max:e}),e||(e={}),this.cache={},this.head=this.tail=null,this.length=0,this.max=e.max||1e3,this.maxAge=e.maxAge||0}Ae=_e,Object.defineProperty(_e.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),_e.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},_e.prototype.remove=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];return delete this.cache[e],this._unlink(e,t.prev,t.next),t.value}},_e.prototype._unlink=function(e,t,n){this.length--,0===this.length?this.head=this.tail=null:this.head===e?(this.head=t,this.cache[this.head].next=null):this.tail===e?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[t].next=n,this.cache[n].prev=t)},_e.prototype.peek=function(e){if(this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return t.value}},_e.prototype.set=function(e,t){var n;if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){if((n=this.cache[e]).value=t,this.maxAge&&(n.modified=Date.now()),e===this.head)return t;this._unlink(e,n.prev,n.next)}else n={value:t,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[e]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=e),this.head=e,this.tail||(this.tail=e),t},_e.prototype._checkAge=function(e,t){return!(this.maxAge&&Date.now()-t.modified>this.maxAge&&(this.remove(e),1))},_e.prototype.get=function(e){if("string"!=typeof e&&(e=""+e),this.cache.hasOwnProperty(e)){var t=this.cache[e];if(this._checkAge(e,t))return this.head!==e&&(e===this.tail?(this.tail=t.next,this.cache[this.tail].prev=null):this.cache[t.prev].next=t.next,this.cache[t.next].prev=t.prev,this.cache[this.head].next=e,t.prev=this.head,t.next=null,this.head=e),t.value}},_e.prototype.evict=function(){this.tail&&this.remove(this.tail)};var Ee={};function Te(e,t,n){this.cache="number"==typeof n?new Ae(n):n||new Ae(100),this.state=e,this.emit=t}function Oe(e){return new(e.bind.apply(e,arguments))}Ee=Te,Te.prototype.render=function(e,t){var n=this.cache.get(t);if(!n){for(var r=[],o=2,i=arguments.length;o<i;o++)r.push(arguments[o]);r.unshift(e,t,this.state,this.emit),n=Oe.apply(Oe,r),this.cache.set(t,n)}return n};var xe=function(e){var t=document.readyState;if("complete"===t||"interactive"===t)return setTimeout(e,0);document.addEventListener("DOMContentLoaded",function(){e()})},Se="undefined"!=typeof window;function Ne(e){this.hasWindow=e,this.hasIdle=this.hasWindow&&window.requestIdleCallback,this.method=this.hasIdle?window.requestIdleCallback.bind(window):this.setTimeout,this.scheduled=!1,this.queue=[]}Ne.prototype.push=function(e){this.queue.push(e),this.schedule()},Ne.prototype.schedule=function(){if(!this.scheduled){this.scheduled=!0;var e=this;this.method(function(t){for(;e.queue.length&&t.timeRemaining()>0;)e.queue.shift()(t);e.scheduled=!1,e.queue.length&&e.schedule()})}},Ne.prototype.setTimeout=function(e){setTimeout(e,0,{timeRemaining:function(){return 1}})};var Ce,ke=function(){var e;return Se?(window._nanoScheduler||(window._nanoScheduler=new Ne(!0)),e=window._nanoScheduler):e=new Ne,e}();Le.disabled=!0;try{Ce=window.performance,Le.disabled="true"===window.localStorage.DISABLE_NANOTIMING||!Ce.mark}catch(e){}function Le(e){if(Le.disabled)return Re;var t=(1e4*Ce.now()).toFixed()%Number.MAX_SAFE_INTEGER,n="start-"+t+"-"+e;function r(r){var o="end-"+t+"-"+e;Ce.mark(o),ke.push(function(){var i=null;try{var s=e+" ["+t+"]";Ce.measure(s,n,o),Ce.clearMarks(n),Ce.clearMarks(o)}catch(e){i=e}r&&r(i,e)})}return Ce.mark(n),r.uuid=t,r}function Re(e){e&&ke.push(function(){e(new Error("nanotiming: performance API unavailable"))})}var Ie=Le,je=function(e,t,n){var r,o=e.length;if(!(t>=o||0===n)){var i=o-(n=t+n>o?o-t:n);for(r=t;r<i;++r)e[r]=e[r+n];e.length=i}},Pe={};function De(e){if(!(this instanceof De))return new De(e);this._name=e||"nanobus",this._starListeners=[],this._listeners={}}Pe=De,De.prototype.emit=function(e){for(var t=[],n=1,r=arguments.length;n<r;n++)t.push(arguments[n]);var o=Ie(this._name+"('"+e+"')"),i=this._listeners[e];return i&&i.length>0&&this._emit(this._listeners[e],t),this._starListeners.length>0&&this._emit(this._starListeners,e,t,o.uuid),o(),this},De.prototype.on=De.prototype.addListener=function(e,t){return"*"===e?this._starListeners.push(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)),this},De.prototype.prependListener=function(e,t){return"*"===e?this._starListeners.unshift(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].unshift(t)),this},De.prototype.once=function(e,t){var n=this;return this.on(e,function r(){t.apply(n,arguments),n.removeListener(e,r)}),this},De.prototype.prependOnceListener=function(e,t){var n=this;return this.prependListener(e,function r(){t.apply(n,arguments),n.removeListener(e,r)}),this},De.prototype.removeListener=function(e,t){return"*"===e?(this._starListeners=this._starListeners.slice(),n(this._starListeners,t)):(void 0!==this._listeners[e]&&(this._listeners[e]=this._listeners[e].slice()),n(this._listeners[e],t));function n(e,t){if(e){var n=e.indexOf(t);return-1!==n?(je(e,n,1),!0):void 0}}},De.prototype.removeAllListeners=function(e){return e?"*"===e?this._starListeners=[]:this._listeners[e]=[]:(this._starListeners=[],this._listeners={}),this},De.prototype.listeners=function(e){var t="*"!==e?this._listeners[e]:this._starListeners,n=[];if(t)for(var r=t.length,o=0;o<r;o++)n.push(t[o]);return n},De.prototype._emit=function(e,t,n,r){if(void 0!==e&&0!==e.length){void 0===n&&(n=t,t=null),t&&(n=void 0!==r?[t].concat(n,r):[t].concat(n));for(var o=e.length,i=0;i<o;i++){var s=e[i];s.apply(s,n)}}};var Me=/(noopener|noreferrer) (noopener|noreferrer)/,qe=/^[\w-_]+:/,Ue=function(){return window.location.pathname.replace(/\/$/,"")+window.location.hash.replace(/^#/,"/")},$e=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onmouseenter","onmouseleave","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ondragstart","ondrag","ondragenter","ondragleave","ondragover","ondrop","ondragend","onkeydown","onkeypress","onkeyup","onunload","onabort","onerror","onresize","onscroll","onselect","onchange","onsubmit","onreset","onfocus","onblur","oninput","oncontextmenu","onfocusin","onfocusout"],Ge=$e.length;function Ve(e,t,n){e[n]!==t[n]&&(t[n]=e[n],e[n]?t.setAttribute(n,""):t.removeAttribute(n))}var Fe=function(e,t){var n=e.nodeType,r=e.nodeName;1===n&&function(e,t){for(var n=t.attributes,r=e.attributes,o=null,i=null,s=null,a=null,h=r.length-1;h>=0;--h)s=(a=r[h]).name,o=a.namespaceURI,i=a.value,o?(s=a.localName||s,t.getAttributeNS(o,s)!==i&&t.setAttributeNS(o,s,i)):t.hasAttribute(s)?t.getAttribute(s)!==i&&("null"===i||"undefined"===i?t.removeAttribute(s):t.setAttribute(s,i)):t.setAttribute(s,i);for(var u=n.length-1;u>=0;--u)!1!==(a=n[u]).specified&&(s=a.name,(o=a.namespaceURI)?(s=a.localName||s,e.hasAttributeNS(o,s)||t.removeAttributeNS(o,s)):e.hasAttributeNS(null,s)||t.removeAttribute(s))}(e,t),3!==n&&8!==n||t.nodeValue!==e.nodeValue&&(t.nodeValue=e.nodeValue),"INPUT"===r?function(e,t){var n=e.value,r=t.value;Ve(e,t,"checked"),Ve(e,t,"disabled"),n!==r&&(t.setAttribute("value",n),t.value=n),"null"===n&&(t.value="",t.removeAttribute("value")),e.hasAttributeNS(null,"value")?"range"===t.type&&(t.value=n):t.removeAttribute("value")}(e,t):"OPTION"===r?function(e,t){Ve(e,t,"selected")}(e,t):"TEXTAREA"===r&&function(e,t){var n=e.value;if(n!==t.value&&(t.value=n),t.firstChild&&t.firstChild.nodeValue!==n){if(""===n&&t.firstChild.nodeValue===t.placeholder)return;t.firstChild.nodeValue=n}}(e,t),function(e,t){for(var n=0;n<Ge;n++){var r=$e[n];e[r]?t[r]=e[r]:t[r]&&(t[r]=void 0)}}(e,t)},We=3;function He(e,t){return e.id?e.id===t.id:e.isSameNode?e.isSameNode(t):e.tagName===t.tagName&&e.type===We&&e.nodeValue===t.nodeValue}var Be=function(e,t){return function e(t,n){return n?t?t.isSameNode&&t.isSameNode(n)?n:t.tagName!==n.tagName?t:(Fe(t,n),function(t,n){for(var r,o,i,s,a=0,h=0;r=n.childNodes[h],o=t.childNodes[h-a],r||o;h++)if(o)if(r)if(He(o,r))(i=e(o,r))!==r&&(n.replaceChild(i,r),a++);else{s=null;for(var u=h;u<n.childNodes.length;u++)if(He(n.childNodes[u],o)){s=n.childNodes[u];break}s?((i=e(o,s))!==s&&a++,n.insertBefore(i,r)):o.id||r.id?(n.insertBefore(o,r),a++):(i=e(o,r))!==r&&(n.replaceChild(i,r),a++)}else n.appendChild(o),a++;else n.removeChild(r),h--}(t,n),n):null:t}(t,e)},ze=/([^?=&]+)(=([^&]*))?/g,Ke=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)Ye.call(n,r)&&(e[r]=n[r])}return e},Ye=Object.prototype.hasOwnProperty,Ze={};function Qe(){if(!(this instanceof Qe))return new Qe;this.trie={nodes:{}}}Ze=Qe,Qe.prototype.create=function(e){var t=e.replace(/^\//,"").split("/");return function e(n,r){var o=t.hasOwnProperty(n)&&t[n];if(!1===o)return r;var i=null;return/^:|^\*/.test(o)?(r.nodes.hasOwnProperty("$$")?i=r.nodes.$$:(i={nodes:{}},r.nodes.$$=i),"*"===o[0]&&(r.wildcard=!0),r.name=o.replace(/^:|^\*/,"")):r.nodes.hasOwnProperty(o)?i=r.nodes[o]:(i={nodes:{}},r.nodes[o]=i),e(n+1,i)}(0,this.trie)},Qe.prototype.match=function(e){var t=e.replace(/^\//,"").split("/"),n={},r=function e(r,o){if(void 0!==o){var i=t[r];if(void 0===i)return o;if(o.nodes.hasOwnProperty(i))return e(r+1,o.nodes[i]);if(o.name){try{n[o.name]=decodeURIComponent(i)}catch(t){return e(r,void 0)}return e(r+1,o.nodes.$$)}if(o.wildcard){try{n.wildcard=decodeURIComponent(t.slice(r).join("/"))}catch(t){return e(r,void 0)}return o.nodes.$$}return e(r+1)}}(0,this.trie);if(r)return(r=Ke(r)).params=n,r},Qe.prototype.mount=function(e,t){var n=e.replace(/^\//,"").split("/"),r=null,o=null;if(1===n.length)o=n[0],r=this.create(o);else{var i=n.join("/");o=n[0],r=this.create(i)}$(r.nodes,t.nodes),t.name&&(r.name=t.name),r.nodes[""]&&(Object.keys(r.nodes[""]).forEach(function(e){"nodes"!==e&&(r[e]=r.nodes[""][e])}),$(r.nodes,r.nodes[""].nodes),delete r.nodes[""].nodes)};var Xe=function e(t){if(!(this instanceof e))return new e(t);var n=(t||"").replace(/^\//,""),r=Ze();return o._trie=r,o.on=function(e,t){(e=e||"/",t.route=e,t&&t._wayfarer&&t._trie)?r.mount(e,t._trie.trie):r.create(e).cb=t;return o},o.emit=o,o.match=i,o._wayfarer=!0,o;function o(e){var t=i(e),n=new Array(arguments.length);n[0]=t.params;for(var r=1;r<n.length;r++)n[r]=arguments[r];return t.cb.apply(t.cb,n)}function i(e){var t=r.match(e);if(t&&t.cb)return new s(t);var o=r.match(n);if(o&&o.cb)return new s(o);throw new Error("route '"+e+"' did not match")}function s(e){this.cb=e.cb,this.route=e.cb.route,this.params=e.params}},Je={},et=/file:\/\//.test("object"==typeof window&&window.location&&window.location.origin),tt=new RegExp("^(file://|/)(.*.html?/?)?"),nt=new RegExp("^(http(s)?(://))?(www.)?[a-zA-Z0-9-_.]+(:[0-9]{1,5})?(/{1})?"),rt=new RegExp("#"),ot=new RegExp("[?].*$");function it(e){if(!(this instanceof it))return new it(e);e=e||{},this.router=Xe(e.default||"/404")}function st(e,t){return e=t?e.replace(tt,""):e.replace(nt,""),decodeURI(e.replace(ot,"").replace(rt,"/"))}Je=it,it.prototype.on=function(e,t){e=e.replace(/^[#/]/,""),this.router.on(e,t)},it.prototype.emit=function(e){return e=st(e,et),this.router.emit(e)},it.prototype.match=function(e){return e=st(e,et),this.router.match(e)};var at=ut,ht={};function ut(e){if(!(this instanceof ut))return new ut(e);e=e||{};var t=this;this._events={DOMCONTENTLOADED:"DOMContentLoaded",DOMTITLECHANGE:"DOMTitleChange",REPLACESTATE:"replaceState",PUSHSTATE:"pushState",NAVIGATE:"navigate",POPSTATE:"popState",RENDER:"render"},this._historyEnabled=void 0===e.history||e.history,this._hrefEnabled=void 0===e.href||e.href,this._hasWindow="undefined"!=typeof window,this._createLocation=Ue,this._cache=e.cache,this._loaded=!1,this._stores=[],this._tree=null;var n={events:this._events,components:{}};this._hasWindow?(this.state=window.initialState?Ke(window.initialState,n):n,delete window.initialState):this.state=n,this.router=Je({curry:!0}),this.emitter=Pe("choo.emit"),this.emit=this.emitter.emit.bind(this.emitter),this._hasWindow&&(this.state.title=document.title),this.emitter.prependListener(this._events.DOMTITLECHANGE,function(e){t.state.title=e,t._hasWindow&&(document.title=e)})}ut.prototype.route=function(e,t){this.router.on(e,t)},ut.prototype.use=function(e){var t=this;this._stores.push(function(n){var r="choo.use";r=e.storeName?r+"("+e.storeName+")":r;var o=Ie(r);e(n,t.emitter,t),o()})},ut.prototype.start=function(){var e,t,n=this;return this._historyEnabled&&(this.emitter.prependListener(this._events.NAVIGATE,function(){n._matchRoute(),n._loaded&&(n.emitter.emit(n._events.RENDER),setTimeout(function(e,t){if(e)try{var n=document.querySelector(e);n&&n.scrollIntoView(t)}catch(e){}}.bind(null,window.location.hash),0))}),this.emitter.prependListener(this._events.POPSTATE,function(){n.emitter.emit(n._events.NAVIGATE)}),this.emitter.prependListener(this._events.PUSHSTATE,function(e){window.history.pushState(ht,null,e),n.emitter.emit(n._events.NAVIGATE)}),this.emitter.prependListener(this._events.REPLACESTATE,function(e){window.history.replaceState(ht,null,e),n.emitter.emit(n._events.NAVIGATE)}),window.onpopstate=function(){n.emitter.emit(n._events.POPSTATE)},n._hrefEnabled&&(e=function(e){var t=e.href;t!==window.location.href&&n.emitter.emit(n._events.PUSHSTATE,t)},t=t||window.document,window.addEventListener("click",function(n){if(!(n.button&&0!==n.button||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey||n.defaultPrevented)){var r=function e(n){if(n&&n!==t)return"a"!==n.localName||void 0===n.href?e(n.parentNode):n}(n.target);r&&(window.location.origin!==r.origin||r.hasAttribute("download")||"_blank"===r.getAttribute("target")&&Me.test(r.getAttribute("rel"))||qe.test(r.getAttribute("href"))||(n.preventDefault(),e(r)))}}))),this._setCache(this.state),this._stores.forEach(function(e){e(n.state)}),this._matchRoute(),this._tree=this._prerender(this.state),this.emitter.prependListener(n._events.RENDER,function(e,t){t||(t=window.requestAnimationFrame);var n=!1,r=null;return function(){null!==r||n||(n=!0,t(function(){n=!1;for(var t=r.length,o=new Array(t),i=0;i<t;i++)o[i]=r[i];e.apply(e,o),r=null})),r=arguments}}(function(){var e=Ie("choo.render"),t=n._prerender(n.state),r=Ie("choo.morph");Be(n._tree,t),r(),e()})),xe(function(){n.emitter.emit(n._events.DOMCONTENTLOADED),n._loaded=!0}),this._tree},ut.prototype.mount=function(e){if("object"!=typeof window)return this.selector=e,this;var t=this;xe(function(){var n=Ie("choo.render"),r=t.start();t._tree="string"==typeof e?document.querySelector(e):e;var o=Ie("choo.morph");Be(t._tree,r),o(),n()})},ut.prototype.toString=function(e,t){this.state=Ke(this.state,t||{});var n=this;this._setCache(this.state),this._stores.forEach(function(e){e(n.state)}),this._matchRoute(e);var r=this._prerender(this.state);return"string"==typeof r.outerHTML?r.outerHTML:r.toString()},ut.prototype._matchRoute=function(e){var t,n;e?(t=e.replace(/\?.+$/,""),n=e):(t=this._createLocation(),n=window.location.search);var r,o=this.router.match(t);return this._handler=o.cb,this.state.href=t,this.state.query=(r={},n.replace(/^.*\?/,"").replace(ze,function(e,t,n,o){r[decodeURIComponent(t)]=decodeURIComponent(o)}),r),this.state.route=o.route,this.state.params=o.params,this.state},ut.prototype._prerender=function(e){var t=Ie("choo.prerender('"+e.route+"')"),n=this._handler(e,this.emit);return t(),n},ut.prototype._setCache=function(e){var t=new Ee(e,this.emitter.emit.bind(this.emitter),this._cache);function n(e,n){for(var r=[],o=0,i=arguments.length;o<i;o++)r.push(arguments[o]);return t.render.apply(t,r)}e.cache=n,n.toJSON=function(){return null}};var lt=[{title:"background",link:"background",post:["here is what i want to say"]},{title:"the future",link:"the-future",post:["here is another thing."]},{title:"a third thing",link:"a-third-thing",post:["a third thing tooo."]},{title:"the playlist as offering",post:["You seek out songs and bands to explore your own history and place. The details of a narrative you feel called to own.","When your first uinteraction with an emition, a tremble, a hue of a color you could name but not see. You are introduced to your personal version of these things when you hear certain songs. These songs are like droplets of amber, containing a reflection of the place you heard it, the time you heard it. They contain a reflection of you.","During these moments, the gift ofa mixtape is a literal offering of yourself. the mixtape is a form of oral storytelling, like the folktales of old that act as song, lesson, and map all at once.","The myths that contain maps, the myths whose style and rhythm of telling are important for within that is held a map."]}];const ct=()=>be` |
2 | <div class='paper-splash'> |
3 | <h1>music</h1> |
4 | <h1>visions</h1> |
5 | <a href='#songbook'>~enter~</a> |
6 | </div> |
7 | `,ft=at();ft.use(V()),ft.use(function(e,t){e.songs=lt,e.currentSong="",t.on("DOMContentLoaded",function(){t.on("changeSong",function(e){e=e.replace(/\s+/g,"-").toLowerCase(),t.emit("pushState","/#songbook/"+e),setTimeout("document.getElementById('track').classList.toggle('change-color')",1500)})}),t.on("DOMContentLoaded",function(){t.on("close",function(t){e.lastSong=t})})}),ft.route("/",ct),ft.route("#songbook",function(e,t){return function(e,t){return be` |
8 | <div class='wrapper'> |
9 | <div class='paper'> |
10 | <h1>M U S I C V I S I O N S </h1> |
11 | <div id='tracklist'> |
12 | <ul> |
13 | ${e.songs.map(n)} |
14 | </ul> |
15 | </div> |
16 | <h1>Last Track: something</h1> |
17 | </div> |
18 | </div> |
19 | `}(e);function n(e){return be`<li onclick=${r}>${e.title}</li>`}function r(e){console.log(e.target.innerHTML),song=e.target.innerHTML,t("changeSong",song)}}),ft.route("#songbook/:song",function(e,t){var n=e.songs.find(t=>t.title==e.params.song.replace(/-/g," "));return console.log({song:n}),be` |
20 | <div class='wrapper'> |
21 | <div id='track' class='paper'> |
22 | <h1>${n.title}</h1> |
23 | <div id='text'> |
24 | ${n.post.map(function(e){return be`<p>${e}</p>`})} |
25 | </div> |
26 | <a href='#songbook'>x close x</a> |
27 | </div> |
28 | </div> |
29 | `}),ft.mount("div")}(); |
Built with git-ssb-web