diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..231a94b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2016 Evan You
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README.md b/README.md
index 0ba5d12..c7343c9 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,15 @@
+> **NOTE**: this demo is using Vue.js 1.x - the 2.0 version is [here](https://github.com/vuejs/vue-hackernews-2.0).
+
# Vue.js HackerNews clone
-[Live demo](http://yyx990803.github.io/vue-hackernews/)
+[Live demo](http://vuejs.github.io/vue-hackernews/)
-Built with [Vue.js](http://vuejs.org) and the official [HackerNews API](https://github.com/HackerNews/API), with routing, comments, comment folding, user profile & realtime updates.
+Built with [Vue.js](http://vuejs.org), [vue-router](https://github.com/vuejs/vue-router) and the official [HackerNews API](https://github.com/HackerNews/API), with routing, comments, comment folding, user profile & realtime updates.
-The build setup uses Webpack and the [Vue Loader](https://github.com/vuejs/vue-loader) plugin, which enables Vue components to be written in a format that encapsulates a component's style, template and logic in a single file.
+The build setup uses [Webpack](http://webpack.github.io/) and the [vue-loader](https://github.com/vuejs/vue-loader) plugin, which enables Vue components to be written in a format that encapsulates a component's style, template and logic in a single file.
If you are using SublimeText you can get proper syntax highlighting for `*.vue` files with [vue-syntax-highlight](https://github.com/vuejs/vue-syntax-highlight).
-There's also a version of this app built with Browserify + [Vueify](https://github.com/vuejs/vueify) in the [browserify branch](https://github.com/yyx990803/vue-hackernews/tree/browserify).
-
### Building
``` bash
@@ -19,3 +19,7 @@ npm run dev
# build:
npm run build
```
+
+### License
+
+[MIT](http://opensource.org/licenses/MIT)
diff --git a/build/build.js b/build/build.js
deleted file mode 100644
index 45ad1ea..0000000
--- a/build/build.js
+++ /dev/null
@@ -1,7 +0,0 @@
-!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){var i=n(2),r=n(3).Router,o=new i(n(1)),s=new r;s.on("/news/:page",function(t){window.scrollTo(0,0),o.view="news-view",o.params.page=+t}),s.on("/user/:id",function(t){window.scrollTo(0,0),o.view="user-view",o.params.userId=t}),s.on("/item/:id",function(t){window.scrollTo(0,0),o.view="item-view",o.params.itemId=t}),s.configure({notfound:function(){s.setRoute("/news/1")}}),s.init("/news/1")},function(t,e,n){n(22)("body,html{font-family:Verdana;font-size:13px;margin:0;height:100%;background-color:#f6f6ef}ul{list-style-type:none;padding:0;margin:0}a{color:#000;cursor:pointer;text-decoration:none}#header{background-color:#f60;height:24px;position:relative}#header h1{font-weight:700;font-size:13px;display:inline-block;vertical-align:middle;margin:0}#header .source{color:#fff;font-size:11px;position:absolute;top:4px;right:4px}#header .source a{color:#fff}#header .source a:hover{text-decoration:underline}#yc{border:1px solid #fff;margin:2px;display:inline-block;vertical-align:middle}#yc img{vertical-align:middle}.view{position:absolute;width:100%;transition:opacity .1s ease;box-sizing:border-box;padding:8px 20px}.view.v-enter,.view.v-leave{opacity:0}");var i='\n
\n \n ';t.exports={el:"#app",data:{view:"",params:{page:1,userId:null,itemId:null}},filters:{fromNow:n(4),domain:n(5)},components:{"news-view":n(6),"item-view":n(7),"user-view":n(8)}},t.exports.template=i},function(t,e,n){function i(t){this._init(t)}var r=n(9),o=r.extend;o(i,n(10)),i.options={directives:n(16),filters:n(17),partials:{},transitions:{},components:{}};var s=i.prototype;Object.defineProperty(s,"$data",{get:function(){return this._data},set:function(t){this._setData(t)}}),o(s,n(18)),o(s,n(19)),o(s,n(20)),o(s,n(21)),o(s,n(11)),o(s,n(12)),o(s,n(13)),o(s,n(14)),o(s,n(15)),t.exports=r.Vue=i},function(t,e){!function(t){function e(){return""===u.hash||"#"===u.hash}function n(t,e){for(var n=0;nn;n++)e=e.concat(t[n]);return e}function r(t,e,n){if(!t.length)return n();var i=0;!function r(){e(t[i],function(e){e||e===!1?(n(e),n=function(){}):(i+=1,i===t.length?n():r())})}()}function o(t,e,n){n=t;for(var i in e)if(e.hasOwnProperty(i)&&(n=e[i](t),n!==t))break;return n===t?"([._a-zA-Z0-9-]+)":n}function a(t,e){for(var n,i=0,r="";n=t.substr(i).match(/[^\w\d\- %@&]*\*[^\w\d\- %@&]*/);)i=n.index+n[0].length,n[0]=n[0].replace(/^\*/,"([_.()!\\ %@&a-zA-Z0-9-]+)"),r+=t.substr(0,n.index)+n[0];t=r+=t.substr(i);var s,a,h=t.match(/:([^\/]+)/gi);if(h){a=h.length;for(var u=0;a>u;u++)s=h[u],t="::"===s.slice(0,2)?s.slice(1):t.replace(s,o(s,e))}return t}function h(t,e,n,i){var r,o=0,s=0,a=0,n=(n||"(").toString(),i=(i||")").toString();for(r=0;rh.indexOf(i,o)||~h.indexOf(n,o)&&!~h.indexOf(i,o)||!~h.indexOf(n,o)&&~h.indexOf(i,o)){if(s=h.indexOf(n,o),a=h.indexOf(i,o),~s&&!~a||!~s&&~a){var u=t.slice(0,(r||1)+1).join(e);t=[u].concat(t.slice((r||1)+1))}o=(a>s?a:s)+1,r=0}else o=0}return t}var u=document.location,c={mode:"modern",hash:u.hash,history:!1,check:function(){var t=u.hash;t!=this.hash&&(this.hash=t,this.onHashChanged())},fire:function(){"modern"===this.mode?this.history===!0?window.onpopstate():window.onhashchange():this.onHashChanged()},init:function(t,e){function n(t){for(var e=0,n=l.listeners.length;n>e;e++)l.listeners[e](t)}var i=this;if(this.history=e,l.listeners||(l.listeners=[]),"onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7))this.history===!0?setTimeout(function(){window.onpopstate=n},500):window.onhashchange=n,this.mode="modern";else{var r=document.createElement("iframe");r.id="state-frame",r.style.display="none",document.body.appendChild(r),this.writeFrame(""),"onpropertychange"in document&&"attachEvent"in document&&document.attachEvent("onpropertychange",function(){"location"===event.propertyName&&i.check()}),window.setInterval(function(){i.check()},50),this.onHashChanged=n,this.mode="legacy"}return l.listeners.push(t),this.mode},destroy:function(t){if(l&&l.listeners)for(var e=l.listeners,n=e.length-1;n>=0;n--)e[n]===t&&e.splice(n,1)},setHash:function(t){return"legacy"===this.mode&&this.writeFrame(t),this.history===!0?(window.history.pushState({},document.title,t),this.fire()):u.hash="/"===t[0]?t:"/"+t,this},writeFrame:function(t){var e=document.getElementById("state-frame"),n=e.contentDocument||e.contentWindow.document;n.open(),n.write("'),t=""+t+"";try{this.ua.Ya.open(),this.ua.Ya.write(t),this.ua.Ya.close()}catch(o){kb("frame writing exception"),o.stack&&kb(o.stack),kb(o)}}function Yd(t){if(t.Wd&&t.Fd&&t.De.count()<(0=t.Lc[0].Xe.length+30+n.length;){var r=t.Lc.shift(),n=n+"&seg"+i+"="+r.ng+"&ts"+i+"="+r.vg+"&d"+i+"="+r.Xe;i++}return Zd(t,e+n,t.ie),!0}return!1}function Zd(t,e,n){function i(){t.De.remove(n),Yd(t)}t.De.add(n);var r=setTimeout(i,Math.floor(25e3));Xd(t,e,function(){clearTimeout(r),i()})}function Xd(t,e,n){setTimeout(function(){try{if(t.Fd){var i=t.ua.Ya.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.onload=i.onreadystatechange=function(){var t=i.readyState;t&&"loaded"!==t&&"complete"!==t||(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),n())},i.onerror=function(){kb("Long-poll script failed to load: "+e),t.Fd=!1,t.close()},t.ua.Ya.body.appendChild(i)}}catch(r){}},Math.floor(1))}function $d(t){ae(this,t)}function ae(t,e){var n=Jd&&Jd.isAvailable(),i=n&&!(va.gf||!0===va.get("previous_websocket_failure"));if(e.xg&&(n||z("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),i=!0),i)t.Vc=[Jd];else{var r=t.Vc=[];Cb(be,function(t,e){e&&e.isAvailable()&&r.push(e)})}}function ce(t){if(00&&(t.md=setTimeout(function(){t.md=null,t.vb||(t.K&&102400=t.uf?(t.f("Secondary connection is healthy."),t.vb=!0,t.H.rd(),t.H.start(),t.f("sending client ack on secondary"),t.H.send({t:"c",d:{t:"a",d:{}}}),t.f("Ending transmission on primary"),t.K.send({t:"c",d:{t:"n",d:{}}}),t.Wc=t.H,je(t)):(t.f("sending ping on secondary."),t.H.send({t:"c",d:{t:"p",d:{}}}))}function le(t){t.vb||(t.Fe--,0>=t.Fe&&(t.f("Primary connection is healthy."),t.vb=!0,t.K.rd()))}function ie(t,e){t.H=new e("c:"+t.id+":"+t.Se++,t.S,t.Gd),t.uf=e.responsesRequiredToBeHealthy||0,t.H.open(fe(t,t.H),ge(t,t.H)),setTimeout(function(){t.H&&(t.f("Timed out trying to upgrade."),t.H.close())},Math.floor(6e4))}function he(t,e,n){t.f("Realtime connection established."),t.K=e,t.Ra=1,t.Fc&&(t.Fc(n),t.Fc=null),0===t.Fe?(t.f("Primary connection is healthy."),t.vb=!0):setTimeout(function(){me(t)},Math.floor(5e3))}function me(t){t.vb||1!==t.Ra||(t.f("sending ping on primary."),oe(t,{t:"c",d:{t:"p",d:{}}}))}function oe(t,e){if(1!==t.Ra)throw"Connection is not connected";t.Wc.send(e)}function ke(t){t.f("Shutting down all connections"),t.K&&(t.K.close(),t.K=null),t.H&&(t.H.close(),t.H=null),t.md&&(clearTimeout(t.md),t.md=null)}function pe(t){var e={},n={},i={},r="";try{var o=t.split("."),e=sa(jb(o[0])||""),n=sa(jb(o[1])||""),r=o[2],i=n.d||{};delete n.d}catch(s){}return{Bg:e,de:n,data:i,sg:r}}function qe(t){return t=pe(t).de,"object"==typeof t&&t.hasOwnProperty("iat")?u(t,"iat"):null}function re(t){t=pe(t);var e=t.de;return!!t.sg&&!!e&&"object"==typeof e&&e.hasOwnProperty("iat")}function te(t,e,n,i){this.id=ue++,this.f=rb("p:"+this.id+":"),this.Eb=!0,this.ta={},this.ka=[],this.Ic=0,this.Ec=[],this.fa=!1,this.Ua=1e3,this.sd=3e5,this.xd=e,this.vd=n,this.Ce=i,this.S=t,this.Ie=null,this.Pc={},this.mg=0,this.yc=this.se=null,ve(this,0),qd.Mb().Ab("visible",this.eg,this),-1===t.host.indexOf("fblocal")&&rd.Mb().Ab("online",this.cg,this)}function xe(t,e,n,i,r){var o=e.Da(),s=e.path.toString();t.f("Listen called for "+s+" "+o),t.ta[s]=t.ta[s]||{},x(!t.ta[s][o],"listen() called twice for same path/queryId."),t.ta[s][o]={M:r,ld:n,ig:yc(e),tag:i},t.fa&&ye(t,s,o)}function ye(t,e,n){t.f("Listen on "+e+" for "+n);var i={p:e},r=t.ta[e][n];r.tag&&(i.q=r.ig,i.t=r.tag),r=t.ta[e][n],i.h=r.ld();var o=r.M;t.va("q",i,function(i){t.f("listen response",i);var r=i.s;"ok"!==r&&ze(t,e,n),o&&o(r,i.d)})}function Ae(t){var e=t.Hb;t.fa&&e&&t.va("auth",{cred:e.Mf},function(n){var i=n.s;n=n.d||"error","ok"!==i&&t.Hb===e&&delete t.Hb,e.$e?"ok"!==i&&e.Zc&&e.Zc(i,n):(e.$e=!0,e.mc&&e.mc(i,n))
-})}function Be(t,e,n,i){t.fa?Ce(t,"o",e,n,i):t.Ec.push({Kc:e,action:"o",data:n,M:i})}function De(t,e,n,i){t.fa?Ce(t,"om",e,n,i):t.Ec.push({Kc:e,action:"om",data:n,M:i})}function Ce(t,e,n,i,r){n={p:n,d:i},t.f("onDisconnect "+e,n),t.va(e,n,function(t){r&&setTimeout(function(){r(t.s,t.d)},Math.floor(0))})}function Fe(t,e,n,i){Ee(t,"m",e,n,i,void 0)}function Ee(t,e,n,i,r,o){i={p:n,d:i},m(o)&&(i.h=o),t.ka.push({action:e,pf:i,M:r}),t.Ic++,e=t.ka.length-1,t.fa?Ge(t,e):t.f("Buffering put: "+n)}function Ge(t,e){var n=t.ka[e].action,i=t.ka[e].pf,r=t.ka[e].M;t.ka[e].jg=t.fa,t.va(n,i,function(i){t.f(n+" response",i),delete t.ka[e],t.Ic--,0===t.Ic&&(t.ka=[]),r&&r(i.s,i.d)})}function ve(t,e){x(!t.Ta,"Scheduling a connect when we're already connected/ing?"),t.Jb&&clearTimeout(t.Jb),t.Jb=setTimeout(function(){t.Jb=null,Je(t)},Math.floor(e))}function Je(t){if(t.Eb){t.f("Making a connection attempt"),t.se=(new Date).getTime(),t.yc=null;var e=q(t.wd,t),n=q(t.Fc,t),i=q(t.kf,t),r=t.id+":"+we++;t.Ta=new de(r,t.S,e,n,i,function(e){z(e+" ("+t.S.toString()+")"),t.Eb=!1})}}function He(t,e,n){n=n?Ma(n,function(t){return Ab(t)}).join("$"):"default",(t=ze(t,e,n))&&t.M&&t.M("permission_denied")}function ze(t,e,n){e=new N(e).toString();var i=t.ta[e][n];return delete t.ta[e][n],0===sc(t.ta[e])&&delete t.ta[e],i}function Ie(t){Ae(t),A(t.ta,function(e,n){A(e,function(e,i){ye(t,n,i)})});for(var e=0;e=0;t--)try{if(e[t].location.protocol===window.location.protocol&&e[t].location.host===window.location.host&&"__winchan_relay_frame"===e[t].name)return e[t]}catch(n){}return null}function Ze(t,e,n){t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener&&t.addEventListener(e,n,!1)}function $e(t,e,n){t.detachEvent?t.detachEvent("on"+e,n):t.removeEventListener&&t.removeEventListener(e,n,!1)}function af(t){/^https?:\/\//.test(t)||(t=window.location.href);var e=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(t);return e?e[1]:t}function bf(e){var n="";try{e=e.replace("#","");var i={},r=e.replace(/^\?/,"").split("&");for(e=0;ep?(p=u(l,r.name),m(p)?(c.push(a[p]),a[p]=null):(f[r.name]=h.length,h.push(r)),r=T(n)):(p>0?(p=u(f,o.name),m(p)?(c.push(o),h[p]=null):(l[o.name]=a.length,a.push(o))):((r=r.L.hash()!==o.L.hash())&&c.push(o),r=T(n)),o=T(i))}for(l=0;l=a(s,t.gd)?Tf(t,e,n,i,r,o||e.k||e.g):null:0>=a(t.Jd,s)?Tf(t,e,n,i,r,o||e.k||e.g):null}function Tf(t,e,n,i,r,o){var s,a=Kb(t.index);s=t.Oa?function(t,e){return-1*a(t,e)}:a,e=W(e);var h=new C(n,i),u=t.Oa?gd(e,t.index):hd(e,t.index);return e.$(n)?(t=r.be(o,u,1,t.Oa,".priority"),0===t.length?e.w(n,i):(t=t[0],!i.e()&&0<=s(t,h)?e.w(n,i):e.w(n,E).w(t.name,t.L))):0<=s(u,h)?e.w(n,i).w(u.name,E):null}function Uf(t){this.G=t}function Vf(t){this.Y=t,this.G=t.C.G}function Wf(t,e,n,i){var r=[],o=t.G,s=Ma(La(e,function(t){return"child_changed"===t.type&&o.ef(t.Zf,t.Va)}),function(t){return new V("child_moved",t.Va,t.ob)}),a=Qa(e,function(t){return"child_removed"!==t.type&&"child_added"!==t.type});for(la(Sa,e,a,0).apply(null,s);0=0,"removeWrite called with nonexistent writeId.");var i=t.pa[n];t.pa.splice(n,1);for(var r=!1,o=!1,s=!1,a=t.pa.length-1;!r&&a>=0;){var h=t.pa[a];a>=n&&wg(h,i.path)?r=!0:!o&&i.path.contains(h.path)&&(a>=n?o=!0:s=!0),a--}return r||(o||s?xg(t):i.Qa?t.V=t.V.remove(i.path):A(i.children,function(e,n){t.V=t.V.remove(i.path.B(n))})),n=i.path,fg(t.V,n)?s?n:(x(r,"Must have found a shadow"),null):n}function wg(t,e){return t.Qa?t.path.contains(e):!!ud(t.children,function(n,i){return t.path.B(i).contains(e)})}function xg(t){t.V=yg(t.pa,zg,R),t.zc=0.firebaseio.com instead"),n||tb("Cannot parse Firebase url. Please use https://.firebaseio.com"),i.Cb||"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&z("Insecure Firebase access from a secure page. Please use https in calls to new Firebase()."),n=new xa(i.host,i.Cb,n,"ws"===i.scheme||"wss"===i.scheme),i=new N(i.Kc),r=i.toString();var o;if(!(o=!p(n.host)||0===n.host.length||!ac(n.zb))&&(o=0!==r.length)&&(r&&(r=r.replace(/^\/*\.info(\/|$)/,"/")),o=!(p(r)&&0!==r.length&&!$b.test(r))),o)throw Error(H("new Firebase",1,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".');if(e)if(e instanceof rh)r=e;else{if(!p(e))throw Error("Expected a valid Firebase.Context for second argument to new Firebase()");r=rh.Mb(),n.Cd=e}else r=rh.Mb();o=n.toString();var s=u(r.dc,o);s||(s=new Xg(n),r.dc[o]=s),n=s}L.call(this,n,i,Rb)}function qb(t,e){x(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?("undefined"!=typeof console&&("function"==typeof console.log?ob=q(console.log,console):"object"==typeof console.log&&(ob=function(t){console.log(t)})),e&&wa.set("logging_enabled",!0)):t?ob=t:(ob=null,wa.remove("logging_enabled"))}var h,aa=this,ma=Date.now||function(){return+new Date};h=ra.prototype,h.set=function(t,e){null==e?this.sc.removeItem(this.Dd+t):this.sc.setItem(this.Dd+t,v(e))},h.get=function(t){return t=this.sc.getItem(this.Dd+t),null==t?null:sa(t)},h.remove=function(t){this.sc.removeItem(this.Dd+t)},h.gf=!1,h.toString=function(){return this.sc.toString()},ta.prototype.set=function(t,e){null==e?delete this.la[t]:this.la[t]=e},ta.prototype.get=function(e){return t(this.la,e)?this.la[e]:null},ta.prototype.remove=function(t){delete this.la[t]},ta.prototype.gf=!0;var va=ua("localStorage"),wa=ua("sessionStorage");xa.prototype.toString=function(){var t=(this.Cb?"https://":"http://")+this.host;return this.Cd&&(t+="<"+this.Cd+">"),t},oa(Aa,za),Aa.prototype.reset=function(){this.T[0]=1732584193,this.T[1]=4023233417,this.T[2]=2562383102,this.T[3]=271733878,this.T[4]=3285377520,this.Pd=this.Pb=0},Aa.prototype.update=function(t,e){m(e)||(e=t.length);for(var n=e-this.Sa,i=0,r=this.Zd,o=this.Pb;e>i;){if(0==o)for(;n>=i;)Ba(this,t,i),i+=this.Sa;if(p(t)){for(;e>i;)if(r[o]=t.charCodeAt(i),++o,++i,o==this.Sa){Ba(this,r),o=0;break}}else for(;e>i;)if(r[o]=t[i],++o,++i,o==this.Sa){Ba(this,r),o=0;break}}this.Pb=o,this.Pd+=e};var Ga={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","":"\\u000b"},Ha=/\uffff/.test("ï¿¿")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,w=Array.prototype,Ja=w.indexOf?function(t,e,n){return w.indexOf.call(t,e,n)}:function(t,e,n){if(n=null==n?0:0>n?Math.max(0,t.length+n):n,p(t))return p(e)&&1==e.length?t.indexOf(e,n):-1;for(;no;o++)o in r&&e.call(n,r[o],o,t)},La=w.filter?function(t,e,n){return w.filter.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=[],o=0,s=p(t)?t.split(""):t,a=0;i>a;a++)if(a in s){var h=s[a];e.call(n,h,a,t)&&(r[o++]=h)}return r},Ma=w.map?function(t,e,n){return w.map.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=Array(i),o=p(t)?t.split(""):t,s=0;i>s;s++)s in o&&(r[s]=e.call(n,o[s],s,t));return r},Na=w.reduce?function(t,e,n,i){return i&&(e=q(e,i)),w.reduce.call(t,e,n)}:function(t,e,n,i){var r=n;return Ka(t,function(n,o){r=e.call(i,r,n,o,t)}),r},Oa=w.every?function(t,e,n){return w.every.call(t,e,n)}:function(t,e,n){for(var i=t.length,r=p(t)?t.split(""):t,o=0;i>o;o++)if(o in r&&!e.call(n,r[o],o,t))return!1;return!0},Wa;t:{var Xa=aa.navigator;if(Xa){var Ya=Xa.userAgent;if(Ya){Wa=Ya;break t}}Wa=""}var $a=Za("Opera")||Za("OPR"),ab=Za("Trident")||Za("MSIE"),bb=Za("Gecko")&&-1==Wa.toLowerCase().indexOf("webkit")&&!(Za("Trident")||Za("MSIE")),cb=-1!=Wa.toLowerCase().indexOf("webkit");!function(){var t,e="";return $a&&aa.opera?(e=aa.opera.version,ha(e)?e():e):(bb?t=/rv\:([^\);]+)(\)|;)/:ab?t=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:cb&&(t=/WebKit\/(\S+)/),t&&(e=(e=t.exec(Wa))?e[1]:""),ab&&(t=(t=aa.document)?t.documentMode:void 0,t>parseFloat(e))?String(t):e)}();var db=null,eb=null,hb=function(){var t=1;return function(){return t++}}(),ob=null,pb=!0,Eb=/^-?\d{1,10}$/,Jb=Object.create(null);Ib.prototype.ef=function(t,e){return 0!==this.compare(new C("[MIN_NAME]",t),new C("[MIN_NAME]",e))},Ib.prototype.ye=function(){return Lb},oa(Mb,Ib),h=Mb.prototype,h.qe=function(t){return!t.I(this.Rb).e()},h.compare=function(t,e){var n=t.L.I(this.Rb),i=e.L.I(this.Rb),n=n.fe(i);return 0===n?xb(t.name,e.name):n},h.we=function(t,e){var n=D(t),n=E.w(this.Rb,n);return new C(e,n)},h.xe=function(){var t=E.w(this.Rb,Nb);return new C("[MAX_NAME]",t)},h.toString=function(){return this.Rb};var F=new Mb(".priority");oa(Ob,Ib),h=Ob.prototype,h.compare=function(t,e){return xb(t.name,e.name)},h.qe=function(){throw ib("KeyIndex.isDefinedOn not expected to be called.")},h.ef=function(){return!1},h.ye=function(){return Lb},h.xe=function(){return new C("[MAX_NAME]",E)},h.we=function(t){return x(p(t),"KeyIndex indexValue must always be a string."),new C(t,E)},h.toString=function(){return".key"};var Pb=new Ob,Rb=new Qb;h=Qb.prototype,h.te=function(t){var e=Wb(this);return e.sa=!0,e.yb=t,e.Yc="",e},h.ue=function(t){var e=Wb(this);return e.sa=!0,e.yb=t,e.Yc="l",e},h.ve=function(t){var e=Wb(this);return e.sa=!0,e.yb=t,e.Yc="r",e},h.Id=function(t,e){var n=Wb(this);return n.wa=!0,n.wc=t,null!=e?(n.hc=!0,n.Tb=e):(n.hc=!1,n.Tb=""),n},h.fd=function(t,e){var n=Wb(this);return n.Ja=!0,n.vc=t,m(e)?(n.tc=!0,n.Qb=e):(n.Dg=!1,n.Qb=""),n},h.Hc=function(t){var e=Wb(this);return e.G=t,e};var Zb=/[\[\].#$\/\u0000-\u001F\u007F]/,$b=/[\[\].#$\u0000-\u001F\u007F]/;oc.prototype.Nb=function(){var t=this.Hd.bc();return"value"===this.hd?t.path:t.parent().path},oc.prototype.me=function(){return this.hd},oc.prototype.Lb=function(){return this.je.Lb(this)},oc.prototype.toString=function(){return this.Nb().toString()+":"+this.hd+":"+v(this.Hd.Ze())},pc.prototype.Nb=function(){return this.path},pc.prototype.me=function(){return"cancel"},pc.prototype.Lb=function(){return this.je.Lb(this)},pc.prototype.toString=function(){return this.path.toString()+":cancel"
-},h=qc.prototype,h.qf=function(t){return"value"===t},h.createEvent=function(t,e){var n=e.C.G;return new oc("value",this,new K(t.Va,e.bc(),n))},h.Lb=function(t){var e=this.pc;if("cancel"===t.me()){x(this.nb,"Raising a cancel event on a listener with no cancel callback");var n=this.nb;return function(){n.call(e,t.error)}}var i=this.Gb;return function(){i.call(e,t.Hd)}},h.Ue=function(t,e){return this.nb?new pc(this,t,e):null},h.matches=function(t){return t instanceof qc&&(!t.Gb||!this.Gb||t.Gb===this.Gb)&&t.pc===this.pc},h.df=function(){return null!==this.Gb},h=rc.prototype,h.qf=function(t){return t="children_added"===t?"child_added":t,("children_removed"===t?"child_removed":t)in this.ea},h.Ue=function(t,e){return this.nb?new pc(this,t,e):null},h.createEvent=function(t,e){var n=e.bc().B(t.ob);return new oc(t.type,this,new K(t.Va,n,e.C.G),t.Mc)},h.Lb=function(t){var e=this.pc;if("cancel"===t.me()){x(this.nb,"Raising a cancel event on a listener with no cancel callback");var n=this.nb;return function(){n.call(e,t.error)}}var i=this.ea[t.hd];return function(){i.call(e,t.Hd,t.Mc)}},h.matches=function(t){if(t instanceof rc){if(this.ea&&t.ea){var e=sc(t.ea);if(e===sc(this.ea)){if(1===e){var e=tc(t.ea),n=tc(this.ea);return!(n!==e||t.ea[e]&&this.ea[n]&&t.ea[e]!==this.ea[n])}return uc(this.ea,function(e,n){return t.ea[n]===e})}return!1}return!0}return!1},h.df=function(){return null!==this.ea},L.prototype.bc=function(){return G("Query.ref",0,0,arguments.length),new M(this.j,this.path)},L.prototype.ref=L.prototype.bc,L.prototype.Ab=function(t,e,n,i){G("Query.on",2,4,arguments.length),gc("Query.on",t,!1),I("Query.on",2,e,!1);var r=vc("Query.on",n,i);if("value"===t)wc(this.j,this,new qc(e,r.cancel||null,r.Ia||null));else{var o={};o[t]=e,wc(this.j,this,new rc(o,r.cancel,r.Ia))}return e},L.prototype.on=L.prototype.Ab,L.prototype.Yb=function(t,e,n){G("Query.off",0,3,arguments.length),gc("Query.off",t,!0),I("Query.off",2,e,!0),Yb("Query.off",3,n);var i=null,r=null;"value"===t?i=new qc(e||null,null,n||null):t&&(e&&(r={},r[t]=e),i=new rc(r,null,n||null)),r=this.j,i=".info"===J(this.path)?r.pd.eb(this,i):r.N.eb(this,i),xc(r.ba,this.path,i)},L.prototype.off=L.prototype.Yb,L.prototype.fg=function(t,e){function n(s){o&&(o=!1,r.Yb(t,n),e.call(i.Ia,s))}G("Query.once",2,4,arguments.length),gc("Query.once",t,!1),I("Query.once",2,e,!1);var i=vc("Query.once",arguments[2],arguments[3]),r=this,o=!0;this.Ab(t,n,function(e){r.Yb(t,n),i.cancel&&i.cancel.call(i.Ia,e)})},L.prototype.once=L.prototype.fg,L.prototype.te=function(t){if(G("Query.limit",1,1,arguments.length),!ga(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limit: First argument must be a positive integer.");if(this.C.Ja&&this.C.wa)throw Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.");return new L(this.j,this.path,this.C.te(t))},L.prototype.limit=L.prototype.te,L.prototype.ue=function(t){if(G("Query.limitToFirst",1,1,arguments.length),!ga(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limitToFirst: First argument must be a positive integer.");return new L(this.j,this.path,this.C.ue(t))},L.prototype.limitToFirst=L.prototype.ue,L.prototype.ve=function(t){if(G("Query.limitToLast",1,1,arguments.length),!ga(t)||Math.floor(t)!==t||0>=t)throw Error("Query.limitToLast: First argument must be a positive integer.");return new L(this.j,this.path,this.C.ve(t))},L.prototype.limitToLast=L.prototype.ve,L.prototype.Hc=function(t){if(G("Query.orderBy",1,1,arguments.length),"$key"===t)throw Error('Query.orderBy: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===t)throw Error('Query.orderBy: "$priority" is invalid. Use Query.orderByPriority() instead.');return hc("Query.orderBy",1,t,!1),new L(this.j,this.path,this.C.Hc(new Mb(t)))},L.prototype.orderBy=L.prototype.Hc,L.prototype.gg=function(){return G("Query.orderByKey",0,0,arguments.length),new L(this.j,this.path,this.C.Hc(Pb))},L.prototype.orderByKey=L.prototype.gg,L.prototype.hg=function(){return G("Query.orderByPriority",0,0,arguments.length),new L(this.j,this.path,this.C.Hc(F))},L.prototype.orderByPriority=L.prototype.hg,L.prototype.Id=function(t,e){if(G("Query.startAt",0,2,arguments.length),fc("Query.startAt",1,t,!0),hc("Query.startAt",2,e,!0),this.C.Ja&&this.C.sa&&!Ub(this.C))throw Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.");return m(t)||(e=t=null),new L(this.j,this.path,this.C.Id(t,e))},L.prototype.startAt=L.prototype.Id,L.prototype.fd=function(t,e){if(G("Query.endAt",0,2,arguments.length),fc("Query.endAt",1,t,!0),hc("Query.endAt",2,e,!0),this.C.wa&&this.C.sa&&!Ub(this.C))throw Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.");return new L(this.j,this.path,this.C.fd(t,e))},L.prototype.endAt=L.prototype.fd,L.prototype.Of=function(t,e){return G("Query.equalTo",1,2,arguments.length),fc("Query.equalTo",1,t,!1),hc("Query.equalTo",2,e,!0),this.Id(t,e).fd(t,e)},L.prototype.equalTo=L.prototype.Of,L.prototype.Da=function(){var t=Ab(yc(this));return"{}"===t?"default":t},N.prototype.toString=function(){for(var t="",e=this.da;e=this.A.length)return null;for(var t=[],e=this.da;e=this.A.length};var R=new N("");N.prototype.aa=function(t){if(O(this)!==O(t))return!1;for(var e=this.da,n=t.da;e<=this.A.length;e++,n++)if(this.A[e]!==t.A[n])return!1;return!0},N.prototype.contains=function(t){var e=this.da,n=t.da;if(O(this)>O(t))return!1;for(;ee?n=n.left:e>0&&(n=n.right)}return null},h.e=function(){return this.oa.e()},h.count=function(){return this.oa.count()},h.Dc=function(){return this.oa.Dc()},h.Vb=function(){return this.oa.Vb()},h.Ba=function(t){return this.oa.Ba(t)},h.Aa=function(t){return new Jc(this.oa,null,this.Ha,!1,t)},h.rb=function(t,e){return new Jc(this.oa,t,this.Ha,!1,e)},h.Ob=function(t,e){return new Jc(this.oa,t,this.Ha,!0,e)},h.cf=function(t){return new Jc(this.oa,null,this.Ha,!0,t)},h=Kc.prototype,h.Z=function(t,e,n,i,r){return new Kc(null!=t?t:this.key,null!=e?e:this.value,null!=n?n:this.color,null!=i?i:this.left,null!=r?r:this.right)},h.count=function(){return this.left.count()+1+this.right.count()},h.e=function(){return!1},h.Ba=function(t){return this.left.Ba(t)||t(this.key,this.value)||this.right.Ba(t)},h.Dc=function(){return Lc(this).key},h.Vb=function(){return this.right.e()?this.key:this.right.Vb()},h.La=function(t,e,n){var i,r;return r=this,i=n(t,r.key),r=0>i?r.Z(null,null,null,r.left.La(t,e,n),null):0===i?r.Z(null,e,null,null,null):r.Z(null,null,null,null,r.right.La(t,e,n)),Mc(r)},h.remove=function(t,e){var n,i;if(n=this,0>e(t,n.key))n.left.e()||n.left.ca()||n.left.left.ca()||(n=Oc(n)),n=n.Z(null,null,null,n.left.remove(t,e),null);else{if(n.left.ca()&&(n=Pc(n)),n.right.e()||n.right.ca()||n.right.left.ca()||(n=Qc(n),n.left.left.ca()&&(n=Pc(n),n=Qc(n))),0===e(t,n.key)){if(n.right.e())return Hc;i=Lc(n.right),n=n.Z(i.key,i.value,null,null,Nc(n.right))}n=n.Z(null,null,null,null,n.right.remove(t,e))}return Mc(n)},h.ca=function(){return this.color},h=Sc.prototype,h.Z=function(){return this},h.La=function(t,e){return new Kc(t,e,null)},h.remove=function(){return this},h.count=function(){return 0},h.e=function(){return!0},h.Ba=function(){return!1},h.Dc=function(){return null},h.Vb=function(){return null},h.ca=function(){return!1};var Hc=new Sc;h=Uc.prototype,h.R=function(){return!0},h.Q=function(){return this.ia},h.gb=function(t){return new Uc(this.D,t)},h.I=function(t){return".priority"===t?this.ia:E},h.P=function(t){return t.e()?this:".priority"===J(t)?this.ia:E},h.$=function(){return!1},h.bf=function(){return null},h.w=function(t,e){return".priority"===t?this.gb(e):E.w(t,e).gb(this.ia)},h.u=function(t,e){var n=J(t);return null===n?e:(x(".priority"!==n||1===O(t),".priority must be the last token in a path"),this.w(n,E.u(Q(t),e)))},h.e=function(){return!1},h.Za=function(){return 0},h.O=function(t){return t&&!this.Q().e()?{".value":this.ra(),".priority":this.Q().O()}:this.ra()},h.hash=function(){if(null===this.xb){var t="";this.ia.e()||(t+="priority:"+Wc(this.ia.O())+":");var e=typeof this.D,t=t+(e+":"),t="number"===e?t+Db(this.D):t+this.D;this.xb=lb(t)}return this.xb},h.ra=function(){return this.D},h.fe=function(t){if(t===E)return 1;if(t instanceof Xc)return-1;x(t.R(),"Unknown node type");var e=typeof t.D,n=typeof this.D,i=Ja(Yc,e),r=Ja(Yc,n);return x(i>=0,"Unknown leaf type: "+e),x(r>=0,"Unknown leaf type: "+n),i===r?"object"===n?0:this.Di){var o,s=[];for(o in e)s[o]=e[o];return s}return t&&!this.Q().e()&&(e[".priority"]=this.Q().O()),e},h.hash=function(){if(null===this.xb){var t="";this.Q().e()||(t+="priority:"+Wc(this.Q().O())+":"),this.ga(F,function(e,n){var i=n.hash();""!==i&&(t+=":"+e+":"+i)}),this.xb=""===t?"":lb(t)}return this.xb},h.bf=function(t,e,n){return(n=fd(this,n))?(t=Ic(n,new C(t,e)))?t.name:null:Ic(this.m,t)},h.ga=function(t,e){var n=fd(this,t);return n?n.Ba(function(t){return e(t.name,t.L)}):this.m.Ba(e)},h.Aa=function(t){return this.rb(t.ye(),t)},h.rb=function(t,e){var n=fd(this,e);return n?n.rb(t,function(t){return t}):this.m.rb(t.name,Tc)},h.cf=function(t){return this.Ob(t.xe(),t)},h.Ob=function(t,e){var n=fd(this,e);return n?n.Ob(t,function(t){return t}):this.m.Ob(t.name,Tc)},h.fe=function(t){return this.e()?t.e()?0:-1:t.R()||t.e()?1:t===Nb?-1:0},h.hb=function(t){if(t===Pb||id(this.sb.Sb,t.toString()))return this;var e=this.sb,n=this.m;x(t!==Pb,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var i=[],r=!1,n=n.Aa(Tc),o=T(n);o;)r=r||t.qe(o.L),i.push(o),o=T(n);return i=r?bd(i,Kb(t)):Jb,r=t.toString(),n=jd(e.Sb),n[r]=t,t=jd(e.od),t[r]=i,new Xc(this.m,this.ia,new Zc(t,n))},h.Ub=function(t){return t===Pb||id(this.sb.Sb,t.toString())},h.aa=function(t){if(t===this)return!0;if(t.R())return!1;if(this.Q().aa(t.Q())&&this.m.count()===t.m.count()){var e=this.Aa(F);t=t.Aa(F);for(var n=T(e),i=T(t);n&&i;){if(n.name!==i.name||!n.L.aa(i.L))return!1;n=T(e),i=T(t)}return null===n&&null===i}return!1},h.toString=function(){var t="{",e=!0;return this.ga(F,function(n,i){e?e=!1:t+=", ",t+='"'+n+'" : '+i.toString()}),t+="}"};var kd=Math.log(2),E=new Xc(new Gc(Hb),null,dd);oa(nd,Xc),h=nd.prototype,h.fe=function(t){return t===this?0:1},h.aa=function(t){return t===this},h.Q=function(){throw ib("Why is this called?")},h.I=function(){return E},h.e=function(){return!1};var Nb=new nd,Lb=new C("[MIN_NAME]",E);K.prototype.O=function(){return G("Firebase.DataSnapshot.val",0,0,arguments.length),this.J.O()},K.prototype.val=K.prototype.O,K.prototype.Ze=function(){return G("Firebase.DataSnapshot.exportVal",0,0,arguments.length),this.J.O(!0)},K.prototype.exportVal=K.prototype.Ze,K.prototype.B=function(t){G("Firebase.DataSnapshot.child",0,1,arguments.length),ga(t)&&(t=String(t)),ic("Firebase.DataSnapshot.child",t);var e=new N(t),n=this.Y.B(e);return new K(this.J.P(e),n,F)},K.prototype.child=K.prototype.B,K.prototype.$=function(t){G("Firebase.DataSnapshot.hasChild",1,1,arguments.length),ic("Firebase.DataSnapshot.hasChild",t);var e=new N(t);return!this.J.P(e).e()},K.prototype.hasChild=K.prototype.$,K.prototype.Q=function(){return G("Firebase.DataSnapshot.getPriority",0,0,arguments.length),this.J.Q().O()},K.prototype.getPriority=K.prototype.Q,K.prototype.forEach=function(t){if(G("Firebase.DataSnapshot.forEach",1,1,arguments.length),I("Firebase.DataSnapshot.forEach",1,t,!1),this.J.R())return!1;var e=this;return!!this.J.ga(this.G,function(n,i){return t(new K(i,e.Y.B(n),F))})},K.prototype.forEach=K.prototype.forEach,K.prototype.kd=function(){return G("Firebase.DataSnapshot.hasChildren",0,0,arguments.length),this.J.R()?!1:!this.J.e()},K.prototype.hasChildren=K.prototype.kd,K.prototype.name=function(){return G("Firebase.DataSnapshot.name",0,0,arguments.length),this.Y.name()},K.prototype.name=K.prototype.name,K.prototype.Za=function(){return G("Firebase.DataSnapshot.numChildren",0,0,arguments.length),this.J.Za()},K.prototype.numChildren=K.prototype.Za,K.prototype.bc=function(){return G("Firebase.DataSnapshot.ref",0,0,arguments.length),this.Y},K.prototype.ref=K.prototype.bc,od.prototype.Rd=function(t){for(var e=this.Bc[t]||[],n=0;n=t.length){var e=Number(t);if(!isNaN(e)){r.Oe=e,r.frames=[],t=null;break t}}r.Oe=1,r.frames=[]}null!==t&&Md(r,t)}},this.na.onerror=function(t){r.f("WebSocket error. Closing connection."),(t=t.message||t.data)&&r.f(t),r.$a()}},Jd.prototype.start=function(){},Jd.isAvailable=function(){var t=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var e=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);e&&1parseFloat(e[1])&&(t=!0)}return!t&&null!==Id&&!Kd},Jd.responsesRequiredToBeHealthy=2,Jd.healthyTimeout=3e4,h=Jd.prototype,h.rd=function(){va.remove("previous_websocket_failure")},h.send=function(t){Ld(this),t=v(t),this.mb+=t.length,Bd(this.Ea,"bytes_sent",t.length),t=Bb(t,16384),1o.status){try{t=sa(o.responseText)}catch(e){}n(null,t)}else n(500<=o.status&&600>o.status?U("SERVER_ERROR"):U("NETWORK_ERROR"));n=null,$e(window,"beforeunload",i)}},"GET"===s)t+=(/\?/.test(t)?"":"?")+cf(e),r=null;else{var a=this.options.headers.content_type;"application/json"===a&&(r=v(e)),"application/x-www-form-urlencoded"===a&&(r=cf(e))}o.open(s,t,!0),t={"X-Requested-With":"XMLHttpRequest",Accept:"application/json;text/plain"},zd(t,this.options.headers);for(var h in t)o.setRequestHeader(h,t[h]);o.send(r)},gf.isAvailable=function(){return!!window.XMLHttpRequest&&"string"==typeof(new XMLHttpRequest).responseType&&(!(navigator.userAgent.match(/MSIE/)||navigator.userAgent.match(/Trident/))||ff())},gf.prototype.oc=function(){return"json"},hf.prototype.open=function(t,e,n){function i(){n&&(n(U("USER_CANCELLED")),n=null)}var r,o=this,s=ub(Te);e.requestId=this.Qc,e.redirectTo=s.scheme+"://"+s.host+"/blank/page.html",t+=/\?/.test(t)?"":"?",t+=cf(e),(r=window.open(t,"_blank","location=no"))&&ha(r.addEventListener)?(r.addEventListener("loadstart",function(t){var e;if(e=t&&t.url)t:{var s=t.url;try{var a=document.createElement("a");a.href=s,e=a.host===ub(Te).host&&"/blank/page.html"===a.pathname;break t}catch(h){}e=!1}e&&(t=bf(t.url),r.removeEventListener("exit",i),r.close(),t=new Ue(null,null,{requestId:o.Qc,requestKey:t}),o.lf.requestWithCredential("/auth/session",t,n),n=null)}),r.addEventListener("exit",i)):n(U("TRANSPORT_UNAVAILABLE"))},na("fb.login.transports.CordovaInAppBrowser.prototype.open",hf.prototype.open),hf.isAvailable=function(){return ef()},hf.prototype.oc=function(){return"redirect"},jf.prototype.open=function(t,e,n){function i(t){if(o&&(document.body.removeChild(o),o=void 0),c&&(c=clearInterval(c)),$e(window,"message",r),$e(window,"unload",i),u&&!t)try{u.close()}catch(e){s.postMessage("die",h)}u=s=void 0}function r(t){if(t.origin===h)try{var e=sa(t.data);"ready"===e.a?s.postMessage(l,h):"error"===e.a?(i(!1),n&&(n(e.d),n=null)):"response"===e.a&&(i(e.Ag),n&&(n(null,e.d),n=null))}catch(r){}}var o,s,a=ff(),h=af(t);if(h!==af(this.options.relay_url))n&&setTimeout(function(){n(Error("invalid arguments: origin of url and relay_url must match"))},0);else{a&&(o=document.createElement("iframe"),o.setAttribute("src",this.options.relay_url),o.style.display="none",o.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(o),s=o.contentWindow),t+=(/\?/.test(t)?"":"?")+cf(e);var u=window.open(t,this.options.window_name,this.options.window_features);s||(s=u);var c=setInterval(function(){u&&u.closed&&(i(!1),n&&(n(U("USER_CANCELLED")),n=null))},500),l=v({a:"request",d:e});Ze(window,"unload",i),Ze(window,"message",r)}},na("fb.login.transports.Popup.prototype.open",jf.prototype.open),jf.isAvailable=function(){return"postMessage"in window&&!/^file:\//.test(location.href)&&!(ef()||navigator.userAgent.match(/Windows Phone/)||window.Windows&&/^ms-appx:/.test(location.href)||navigator.userAgent.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i)||navigator.userAgent.match(/CriOS/)||navigator.userAgent.match(/Twitter for iPhone/)||navigator.userAgent.match(/FBAN\/FBIOS/)||window.navigator.standalone)&&!navigator.userAgent.match(/PhantomJS/)},jf.prototype.oc=function(){return"popup"},kf.prototype.open=function(t,e,n){function i(){n&&(n(U("REQUEST_INTERRUPTED")),n=null)}function r(){setTimeout(function(){delete window.__firebase_auth_jsonp[o],wd(window.__firebase_auth_jsonp)&&delete window.__firebase_auth_jsonp;try{var t=document.getElementById(o);t&&t.parentNode.removeChild(t)}catch(e){}},1),$e(window,"beforeunload",i)}var o="fn"+(new Date).getTime()+Math.floor(99999*Math.random());e[this.options.callback_parameter]="__firebase_auth_jsonp."+o,t+=(/\?/.test(t)?"":"?")+cf(e),Ze(window,"beforeunload",i),window.__firebase_auth_jsonp[o]=function(t){n&&(n(null,t),n=null),r()},lf(o,t,n)},kf.isAvailable=function(){return!ef()},kf.prototype.oc=function(){return"json"},mf.prototype.set=function(t,e){if(!e){if(!this.Md.length)throw Error("fb.login.SessionManager : No storage options available!");e=this.Md[0]}e.set(this.Ee,t)},mf.prototype.get=function(){var t=Ma(this.Md,q(this.Sf,this)),t=La(t,function(t){return null!==t});return Ua(t,function(t,e){return qe(e.token)-qe(t.token)}),0=i(o,n)&&(o=T(r));o;)t=t.w(o.name,E),o=T(r);return t},oa(Rf,Qf),Rf.prototype.ya=function(t,e,n,i){if(e.type===Mf&&e.source.ke){var r=e.path,o=e.children,s=W(t);if(s&&r.e()&&ud(o,function(t,e){return s.$(e)})){var a;return(e=n.za(i||t.k||t.g))?a=this.n(this.X(e)):(a=s||E,A(o,function(t,e){a=a.w(e,t)}),a=this.n(this.X(a))),t.o?new X(t.k,t.g,a,null):new X(t.k,t.g,null,a)}}return Rf.Ne.ya.call(this,t,e,n,i)},Rf.prototype.n=function(t){if(Pf(this,t),t.R())return E;var e,n,i;if(2*this.wb=o(r,n)&&it?-1:1}),dg=new bg(null);h=bg.prototype,h.e=function(){return null===this.value&&this.children.e()},h.subtree=function(t){if(t.e())return this;var e=this.children.get(J(t));return null!==e?e.subtree(Q(t)):dg},h.set=function(t,e){if(t.e())return new bg(e,this.children);var n=J(t),i=(this.children.get(n)||dg).set(Q(t),e),n=this.children.La(n,i);return new bg(this.value,n)},h.remove=function(t){if(t.e())return this.children.e()?dg:new bg(null,this.children);var e=J(t),n=this.children.get(e);return n?(t=n.remove(Q(t)),e=t.e()?this.children.remove(e):this.children.La(e,t),null===this.value&&e.e()?dg:new bg(this.value,e)):this},h.get=function(t){if(t.e())return this.value;var e=this.children.get(J(t));return e?e.get(Q(t)):null},h=qg.prototype,h.e=function(){return wd(this.xa)},h.ya=function(t,e,n){var i=t.source.Nc;if(null!==i)return i=u(this.xa,i),x(null!=i,"SyncTree gave us an op for an invalid query."),i.ya(t,e,n);var r=[];return A(this.xa,function(i){r=r.concat(i.ya(t,e,n))}),r},h.Fb=function(t,e,n,i,r){var o=t.Da(),s=u(this.xa,o);return s||(n=(s=n.za(i))?null:n.$d(r),i=new X(i,r,s,n),s=new Zf(t,i),this.xa[o]=s),s.Fb(e),t=s,(o=W(t.la))?(i=Gf(t.ed,ag,t.la,R),e=Wf(t.Ye,i,o,e?[e]:t.Ka)):e=[],e},h.eb=function(t,e,n){var i=t.Da(),r=[],o=[],s=null!=rg(this);if("default"===i){var a=this;A(this.xa,function(t,i){o=o.concat(t.eb(e,n)),t.e()&&(delete a.xa[i],Xb(t.Y.C)||r.push(t.Y))})}else{var h=u(this.xa,i);h&&(o=o.concat(h.eb(e,n)),h.e()&&(delete this.xa[i],Xb(h.Y.C)||r.push(h.Y)))}return s&&null==rg(this)&&r.push(new M(t.j,t.path)),{lg:r,Pf:o}},h.ma=function(t){var e=rg(this);return null!=e&&(e=e.ma())?e.P(t):null},h=ug.prototype,h.Kb=function(t){var e=fg(this.V,t);if(e){var n=e.value;return t=S(e.path,t),n.P(t)}return null},h.za=function(t,e,n,i){var r,o;return n||i?(r=this.V.subtree(t),!i&&r.e()?e:i||null!==e||null!==r.value?(r=yg(this.pa,function(e){return!(!e.visible&&!i||n&&0<=Ja(n,e.Ud)||!e.path.contains(t)&&!t.contains(e.path))},t),o=e||E,ng(r,function(t,e){o=o.u(t,e)}),o):null):(r=fg(this.V,t))?(e=S(r.path,t),r.value.P(e)):(r=this.V.subtree(t),r.e()?e:e||r.value?(o=e||E,ng(r,function(t,e){o=o.u(t,e)}),o):null)},h.$d=function(t,e){var n=!1,i=E,r=this.Kb(t);return r?(r.R()||r.ga(F,function(t,e){i=i.w(t,e)}),i):e?(i=e,pg(this.V.subtree(t),function(t,e){i=i.w(t,e)}),i):(pg(this.V.subtree(t),function(t,e){n=!0,i=i.w(t,e)}),n?i:null)},h.Wa=function(t,e,n,i){if(x(n||i,"Either existingEventSnap or existingServerSnap must exist"),t=t.B(e),fg(this.V,t))return null;if(t=this.V.subtree(t),t.e())return i.P(e);var r,o;return n?(r=!1,o=n.P(e)):(r=!0,o=i.P(e)),ng(t,function(t,e){r||o.P(t).aa(e)||(r=!0),r&&(o=o.u(t,e))}),r?o:null},h.ae=function(t,e,n,i){if(x(i,"We should have an event cache already."),t=t.B(e),fg(this.V,t))return null;var r=i.P(e),o=!1,s=this.V.subtree(t);return A(n,function(t,e){var n=new N(e),i=fg(s,n);if(i){var a=S(i.path,n),i=i.value.P(a);r=r.u(n,i)}else if(o=!0,i=s.subtree(n),i.e())r=r.u(n,t);else{var h=t;ng(i,function(t,e){h=h.u(t,e)}),r=r.u(n,h)}}),o?r:null},h.be=function(t,e,n,i,r,o){var s;if(t=this.V.subtree(t),t.value?s=t.value:e&&(s=e,ng(t,function(t,e){s=s.u(t,e)})),s){for(e=[],t=Kb(F),r=r?s.Ob(n,o):s.rb(n,o),o=T(r);o&&e.lengthr.zc,"Stacking an older write on top of newer ones"),m(o)||(o=!0),r.pa.push({path:t,Qa:e,Ud:n,visible:o}),o&&(r.V=Ag(r.V,t,e)),r.zc=n,i?Kg(this,new Dg(Fg,t,e)):[]},h.Yd=function(t,e,n){var i=this.bb;return x(n>i.zc,"Stacking an older merge on top of newer ones"),i.pa.push({path:t,children:e,Ud:n,visible:!0}),i.V=Bg(i.V,t,e),i.zc=n,Kg(this,new Gg(Fg,t,e))},h.Ga=function(t,e){e=e||!1;var n=vg(this.bb,t);return null==n?[]:Kg(this,new Eg(n,e))},h.jb=function(t,e){return Kg(this,new Dg(Ig,t,e))},h.Xd=function(t,e){return Kg(this,new Gg(Ig,t,e))},h.Fb=function(t,e){var n=t.path,i=null,r=!1;lg(this.ja,n,function(t,e){var o=S(t,n);return i=e.ma(o),r=r||null!=rg(e),!i});var o=this.ja.get(n);o?(r=r||null!=rg(o),i=i||o.ma(R)):(o=new qg,this.ja=this.ja.set(n,o));var s=null;if(!i){var a=!1,s=E;pg(this.ja.subtree(n),function(t,e){var n=e.ma(R);n&&(a=!0,s=s.w(t,n))}),a||(s=null)}var h=null!=tg(o,t);if(!h&&!Xb(t.C)){var u=Og(t);x(!(u in this.ac),"View does not exist, but we have a tag");var c=Pg++;this.ac[u]=c,this.Nd["_"+c]=u}return u=o.Fb(t,e,new Cg(n,this.bb),i,s),h||r||(o=tg(o,t),u=u.concat(Qg(this,t,o))),u},h.eb=function(t,e,n){var i=t.path,r=this.ja.get(i),o=[];if(r&&("default"===t.Da()||null!=tg(r,t))){o=r.eb(t,e,n),r.e()&&(this.ja=this.ja.remove(i)),r=o.lg,o=o.Pf,e=-1!==Qa(r,function(t){return Xb(t.C)});var s=jg(this.ja,i,function(t,e){return null!=rg(e)});if(e&&!s&&(i=this.ja.subtree(i),!i.e()))for(var i=Rg(i),a=0;ar;r++)e+=" ";console.log(e+i)}}},h.Le=function(t){Bd(this.Ea,t),this.wf.Me[t]=!0},h.f=function(){kb("r:"+this.U.id+":",arguments)},ca(rh),rh.prototype.tb=function(){for(var t in this.dc)this.dc[t].tb()},rh.prototype.interrupt=rh.prototype.tb,rh.prototype.ec=function(){for(var t in this.dc)this.dc[t].ec()},rh.prototype.resume=rh.prototype.ec,sh.prototype.Zb=function(t){var e,n=this;try{e=sa(t.data)}catch(i){}e&&"request"===e.a&&($e(window,"message",this.Zb),this.Od=t.origin,this.nc&&setTimeout(function(){n.nc(n.Od,e.d,function(t,e){n.If=!e,n.nc=void 0,th(n,{a:"response",d:t,forceKeepWindowOpen:e})})},0))},sh.prototype.dg=function(){try{$e(this.nd,"message",this.jf)}catch(t){}this.nc&&(th(this,{a:"error",d:"unknown closed window"}),this.nc=void 0);try{window.close()}catch(e){}},sh.prototype.jf=function(t){if(this.If&&"die"===t.data)try{window.close()}catch(e){}};var Y={Qf:function(){Td=Kd=!0}};Y.forceLongPolling=Y.Qf,Y.Rf=function(){Ud=!0},Y.forceWebSockets=Y.Rf,Y.rg=function(t,e){t.j.U.Ie=e},Y.setSecurityDebugCallback=Y.rg,Y.Ke=function(t,e){t.j.Ke(e)},Y.stats=Y.Ke,Y.Le=function(t,e){t.j.Le(e)},Y.statsIncrementCounter=Y.Le,Y.cd=function(t){return t.j.cd},Y.dataUpdateCount=Y.cd,Y.Uf=function(t,e){t.j.pe=e},Y.interceptServerData=Y.Uf,Y.ag=function(t){new sh(t)},Y.onPopupOpen=Y.ag,Y.og=function(t){Te=t},Y.setAuthenticationServer=Y.og,Z.prototype.cancel=function(t){G("Firebase.onDisconnect().cancel",0,1,arguments.length),I("Firebase.onDisconnect().cancel",1,t,!0),this.Oc.Ae(this.Ca,t||null)},Z.prototype.cancel=Z.prototype.cancel,Z.prototype.remove=function(t){G("Firebase.onDisconnect().remove",0,1,arguments.length),jc("Firebase.onDisconnect().remove",this.Ca),I("Firebase.onDisconnect().remove",1,t,!0),eh(this.Oc,this.Ca,null,t)},Z.prototype.remove=Z.prototype.remove,Z.prototype.set=function(t,e){G("Firebase.onDisconnect().set",1,2,arguments.length),jc("Firebase.onDisconnect().set",this.Ca),bc("Firebase.onDisconnect().set",t,!1),I("Firebase.onDisconnect().set",2,e,!0),eh(this.Oc,this.Ca,t,e)},Z.prototype.set=Z.prototype.set,Z.prototype.Db=function(t,e,n){G("Firebase.onDisconnect().setWithPriority",2,3,arguments.length),jc("Firebase.onDisconnect().setWithPriority",this.Ca),bc("Firebase.onDisconnect().setWithPriority",t,!1),fc("Firebase.onDisconnect().setWithPriority",2,e,!1),I("Firebase.onDisconnect().setWithPriority",3,n,!0),fh(this.Oc,this.Ca,t,e,n)},Z.prototype.setWithPriority=Z.prototype.Db,Z.prototype.update=function(t,e){if(G("Firebase.onDisconnect().update",1,2,arguments.length),jc("Firebase.onDisconnect().update",this.Ca),ea(t)){for(var n={},i=0;i=0;o--)r[o]="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(n%64),n=Math.floor(n/64);if(x(0===n,"Cannot push at time == 0"),n=r.join(""),i){for(o=11;o>=0&&63===e[o];o--)e[o]=0;e[o]++}else for(o=0;12>o;o++)e[o]=Math.floor(64*Math.random());for(o=0;12>o;o++)n+="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(e[o]);return x(20===n.length,"NextPushId: Length should be 20."),n}}();oa(M,L),na("Firebase",M),M.prototype.name=function(){G("Firebase.name",0,0,arguments.length);var t;return this.path.e()?t=null:(t=this.path,t=t.da\\n \\n \\n \";\nmodule.exports = {\n el: '#app',\n data: {\n view: '',\n params: {\n page: 1,\n userId: null,\n itemId: null\n }\n },\n filters: {\n fromNow: require('./filters/from-now'),\n domain: require('./filters/domain')\n },\n components: {\n 'news-view': require('./views/news-view.vue'),\n 'item-view': require('./views/item-view.vue'),\n 'user-view': require('./views/user-view.vue')\n }\n}\nmodule.exports.template = __vue_template__;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/app.vue\n ** module id = 1\n ** module chunks = 0\n **/","var _ = require('./util')\nvar extend = _.extend\n\n/**\n * The exposed Vue constructor.\n *\n * API conventions:\n * - public API methods/properties are prefiexed with `$`\n * - internal methods/properties are prefixed with `_`\n * - non-prefixed properties are assumed to be proxied user\n * data.\n *\n * @constructor\n * @param {Object} [options]\n * @public\n */\n\nfunction Vue (options) {\n this._init(options)\n}\n\n/**\n * Mixin global API\n */\n\nextend(Vue, require('./api/global'))\n\n/**\n * Vue and every constructor that extends Vue has an\n * associated options object, which can be accessed during\n * compilation steps as `this.constructor.options`.\n *\n * These can be seen as the default options of every\n * Vue instance.\n */\n\nVue.options = {\n directives : require('./directives'),\n filters : require('./filters'),\n partials : {},\n transitions : {},\n components : {}\n}\n\n/**\n * Build up the prototype\n */\n\nvar p = Vue.prototype\n\n/**\n * $data has a setter which does a bunch of\n * teardown/setup work\n */\n\nObject.defineProperty(p, '$data', {\n get: function () {\n return this._data\n },\n set: function (newData) {\n this._setData(newData)\n }\n})\n\n/**\n * Mixin internal instance methods\n */\n\nextend(p, require('./instance/init'))\nextend(p, require('./instance/events'))\nextend(p, require('./instance/scope'))\nextend(p, require('./instance/compile'))\n\n/**\n * Mixin public API methods\n */\n\nextend(p, require('./api/data'))\nextend(p, require('./api/dom'))\nextend(p, require('./api/events'))\nextend(p, require('./api/child'))\nextend(p, require('./api/lifecycle'))\n\nmodule.exports = _.Vue = Vue\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/vue/src/vue.js\n ** module id = 2\n ** module chunks = 0\n **/","\n\n//\n// Generated on Sat Dec 06 2014 16:08:09 GMT-0500 (EST) by Charlie Robbins, Paolo Fragomeni & the Contributors (Using Codesurgeon).\n// Version 1.2.4\n//\n\n(function (exports) {\n\n/*\n * browser.js: Browser specific functionality for director.\n *\n * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors.\n * MIT LICENSE\n *\n */\n\nvar dloc = document.location;\n\nfunction dlocHashEmpty() {\n // Non-IE browsers return '' when the address bar shows '#'; Director's logic\n // assumes both mean empty.\n return dloc.hash === '' || dloc.hash === '#';\n}\n\nvar listener = {\n mode: 'modern',\n hash: dloc.hash,\n history: false,\n\n check: function () {\n var h = dloc.hash;\n if (h != this.hash) {\n this.hash = h;\n this.onHashChanged();\n }\n },\n\n fire: function () {\n if (this.mode === 'modern') {\n this.history === true ? window.onpopstate() : window.onhashchange();\n }\n else {\n this.onHashChanged();\n }\n },\n\n init: function (fn, history) {\n var self = this;\n this.history = history;\n\n if (!Router.listeners) {\n Router.listeners = [];\n }\n\n function onchange(onChangeEvent) {\n for (var i = 0, l = Router.listeners.length; i < l; i++) {\n Router.listeners[i](onChangeEvent);\n }\n }\n\n //note IE8 is being counted as 'modern' because it has the hashchange event\n if ('onhashchange' in window && (document.documentMode === undefined\n || document.documentMode > 7)) {\n // At least for now HTML5 history is available for 'modern' browsers only\n if (this.history === true) {\n // There is an old bug in Chrome that causes onpopstate to fire even\n // upon initial page load. Since the handler is run manually in init(),\n // this would cause Chrome to run it twise. Currently the only\n // workaround seems to be to set the handler after the initial page load\n // http://code.google.com/p/chromium/issues/detail?id=63040\n setTimeout(function() {\n window.onpopstate = onchange;\n }, 500);\n }\n else {\n window.onhashchange = onchange;\n }\n this.mode = 'modern';\n }\n else {\n //\n // IE support, based on a concept by Erik Arvidson ...\n //\n var frame = document.createElement('iframe');\n frame.id = 'state-frame';\n frame.style.display = 'none';\n document.body.appendChild(frame);\n this.writeFrame('');\n\n if ('onpropertychange' in document && 'attachEvent' in document) {\n document.attachEvent('onpropertychange', function () {\n if (event.propertyName === 'location') {\n self.check();\n }\n });\n }\n\n window.setInterval(function () { self.check(); }, 50);\n\n this.onHashChanged = onchange;\n this.mode = 'legacy';\n }\n\n Router.listeners.push(fn);\n\n return this.mode;\n },\n\n destroy: function (fn) {\n if (!Router || !Router.listeners) {\n return;\n }\n\n var listeners = Router.listeners;\n\n for (var i = listeners.length - 1; i >= 0; i--) {\n if (listeners[i] === fn) {\n listeners.splice(i, 1);\n }\n }\n },\n\n setHash: function (s) {\n // Mozilla always adds an entry to the history\n if (this.mode === 'legacy') {\n this.writeFrame(s);\n }\n\n if (this.history === true) {\n window.history.pushState({}, document.title, s);\n // Fire an onpopstate event manually since pushing does not obviously\n // trigger the pop event.\n this.fire();\n } else {\n dloc.hash = (s[0] === '/') ? s : '/' + s;\n }\n return this;\n },\n\n writeFrame: function (s) {\n // IE support...\n var f = document.getElementById('state-frame');\n var d = f.contentDocument || f.contentWindow.document;\n d.open();\n d.write(\"
+