-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatch
153 lines (150 loc) · 349 KB
/
patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
diff --git a/.sass-cache/7c708b1ecf33a57ab81a4c4bd5f29ead9af2d63f/screen.scssc b/.sass-cache/7c708b1ecf33a57ab81a4c4bd5f29ead9af2d63f/screen.scssc
index fef3462..e135af3 100644
Binary files a/.sass-cache/7c708b1ecf33a57ab81a4c4bd5f29ead9af2d63f/screen.scssc and b/.sass-cache/7c708b1ecf33a57ab81a4c4bd5f29ead9af2d63f/screen.scssc differ
diff --git a/smashers/static/smashers/apple-icon-114x114.png b/smashers/static/smashers/apple-icon-114x114.png
deleted file mode 100644
index f816560..0000000
Binary files a/smashers/static/smashers/apple-icon-114x114.png and /dev/null differ
diff --git a/smashers/static/smashers/apple-icon-144x144.png b/smashers/static/smashers/apple-icon-144x144.png
deleted file mode 100644
index 90a414e..0000000
Binary files a/smashers/static/smashers/apple-icon-144x144.png and /dev/null differ
diff --git a/smashers/static/smashers/apple-icon-57x57.png b/smashers/static/smashers/apple-icon-57x57.png
deleted file mode 100644
index d904162..0000000
Binary files a/smashers/static/smashers/apple-icon-57x57.png and /dev/null differ
diff --git a/smashers/static/smashers/apple-icon-72x72.png b/smashers/static/smashers/apple-icon-72x72.png
deleted file mode 100644
index f472079..0000000
Binary files a/smashers/static/smashers/apple-icon-72x72.png and /dev/null differ
diff --git a/smashers/static/smashers/avatar.png b/smashers/static/smashers/avatar.png
index 7411714..7b51898 100644
Binary files a/smashers/static/smashers/avatar.png and b/smashers/static/smashers/avatar.png differ
diff --git a/smashers/static/smashers/sass/screen.scss b/smashers/static/smashers/sass/screen.scss
index c79435a..154cda3 100644
--- a/smashers/static/smashers/sass/screen.scss
+++ b/smashers/static/smashers/sass/screen.scss
@@ -129,7 +129,7 @@ a:hover, a:focus {
left: 50%;
top: 20px;
margin-left: -44px;
- z-index: 10;
+ z-index: 100;
button::before {
display: none;
diff --git a/smashers/static/smashers/scripts/app-built.js b/smashers/static/smashers/scripts/app-built.js
index 90fa40a..b8ef72c 100644
--- a/smashers/static/smashers/scripts/app-built.js
+++ b/smashers/static/smashers/scripts/app-built.js
@@ -17,4 +17,4 @@
* Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
*/
-!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(a,b){function s(e){var t="length"in e&&e.length,r=n.type(e);return"function"===r||n.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e}function x(e,t,r){if(n.isFunction(t))return n.grep(e,function(e,n){return!!t.call(e,n,e)!==r});if(t.nodeType)return n.grep(e,function(e){return e===t!==r});if("string"==typeof t){if(w.test(t))return n.filter(t,e,r);t=n.filter(t,e)}return n.grep(e,function(e){return g.call(t,e)>=0!==r})}function D(e,t){while((e=e[t])&&1!==e.nodeType);return e}function G(e){var t=F[e]={};return n.each(e.match(E)||[],function(e,n){t[n]=!0}),t}function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}function P(e,t,r){var i;if(void 0===r&&1===e.nodeType)if(i="data-"+t.replace(O,"-$1").toLowerCase(),r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:N.test(r)?n.parseJSON(r):r}catch(s){}M.set(e,t,r)}else r=void 0;return r}function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(e){}}function ja(e,t){return n.nodeName(e,"table")&&n.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ka(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function la(e){var t=ga.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ma(e,t){for(var n=0,r=e.length;r>n;n++)L.set(e[n],"globalEval",!t||L.get(t[n],"globalEval"))}function na(e,t){var r,i,s,o,u,a,f,l;if(1===t.nodeType){if(L.hasData(e)&&(o=L.access(e),u=L.set(t,o),l=o.events)){delete u.handle,u.events={};for(s in l)for(r=0,i=l[s].length;i>r;r++)n.event.add(t,s,l[s][r])}M.hasData(e)&&(a=M.access(e),f=n.extend({},a),M.set(t,f))}}function oa(e,t){var r=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&n.nodeName(e,t)?n.merge([e],r):r}function pa(e,t){var n=t.nodeName.toLowerCase();"input"===n&&T.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function sa(e,t){var r,i=n(t.createElement(e)).appendTo(t.body),s=a.getDefaultComputedStyle&&(r=a.getDefaultComputedStyle(i[0]))?r.display:n.css(i[0],"display");return i.detach(),s}function ta(e){var t=l,r=ra[e];return r||(r=sa(e,t),"none"!==r&&r||(qa=(qa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=qa[0].contentDocument,t.write(),t.close(),r=sa(e,t),qa.detach()),ra[e]=r),r}function xa(e,t,r){var i,s,o,u,a=e.style;return r=r||wa(e),r&&(u=r.getPropertyValue(t)||r[t]),r&&(""!==u||n.contains(e.ownerDocument,e)||(u=n.style(e,t)),va.test(u)&&ua.test(t)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=u,u=r.width,a.width=i,a.minWidth=s,a.maxWidth=o)),void 0!==u?u+"":u}function ya(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function Fa(e,t){if(t in e)return t;var n=t[0].toUpperCase()+t.slice(1),r=t,i=Ea.length;while(i--)if(t=Ea[i]+n,t in e)return t;return r}function Ga(e,t,n){var r=Aa.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ha(e,t,r,i,s){for(var o=r===(i?"border":"content")?4:"width"===t?1:0,u=0;4>o;o+=2)"margin"===r&&(u+=n.css(e,r+R[o],!0,s)),i?("content"===r&&(u-=n.css(e,"padding"+R[o],!0,s)),"margin"!==r&&(u-=n.css(e,"border"+R[o]+"Width",!0,s))):(u+=n.css(e,"padding"+R[o],!0,s),"padding"!==r&&(u+=n.css(e,"border"+R[o]+"Width",!0,s)));return u}function Ia(e,t,r){var i=!0,s="width"===t?e.offsetWidth:e.offsetHeight,o=wa(e),u="border-box"===n.css(e,"boxSizing",!1,o);if(0>=s||null==s){if(s=xa(e,t,o),(0>s||null==s)&&(s=e.style[t]),va.test(s))return s;i=u&&(k.boxSizingReliable()||s===e.style[t]),s=parseFloat(s)||0}return s+Ha(e,t,r||(u?"border":"content"),i,o)+"px"}function Ja(e,t){for(var r,i,s,o=[],u=0,a=e.length;a>u;u++)i=e[u],i.style&&(o[u]=L.get(i,"olddisplay"),r=i.style.display,t?(o[u]||"none"!==r||(i.style.display=""),""===i.style.display&&S(i)&&(o[u]=L.access(i,"olddisplay",ta(i.nodeName)))):(s=S(i),"none"===r&&s||L.set(i,"olddisplay",s?r:n.css(i,"display"))));for(u=0;a>u;u++)i=e[u],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[u]||"":"none"));return e}function Ka(e,t,n,r,i){return new Ka.prototype.init(e,t,n,r,i)}function Sa(){return setTimeout(function(){La=void 0}),La=n.now()}function Ta(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)n=R[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function Ua(e,t,n){for(var r,i=(Ra[t]||[]).concat(Ra["*"]),s=0,o=i.length;o>s;s++)if(r=i[s].call(n,t,e))return r}function Va(e,t,r){var i,s,o,u,a,f,l,c,h=this,p={},d=e.style,v=e.nodeType&&S(e),m=L.get(e,"fxshow");r.queue||(a=n._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,f=a.empty.fire,a.empty.fire=function(){a.unqueued||f()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,n.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(r.overflow=[d.overflow,d.overflowX,d.overflowY],l=n.css(e,"display"),c="none"===l?L.get(e,"olddisplay")||ta(e.nodeName):l,"inline"===c&&"none"===n.css(e,"float")&&(d.display="inline-block")),r.overflow&&(d.overflow="hidden",h.always(function(){d.overflow=r.overflow[0],d.overflowX=r.overflow[1],d.overflowY=r.overflow[2]}));for(i in t)if(s=t[i],Na.exec(s)){if(delete t[i],o=o||"toggle"===s,s===(v?"hide":"show")){if("show"!==s||!m||void 0===m[i])continue;v=!0}p[i]=m&&m[i]||n.style(e,i)}else l=void 0;if(n.isEmptyObject(p))"inline"===("none"===l?ta(e.nodeName):l)&&(d.display=l);else{m?"hidden"in m&&(v=m.hidden):m=L.access(e,"fxshow",{}),o&&(m.hidden=!v),v?n(e).show():h.done(function(){n(e).hide()}),h.done(function(){var t;L.remove(e,"fxshow");for(t in p)n.style(e,t,p[t])});for(i in p)u=Ua(v?m[i]:0,i,h),i in m||(m[i]=u.start,v&&(u.end=u.start,u.start="width"===i||"height"===i?1:0))}}function Wa(e,t){var r,i,s,o,u;for(r in e)if(i=n.camelCase(r),s=t[i],o=e[r],n.isArray(o)&&(s=o[1],o=e[r]=o[0]),r!==i&&(e[i]=o,delete e[r]),u=n.cssHooks[i],u&&"expand"in u){o=u.expand(o),delete e[i];for(r in o)r in e||(e[r]=o[r],t[r]=s)}else t[i]=s}function Xa(e,t,r){var i,s,o=0,u=Qa.length,a=n.Deferred().always(function(){delete f.elem}),f=function(){if(s)return!1;for(var t=La||Sa(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,i=1-r,o=0,u=l.tweens.length;u>o;o++)l.tweens[o].run(i);return a.notifyWith(e,[l,i,n]),1>i&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:n.extend({},t),opts:n.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:La||Sa(),duration:r.duration,tweens:[],createTween:function(t,r){var i=n.Tween(e,l.opts,t,r,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(i),i},stop:function(t){var n=0,r=t?l.tweens.length:0;if(s)return this;for(s=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(Wa(c,l.opts.specialEasing);u>o;o++)if(i=Qa[o].call(l,e,c,l.opts))return i;return n.map(c,Ua,l),n.isFunction(l.opts.start)&&l.opts.start.call(e,l),n.fx.timer(n.extend(f,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function qb(e){return function(t,r){"string"!=typeof t&&(r=t,t="*");var i,s=0,o=t.toLowerCase().match(E)||[];if(n.isFunction(r))while(i=o[s++])"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(r)):(e[i]=e[i]||[]).push(r)}}function rb(e,t,r,i){function u(l){var h;return s[l]=!0,n.each(e[l]||[],function(e,n){var a=n(t,r,i);return"string"!=typeof a||o||s[a]?o?!(h=a):void 0:(t.dataTypes.unshift(a),u(a),!1)}),h}var s={},o=e===mb;return u(t.dataTypes[0])||!s["*"]&&u("*")}function sb(e,t){var r,i,s=n.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((s[r]?e:i||(i={}))[r]=t[r]);return i&&n.extend(!0,e,i),e}function tb(e,t,n){var r,i,s,o,u=e.contents,a=e.dataTypes;while("*"===a[0])a.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in u)if(u[i]&&u[i].test(r)){a.unshift(i);break}if(a[0]in n)s=a[0];else{for(i in n){if(!a[0]||e.converters[i+" "+a[0]]){s=i;break}o||(o=i)}s=s||o}return s?(s!==a[0]&&a.unshift(s),n[s]):void 0}function ub(e,t,n,r){var i,s,o,u,a,f={},l=e.dataTypes.slice();if(l[1])for(o in e.converters)f[o.toLowerCase()]=e.converters[o];s=l.shift();while(s)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!a&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=s,s=l.shift())if("*"===s)s=a;else if("*"!==a&&a!==s){if(o=f[a+" "+s]||f["* "+s],!o)for(i in f)if(u=i.split(" "),u[1]===s&&(o=f[a+" "+u[0]]||f["* "+u[0]])){o===!0?o=f[i]:f[i]!==!0&&(s=u[0],l.unshift(u[1]));break}if(o!==!0)if(o&&e["throws"])t=o(t);else try{t=o(t)}catch(c){return{state:"parsererror",error:o?c:"No conversion from "+a+" to "+s}}}return{state:"success",data:t}}function Ab(e,t,r,i){var s;if(n.isArray(t))n.each(t,function(t,n){r||wb.test(e)?i(e,n):Ab(e+"["+("object"==typeof n?t:"")+"]",n,r,i)});else if(r||"object"!==n.type(t))i(e,t);else for(s in t)Ab(e+"["+s+"]",t[s],r,i)}function Jb(e){return n.isWindow(e)?e:9===e.nodeType&&e.defaultView}var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(e,t){return new n.fn.init(e,t)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(e,t){return t.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:d.call(this)},pushStack:function(e){var t=n.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return n.each(this,e,t)},map:function(e){return this.pushStack(n.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var e,t,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;for("boolean"==typeof u&&(l=u,u=arguments[a]||{},a++),"object"==typeof u||n.isFunction(u)||(u={}),a===f&&(u=this,a--);f>a;a++)if(null!=(e=arguments[a]))for(t in e)r=u[t],i=e[t],u!==i&&(l&&i&&(n.isPlainObject(i)||(s=n.isArray(i)))?(s?(s=!1,o=r&&n.isArray(r)?r:[]):o=r&&n.isPlainObject(r)?r:{},u[t]=n.extend(l,o,i)):void 0!==i&&(u[t]=i));return u},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===n.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!n.isArray(e)&&e-parseFloat(e)+1>=0},isPlainObject:function(e){return"object"!==n.type(e)||e.nodeType||n.isWindow(e)?!1:e.constructor&&!j.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[i.call(e)]||"object":typeof e},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(e){return e.replace(p,"ms-").replace(q,r)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,u=s(e);if(n){if(u){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(u){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(o,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(s(Object(e))?n.merge(r,"string"==typeof e?[e]:e):f.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],s=0,o=e.length,u=!n;o>s;s++)r=!t(e[s],s),r!==u&&i.push(e[s]);return i},map:function(t,n,r){var i,o=0,u=t.length,a=s(t),f=[];if(a)for(;u>o;o++)i=n(t[o],o,r),null!=i&&f.push(i);else for(o in t)i=n(t[o],o,r),null!=i&&f.push(i);return e.apply([],f)},guid:1,proxy:function(e,t){var r,i,s;return"string"==typeof t&&(r=e[t],t=e,e=r),n.isFunction(e)?(i=d.call(arguments,2),s=function(){return e.apply(t||this,i.concat(d.call(arguments)))},s.guid=e.guid=e.guid||n.guid++,s):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){h["[object "+t+"]"]=t.toLowerCase()});var t=function(e){function ot(e,t,r,i){var s,u,f,l,c,d,g,y,S,x;if((t?t.ownerDocument||t:E)!==p&&h(t),t=t||p,r=r||[],l=t.nodeType,"string"!=typeof e||!e||1!==l&&9!==l&&11!==l)return r;if(!i&&v){if(11!==l&&(s=Z.exec(e)))if(f=s[1]){if(9===l){if(u=t.getElementById(f),!u||!u.parentNode)return r;if(u.id===f)return r.push(u),r}else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(f))&&b(t,u)&&u.id===f)return r.push(u),r}else{if(s[2])return D.apply(r,t.getElementsByTagName(e)),r;if((f=s[3])&&n.getElementsByClassName)return D.apply(r,t.getElementsByClassName(f)),r}if(n.qsa&&(!m||!m.test(e))){if(y=g=w,S=t,x=1!==l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){d=o(e),(g=t.getAttribute("id"))?y=g.replace(tt,"\\$&"):t.setAttribute("id",y),y="[id='"+y+"'] ",c=d.length;while(c--)d[c]=y+gt(d[c]);S=et.test(e)&&vt(t.parentNode)||t,x=d.join(",")}if(x)try{return D.apply(r,S.querySelectorAll(x)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return a(e.replace(z,"$1"),t,r,i)}function ut(){function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function at(e){return e[w]=!0,e}function ft(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),i=e.length;while(i--)r.attrHandle[n[i]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||L)-(~e.sourceIndex||L);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function dt(e){return at(function(t){return t=+t,at(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function vt(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function mt(){}function gt(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var r=t.dir,i=n&&"parentNode"===r,s=x++;return t.first?function(t,n,s){while(t=t[r])if(1===t.nodeType||i)return e(t,n,s)}:function(t,n,o){var u,a,f=[S,s];if(o){while(t=t[r])if((1===t.nodeType||i)&&e(t,n,o))return!0}else while(t=t[r])if(1===t.nodeType||i){if(a=t[w]||(t[w]={}),(u=a[r])&&u[0]===S&&u[1]===s)return f[2]=u[2];if(a[r]=f,f[2]=e(t,n,o))return!0}}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function wt(e,t,n){for(var r=0,i=t.length;i>r;r++)ot(e,t[r],n);return n}function Et(e,t,n,r,i){for(var s,o=[],u=0,a=e.length,f=null!=t;a>u;u++)(s=e[u])&&(!n||n(s,r,i))&&(o.push(s),f&&t.push(u));return o}function St(e,t,n,r,i,s){return r&&!r[w]&&(r=St(r)),i&&!i[w]&&(i=St(i,s)),at(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||wt(t||"*",u.nodeType?[u]:u,[]),m=!e||!s&&t?v:Et(v,h,e,u,a),g=n?i||(s?e:d||r)?[]:o:m;if(n&&n(m,g,u,a),r){f=Et(g,p),r(f,[],u,a),l=f.length;while(l--)(c=f[l])&&(g[p[l]]=!(m[p[l]]=c))}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?H(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=Et(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):D.apply(o,g)})}function xt(e){for(var t,n,i,s=e.length,o=r.relative[e[0].type],u=o||r.relative[" "],a=o?1:0,l=yt(function(e){return e===t},u,!0),c=yt(function(e){return H(t,e)>-1},u,!0),h=[function(e,n,r){var i=!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r));return t=null,i}];s>a;a++)if(n=r.relative[e[a].type])h=[yt(bt(h),n)];else{if(n=r.filter[e[a].type].apply(null,e[a].matches),n[w]){for(i=++a;s>i;i++)if(r.relative[e[i].type])break;return St(a>1&&bt(h),a>1&>(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(z,"$1"),n,i>a&&xt(e.slice(a,i)),s>i&&xt(e=e.slice(i)),s>i&>(e))}h.push(n)}return bt(h)}function Tt(e,t){var n=t.length>0,i=e.length>0,s=function(s,o,u,a,l){var c,h,d,v=0,m="0",g=s&&[],y=[],b=f,w=s||i&&r.find.TAG("*",l),E=S+=null==b?1:Math.random()||.1,x=w.length;for(l&&(f=o!==p&&o);m!==x&&null!=(c=w[m]);m++){if(i&&c){h=0;while(d=e[h++])if(d(c,o,u)){a.push(c);break}l&&(S=E)}n&&((c=!d&&c)&&v--,s&&g.push(c))}if(v+=m,n&&m!==v){h=0;while(d=t[h++])d(g,y,o,u);if(s){if(v>0)while(m--)g[m]||y[m]||(y[m]=M.call(a));y=Et(y)}D.apply(a,y),l&&!s&&y.length>0&&v+t.length>1&&ot.uniqueSort(a)}return l&&(S=E,f=b),g};return n?at(s):s}var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w="sizzle"+1*new Date,E=e.document,S=0,x=0,T=ut(),N=ut(),C=ut(),k=function(e,t){return e===t&&(c=!0),0},L=1<<31,A={}.hasOwnProperty,O=[],M=O.pop,_=O.push,D=O.push,P=O.slice,H=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",I=F.replace("w","w#"),q="\\["+j+"*("+F+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+j+"*\\]",R=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+q+")*)|.*)\\)|)",U=new RegExp(j+"+","g"),z=new RegExp("^"+j+"+|((?:^|[^\\\\])(?:\\\\.)*)"+j+"+$","g"),W=new RegExp("^"+j+"*,"+j+"*"),X=new RegExp("^"+j+"*([>+~]|"+j+")"+j+"*"),V=new RegExp("="+j+"*([^\\]'\"]*?)"+j+"*\\]","g"),$=new RegExp(R),J=new RegExp("^"+I+"$"),K={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+B+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/[+~]/,tt=/'|\\/g,nt=new RegExp("\\\\([\\da-f]{1,6}"+j+"?|("+j+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},it=function(){h()};try{D.apply(O=P.call(E.childNodes),E.childNodes),O[E.childNodes.length].nodeType}catch(st){D={apply:O.length?function(e,t){_.apply(e,P.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}n=ot.support={},s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},h=ot.setDocument=function(e){var t,i,o=e?e.ownerDocument||e:E;return o!==p&&9===o.nodeType&&o.documentElement?(p=o,d=o.documentElement,i=o.defaultView,i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",it,!1):i.attachEvent&&i.attachEvent("onunload",it)),v=!s(o),n.attributes=ft(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ft(function(e){return e.appendChild(o.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Y.test(o.getElementsByClassName),n.getById=ft(function(e){return d.appendChild(e).id=w,!o.getElementsByName||!o.getElementsByName(w).length}),n.getById?(r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&v){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if("*"===e){while(n=s[i++])1===n.nodeType&&r.push(n);return r}return s},r.find.CLASS=n.getElementsByClassName&&function(e,t){return v?t.getElementsByClassName(e):void 0},g=[],m=[],(n.qsa=Y.test(o.querySelectorAll))&&(ft(function(e){d.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+j+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+j+"*(?:value|"+B+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]")}),ft(function(e){var t=o.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+j+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Y.test(y=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ft(function(e){n.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),g.push("!=",R)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=Y.test(d.compareDocumentPosition),b=t||Y.test(d.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&1===r.nodeType&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},k=t?function(e,t){if(e===t)return c=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===o||e.ownerDocument===E&&b(E,e)?-1:t===o||t.ownerDocument===E&&b(E,t)?1:l?H(l,e)-H(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,r=0,i=e.parentNode,s=t.parentNode,u=[e],a=[t];if(!i||!s)return e===o?-1:t===o?1:i?-1:s?1:l?H(l,e)-H(l,t):0;if(i===s)return ct(e,t);n=e;while(n=n.parentNode)u.unshift(n);n=t;while(n=n.parentNode)a.unshift(n);while(u[r]===a[r])r++;return r?ct(u[r],a[r]):u[r]===E?-1:a[r]===E?1:0},o):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&h(e),t=t.replace(V,"='$1']"),!(!n.matchesSelector||!v||g&&g.test(t)||m&&m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),b(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var i=r.attrHandle[t.toLowerCase()],s=i&&A.call(r.attrHandle,t.toLowerCase())?i(e,t,!v):void 0;return void 0!==s?s:n.attributes||!v?e.getAttribute(t):(s=e.getAttributeNode(t))&&s.specified?s.value:null},ot.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,s=0;if(c=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(k),c){while(t=e[s++])t===e[s]&&(i=r.push(s));while(i--)e.splice(r[i],1)}return l=null,e},i=ot.getText=function(e){var t,n="",r=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===s||4===s)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},r=ot.selectors={cacheLength:50,createPseudo:at,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[3]||e[4]||e[5]||"").replace(nt,rt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&T(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(U," ")+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;d=v="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&y){l=m[w]||(m[w]={}),f=l[e]||[],p=f[0]===S&&f[1],h=f[0]===S&&f[2],c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if(1===c.nodeType&&++h&&c===t){l[e]=[S,p,h];break}}else if(y&&(f=(t[w]||(t[w]={}))[e])&&f[0]===S)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++h&&(y&&((c[w]||(c[w]={}))[e]=[S,h]),c===t))break;return h-=i,h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var r,s=i(e,t),o=s.length;while(o--)r=H(e,s[o]),e[r]=!(n[r]=s[o])}):function(e){return i(e,0,n)}):i}},pseudos:{not:at(function(e){var t=[],n=[],r=u(e.replace(z,"$1"));return r[w]?at(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)(s=o[u])&&(e[u]=!(t[u]=s))}):function(e,i,s){return t[0]=e,r(t,null,s,n),t[0]=null,!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return e=e.replace(nt,rt),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:at(function(e){return J.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:dt(function(){return[0]}),last:dt(function(e,t){return[t-1]}),eq:dt(function(e,t,n){return[0>n?n+t:n]}),even:dt(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:dt(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:dt(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:dt(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},r.pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=ht(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pt(t);return mt.prototype=r.filters=r.pseudos,r.setFilters=new mt,o=ot.tokenize=function(e,t){var n,i,s,o,u,a,f,l=N[e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=r.preFilter;while(u){(!n||(i=W.exec(u)))&&(i&&(u=u.slice(i[0].length)||u),a.push(s=[])),n=!1,(i=X.exec(u))&&(n=i.shift(),s.push({value:n,type:i[0].replace(z," ")}),u=u.slice(n.length));for(o in r.filter)!(i=K[o].exec(u))||f[o]&&!(i=f[o](i))||(n=i.shift(),s.push({value:n,type:o,matches:i}),u=u.slice(n.length));if(!n)break}return t?u.length:u?ot.error(e):N(e,a).slice(0)},u=ot.compile=function(e,t){var n,r=[],i=[],s=C[e+" "];if(!s){t||(t=o(e)),n=t.length;while(n--)s=xt(t[n]),s[w]?r.push(s):i.push(s);s=C(e,Tt(i,r)),s.selector=e}return s},a=ot.select=function(e,t,i,s){var a,f,l,c,h,p="function"==typeof e&&e,d=!s&&o(e=p.selector||e);if(i=i||[],1===d.length){if(f=d[0]=d[0].slice(0),f.length>2&&"ID"===(l=f[0]).type&&n.getById&&9===t.nodeType&&v&&r.relative[f[1].type]){if(t=(r.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return i;p&&(t=t.parentNode),e=e.slice(f.shift().value.length)}a=K.needsContext.test(e)?0:f.length;while(a--){if(l=f[a],r.relative[c=l.type])break;if((h=r.find[c])&&(s=h(l.matches[0].replace(nt,rt),et.test(f[0].type)&&vt(t.parentNode)||t))){if(f.splice(a,1),e=s.length&>(f),!e)return D.apply(i,s),i;break}}}return(p||u(e,d))(s,t,!v,i,et.test(e)&&vt(t.parentNode)||t),i},n.sortStable=w.split("").sort(k).join("")===w,n.detectDuplicates=!!c,h(),n.sortDetached=ft(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),ft(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ft(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),ft(function(e){return null==e.getAttribute("disabled")})||lt(B,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),ot}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;n.filter=function(e,t,r){var i=t[0];return r&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?n.find.matchesSelector(i,e)?[i]:[]:n.find.matches(e,n.grep(t,function(e){return 1===e.nodeType}))},n.fn.extend({find:function(e){var t,r=this.length,i=[],s=this;if("string"!=typeof e)return this.pushStack(n(e).filter(function(){for(t=0;r>t;t++)if(n.contains(s[t],this))return!0}));for(t=0;r>t;t++)n.find(e,s[t],i);return i=this.pushStack(r>1?n.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(x(this,e||[],!1))},not:function(e){return this.pushStack(x(this,e||[],!0))},is:function(e){return!!x(this,"string"==typeof e&&u.test(e)?n(e):e||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(e,t){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:z.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||y).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof n?t[0]:t,n.merge(this,n.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:l,!0)),v.test(r[1])&&n.isPlainObject(t))for(r in t)n.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=l.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=l,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):n.isFunction(e)?"undefined"!=typeof y.ready?y.ready(e):e(n):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),n.makeArray(e,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(e,t,r){var i=[],s=void 0!==r;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(s&&n(e).is(r))break;i.push(e)}return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),n.fn.extend({has:function(e){var t=n(e,this),r=t.length;return this.filter(function(){for(var e=0;r>e;e++)if(n.contains(this,t[e]))return!0})},closest:function(e,t){for(var r,i=0,s=this.length,o=[],a=u.test(e)||"string"!=typeof e?n(e,t||this.context):0;s>i;i++)for(r=this[i];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(a?a.index(r)>-1:1===r.nodeType&&n.find.matchesSelector(r,e))){o.push(r);break}return this.pushStack(o.length>1?n.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(n(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(n.unique(n.merge(this.get(),n(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),n.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return n.dir(e,"parentNode")},parentsUntil:function(e,t,r){return n.dir(e,"parentNode",r)},next:function(e){return D(e,"nextSibling")},prev:function(e){return D(e,"previousSibling")},nextAll:function(e){return n.dir(e,"nextSibling")},prevAll:function(e){return n.dir(e,"previousSibling")},nextUntil:function(e,t,r){return n.dir(e,"nextSibling",r)},prevUntil:function(e,t,r){return n.dir(e,"previousSibling",r)},siblings:function(e){return n.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return n.sibling(e.firstChild)},contents:function(e){return e.contentDocument||n.merge([],e.childNodes)}},function(e,t){n.fn[e]=function(r,i){var s=n.map(this,t,r);return"Until"!==e.slice(-5)&&(i=r),i&&"string"==typeof i&&(s=n.filter(i,s)),this.length>1&&(C[e]||n.unique(s),B.test(e)&&s.reverse()),this.pushStack(s)}});var E=/\S+/g,F={};n.Callbacks=function(e){e="string"==typeof e?F[e]||G(e):n.extend({},e);var t,r,i,s,o,u,a=[],f=!e.once&&[],l=function(n){for(t=e.memory&&n,r=!0,u=s||0,s=0,o=a.length,i=!0;a&&o>u;u++)if(a[u].apply(n[0],n[1])===!1&&e.stopOnFalse){t=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var r=a.length;!function u(t){n.each(t,function(t,r){var i=n.type(r);"function"===i?e.unique&&c.has(r)||a.push(r):r&&r.length&&"string"!==i&&u(r)})}(arguments),i?o=a.length:t&&(s=r,l(t))}return this},remove:function(){return a&&n.each(arguments,function(e,t){var r;while((r=n.inArray(t,a,r))>-1)a.splice(r,1),i&&(o>=r&&o--,u>=r&&u--)}),this},has:function(e){return e?n.inArray(e,a)>-1:!!a&&!!a.length},empty:function(){return a=[],o=0,this},disable:function(){return a=f=t=void 0,this},disabled:function(){return!a},lock:function(){return f=void 0,t||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return!a||r&&!f||(t=t||[],t=[e,t.slice?t.slice():t],i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},n.extend({Deferred:function(e){var t=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],r="pending",i={state:function(){return r},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var e=arguments;return n.Deferred(function(r){n.each(t,function(t,o){var u=n.isFunction(e[t])&&e[t];s[o[1]](function(){var e=u&&u.apply(this,arguments);e&&n.isFunction(e.promise)?e.promise().done(r.resolve).fail(r.reject).progress(r.notify):r[o[0]+"With"](this===i?r.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?n.extend(e,i):i}},s={};return i.pipe=i.then,n.each(t,function(e,n){var o=n[2],u=n[3];i[n[1]]=o.add,u&&o.add(function(){r=u},t[1^e][2].disable,t[2][2].lock),s[n[0]]=function(){return s[n[0]+"With"](this===s?i:this,arguments),this},s[n[0]+"With"]=o.fireWith}),i.promise(s),e&&e.call(s,s),s},when:function(e){var t=0,r=d.call(arguments),i=r.length,s=1!==i||e&&n.isFunction(e.promise)?i:0,o=1===s?e:n.Deferred(),u=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--s||o.resolveWith(t,n)}},a,f,l;if(i>1)for(a=new Array(i),f=new Array(i),l=new Array(i);i>t;t++)r[t]&&n.isFunction(r[t].promise)?r[t].promise().done(u(t,l,r)).fail(o.reject).progress(u(t,f,a)):--s;return s||o.resolveWith(l,r),o.promise()}});var H;n.fn.ready=function(e){return n.ready.promise().done(e),this},n.extend({isReady:!1,readyWait:1,holdReady:function(e){e?n.readyWait++:n.ready(!0)},ready:function(e){(e===!0?--n.readyWait:n.isReady)||(n.isReady=!0,e!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}}),n.ready.promise=function(e){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(e)},n.ready.promise();var J=n.access=function(e,t,r,i,s,o,u){var a=0,f=e.length,l=null==r;if("object"===n.type(r)){s=!0;for(a in r)n.access(e,t,a,r[a],!0,o,u)}else if(void 0!==i&&(s=!0,n.isFunction(i)||(u=!0),l&&(u?(t.call(e,i),t=null):(l=t,t=function(e,t,r){return l.call(n(e),r)})),t))for(;f>a;a++)t(e[a],r,u?i:i.call(e[a],a,t(e[a],r)));return s?e:l?t.call(e):f?t(e[0],r):o};n.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(e){if(!K.accepts(e))return 0;var t={},r=e[this.expando];if(!r){r=K.uid++;try{t[this.expando]={value:r},Object.defineProperties(e,t)}catch(i){t[this.expando]=r,n.extend(e,t)}}return this.cache[r]||(this.cache[r]={}),r},set:function(e,t,r){var i,s=this.key(e),o=this.cache[s];if("string"==typeof t)o[t]=r;else if(n.isEmptyObject(o))n.extend(this.cache[s],t);else for(i in t)o[i]=t[i];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,r){var i;return void 0===t||t&&"string"==typeof t&&void 0===r?(i=this.get(e,t),void 0!==i?i:this.get(e,n.camelCase(t))):(this.set(e,t,r),void 0!==r?r:t)},remove:function(e,t){var r,i,s,o=this.key(e),u=this.cache[o];if(void 0===t)this.cache[o]={};else{n.isArray(t)?i=t.concat(t.map(n.camelCase)):(s=n.camelCase(t),t in u?i=[t,s]:(i=s,i=i in u?[i]:i.match(E)||[])),r=i.length;while(r--)delete u[i[r]]}},hasData:function(e){return!n.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;n.extend({hasData:function(e){return M.hasData(e)||L.hasData(e)},data:function(e,t,n){return M.access(e,t,n)},removeData:function(e,t){M.remove(e,t)},_data:function(e,t,n){return L.access(e,t,n)},_removeData:function(e,t){L.remove(e,t)}}),n.fn.extend({data:function(e,t){var r,i,s,o=this[0],u=o&&o.attributes;if(void 0===e){if(this.length&&(s=M.get(o),1===o.nodeType&&!L.get(o,"hasDataAttrs"))){r=u.length;while(r--)u[r]&&(i=u[r].name,0===i.indexOf("data-")&&(i=n.camelCase(i.slice(5)),P(o,i,s[i])));L.set(o,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){M.set(this,e)}):J(this,function(t){var r,i=n.camelCase(e);if(o&&void 0===t){if(r=M.get(o,e),void 0!==r)return r;if(r=M.get(o,i),void 0!==r)return r;if(r=P(o,i,void 0),void 0!==r)return r}else this.each(function(){var n=M.get(this,i);M.set(this,i,t),-1!==e.indexOf("-")&&void 0!==n&&M.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){M.remove(this,e)})}}),n.extend({queue:function(e,t,r){var i;return e?(t=(t||"fx")+"queue",i=L.get(e,t),r&&(!i||n.isArray(r)?i=L.access(e,t,n.makeArray(r)):i.push(r)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var r=n.queue(e,t),i=r.length,s=r.shift(),o=n._queueHooks(e,t),u=function(){n.dequeue(e,t)};"inprogress"===s&&(s=r.shift(),i--),s&&("fx"===t&&r.unshift("inprogress"),delete o.stop,s.call(e,u,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return L.get(e,r)||L.access(e,r,{empty:n.Callbacks("once memory").add(function(){L.remove(e,[t+"queue",r])})})}}),n.fn.extend({queue:function(e,t){var r=2;return"string"!=typeof e&&(t=e,e="fx",r--),arguments.length<r?n.queue(this[0],e):void 0===t?this:this.each(function(){var r=n.queue(this,e,t);n._queueHooks(this,e),"fx"===e&&"inprogress"!==r[0]&&n.dequeue(this,e)})},dequeue:function(e){return this.each(function(){n.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var r,i=1,s=n.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(u--)r=L.get(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(t)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(e,t){return e=t||e,"none"===n.css(e,"display")||!n.contains(e.ownerDocument,e)},T=/^(?:checkbox|radio)$/i;!function(){var e=l.createDocumentFragment(),t=e.appendChild(l.createElement("div")),n=l.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),k.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;n.event={global:{},add:function(e,t,r,i,s){var o,u,a,f,l,c,h,p,d,v,m,g=L.get(e);if(g){r.handler&&(o=r,r=o.handler,s=o.selector),r.guid||(r.guid=n.guid++),(f=g.events)||(f=g.events={}),(u=g.handle)||(u=g.handle=function(t){return typeof n!==U&&n.event.triggered!==t.type?n.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(E)||[""],l=t.length;while(l--)a=Y.exec(t[l])||[],d=m=a[1],v=(a[2]||"").split(".").sort(),d&&(h=n.event.special[d]||{},d=(s?h.delegateType:h.bindType)||d,h=n.event.special[d]||{},c=n.extend({type:d,origType:m,data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&n.expr.match.needsContext.test(s),namespace:v.join(".")},o),(p=f[d])||(p=f[d]=[],p.delegateCount=0,h.setup&&h.setup.call(e,i,v,u)!==!1||e.addEventListener&&e.addEventListener(d,u,!1)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=r.guid)),s?p.splice(p.delegateCount++,0,c):p.push(c),n.event.global[d]=!0)}},remove:function(e,t,r,i,s){var o,u,a,f,l,c,h,p,d,v,m,g=L.hasData(e)&&L.get(e);if(g&&(f=g.events)){t=(t||"").match(E)||[""],l=t.length;while(l--)if(a=Y.exec(t[l])||[],d=m=a[1],v=(a[2]||"").split(".").sort(),d){h=n.event.special[d]||{},d=(i?h.delegateType:h.bindType)||d,p=f[d]||[],a=a[2]&&new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=p.length;while(o--)c=p[o],!s&&m!==c.origType||r&&r.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,h.remove&&h.remove.call(e,c));u&&!p.length&&(h.teardown&&h.teardown.call(e,v,g.handle)!==!1||n.removeEvent(e,d,g.handle),delete f[d])}else for(d in f)n.event.remove(e,d+t[l],r,i,!0);n.isEmptyObject(f)&&(delete g.handle,L.remove(e,"events"))}},trigger:function(e,t,r,i){var s,o,u,f,c,h,p,d=[r||l],v=j.call(e,"type")?e.type:e,m=j.call(e,"namespace")?e.namespace.split("."):[];if(o=u=r=r||l,3!==r.nodeType&&8!==r.nodeType&&!X.test(v+n.event.triggered)&&(v.indexOf(".")>=0&&(m=v.split("."),v=m.shift(),m.sort()),c=v.indexOf(":")<0&&"on"+v,e=e[n.expando]?e:new n.Event(v,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=m.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:n.makeArray(t,[e]),p=n.event.special[v]||{},i||!p.trigger||p.trigger.apply(r,t)!==!1)){if(!i&&!p.noBubble&&!n.isWindow(r)){for(f=p.delegateType||v,X.test(f+v)||(o=o.parentNode);o;o=o.parentNode)d.push(o),u=o;u===(r.ownerDocument||l)&&d.push(u.defaultView||u.parentWindow||a)}s=0;while((o=d[s++])&&!e.isPropagationStopped())e.type=s>1?f:p.bindType||v,h=(L.get(o,"events")||{})[e.type]&&L.get(o,"handle"),h&&h.apply(o,t),h=c&&o[c],h&&h.apply&&n.acceptData(o)&&(e.result=h.apply(o,t),e.result===!1&&e.preventDefault());return e.type=v,i||e.isDefaultPrevented()||p._default&&p._default.apply(d.pop(),t)!==!1||!n.acceptData(r)||c&&n.isFunction(r[v])&&!n.isWindow(r)&&(u=r[c],u&&(r[c]=null),n.event.triggered=v,r[v](),n.event.triggered=void 0,u&&(r[c]=u)),e.result}},dispatch:function(e){e=n.event.fix(e);var t,r,i,s,o,u=[],a=d.call(arguments),f=(L.get(this,"events")||{})[e.type]||[],l=n.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){u=n.event.handlers.call(this,e,f),t=0;while((s=u[t++])&&!e.isPropagationStopped()){e.currentTarget=s.elem,r=0;while((o=s.handlers[r++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,i=((n.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,a),void 0!==i&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var r,i,s,o,u=[],a=t.delegateCount,f=e.target;if(a&&f.nodeType&&(!e.button||"click"!==e.type))for(;f!==this;f=f.parentNode||this)if(f.disabled!==!0||"click"!==e.type){for(i=[],r=0;a>r;r++)o=t[r],s=o.selector+" ",void 0===i[s]&&(i[s]=o.needsContext?n(s,this).index(f)>=0:n.find(s,this,null,[f]).length),i[s]&&i.push(o);i.length&&u.push({elem:f,handlers:i})}return a<t.length&&u.push({elem:this,handlers:t.slice(a)}),u},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||l,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===s||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[n.expando])return e;var t,r,i,s=e.type,o=e,u=this.fixHooks[s];u||(this.fixHooks[s]=u=W.test(s)?this.mouseHooks:V.test(s)?this.keyHooks:{}),i=u.props?this.props.concat(u.props):this.props,e=new n.Event(o),t=i.length;while(t--)r=i[t],e[r]=o[r];return e.target||(e.target=l),3===e.target.nodeType&&(e.target=e.target.parentNode),u.filter?u.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return n.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,r,i){var s=n.extend(new n.Event,r,{type:e,isSimulated:!0,originalEvent:{}});i?n.event.trigger(s,null,t):n.event.dispatch.call(t,s),s.isDefaultPrevented()&&r.preventDefault()}},n.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},n.Event=function(e,t){return this instanceof n.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?Z:$):this.type=e,t&&n.extend(this,t),this.timeStamp=e&&e.timeStamp||n.now(),void (this[n.expando]=!0)):new n.Event(e,t)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Z,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Z,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Z,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){n.event.special[e]={delegateType:t,bindType:t,handle:function(e){var r,i=this,s=e.relatedTarget,o=e.handleObj;return(!s||s!==i&&!n.contains(i,s))&&(e.type=o.origType,r=o.handler.apply(this,arguments),e.type=t),r}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(e,t){var r=function(e){n.event.simulate(t,e.target,n.event.fix(e),!0)};n.event.special[t]={setup:function(){var n=this.ownerDocument||this,i=L.access(n,t);i||n.addEventListener(e,r,!0),L.access(n,t,(i||0)+1)},teardown:function(){var n=this.ownerDocument||this,i=L.access(n,t)-1;i?L.access(n,t,i):(n.removeEventListener(e,r,!0),L.remove(n,t))}}}),n.fn.extend({on:function(e,t,r,i,s){var o,u;if("object"==typeof e){"string"!=typeof t&&(r=r||t,t=void 0);for(u in e)this.on(u,t,r,e[u],s);return this}if(null==r&&null==i?(i=t,r=t=void 0):null==i&&("string"==typeof t?(i=r,r=void 0):(i=r,r=t,t=void 0)),i===!1)i=$;else if(!i)return this;return 1===s&&(o=i,i=function(e){return n().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=n.guid++)),this.each(function(){n.event.add(this,e,i,r,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,n(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(s in e)this.off(s,t,e[s]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=$),this.each(function(){n.event.remove(this,e,r,t)})},trigger:function(e,t){return this.each(function(){n.event.trigger(e,t,this)})},triggerHandler:function(e,t){var r=this[0];return r?n.event.trigger(e,t,r,!0):void 0}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td,n.extend({clone:function(e,t,r){var i,s,o,u,a=e.cloneNode(!0),f=n.contains(e.ownerDocument,e);if(!(k.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||n.isXMLDoc(e)))for(u=oa(a),o=oa(e),i=0,s=o.length;s>i;i++)pa(o[i],u[i]);if(t)if(r)for(o=o||oa(e),u=u||oa(a),i=0,s=o.length;s>i;i++)na(o[i],u[i]);else na(e,a);return u=oa(a,"script"),u.length>0&&ma(u,!f&&oa(e,"script")),a},buildFragment:function(e,t,r,i){for(var s,o,u,a,f,l,c=t.createDocumentFragment(),h=[],p=0,d=e.length;d>p;p++)if(s=e[p],s||0===s)if("object"===n.type(s))n.merge(h,s.nodeType?[s]:s);else if(ca.test(s)){o=o||c.appendChild(t.createElement("div")),u=(ba.exec(s)||["",""])[1].toLowerCase(),a=ia[u]||ia._default,o.innerHTML=a[1]+s.replace(aa,"<$1></$2>")+a[2],l=a[0];while(l--)o=o.lastChild;n.merge(h,o.childNodes),o=c.firstChild,o.textContent=""}else h.push(t.createTextNode(s));c.textContent="",p=0;while(s=h[p++])if((!i||-1===n.inArray(s,i))&&(f=n.contains(s.ownerDocument,s),o=oa(c.appendChild(s),"script"),f&&ma(o),r)){l=0;while(s=o[l++])fa.test(s.type||"")&&r.push(s)}return c},cleanData:function(e){for(var t,r,i,s,o=n.event.special,u=0;void 0!==(r=e[u]);u++){if(n.acceptData(r)&&(s=r[L.expando],s&&(t=L.cache[s]))){if(t.events)for(i in t.events)o[i]?n.event.remove(r,i):n.removeEvent(r,i,t.handle);L.cache[s]&&delete L.cache[s]}delete M.cache[r[M.expando]]}}}),n.fn.extend({text:function(e){return J(this,function(e){return void 0===e?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ja(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ja(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var r,i=e?n.filter(e,this):this,s=0;null!=(r=i[s]);s++)t||1!==r.nodeType||n.cleanData(oa(r)),r.parentNode&&(t&&n.contains(r.ownerDocument,r)&&ma(oa(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(n.cleanData(oa(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return n.clone(this,e,t)})},html:function(e){return J(this,function(e){var t=this[0]||{},r=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!da.test(e)&&!ia[(ba.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(aa,"<$1></$2>");try{for(;i>r;r++)t=this[r]||{},1===t.nodeType&&(n.cleanData(oa(t,!1)),t.innerHTML=e);t=0}catch(s){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,n.cleanData(oa(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(t,r){t=e.apply([],t);var i,s,o,u,a,f,l=0,c=this.length,h=this,p=c-1,d=t[0],v=n.isFunction(d);if(v||c>1&&"string"==typeof d&&!k.checkClone&&ea.test(d))return this.each(function(e){var n=h.eq(e);v&&(t[0]=d.call(this,e,n.html())),n.domManip(t,r)});if(c&&(i=n.buildFragment(t,this[0].ownerDocument,!1,this),s=i.firstChild,1===i.childNodes.length&&(i=s),s)){for(o=n.map(oa(i,"script"),ka),u=o.length;c>l;l++)a=i,l!==p&&(a=n.clone(a,!0,!0),u&&n.merge(o,oa(a,"script"))),r.call(this[l],a,l);if(u)for(f=o[o.length-1].ownerDocument,n.map(o,la),l=0;u>l;l++)a=o[l],fa.test(a.type||"")&&!L.access(a,"globalEval")&&n.contains(f,a)&&(a.src?n._evalUrl&&n._evalUrl(a.src):n.globalEval(a.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){n.fn[e]=function(e){for(var r,i=[],s=n(e),o=s.length-1,u=0;o>=u;u++)r=u===o?this:this.clone(!0),n(s[u])[t](r),f.apply(i,r.get());return this.pushStack(i)}});var qa,ra={},ua=/^margin/,va=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wa=function(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):a.getComputedStyle(e,null)};!function(){var e,t,r=l.documentElement,i=l.createElement("div"),s=l.createElement("div");if(s.style){s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===s.style.backgroundClip,i.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",i.appendChild(s);function o(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",s.innerHTML="",r.appendChild(i);var n=a.getComputedStyle(s,null);e="1%"!==n.top,t="4px"===n.width,r.removeChild(i)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return o(),e},boxSizingReliable:function(){return null==t&&o(),t},reliableMarginRight:function(){var e,t=s.appendChild(l.createElement("div"));return t.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",s.style.width="1px",r.appendChild(i),e=!parseFloat(a.getComputedStyle(t,null).marginRight),r.removeChild(i),s.removeChild(t),e}})}}(),n.swap=function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i};var za=/^(none|table(?!-c[ea]).+)/,Aa=new RegExp("^("+Q+")(.*)$","i"),Ba=new RegExp("^([+-])=("+Q+")","i"),Ca={position:"absolute",visibility:"hidden",display:"block"},Da={letterSpacing:"0",fontWeight:"400"},Ea=["Webkit","O","Moz","ms"];n.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=xa(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,u,a=n.camelCase(t),f=e.style;return t=n.cssProps[a]||(n.cssProps[a]=Fa(f,a)),u=n.cssHooks[t]||n.cssHooks[a],void 0===r?u&&"get"in u&&void 0!==(s=u.get(e,!1,i))?s:f[t]:(o=typeof r,"string"===o&&(s=Ba.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(n.css(e,t)),o="number"),null!=r&&r===r&&("number"!==o||n.cssNumber[a]||(r+="px"),k.clearCloneStyle||""!==r||0!==t.indexOf("background")||(f[t]="inherit"),u&&"set"in u&&void 0===(r=u.set(e,r,i))||(f[t]=r)),void 0)}},css:function(e,t,r,i){var s,o,u,a=n.camelCase(t);return t=n.cssProps[a]||(n.cssProps[a]=Fa(e.style,a)),u=n.cssHooks[t]||n.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,r)),void 0===s&&(s=xa(e,t,i)),"normal"===s&&t in Da&&(s=Da[t]),""===r||r?(o=parseFloat(s),r===!0||n.isNumeric(o)?o||0:s):s}}),n.each(["height","width"],function(e,t){n.cssHooks[t]={get:function(e,r,i){return r?za.test(n.css(e,"display"))&&0===e.offsetWidth?n.swap(e,Ca,function(){return Ia(e,t,i)}):Ia(e,t,i):void 0},set:function(e,r,i){var s=i&&wa(e);return Ga(e,r,i?Ha(e,t,i,"border-box"===n.css(e,"boxSizing",!1,s),s):0)}}}),n.cssHooks.marginRight=ya(k.reliableMarginRight,function(e,t){return t?n.swap(e,{display:"inline-block"},xa,[e,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(e,t){n.cssHooks[e+t]={expand:function(n){for(var r=0,i={},s="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+R[r]+t]=s[r]||s[r-2]||s[0];return i}},ua.test(e)||(n.cssHooks[e+t].set=Ga)}),n.fn.extend({css:function(e,t){return J(this,function(e,t,r){var i,s,o={},u=0;if(n.isArray(t)){for(i=wa(e),s=t.length;s>u;u++)o[t[u]]=n.css(e,t[u],!1,i);return o}return void 0!==r?n.style(e,t,r):n.css(e,t)},e,t,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}}),n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(e,t,r,i,s,o){this.elem=e,this.prop=r,this.easing=s||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(n.cssNumber[r]?"":"px")},cur:function(){var e=Ka.propHooks[this.prop];return e&&e.get?e.get(this):Ka.propHooks._default.get(this)},run:function(e){var t,r=Ka.propHooks[this.prop];return this.options.duration?this.pos=t=n.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=n.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){n.fx.step[e.prop]?n.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[n.cssProps[e.prop]]||n.cssHooks[e.prop])?n.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},n.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var La,Ma,Na=/^(?:toggle|show|hide)$/,Oa=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pa=/queueHooks$/,Qa=[Va],Ra={"*":[function(e,t){var r=this.createTween(e,t),i=r.cur(),s=Oa.exec(t),o=s&&s[3]||(n.cssNumber[e]?"":"px"),u=(n.cssNumber[e]||"px"!==o&&+i)&&Oa.exec(n.css(r.elem,e)),a=1,f=20;if(u&&u[3]!==o){o=o||u[3],s=s||[],u=+i||1;do a=a||".5",u/=a,n.style(r.elem,e,u+o);while(a!==(a=r.cur()/i)&&1!==a&&--f)}return s&&(u=r.start=+u||+i||0,r.unit=o,r.end=s[1]?u+(s[1]+1)*s[2]:+s[2]),r}]};n.Animation=n.extend(Xa,{tweener:function(e,t){n.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var r,i=0,s=e.length;s>i;i++)r=e[i],Ra[r]=Ra[r]||[],Ra[r].unshift(t)},prefilter:function(e,t){t?Qa.unshift(e):Qa.push(e)}}),n.speed=function(e,t,r){var i=e&&"object"==typeof e?n.extend({},e):{complete:r||!r&&t||n.isFunction(e)&&e,duration:e,easing:r&&t||t&&!n.isFunction(t)&&t};return i.duration=n.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in n.fx.speeds?n.fx.speeds[i.duration]:n.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){n.isFunction(i.old)&&i.old.call(this),i.queue&&n.dequeue(this,i.queue)},i},n.fn.extend({fadeTo:function(e,t,n,r){return this.filter(S).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,r,i){var s=n.isEmptyObject(e),o=n.speed(t,r,i),u=function(){var t=Xa(this,n.extend({},e),o);(s||L.get(this,"finish"))&&t.stop(!0)};return u.finish=u,s||o.queue===!1?this.each(u):this.queue(o.queue,u)},stop:function(e,t,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,s=null!=e&&e+"queueHooks",o=n.timers,u=L.get(this);if(s)u[s]&&u[s].stop&&i(u[s]);else for(s in u)u[s]&&u[s].stop&&Pa.test(s)&&i(u[s]);for(s=o.length;s--;)o[s].elem!==this||null!=e&&o[s].queue!==e||(o[s].anim.stop(r),t=!1,o.splice(s,1));(t||!r)&&n.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,r=L.get(this),i=r[e+"queue"],s=r[e+"queueHooks"],o=n.timers,u=i?i.length:0;for(r.finish=!0,n.queue(this,e,[]),s&&s.stop&&s.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;u>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete r.finish})}}),n.each(["toggle","show","hide"],function(e,t){var r=n.fn[t];n.fn[t]=function(e,n,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(Ta(t,!0),e,n,i)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){n.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),n.timers=[],n.fx.tick=function(){var e,t=0,r=n.timers;for(La=n.now();t<r.length;t++)e=r[t],e()||r[t]!==e||r.splice(t--,1);r.length||n.fx.stop(),La=void 0},n.fx.timer=function(e){n.timers.push(e),e()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ma||(Ma=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Ma),Ma=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(e,t){return e=n.fx?n.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e=l.createElement("input"),t=l.createElement("select"),n=t.appendChild(l.createElement("option"));e.type="checkbox",k.checkOn=""!==e.value,k.optSelected=n.selected,t.disabled=!0,k.optDisabled=!n.disabled,e=l.createElement("input"),e.value="t",e.type="radio",k.radioValue="t"===e.value}();var Ya,Za,$a=n.expr.attrHandle;n.fn.extend({attr:function(e,t){return J(this,n.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){n.removeAttr(this,e)})}}),n.extend({attr:function(e,t,r){var i,s,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===U?n.prop(e,t,r):(1===o&&n.isXMLDoc(e)||(t=t.toLowerCase(),i=n.attrHooks[t]||(n.expr.match.bool.test(t)?Za:Ya)),void 0===r?i&&"get"in i&&null!==(s=i.get(e,t))?s:(s=n.find.attr(e,t),null==s?void 0:s):null!==r?i&&"set"in i&&void 0!==(s=i.set(e,r,t))?s:(e.setAttribute(t,r+""),r):void n.removeAttr(e,t))},removeAttr:function(e,t){var r,i,s=0,o=t&&t.match(E);if(o&&1===e.nodeType)while(r=o[s++])i=n.propFix[r]||r,n.expr.match.bool.test(r)&&(e[i]=!1),e.removeAttribute(r)},attrHooks:{type:{set:function(e,t){if(!k.radioValue&&"radio"===t&&n.nodeName(e,"input")){var r=e.value;return e.setAttribute("type",t),r&&(e.value=r),t}}}}}),Za={set:function(e,t,r){return t===!1?n.removeAttr(e,r):e.setAttribute(r,r),r}},n.each(n.expr.match.bool.source.match(/\w+/g),function(e,t){var r=$a[t]||n.find.attr;$a[t]=function(e,t,n){var i,s;return n||(s=$a[t],$a[t]=i,i=null!=r(e,t,n)?t.toLowerCase():null,$a[t]=s),i}});var _a=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(e,t){return J(this,n.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[n.propFix[e]||e]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,r){var i,s,o,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return o=1!==u||!n.isXMLDoc(e),o&&(t=n.propFix[t]||t,s=n.propHooks[t]),void 0!==r?s&&"set"in s&&void 0!==(i=s.set(e,r,t))?i:e[t]=r:s&&"get"in s&&null!==(i=s.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||_a.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ab=/[\t\r\n\f]/g;n.fn.extend({addClass:function(e){var t,r,i,s,o,u,a="string"==typeof e&&e,f=0,l=this.length;if(n.isFunction(e))return this.each(function(t){n(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(E)||[];l>f;f++)if(r=this[f],i=1===r.nodeType&&(r.className?(" "+r.className+" ").replace(ab," "):" ")){o=0;while(s=t[o++])i.indexOf(" "+s+" ")<0&&(i+=s+" ");u=n.trim(i),r.className!==u&&(r.className=u)}return this},removeClass:function(e){var t,r,i,s,o,u,a=0===arguments.length||"string"==typeof e&&e,f=0,l=this.length;if(n.isFunction(e))return this.each(function(t){n(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(E)||[];l>f;f++)if(r=this[f],i=1===r.nodeType&&(r.className?(" "+r.className+" ").replace(ab," "):"")){o=0;while(s=t[o++])while(i.indexOf(" "+s+" ")>=0)i=i.replace(" "+s+" "," ");u=e?n.trim(i):"",r.className!==u&&(r.className=u)}return this},toggleClass:function(e,t){var r=typeof e;return"boolean"==typeof t&&"string"===r?t?this.addClass(e):this.removeClass(e):this.each(n.isFunction(e)?function(r){n(this).toggleClass(e.call(this,r,this.className,t),t)}:function(){if("string"===r){var t,i=0,s=n(this),o=e.match(E)||[];while(t=o[i++])s.hasClass(t)?s.removeClass(t):s.addClass(t)}else(r===U||"boolean"===r)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||e===!1?"":L.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(ab," ").indexOf(t)>=0)return!0;return!1}});var bb=/\r/g;n.fn.extend({val:function(e){var t,r,i,s=this[0];if(arguments.length)return i=n.isFunction(e),this.each(function(r){var s;1===this.nodeType&&(s=i?e.call(this,r,n(this).val()):e,null==s?s="":"number"==typeof s?s+="":n.isArray(s)&&(s=n.map(s,function(e){return null==e?"":e+""})),t=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,s,"value")||(this.value=s))});if(s)return t=n.valHooks[s.type]||n.valHooks[s.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(s,"value"))?r:(r=s.value,"string"==typeof r?r.replace(bb,""):null==r?"":r)}}),n.extend({valHooks:{option:{get:function(e){var t=n.find.attr(e,"value");return null!=t?t:n.trim(n.text(e))}},select:{get:function(e){for(var t,r,i=e.options,s=e.selectedIndex,o="select-one"===e.type||0>s,u=o?null:[],a=o?s+1:i.length,f=0>s?a:o?s:0;a>f;f++)if(r=i[f],!(!r.selected&&f!==s||(k.optDisabled?r.disabled:null!==r.getAttribute("disabled"))||r.parentNode.disabled&&n.nodeName(r.parentNode,"optgroup"))){if(t=n(r).val(),o)return t;u.push(t)}return u},set:function(e,t){var r,i,s=e.options,o=n.makeArray(t),u=s.length;while(u--)i=s[u],(i.selected=n.inArray(i.value,o)>=0)&&(r=!0);return r||(e.selectedIndex=-1),o}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(e,t){return n.isArray(t)?e.checked=n.inArray(n(e).val(),t)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){n.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),n.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var cb=n.now(),db=/\?/;n.parseJSON=function(e){return JSON.parse(e+"")},n.parseXML=function(e){var t,r;if(!e||"string"!=typeof e)return null;try{r=new DOMParser,t=r.parseFromString(e,"text/xml")}catch(i){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+e),t};var eb=/#.*$/,fb=/([?&])_=[^&]*/,gb=/^(.*?):[ \t]*([^\r\n]*)$/gm,hb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ib=/^(?:GET|HEAD)$/,jb=/^\/\//,kb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lb={},mb={},nb="*/".concat("*"),ob=a.location.href,pb=kb.exec(ob.toLowerCase())||[];n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ob,type:"GET",isLocal:hb.test(pb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?sb(sb(e,n.ajaxSettings),t):sb(n.ajaxSettings,e)},ajaxPrefilter:qb(lb),ajaxTransport:qb(mb),ajax:function(e,t){function T(e,t,o,a){var l,g,y,w,E,x=t;2!==b&&(b=2,u&&clearTimeout(u),r=void 0,s=a||"",S.readyState=e>0?4:0,l=e>=200&&300>e||304===e,o&&(w=tb(c,S,o)),w=ub(c,w,S,l),l?(c.ifModified&&(E=S.getResponseHeader("Last-Modified"),E&&(n.lastModified[i]=E),E=S.getResponseHeader("etag"),E&&(n.etag[i]=E)),204===e||"HEAD"===c.type?x="nocontent":304===e?x="notmodified":(x=w.state,g=w.data,y=w.error,l=!y)):(y=x,(e||!x)&&(x="error",0>e&&(e=0))),S.status=e,S.statusText=(t||x)+"",l?d.resolveWith(h,[g,x,S]):d.rejectWith(h,[S,x,y]),S.statusCode(m),m=void 0,f&&p.trigger(l?"ajaxSuccess":"ajaxError",[S,c,l?g:y]),v.fireWith(h,[S,x]),f&&(p.trigger("ajaxComplete",[S,c]),--n.active||n.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,s,o,u,a,f,l,c=n.ajaxSetup({},t),h=c.context||c,p=c.context&&(h.nodeType||h.jquery)?n(h):n.event,d=n.Deferred(),v=n.Callbacks("once memory"),m=c.statusCode||{},g={},y={},b=0,w="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!o){o={};while(t=gb.exec(s))o[t[1].toLowerCase()]=t[2]}t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,g[e]=t),this},overrideMimeType:function(e){return b||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else S.always(e[S.status]);return this},abort:function(e){var t=e||w;return r&&r.abort(t),T(0,t),this}};if(d.promise(S).complete=v.add,S.success=S.done,S.error=S.fail,c.url=((e||c.url||ob)+"").replace(eb,"").replace(jb,pb[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=n.trim(c.dataType||"*").toLowerCase().match(E)||[""],null==c.crossDomain&&(a=kb.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===pb[1]&&a[2]===pb[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(pb[3]||("http:"===pb[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=n.param(c.data,c.traditional)),rb(lb,c,t,S),2===b)return S;f=n.event&&c.global,f&&0===n.active++&&n.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!ib.test(c.type),i=c.url,c.hasContent||(c.data&&(i=c.url+=(db.test(i)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=fb.test(i)?i.replace(fb,"$1_="+cb++):i+(db.test(i)?"&":"?")+"_="+cb++)),c.ifModified&&(n.lastModified[i]&&S.setRequestHeader("If-Modified-Since",n.lastModified[i]),n.etag[i]&&S.setRequestHeader("If-None-Match",n.etag[i])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&S.setRequestHeader("Content-Type",c.contentType),S.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+nb+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)S.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,S,c)!==!1&&2!==b){w="abort";for(l in{success:1,error:1,complete:1})S[l](c[l]);if(r=rb(mb,c,t,S)){S.readyState=1,f&&p.trigger("ajaxSend",[S,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){S.abort("timeout")},c.timeout));try{b=1,r.send(g,T)}catch(x){if(!(2>b))throw x;T(-1,x)}}else T(-1,"No Transport");return S}return S.abort()},getJSON:function(e,t,r){return n.get(e,t,r,"json")},getScript:function(e,t){return n.get(e,void 0,t,"script")}}),n.each(["get","post"],function(e,t){n[t]=function(e,r,i,s){return n.isFunction(r)&&(s=s||i,i=r,r=void 0),n.ajax({url:e,type:t,dataType:s,data:r,success:i})}}),n._evalUrl=function(e){return n.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(e){var t;return n.isFunction(e)?this.each(function(t){n(this).wrapAll(e.call(this,t))}):(this[0]&&(t=n(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return this.each(n.isFunction(e)?function(t){n(this).wrapInner(e.call(this,t))}:function(){var t=n(this),r=t.contents();r.length?r.wrapAll(e):t.append(e)})},wrap:function(e){var t=n.isFunction(e);return this.each(function(r){n(this).wrapAll(t?e.call(this,r):e)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},n.expr.filters.visible=function(e){return!n.expr.filters.hidden(e)};var vb=/%20/g,wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;n.param=function(e,t){var r,i=[],s=function(e,t){t=n.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(e)||e.jquery&&!n.isPlainObject(e))n.each(e,function(){s(this.name,this.value)});else for(r in e)Ab(r,e[r],t,s);return i.join("&").replace(vb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=n.prop(this,"elements");return e?n.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!n(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(e)&&(this.checked||!T.test(e))}).map(function(e,t){var r=n(this).val();return null==r?null:n.isArray(r)?n.map(r,function(e){return{name:t.name,value:e.replace(xb,"\r\n")}}):{name:t.name,value:r.replace(xb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var e in Cb)Cb[e]()}),k.cors=!!Eb&&"withCredentials"in Eb,k.ajax=Eb=!!Eb,n.ajaxTransport(function(e){var t;return k.cors||Eb&&!e.crossDomain?{send:function(n,r){var i,s=e.xhr(),o=++Bb;if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)s.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete Cb[o],t=s.onload=s.onerror=null,"abort"===e?s.abort():"error"===e?r(s.status,s.statusText):r(Db[s.status]||s.status,s.statusText,"string"==typeof s.responseText?{text:s.responseText}:void 0,s.getAllResponseHeaders()))}},s.onload=t(),s.onerror=t("error"),t=Cb[o]=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(u){if(t)throw u}},abort:function(){t&&t()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return n.globalEval(e),e}}}),n.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),n.ajaxTransport("script",function(e){if(e.crossDomain){var t,r;return{send:function(i,s){t=n("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",r=function(e){t.remove(),r=null,e&&s("error"===e.type?404:200,e.type)}),l.head.appendChild(t[0])},abort:function(){r&&r()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fb.pop()||n.expando+"_"+cb++;return this[e]=!0,e}}),n.ajaxPrefilter("json jsonp",function(e,t,r){var i,s,o,u=e.jsonp!==!1&&(Gb.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(e.data)&&"data");return u||"jsonp"===e.dataTypes[0]?(i=e.jsonpCallback=n.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,u?e[u]=e[u].replace(Gb,"$1"+i):e.jsonp!==!1&&(e.url+=(db.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||n.error(i+" was not called"),o[0]},e.dataTypes[0]="json",s=a[i],a[i]=function(){o=arguments},r.always(function(){a[i]=s,e[i]&&(e.jsonpCallback=t.jsonpCallback,Fb.push(i)),o&&n.isFunction(s)&&s(o[0]),o=s=void 0}),"script"):void 0}),n.parseHTML=function(e,t,r){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(r=t,t=!1),t=t||l;var i=v.exec(e),s=!r&&[];return i?[t.createElement(i[1])]:(i=n.buildFragment([e],t,s),s&&s.length&&n(s).remove(),n.merge([],i.childNodes))};var Hb=n.fn.load;n.fn.load=function(e,t,r){if("string"!=typeof e&&Hb)return Hb.apply(this,arguments);var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=n.trim(e.slice(a)),e=e.slice(0,a)),n.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),u.length>0&&n.ajax({url:e,type:s,dataType:"html",data:t}).done(function(e){o=arguments,u.html(i?n("<div>").append(n.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){u.each(r,o||[e.responseText,t,e])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){n.fn[t]=function(e){return this.on(t,e)}}),n.expr.filters.animated=function(e){return n.grep(n.timers,function(t){return e===t.elem}).length};var Ib=a.document.documentElement;n.offset={setOffset:function(e,t,r){var i,s,o,u,a,f,l,c=n.css(e,"position"),h=n(e),p={};"static"===c&&(e.style.position="relative"),a=h.offset(),o=n.css(e,"top"),f=n.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+f).indexOf("auto")>-1,l?(i=h.position(),u=i.top,s=i.left):(u=parseFloat(o)||0,s=parseFloat(f)||0),n.isFunction(t)&&(t=t.call(e,r,a)),null!=t.top&&(p.top=t.top-a.top+u),null!=t.left&&(p.left=t.left-a.left+s),"using"in t?t.using.call(e,p):h.css(p)}},n.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){n.offset.setOffset(this,e,t)});var t,r,i=this[0],s={top:0,left:0},o=i&&i.ownerDocument;if(o)return t=o.documentElement,n.contains(t,i)?(typeof i.getBoundingClientRect!==U&&(s=i.getBoundingClientRect()),r=Jb(o),{top:s.top+r.pageYOffset-t.clientTop,left:s.left+r.pageXOffset-t.clientLeft}):s},position:function(){if(this[0]){var e,t,r=this[0],i={top:0,left:0};return"fixed"===n.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),n.nodeName(e[0],"html")||(i=e.offset()),i.top+=n.css(e[0],"borderTopWidth",!0),i.left+=n.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-n.css(r,"marginTop",!0),left:t.left-i.left-n.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||Ib;while(e&&!n.nodeName(e,"html")&&"static"===n.css(e,"position"))e=e.offsetParent;return e||Ib})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var r="pageYOffset"===t;n.fn[e]=function(n){return J(this,function(e,n,i){var s=Jb(e);return void 0===i?s?s[t]:e[n]:void (s?s.scrollTo(r?a.pageXOffset:i,r?i:a.pageYOffset):e[n]=i)},e,n,arguments.length,null)}}),n.each(["top","left"],function(e,t){n.cssHooks[t]=ya(k.pixelPosition,function(e,r){return r?(r=xa(e,t),va.test(r)?n(e).position()[t]+"px":r):void 0})}),n.each({Height:"height",Width:"width"},function(e,t){n.each({padding:"inner"+e,content:t,"":"outer"+e},function(r,i){n.fn[i]=function(i,s){var o=arguments.length&&(r||"boolean"!=typeof i),u=r||(i===!0||s===!0?"margin":"border");return J(this,function(t,r,i){var s;return n.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===i?n.css(t,r,u):n.style(t,r,i,u)},t,o?i:void 0,o,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kb=a.jQuery,Lb=a.$;return n.noConflict=function(e){return a.$===n&&(a.$=Lb),e&&a.jQuery===n&&(a.jQuery=Kb),n},typeof b===U&&(a.jQuery=a.$=n),n}),function(){function e(e){function t(t,n,r,i,s,o){for(;s>=0&&o>s;s+=e){var u=i?i[s]:s;r=n(r,t[u],u,t)}return r}return function(n,r,i,s){r=b(r,s,4);var o=!C(n)&&y.keys(n),u=(o||n).length,a=e>0?0:u-1;return arguments.length<3&&(i=n[o?o[a]:a],a+=e),t(n,r,i,o,a,u)}}function t(e){return function(t,n,r){n=w(n,r);for(var i=N(t),s=e>0?0:i-1;s>=0&&i>s;s+=e)if(n(t[s],s,t))return s;return-1}}function n(e,t,n){return function(r,i,s){var o=0,u=N(r);if("number"==typeof s)e>0?o=s>=0?s:Math.max(s+u,o):u=s>=0?Math.min(s+1,u):s+u+1;else if(n&&s&&u)return s=n(r,i),r[s]===i?s:-1;if(i!==i)return s=t(l.call(r,o,u),y.isNaN),s>=0?s+o:-1;for(s=e>0?o:u-1;s>=0&&u>s;s+=e)if(r[s]===i)return s;return-1}}function r(e,t){var n=M.length,r=e.constructor,i=y.isFunction(r)&&r.prototype||u,s="constructor";for(y.has(e,s)&&!y.contains(t,s)&&t.push(s);n--;)s=M[n],s in e&&e[s]!==i[s]&&!y.contains(t,s)&&t.push(s)}var i=this,s=i._,o=Array.prototype,u=Object.prototype,a=Function.prototype,f=o.push,l=o.slice,c=u.toString,h=u.hasOwnProperty,p=Array.isArray,d=Object.keys,v=a.bind,m=Object.create,g=function(){},y=function(e){return e instanceof y?e:this instanceof y?void (this._wrapped=e):new y(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=y),exports._=y):i._=y,y.VERSION="1.8.3";var b=function(e,t,n){if(t===void 0)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,s){return e.call(t,n,r,i,s)}}return function(){return e.apply(t,arguments)}},w=function(e,t,n){return null==e?y.identity:y.isFunction(e)?b(e,t,n):y.isObject(e)?y.matcher(e):y.property(e)};y.iteratee=function(e,t){return w(e,t,1/0)};var E=function(e,t){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var i=1;r>i;i++)for(var s=arguments[i],o=e(s),u=o.length,a=0;u>a;a++){var f=o[a];t&&n[f]!==void 0||(n[f]=s[f])}return n}},S=function(e){if(!y.isObject(e))return{};if(m)return m(e);g.prototype=e;var t=new g;return g.prototype=null,t},x=function(e){return function(t){return null==t?void 0:t[e]}},T=Math.pow(2,53)-1,N=x("length"),C=function(e){var t=N(e);return"number"==typeof t&&t>=0&&T>=t};y.each=y.forEach=function(e,t,n){t=b(t,n);var r,i;if(C(e))for(r=0,i=e.length;i>r;r++)t(e[r],r,e);else{var s=y.keys(e);for(r=0,i=s.length;i>r;r++)t(e[s[r]],s[r],e)}return e},y.map=y.collect=function(e,t,n){t=w(t,n);for(var r=!C(e)&&y.keys(e),i=(r||e).length,s=Array(i),o=0;i>o;o++){var u=r?r[o]:o;s[o]=t(e[u],u,e)}return s},y.reduce=y.foldl=y.inject=e(1),y.reduceRight=y.foldr=e(-1),y.find=y.detect=function(e,t,n){var r;return r=C(e)?y.findIndex(e,t,n):y.findKey(e,t,n),r!==void 0&&r!==-1?e[r]:void 0},y.filter=y.select=function(e,t,n){var r=[];return t=w(t,n),y.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},y.reject=function(e,t,n){return y.filter(e,y.negate(w(t)),n)},y.every=y.all=function(e,t,n){t=w(t,n);for(var r=!C(e)&&y.keys(e),i=(r||e).length,s=0;i>s;s++){var o=r?r[s]:s;if(!t(e[o],o,e))return!1}return!0},y.some=y.any=function(e,t,n){t=w(t,n);for(var r=!C(e)&&y.keys(e),i=(r||e).length,s=0;i>s;s++){var o=r?r[s]:s;if(t(e[o],o,e))return!0}return!1},y.contains=y.includes=y.include=function(e,t,n,r){return C(e)||(e=y.values(e)),("number"!=typeof n||r)&&(n=0),y.indexOf(e,t,n)>=0},y.invoke=function(e,t){var n=l.call(arguments,2),r=y.isFunction(t);return y.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},y.pluck=function(e,t){return y.map(e,y.property(t))},y.where=function(e,t){return y.filter(e,y.matcher(t))},y.findWhere=function(e,t){return y.find(e,y.matcher(t))},y.max=function(e,t,n){var r,i,s=-1/0,o=-1/0;if(null==t&&null!=e){e=C(e)?e:y.values(e);for(var u=0,a=e.length;a>u;u++)r=e[u],r>s&&(s=r)}else t=w(t,n),y.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-1/0&&s===-1/0)&&(s=e,o=i)});return s},y.min=function(e,t,n){var r,i,s=1/0,o=1/0;if(null==t&&null!=e){e=C(e)?e:y.values(e);for(var u=0,a=e.length;a>u;u++)r=e[u],s>r&&(s=r)}else t=w(t,n),y.each(e,function(e,n,r){i=t(e,n,r),(o>i||1/0===i&&1/0===s)&&(s=e,o=i)});return s},y.shuffle=function(e){for(var t,n=C(e)?e:y.values(e),r=n.length,i=Array(r),s=0;r>s;s++)t=y.random(0,s),t!==s&&(i[s]=i[t]),i[t]=n[s];return i},y.sample=function(e,t,n){return null==t||n?(C(e)||(e=y.values(e)),e[y.random(e.length-1)]):y.shuffle(e).slice(0,Math.max(0,t))},y.sortBy=function(e,t,n){return t=w(t,n),y.pluck(y.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(r>n||r===void 0)return-1}return e.index-t.index}),"value")};var k=function(e){return function(t,n,r){var i={};return n=w(n,r),y.each(t,function(r,s){var o=n(r,s,t);e(i,r,o)}),i}};y.groupBy=k(function(e,t,n){y.has(e,n)?e[n].push(t):e[n]=[t]}),y.indexBy=k(function(e,t,n){e[n]=t}),y.countBy=k(function(e,t,n){y.has(e,n)?e[n]++:e[n]=1}),y.toArray=function(e){return e?y.isArray(e)?l.call(e):C(e)?y.map(e,y.identity):y.values(e):[]},y.size=function(e){return null==e?0:C(e)?e.length:y.keys(e).length},y.partition=function(e,t,n){t=w(t,n);var r=[],i=[];return y.each(e,function(e,n,s){(t(e,n,s)?r:i).push(e)}),[r,i]},y.first=y.head=y.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:y.initial(e,e.length-t)},y.initial=function(e,t,n){return l.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},y.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:y.rest(e,Math.max(0,e.length-t))},y.rest=y.tail=y.drop=function(e,t,n){return l.call(e,null==t||n?1:t)},y.compact=function(e){return y.filter(e,y.identity)};var L=function(e,t,n,r){for(var i=[],s=0,o=r||0,u=N(e);u>o;o++){var a=e[o];if(C(a)&&(y.isArray(a)||y.isArguments(a))){t||(a=L(a,t,n));var f=0,l=a.length;for(i.length+=l;l>f;)i[s++]=a[f++]}else n||(i[s++]=a)}return i};y.flatten=function(e,t){return L(e,t,!1)},y.without=function(e){return y.difference(e,l.call(arguments,1))},y.uniq=y.unique=function(e,t,n,r){y.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=w(n,r));for(var i=[],s=[],o=0,u=N(e);u>o;o++){var a=e[o],f=n?n(a,o,e):a;t?(o&&s===f||i.push(a),s=f):n?y.contains(s,f)||(s.push(f),i.push(a)):y.contains(i,a)||i.push(a)}return i},y.union=function(){return y.uniq(L(arguments,!0,!0))},y.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=N(e);i>r;r++){var s=e[r];if(!y.contains(t,s)){for(var o=1;n>o&&y.contains(arguments[o],s);o++);o===n&&t.push(s)}}return t},y.difference=function(e){var t=L(arguments,!0,!0,1);return y.filter(e,function(e){return!y.contains(t,e)})},y.zip=function(){return y.unzip(arguments)},y.unzip=function(e){for(var t=e&&y.max(e,N).length||0,n=Array(t),r=0;t>r;r++)n[r]=y.pluck(e,r);return n},y.object=function(e,t){for(var n={},r=0,i=N(e);i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},y.findIndex=t(1),y.findLastIndex=t(-1),y.sortedIndex=function(e,t,n,r){n=w(n,r,1);for(var i=n(t),s=0,o=N(e);o>s;){var u=Math.floor((s+o)/2);n(e[u])<i?s=u+1:o=u}return s},y.indexOf=n(1,y.findIndex,y.sortedIndex),y.lastIndexOf=n(-1,y.findLastIndex),y.range=function(e,t,n){null==t&&(t=e||0,e=0),n=n||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),s=0;r>s;s++,e+=n)i[s]=e;return i};var A=function(e,t,n,r,i){if(r instanceof t){var s=S(e.prototype),o=e.apply(s,i);return y.isObject(o)?o:s}return e.apply(n,i)};y.bind=function(e,t){if(v&&e.bind===v)return v.apply(e,l.call(arguments,1));if(!y.isFunction(e))throw new TypeError("Bind must be called on a function");var n=l.call(arguments,2),r=function(){return A(e,r,t,this,n.concat(l.call(arguments)))};return r},y.partial=function(e){var t=l.call(arguments,1),n=function(){for(var r=0,i=t.length,s=Array(i),o=0;i>o;o++)s[o]=t[o]===y?arguments[r++]:t[o];for(;r<arguments.length;)s.push(arguments[r++]);return A(e,n,this,this,s)};return n},y.bindAll=function(e){var t,n,r=arguments.length;if(1>=r)throw new Error("bindAll must be passed function names");for(t=1;r>t;t++)n=arguments[t],e[n]=y.bind(e[n],e);return e},y.memoize=function(e,t){var n=function(r){var i=n.cache,s=""+(t?t.apply(this,arguments):r);return y.has(i,s)||(i[s]=e.apply(this,arguments)),i[s]};return n.cache={},n},y.delay=function(e,t){var n=l.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},y.defer=y.partial(y.delay,y,1),y.throttle=function(e,t,n){var r,i,s,o=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:y.now(),o=null,s=e.apply(r,i),o||(r=i=null)};return function(){var f=y.now();u||n.leading!==!1||(u=f);var l=t-(f-u);return r=this,i=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),u=f,s=e.apply(r,i),o||(r=i=null)):o||n.trailing===!1||(o=setTimeout(a,l)),s}},y.debounce=function(e,t,n){var r,i,s,o,u,a=function(){var f=y.now()-o;t>f&&f>=0?r=setTimeout(a,t-f):(r=null,n||(u=e.apply(s,i),r||(s=i=null)))};return function(){s=this,i=arguments,o=y.now();var f=n&&!r;return r||(r=setTimeout(a,t)),f&&(u=e.apply(s,i),s=i=null),u}},y.wrap=function(e,t){return y.partial(t,e)},y.negate=function(e){return function(){return!e.apply(this,arguments)}},y.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},y.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},y.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}},y.once=y.partial(y.before,2);var O=!{toString:null}.propertyIsEnumerable("toString"),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];y.keys=function(e){if(!y.isObject(e))return[];if(d)return d(e);var t=[];for(var n in e)y.has(e,n)&&t.push(n);return O&&r(e,t),t},y.allKeys=function(e){if(!y.isObject(e))return[];var t=[];for(var n in e)t.push(n);return O&&r(e,t),t},y.values=function(e){for(var t=y.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=e[t[i]];return r},y.mapObject=function(e,t,n){t=w(t,n);for(var r,i=y.keys(e),s=i.length,o={},u=0;s>u;u++)r=i[u],o[r]=t(e[r],r,e);return o},y.pairs=function(e){for(var t=y.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=[t[i],e[t[i]]];return r},y.invert=function(e){for(var t={},n=y.keys(e),r=0,i=n.length;i>r;r++)t[e[n[r]]]=n[r];return t},y.functions=y.methods=function(e){var t=[];for(var n in e)y.isFunction(e[n])&&t.push(n);return t.sort()},y.extend=E(y.allKeys),y.extendOwn=y.assign=E(y.keys),y.findKey=function(e,t,n){t=w(t,n);for(var r,i=y.keys(e),s=0,o=i.length;o>s;s++)if(r=i[s],t(e[r],r,e))return r},y.pick=function(e,t,n){var r,i,s={},o=e;if(null==o)return s;y.isFunction(t)?(i=y.allKeys(o),r=b(t,n)):(i=L(arguments,!1,!1,1),r=function(e,t,n){return t in n},o=Object(o));for(var u=0,a=i.length;a>u;u++){var f=i[u],l=o[f];r(l,f,o)&&(s[f]=l)}return s},y.omit=function(e,t,n){if(y.isFunction(t))t=y.negate(t);else{var r=y.map(L(arguments,!1,!1,1),String);t=function(e,t){return!y.contains(r,t)}}return y.pick(e,t,n)},y.defaults=E(y.allKeys,!0),y.create=function(e,t){var n=S(e);return t&&y.extendOwn(n,t),n},y.clone=function(e){return y.isObject(e)?y.isArray(e)?e.slice():y.extend({},e):e},y.tap=function(e,t){return t(e),e},y.isMatch=function(e,t){var n=y.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),s=0;r>s;s++){var o=n[s];if(t[o]!==i[o]||!(o in i))return!1}return!0};var _=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof y&&(e=e._wrapped),t instanceof y&&(t=t._wrapped);var i=c.call(e);if(i!==c.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}var s="[object Array]"===i;if(!s){if("object"!=typeof e||"object"!=typeof t)return!1;var o=e.constructor,u=t.constructor;if(o!==u&&!(y.isFunction(o)&&o instanceof o&&y.isFunction(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var a=n.length;a--;)if(n[a]===e)return r[a]===t;if(n.push(e),r.push(t),s){if(a=e.length,a!==t.length)return!1;for(;a--;)if(!_(e[a],t[a],n,r))return!1}else{var f,l=y.keys(e);if(a=l.length,y.keys(t).length!==a)return!1;for(;a--;)if(f=l[a],!y.has(t,f)||!_(e[f],t[f],n,r))return!1}return n.pop(),r.pop(),!0};y.isEqual=function(e,t){return _(e,t)},y.isEmpty=function(e){return null==e?!0:C(e)&&(y.isArray(e)||y.isString(e)||y.isArguments(e))?0===e.length:0===y.keys(e).length},y.isElement=function(e){return!!e&&1===e.nodeType},y.isArray=p||function(e){return"[object Array]"===c.call(e)},y.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},y.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){y["is"+e]=function(t){return c.call(t)==="[object "+e+"]"}}),y.isArguments(arguments)||(y.isArguments=function(e){return y.has(e,"callee")}),"function"!=typeof /./&&"object"!=typeof Int8Array&&(y.isFunction=function(e){return"function"==typeof e||!1}),y.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},y.isNaN=function(e){return y.isNumber(e)&&e!==+e},y.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===c.call(e)},y.isNull=function(e){return null===e},y.isUndefined=function(e){return e===void 0},y.has=function(e,t){return null!=e&&h.call(e,t)},y.noConflict=function(){return i._=s,this},y.identity=function(e){return e},y.constant=function(e){return function(){return e}},y.noop=function(){},y.property=x,y.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},y.matcher=y.matches=function(e){return e=y.extendOwn({},e),function(t){return y.isMatch(t,e)}},y.times=function(e,t,n){var r=Array(Math.max(0,e));t=b(t,n,1);for(var i=0;e>i;i++)r[i]=t(i);return r},y.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},y.now=Date.now||function(){return(new Date).getTime()};var D={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},P=y.invert(D),H=function(e){var t=function(t){return e[t]},n="(?:"+y.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};y.escape=H(D),y.unescape=H(P),y.result=function(e,t,n){var r=null==e?void 0:e[t];return r===void 0&&(r=n),y.isFunction(r)?r.call(e):r};var B=0;y.uniqueId=function(e){var t=++B+"";return e?e+t:t},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var j=/(.)^/,F={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},I=/\\|'|\r|\n|\u2028|\u2029/g,q=function(e){return"\\"+F[e]};y.template=function(e,t,n){!t&&n&&(t=n),t=y.defaults({},t,y.templateSettings);var r=RegExp([(t.escape||j).source,(t.interpolate||j).source,(t.evaluate||j).source].join("|")+"|$","g"),i=0,s="__p+='";e.replace(r,function(t,n,r,o,u){return s+=e.slice(i,u).replace(I,q),i=u+t.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?s+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(s+="';\n"+o+"\n__p+='"),t}),s+="';\n",t.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(t.variable||"obj","_",s)}catch(u){throw u.source=s,u}var a=function(e){return o.call(this,e,y)},f=t.variable||"obj";return a.source="function("+f+"){\n"+s+"}",a},y.chain=function(e){var t=y(e);return t._chain=!0,t};var R=function(e,t){return e._chain?y(t).chain():t};y.mixin=function(e){y.each(y.functions(e),function(t){var n=y[t]=e[t];y.prototype[t]=function(){var e=[this._wrapped];return f.apply(e,arguments),R(this,n.apply(y,e))}})},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=o[e];y.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],R(this,n)}}),y.each(["concat","join","slice"],function(e){var t=o[e];y.prototype[e]=function(){return R(this,t.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return y})}.call(this),function(e,t){if(typeof define=="function"&&define.amd)define("backbone",["underscore","jquery","exports"],function(n,r,i){e.Backbone=t(e,i,n,r)});else if(typeof exports!="undefined"){var n=require("underscore");t(e,exports,n)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,t,n,r){var i=e.Backbone,s=[],o=s.push,u=s.slice,a=s.splice;t.VERSION="1.1.2",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var f=t.Events={on:function(e,t,n){if(!c(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var r=this._events[e]||(this._events[e]=[]);return r.push({callback:t,context:n,ctx:n||this}),this},once:function(e,t,r){if(!c(this,"once",e,[t,r])||!t)return this;var i=this,s=n.once(function(){i.off(e,s),t.apply(this,arguments)});return s._callback=t,this.on(e,s,r)},off:function(e,t,r){var i,s,o,u,a,f,l,h;if(!this._events||!c(this,"off",e,[t,r]))return this;if(!e&&!t&&!r)return this._events=void 0,this;u=e?[e]:n.keys(this._events);for(a=0,f=u.length;a<f;a++){e=u[a];if(o=this._events[e]){this._events[e]=i=[];if(t||r)for(l=0,h=o.length;l<h;l++)s=o[l],(t&&t!==s.callback&&t!==s.callback._callback||r&&r!==s.context)&&i.push(s);i.length||delete this._events[e]}}return this},trigger:function(e){if(!this._events)return this;var t=u.call(arguments,1);if(!c(this,"trigger",e,t))return this;var n=this._events[e],r=this._events.all;return n&&h(n,t),r&&h(r,arguments),this},stopListening:function(e,t,r){var i=this._listeningTo;if(!i)return this;var s=!t&&!r;!r&&typeof t=="object"&&(r=this),e&&((i={})[e._listenId]=e);for(var o in i)e=i[o],e.off(t,r,this),(s||n.isEmpty(e._events))&&delete this._listeningTo[o];return this}},l=/\s+/,c=function(e,t,n,r){if(!n)return!0;if(typeof n=="object"){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(l.test(n)){var s=n.split(l);for(var o=0,u=s.length;o<u;o++)e[t].apply(e,[s[o]].concat(r));return!1}return!0},h=function(e,t){var n,r=-1,i=e.length,s=t[0],o=t[1],u=t[2];switch(t.length){case 0:while(++r<i)(n=e[r]).callback.call(n.ctx);return;case 1:while(++r<i)(n=e[r]).callback.call(n.ctx,s);return;case 2:while(++r<i)(n=e[r]).callback.call(n.ctx,s,o);return;case 3:while(++r<i)(n=e[r]).callback.call(n.ctx,s,o,u);return;default:while(++r<i)(n=e[r]).callback.apply(n.ctx,t);return}},p={listenTo:"on",listenToOnce:"once"};n.each(p,function(e,t){f[t]=function(t,r,i){var s=this._listeningTo||(this._listeningTo={}),o=t._listenId||(t._listenId=n.uniqueId("l"));return s[o]=t,!i&&typeof r=="object"&&(i=this),t[e](r,i,this),this}}),f.bind=f.on,f.unbind=f.off,n.extend(t,f);var d=t.Model=function(e,t){var r=e||{};t||(t={}),this.cid=n.uniqueId("c"),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{}),r=n.defaults({},r,n.result(this,"defaults")),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(d.prototype,f,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return this.get(e)!=null},set:function(e,t,r){var i,s,o,u,a,f,l,c;if(e==null)return this;typeof e=="object"?(s=e,r=t):(s={})[e]=t,r||(r={});if(!this._validate(s,r))return!1;o=r.unset,a=r.silent,u=[],f=this._changing,this._changing=!0,f||(this._previousAttributes=n.clone(this.attributes),this.changed={}),c=this.attributes,l=this._previousAttributes,this.idAttribute in s&&(this.id=s[this.idAttribute]);for(i in s)t=s[i],n.isEqual(c[i],t)||u.push(i),n.isEqual(l[i],t)?delete this.changed[i]:this.changed[i]=t,o?delete c[i]:c[i]=t;if(!a){u.length&&(this._pending=r);for(var h=0,p=u.length;h<p;h++)this.trigger("change:"+u[h],this,c[u[h]],r)}if(f)return this;if(!a)while(this._pending)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return e==null?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?n.clone(this.changed):!1;var t,r=!1,i=this._changing?this._previousAttributes:this.attributes;for(var s in e){if(n.isEqual(i[s],t=e[s]))continue;(r||(r={}))[s]=t}return r},previous:function(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=e?n.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=this,r=e.success;return e.success=function(n){if(!t.set(t.parse(n,e),e))return!1;r&&r(t,n,e),t.trigger("sync",t,n,e)},I(this,e),this.sync("read",this,e)},save:function(e,t,r){var i,s,o,u=this.attributes;e==null||typeof e=="object"?(i=e,r=t):(i={})[e]=t,r=n.extend({validate:!0},r);if(i&&!r.wait){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;i&&r.wait&&(this.attributes=n.extend({},u,i)),r.parse===void 0&&(r.parse=!0);var a=this,f=r.success;return r.success=function(e){a.attributes=u;var t=a.parse(e,r);r.wait&&(t=n.extend(i||{},t));if(n.isObject(t)&&!a.set(t,r))return!1;f&&f(a,e,r),a.trigger("sync",a,e,r)},I(this,r),s=this.isNew()?"create":r.patch?"patch":"update",s==="patch"&&(r.attrs=i),o=this.sync(s,this,r),i&&r.wait&&(this.attributes=u),o},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(n){(e.wait||t.isNew())&&i(),r&&r(t,n,e),t.isNew()||t.trigger("sync",t,n,e)};if(this.isNew())return e.success(),!1;I(this,e);var s=this.sync("delete",this,e);return e.wait||i(),s},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||F();return this.isNew()?e:e.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return r?(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1):!0}});var v=["keys","values","pairs","invert","pick","omit"];n.each(v,function(e){d.prototype[e]=function(){var t=u.call(arguments);return t.unshift(this.attributes),n[e].apply(n,t)}});var m=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),t.comparator!==void 0&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},g={add:!0,remove:!0,merge:!0},y={add:!0,remove:!1};n.extend(m.prototype,f,{model:d,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,y))},remove:function(e,t){var r=!n.isArray(e);e=r?[e]:n.clone(e),t||(t={});var i,s,o,u;for(i=0,s=e.length;i<s;i++){u=e[i]=this.get(e[i]);if(!u)continue;delete this._byId[u.id],delete this._byId[u.cid],o=this.indexOf(u),this.models.splice(o,1),this.length--,t.silent||(t.index=o,u.trigger("remove",u,this,t)),this._removeReference(u,t)}return r?e[0]:e},set:function(e,t){t=n.defaults({},t,g),t.parse&&(e=this.parse(e,t));var r=!n.isArray(e);e=r?e?[e]:[]:n.clone(e);var i,s,o,u,a,f,l,c=t.at,h=this.model,p=this.comparator&&c==null&&t.sort!==!1,v=n.isString(this.comparator)?this.comparator:null,m=[],y=[],b={},w=t.add,E=t.merge,S=t.remove,x=!p&&w&&S?[]:!1;for(i=0,s=e.length;i<s;i++){a=e[i]||{},a instanceof d?o=u=a:o=a[h.prototype.idAttribute||"id"];if(f=this.get(o))S&&(b[f.cid]=!0),E&&(a=a===u?u.attributes:a,t.parse&&(a=f.parse(a,t)),f.set(a,t),p&&!l&&f.hasChanged(v)&&(l=!0)),e[i]=f;else if(w){u=e[i]=this._prepareModel(a,t);if(!u)continue;m.push(u),this._addReference(u,t)}u=f||u,x&&(u.isNew()||!b[u.id])&&x.push(u),b[u.id]=!0}if(S){for(i=0,s=this.length;i<s;++i)b[(u=this.models[i]).cid]||y.push(u);y.length&&this.remove(y,t)}if(m.length||x&&x.length){p&&(l=!0),this.length+=m.length;if(c!=null)for(i=0,s=m.length;i<s;i++)this.models.splice(c+i,0,m[i]);else{x&&(this.models.length=0);var T=x||m;for(i=0,s=T.length;i<s;i++)this.models.push(T[i])}}l&&this.sort({silent:!0});if(!t.silent){for(i=0,s=m.length;i<s;i++)(u=m[i]).trigger("add",u,this,t);(l||x&&x.length)&&this.trigger("sort",this,t)}return r?e[0]:e},reset:function(e,t){t||(t={});for(var r=0,i=this.models.length;r<i;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(){return u.apply(this.models,arguments)},get:function(e){return e==null?void 0:this._byId[e]||this._byId[e.id]||this._byId[e.cid]},at:function(e){return this.models[e]},where:function(e,t){return n.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),n.isString(this.comparator)||this.comparator.length===1?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return n.invoke(this.models,"get",e)},fetch:function(e){e=e?n.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=e.success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t(r,n,e),r.trigger("sync",r,n,e)},I(this,e),this.sync("read",this,e)},create:function(e,t){t=t?n.clone(t):{};if(!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var r=this,i=t.success;return t.success=function(e,n){t.wait&&r.add(e,t),i&&i(e,n,t)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof d)return e;t=t?n.clone(t):{},t.collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_addReference:function(e,t){this._byId[e.cid]=e,e.id!=null&&(this._byId[e.id]=e),e.collection||(e.collection=this),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if((e==="add"||e==="remove")&&n!==this)return;e==="destroy"&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],t.id!=null&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments)}});var b=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];n.each(b,function(e){m.prototype[e]=function(){var t=u.call(arguments);return t.unshift(this.models),n[e].apply(n,t)}});var w=["groupBy","countBy","sortBy","indexBy"];n.each(w,function(e){m.prototype[e]=function(t,r){var i=n.isFunction(t)?t:function(e){return e.get(t)};return n[e](this.models,i,r)}});var E=t.View=function(e){this.cid=n.uniqueId("view"),e||(e={}),n.extend(this,n.pick(e,x)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},S=/^(\S+)\s*(.*)$/,x=["model","collection","el","id","attributes","className","tagName","events"];n.extend(E.prototype,f,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,n){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],n!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=n.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var r=e[t];n.isFunction(r)||(r=this[e[t]]);if(!r)continue;var i=t.match(S),s=i[1],o=i[2];r=n.bind(r,this),s+=".delegateEvents"+this.cid,o===""?this.$el.on(s,r):this.$el.on(s,o,r)}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(!this.el){var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e["class"]=n.result(this,"className"));var r=t.$("<"+n.result(this,"tagName")+">").attr(e);this.setElement(r,!1)}else this.setElement(n.result(this,"el"),!1)}}),t.sync=function(e,r,i){var s=N[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var o={type:s,dataType:"json"};i.url||(o.url=n.result(r,"url")||F()),i.data==null&&r&&(e==="create"||e==="update"||e==="patch")&&(o.contentType="application/json",o.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{});if(i.emulateHTTP&&(s==="PUT"||s==="DELETE"||s==="PATCH")){o.type="POST",i.emulateJSON&&(o.data._method=s);var u=i.beforeSend;i.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",s);if(u)return u.apply(this,arguments)}}o.type!=="GET"&&!i.emulateJSON&&(o.processData=!1),o.type==="PATCH"&&T&&(o.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var a=i.xhr=t.ajax(n.extend(o,i));return r.trigger("request",r,a,i),a};var T=typeof window!="undefined"&&!!window.ActiveXObject&&(!window.XMLHttpRequest||!(new XMLHttpRequest).dispatchEvent),N={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var C=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},k=/\((.*?)\)/g,L=/(\(\?)?:\w+/g,A=/\*\w+/g,O=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(C.prototype,f,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var s=this;return t.history.route(e,function(n){var o=s._extractParameters(e,n);s.execute(i,o),s.trigger.apply(s,["route:"+r].concat(o)),s.trigger("route",r,o),t.history.trigger("route",s,r,o)}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(!this.routes)return;this.routes=n.result(this,"routes");var e,t=n.keys(this.routes);while((e=t.pop())!=null)this.route(e,this.routes[e])},_routeToRegExp:function(e){return e=e.replace(O,"\\$&").replace(k,"(?:$1)?").replace(L,function(e,t){return t?e:"([^/?]+)"}).replace(A,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null})}});var M=t.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),typeof window!="undefined"&&(this.location=window.location,this.history=window.history)},_=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,P=/msie [\w.]+/,H=/\/$/,B=/#.*$/;M.started=!1,n.extend(M.prototype,f,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(e==null)if(this._hasPushState||!this._wantsHashChange||t){e=decodeURI(this.location.pathname+this.location.search);var n=this.root.replace(H,"");e.indexOf(n)||(e=e.slice(n.length))}else e=this.getHash();return e.replace(_,"")},start:function(e){if(M.started)throw new Error("Backbone.history has already been started");M.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment(),i=document.documentMode,s=P.exec(navigator.userAgent.toLowerCase())&&(!i||i<=7);this.root=("/"+this.root+"/").replace(D,"/");if(s&&this._wantsHashChange){var o=t.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=o.hide().appendTo("body")[0].contentWindow,this.navigate(r)}this._hasPushState?t.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!s?t.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=r;var u=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+"#"+this.fragment),!0;this._hasPushState&&this.atRoot()&&u.hash&&(this.fragment=this.getHash().replace(_,""),this.history.replaceState({},document.title,this.root+this.fragment))}if(!this.options.silent)return this.loadUrl()},stop:function(){t.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),M.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe)));if(t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return e=this.fragment=this.getFragment(e),n.any(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0})},navigate:function(e,t){if(!M.started)return!1;if(!t||t===!0)t={trigger:!!t};var n=this.root+(e=this.getFragment(e||""));e=e.replace(B,"");if(this.fragment===e)return;this.fragment=e,e===""&&n!=="/"&&(n=n.slice(0,-1));if(this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}if(t.trigger)return this.loadUrl(e)},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new M;var j=function(e,t){var r=this,i;e&&n.has(e,"constructor")?i=e.constructor:i=function(){return r.apply(this,arguments)},n.extend(i,r,t);var s=function(){this.constructor=i};return s.prototype=r.prototype,i.prototype=new s,e&&n.extend(i.prototype,e),i.__super__=r.prototype,i};d.extend=m.extend=C.extend=E.extend=M.extend=j;var F=function(){throw new Error('A "url" property or function must be specified')},I=function(e,t){var n=t.error;t.error=function(r){n&&n(e,r,t),e.trigger("error",e,r,t)}};return t}),!function(e,t,n){function r(e){var t=S(),n=t.querySelector("h2"),r=t.querySelector("p"),i=t.querySelector("button.cancel"),s=t.querySelector("button.confirm");if(n.innerHTML=e.html?e.title:L(e.title).split("\n").join("<br>"),r.innerHTML=e.html?e.text:L(e.text||"").split("\n").join("<br>"),e.text&&O(r),e.customClass)C(t,e.customClass),t.setAttribute("data-custom-class",e.customClass);else{var o=t.getAttribute("data-custom-class");k(t,o),t.setAttribute("data-custom-class","")}if(_(t.querySelectorAll(".sa-icon")),e.type&&!c()){for(var a=!1,f=0;f<w.length;f++)if(e.type===w[f]){a=!0;break}if(!a)return h("Unknown alert type: "+e.type),!1;var l,p=["success","error","warning","info"];-1!==p.indexOf(e.type)&&(l=t.querySelector(".sa-icon.sa-"+e.type),O(l));var d=x();switch(e.type){case"success":C(l,"animate"),C(l.querySelector(".sa-tip"),"animateSuccessTip"),C(l.querySelector(".sa-long"),"animateSuccessLong");break;case"error":C(l,"animateErrorIcon"),C(l.querySelector(".sa-x-mark"),"animateXMark");break;case"warning":C(l,"pulseWarning"),C(l.querySelector(".sa-body"),"pulseWarningIns"),C(l.querySelector(".sa-dot"),"pulseWarningIns");break;case"input":case"prompt":d.setAttribute("type",e.inputType),C(t,"show-input"),setTimeout(function(){d.focus(),d.addEventListener("keyup",g.resetInputError)},400)}}if(e.imageUrl){var v=t.querySelector(".sa-icon.sa-custom");v.style.backgroundImage="url("+e.imageUrl+")",O(v);var m=80,y=80;if(e.imageSize){var b=e.imageSize.toString().split("x"),E=b[0],T=b[1];E&&T?(m=E,y=T):h("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+e.imageSize)}v.setAttribute("style",v.getAttribute("style")+"width:"+m+"px; height:"+y+"px")}t.setAttribute("data-has-cancel-button",e.showCancelButton),e.showCancelButton?i.style.display="inline-block":_(i),t.setAttribute("data-has-confirm-button",e.showConfirmButton),e.showConfirmButton?s.style.display="inline-block":_(s),e.cancelButtonText&&(i.innerHTML=L(e.cancelButtonText)),e.confirmButtonText&&(s.innerHTML=L(e.confirmButtonText)),e.confirmButtonColor&&(s.style.backgroundColor=e.confirmButtonColor,u(s,e.confirmButtonColor)),t.setAttribute("data-allow-ouside-click",e.allowOutsideClick);var N=e.doneFunction?!0:!1;t.setAttribute("data-has-done-function",N),e.animation?"string"==typeof e.animation?t.setAttribute("data-animation",e.animation):t.setAttribute("data-animation","pop"):t.setAttribute("data-animation","none"),t.setAttribute("data-timer",e.timer)}function i(e,t){e=String(e).replace(/[^0-9a-f]/gi,""),e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;var n,r,i="#";for(r=0;3>r;r++)n=parseInt(e.substr(2*r,2),16),n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16),i+=("00"+n).substr(n.length);return i}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function o(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16):null}function u(e,t){var n=o(t);e.style.boxShadow="0 0 2px rgba("+n+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"}function a(){var e=S();H(T(),10),O(e),C(e,"showSweetAlert"),k(e,"hideSweetAlert"),p=t.activeElement;var n=e.querySelector("button.confirm");n.focus(),setTimeout(function(){C(e,"visible")},500);var r=e.getAttribute("data-timer");"null"!==r&&""!==r&&(e.timeout=setTimeout(function(){m.close()},r))}function f(){var e=S(),t=x();k(e,"show-input"),t.value="",t.setAttribute("type",E.inputType),g.resetInputError()}function l(){var e=S();e.style.marginTop=P(S())}function c(){return e.attachEvent&&!e.addEventListener?!0:!1}function h(t){e.console&&e.console.log("SweetAlert: "+t)}var p,d,v,m,g,y=".sweet-alert",b=".sweet-overlay",w=["error","warning","info","success","input","prompt"],E={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#AEDEF4",cancelButtonText:"Cancel",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text"},S=function(){var e=t.querySelector(y);return e||(I(),e=S()),e},x=function(){var e=S();return e?e.querySelector("input"):void 0},T=function(){return t.querySelector(b)},N=function(e,t){return(new RegExp(" "+t+" ")).test(" "+e.className+" ")},C=function(e,t){N(e,t)||(e.className+=" "+t)},k=function(e,t){var n=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(N(e,t)){for(;n.indexOf(" "+t+" ")>=0;)n=n.replace(" "+t+" "," ");e.className=n.replace(/^\s+|\s+$/g,"")}},L=function(e){var n=t.createElement("div");return n.appendChild(t.createTextNode(e)),n.innerHTML},A=function(e){e.style.opacity="",e.style.display="block"},O=function(e){if(e&&!e.length)return A(e);for(var t=0;t<e.length;++t)A(e[t])},M=function(e){e.style.opacity="",e.style.display="none"},_=function(e){if(e&&!e.length)return M(e);for(var t=0;t<e.length;++t)M(e[t])},D=function(e,t){for(var n=t.parentNode;null!==n;){if(n===e)return!0;n=n.parentNode}return!1},P=function(e){e.style.left="-9999px",e.style.display="block";var t,n=e.clientHeight;return t="undefined"!=typeof getComputedStyle?parseInt(getComputedStyle(e).getPropertyValue("padding-top"),10):parseInt(e.currentStyle.padding),e.style.left="",e.style.display="none","-"+parseInt((n+t)/2)+"px"},H=function(e,t){if(+e.style.opacity<1){t=t||16,e.style.opacity=0,e.style.display="block";var n=+(new Date),r=function(){e.style.opacity=+e.style.opacity+(new Date-n)/100,n=+(new Date),+e.style.opacity<1&&setTimeout(r,t)};r()}e.style.display="block"},B=function(e,t){t=t||16,e.style.opacity=1;var n=+(new Date),r=function(){e.style.opacity=+e.style.opacity-(new Date-n)/100,n=+(new Date),+e.style.opacity>0?setTimeout(r,t):e.style.display="none"};r()},j=function(n){if("function"==typeof MouseEvent){var r=new MouseEvent("click",{view:e,bubbles:!1,cancelable:!0});n.dispatchEvent(r)}else if(t.createEvent){var i=t.createEvent("MouseEvents");i.initEvent("click",!1,!1),n.dispatchEvent(i)}else t.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},F=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):e.event&&e.event.hasOwnProperty("cancelBubble")&&(e.event.cancelBubble=!0)},I=function(){var e='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert"><div class="sa-icon sa-error"><span class="sa-x-mark"><span class="sa-line sa-left"></span><span class="sa-line sa-right"></span></span></div><div class="sa-icon sa-warning"> <span class="sa-body"></span> <span class="sa-dot"></span> </div> <div class="sa-icon sa-info"></div> <div class="sa-icon sa-success"> <span class="sa-line sa-tip"></span> <span class="sa-line sa-long"></span> <div class="sa-placeholder"></div> <div class="sa-fix"></div> </div> <div class="sa-icon sa-custom"></div> <h2>Title</h2><p>Text</p><fieldset><input type="text" tabIndex="3" /><div class="sa-input-error"></div></fieldset> <div class="sa-error-container"><div class="icon">!</div> <p>Not valid!</p></div> <button class="cancel" tabIndex="2">Cancel</button><button class="confirm" tabIndex="1">OK</button></div>',n=t.createElement("div");for(n.innerHTML=e;n.firstChild;)t.body.appendChild(n.firstChild)};m=g=function(){function o(e){var t=y;return"undefined"!=typeof t[e]?t[e]:E[e]}function c(){var e=!0;N(A,"show-input")&&(e=A.querySelector("input").value,e||(e="")),b.doneFunction(e),b.closeOnConfirm&&m.close()}function p(){var e=String(b.doneFunction).replace(/\s/g,""),t="function("===e.substring(0,9)&&")"!==e.substring(9,10);t&&b.doneFunction(!1),b.closeOnCancel&&m.close()}function g(t){var r=t||e.event,i=r.keyCode||r.which;if(-1!==[9,13,32,27].indexOf(i)){for(var s=r.target||r.srcElement,o=-1,a=0;a<B.length;a++)if(s===B[a]){o=a;break}9===i?(s=-1===o?P:o===B.length-1?B[0]:B[o+1],F(r),s.focus(),b.confirmButtonColor&&u(s,b.confirmButtonColor)):13===i?("INPUT"===s.tagName&&(s=P,P.focus()),s=-1===o?P:n):27===i&&b.allowEscapeKey===!0?(s=H,j(s,r)):s=n}}var y=arguments[0];if(C(t.body,"stop-scrolling"),f(),arguments[0]===n)return h("SweetAlert expects at least 1 attribute!"),!1;var b=s({},E);switch(typeof arguments[0]){case"string":b.title=arguments[0],b.text=arguments[1]||"",b.type=arguments[2]||"";break;case"object":if(arguments[0].title===n)return h('Missing "title" argument!'),!1;b.title=arguments[0].title;for(var w=["text","type","customClass","allowOutsideClick","showConfirmButton","showCancelButton","closeOnConfirm","closeOnCancel","timer","confirmButtonColor","cancelButtonText","imageUrl","imageSize","html","animation","allowEscapeKey","inputType"],x=w.length,k=0;x>k;k++){var L=w[k];b[L]=o(L)}b.confirmButtonText=b.showCancelButton?"Confirm":E.confirmButtonText,b.confirmButtonText=o("confirmButtonText"),b.doneFunction=arguments[1]||null;break;default:return h('Unexpected type of argument! Expected "string" or "object", got '+typeof arguments[0]),!1}r(b),l(),a();for(var A=S(),O=function(t){var n=t||e.event,r=n.target||n.srcElement,s=-1!==r.className.indexOf("confirm"),o=-1!==r.className.indexOf("sweet-overlay"),u=N(A,"visible"),a=b.doneFunction&&"true"===A.getAttribute("data-has-done-function");switch(n.type){case"mouseover":s&&b.confirmButtonColor&&(r.style.backgroundColor=i(b.confirmButtonColor,-0.04));break;case"mouseout":s&&b.confirmButtonColor&&(r.style.backgroundColor=b.confirmButtonColor);break;case"mousedown":s&&b.confirmButtonColor&&(r.style.backgroundColor=i(b.confirmButtonColor,-0.14));break;case"mouseup":s&&b.confirmButtonColor&&(r.style.backgroundColor=i(b.confirmButtonColor,-0.04));break;case"focus":var f=A.querySelector("button.confirm"),l=A.querySelector("button.cancel");s?l.style.boxShadow="none":f.style.boxShadow="none";break;case"click":s&&a&&u?c():a&&u||o?p():D(A,r)&&"BUTTON"===r.tagName&&m.close()}},M=A.querySelectorAll("button"),_=0;_<M.length;_++)M[_].onclick=O,M[_].onmouseover=O,M[_].onmouseout=O,M[_].onmousedown=O,M[_].onmouseup=O,M[_].onfocus=O;T().onclick=O;var P=A.querySelector("button.confirm"),H=A.querySelector("button.cancel"),B=A.querySelectorAll("button[tabindex]");d=e.onkeydown,e.onkeydown=g,e.onfocus=function(){e.setTimeout(function(){v!==n&&(v.focus(),v=n)},0)}},m.setDefaults=g.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");s(E,e)},m.close=g.close=function(){var r=S();B(T(),5),B(r,5),k(r,"showSweetAlert"),C(r,"hideSweetAlert"),k(r,"visible");var i=r.querySelector(".sa-icon.sa-success");k(i,"animate"),k(i.querySelector(".sa-tip"),"animateSuccessTip"),k(i.querySelector(".sa-long"),"animateSuccessLong");var s=r.querySelector(".sa-icon.sa-error");k(s,"animateErrorIcon"),k(s.querySelector(".sa-x-mark"),"animateXMark");var o=r.querySelector(".sa-icon.sa-warning");k(o,"pulseWarning"),k(o.querySelector(".sa-body"),"pulseWarningIns"),k(o.querySelector(".sa-dot"),"pulseWarningIns"),k(t.body,"stop-scrolling"),e.onkeydown=d,p&&p.focus(),v=n,clearTimeout(r.timeout)},m.showInputError=g.showInputError=function(e){var t=S(),n=t.querySelector(".sa-input-error");C(n,"show");var r=t.querySelector(".sa-error-container");C(r,"show"),r.querySelector("p").innerHTML=e,t.querySelector("input").focus()},m.resetInputError=g.resetInputError=function(e){if(e&&13===e.keyCode)return!1;var t=S(),n=t.querySelector(".sa-input-error");k(n,"show");var r=t.querySelector(".sa-error-container");k(r,"show")},"function"==typeof define&&define.amd?define("sweetalert",[],function(){return m}):"undefined"!=typeof module&&module.exports?module.exports=m:"undefined"!=typeof e&&(e.sweetAlert=e.swal=m)}(window,document),define("smashers",["sweetalert"],function(e){function n(){var e=0,t=["We sent <%= name %> an email for you ;)","Nice! Maybe you and <%= name %> will get married?","Senior week is only so long. Carpe diem!","I bet <%= name %> is as excited as you are.","Somebody get me a towel.","I'll be in my bunk.","Think how far you've come since freshman year. Show <%= name %> your skillz!"];return function(n){return e%=t.length,_.template(t[e++])({name:n})}}var t,r=n(),i=TastypieModel.extend({decisionUrl:"/api/v1/decision/",url:function(){return"/api/v1/smashers/"+this.id+"/"},defaults:{headshot:"static/smashers/avatar.png",has_headshot:!1,num_matches:0},parse:function(e){return e.major&&(e.major=e.major.split("(")[0]),e.headshot?e:_.omit(e,"headshot")},initialize:function(){},like:function(){this._decide(!0)},dislike:function(){this._decide(!1)},_decide:function(t){var n=this;$.ajax({type:"POST",url:this.decisionUrl,data:JSON.stringify({user_id:this.id,like:t}),contentType:"application/json"}).success(function(t){n.swingCard.destroy(),n.trigger("destroy",n);var i=n.get("name").split(" ")[0];if(t.match===!0){e({title:"Matched!",text:r(i),type:"success",timer:2300});var s=parseInt($("#num-matches").text());$("#num-matches").text(++s)}}).error(function(){e({title:"Error!",text:"Something went wrong! Beat it.",type:"error"})}).always(function(){})}}),s=TastypieCollection.extend({model:i,url:"/api/v1/smashers",getNextSwipeSet:function(e){var t=this;this.fetch({remove:!1}).success(function(){e&&e(t)}).error(function(){console.log(arguments)}).always(function(){})}});return{getSmashers:function(e,t){return new s(e,t)},getSmasher:function(e,t){return new i(e,t)},getMatches:function(e){$.getJSON("/api/v1/matches").success(function(t){(e||$.noop)(new s(t,{parse:!0}))})},setActiveUser:function(e){return t=new i(e,{parse:!0})},getActiveUser:function(){return t}}}),define("cardInterface",["smashers"],function(e){var t={throwOutConfidence:function(e,t){return Math.min((Math.abs(e)+150)/t.offsetWidth,1)},throwOutDistance:function(){return 1250},time:1e3},n=Backbone.View.extend({template:_.template($("#single-card").html()),className:"smash-card",tagName:"li",initialize:function(){this.listenTo(this.model,{remove:function(){var e=this;this.$el.fadeOut("fast",function(){e.remove()})},"change:headshot":function(e,t,n){}})},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.drawExistingFeedback(),this},drawExistingFeedback:function(){var e=this;this.model.get("status")===1?setTimeout(function(){e.updateLikeIcon(1),e.updateDislikeIcon(0),e.updateMatchIcon(0)},400):this.model.get("status")===2?setTimeout(function(){e.updateDislikeIcon(1),e.updateLikeIcon(0),e.updateMatchIcon(0)},400):this.model.get("status")===3?setTimeout(function(){e.updateMatchIcon(1),e.updateDislikeIcon(0),e.updateLikeIcon(0)},400):this._updateFeedBackIcon(0)},resetFeedbackIcons:function(){this.drawExistingFeedback()},_updateFeedBackIcon:function(e,t){var n=".feedback-icon";t&&(n=".icon-"+t),this.$(n).css("opacity",e)},updateDislikeIcon:function(e){return this._updateFeedBackIcon(e,"dislike"),this},updateLikeIcon:function(e){return this._updateFeedBackIcon(e,"like"),this},updateMatchIcon:function(e){return this._updateFeedBackIcon(e,"match"),this}}),r=Backbone.View.extend({el:"#card-interface",initialize:function(e){var n=this;this.stack=gajus.Swing.Stack(t),_.extend(this,{draggable:!0},e),this.collection.length>0&&this.$(".placeholder").hide(),this.collection.each(function(e){n.addCard(e)}),this.listenTo(this.collection,{add:function(e,t,n){this.addCard(e)},remove:function(){this.activeCard=this.collection.last(),this.activeCard||(this.collection.getNextSwipeSet(function(){n.$(".loader").hide()}),this.$(".loader").show(),this.$(".placeholder").show())}}),_.bindAll(this,"addCard"),this.bindStackListeners()},bindStackListeners:function(){var e=this;this.stack.on("throwout",function(t){var n=$(t.target).attr("model-id"),r=e.collection._byId[n];setTimeout(function(){r&&(t.throwDirection===gajus.Swing.Card.DIRECTION_LEFT?r.dislike():r.like())},300)})},addCard:function(e){var t=new n({model:e});this.$(".cards").append(t.render().el),t.$el.attr("model-id",e.cid),this.activeCard=e;if(this.draggable===!0){var r=this.stack.createCard(t.el);r.throwIn(-100,-100),r.on("dragstart",function(){t.$el.addClass("dragging")}),r.on("dragend",function(){t.$el.removeClass("dragging")}),r.on("dragmove",function(e){e.throwDirection==gajus.Swing.Card.DIRECTION_LEFT?(t.updateLikeIcon(0),t.updateDislikeIcon(e.throwOutConfidence)):(t.updateLikeIcon(e.throwOutConfidence),t.updateDislikeIcon(0))}),r.on("throwinend",function(){t.resetFeedbackIcons()}),e.swingCard=r}},events:{"click #like":function(){this.activeCard&&this.activeCard.swingCard.throwOut(20,111)},"click #dislike":function(){this.activeCard&&this.activeCard.swingCard.throwOut(-20,111)}}}),i=e.getSmashers(),s=new r({collection:i});return window.user.error||i.getNextSwipeSet(),{activeSet:function(){return i},getCardList:function(e,t){return new r(e,t)}}}),!function(e){e.fn.animatedModal=function(t){function n(){f.css({"z-index":s.zIndexOut}),s.afterClose()}function r(){s.afterOpen()}var i=e(this),s=e.extend({modalTarget:"animatedModal",position:"fixed",width:"100%",height:"100%",top:"0px",left:"0px",zIndexIn:"9999",zIndexOut:"-9999",color:"#39BEB9",opacityIn:"1",opacityOut:"0",animatedIn:"zoomIn",animatedOut:"zoomOut",animationDuration:".6s",overflow:"auto",beforeOpen:function(){},afterOpen:function(){},beforeClose:function(){},afterClose:function(){}},t),o=e(".close-"+s.modalTarget),u=e(i).attr("href"),f=e("body").find("#"+s.modalTarget),l="#"+f.attr("id");f.addClass("animated"),f.addClass(s.modalTarget+"-off");var c={position:s.position,width:s.width,height:s.height,top:s.top,left:s.left,"background-color":s.color,"overflow-y":s.overflow,"z-index":s.zIndexOut,opacity:s.opacityOut,"-webkit-animation-duration":s.animationDuration};f.css(c),i.click(function(t){t.preventDefault(),e("body, html").css({overflow:"hidden"}),u==l&&(f.hasClass(s.modalTarget+"-off")&&(f.removeClass(s.animatedOut),f.removeClass(s.modalTarget+"-off"),f.addClass(s.modalTarget+"-on")),f.hasClass(s.modalTarget+"-on")&&(s.beforeOpen(),f.css({opacity:s.opacityIn,"z-index":s.zIndexIn}),f.addClass(s.animatedIn),f.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",r)))}),o.click(function(t){t.preventDefault(),e("body, html").css({overflow:"auto"}),s.beforeClose(),f.hasClass(s.modalTarget+"-on")&&(f.removeClass(s.modalTarget+"-on"),f.addClass(s.modalTarget+"-off")),f.hasClass(s.modalTarget+"-off")&&(f.removeClass(s.animatedIn),f.addClass(s.animatedOut),f.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",n))})}}(jQuery),define("animatedModal",function(){}),define("coreUI",["smashers","cardInterface","sweetalert","animatedModal"],function(e,t,n){function r(e){var t=null;if(document.cookie&&document.cookie!=""){var n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=jQuery.trim(n[r]);if(i.substring(0,e.length+1)==e+"="){t=decodeURIComponent(i.substring(e.length+1));break}}}return t}function d(){o.click(function(){e.getMatches(function(e){p!=null&&(p.stopListening(),p.$(".cards").empty()),p=t.getCardList({collection:e,el:"#match-list",draggable:!1},{add:!0})})}).animatedModal({afterOpen:function(){l.show().addClass("animated bounceInLeft")},afterClose:function(){l.hide().removeClass("animated bounceOutRight")},beforeClose:function(){l.removeClass("bounceInLeft").addClass("animated bounceOutRight")}}),f.click(function(){h===!1?(s.add(".twitter-typeahead").fadeIn("fast"),f.removeClass("icon-search3").addClass("active-searchbar icon-cross"),h=!0):(s.add(".twitter-typeahead").fadeOut("fast"),f.removeClass("active-searchbar icon-cross").addClass("icon-search3"),h=!1)}),u.animatedModal({modalTarget:"updateProfileModal"}),a.animatedModal({modalTarget:"updateProfileModal",beforeOpen:function(){var t=(new i({model:e.getActiveUser()})).render().delegateEvents();$("#updateProfileModal .modal-content").html(t.el)}})}var i=Backbone.View.extend({template:_.template($("#user-profile").html()),render:function(){return this.$el.html(this.template(this.model.toJSON())),this},events:{"change #file-select":function(e){var t=this,n=new FileReader;this.$(".js-upload").text("Click to finalize your picture!").show().removeClass("animated bounce").addClass("animated bounce"),n.onload=function(){var e=document.getElementById("output");e.src=n.result},e.target.files[0]&&n.readAsDataURL(e.target.files[0])},"click .js-upload":function(t){var i=$(t.currentTarget),s=document.getElementById("file-select").files,o=s[0],u=this;if(!o){i.show().text("Select a file first!");return}var a=new FormData;i.text("Uploading...");if(!o.type.match("image.*"))return;a.append("headshot",o);var f=new XMLHttpRequest;f.open("PUT","/api/v1/user/"+e.getActiveUser().id+"/",!0),f.setRequestHeader("X-CSRFToken",r("csrftoken")),f.onload=function(){if(f.status===200){var e=JSON.parse(f.responseText);u.model.set("headshot",e.headshot),n({type:"success",title:"Picture uploaded!",text:"Nice work. Get ready for the matches to pour in.",timer:4e3}),i.html("Upload")}else alert("An error occurred!")},f.send(a)},"click .js-deactivate-account":function(){n({title:"Are you sure?",text:"You will not be able to recover it!",type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"Yes, delete it",cancelButtonText:"No, cancel plz",closeOnConfirm:!1,closeOnCancel:!1},function(t){t?$.ajax({url:"/api/v1/user/"+e.getActiveUser().id+"/",type:"DELETE"}).success(function(){n("Deleted!","Your account has been deleted.","success")}).error(function(){n("Oh no!","Something went wrong deleting your account :(","error")}):n("Cancelled","Your account is safe :)","error")})},"click .js-logout":function(){$.get("/api/v1/user/logout/").success(function(e){n({type:"success",title:"Successfully logged out.",text:"Get out there and go smash!"}),setTimeout(function(){window.location.href="/"},1e3)})}}}),s=$("#smash-autocomplete"),o=$("#show-matches"),u=$("#js-add-picture"),a=$(".js-show-profile"),f=$(".js-show-searchbar"),l=$("#match-list"),c=$("#upload"),h=!1,p=null;return{init:d,setNumMatches:function(e){$("#num-matches").text(e)}}}),define("login",["sweetalert","cardInterface","smashers","coreUI","animatedModal"],function(e,t,n,r){var i=$(".login-wrap"),s=$("#open-registration");s.animatedModal({modalTarget:"registrationModal"}),i.find(".login-inputs input").keydown(function(e){var t=e.keyCode||e.which;t===13&&u()});var o=$("#login-submit"),u=function(){var i=$(".login-inputs").find("[name]"),s={},o=!1,u,a;i.each(function(){var e=$(this);u=e.attr("name"),a=e.val().toLowerCase().trim(),s[u]=a});if(o===!0)return;$.ajax({url:"/api/v1/user/#/",data:JSON.stringify(s),contentType:"application/json",dataType:"json",type:"POST"}).success(function(e){e.success===!0&&(n.setActiveUser(e.user),console.log(e.user),r.setNumMatches(e.user.num_matches),$(".logged-out-content").fadeOut("fast",function(){$("#login-stylesheet").remove(),$(".logged-in-content").fadeIn("fast",function(){t.activeSet().getNextSwipeSet()})}))}).error(function(t){e({type:"error",title:"Make sure you register!",text:"It looks like your username or password was incorrect, or you forgot to register."})})},a="Either we don't have your email in our database, or someone has already registered that address. Check the email address for a registration link. Search your spam folder.",f=function(){var t=$(this),n=t.closest(".form");console.log(n);var r={},i=!1;n.children("input").each(function(){var t=$(this),n=t.val().toLowerCase().trim(),s=t.attr("name");r[s]=n,n===""&&(i=!0,e({type:"error",title:"You can't leave any fields blank.",timer:2e3}))}),r.password1!==r.password2&&(e({type:"error",title:"Passwords don't match",text:"You need to make your passwords match!",timer:2e3}),i=!0),i===!1&&$.post("/accounts/register/",r,function(t){t==0?e({type:"error",title:"Something went wrong",text:a}):e({type:"success",title:"Nice! Check your email!",text:"Check your email for a validation link! Then you can get 'smashing' ;)"})},"json").error(function(t){e({type:"error",title:"Something went wrong",text:a})})};o.click(u);var l=$("#register");l.click(f)}),function(e){var t=function(){return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(e){return!e||/^\s*$/.test(e)},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(e){return typeof e=="string"},isNumber:function(e){return typeof e=="number"},isArray:e.isArray,isFunction:e.isFunction,isObject:e.isPlainObject,isUndefined:function(e){return typeof e=="undefined"},toStr:function(n){return t.isUndefined(n)||n===null?"":n+""},bind:e.proxy,each:function(t,n){function r(e,t){return n(t,e)}e.each(t,r)},map:e.map,filter:e.grep,every:function(t,n){var r=!0;return t?(e.each(t,function(e,i){if(!(r=n.call(null,i,e,t)))return!1}),!!r):r},some:function(t,n){var r=!1;return t?(e.each(t,function(e,i){if(r=n.call(null,i,e,t))return!1}),!!r):r},mixin:e.extend,getUniqueId:function(){var e=0;return function(){return e++}}(),templatify:function(n){function r(){return String(n)}return e.isFunction(n)?n:r},defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var r,i;return function(){var s=this,o=arguments,u,a;return u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r,clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},throttle:function(e,t){var n,r,i,s,o,u;return o=0,u=function(){o=new Date,i=null,s=e.apply(n,r)},function(){var a=new Date,f=t-(a-o);return n=this,r=arguments,f<=0?(clearTimeout(i),i=null,o=a,s=e.apply(n,r)):i||(i=setTimeout(u,f)),s}},noop:function(){}}}(),n="0.10.4",r=function(){function e(e){return e=t.toStr(e),e?e.split(/\s+/):[]}function n(e){return e=t.toStr(e),e?e.split(/\W+/):[]}function r(e){return function(){var r=[].slice.call(arguments,0);return function(i){var s=[];return t.each(r,function(n){s=s.concat(e(t.toStr(i[n])))}),s}}}return{nonword:n,whitespace:e,obj:{nonword:r(n),whitespace:r(e)}}}(),i=function(){function n(n){this.maxSize=t.isNumber(n)?n:100,this.reset(),this.maxSize<=0&&(this.set=this.get=e.noop)}function r(){this.head=this.tail=null}function i(e,t){this.key=e,this.val=t,this.prev=this.next=null}return t.mixin(n.prototype,{set:function(t,n){var r=this.list.tail,s;this.size>=this.maxSize&&(this.list.remove(r),delete this.hash[r.key]),(s=this.hash[t])?(s.val=n,this.list.moveToFront(s)):(s=new i(t,n),this.list.add(s),this.hash[t]=s,this.size++)},get:function(t){var n=this.hash[t];if(n)return this.list.moveToFront(n),n.val},reset:function(){this.size=0,this.hash={},this.list=new r}}),t.mixin(r.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(e){this.remove(e),this.add(e)}}),n}(),s=function(){function i(e){this.prefix=["__",e,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix))}function s(){return(new Date).getTime()}function o(e){return JSON.stringify(t.isUndefined(e)?null:e)}function u(e){return JSON.parse(e)}var e,n;try{e=window.localStorage,e.setItem("~~~","!"),e.removeItem("~~~")}catch(r){e=null}return e&&window.JSON?n={_prefix:function(e){return this.prefix+e},_ttlKey:function(e){return this._prefix(e)+this.ttlKey},get:function(t){return this.isExpired(t)&&this.remove(t),u(e.getItem(this._prefix(t)))},set:function(n,r,i){return t.isNumber(i)?e.setItem(this._ttlKey(n),o(s()+i)):e.removeItem(this._ttlKey(n)),e.setItem(this._prefix(n),o(r))},remove:function(t){return e.removeItem(this._ttlKey(t)),e.removeItem(this._prefix(t)),this},clear:function(){var t,n,r=[],i=e.length;for(t=0;t<i;t++)(n=e.key(t)).match(this.keyMatcher)&&r.push(n.replace(this.keyMatcher,""));for(t=r.length;t--;)this.remove(r[t]);return this},isExpired:function(n){var r=u(e.getItem(this._ttlKey(n)));return t.isNumber(r)&&s()>r?!0:!1}}:n={get:t.noop,set:t.noop,remove:t.noop,clear:t.noop,isExpired:t.noop},t.mixin(i.prototype,n),i}(),o=function(){function u(t){t=t||{},this.cancelled=!1,this.lastUrl=null,this._send=t.transport?a(t.transport):e.ajax,this._get=t.rateLimiter?t.rateLimiter(this._get):this._get,this._cache=t.cache===!1?new i(0):o}function a(n){return function(i,s){function u(e){t.defer(function(){o.resolve(e)})}function a(e){t.defer(function(){o.reject(e)})}var o=e.Deferred();return n(i,s,u,a),o}}var n=0,r={},s=6,o=new i(10);return u.setMaxPendingRequests=function(t){s=t},u.resetCache=function(){o.reset()},t.mixin(u.prototype,{_get:function(e,t,i){function a(t){i&&i(null,t),o._cache.set(e,t)}function f(){i&&i(!0)}function l(){n--,delete r[e],o.onDeckRequestArgs&&(o._get.apply(o,o.onDeckRequestArgs),o.onDeckRequestArgs=null)}var o=this,u;if(this.cancelled||e!==this.lastUrl)return;(u=r[e])?u.done(a).fail(f):n<s?(n++,r[e]=this._send(e,t).done(a).fail(f).always(l)):this.onDeckRequestArgs=[].slice.call(arguments,0)},get:function(e,n,r){var i;return t.isFunction(n)&&(r=n,n={}),this.cancelled=!1,this.lastUrl=e,(i=this._cache.get(e))?t.defer(function(){r&&r(null,i)}):this._get(e,n,r),!!i},cancel:function(){this.cancelled=!0}}),u}(),u=function(){function n(t){t=t||{},(!t.datumTokenizer||!t.queryTokenizer)&&e.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=t.datumTokenizer,this.queryTokenizer=t.queryTokenizer,this.reset()}function r(e){return e=t.filter(e,function(e){return!!e}),e=t.map(e,function(e){return e.toLowerCase()}),e}function i(){return{ids:[],children:{}}}function s(e){var t={},n=[];for(var r=0,i=e.length;r<i;r++)t[e[r]]||(t[e[r]]=!0,n.push(e[r]));return n}function o(e,t){function u(e,t){return e-t}var n=0,r=0,i=[];e=e.sort(u),t=t.sort(u);var s=e.length,o=t.length;while(n<s&&r<o)e[n]<t[r]?n++:e[n]>t[r]?r++:(i.push(e[n]),n++,r++);return i}return t.mixin(n.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(e){var n=this;e=t.isArray(e)?e:[e],t.each(e,function(e){var s,o;s=n.datums.push(e)-1,o=r(n.datumTokenizer(e)),t.each(o,function(e){var t,r,o;t=n.trie,r=e.split("");while(o=r.shift())t=t.children[o]||(t.children[o]=i()),t.ids.push(s)})})},get:function(n){var i=this,u,a;return u=r(this.queryTokenizer(n)),t.each(u,function(e){var t,n,r,s;if(a&&a.length===0)return!1;t=i.trie,n=e.split("");while(t&&(r=n.shift()))t=t.children[r];if(!t||n.length!==0)return a=[],!1;s=t.ids.slice(0),a=a?o(a,s):s}),a?t.map(s(a),function(e){return i.datums[e]}):[]},reset:function(){this.datums=[],this.trie=i()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),n}(),a=function(){function r(e){return e.local||null}function i(r){var i,s;s={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}};if(i=r.prefetch||null)i=t.isString(i)?{url:i}:i,i=t.mixin(s,i),i.thumbprint=n+i.thumbprint,i.ajax.type=i.ajax.type||"GET",i.ajax.dataType=i.ajax.dataType||"json",!i.url&&e.error("prefetch requires url to be set");return i}function s(n){function s(e){return function(n){return t.debounce(n,e)}}function o(e){return function(n){return t.throttle(n,e)}}var r,i;i={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}};if(r=n.remote||null)r=t.isString(r)?{url:r}:r,r=t.mixin(i,r),r.rateLimiter=/^throttle$/i.test(r.rateLimitBy)?o(r.rateLimitWait):s(r.rateLimitWait),r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",delete r.rateLimitBy,delete r.rateLimitWait,!r.url&&e.error("remote requires url to be set");return r}return{local:r,prefetch:i,remote:s}}();(function(n){function l(t){(!t||!t.local&&!t.prefetch&&!t.remote)&&e.error("one of local, prefetch, or remote is required"),this.limit=t.limit||5,this.sorter=c(t.sorter),this.dupDetector=t.dupDetector||h,this.local=a.local(t),this.prefetch=a.prefetch(t),this.remote=a.remote(t),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new u({datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),this.storage=this.cacheKey?new s(this.cacheKey):null}function c(e){function n(t){return t.sort(e)}function r(e){return e}return t.isFunction(e)?n:r}function h(){return!1}var i,f;return i=n.Bloodhound,f={data:"data",protocol:"protocol",thumbprint:"thumbprint"},n.Bloodhound=l,l.noConflict=function(){return n.Bloodhound=i,l},l.tokenizers=r,t.mixin(l.prototype,{_loadPrefetch:function(n){function o(e){r.clear(),r.add(n.filter?n.filter(e):e),r._saveToStorage(r.index.serialize(),n.thumbprint,n.ttl)}var r=this,i,s;return(i=this._readFromStorage(n.thumbprint))?(this.index.bootstrap(i),s=e.Deferred().resolve()):s=e.ajax(n.url,n.ajax).done(o),s},_getFromRemote:function(t,n){function o(e,t){e?n([]):n(r.remote.filter?r.remote.filter(t):t)}var r=this,i,s;if(!this.transport)return;return t=t||"",s=encodeURIComponent(t),i=this.remote.replace?this.remote.replace(this.remote.url,t):this.remote.url.replace(this.remote.wildcard,s),this.transport.get(i,this.remote.ajax,o)},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(t,n,r){this.storage&&(this.storage.set(f.data,t,r),this.storage.set(f.protocol,location.protocol,r),this.storage.set(f.thumbprint,n,r))},_readFromStorage:function(t){var n={},r;return this.storage&&(n.data=this.storage.get(f.data),n.protocol=this.storage.get(f.protocol),n.thumbprint=this.storage.get(f.thumbprint)),r=n.thumbprint!==t||n.protocol!==location.protocol,n.data&&!r?n.data:null},_initialize:function(){function u(){r.add(t.isFunction(i)?i():i)}var r=this,i=this.local,s;return s=this.prefetch?this._loadPrefetch(this.prefetch):e.Deferred().resolve(),i&&s.done(u),this.transport=this.remote?new o(this.remote):null,this.initPromise=s.promise()},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){this.index.add(t)},get:function(n,r){function u(e){var n=s.slice(0);t.each(e,function(e){var r;return r=t.some(n,function(t){return i.dupDetector(e,t)}),!r&&n.push(e),n.length<i.limit}),r&&r(i.sorter(n))}var i=this,s=[],o=!1;s=this.index.get(n),s=this.sorter(s).slice(0,this.limit),s.length<this.limit?o=this._getFromRemote(n,u):this._cancelLastRemoteRequest(),o||(s.length>0||!this.transport)&&r&&r(s)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&o.resetCache()},ttAdapter:function(){return t.bind(this.get,this)}}),l})(this);var f=function(){return{wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'}}(),l=function(){var e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t.isMsie()&&t.isMsie()<=7&&t.mixin(e.input,{marginTop:"-1px"}),e}(),c=function(){function r(t){(!t||!t.el)&&e.error("EventBus initialized without el"),this.$el=e(t.el)}var n="typeahead:";return t.mixin(r.prototype,{trigger:function(e){var t=[].slice.call(arguments,1);this.$el.trigger(n+e,t)}}),r}(),h=function(){function n(t,n,r,i){var s;if(!r)return this;n=n.split(e),r=i?f(r,i):r,this._callbacks=this._callbacks||{};while(s=n.shift())this._callbacks[s]=this._callbacks[s]||{sync:[],async:[]},this._callbacks[s][t].push(r);return this}function r(e,t,r){return n.call(this,"async",e,t,r)}function i(e,t,r){return n.call(this,"sync",e,t,r)}function s(t){var n;if(!this._callbacks)return this;t=t.split(e);while(n=t.shift())delete this._callbacks[n];return this}function o(n){var r,i,s,o,a;if(!this._callbacks)return this;n=n.split(e),s=[].slice.call(arguments,1);while((r=n.shift())&&(i=this._callbacks[r]))o=u(i.sync,this,[r].concat(s)),a=u(i.async,this,[r].concat(s)),o()&&t(a);return this}function u(e,t,n){function r(){var r;for(var i=0,s=e.length;!r&&i<s;i+=1)r=e[i].apply(t,n)===!1;return!r}return r}function a(){var e;return window.setImmediate?e=function(t){setImmediate(function(){t()})}:e=function(t){setTimeout(function(){t()},0)},e}function f(e,t){return e.bind?e.bind(t):function(){e.apply(t,[].slice.call(arguments,0))}}var e=/\s+/,t=a();return{onSync:i,onAsync:r,off:s,trigger:o}}(),p=function(e){function r(e,n,r){var i=[],s;for(var o=0,u=e.length;o<u;o++)i.push(t.escapeRegExChars(e[o]));return s=r?"\\b("+i.join("|")+")\\b":"("+i.join("|")+")",n?new RegExp(s):new RegExp(s,"i")}var n={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(s){function u(t){var n,r,i;if(n=o.exec(t.data))i=e.createElement(s.tagName),s.className&&(i.className=s.className),r=t.splitText(n.index),r.splitText(n[0].length),i.appendChild(r.cloneNode(!0)),t.parentNode.replaceChild(i,r);return!!n}function a(e,t){var n,r=3;for(var i=0;i<e.childNodes.length;i++)n=e.childNodes[i],n.nodeType===r?i+=t(n)?1:0:a(n,t)}var o;s=t.mixin({},n,s);if(!s.node||!s.pattern)return;s.pattern=t.isArray(s.pattern)?s.pattern:[s.pattern],o=r(s.pattern,s.caseSensitive,s.wordsOnly),a(s.node,u)}}(window.document),d=function(){function r(r){var s=this,o,u,a,f;r=r||{},r.input||e.error("input is missing"),o=t.bind(this._onBlur,this),u=t.bind(this._onFocus,this),a=t.bind(this._onKeydown,this),f=t.bind(this._onInput,this),this.$hint=e(r.hint),this.$input=e(r.input).on("blur.tt",o).on("focus.tt",u).on("keydown.tt",a),this.$hint.length===0&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=t.noop),t.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(e){if(n[e.which||e.keyCode])return;t.defer(t.bind(s._onInput,s,e))}):this.$input.on("input.tt",f),this.query=this.$input.val(),this.$overflowHelper=i(this.$input)}function i(t){return e('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function s(e,t){return r.normalizeQuery(e)===r.normalizeQuery(t)}function o(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}var n;return n={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},r.normalizeQuery=function(e){return(e||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},t.mixin(r.prototype,h,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(t){var r=n[t.which||t.keyCode];this._managePreventDefault(r,t),r&&this._shouldTrigger(r,t)&&this.trigger(r+"Keyed",t)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(t,n){var r,i,s;switch(t){case"tab":i=this.getHint(),s=this.getInputValue(),r=i&&i!==s&&!o(n);break;case"up":case"down":r=!o(n);break;default:r=!1}r&&n.preventDefault()},_shouldTrigger:function(t,n){var r;switch(t){case"tab":r=!o(n);break;default:r=!0}return r},_checkInputValue:function(){var t,n,r;t=this.getInputValue(),n=s(t,this.query),r=n?this.query.length!==t.length:!1,this.query=t,n?r&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(t){this.query=t},getInputValue:function(){return this.$input.val()},setInputValue:function(t,n){this.$input.val(t),n?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,n,r,i;t=this.getInputValue(),n=this.getHint(),r=t!==n&&n.indexOf(t)===0,i=t!==""&&r&&!this.hasOverflow(),!i&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var e,n,r;return e=this.$input.val().length,n=this.$input[0].selectionStart,t.isNumber(n)?n===e:document.selection?(r=document.selection.createRange(),r.moveStart("character",-e),e===r.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null}}),r}(),v=function(){function s(n){n=n||{},n.templates=n.templates||{},n.source||e.error("missing source"),n.name&&!a(n.name)&&e.error("invalid dataset name: "+n.name),this.query=null,this.highlight=!!n.highlight,this.name=n.name||t.getUniqueId(),this.source=n.source,this.displayFn=o(n.display||n.displayKey),this.templates=u(n.templates,this.displayFn),this.$el=e(f.dataset.replace("%CLASS%",this.name))}function o(e){function n(t){return t[e]}return e=e||"value",t.isFunction(e)?e:n}function u(e,n){function r(e){return"<p>"+n(e)+"</p>"}return{empty:e.empty&&t.templatify(e.empty),header:e.header&&t.templatify(e.header),footer:e.footer&&t.templatify(e.footer),suggestion:e.suggestion||r}}function a(e){return/^[_a-zA-Z0-9-]+$/.test(e)}var n="ttDataset",r="ttValue",i="ttDatum";return s.extractDatasetName=function(r){return e(r).data(n)},s.extractValue=function(n){return e(n).data(r)},s.extractDatum=function(n){return e(n).data(i)},t.mixin(s.prototype,h,{_render:function(o,u){function h(){return a.templates.empty({query:o,isEmpty:!0})}function d(){function h(t){var s;return s=e(f.suggestion).append(a.templates.suggestion(t)).data(n,a.name).data(r,a.displayFn(t)).data(i,t),s.children().each(function(){e(this).css(l.suggestionChild)}),s}var s,c;return s=e(f.suggestions).css(l.suggestions),c=t.map(u,h),s.append.apply(s,c),a.highlight&&p({className:"tt-highlight",node:s[0],pattern:o}),s}function v(){return a.templates.header({query:o,isEmpty:!c})}function m(){return a.templates.footer({query:o,isEmpty:!c})}if(!this.$el)return;var a=this,c;this.$el.empty(),c=u&&u.length,!c&&this.templates.empty?this.$el.html(h()).prepend(a.templates.header?v():null).append(a.templates.footer?m():null):c&&this.$el.html(d()).prepend(a.templates.header?v():null).append(a.templates.footer?m():null),this.trigger("rendered")},getRoot:function(){return this.$el},update:function(t){function r(e){!n.canceled&&t===n.query&&n._render(t,e)}var n=this;this.query=t,this.canceled=!1,this.source(t,r)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),s}(),m=function(){function n(n){var i=this,s,o,u;n=n||{},n.menu||e.error("menu is required"),this.isOpen=!1,this.isEmpty=!0,this.datasets=t.map(n.datasets,r),s=t.bind(this._onSuggestionClick,this),o=t.bind(this._onSuggestionMouseEnter,this),u=t.bind(this._onSuggestionMouseLeave,this),this.$menu=e(n.menu).on("click.tt",".tt-suggestion",s).on("mouseenter.tt",".tt-suggestion",o).on("mouseleave.tt",".tt-suggestion",u),t.each(this.datasets,function(e){i.$menu.append(e.getRoot()),e.onSync("rendered",i._onRendered,i)})}function r(e){return new v(e)}return t.mixin(n.prototype,h,{_onSuggestionClick:function(n){this.trigger("suggestionClicked",e(n.currentTarget))},_onSuggestionMouseEnter:function(n){this._removeCursor(),this._setCursor(e(n.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function n(e){return e.isEmpty()}this.isEmpty=t.every(this.datasets,n),this.isEmpty?this._hide():this.isOpen&&this._show(),this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(t,n){t.first().addClass("tt-cursor"),!n&&this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(t){var n,r,i,s;if(!this.isOpen)return;r=this._getCursor(),n=this._getSuggestions(),this._removeCursor(),i=n.index(r)+t,i=(i+1)%(n.length+1)-1;if(i===-1){this.trigger("cursorRemoved");return}i<-1&&(i=n.length-1),this._setCursor(s=n.eq(i)),this._ensureVisible(s)},_ensureVisible:function(t){var n,r,i,s;n=t.position().top,r=n+t.outerHeight(!0),i=this.$menu.scrollTop(),s=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),n<0?this.$menu.scrollTop(i+n):s<r&&this.$menu.scrollTop(i+(r-s))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(t){this.$menu.css(t==="ltr"?l.ltr:l.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(t){var n=null;return t.length&&(n={raw:v.extractDatum(t),value:v.extractValue(t),datasetName:v.extractDatasetName(t)}),n},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(n){function r(e){e.update(n)}t.each(this.datasets,r)},empty:function(){function n(e){e.clear()}t.each(this.datasets,n),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function n(e){e.destroy()}this.$menu.off(".tt"),this.$menu=null,t.each(this.datasets,n)}}),n}(),g=function(){function r(n){var r,s,o;n=n||{},n.input||e.error("missing input"),this.isActivated=!1,this.autoselect=!!n.autoselect,this.minLength=t.isNumber(n.minLength)?n.minLength:1,this.$node=i(n.input,n.withHint),r=this.$node.find(".tt-dropdown-menu"),s=this.$node.find(".tt-input"),o=this.$node.find(".tt-hint"),s.on("blur.tt",function(e){var n,i,o;n=document.activeElement,i=r.is(n),o=r.has(n).length>0,t.isMsie()&&(i||o)&&(e.preventDefault(),e.stopImmediatePropagation(),t.defer(function(){s.focus()}))}),r.on("mousedown.tt",function(e){e.preventDefault()}),this.eventBus=n.eventBus||new c({el:s}),this.dropdown=(new m({menu:r,datasets:n.datasets})).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=(new d({input:s,hint:o})).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._setLanguageDirection()}function i(t,r){var i,o,u,a;i=e(t),o=e(f.wrapper).css(l.wrapper),u=e(f.dropdown).css(l.dropdown),a=i.clone().css(l.hint).css(s(i)),a.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1}),i.data(n,{dir:i.attr("dir"),autocomplete:i.attr("autocomplete"),spellcheck:i.attr("spellcheck"),style:i.attr("style")}),i.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(r?l.input:l.inputWithNoHint);try{!i.attr("dir")&&i.attr("dir","auto")}catch(c){}return i.wrap(o).parent().prepend(r?a:null).append(u)}function s(e){return{backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}}function o(e){var r=e.find(".tt-input");t.each(r.data(n),function(e,n){t.isUndefined(e)?r.removeAttr(n):r.attr(n,e)}),r.detach().removeData(n).removeClass("tt-input").insertAfter(e),e.remove()}var n="ttAttrs";return t.mixin(r.prototype,{_onSuggestionClicked:function(t,n){var r;(r=this.dropdown.getDatumForSuggestion(n))&&this._select(r)},_onCursorMoved:function(){var t=this.dropdown.getDatumForCursor();this.input.setInputValue(t.value,!0),this.eventBus.trigger("cursorchanged",t.raw,t.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint(),this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint(),this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0,this.dropdown.open()},_onBlurred:function(){this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()},_onEnterKeyed:function(t,n){var r,i;r=this.dropdown.getDatumForCursor(),i=this.dropdown.getDatumForTopSuggestion(),r?(this._select(r),n.preventDefault()):this.autoselect&&i&&(this._select(i),n.preventDefault())},_onTabKeyed:function(t,n){var r;(r=this.dropdown.getDatumForCursor())?(this._select(r),n.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){this.dir==="rtl"&&this._autocomplete()},_onRightKeyed:function(){this.dir==="ltr"&&this._autocomplete()},_onQueryChanged:function(t,n){this.input.clearHintIfInvalid(),n.length>=this.minLength?this.dropdown.update(n):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var t;this.dir!==(t=this.input.getLanguageDirection())&&(this.dir=t,this.$node.css("direction",t),this.dropdown.setLanguageDirection(t))},_updateHint:function(){var n,r,i,s,o,u;n=this.dropdown.getDatumForTopSuggestion(),n&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(r=this.input.getInputValue(),i=d.normalizeQuery(r),s=t.escapeRegExChars(i),o=new RegExp("^(?:"+s+")(.+$)","i"),u=o.exec(n.value),u?this.input.setHint(r+u[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(t){var n,r,i,s;n=this.input.getHint(),r=this.input.getQuery(),i=t||this.input.isCursorAtEnd(),n&&r!==n&&i&&(s=this.dropdown.getDatumForTopSuggestion(),s&&this.input.setInputValue(s.value),this.eventBus.trigger("autocompleted",s.raw,s.datasetName))},_select:function(n){this.input.setQuery(n.value),this.input.setInputValue(n.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",n.raw,n.datasetName),this.dropdown.close(),t.defer(t.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(n){n=t.toStr(n),this.isActivated?this.input.setInputValue(n):(this.input.setQuery(n),this.input.setInputValue(n,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),o(this.$node),this.$node=null}}),r}();(function(){var n,r,i;n=e.fn.typeahead,r="ttTypeahead",i={initialize:function(i,s){function o(){var n=e(this),o,u;t.each(s,function(e){e.highlight=!!i.highlight}),u=new g({input:n,eventBus:o=new c({el:n}),withHint:t.isUndefined(i.hint)?!0:!!i.hint,minLength:i.minLength,autoselect:i.autoselect,datasets:s}),n.data(r,u)}return s=t.isArray(s)?s:[].slice.call(arguments,1),i=i||{},this.each(o)},open:function(){function n(){var t=e(this),n;(n=t.data(r))&&n.open()}return this.each(n)},close:function(){function n(){var t=e(this),n;(n=t.data(r))&&n.close()}return this.each(n)},val:function(n){function i(){var t=e(this),i;(i=t.data(r))&&i.setVal(n)}function s(e){var t,n;if(t=e.data(r))n=t.getVal();return n}return arguments.length?this.each(i):s(this.first())},destroy:function(){function n(){var t=e(this),n;if(n=t.data(r))n.destroy(),t.removeData(r)}return this.each(n)}},e.fn.typeahead=function(t){var n;return i[t]&&t!=="initialize"?(n=this.filter(function(){return!!e(this).data(r)}),i[t].apply(n,[].slice.call(arguments,1))):i.initialize.apply(this,arguments)},e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this}})()}(window.jQuery),define("typeahead",function(){}),define("search",["typeahead","smashers","cardInterface"],function(e,t,n){function i(e){var i=new Bloodhound({local:e,datumTokenizer:function(e){return Bloodhound.tokenizers.whitespace(e.name)},queryTokenizer:Bloodhound.tokenizers.whitespace,limit:10});i.initialize(!0),r.typeahead({hint:!1,minLength:2,highlight:!0},{source:i.ttAdapter(),displayKey:"name",templates:{empty:"<div class='tt-empty-results'>No results found.</div>",suggestion:_.compile($("#suggestion-template").html())}}).on("typeahead:selected",function(e,i){r.typeahead("val",""),r.blur(),r.typeahead("blur");var s=t.getSmasher({id:i.pk});s.fetch().success(function(){n.activeSet().add(s)})})}var r=$("#smash-autocomplete");return function(e){e.compile=function(e){var t=this.template(e);return t.render=function(e){return this(e)},t}}(window._),i}),require.config({paths:{jquery:"bower_components/jquery/dist/jquery.min",underscore:"bower_components/underscore/underscore-min",backbone:"bower_components/backbone/backbone",animatedModal:"animatedModal/animatedModal.min",sweetalert:"bower_components/sweetalert/lib/sweet-alert.min"}}),define("app",["jquery","underscore","backbone"],function(e,t,n){function r(e){var t=null;if(document.cookie&&document.cookie!=""){var n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=jQuery.trim(n[r]);if(i.substring(0,e.length+1)==e+"="){t=decodeURIComponent(i.substring(e.length+1));break}}}return t}function i(e){return/^(GET|HEAD|OPTIONS|TRACE)$/.test(e)}e.ajaxSetup({beforeSend:function(e,t){!i(t.type)&&!this.crossDomain&&e.setRequestHeader("X-CSRFToken",r("csrftoken"))}}),window.TastypieModel=n.Model.extend({base_url:function(){var e=n.Model.prototype.url.call(this);return e.charAt(e.length-1)=="/"?e:e+"/"},url:function(){return this.base_url()}}),window.TastypieCollection=n.Collection.extend({parse:function(e){return this.recent_meta=e.meta||{},e.objects||e}});var s=require(["login"]);require(["smashers"],function(e){!t.isUndefined(window.user)&&!window.user.error&&e.setActiveUser(window.user)});var o=require(["cardInterface"]);require(["search"],function(e){e(window.people)}),require(["coreUI"],function(e){e.init(),window.user&&!window.user.error&&e.setNumMatches(window.user.num_matches)})});
\ No newline at end of file
+!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(a,b){function s(e){var t="length"in e&&e.length,r=n.type(e);return"function"===r||n.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e}function x(e,t,r){if(n.isFunction(t))return n.grep(e,function(e,n){return!!t.call(e,n,e)!==r});if(t.nodeType)return n.grep(e,function(e){return e===t!==r});if("string"==typeof t){if(w.test(t))return n.filter(t,e,r);t=n.filter(t,e)}return n.grep(e,function(e){return g.call(t,e)>=0!==r})}function D(e,t){while((e=e[t])&&1!==e.nodeType);return e}function G(e){var t=F[e]={};return n.each(e.match(E)||[],function(e,n){t[n]=!0}),t}function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}function P(e,t,r){var i;if(void 0===r&&1===e.nodeType)if(i="data-"+t.replace(O,"-$1").toLowerCase(),r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:N.test(r)?n.parseJSON(r):r}catch(s){}M.set(e,t,r)}else r=void 0;return r}function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(e){}}function ja(e,t){return n.nodeName(e,"table")&&n.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ka(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function la(e){var t=ga.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ma(e,t){for(var n=0,r=e.length;r>n;n++)L.set(e[n],"globalEval",!t||L.get(t[n],"globalEval"))}function na(e,t){var r,i,s,o,u,a,f,l;if(1===t.nodeType){if(L.hasData(e)&&(o=L.access(e),u=L.set(t,o),l=o.events)){delete u.handle,u.events={};for(s in l)for(r=0,i=l[s].length;i>r;r++)n.event.add(t,s,l[s][r])}M.hasData(e)&&(a=M.access(e),f=n.extend({},a),M.set(t,f))}}function oa(e,t){var r=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&n.nodeName(e,t)?n.merge([e],r):r}function pa(e,t){var n=t.nodeName.toLowerCase();"input"===n&&T.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function sa(e,t){var r,i=n(t.createElement(e)).appendTo(t.body),s=a.getDefaultComputedStyle&&(r=a.getDefaultComputedStyle(i[0]))?r.display:n.css(i[0],"display");return i.detach(),s}function ta(e){var t=l,r=ra[e];return r||(r=sa(e,t),"none"!==r&&r||(qa=(qa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=qa[0].contentDocument,t.write(),t.close(),r=sa(e,t),qa.detach()),ra[e]=r),r}function xa(e,t,r){var i,s,o,u,a=e.style;return r=r||wa(e),r&&(u=r.getPropertyValue(t)||r[t]),r&&(""!==u||n.contains(e.ownerDocument,e)||(u=n.style(e,t)),va.test(u)&&ua.test(t)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=u,u=r.width,a.width=i,a.minWidth=s,a.maxWidth=o)),void 0!==u?u+"":u}function ya(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function Fa(e,t){if(t in e)return t;var n=t[0].toUpperCase()+t.slice(1),r=t,i=Ea.length;while(i--)if(t=Ea[i]+n,t in e)return t;return r}function Ga(e,t,n){var r=Aa.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ha(e,t,r,i,s){for(var o=r===(i?"border":"content")?4:"width"===t?1:0,u=0;4>o;o+=2)"margin"===r&&(u+=n.css(e,r+R[o],!0,s)),i?("content"===r&&(u-=n.css(e,"padding"+R[o],!0,s)),"margin"!==r&&(u-=n.css(e,"border"+R[o]+"Width",!0,s))):(u+=n.css(e,"padding"+R[o],!0,s),"padding"!==r&&(u+=n.css(e,"border"+R[o]+"Width",!0,s)));return u}function Ia(e,t,r){var i=!0,s="width"===t?e.offsetWidth:e.offsetHeight,o=wa(e),u="border-box"===n.css(e,"boxSizing",!1,o);if(0>=s||null==s){if(s=xa(e,t,o),(0>s||null==s)&&(s=e.style[t]),va.test(s))return s;i=u&&(k.boxSizingReliable()||s===e.style[t]),s=parseFloat(s)||0}return s+Ha(e,t,r||(u?"border":"content"),i,o)+"px"}function Ja(e,t){for(var r,i,s,o=[],u=0,a=e.length;a>u;u++)i=e[u],i.style&&(o[u]=L.get(i,"olddisplay"),r=i.style.display,t?(o[u]||"none"!==r||(i.style.display=""),""===i.style.display&&S(i)&&(o[u]=L.access(i,"olddisplay",ta(i.nodeName)))):(s=S(i),"none"===r&&s||L.set(i,"olddisplay",s?r:n.css(i,"display"))));for(u=0;a>u;u++)i=e[u],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[u]||"":"none"));return e}function Ka(e,t,n,r,i){return new Ka.prototype.init(e,t,n,r,i)}function Sa(){return setTimeout(function(){La=void 0}),La=n.now()}function Ta(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)n=R[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function Ua(e,t,n){for(var r,i=(Ra[t]||[]).concat(Ra["*"]),s=0,o=i.length;o>s;s++)if(r=i[s].call(n,t,e))return r}function Va(e,t,r){var i,s,o,u,a,f,l,c,h=this,p={},d=e.style,v=e.nodeType&&S(e),m=L.get(e,"fxshow");r.queue||(a=n._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,f=a.empty.fire,a.empty.fire=function(){a.unqueued||f()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,n.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(r.overflow=[d.overflow,d.overflowX,d.overflowY],l=n.css(e,"display"),c="none"===l?L.get(e,"olddisplay")||ta(e.nodeName):l,"inline"===c&&"none"===n.css(e,"float")&&(d.display="inline-block")),r.overflow&&(d.overflow="hidden",h.always(function(){d.overflow=r.overflow[0],d.overflowX=r.overflow[1],d.overflowY=r.overflow[2]}));for(i in t)if(s=t[i],Na.exec(s)){if(delete t[i],o=o||"toggle"===s,s===(v?"hide":"show")){if("show"!==s||!m||void 0===m[i])continue;v=!0}p[i]=m&&m[i]||n.style(e,i)}else l=void 0;if(n.isEmptyObject(p))"inline"===("none"===l?ta(e.nodeName):l)&&(d.display=l);else{m?"hidden"in m&&(v=m.hidden):m=L.access(e,"fxshow",{}),o&&(m.hidden=!v),v?n(e).show():h.done(function(){n(e).hide()}),h.done(function(){var t;L.remove(e,"fxshow");for(t in p)n.style(e,t,p[t])});for(i in p)u=Ua(v?m[i]:0,i,h),i in m||(m[i]=u.start,v&&(u.end=u.start,u.start="width"===i||"height"===i?1:0))}}function Wa(e,t){var r,i,s,o,u;for(r in e)if(i=n.camelCase(r),s=t[i],o=e[r],n.isArray(o)&&(s=o[1],o=e[r]=o[0]),r!==i&&(e[i]=o,delete e[r]),u=n.cssHooks[i],u&&"expand"in u){o=u.expand(o),delete e[i];for(r in o)r in e||(e[r]=o[r],t[r]=s)}else t[i]=s}function Xa(e,t,r){var i,s,o=0,u=Qa.length,a=n.Deferred().always(function(){delete f.elem}),f=function(){if(s)return!1;for(var t=La||Sa(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,i=1-r,o=0,u=l.tweens.length;u>o;o++)l.tweens[o].run(i);return a.notifyWith(e,[l,i,n]),1>i&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:n.extend({},t),opts:n.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:La||Sa(),duration:r.duration,tweens:[],createTween:function(t,r){var i=n.Tween(e,l.opts,t,r,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(i),i},stop:function(t){var n=0,r=t?l.tweens.length:0;if(s)return this;for(s=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(Wa(c,l.opts.specialEasing);u>o;o++)if(i=Qa[o].call(l,e,c,l.opts))return i;return n.map(c,Ua,l),n.isFunction(l.opts.start)&&l.opts.start.call(e,l),n.fx.timer(n.extend(f,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function qb(e){return function(t,r){"string"!=typeof t&&(r=t,t="*");var i,s=0,o=t.toLowerCase().match(E)||[];if(n.isFunction(r))while(i=o[s++])"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(r)):(e[i]=e[i]||[]).push(r)}}function rb(e,t,r,i){function u(l){var h;return s[l]=!0,n.each(e[l]||[],function(e,n){var a=n(t,r,i);return"string"!=typeof a||o||s[a]?o?!(h=a):void 0:(t.dataTypes.unshift(a),u(a),!1)}),h}var s={},o=e===mb;return u(t.dataTypes[0])||!s["*"]&&u("*")}function sb(e,t){var r,i,s=n.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((s[r]?e:i||(i={}))[r]=t[r]);return i&&n.extend(!0,e,i),e}function tb(e,t,n){var r,i,s,o,u=e.contents,a=e.dataTypes;while("*"===a[0])a.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in u)if(u[i]&&u[i].test(r)){a.unshift(i);break}if(a[0]in n)s=a[0];else{for(i in n){if(!a[0]||e.converters[i+" "+a[0]]){s=i;break}o||(o=i)}s=s||o}return s?(s!==a[0]&&a.unshift(s),n[s]):void 0}function ub(e,t,n,r){var i,s,o,u,a,f={},l=e.dataTypes.slice();if(l[1])for(o in e.converters)f[o.toLowerCase()]=e.converters[o];s=l.shift();while(s)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!a&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=s,s=l.shift())if("*"===s)s=a;else if("*"!==a&&a!==s){if(o=f[a+" "+s]||f["* "+s],!o)for(i in f)if(u=i.split(" "),u[1]===s&&(o=f[a+" "+u[0]]||f["* "+u[0]])){o===!0?o=f[i]:f[i]!==!0&&(s=u[0],l.unshift(u[1]));break}if(o!==!0)if(o&&e["throws"])t=o(t);else try{t=o(t)}catch(c){return{state:"parsererror",error:o?c:"No conversion from "+a+" to "+s}}}return{state:"success",data:t}}function Ab(e,t,r,i){var s;if(n.isArray(t))n.each(t,function(t,n){r||wb.test(e)?i(e,n):Ab(e+"["+("object"==typeof n?t:"")+"]",n,r,i)});else if(r||"object"!==n.type(t))i(e,t);else for(s in t)Ab(e+"["+s+"]",t[s],r,i)}function Jb(e){return n.isWindow(e)?e:9===e.nodeType&&e.defaultView}var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(e,t){return new n.fn.init(e,t)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(e,t){return t.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:d.call(this)},pushStack:function(e){var t=n.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return n.each(this,e,t)},map:function(e){return this.pushStack(n.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var e,t,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;for("boolean"==typeof u&&(l=u,u=arguments[a]||{},a++),"object"==typeof u||n.isFunction(u)||(u={}),a===f&&(u=this,a--);f>a;a++)if(null!=(e=arguments[a]))for(t in e)r=u[t],i=e[t],u!==i&&(l&&i&&(n.isPlainObject(i)||(s=n.isArray(i)))?(s?(s=!1,o=r&&n.isArray(r)?r:[]):o=r&&n.isPlainObject(r)?r:{},u[t]=n.extend(l,o,i)):void 0!==i&&(u[t]=i));return u},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===n.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!n.isArray(e)&&e-parseFloat(e)+1>=0},isPlainObject:function(e){return"object"!==n.type(e)||e.nodeType||n.isWindow(e)?!1:e.constructor&&!j.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[i.call(e)]||"object":typeof e},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(e){return e.replace(p,"ms-").replace(q,r)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,u=s(e);if(n){if(u){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(u){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(o,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(s(Object(e))?n.merge(r,"string"==typeof e?[e]:e):f.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],s=0,o=e.length,u=!n;o>s;s++)r=!t(e[s],s),r!==u&&i.push(e[s]);return i},map:function(t,n,r){var i,o=0,u=t.length,a=s(t),f=[];if(a)for(;u>o;o++)i=n(t[o],o,r),null!=i&&f.push(i);else for(o in t)i=n(t[o],o,r),null!=i&&f.push(i);return e.apply([],f)},guid:1,proxy:function(e,t){var r,i,s;return"string"==typeof t&&(r=e[t],t=e,e=r),n.isFunction(e)?(i=d.call(arguments,2),s=function(){return e.apply(t||this,i.concat(d.call(arguments)))},s.guid=e.guid=e.guid||n.guid++,s):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){h["[object "+t+"]"]=t.toLowerCase()});var t=function(e){function ot(e,t,r,i){var s,u,f,l,c,d,g,y,S,x;if((t?t.ownerDocument||t:E)!==p&&h(t),t=t||p,r=r||[],l=t.nodeType,"string"!=typeof e||!e||1!==l&&9!==l&&11!==l)return r;if(!i&&v){if(11!==l&&(s=Z.exec(e)))if(f=s[1]){if(9===l){if(u=t.getElementById(f),!u||!u.parentNode)return r;if(u.id===f)return r.push(u),r}else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(f))&&b(t,u)&&u.id===f)return r.push(u),r}else{if(s[2])return D.apply(r,t.getElementsByTagName(e)),r;if((f=s[3])&&n.getElementsByClassName)return D.apply(r,t.getElementsByClassName(f)),r}if(n.qsa&&(!m||!m.test(e))){if(y=g=w,S=t,x=1!==l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){d=o(e),(g=t.getAttribute("id"))?y=g.replace(tt,"\\$&"):t.setAttribute("id",y),y="[id='"+y+"'] ",c=d.length;while(c--)d[c]=y+gt(d[c]);S=et.test(e)&&vt(t.parentNode)||t,x=d.join(",")}if(x)try{return D.apply(r,S.querySelectorAll(x)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return a(e.replace(z,"$1"),t,r,i)}function ut(){function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function at(e){return e[w]=!0,e}function ft(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),i=e.length;while(i--)r.attrHandle[n[i]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||L)-(~e.sourceIndex||L);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function dt(e){return at(function(t){return t=+t,at(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function vt(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function mt(){}function gt(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var r=t.dir,i=n&&"parentNode"===r,s=x++;return t.first?function(t,n,s){while(t=t[r])if(1===t.nodeType||i)return e(t,n,s)}:function(t,n,o){var u,a,f=[S,s];if(o){while(t=t[r])if((1===t.nodeType||i)&&e(t,n,o))return!0}else while(t=t[r])if(1===t.nodeType||i){if(a=t[w]||(t[w]={}),(u=a[r])&&u[0]===S&&u[1]===s)return f[2]=u[2];if(a[r]=f,f[2]=e(t,n,o))return!0}}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function wt(e,t,n){for(var r=0,i=t.length;i>r;r++)ot(e,t[r],n);return n}function Et(e,t,n,r,i){for(var s,o=[],u=0,a=e.length,f=null!=t;a>u;u++)(s=e[u])&&(!n||n(s,r,i))&&(o.push(s),f&&t.push(u));return o}function St(e,t,n,r,i,s){return r&&!r[w]&&(r=St(r)),i&&!i[w]&&(i=St(i,s)),at(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||wt(t||"*",u.nodeType?[u]:u,[]),m=!e||!s&&t?v:Et(v,h,e,u,a),g=n?i||(s?e:d||r)?[]:o:m;if(n&&n(m,g,u,a),r){f=Et(g,p),r(f,[],u,a),l=f.length;while(l--)(c=f[l])&&(g[p[l]]=!(m[p[l]]=c))}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?H(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=Et(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):D.apply(o,g)})}function xt(e){for(var t,n,i,s=e.length,o=r.relative[e[0].type],u=o||r.relative[" "],a=o?1:0,l=yt(function(e){return e===t},u,!0),c=yt(function(e){return H(t,e)>-1},u,!0),h=[function(e,n,r){var i=!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r));return t=null,i}];s>a;a++)if(n=r.relative[e[a].type])h=[yt(bt(h),n)];else{if(n=r.filter[e[a].type].apply(null,e[a].matches),n[w]){for(i=++a;s>i;i++)if(r.relative[e[i].type])break;return St(a>1&&bt(h),a>1&>(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(z,"$1"),n,i>a&&xt(e.slice(a,i)),s>i&&xt(e=e.slice(i)),s>i&>(e))}h.push(n)}return bt(h)}function Tt(e,t){var n=t.length>0,i=e.length>0,s=function(s,o,u,a,l){var c,h,d,v=0,m="0",g=s&&[],y=[],b=f,w=s||i&&r.find.TAG("*",l),E=S+=null==b?1:Math.random()||.1,x=w.length;for(l&&(f=o!==p&&o);m!==x&&null!=(c=w[m]);m++){if(i&&c){h=0;while(d=e[h++])if(d(c,o,u)){a.push(c);break}l&&(S=E)}n&&((c=!d&&c)&&v--,s&&g.push(c))}if(v+=m,n&&m!==v){h=0;while(d=t[h++])d(g,y,o,u);if(s){if(v>0)while(m--)g[m]||y[m]||(y[m]=M.call(a));y=Et(y)}D.apply(a,y),l&&!s&&y.length>0&&v+t.length>1&&ot.uniqueSort(a)}return l&&(S=E,f=b),g};return n?at(s):s}var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w="sizzle"+1*new Date,E=e.document,S=0,x=0,T=ut(),N=ut(),C=ut(),k=function(e,t){return e===t&&(c=!0),0},L=1<<31,A={}.hasOwnProperty,O=[],M=O.pop,_=O.push,D=O.push,P=O.slice,H=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",I=F.replace("w","w#"),q="\\["+j+"*("+F+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+j+"*\\]",R=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+q+")*)|.*)\\)|)",U=new RegExp(j+"+","g"),z=new RegExp("^"+j+"+|((?:^|[^\\\\])(?:\\\\.)*)"+j+"+$","g"),W=new RegExp("^"+j+"*,"+j+"*"),X=new RegExp("^"+j+"*([>+~]|"+j+")"+j+"*"),V=new RegExp("="+j+"*([^\\]'\"]*?)"+j+"*\\]","g"),$=new RegExp(R),J=new RegExp("^"+I+"$"),K={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+B+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/[+~]/,tt=/'|\\/g,nt=new RegExp("\\\\([\\da-f]{1,6}"+j+"?|("+j+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},it=function(){h()};try{D.apply(O=P.call(E.childNodes),E.childNodes),O[E.childNodes.length].nodeType}catch(st){D={apply:O.length?function(e,t){_.apply(e,P.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}n=ot.support={},s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},h=ot.setDocument=function(e){var t,i,o=e?e.ownerDocument||e:E;return o!==p&&9===o.nodeType&&o.documentElement?(p=o,d=o.documentElement,i=o.defaultView,i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",it,!1):i.attachEvent&&i.attachEvent("onunload",it)),v=!s(o),n.attributes=ft(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ft(function(e){return e.appendChild(o.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Y.test(o.getElementsByClassName),n.getById=ft(function(e){return d.appendChild(e).id=w,!o.getElementsByName||!o.getElementsByName(w).length}),n.getById?(r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&v){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if("*"===e){while(n=s[i++])1===n.nodeType&&r.push(n);return r}return s},r.find.CLASS=n.getElementsByClassName&&function(e,t){return v?t.getElementsByClassName(e):void 0},g=[],m=[],(n.qsa=Y.test(o.querySelectorAll))&&(ft(function(e){d.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+j+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+j+"*(?:value|"+B+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]")}),ft(function(e){var t=o.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+j+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Y.test(y=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ft(function(e){n.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),g.push("!=",R)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=Y.test(d.compareDocumentPosition),b=t||Y.test(d.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&1===r.nodeType&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},k=t?function(e,t){if(e===t)return c=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===o||e.ownerDocument===E&&b(E,e)?-1:t===o||t.ownerDocument===E&&b(E,t)?1:l?H(l,e)-H(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,r=0,i=e.parentNode,s=t.parentNode,u=[e],a=[t];if(!i||!s)return e===o?-1:t===o?1:i?-1:s?1:l?H(l,e)-H(l,t):0;if(i===s)return ct(e,t);n=e;while(n=n.parentNode)u.unshift(n);n=t;while(n=n.parentNode)a.unshift(n);while(u[r]===a[r])r++;return r?ct(u[r],a[r]):u[r]===E?-1:a[r]===E?1:0},o):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&h(e),t=t.replace(V,"='$1']"),!(!n.matchesSelector||!v||g&&g.test(t)||m&&m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),b(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var i=r.attrHandle[t.toLowerCase()],s=i&&A.call(r.attrHandle,t.toLowerCase())?i(e,t,!v):void 0;return void 0!==s?s:n.attributes||!v?e.getAttribute(t):(s=e.getAttributeNode(t))&&s.specified?s.value:null},ot.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,s=0;if(c=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(k),c){while(t=e[s++])t===e[s]&&(i=r.push(s));while(i--)e.splice(r[i],1)}return l=null,e},i=ot.getText=function(e){var t,n="",r=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===s||4===s)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},r=ot.selectors={cacheLength:50,createPseudo:at,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[3]||e[4]||e[5]||"").replace(nt,rt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&T(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(U," ")+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;d=v="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&y){l=m[w]||(m[w]={}),f=l[e]||[],p=f[0]===S&&f[1],h=f[0]===S&&f[2],c=p&&m.childNodes[p];while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if(1===c.nodeType&&++h&&c===t){l[e]=[S,p,h];break}}else if(y&&(f=(t[w]||(t[w]={}))[e])&&f[0]===S)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++h&&(y&&((c[w]||(c[w]={}))[e]=[S,h]),c===t))break;return h-=i,h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var r,s=i(e,t),o=s.length;while(o--)r=H(e,s[o]),e[r]=!(n[r]=s[o])}):function(e){return i(e,0,n)}):i}},pseudos:{not:at(function(e){var t=[],n=[],r=u(e.replace(z,"$1"));return r[w]?at(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)(s=o[u])&&(e[u]=!(t[u]=s))}):function(e,i,s){return t[0]=e,r(t,null,s,n),t[0]=null,!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return e=e.replace(nt,rt),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:at(function(e){return J.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:dt(function(){return[0]}),last:dt(function(e,t){return[t-1]}),eq:dt(function(e,t,n){return[0>n?n+t:n]}),even:dt(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:dt(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:dt(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:dt(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},r.pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=ht(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pt(t);return mt.prototype=r.filters=r.pseudos,r.setFilters=new mt,o=ot.tokenize=function(e,t){var n,i,s,o,u,a,f,l=N[e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=r.preFilter;while(u){(!n||(i=W.exec(u)))&&(i&&(u=u.slice(i[0].length)||u),a.push(s=[])),n=!1,(i=X.exec(u))&&(n=i.shift(),s.push({value:n,type:i[0].replace(z," ")}),u=u.slice(n.length));for(o in r.filter)!(i=K[o].exec(u))||f[o]&&!(i=f[o](i))||(n=i.shift(),s.push({value:n,type:o,matches:i}),u=u.slice(n.length));if(!n)break}return t?u.length:u?ot.error(e):N(e,a).slice(0)},u=ot.compile=function(e,t){var n,r=[],i=[],s=C[e+" "];if(!s){t||(t=o(e)),n=t.length;while(n--)s=xt(t[n]),s[w]?r.push(s):i.push(s);s=C(e,Tt(i,r)),s.selector=e}return s},a=ot.select=function(e,t,i,s){var a,f,l,c,h,p="function"==typeof e&&e,d=!s&&o(e=p.selector||e);if(i=i||[],1===d.length){if(f=d[0]=d[0].slice(0),f.length>2&&"ID"===(l=f[0]).type&&n.getById&&9===t.nodeType&&v&&r.relative[f[1].type]){if(t=(r.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return i;p&&(t=t.parentNode),e=e.slice(f.shift().value.length)}a=K.needsContext.test(e)?0:f.length;while(a--){if(l=f[a],r.relative[c=l.type])break;if((h=r.find[c])&&(s=h(l.matches[0].replace(nt,rt),et.test(f[0].type)&&vt(t.parentNode)||t))){if(f.splice(a,1),e=s.length&>(f),!e)return D.apply(i,s),i;break}}}return(p||u(e,d))(s,t,!v,i,et.test(e)&&vt(t.parentNode)||t),i},n.sortStable=w.split("").sort(k).join("")===w,n.detectDuplicates=!!c,h(),n.sortDetached=ft(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),ft(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ft(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),ft(function(e){return null==e.getAttribute("disabled")})||lt(B,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),ot}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;n.filter=function(e,t,r){var i=t[0];return r&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?n.find.matchesSelector(i,e)?[i]:[]:n.find.matches(e,n.grep(t,function(e){return 1===e.nodeType}))},n.fn.extend({find:function(e){var t,r=this.length,i=[],s=this;if("string"!=typeof e)return this.pushStack(n(e).filter(function(){for(t=0;r>t;t++)if(n.contains(s[t],this))return!0}));for(t=0;r>t;t++)n.find(e,s[t],i);return i=this.pushStack(r>1?n.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(x(this,e||[],!1))},not:function(e){return this.pushStack(x(this,e||[],!0))},is:function(e){return!!x(this,"string"==typeof e&&u.test(e)?n(e):e||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(e,t){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:z.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||y).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof n?t[0]:t,n.merge(this,n.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:l,!0)),v.test(r[1])&&n.isPlainObject(t))for(r in t)n.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=l.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=l,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):n.isFunction(e)?"undefined"!=typeof y.ready?y.ready(e):e(n):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),n.makeArray(e,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(e,t,r){var i=[],s=void 0!==r;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(s&&n(e).is(r))break;i.push(e)}return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),n.fn.extend({has:function(e){var t=n(e,this),r=t.length;return this.filter(function(){for(var e=0;r>e;e++)if(n.contains(this,t[e]))return!0})},closest:function(e,t){for(var r,i=0,s=this.length,o=[],a=u.test(e)||"string"!=typeof e?n(e,t||this.context):0;s>i;i++)for(r=this[i];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(a?a.index(r)>-1:1===r.nodeType&&n.find.matchesSelector(r,e))){o.push(r);break}return this.pushStack(o.length>1?n.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(n(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(n.unique(n.merge(this.get(),n(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),n.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return n.dir(e,"parentNode")},parentsUntil:function(e,t,r){return n.dir(e,"parentNode",r)},next:function(e){return D(e,"nextSibling")},prev:function(e){return D(e,"previousSibling")},nextAll:function(e){return n.dir(e,"nextSibling")},prevAll:function(e){return n.dir(e,"previousSibling")},nextUntil:function(e,t,r){return n.dir(e,"nextSibling",r)},prevUntil:function(e,t,r){return n.dir(e,"previousSibling",r)},siblings:function(e){return n.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return n.sibling(e.firstChild)},contents:function(e){return e.contentDocument||n.merge([],e.childNodes)}},function(e,t){n.fn[e]=function(r,i){var s=n.map(this,t,r);return"Until"!==e.slice(-5)&&(i=r),i&&"string"==typeof i&&(s=n.filter(i,s)),this.length>1&&(C[e]||n.unique(s),B.test(e)&&s.reverse()),this.pushStack(s)}});var E=/\S+/g,F={};n.Callbacks=function(e){e="string"==typeof e?F[e]||G(e):n.extend({},e);var t,r,i,s,o,u,a=[],f=!e.once&&[],l=function(n){for(t=e.memory&&n,r=!0,u=s||0,s=0,o=a.length,i=!0;a&&o>u;u++)if(a[u].apply(n[0],n[1])===!1&&e.stopOnFalse){t=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var r=a.length;!function u(t){n.each(t,function(t,r){var i=n.type(r);"function"===i?e.unique&&c.has(r)||a.push(r):r&&r.length&&"string"!==i&&u(r)})}(arguments),i?o=a.length:t&&(s=r,l(t))}return this},remove:function(){return a&&n.each(arguments,function(e,t){var r;while((r=n.inArray(t,a,r))>-1)a.splice(r,1),i&&(o>=r&&o--,u>=r&&u--)}),this},has:function(e){return e?n.inArray(e,a)>-1:!!a&&!!a.length},empty:function(){return a=[],o=0,this},disable:function(){return a=f=t=void 0,this},disabled:function(){return!a},lock:function(){return f=void 0,t||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return!a||r&&!f||(t=t||[],t=[e,t.slice?t.slice():t],i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},n.extend({Deferred:function(e){var t=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],r="pending",i={state:function(){return r},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var e=arguments;return n.Deferred(function(r){n.each(t,function(t,o){var u=n.isFunction(e[t])&&e[t];s[o[1]](function(){var e=u&&u.apply(this,arguments);e&&n.isFunction(e.promise)?e.promise().done(r.resolve).fail(r.reject).progress(r.notify):r[o[0]+"With"](this===i?r.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?n.extend(e,i):i}},s={};return i.pipe=i.then,n.each(t,function(e,n){var o=n[2],u=n[3];i[n[1]]=o.add,u&&o.add(function(){r=u},t[1^e][2].disable,t[2][2].lock),s[n[0]]=function(){return s[n[0]+"With"](this===s?i:this,arguments),this},s[n[0]+"With"]=o.fireWith}),i.promise(s),e&&e.call(s,s),s},when:function(e){var t=0,r=d.call(arguments),i=r.length,s=1!==i||e&&n.isFunction(e.promise)?i:0,o=1===s?e:n.Deferred(),u=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--s||o.resolveWith(t,n)}},a,f,l;if(i>1)for(a=new Array(i),f=new Array(i),l=new Array(i);i>t;t++)r[t]&&n.isFunction(r[t].promise)?r[t].promise().done(u(t,l,r)).fail(o.reject).progress(u(t,f,a)):--s;return s||o.resolveWith(l,r),o.promise()}});var H;n.fn.ready=function(e){return n.ready.promise().done(e),this},n.extend({isReady:!1,readyWait:1,holdReady:function(e){e?n.readyWait++:n.ready(!0)},ready:function(e){(e===!0?--n.readyWait:n.isReady)||(n.isReady=!0,e!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}}),n.ready.promise=function(e){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(e)},n.ready.promise();var J=n.access=function(e,t,r,i,s,o,u){var a=0,f=e.length,l=null==r;if("object"===n.type(r)){s=!0;for(a in r)n.access(e,t,a,r[a],!0,o,u)}else if(void 0!==i&&(s=!0,n.isFunction(i)||(u=!0),l&&(u?(t.call(e,i),t=null):(l=t,t=function(e,t,r){return l.call(n(e),r)})),t))for(;f>a;a++)t(e[a],r,u?i:i.call(e[a],a,t(e[a],r)));return s?e:l?t.call(e):f?t(e[0],r):o};n.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(e){if(!K.accepts(e))return 0;var t={},r=e[this.expando];if(!r){r=K.uid++;try{t[this.expando]={value:r},Object.defineProperties(e,t)}catch(i){t[this.expando]=r,n.extend(e,t)}}return this.cache[r]||(this.cache[r]={}),r},set:function(e,t,r){var i,s=this.key(e),o=this.cache[s];if("string"==typeof t)o[t]=r;else if(n.isEmptyObject(o))n.extend(this.cache[s],t);else for(i in t)o[i]=t[i];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,r){var i;return void 0===t||t&&"string"==typeof t&&void 0===r?(i=this.get(e,t),void 0!==i?i:this.get(e,n.camelCase(t))):(this.set(e,t,r),void 0!==r?r:t)},remove:function(e,t){var r,i,s,o=this.key(e),u=this.cache[o];if(void 0===t)this.cache[o]={};else{n.isArray(t)?i=t.concat(t.map(n.camelCase)):(s=n.camelCase(t),t in u?i=[t,s]:(i=s,i=i in u?[i]:i.match(E)||[])),r=i.length;while(r--)delete u[i[r]]}},hasData:function(e){return!n.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;n.extend({hasData:function(e){return M.hasData(e)||L.hasData(e)},data:function(e,t,n){return M.access(e,t,n)},removeData:function(e,t){M.remove(e,t)},_data:function(e,t,n){return L.access(e,t,n)},_removeData:function(e,t){L.remove(e,t)}}),n.fn.extend({data:function(e,t){var r,i,s,o=this[0],u=o&&o.attributes;if(void 0===e){if(this.length&&(s=M.get(o),1===o.nodeType&&!L.get(o,"hasDataAttrs"))){r=u.length;while(r--)u[r]&&(i=u[r].name,0===i.indexOf("data-")&&(i=n.camelCase(i.slice(5)),P(o,i,s[i])));L.set(o,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){M.set(this,e)}):J(this,function(t){var r,i=n.camelCase(e);if(o&&void 0===t){if(r=M.get(o,e),void 0!==r)return r;if(r=M.get(o,i),void 0!==r)return r;if(r=P(o,i,void 0),void 0!==r)return r}else this.each(function(){var n=M.get(this,i);M.set(this,i,t),-1!==e.indexOf("-")&&void 0!==n&&M.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){M.remove(this,e)})}}),n.extend({queue:function(e,t,r){var i;return e?(t=(t||"fx")+"queue",i=L.get(e,t),r&&(!i||n.isArray(r)?i=L.access(e,t,n.makeArray(r)):i.push(r)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var r=n.queue(e,t),i=r.length,s=r.shift(),o=n._queueHooks(e,t),u=function(){n.dequeue(e,t)};"inprogress"===s&&(s=r.shift(),i--),s&&("fx"===t&&r.unshift("inprogress"),delete o.stop,s.call(e,u,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return L.get(e,r)||L.access(e,r,{empty:n.Callbacks("once memory").add(function(){L.remove(e,[t+"queue",r])})})}}),n.fn.extend({queue:function(e,t){var r=2;return"string"!=typeof e&&(t=e,e="fx",r--),arguments.length<r?n.queue(this[0],e):void 0===t?this:this.each(function(){var r=n.queue(this,e,t);n._queueHooks(this,e),"fx"===e&&"inprogress"!==r[0]&&n.dequeue(this,e)})},dequeue:function(e){return this.each(function(){n.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var r,i=1,s=n.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(u--)r=L.get(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(t)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(e,t){return e=t||e,"none"===n.css(e,"display")||!n.contains(e.ownerDocument,e)},T=/^(?:checkbox|radio)$/i;!function(){var e=l.createDocumentFragment(),t=e.appendChild(l.createElement("div")),n=l.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),k.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;n.event={global:{},add:function(e,t,r,i,s){var o,u,a,f,l,c,h,p,d,v,m,g=L.get(e);if(g){r.handler&&(o=r,r=o.handler,s=o.selector),r.guid||(r.guid=n.guid++),(f=g.events)||(f=g.events={}),(u=g.handle)||(u=g.handle=function(t){return typeof n!==U&&n.event.triggered!==t.type?n.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(E)||[""],l=t.length;while(l--)a=Y.exec(t[l])||[],d=m=a[1],v=(a[2]||"").split(".").sort(),d&&(h=n.event.special[d]||{},d=(s?h.delegateType:h.bindType)||d,h=n.event.special[d]||{},c=n.extend({type:d,origType:m,data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&n.expr.match.needsContext.test(s),namespace:v.join(".")},o),(p=f[d])||(p=f[d]=[],p.delegateCount=0,h.setup&&h.setup.call(e,i,v,u)!==!1||e.addEventListener&&e.addEventListener(d,u,!1)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=r.guid)),s?p.splice(p.delegateCount++,0,c):p.push(c),n.event.global[d]=!0)}},remove:function(e,t,r,i,s){var o,u,a,f,l,c,h,p,d,v,m,g=L.hasData(e)&&L.get(e);if(g&&(f=g.events)){t=(t||"").match(E)||[""],l=t.length;while(l--)if(a=Y.exec(t[l])||[],d=m=a[1],v=(a[2]||"").split(".").sort(),d){h=n.event.special[d]||{},d=(i?h.delegateType:h.bindType)||d,p=f[d]||[],a=a[2]&&new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=p.length;while(o--)c=p[o],!s&&m!==c.origType||r&&r.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,h.remove&&h.remove.call(e,c));u&&!p.length&&(h.teardown&&h.teardown.call(e,v,g.handle)!==!1||n.removeEvent(e,d,g.handle),delete f[d])}else for(d in f)n.event.remove(e,d+t[l],r,i,!0);n.isEmptyObject(f)&&(delete g.handle,L.remove(e,"events"))}},trigger:function(e,t,r,i){var s,o,u,f,c,h,p,d=[r||l],v=j.call(e,"type")?e.type:e,m=j.call(e,"namespace")?e.namespace.split("."):[];if(o=u=r=r||l,3!==r.nodeType&&8!==r.nodeType&&!X.test(v+n.event.triggered)&&(v.indexOf(".")>=0&&(m=v.split("."),v=m.shift(),m.sort()),c=v.indexOf(":")<0&&"on"+v,e=e[n.expando]?e:new n.Event(v,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=m.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:n.makeArray(t,[e]),p=n.event.special[v]||{},i||!p.trigger||p.trigger.apply(r,t)!==!1)){if(!i&&!p.noBubble&&!n.isWindow(r)){for(f=p.delegateType||v,X.test(f+v)||(o=o.parentNode);o;o=o.parentNode)d.push(o),u=o;u===(r.ownerDocument||l)&&d.push(u.defaultView||u.parentWindow||a)}s=0;while((o=d[s++])&&!e.isPropagationStopped())e.type=s>1?f:p.bindType||v,h=(L.get(o,"events")||{})[e.type]&&L.get(o,"handle"),h&&h.apply(o,t),h=c&&o[c],h&&h.apply&&n.acceptData(o)&&(e.result=h.apply(o,t),e.result===!1&&e.preventDefault());return e.type=v,i||e.isDefaultPrevented()||p._default&&p._default.apply(d.pop(),t)!==!1||!n.acceptData(r)||c&&n.isFunction(r[v])&&!n.isWindow(r)&&(u=r[c],u&&(r[c]=null),n.event.triggered=v,r[v](),n.event.triggered=void 0,u&&(r[c]=u)),e.result}},dispatch:function(e){e=n.event.fix(e);var t,r,i,s,o,u=[],a=d.call(arguments),f=(L.get(this,"events")||{})[e.type]||[],l=n.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){u=n.event.handlers.call(this,e,f),t=0;while((s=u[t++])&&!e.isPropagationStopped()){e.currentTarget=s.elem,r=0;while((o=s.handlers[r++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,i=((n.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,a),void 0!==i&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var r,i,s,o,u=[],a=t.delegateCount,f=e.target;if(a&&f.nodeType&&(!e.button||"click"!==e.type))for(;f!==this;f=f.parentNode||this)if(f.disabled!==!0||"click"!==e.type){for(i=[],r=0;a>r;r++)o=t[r],s=o.selector+" ",void 0===i[s]&&(i[s]=o.needsContext?n(s,this).index(f)>=0:n.find(s,this,null,[f]).length),i[s]&&i.push(o);i.length&&u.push({elem:f,handlers:i})}return a<t.length&&u.push({elem:this,handlers:t.slice(a)}),u},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||l,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===s||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[n.expando])return e;var t,r,i,s=e.type,o=e,u=this.fixHooks[s];u||(this.fixHooks[s]=u=W.test(s)?this.mouseHooks:V.test(s)?this.keyHooks:{}),i=u.props?this.props.concat(u.props):this.props,e=new n.Event(o),t=i.length;while(t--)r=i[t],e[r]=o[r];return e.target||(e.target=l),3===e.target.nodeType&&(e.target=e.target.parentNode),u.filter?u.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return n.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,r,i){var s=n.extend(new n.Event,r,{type:e,isSimulated:!0,originalEvent:{}});i?n.event.trigger(s,null,t):n.event.dispatch.call(t,s),s.isDefaultPrevented()&&r.preventDefault()}},n.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},n.Event=function(e,t){return this instanceof n.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?Z:$):this.type=e,t&&n.extend(this,t),this.timeStamp=e&&e.timeStamp||n.now(),void (this[n.expando]=!0)):new n.Event(e,t)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Z,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Z,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Z,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){n.event.special[e]={delegateType:t,bindType:t,handle:function(e){var r,i=this,s=e.relatedTarget,o=e.handleObj;return(!s||s!==i&&!n.contains(i,s))&&(e.type=o.origType,r=o.handler.apply(this,arguments),e.type=t),r}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(e,t){var r=function(e){n.event.simulate(t,e.target,n.event.fix(e),!0)};n.event.special[t]={setup:function(){var n=this.ownerDocument||this,i=L.access(n,t);i||n.addEventListener(e,r,!0),L.access(n,t,(i||0)+1)},teardown:function(){var n=this.ownerDocument||this,i=L.access(n,t)-1;i?L.access(n,t,i):(n.removeEventListener(e,r,!0),L.remove(n,t))}}}),n.fn.extend({on:function(e,t,r,i,s){var o,u;if("object"==typeof e){"string"!=typeof t&&(r=r||t,t=void 0);for(u in e)this.on(u,t,r,e[u],s);return this}if(null==r&&null==i?(i=t,r=t=void 0):null==i&&("string"==typeof t?(i=r,r=void 0):(i=r,r=t,t=void 0)),i===!1)i=$;else if(!i)return this;return 1===s&&(o=i,i=function(e){return n().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=n.guid++)),this.each(function(){n.event.add(this,e,i,r,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,n(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(s in e)this.off(s,t,e[s]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=$),this.each(function(){n.event.remove(this,e,r,t)})},trigger:function(e,t){return this.each(function(){n.event.trigger(e,t,this)})},triggerHandler:function(e,t){var r=this[0];return r?n.event.trigger(e,t,r,!0):void 0}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td,n.extend({clone:function(e,t,r){var i,s,o,u,a=e.cloneNode(!0),f=n.contains(e.ownerDocument,e);if(!(k.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||n.isXMLDoc(e)))for(u=oa(a),o=oa(e),i=0,s=o.length;s>i;i++)pa(o[i],u[i]);if(t)if(r)for(o=o||oa(e),u=u||oa(a),i=0,s=o.length;s>i;i++)na(o[i],u[i]);else na(e,a);return u=oa(a,"script"),u.length>0&&ma(u,!f&&oa(e,"script")),a},buildFragment:function(e,t,r,i){for(var s,o,u,a,f,l,c=t.createDocumentFragment(),h=[],p=0,d=e.length;d>p;p++)if(s=e[p],s||0===s)if("object"===n.type(s))n.merge(h,s.nodeType?[s]:s);else if(ca.test(s)){o=o||c.appendChild(t.createElement("div")),u=(ba.exec(s)||["",""])[1].toLowerCase(),a=ia[u]||ia._default,o.innerHTML=a[1]+s.replace(aa,"<$1></$2>")+a[2],l=a[0];while(l--)o=o.lastChild;n.merge(h,o.childNodes),o=c.firstChild,o.textContent=""}else h.push(t.createTextNode(s));c.textContent="",p=0;while(s=h[p++])if((!i||-1===n.inArray(s,i))&&(f=n.contains(s.ownerDocument,s),o=oa(c.appendChild(s),"script"),f&&ma(o),r)){l=0;while(s=o[l++])fa.test(s.type||"")&&r.push(s)}return c},cleanData:function(e){for(var t,r,i,s,o=n.event.special,u=0;void 0!==(r=e[u]);u++){if(n.acceptData(r)&&(s=r[L.expando],s&&(t=L.cache[s]))){if(t.events)for(i in t.events)o[i]?n.event.remove(r,i):n.removeEvent(r,i,t.handle);L.cache[s]&&delete L.cache[s]}delete M.cache[r[M.expando]]}}}),n.fn.extend({text:function(e){return J(this,function(e){return void 0===e?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ja(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ja(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var r,i=e?n.filter(e,this):this,s=0;null!=(r=i[s]);s++)t||1!==r.nodeType||n.cleanData(oa(r)),r.parentNode&&(t&&n.contains(r.ownerDocument,r)&&ma(oa(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(n.cleanData(oa(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return n.clone(this,e,t)})},html:function(e){return J(this,function(e){var t=this[0]||{},r=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!da.test(e)&&!ia[(ba.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(aa,"<$1></$2>");try{for(;i>r;r++)t=this[r]||{},1===t.nodeType&&(n.cleanData(oa(t,!1)),t.innerHTML=e);t=0}catch(s){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,n.cleanData(oa(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(t,r){t=e.apply([],t);var i,s,o,u,a,f,l=0,c=this.length,h=this,p=c-1,d=t[0],v=n.isFunction(d);if(v||c>1&&"string"==typeof d&&!k.checkClone&&ea.test(d))return this.each(function(e){var n=h.eq(e);v&&(t[0]=d.call(this,e,n.html())),n.domManip(t,r)});if(c&&(i=n.buildFragment(t,this[0].ownerDocument,!1,this),s=i.firstChild,1===i.childNodes.length&&(i=s),s)){for(o=n.map(oa(i,"script"),ka),u=o.length;c>l;l++)a=i,l!==p&&(a=n.clone(a,!0,!0),u&&n.merge(o,oa(a,"script"))),r.call(this[l],a,l);if(u)for(f=o[o.length-1].ownerDocument,n.map(o,la),l=0;u>l;l++)a=o[l],fa.test(a.type||"")&&!L.access(a,"globalEval")&&n.contains(f,a)&&(a.src?n._evalUrl&&n._evalUrl(a.src):n.globalEval(a.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){n.fn[e]=function(e){for(var r,i=[],s=n(e),o=s.length-1,u=0;o>=u;u++)r=u===o?this:this.clone(!0),n(s[u])[t](r),f.apply(i,r.get());return this.pushStack(i)}});var qa,ra={},ua=/^margin/,va=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wa=function(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):a.getComputedStyle(e,null)};!function(){var e,t,r=l.documentElement,i=l.createElement("div"),s=l.createElement("div");if(s.style){s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===s.style.backgroundClip,i.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",i.appendChild(s);function o(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",s.innerHTML="",r.appendChild(i);var n=a.getComputedStyle(s,null);e="1%"!==n.top,t="4px"===n.width,r.removeChild(i)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return o(),e},boxSizingReliable:function(){return null==t&&o(),t},reliableMarginRight:function(){var e,t=s.appendChild(l.createElement("div"));return t.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",s.style.width="1px",r.appendChild(i),e=!parseFloat(a.getComputedStyle(t,null).marginRight),r.removeChild(i),s.removeChild(t),e}})}}(),n.swap=function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i};var za=/^(none|table(?!-c[ea]).+)/,Aa=new RegExp("^("+Q+")(.*)$","i"),Ba=new RegExp("^([+-])=("+Q+")","i"),Ca={position:"absolute",visibility:"hidden",display:"block"},Da={letterSpacing:"0",fontWeight:"400"},Ea=["Webkit","O","Moz","ms"];n.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=xa(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,u,a=n.camelCase(t),f=e.style;return t=n.cssProps[a]||(n.cssProps[a]=Fa(f,a)),u=n.cssHooks[t]||n.cssHooks[a],void 0===r?u&&"get"in u&&void 0!==(s=u.get(e,!1,i))?s:f[t]:(o=typeof r,"string"===o&&(s=Ba.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(n.css(e,t)),o="number"),null!=r&&r===r&&("number"!==o||n.cssNumber[a]||(r+="px"),k.clearCloneStyle||""!==r||0!==t.indexOf("background")||(f[t]="inherit"),u&&"set"in u&&void 0===(r=u.set(e,r,i))||(f[t]=r)),void 0)}},css:function(e,t,r,i){var s,o,u,a=n.camelCase(t);return t=n.cssProps[a]||(n.cssProps[a]=Fa(e.style,a)),u=n.cssHooks[t]||n.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,r)),void 0===s&&(s=xa(e,t,i)),"normal"===s&&t in Da&&(s=Da[t]),""===r||r?(o=parseFloat(s),r===!0||n.isNumeric(o)?o||0:s):s}}),n.each(["height","width"],function(e,t){n.cssHooks[t]={get:function(e,r,i){return r?za.test(n.css(e,"display"))&&0===e.offsetWidth?n.swap(e,Ca,function(){return Ia(e,t,i)}):Ia(e,t,i):void 0},set:function(e,r,i){var s=i&&wa(e);return Ga(e,r,i?Ha(e,t,i,"border-box"===n.css(e,"boxSizing",!1,s),s):0)}}}),n.cssHooks.marginRight=ya(k.reliableMarginRight,function(e,t){return t?n.swap(e,{display:"inline-block"},xa,[e,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(e,t){n.cssHooks[e+t]={expand:function(n){for(var r=0,i={},s="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+R[r]+t]=s[r]||s[r-2]||s[0];return i}},ua.test(e)||(n.cssHooks[e+t].set=Ga)}),n.fn.extend({css:function(e,t){return J(this,function(e,t,r){var i,s,o={},u=0;if(n.isArray(t)){for(i=wa(e),s=t.length;s>u;u++)o[t[u]]=n.css(e,t[u],!1,i);return o}return void 0!==r?n.style(e,t,r):n.css(e,t)},e,t,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}}),n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(e,t,r,i,s,o){this.elem=e,this.prop=r,this.easing=s||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(n.cssNumber[r]?"":"px")},cur:function(){var e=Ka.propHooks[this.prop];return e&&e.get?e.get(this):Ka.propHooks._default.get(this)},run:function(e){var t,r=Ka.propHooks[this.prop];return this.options.duration?this.pos=t=n.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=n.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){n.fx.step[e.prop]?n.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[n.cssProps[e.prop]]||n.cssHooks[e.prop])?n.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},n.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var La,Ma,Na=/^(?:toggle|show|hide)$/,Oa=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pa=/queueHooks$/,Qa=[Va],Ra={"*":[function(e,t){var r=this.createTween(e,t),i=r.cur(),s=Oa.exec(t),o=s&&s[3]||(n.cssNumber[e]?"":"px"),u=(n.cssNumber[e]||"px"!==o&&+i)&&Oa.exec(n.css(r.elem,e)),a=1,f=20;if(u&&u[3]!==o){o=o||u[3],s=s||[],u=+i||1;do a=a||".5",u/=a,n.style(r.elem,e,u+o);while(a!==(a=r.cur()/i)&&1!==a&&--f)}return s&&(u=r.start=+u||+i||0,r.unit=o,r.end=s[1]?u+(s[1]+1)*s[2]:+s[2]),r}]};n.Animation=n.extend(Xa,{tweener:function(e,t){n.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var r,i=0,s=e.length;s>i;i++)r=e[i],Ra[r]=Ra[r]||[],Ra[r].unshift(t)},prefilter:function(e,t){t?Qa.unshift(e):Qa.push(e)}}),n.speed=function(e,t,r){var i=e&&"object"==typeof e?n.extend({},e):{complete:r||!r&&t||n.isFunction(e)&&e,duration:e,easing:r&&t||t&&!n.isFunction(t)&&t};return i.duration=n.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in n.fx.speeds?n.fx.speeds[i.duration]:n.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){n.isFunction(i.old)&&i.old.call(this),i.queue&&n.dequeue(this,i.queue)},i},n.fn.extend({fadeTo:function(e,t,n,r){return this.filter(S).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,r,i){var s=n.isEmptyObject(e),o=n.speed(t,r,i),u=function(){var t=Xa(this,n.extend({},e),o);(s||L.get(this,"finish"))&&t.stop(!0)};return u.finish=u,s||o.queue===!1?this.each(u):this.queue(o.queue,u)},stop:function(e,t,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,s=null!=e&&e+"queueHooks",o=n.timers,u=L.get(this);if(s)u[s]&&u[s].stop&&i(u[s]);else for(s in u)u[s]&&u[s].stop&&Pa.test(s)&&i(u[s]);for(s=o.length;s--;)o[s].elem!==this||null!=e&&o[s].queue!==e||(o[s].anim.stop(r),t=!1,o.splice(s,1));(t||!r)&&n.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,r=L.get(this),i=r[e+"queue"],s=r[e+"queueHooks"],o=n.timers,u=i?i.length:0;for(r.finish=!0,n.queue(this,e,[]),s&&s.stop&&s.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;u>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete r.finish})}}),n.each(["toggle","show","hide"],function(e,t){var r=n.fn[t];n.fn[t]=function(e,n,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(Ta(t,!0),e,n,i)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){n.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),n.timers=[],n.fx.tick=function(){var e,t=0,r=n.timers;for(La=n.now();t<r.length;t++)e=r[t],e()||r[t]!==e||r.splice(t--,1);r.length||n.fx.stop(),La=void 0},n.fx.timer=function(e){n.timers.push(e),e()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ma||(Ma=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Ma),Ma=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(e,t){return e=n.fx?n.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e=l.createElement("input"),t=l.createElement("select"),n=t.appendChild(l.createElement("option"));e.type="checkbox",k.checkOn=""!==e.value,k.optSelected=n.selected,t.disabled=!0,k.optDisabled=!n.disabled,e=l.createElement("input"),e.value="t",e.type="radio",k.radioValue="t"===e.value}();var Ya,Za,$a=n.expr.attrHandle;n.fn.extend({attr:function(e,t){return J(this,n.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){n.removeAttr(this,e)})}}),n.extend({attr:function(e,t,r){var i,s,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===U?n.prop(e,t,r):(1===o&&n.isXMLDoc(e)||(t=t.toLowerCase(),i=n.attrHooks[t]||(n.expr.match.bool.test(t)?Za:Ya)),void 0===r?i&&"get"in i&&null!==(s=i.get(e,t))?s:(s=n.find.attr(e,t),null==s?void 0:s):null!==r?i&&"set"in i&&void 0!==(s=i.set(e,r,t))?s:(e.setAttribute(t,r+""),r):void n.removeAttr(e,t))},removeAttr:function(e,t){var r,i,s=0,o=t&&t.match(E);if(o&&1===e.nodeType)while(r=o[s++])i=n.propFix[r]||r,n.expr.match.bool.test(r)&&(e[i]=!1),e.removeAttribute(r)},attrHooks:{type:{set:function(e,t){if(!k.radioValue&&"radio"===t&&n.nodeName(e,"input")){var r=e.value;return e.setAttribute("type",t),r&&(e.value=r),t}}}}}),Za={set:function(e,t,r){return t===!1?n.removeAttr(e,r):e.setAttribute(r,r),r}},n.each(n.expr.match.bool.source.match(/\w+/g),function(e,t){var r=$a[t]||n.find.attr;$a[t]=function(e,t,n){var i,s;return n||(s=$a[t],$a[t]=i,i=null!=r(e,t,n)?t.toLowerCase():null,$a[t]=s),i}});var _a=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(e,t){return J(this,n.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[n.propFix[e]||e]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,r){var i,s,o,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return o=1!==u||!n.isXMLDoc(e),o&&(t=n.propFix[t]||t,s=n.propHooks[t]),void 0!==r?s&&"set"in s&&void 0!==(i=s.set(e,r,t))?i:e[t]=r:s&&"get"in s&&null!==(i=s.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||_a.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ab=/[\t\r\n\f]/g;n.fn.extend({addClass:function(e){var t,r,i,s,o,u,a="string"==typeof e&&e,f=0,l=this.length;if(n.isFunction(e))return this.each(function(t){n(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(E)||[];l>f;f++)if(r=this[f],i=1===r.nodeType&&(r.className?(" "+r.className+" ").replace(ab," "):" ")){o=0;while(s=t[o++])i.indexOf(" "+s+" ")<0&&(i+=s+" ");u=n.trim(i),r.className!==u&&(r.className=u)}return this},removeClass:function(e){var t,r,i,s,o,u,a=0===arguments.length||"string"==typeof e&&e,f=0,l=this.length;if(n.isFunction(e))return this.each(function(t){n(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(E)||[];l>f;f++)if(r=this[f],i=1===r.nodeType&&(r.className?(" "+r.className+" ").replace(ab," "):"")){o=0;while(s=t[o++])while(i.indexOf(" "+s+" ")>=0)i=i.replace(" "+s+" "," ");u=e?n.trim(i):"",r.className!==u&&(r.className=u)}return this},toggleClass:function(e,t){var r=typeof e;return"boolean"==typeof t&&"string"===r?t?this.addClass(e):this.removeClass(e):this.each(n.isFunction(e)?function(r){n(this).toggleClass(e.call(this,r,this.className,t),t)}:function(){if("string"===r){var t,i=0,s=n(this),o=e.match(E)||[];while(t=o[i++])s.hasClass(t)?s.removeClass(t):s.addClass(t)}else(r===U||"boolean"===r)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||e===!1?"":L.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(ab," ").indexOf(t)>=0)return!0;return!1}});var bb=/\r/g;n.fn.extend({val:function(e){var t,r,i,s=this[0];if(arguments.length)return i=n.isFunction(e),this.each(function(r){var s;1===this.nodeType&&(s=i?e.call(this,r,n(this).val()):e,null==s?s="":"number"==typeof s?s+="":n.isArray(s)&&(s=n.map(s,function(e){return null==e?"":e+""})),t=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,s,"value")||(this.value=s))});if(s)return t=n.valHooks[s.type]||n.valHooks[s.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(s,"value"))?r:(r=s.value,"string"==typeof r?r.replace(bb,""):null==r?"":r)}}),n.extend({valHooks:{option:{get:function(e){var t=n.find.attr(e,"value");return null!=t?t:n.trim(n.text(e))}},select:{get:function(e){for(var t,r,i=e.options,s=e.selectedIndex,o="select-one"===e.type||0>s,u=o?null:[],a=o?s+1:i.length,f=0>s?a:o?s:0;a>f;f++)if(r=i[f],!(!r.selected&&f!==s||(k.optDisabled?r.disabled:null!==r.getAttribute("disabled"))||r.parentNode.disabled&&n.nodeName(r.parentNode,"optgroup"))){if(t=n(r).val(),o)return t;u.push(t)}return u},set:function(e,t){var r,i,s=e.options,o=n.makeArray(t),u=s.length;while(u--)i=s[u],(i.selected=n.inArray(i.value,o)>=0)&&(r=!0);return r||(e.selectedIndex=-1),o}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(e,t){return n.isArray(t)?e.checked=n.inArray(n(e).val(),t)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){n.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),n.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var cb=n.now(),db=/\?/;n.parseJSON=function(e){return JSON.parse(e+"")},n.parseXML=function(e){var t,r;if(!e||"string"!=typeof e)return null;try{r=new DOMParser,t=r.parseFromString(e,"text/xml")}catch(i){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+e),t};var eb=/#.*$/,fb=/([?&])_=[^&]*/,gb=/^(.*?):[ \t]*([^\r\n]*)$/gm,hb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ib=/^(?:GET|HEAD)$/,jb=/^\/\//,kb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lb={},mb={},nb="*/".concat("*"),ob=a.location.href,pb=kb.exec(ob.toLowerCase())||[];n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ob,type:"GET",isLocal:hb.test(pb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?sb(sb(e,n.ajaxSettings),t):sb(n.ajaxSettings,e)},ajaxPrefilter:qb(lb),ajaxTransport:qb(mb),ajax:function(e,t){function T(e,t,o,a){var l,g,y,w,E,x=t;2!==b&&(b=2,u&&clearTimeout(u),r=void 0,s=a||"",S.readyState=e>0?4:0,l=e>=200&&300>e||304===e,o&&(w=tb(c,S,o)),w=ub(c,w,S,l),l?(c.ifModified&&(E=S.getResponseHeader("Last-Modified"),E&&(n.lastModified[i]=E),E=S.getResponseHeader("etag"),E&&(n.etag[i]=E)),204===e||"HEAD"===c.type?x="nocontent":304===e?x="notmodified":(x=w.state,g=w.data,y=w.error,l=!y)):(y=x,(e||!x)&&(x="error",0>e&&(e=0))),S.status=e,S.statusText=(t||x)+"",l?d.resolveWith(h,[g,x,S]):d.rejectWith(h,[S,x,y]),S.statusCode(m),m=void 0,f&&p.trigger(l?"ajaxSuccess":"ajaxError",[S,c,l?g:y]),v.fireWith(h,[S,x]),f&&(p.trigger("ajaxComplete",[S,c]),--n.active||n.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,s,o,u,a,f,l,c=n.ajaxSetup({},t),h=c.context||c,p=c.context&&(h.nodeType||h.jquery)?n(h):n.event,d=n.Deferred(),v=n.Callbacks("once memory"),m=c.statusCode||{},g={},y={},b=0,w="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!o){o={};while(t=gb.exec(s))o[t[1].toLowerCase()]=t[2]}t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,g[e]=t),this},overrideMimeType:function(e){return b||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else S.always(e[S.status]);return this},abort:function(e){var t=e||w;return r&&r.abort(t),T(0,t),this}};if(d.promise(S).complete=v.add,S.success=S.done,S.error=S.fail,c.url=((e||c.url||ob)+"").replace(eb,"").replace(jb,pb[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=n.trim(c.dataType||"*").toLowerCase().match(E)||[""],null==c.crossDomain&&(a=kb.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===pb[1]&&a[2]===pb[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(pb[3]||("http:"===pb[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=n.param(c.data,c.traditional)),rb(lb,c,t,S),2===b)return S;f=n.event&&c.global,f&&0===n.active++&&n.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!ib.test(c.type),i=c.url,c.hasContent||(c.data&&(i=c.url+=(db.test(i)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=fb.test(i)?i.replace(fb,"$1_="+cb++):i+(db.test(i)?"&":"?")+"_="+cb++)),c.ifModified&&(n.lastModified[i]&&S.setRequestHeader("If-Modified-Since",n.lastModified[i]),n.etag[i]&&S.setRequestHeader("If-None-Match",n.etag[i])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&S.setRequestHeader("Content-Type",c.contentType),S.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+nb+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)S.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,S,c)!==!1&&2!==b){w="abort";for(l in{success:1,error:1,complete:1})S[l](c[l]);if(r=rb(mb,c,t,S)){S.readyState=1,f&&p.trigger("ajaxSend",[S,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){S.abort("timeout")},c.timeout));try{b=1,r.send(g,T)}catch(x){if(!(2>b))throw x;T(-1,x)}}else T(-1,"No Transport");return S}return S.abort()},getJSON:function(e,t,r){return n.get(e,t,r,"json")},getScript:function(e,t){return n.get(e,void 0,t,"script")}}),n.each(["get","post"],function(e,t){n[t]=function(e,r,i,s){return n.isFunction(r)&&(s=s||i,i=r,r=void 0),n.ajax({url:e,type:t,dataType:s,data:r,success:i})}}),n._evalUrl=function(e){return n.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(e){var t;return n.isFunction(e)?this.each(function(t){n(this).wrapAll(e.call(this,t))}):(this[0]&&(t=n(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return this.each(n.isFunction(e)?function(t){n(this).wrapInner(e.call(this,t))}:function(){var t=n(this),r=t.contents();r.length?r.wrapAll(e):t.append(e)})},wrap:function(e){var t=n.isFunction(e);return this.each(function(r){n(this).wrapAll(t?e.call(this,r):e)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},n.expr.filters.visible=function(e){return!n.expr.filters.hidden(e)};var vb=/%20/g,wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;n.param=function(e,t){var r,i=[],s=function(e,t){t=n.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(e)||e.jquery&&!n.isPlainObject(e))n.each(e,function(){s(this.name,this.value)});else for(r in e)Ab(r,e[r],t,s);return i.join("&").replace(vb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=n.prop(this,"elements");return e?n.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!n(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(e)&&(this.checked||!T.test(e))}).map(function(e,t){var r=n(this).val();return null==r?null:n.isArray(r)?n.map(r,function(e){return{name:t.name,value:e.replace(xb,"\r\n")}}):{name:t.name,value:r.replace(xb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var e in Cb)Cb[e]()}),k.cors=!!Eb&&"withCredentials"in Eb,k.ajax=Eb=!!Eb,n.ajaxTransport(function(e){var t;return k.cors||Eb&&!e.crossDomain?{send:function(n,r){var i,s=e.xhr(),o=++Bb;if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)s[i]=e.xhrFields[i];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)s.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete Cb[o],t=s.onload=s.onerror=null,"abort"===e?s.abort():"error"===e?r(s.status,s.statusText):r(Db[s.status]||s.status,s.statusText,"string"==typeof s.responseText?{text:s.responseText}:void 0,s.getAllResponseHeaders()))}},s.onload=t(),s.onerror=t("error"),t=Cb[o]=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(u){if(t)throw u}},abort:function(){t&&t()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return n.globalEval(e),e}}}),n.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),n.ajaxTransport("script",function(e){if(e.crossDomain){var t,r;return{send:function(i,s){t=n("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",r=function(e){t.remove(),r=null,e&&s("error"===e.type?404:200,e.type)}),l.head.appendChild(t[0])},abort:function(){r&&r()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fb.pop()||n.expando+"_"+cb++;return this[e]=!0,e}}),n.ajaxPrefilter("json jsonp",function(e,t,r){var i,s,o,u=e.jsonp!==!1&&(Gb.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(e.data)&&"data");return u||"jsonp"===e.dataTypes[0]?(i=e.jsonpCallback=n.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,u?e[u]=e[u].replace(Gb,"$1"+i):e.jsonp!==!1&&(e.url+=(db.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||n.error(i+" was not called"),o[0]},e.dataTypes[0]="json",s=a[i],a[i]=function(){o=arguments},r.always(function(){a[i]=s,e[i]&&(e.jsonpCallback=t.jsonpCallback,Fb.push(i)),o&&n.isFunction(s)&&s(o[0]),o=s=void 0}),"script"):void 0}),n.parseHTML=function(e,t,r){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(r=t,t=!1),t=t||l;var i=v.exec(e),s=!r&&[];return i?[t.createElement(i[1])]:(i=n.buildFragment([e],t,s),s&&s.length&&n(s).remove(),n.merge([],i.childNodes))};var Hb=n.fn.load;n.fn.load=function(e,t,r){if("string"!=typeof e&&Hb)return Hb.apply(this,arguments);var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=n.trim(e.slice(a)),e=e.slice(0,a)),n.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),u.length>0&&n.ajax({url:e,type:s,dataType:"html",data:t}).done(function(e){o=arguments,u.html(i?n("<div>").append(n.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){u.each(r,o||[e.responseText,t,e])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){n.fn[t]=function(e){return this.on(t,e)}}),n.expr.filters.animated=function(e){return n.grep(n.timers,function(t){return e===t.elem}).length};var Ib=a.document.documentElement;n.offset={setOffset:function(e,t,r){var i,s,o,u,a,f,l,c=n.css(e,"position"),h=n(e),p={};"static"===c&&(e.style.position="relative"),a=h.offset(),o=n.css(e,"top"),f=n.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+f).indexOf("auto")>-1,l?(i=h.position(),u=i.top,s=i.left):(u=parseFloat(o)||0,s=parseFloat(f)||0),n.isFunction(t)&&(t=t.call(e,r,a)),null!=t.top&&(p.top=t.top-a.top+u),null!=t.left&&(p.left=t.left-a.left+s),"using"in t?t.using.call(e,p):h.css(p)}},n.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){n.offset.setOffset(this,e,t)});var t,r,i=this[0],s={top:0,left:0},o=i&&i.ownerDocument;if(o)return t=o.documentElement,n.contains(t,i)?(typeof i.getBoundingClientRect!==U&&(s=i.getBoundingClientRect()),r=Jb(o),{top:s.top+r.pageYOffset-t.clientTop,left:s.left+r.pageXOffset-t.clientLeft}):s},position:function(){if(this[0]){var e,t,r=this[0],i={top:0,left:0};return"fixed"===n.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),n.nodeName(e[0],"html")||(i=e.offset()),i.top+=n.css(e[0],"borderTopWidth",!0),i.left+=n.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-n.css(r,"marginTop",!0),left:t.left-i.left-n.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||Ib;while(e&&!n.nodeName(e,"html")&&"static"===n.css(e,"position"))e=e.offsetParent;return e||Ib})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var r="pageYOffset"===t;n.fn[e]=function(n){return J(this,function(e,n,i){var s=Jb(e);return void 0===i?s?s[t]:e[n]:void (s?s.scrollTo(r?a.pageXOffset:i,r?i:a.pageYOffset):e[n]=i)},e,n,arguments.length,null)}}),n.each(["top","left"],function(e,t){n.cssHooks[t]=ya(k.pixelPosition,function(e,r){return r?(r=xa(e,t),va.test(r)?n(e).position()[t]+"px":r):void 0})}),n.each({Height:"height",Width:"width"},function(e,t){n.each({padding:"inner"+e,content:t,"":"outer"+e},function(r,i){n.fn[i]=function(i,s){var o=arguments.length&&(r||"boolean"!=typeof i),u=r||(i===!0||s===!0?"margin":"border");return J(this,function(t,r,i){var s;return n.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===i?n.css(t,r,u):n.style(t,r,i,u)},t,o?i:void 0,o,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kb=a.jQuery,Lb=a.$;return n.noConflict=function(e){return a.$===n&&(a.$=Lb),e&&a.jQuery===n&&(a.jQuery=Kb),n},typeof b===U&&(a.jQuery=a.$=n),n}),function(){function e(e){function t(t,n,r,i,s,o){for(;s>=0&&o>s;s+=e){var u=i?i[s]:s;r=n(r,t[u],u,t)}return r}return function(n,r,i,s){r=b(r,s,4);var o=!C(n)&&y.keys(n),u=(o||n).length,a=e>0?0:u-1;return arguments.length<3&&(i=n[o?o[a]:a],a+=e),t(n,r,i,o,a,u)}}function t(e){return function(t,n,r){n=w(n,r);for(var i=N(t),s=e>0?0:i-1;s>=0&&i>s;s+=e)if(n(t[s],s,t))return s;return-1}}function n(e,t,n){return function(r,i,s){var o=0,u=N(r);if("number"==typeof s)e>0?o=s>=0?s:Math.max(s+u,o):u=s>=0?Math.min(s+1,u):s+u+1;else if(n&&s&&u)return s=n(r,i),r[s]===i?s:-1;if(i!==i)return s=t(l.call(r,o,u),y.isNaN),s>=0?s+o:-1;for(s=e>0?o:u-1;s>=0&&u>s;s+=e)if(r[s]===i)return s;return-1}}function r(e,t){var n=M.length,r=e.constructor,i=y.isFunction(r)&&r.prototype||u,s="constructor";for(y.has(e,s)&&!y.contains(t,s)&&t.push(s);n--;)s=M[n],s in e&&e[s]!==i[s]&&!y.contains(t,s)&&t.push(s)}var i=this,s=i._,o=Array.prototype,u=Object.prototype,a=Function.prototype,f=o.push,l=o.slice,c=u.toString,h=u.hasOwnProperty,p=Array.isArray,d=Object.keys,v=a.bind,m=Object.create,g=function(){},y=function(e){return e instanceof y?e:this instanceof y?void (this._wrapped=e):new y(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=y),exports._=y):i._=y,y.VERSION="1.8.3";var b=function(e,t,n){if(t===void 0)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,s){return e.call(t,n,r,i,s)}}return function(){return e.apply(t,arguments)}},w=function(e,t,n){return null==e?y.identity:y.isFunction(e)?b(e,t,n):y.isObject(e)?y.matcher(e):y.property(e)};y.iteratee=function(e,t){return w(e,t,1/0)};var E=function(e,t){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var i=1;r>i;i++)for(var s=arguments[i],o=e(s),u=o.length,a=0;u>a;a++){var f=o[a];t&&n[f]!==void 0||(n[f]=s[f])}return n}},S=function(e){if(!y.isObject(e))return{};if(m)return m(e);g.prototype=e;var t=new g;return g.prototype=null,t},x=function(e){return function(t){return null==t?void 0:t[e]}},T=Math.pow(2,53)-1,N=x("length"),C=function(e){var t=N(e);return"number"==typeof t&&t>=0&&T>=t};y.each=y.forEach=function(e,t,n){t=b(t,n);var r,i;if(C(e))for(r=0,i=e.length;i>r;r++)t(e[r],r,e);else{var s=y.keys(e);for(r=0,i=s.length;i>r;r++)t(e[s[r]],s[r],e)}return e},y.map=y.collect=function(e,t,n){t=w(t,n);for(var r=!C(e)&&y.keys(e),i=(r||e).length,s=Array(i),o=0;i>o;o++){var u=r?r[o]:o;s[o]=t(e[u],u,e)}return s},y.reduce=y.foldl=y.inject=e(1),y.reduceRight=y.foldr=e(-1),y.find=y.detect=function(e,t,n){var r;return r=C(e)?y.findIndex(e,t,n):y.findKey(e,t,n),r!==void 0&&r!==-1?e[r]:void 0},y.filter=y.select=function(e,t,n){var r=[];return t=w(t,n),y.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},y.reject=function(e,t,n){return y.filter(e,y.negate(w(t)),n)},y.every=y.all=function(e,t,n){t=w(t,n);for(var r=!C(e)&&y.keys(e),i=(r||e).length,s=0;i>s;s++){var o=r?r[s]:s;if(!t(e[o],o,e))return!1}return!0},y.some=y.any=function(e,t,n){t=w(t,n);for(var r=!C(e)&&y.keys(e),i=(r||e).length,s=0;i>s;s++){var o=r?r[s]:s;if(t(e[o],o,e))return!0}return!1},y.contains=y.includes=y.include=function(e,t,n,r){return C(e)||(e=y.values(e)),("number"!=typeof n||r)&&(n=0),y.indexOf(e,t,n)>=0},y.invoke=function(e,t){var n=l.call(arguments,2),r=y.isFunction(t);return y.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},y.pluck=function(e,t){return y.map(e,y.property(t))},y.where=function(e,t){return y.filter(e,y.matcher(t))},y.findWhere=function(e,t){return y.find(e,y.matcher(t))},y.max=function(e,t,n){var r,i,s=-1/0,o=-1/0;if(null==t&&null!=e){e=C(e)?e:y.values(e);for(var u=0,a=e.length;a>u;u++)r=e[u],r>s&&(s=r)}else t=w(t,n),y.each(e,function(e,n,r){i=t(e,n,r),(i>o||i===-1/0&&s===-1/0)&&(s=e,o=i)});return s},y.min=function(e,t,n){var r,i,s=1/0,o=1/0;if(null==t&&null!=e){e=C(e)?e:y.values(e);for(var u=0,a=e.length;a>u;u++)r=e[u],s>r&&(s=r)}else t=w(t,n),y.each(e,function(e,n,r){i=t(e,n,r),(o>i||1/0===i&&1/0===s)&&(s=e,o=i)});return s},y.shuffle=function(e){for(var t,n=C(e)?e:y.values(e),r=n.length,i=Array(r),s=0;r>s;s++)t=y.random(0,s),t!==s&&(i[s]=i[t]),i[t]=n[s];return i},y.sample=function(e,t,n){return null==t||n?(C(e)||(e=y.values(e)),e[y.random(e.length-1)]):y.shuffle(e).slice(0,Math.max(0,t))},y.sortBy=function(e,t,n){return t=w(t,n),y.pluck(y.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(r>n||r===void 0)return-1}return e.index-t.index}),"value")};var k=function(e){return function(t,n,r){var i={};return n=w(n,r),y.each(t,function(r,s){var o=n(r,s,t);e(i,r,o)}),i}};y.groupBy=k(function(e,t,n){y.has(e,n)?e[n].push(t):e[n]=[t]}),y.indexBy=k(function(e,t,n){e[n]=t}),y.countBy=k(function(e,t,n){y.has(e,n)?e[n]++:e[n]=1}),y.toArray=function(e){return e?y.isArray(e)?l.call(e):C(e)?y.map(e,y.identity):y.values(e):[]},y.size=function(e){return null==e?0:C(e)?e.length:y.keys(e).length},y.partition=function(e,t,n){t=w(t,n);var r=[],i=[];return y.each(e,function(e,n,s){(t(e,n,s)?r:i).push(e)}),[r,i]},y.first=y.head=y.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:y.initial(e,e.length-t)},y.initial=function(e,t,n){return l.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},y.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:y.rest(e,Math.max(0,e.length-t))},y.rest=y.tail=y.drop=function(e,t,n){return l.call(e,null==t||n?1:t)},y.compact=function(e){return y.filter(e,y.identity)};var L=function(e,t,n,r){for(var i=[],s=0,o=r||0,u=N(e);u>o;o++){var a=e[o];if(C(a)&&(y.isArray(a)||y.isArguments(a))){t||(a=L(a,t,n));var f=0,l=a.length;for(i.length+=l;l>f;)i[s++]=a[f++]}else n||(i[s++]=a)}return i};y.flatten=function(e,t){return L(e,t,!1)},y.without=function(e){return y.difference(e,l.call(arguments,1))},y.uniq=y.unique=function(e,t,n,r){y.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=w(n,r));for(var i=[],s=[],o=0,u=N(e);u>o;o++){var a=e[o],f=n?n(a,o,e):a;t?(o&&s===f||i.push(a),s=f):n?y.contains(s,f)||(s.push(f),i.push(a)):y.contains(i,a)||i.push(a)}return i},y.union=function(){return y.uniq(L(arguments,!0,!0))},y.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=N(e);i>r;r++){var s=e[r];if(!y.contains(t,s)){for(var o=1;n>o&&y.contains(arguments[o],s);o++);o===n&&t.push(s)}}return t},y.difference=function(e){var t=L(arguments,!0,!0,1);return y.filter(e,function(e){return!y.contains(t,e)})},y.zip=function(){return y.unzip(arguments)},y.unzip=function(e){for(var t=e&&y.max(e,N).length||0,n=Array(t),r=0;t>r;r++)n[r]=y.pluck(e,r);return n},y.object=function(e,t){for(var n={},r=0,i=N(e);i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},y.findIndex=t(1),y.findLastIndex=t(-1),y.sortedIndex=function(e,t,n,r){n=w(n,r,1);for(var i=n(t),s=0,o=N(e);o>s;){var u=Math.floor((s+o)/2);n(e[u])<i?s=u+1:o=u}return s},y.indexOf=n(1,y.findIndex,y.sortedIndex),y.lastIndexOf=n(-1,y.findLastIndex),y.range=function(e,t,n){null==t&&(t=e||0,e=0),n=n||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),s=0;r>s;s++,e+=n)i[s]=e;return i};var A=function(e,t,n,r,i){if(r instanceof t){var s=S(e.prototype),o=e.apply(s,i);return y.isObject(o)?o:s}return e.apply(n,i)};y.bind=function(e,t){if(v&&e.bind===v)return v.apply(e,l.call(arguments,1));if(!y.isFunction(e))throw new TypeError("Bind must be called on a function");var n=l.call(arguments,2),r=function(){return A(e,r,t,this,n.concat(l.call(arguments)))};return r},y.partial=function(e){var t=l.call(arguments,1),n=function(){for(var r=0,i=t.length,s=Array(i),o=0;i>o;o++)s[o]=t[o]===y?arguments[r++]:t[o];for(;r<arguments.length;)s.push(arguments[r++]);return A(e,n,this,this,s)};return n},y.bindAll=function(e){var t,n,r=arguments.length;if(1>=r)throw new Error("bindAll must be passed function names");for(t=1;r>t;t++)n=arguments[t],e[n]=y.bind(e[n],e);return e},y.memoize=function(e,t){var n=function(r){var i=n.cache,s=""+(t?t.apply(this,arguments):r);return y.has(i,s)||(i[s]=e.apply(this,arguments)),i[s]};return n.cache={},n},y.delay=function(e,t){var n=l.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},y.defer=y.partial(y.delay,y,1),y.throttle=function(e,t,n){var r,i,s,o=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:y.now(),o=null,s=e.apply(r,i),o||(r=i=null)};return function(){var f=y.now();u||n.leading!==!1||(u=f);var l=t-(f-u);return r=this,i=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),u=f,s=e.apply(r,i),o||(r=i=null)):o||n.trailing===!1||(o=setTimeout(a,l)),s}},y.debounce=function(e,t,n){var r,i,s,o,u,a=function(){var f=y.now()-o;t>f&&f>=0?r=setTimeout(a,t-f):(r=null,n||(u=e.apply(s,i),r||(s=i=null)))};return function(){s=this,i=arguments,o=y.now();var f=n&&!r;return r||(r=setTimeout(a,t)),f&&(u=e.apply(s,i),s=i=null),u}},y.wrap=function(e,t){return y.partial(t,e)},y.negate=function(e){return function(){return!e.apply(this,arguments)}},y.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},y.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},y.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),1>=e&&(t=null),n}},y.once=y.partial(y.before,2);var O=!{toString:null}.propertyIsEnumerable("toString"),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];y.keys=function(e){if(!y.isObject(e))return[];if(d)return d(e);var t=[];for(var n in e)y.has(e,n)&&t.push(n);return O&&r(e,t),t},y.allKeys=function(e){if(!y.isObject(e))return[];var t=[];for(var n in e)t.push(n);return O&&r(e,t),t},y.values=function(e){for(var t=y.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=e[t[i]];return r},y.mapObject=function(e,t,n){t=w(t,n);for(var r,i=y.keys(e),s=i.length,o={},u=0;s>u;u++)r=i[u],o[r]=t(e[r],r,e);return o},y.pairs=function(e){for(var t=y.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=[t[i],e[t[i]]];return r},y.invert=function(e){for(var t={},n=y.keys(e),r=0,i=n.length;i>r;r++)t[e[n[r]]]=n[r];return t},y.functions=y.methods=function(e){var t=[];for(var n in e)y.isFunction(e[n])&&t.push(n);return t.sort()},y.extend=E(y.allKeys),y.extendOwn=y.assign=E(y.keys),y.findKey=function(e,t,n){t=w(t,n);for(var r,i=y.keys(e),s=0,o=i.length;o>s;s++)if(r=i[s],t(e[r],r,e))return r},y.pick=function(e,t,n){var r,i,s={},o=e;if(null==o)return s;y.isFunction(t)?(i=y.allKeys(o),r=b(t,n)):(i=L(arguments,!1,!1,1),r=function(e,t,n){return t in n},o=Object(o));for(var u=0,a=i.length;a>u;u++){var f=i[u],l=o[f];r(l,f,o)&&(s[f]=l)}return s},y.omit=function(e,t,n){if(y.isFunction(t))t=y.negate(t);else{var r=y.map(L(arguments,!1,!1,1),String);t=function(e,t){return!y.contains(r,t)}}return y.pick(e,t,n)},y.defaults=E(y.allKeys,!0),y.create=function(e,t){var n=S(e);return t&&y.extendOwn(n,t),n},y.clone=function(e){return y.isObject(e)?y.isArray(e)?e.slice():y.extend({},e):e},y.tap=function(e,t){return t(e),e},y.isMatch=function(e,t){var n=y.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),s=0;r>s;s++){var o=n[s];if(t[o]!==i[o]||!(o in i))return!1}return!0};var _=function(e,t,n,r){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof y&&(e=e._wrapped),t instanceof y&&(t=t._wrapped);var i=c.call(e);if(i!==c.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}var s="[object Array]"===i;if(!s){if("object"!=typeof e||"object"!=typeof t)return!1;var o=e.constructor,u=t.constructor;if(o!==u&&!(y.isFunction(o)&&o instanceof o&&y.isFunction(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var a=n.length;a--;)if(n[a]===e)return r[a]===t;if(n.push(e),r.push(t),s){if(a=e.length,a!==t.length)return!1;for(;a--;)if(!_(e[a],t[a],n,r))return!1}else{var f,l=y.keys(e);if(a=l.length,y.keys(t).length!==a)return!1;for(;a--;)if(f=l[a],!y.has(t,f)||!_(e[f],t[f],n,r))return!1}return n.pop(),r.pop(),!0};y.isEqual=function(e,t){return _(e,t)},y.isEmpty=function(e){return null==e?!0:C(e)&&(y.isArray(e)||y.isString(e)||y.isArguments(e))?0===e.length:0===y.keys(e).length},y.isElement=function(e){return!!e&&1===e.nodeType},y.isArray=p||function(e){return"[object Array]"===c.call(e)},y.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},y.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(e){y["is"+e]=function(t){return c.call(t)==="[object "+e+"]"}}),y.isArguments(arguments)||(y.isArguments=function(e){return y.has(e,"callee")}),"function"!=typeof /./&&"object"!=typeof Int8Array&&(y.isFunction=function(e){return"function"==typeof e||!1}),y.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},y.isNaN=function(e){return y.isNumber(e)&&e!==+e},y.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===c.call(e)},y.isNull=function(e){return null===e},y.isUndefined=function(e){return e===void 0},y.has=function(e,t){return null!=e&&h.call(e,t)},y.noConflict=function(){return i._=s,this},y.identity=function(e){return e},y.constant=function(e){return function(){return e}},y.noop=function(){},y.property=x,y.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},y.matcher=y.matches=function(e){return e=y.extendOwn({},e),function(t){return y.isMatch(t,e)}},y.times=function(e,t,n){var r=Array(Math.max(0,e));t=b(t,n,1);for(var i=0;e>i;i++)r[i]=t(i);return r},y.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},y.now=Date.now||function(){return(new Date).getTime()};var D={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},P=y.invert(D),H=function(e){var t=function(t){return e[t]},n="(?:"+y.keys(e).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(e){return e=null==e?"":""+e,r.test(e)?e.replace(i,t):e}};y.escape=H(D),y.unescape=H(P),y.result=function(e,t,n){var r=null==e?void 0:e[t];return r===void 0&&(r=n),y.isFunction(r)?r.call(e):r};var B=0;y.uniqueId=function(e){var t=++B+"";return e?e+t:t},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var j=/(.)^/,F={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},I=/\\|'|\r|\n|\u2028|\u2029/g,q=function(e){return"\\"+F[e]};y.template=function(e,t,n){!t&&n&&(t=n),t=y.defaults({},t,y.templateSettings);var r=RegExp([(t.escape||j).source,(t.interpolate||j).source,(t.evaluate||j).source].join("|")+"|$","g"),i=0,s="__p+='";e.replace(r,function(t,n,r,o,u){return s+=e.slice(i,u).replace(I,q),i=u+t.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?s+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(s+="';\n"+o+"\n__p+='"),t}),s+="';\n",t.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(t.variable||"obj","_",s)}catch(u){throw u.source=s,u}var a=function(e){return o.call(this,e,y)},f=t.variable||"obj";return a.source="function("+f+"){\n"+s+"}",a},y.chain=function(e){var t=y(e);return t._chain=!0,t};var R=function(e,t){return e._chain?y(t).chain():t};y.mixin=function(e){y.each(y.functions(e),function(t){var n=y[t]=e[t];y.prototype[t]=function(){var e=[this._wrapped];return f.apply(e,arguments),R(this,n.apply(y,e))}})},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=o[e];y.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],R(this,n)}}),y.each(["concat","join","slice"],function(e){var t=o[e];y.prototype[e]=function(){return R(this,t.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return y})}.call(this),function(e,t){if(typeof define=="function"&&define.amd)define("backbone",["underscore","jquery","exports"],function(n,r,i){e.Backbone=t(e,i,n,r)});else if(typeof exports!="undefined"){var n=require("underscore");t(e,exports,n)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,t,n,r){var i=e.Backbone,s=[],o=s.push,u=s.slice,a=s.splice;t.VERSION="1.1.2",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var f=t.Events={on:function(e,t,n){if(!c(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var r=this._events[e]||(this._events[e]=[]);return r.push({callback:t,context:n,ctx:n||this}),this},once:function(e,t,r){if(!c(this,"once",e,[t,r])||!t)return this;var i=this,s=n.once(function(){i.off(e,s),t.apply(this,arguments)});return s._callback=t,this.on(e,s,r)},off:function(e,t,r){var i,s,o,u,a,f,l,h;if(!this._events||!c(this,"off",e,[t,r]))return this;if(!e&&!t&&!r)return this._events=void 0,this;u=e?[e]:n.keys(this._events);for(a=0,f=u.length;a<f;a++){e=u[a];if(o=this._events[e]){this._events[e]=i=[];if(t||r)for(l=0,h=o.length;l<h;l++)s=o[l],(t&&t!==s.callback&&t!==s.callback._callback||r&&r!==s.context)&&i.push(s);i.length||delete this._events[e]}}return this},trigger:function(e){if(!this._events)return this;var t=u.call(arguments,1);if(!c(this,"trigger",e,t))return this;var n=this._events[e],r=this._events.all;return n&&h(n,t),r&&h(r,arguments),this},stopListening:function(e,t,r){var i=this._listeningTo;if(!i)return this;var s=!t&&!r;!r&&typeof t=="object"&&(r=this),e&&((i={})[e._listenId]=e);for(var o in i)e=i[o],e.off(t,r,this),(s||n.isEmpty(e._events))&&delete this._listeningTo[o];return this}},l=/\s+/,c=function(e,t,n,r){if(!n)return!0;if(typeof n=="object"){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(l.test(n)){var s=n.split(l);for(var o=0,u=s.length;o<u;o++)e[t].apply(e,[s[o]].concat(r));return!1}return!0},h=function(e,t){var n,r=-1,i=e.length,s=t[0],o=t[1],u=t[2];switch(t.length){case 0:while(++r<i)(n=e[r]).callback.call(n.ctx);return;case 1:while(++r<i)(n=e[r]).callback.call(n.ctx,s);return;case 2:while(++r<i)(n=e[r]).callback.call(n.ctx,s,o);return;case 3:while(++r<i)(n=e[r]).callback.call(n.ctx,s,o,u);return;default:while(++r<i)(n=e[r]).callback.apply(n.ctx,t);return}},p={listenTo:"on",listenToOnce:"once"};n.each(p,function(e,t){f[t]=function(t,r,i){var s=this._listeningTo||(this._listeningTo={}),o=t._listenId||(t._listenId=n.uniqueId("l"));return s[o]=t,!i&&typeof r=="object"&&(i=this),t[e](r,i,this),this}}),f.bind=f.on,f.unbind=f.off,n.extend(t,f);var d=t.Model=function(e,t){var r=e||{};t||(t={}),this.cid=n.uniqueId("c"),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{}),r=n.defaults({},r,n.result(this,"defaults")),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(d.prototype,f,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return this.get(e)!=null},set:function(e,t,r){var i,s,o,u,a,f,l,c;if(e==null)return this;typeof e=="object"?(s=e,r=t):(s={})[e]=t,r||(r={});if(!this._validate(s,r))return!1;o=r.unset,a=r.silent,u=[],f=this._changing,this._changing=!0,f||(this._previousAttributes=n.clone(this.attributes),this.changed={}),c=this.attributes,l=this._previousAttributes,this.idAttribute in s&&(this.id=s[this.idAttribute]);for(i in s)t=s[i],n.isEqual(c[i],t)||u.push(i),n.isEqual(l[i],t)?delete this.changed[i]:this.changed[i]=t,o?delete c[i]:c[i]=t;if(!a){u.length&&(this._pending=r);for(var h=0,p=u.length;h<p;h++)this.trigger("change:"+u[h],this,c[u[h]],r)}if(f)return this;if(!a)while(this._pending)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return e==null?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?n.clone(this.changed):!1;var t,r=!1,i=this._changing?this._previousAttributes:this.attributes;for(var s in e){if(n.isEqual(i[s],t=e[s]))continue;(r||(r={}))[s]=t}return r},previous:function(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=e?n.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=this,r=e.success;return e.success=function(n){if(!t.set(t.parse(n,e),e))return!1;r&&r(t,n,e),t.trigger("sync",t,n,e)},I(this,e),this.sync("read",this,e)},save:function(e,t,r){var i,s,o,u=this.attributes;e==null||typeof e=="object"?(i=e,r=t):(i={})[e]=t,r=n.extend({validate:!0},r);if(i&&!r.wait){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;i&&r.wait&&(this.attributes=n.extend({},u,i)),r.parse===void 0&&(r.parse=!0);var a=this,f=r.success;return r.success=function(e){a.attributes=u;var t=a.parse(e,r);r.wait&&(t=n.extend(i||{},t));if(n.isObject(t)&&!a.set(t,r))return!1;f&&f(a,e,r),a.trigger("sync",a,e,r)},I(this,r),s=this.isNew()?"create":r.patch?"patch":"update",s==="patch"&&(r.attrs=i),o=this.sync(s,this,r),i&&r.wait&&(this.attributes=u),o},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(n){(e.wait||t.isNew())&&i(),r&&r(t,n,e),t.isNew()||t.trigger("sync",t,n,e)};if(this.isNew())return e.success(),!1;I(this,e);var s=this.sync("delete",this,e);return e.wait||i(),s},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||F();return this.isNew()?e:e.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return r?(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1):!0}});var v=["keys","values","pairs","invert","pick","omit"];n.each(v,function(e){d.prototype[e]=function(){var t=u.call(arguments);return t.unshift(this.attributes),n[e].apply(n,t)}});var m=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),t.comparator!==void 0&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},g={add:!0,remove:!0,merge:!0},y={add:!0,remove:!1};n.extend(m.prototype,f,{model:d,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,y))},remove:function(e,t){var r=!n.isArray(e);e=r?[e]:n.clone(e),t||(t={});var i,s,o,u;for(i=0,s=e.length;i<s;i++){u=e[i]=this.get(e[i]);if(!u)continue;delete this._byId[u.id],delete this._byId[u.cid],o=this.indexOf(u),this.models.splice(o,1),this.length--,t.silent||(t.index=o,u.trigger("remove",u,this,t)),this._removeReference(u,t)}return r?e[0]:e},set:function(e,t){t=n.defaults({},t,g),t.parse&&(e=this.parse(e,t));var r=!n.isArray(e);e=r?e?[e]:[]:n.clone(e);var i,s,o,u,a,f,l,c=t.at,h=this.model,p=this.comparator&&c==null&&t.sort!==!1,v=n.isString(this.comparator)?this.comparator:null,m=[],y=[],b={},w=t.add,E=t.merge,S=t.remove,x=!p&&w&&S?[]:!1;for(i=0,s=e.length;i<s;i++){a=e[i]||{},a instanceof d?o=u=a:o=a[h.prototype.idAttribute||"id"];if(f=this.get(o))S&&(b[f.cid]=!0),E&&(a=a===u?u.attributes:a,t.parse&&(a=f.parse(a,t)),f.set(a,t),p&&!l&&f.hasChanged(v)&&(l=!0)),e[i]=f;else if(w){u=e[i]=this._prepareModel(a,t);if(!u)continue;m.push(u),this._addReference(u,t)}u=f||u,x&&(u.isNew()||!b[u.id])&&x.push(u),b[u.id]=!0}if(S){for(i=0,s=this.length;i<s;++i)b[(u=this.models[i]).cid]||y.push(u);y.length&&this.remove(y,t)}if(m.length||x&&x.length){p&&(l=!0),this.length+=m.length;if(c!=null)for(i=0,s=m.length;i<s;i++)this.models.splice(c+i,0,m[i]);else{x&&(this.models.length=0);var T=x||m;for(i=0,s=T.length;i<s;i++)this.models.push(T[i])}}l&&this.sort({silent:!0});if(!t.silent){for(i=0,s=m.length;i<s;i++)(u=m[i]).trigger("add",u,this,t);(l||x&&x.length)&&this.trigger("sort",this,t)}return r?e[0]:e},reset:function(e,t){t||(t={});for(var r=0,i=this.models.length;r<i;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(){return u.apply(this.models,arguments)},get:function(e){return e==null?void 0:this._byId[e]||this._byId[e.id]||this._byId[e.cid]},at:function(e){return this.models[e]},where:function(e,t){return n.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),n.isString(this.comparator)||this.comparator.length===1?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return n.invoke(this.models,"get",e)},fetch:function(e){e=e?n.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=e.success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t(r,n,e),r.trigger("sync",r,n,e)},I(this,e),this.sync("read",this,e)},create:function(e,t){t=t?n.clone(t):{};if(!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var r=this,i=t.success;return t.success=function(e,n){t.wait&&r.add(e,t),i&&i(e,n,t)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof d)return e;t=t?n.clone(t):{},t.collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_addReference:function(e,t){this._byId[e.cid]=e,e.id!=null&&(this._byId[e.id]=e),e.collection||(e.collection=this),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if((e==="add"||e==="remove")&&n!==this)return;e==="destroy"&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],t.id!=null&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments)}});var b=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];n.each(b,function(e){m.prototype[e]=function(){var t=u.call(arguments);return t.unshift(this.models),n[e].apply(n,t)}});var w=["groupBy","countBy","sortBy","indexBy"];n.each(w,function(e){m.prototype[e]=function(t,r){var i=n.isFunction(t)?t:function(e){return e.get(t)};return n[e](this.models,i,r)}});var E=t.View=function(e){this.cid=n.uniqueId("view"),e||(e={}),n.extend(this,n.pick(e,x)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},S=/^(\S+)\s*(.*)$/,x=["model","collection","el","id","attributes","className","tagName","events"];n.extend(E.prototype,f,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,n){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],n!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=n.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var r=e[t];n.isFunction(r)||(r=this[e[t]]);if(!r)continue;var i=t.match(S),s=i[1],o=i[2];r=n.bind(r,this),s+=".delegateEvents"+this.cid,o===""?this.$el.on(s,r):this.$el.on(s,o,r)}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(!this.el){var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e["class"]=n.result(this,"className"));var r=t.$("<"+n.result(this,"tagName")+">").attr(e);this.setElement(r,!1)}else this.setElement(n.result(this,"el"),!1)}}),t.sync=function(e,r,i){var s=N[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var o={type:s,dataType:"json"};i.url||(o.url=n.result(r,"url")||F()),i.data==null&&r&&(e==="create"||e==="update"||e==="patch")&&(o.contentType="application/json",o.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{});if(i.emulateHTTP&&(s==="PUT"||s==="DELETE"||s==="PATCH")){o.type="POST",i.emulateJSON&&(o.data._method=s);var u=i.beforeSend;i.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",s);if(u)return u.apply(this,arguments)}}o.type!=="GET"&&!i.emulateJSON&&(o.processData=!1),o.type==="PATCH"&&T&&(o.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var a=i.xhr=t.ajax(n.extend(o,i));return r.trigger("request",r,a,i),a};var T=typeof window!="undefined"&&!!window.ActiveXObject&&(!window.XMLHttpRequest||!(new XMLHttpRequest).dispatchEvent),N={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var C=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},k=/\((.*?)\)/g,L=/(\(\?)?:\w+/g,A=/\*\w+/g,O=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(C.prototype,f,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var s=this;return t.history.route(e,function(n){var o=s._extractParameters(e,n);s.execute(i,o),s.trigger.apply(s,["route:"+r].concat(o)),s.trigger("route",r,o),t.history.trigger("route",s,r,o)}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(!this.routes)return;this.routes=n.result(this,"routes");var e,t=n.keys(this.routes);while((e=t.pop())!=null)this.route(e,this.routes[e])},_routeToRegExp:function(e){return e=e.replace(O,"\\$&").replace(k,"(?:$1)?").replace(L,function(e,t){return t?e:"([^/?]+)"}).replace(A,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null})}});var M=t.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),typeof window!="undefined"&&(this.location=window.location,this.history=window.history)},_=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,P=/msie [\w.]+/,H=/\/$/,B=/#.*$/;M.started=!1,n.extend(M.prototype,f,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(e==null)if(this._hasPushState||!this._wantsHashChange||t){e=decodeURI(this.location.pathname+this.location.search);var n=this.root.replace(H,"");e.indexOf(n)||(e=e.slice(n.length))}else e=this.getHash();return e.replace(_,"")},start:function(e){if(M.started)throw new Error("Backbone.history has already been started");M.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment(),i=document.documentMode,s=P.exec(navigator.userAgent.toLowerCase())&&(!i||i<=7);this.root=("/"+this.root+"/").replace(D,"/");if(s&&this._wantsHashChange){var o=t.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=o.hide().appendTo("body")[0].contentWindow,this.navigate(r)}this._hasPushState?t.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!s?t.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=r;var u=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+"#"+this.fragment),!0;this._hasPushState&&this.atRoot()&&u.hash&&(this.fragment=this.getHash().replace(_,""),this.history.replaceState({},document.title,this.root+this.fragment))}if(!this.options.silent)return this.loadUrl()},stop:function(){t.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),M.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe)));if(t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return e=this.fragment=this.getFragment(e),n.any(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0})},navigate:function(e,t){if(!M.started)return!1;if(!t||t===!0)t={trigger:!!t};var n=this.root+(e=this.getFragment(e||""));e=e.replace(B,"");if(this.fragment===e)return;this.fragment=e,e===""&&n!=="/"&&(n=n.slice(0,-1));if(this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}if(t.trigger)return this.loadUrl(e)},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new M;var j=function(e,t){var r=this,i;e&&n.has(e,"constructor")?i=e.constructor:i=function(){return r.apply(this,arguments)},n.extend(i,r,t);var s=function(){this.constructor=i};return s.prototype=r.prototype,i.prototype=new s,e&&n.extend(i.prototype,e),i.__super__=r.prototype,i};d.extend=m.extend=C.extend=E.extend=M.extend=j;var F=function(){throw new Error('A "url" property or function must be specified')},I=function(e,t){var n=t.error;t.error=function(r){n&&n(e,r,t),e.trigger("error",e,r,t)}};return t}),!function(e,t,n){function r(e){var t=S(),n=t.querySelector("h2"),r=t.querySelector("p"),i=t.querySelector("button.cancel"),s=t.querySelector("button.confirm");if(n.innerHTML=e.html?e.title:L(e.title).split("\n").join("<br>"),r.innerHTML=e.html?e.text:L(e.text||"").split("\n").join("<br>"),e.text&&O(r),e.customClass)C(t,e.customClass),t.setAttribute("data-custom-class",e.customClass);else{var o=t.getAttribute("data-custom-class");k(t,o),t.setAttribute("data-custom-class","")}if(_(t.querySelectorAll(".sa-icon")),e.type&&!c()){for(var a=!1,f=0;f<w.length;f++)if(e.type===w[f]){a=!0;break}if(!a)return h("Unknown alert type: "+e.type),!1;var l,p=["success","error","warning","info"];-1!==p.indexOf(e.type)&&(l=t.querySelector(".sa-icon.sa-"+e.type),O(l));var d=x();switch(e.type){case"success":C(l,"animate"),C(l.querySelector(".sa-tip"),"animateSuccessTip"),C(l.querySelector(".sa-long"),"animateSuccessLong");break;case"error":C(l,"animateErrorIcon"),C(l.querySelector(".sa-x-mark"),"animateXMark");break;case"warning":C(l,"pulseWarning"),C(l.querySelector(".sa-body"),"pulseWarningIns"),C(l.querySelector(".sa-dot"),"pulseWarningIns");break;case"input":case"prompt":d.setAttribute("type",e.inputType),C(t,"show-input"),setTimeout(function(){d.focus(),d.addEventListener("keyup",g.resetInputError)},400)}}if(e.imageUrl){var v=t.querySelector(".sa-icon.sa-custom");v.style.backgroundImage="url("+e.imageUrl+")",O(v);var m=80,y=80;if(e.imageSize){var b=e.imageSize.toString().split("x"),E=b[0],T=b[1];E&&T?(m=E,y=T):h("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+e.imageSize)}v.setAttribute("style",v.getAttribute("style")+"width:"+m+"px; height:"+y+"px")}t.setAttribute("data-has-cancel-button",e.showCancelButton),e.showCancelButton?i.style.display="inline-block":_(i),t.setAttribute("data-has-confirm-button",e.showConfirmButton),e.showConfirmButton?s.style.display="inline-block":_(s),e.cancelButtonText&&(i.innerHTML=L(e.cancelButtonText)),e.confirmButtonText&&(s.innerHTML=L(e.confirmButtonText)),e.confirmButtonColor&&(s.style.backgroundColor=e.confirmButtonColor,u(s,e.confirmButtonColor)),t.setAttribute("data-allow-ouside-click",e.allowOutsideClick);var N=e.doneFunction?!0:!1;t.setAttribute("data-has-done-function",N),e.animation?"string"==typeof e.animation?t.setAttribute("data-animation",e.animation):t.setAttribute("data-animation","pop"):t.setAttribute("data-animation","none"),t.setAttribute("data-timer",e.timer)}function i(e,t){e=String(e).replace(/[^0-9a-f]/gi,""),e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;var n,r,i="#";for(r=0;3>r;r++)n=parseInt(e.substr(2*r,2),16),n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16),i+=("00"+n).substr(n.length);return i}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function o(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16):null}function u(e,t){var n=o(t);e.style.boxShadow="0 0 2px rgba("+n+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"}function a(){var e=S();H(T(),10),O(e),C(e,"showSweetAlert"),k(e,"hideSweetAlert"),p=t.activeElement;var n=e.querySelector("button.confirm");n.focus(),setTimeout(function(){C(e,"visible")},500);var r=e.getAttribute("data-timer");"null"!==r&&""!==r&&(e.timeout=setTimeout(function(){m.close()},r))}function f(){var e=S(),t=x();k(e,"show-input"),t.value="",t.setAttribute("type",E.inputType),g.resetInputError()}function l(){var e=S();e.style.marginTop=P(S())}function c(){return e.attachEvent&&!e.addEventListener?!0:!1}function h(t){e.console&&e.console.log("SweetAlert: "+t)}var p,d,v,m,g,y=".sweet-alert",b=".sweet-overlay",w=["error","warning","info","success","input","prompt"],E={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#AEDEF4",cancelButtonText:"Cancel",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text"},S=function(){var e=t.querySelector(y);return e||(I(),e=S()),e},x=function(){var e=S();return e?e.querySelector("input"):void 0},T=function(){return t.querySelector(b)},N=function(e,t){return(new RegExp(" "+t+" ")).test(" "+e.className+" ")},C=function(e,t){N(e,t)||(e.className+=" "+t)},k=function(e,t){var n=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(N(e,t)){for(;n.indexOf(" "+t+" ")>=0;)n=n.replace(" "+t+" "," ");e.className=n.replace(/^\s+|\s+$/g,"")}},L=function(e){var n=t.createElement("div");return n.appendChild(t.createTextNode(e)),n.innerHTML},A=function(e){e.style.opacity="",e.style.display="block"},O=function(e){if(e&&!e.length)return A(e);for(var t=0;t<e.length;++t)A(e[t])},M=function(e){e.style.opacity="",e.style.display="none"},_=function(e){if(e&&!e.length)return M(e);for(var t=0;t<e.length;++t)M(e[t])},D=function(e,t){for(var n=t.parentNode;null!==n;){if(n===e)return!0;n=n.parentNode}return!1},P=function(e){e.style.left="-9999px",e.style.display="block";var t,n=e.clientHeight;return t="undefined"!=typeof getComputedStyle?parseInt(getComputedStyle(e).getPropertyValue("padding-top"),10):parseInt(e.currentStyle.padding),e.style.left="",e.style.display="none","-"+parseInt((n+t)/2)+"px"},H=function(e,t){if(+e.style.opacity<1){t=t||16,e.style.opacity=0,e.style.display="block";var n=+(new Date),r=function(){e.style.opacity=+e.style.opacity+(new Date-n)/100,n=+(new Date),+e.style.opacity<1&&setTimeout(r,t)};r()}e.style.display="block"},B=function(e,t){t=t||16,e.style.opacity=1;var n=+(new Date),r=function(){e.style.opacity=+e.style.opacity-(new Date-n)/100,n=+(new Date),+e.style.opacity>0?setTimeout(r,t):e.style.display="none"};r()},j=function(n){if("function"==typeof MouseEvent){var r=new MouseEvent("click",{view:e,bubbles:!1,cancelable:!0});n.dispatchEvent(r)}else if(t.createEvent){var i=t.createEvent("MouseEvents");i.initEvent("click",!1,!1),n.dispatchEvent(i)}else t.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},F=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):e.event&&e.event.hasOwnProperty("cancelBubble")&&(e.event.cancelBubble=!0)},I=function(){var e='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert"><div class="sa-icon sa-error"><span class="sa-x-mark"><span class="sa-line sa-left"></span><span class="sa-line sa-right"></span></span></div><div class="sa-icon sa-warning"> <span class="sa-body"></span> <span class="sa-dot"></span> </div> <div class="sa-icon sa-info"></div> <div class="sa-icon sa-success"> <span class="sa-line sa-tip"></span> <span class="sa-line sa-long"></span> <div class="sa-placeholder"></div> <div class="sa-fix"></div> </div> <div class="sa-icon sa-custom"></div> <h2>Title</h2><p>Text</p><fieldset><input type="text" tabIndex="3" /><div class="sa-input-error"></div></fieldset> <div class="sa-error-container"><div class="icon">!</div> <p>Not valid!</p></div> <button class="cancel" tabIndex="2">Cancel</button><button class="confirm" tabIndex="1">OK</button></div>',n=t.createElement("div");for(n.innerHTML=e;n.firstChild;)t.body.appendChild(n.firstChild)};m=g=function(){function o(e){var t=y;return"undefined"!=typeof t[e]?t[e]:E[e]}function c(){var e=!0;N(A,"show-input")&&(e=A.querySelector("input").value,e||(e="")),b.doneFunction(e),b.closeOnConfirm&&m.close()}function p(){var e=String(b.doneFunction).replace(/\s/g,""),t="function("===e.substring(0,9)&&")"!==e.substring(9,10);t&&b.doneFunction(!1),b.closeOnCancel&&m.close()}function g(t){var r=t||e.event,i=r.keyCode||r.which;if(-1!==[9,13,32,27].indexOf(i)){for(var s=r.target||r.srcElement,o=-1,a=0;a<B.length;a++)if(s===B[a]){o=a;break}9===i?(s=-1===o?P:o===B.length-1?B[0]:B[o+1],F(r),s.focus(),b.confirmButtonColor&&u(s,b.confirmButtonColor)):13===i?("INPUT"===s.tagName&&(s=P,P.focus()),s=-1===o?P:n):27===i&&b.allowEscapeKey===!0?(s=H,j(s,r)):s=n}}var y=arguments[0];if(C(t.body,"stop-scrolling"),f(),arguments[0]===n)return h("SweetAlert expects at least 1 attribute!"),!1;var b=s({},E);switch(typeof arguments[0]){case"string":b.title=arguments[0],b.text=arguments[1]||"",b.type=arguments[2]||"";break;case"object":if(arguments[0].title===n)return h('Missing "title" argument!'),!1;b.title=arguments[0].title;for(var w=["text","type","customClass","allowOutsideClick","showConfirmButton","showCancelButton","closeOnConfirm","closeOnCancel","timer","confirmButtonColor","cancelButtonText","imageUrl","imageSize","html","animation","allowEscapeKey","inputType"],x=w.length,k=0;x>k;k++){var L=w[k];b[L]=o(L)}b.confirmButtonText=b.showCancelButton?"Confirm":E.confirmButtonText,b.confirmButtonText=o("confirmButtonText"),b.doneFunction=arguments[1]||null;break;default:return h('Unexpected type of argument! Expected "string" or "object", got '+typeof arguments[0]),!1}r(b),l(),a();for(var A=S(),O=function(t){var n=t||e.event,r=n.target||n.srcElement,s=-1!==r.className.indexOf("confirm"),o=-1!==r.className.indexOf("sweet-overlay"),u=N(A,"visible"),a=b.doneFunction&&"true"===A.getAttribute("data-has-done-function");switch(n.type){case"mouseover":s&&b.confirmButtonColor&&(r.style.backgroundColor=i(b.confirmButtonColor,-0.04));break;case"mouseout":s&&b.confirmButtonColor&&(r.style.backgroundColor=b.confirmButtonColor);break;case"mousedown":s&&b.confirmButtonColor&&(r.style.backgroundColor=i(b.confirmButtonColor,-0.14));break;case"mouseup":s&&b.confirmButtonColor&&(r.style.backgroundColor=i(b.confirmButtonColor,-0.04));break;case"focus":var f=A.querySelector("button.confirm"),l=A.querySelector("button.cancel");s?l.style.boxShadow="none":f.style.boxShadow="none";break;case"click":s&&a&&u?c():a&&u||o?p():D(A,r)&&"BUTTON"===r.tagName&&m.close()}},M=A.querySelectorAll("button"),_=0;_<M.length;_++)M[_].onclick=O,M[_].onmouseover=O,M[_].onmouseout=O,M[_].onmousedown=O,M[_].onmouseup=O,M[_].onfocus=O;T().onclick=O;var P=A.querySelector("button.confirm"),H=A.querySelector("button.cancel"),B=A.querySelectorAll("button[tabindex]");d=e.onkeydown,e.onkeydown=g,e.onfocus=function(){e.setTimeout(function(){v!==n&&(v.focus(),v=n)},0)}},m.setDefaults=g.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");s(E,e)},m.close=g.close=function(){var r=S();B(T(),5),B(r,5),k(r,"showSweetAlert"),C(r,"hideSweetAlert"),k(r,"visible");var i=r.querySelector(".sa-icon.sa-success");k(i,"animate"),k(i.querySelector(".sa-tip"),"animateSuccessTip"),k(i.querySelector(".sa-long"),"animateSuccessLong");var s=r.querySelector(".sa-icon.sa-error");k(s,"animateErrorIcon"),k(s.querySelector(".sa-x-mark"),"animateXMark");var o=r.querySelector(".sa-icon.sa-warning");k(o,"pulseWarning"),k(o.querySelector(".sa-body"),"pulseWarningIns"),k(o.querySelector(".sa-dot"),"pulseWarningIns"),k(t.body,"stop-scrolling"),e.onkeydown=d,p&&p.focus(),v=n,clearTimeout(r.timeout)},m.showInputError=g.showInputError=function(e){var t=S(),n=t.querySelector(".sa-input-error");C(n,"show");var r=t.querySelector(".sa-error-container");C(r,"show"),r.querySelector("p").innerHTML=e,t.querySelector("input").focus()},m.resetInputError=g.resetInputError=function(e){if(e&&13===e.keyCode)return!1;var t=S(),n=t.querySelector(".sa-input-error");k(n,"show");var r=t.querySelector(".sa-error-container");k(r,"show")},"function"==typeof define&&define.amd?define("sweetalert",[],function(){return m}):"undefined"!=typeof module&&module.exports?module.exports=m:"undefined"!=typeof e&&(e.sweetAlert=e.swal=m)}(window,document),define("smashers",["sweetalert"],function(e){function n(){var e=0,t=["We sent <%= name %> an email for you ;)","Nice! Maybe you and <%= name %> will get married?","Senior week is only so long. Carpe diem!","I bet <%= name %> is as excited as you are.","Somebody get me a towel.","I'll be in my bunk.","Think how far you've come since freshman year. Show <%= name %> your skillz!"];return function(n){return e%=t.length,_.template(t[e++])({name:n})}}var t,r=n(),i=TastypieModel.extend({decisionUrl:"/api/v1/decision/",url:function(){return"/api/v1/smashers/"+this.id+"/"},defaults:{headshot:"static/smashers/avatar.png",has_headshot:!1,num_matches:0},parse:function(e){return e.major&&(e.major=e.major.split("(")[0]),e.headshot?e:_.omit(e,"headshot")},initialize:function(){},like:function(){this._decide(!0)},dislike:function(){this._decide(!1)},_decide:function(t){var n=this;$.ajax({type:"POST",url:this.decisionUrl,data:JSON.stringify({user_id:this.id,like:t}),contentType:"application/json"}).success(function(t){n.swingCard.destroy(),n.trigger("destroy",n);var i=n.get("name").split(" ")[0];t.match===!0&&e({title:"Matched!",text:r(i),type:"success",timer:2300})}).error(function(){e({title:"Error!",text:"Something went wrong! Beat it.",type:"error"})}).always(function(){})}}),s=TastypieCollection.extend({model:i,url:"/api/v1/smashers",getNextSwipeSet:function(e){var t=this;this.fetch({remove:!1}).success(function(){e&&e(t)}).error(function(){console.log(arguments)}).always(function(){})}});return{getSmashers:function(e,t){return new s(e,t)},getSmasher:function(e,t){return new i(e,t)},getMatches:function(e){$.getJSON("/api/v1/matches").success(function(t){(e||$.noop)(new s(t,{parse:!0}))})},setActiveUser:function(e){return t=new i(e,{parse:!0})},getActiveUser:function(){return t}}}),define("cardInterface",["smashers"],function(e){var t={throwOutConfidence:function(e,t){return Math.min((Math.abs(e)+150)/t.offsetWidth,1)},throwOutDistance:function(){return 1250},time:1e3},n=Backbone.View.extend({template:_.template($("#single-card").html()),className:"smash-card",tagName:"li",initialize:function(){this.listenTo(this.model,{remove:function(){var e=this;this.$el.fadeOut("fast",function(){e.remove()})},"change:headshot":function(e,t,n){console.log(arguments)}})},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.drawExistingFeedback(),this},drawExistingFeedback:function(){var e=this;this.model.get("status")===1?setTimeout(function(){e.updateLikeIcon(1),e.updateDislikeIcon(0),e.updateMatchIcon(0)},400):this.model.get("status")===2?setTimeout(function(){e.updateDislikeIcon(1),e.updateLikeIcon(0),e.updateMatchIcon(0)},400):this.model.get("status")===3?setTimeout(function(){e.updateMatchIcon(1),e.updateDislikeIcon(0),e.updateLikeIcon(0)},400):this._updateFeedBackIcon(0)},resetFeedbackIcons:function(){this.drawExistingFeedback()},_updateFeedBackIcon:function(e,t){var n=".feedback-icon";t&&(n=".icon-"+t),this.$(n).css("opacity",e)},updateDislikeIcon:function(e){return this._updateFeedBackIcon(e,"dislike"),this},updateLikeIcon:function(e){return this._updateFeedBackIcon(e,"like"),this},updateMatchIcon:function(e){return this._updateFeedBackIcon(e,"match"),this}}),r=Backbone.View.extend({el:"#card-interface",initialize:function(e){var n=this;this.stack=gajus.Swing.Stack(t),_.extend(this,{draggable:!0},e),this.collection.length>0&&this.$(".placeholder").hide(),this.collection.each(function(e){n.addCard(e)}),this.listenTo(this.collection,{add:function(e,t,n){this.addCard(e)},remove:function(){this.activeCard=this.collection.last(),this.activeCard||(this.collection.getNextSwipeSet(function(){n.$(".loader").hide()}),this.$(".loader").show(),this.$(".placeholder").show())}}),_.bindAll(this,"addCard"),this.bindStackListeners()},bindStackListeners:function(){var e=this;this.stack.on("throwout",function(t){var n=$(t.target).attr("model-id"),r=e.collection._byId[n];setTimeout(function(){r&&(t.throwDirection===gajus.Swing.Card.DIRECTION_LEFT?r.dislike():r.like())},300)})},addCard:function(e){var t=new n({model:e});this.$(".cards").append(t.render().el),t.$el.attr("model-id",e.cid),this.activeCard=e;if(this.draggable===!0){var r=this.stack.createCard(t.el);r.throwIn(-100,-100),r.on("dragstart",function(){t.$el.addClass("dragging")}),r.on("dragend",function(){t.$el.removeClass("dragging")}),r.on("dragmove",function(e){e.throwDirection==gajus.Swing.Card.DIRECTION_LEFT?(t.updateLikeIcon(0),t.updateDislikeIcon(e.throwOutConfidence)):(t.updateLikeIcon(e.throwOutConfidence),t.updateDislikeIcon(0))}),r.on("throwinend",function(){t.resetFeedbackIcons()}),e.swingCard=r}},events:{"click #like":function(){this.activeCard&&this.activeCard.swingCard.throwOut(20,111)},"click #dislike":function(){this.activeCard&&this.activeCard.swingCard.throwOut(-20,111)}}}),i=e.getSmashers(),s=new r({collection:i});return window.user.error||i.getNextSwipeSet(),{activeSet:function(){return i},getCardList:function(e,t){return new r(e,t)}}}),!function(e){e.fn.animatedModal=function(t){function n(){f.css({"z-index":s.zIndexOut}),s.afterClose()}function r(){s.afterOpen()}var i=e(this),s=e.extend({modalTarget:"animatedModal",position:"fixed",width:"100%",height:"100%",top:"0px",left:"0px",zIndexIn:"9999",zIndexOut:"-9999",color:"#39BEB9",opacityIn:"1",opacityOut:"0",animatedIn:"zoomIn",animatedOut:"zoomOut",animationDuration:".6s",overflow:"auto",beforeOpen:function(){},afterOpen:function(){},beforeClose:function(){},afterClose:function(){}},t),o=e(".close-"+s.modalTarget),u=e(i).attr("href"),f=e("body").find("#"+s.modalTarget),l="#"+f.attr("id");f.addClass("animated"),f.addClass(s.modalTarget+"-off");var c={position:s.position,width:s.width,height:s.height,top:s.top,left:s.left,"background-color":s.color,"overflow-y":s.overflow,"z-index":s.zIndexOut,opacity:s.opacityOut,"-webkit-animation-duration":s.animationDuration};f.css(c),i.click(function(t){t.preventDefault(),e("body, html").css({overflow:"hidden"}),u==l&&(f.hasClass(s.modalTarget+"-off")&&(f.removeClass(s.animatedOut),f.removeClass(s.modalTarget+"-off"),f.addClass(s.modalTarget+"-on")),f.hasClass(s.modalTarget+"-on")&&(s.beforeOpen(),f.css({opacity:s.opacityIn,"z-index":s.zIndexIn}),f.addClass(s.animatedIn),f.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",r)))}),o.click(function(t){t.preventDefault(),e("body, html").css({overflow:"auto"}),s.beforeClose(),f.hasClass(s.modalTarget+"-on")&&(f.removeClass(s.modalTarget+"-on"),f.addClass(s.modalTarget+"-off")),f.hasClass(s.modalTarget+"-off")&&(f.removeClass(s.animatedIn),f.addClass(s.animatedOut),f.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",n))})}}(jQuery),define("animatedModal",function(){}),define("coreUI",["smashers","cardInterface","sweetalert","animatedModal"],function(e,t,n){function r(e){var t=null;if(document.cookie&&document.cookie!=""){var n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=jQuery.trim(n[r]);if(i.substring(0,e.length+1)==e+"="){t=decodeURIComponent(i.substring(e.length+1));break}}}return t}function d(){o.click(function(){e.getMatches(function(e){p!=null&&(p.stopListening(),p.$(".cards").empty()),p=t.getCardList({collection:e,el:"#match-list",draggable:!1},{add:!0})})}).animatedModal({afterOpen:function(){l.show().addClass("animated bounceInLeft")},afterClose:function(){l.hide().removeClass("animated bounceOutRight")},beforeClose:function(){l.removeClass("bounceInLeft").addClass("animated bounceOutRight")}}),f.click(function(){h===!1?(s.add(".twitter-typeahead").fadeIn("fast"),f.removeClass("icon-search3").addClass("active-searchbar icon-cross"),h=!0):(s.add(".twitter-typeahead").fadeOut("fast"),f.removeClass("active-searchbar icon-cross").addClass("icon-search3"),h=!1)}),u.animatedModal({modalTarget:"updateProfileModal"}),a.animatedModal({modalTarget:"updateProfileModal",beforeOpen:function(){var t=(new i({model:e.getActiveUser()})).render().delegateEvents();$("#updateProfileModal .modal-content").html(t.el)}})}var i=Backbone.View.extend({template:_.template($("#user-profile").html()),render:function(){return this.$el.html(this.template(this.model.toJSON())),this},events:{"change #file-select":function(e){var t=this,n=new FileReader;this.$(".js-upload").text("Click to finalize your picture!").show().removeClass("animated bounce").addClass("animated bounce"),n.onload=function(){var e=document.getElementById("output");e.src=n.result},n.readAsDataURL(e.target.files[0])},"click .js-upload":function(t){var i=$(t.currentTarget),s=document.getElementById("file-select").files,o=s[0],u=this;if(!o){i.show().text("Select a file first!");return}var a=new FormData;i.text("Uploading...");if(!o.type.match("image.*"))return;a.append("headshot",o);var f=new XMLHttpRequest;f.open("PUT","/api/v1/user/"+e.getActiveUser().id+"/",!0),f.setRequestHeader("X-CSRFToken",r("csrftoken")),f.onload=function(){if(f.status===200){var e=JSON.parse(f.responseText);u.model.set("headshot",e.headshot),n({type:"success",title:"Picture uploaded!",text:"Nice work. Get ready for the matches to pour in.",timer:4e3}),i.html("Upload")}else alert("An error occurred!")},f.send(a)},"click .js-deactivate-account":function(){n({title:"Are you sure?",text:"You will not be able to recover it!",type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"Yes, delete it",cancelButtonText:"No, cancel plz",closeOnConfirm:!1,closeOnCancel:!1},function(t){t?$.ajax({url:"/api/v1/user/"+e.getActiveUser().id+"/",type:"DELETE"}).success(function(){n("Deleted!","Your account has been deleted.","success")}).error(function(){n("Oh no!","Something went wrong deleting your account :(","error")}):n("Cancelled","Your account is safe :)","error")})},"click .js-logout":function(){$.get("/api/v1/user/logout/").success(function(e){n({type:"success",title:"Successfully logged out.",text:"Get out there and go smash!"}),setTimeout(function(){window.location.href="/"},1e3)})}}}),s=$("#smash-autocomplete"),o=$("#show-matches"),u=$("#js-add-picture"),a=$(".js-show-profile"),f=$(".js-show-searchbar"),l=$("#match-list"),c=$("#upload"),h=!1,p=null;return{init:d,setNumMatches:function(e){$("#num-matches").text(e)}}}),define("login",["sweetalert","cardInterface","smashers","coreUI","animatedModal"],function(e,t,n,r){var i=$(".login-wrap"),s=$("#open-registration");s.animatedModal({modalTarget:"registrationModal"}),i.find(".inputs input").keydown(function(e){var t=e.keyCode||e.which;t===13&&u()});var o=$("#login-submit"),u=function(){var i=$(".login-inputs").find("[name]"),s={},o=!1,u,a;i.each(function(){var e=$(this);u=e.attr("name"),a=e.val().toLowerCase().trim(),s[u]=a});if(o===!0)return;$.ajax({url:"/api/v1/user/#/",data:JSON.stringify(s),contentType:"application/json",dataType:"json",type:"POST"}).success(function(e){e.success===!0&&(n.setActiveUser(e.user),console.log(e.user),r.setNumMatches(e.user.num_matches),$(".logged-out-content").fadeOut("fast",function(){$("#login-stylesheet").remove(),$(".logged-in-content").fadeIn("fast",function(){t.activeSet().getNextSwipeSet()})}))}).error(function(t){console.log(t),e({type:"error",title:"Make sure you register!",text:"It looks like your username or password was incorrect, or you forgot to register."})})},a="Either we don't have your email in our database, or someone has already registered that address. Check the email address for a registration link. Search your spam folder.",f=function(){var t=$(this),n=t.closest(".form");console.log(n);var r={},i=!1;n.children("input").each(function(){var t=$(this),n=t.val().toLowerCase().trim(),s=t.attr("name");r[s]=n,n===""&&(i=!0,e({type:"error",title:"You can't leave any fields blank.",timer:2e3}))}),r.password1!==r.password2&&(e({type:"error",title:"Passwords don't match",text:"You need to make your passwords match!",timer:2e3}),i=!0),i===!1&&$.post("/accounts/register/",r,function(t){t==0?e({type:"error",title:"Something went wrong",text:a}):e({type:"success",title:"Nice! Check your email!",text:"Check your email for a validation link! Then you can get 'smashing' ;)"})},"json").error(function(t){e({type:"error",title:"Something went wrong",text:a})})};o.click(u);var l=$("#register");l.click(f)}),function(e){var t=function(){return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(e){return!e||/^\s*$/.test(e)},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(e){return typeof e=="string"},isNumber:function(e){return typeof e=="number"},isArray:e.isArray,isFunction:e.isFunction,isObject:e.isPlainObject,isUndefined:function(e){return typeof e=="undefined"},toStr:function(n){return t.isUndefined(n)||n===null?"":n+""},bind:e.proxy,each:function(t,n){function r(e,t){return n(t,e)}e.each(t,r)},map:e.map,filter:e.grep,every:function(t,n){var r=!0;return t?(e.each(t,function(e,i){if(!(r=n.call(null,i,e,t)))return!1}),!!r):r},some:function(t,n){var r=!1;return t?(e.each(t,function(e,i){if(r=n.call(null,i,e,t))return!1}),!!r):r},mixin:e.extend,getUniqueId:function(){var e=0;return function(){return e++}}(),templatify:function(n){function r(){return String(n)}return e.isFunction(n)?n:r},defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var r,i;return function(){var s=this,o=arguments,u,a;return u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r,clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},throttle:function(e,t){var n,r,i,s,o,u;return o=0,u=function(){o=new Date,i=null,s=e.apply(n,r)},function(){var a=new Date,f=t-(a-o);return n=this,r=arguments,f<=0?(clearTimeout(i),i=null,o=a,s=e.apply(n,r)):i||(i=setTimeout(u,f)),s}},noop:function(){}}}(),n="0.10.4",r=function(){function e(e){return e=t.toStr(e),e?e.split(/\s+/):[]}function n(e){return e=t.toStr(e),e?e.split(/\W+/):[]}function r(e){return function(){var r=[].slice.call(arguments,0);return function(i){var s=[];return t.each(r,function(n){s=s.concat(e(t.toStr(i[n])))}),s}}}return{nonword:n,whitespace:e,obj:{nonword:r(n),whitespace:r(e)}}}(),i=function(){function n(n){this.maxSize=t.isNumber(n)?n:100,this.reset(),this.maxSize<=0&&(this.set=this.get=e.noop)}function r(){this.head=this.tail=null}function i(e,t){this.key=e,this.val=t,this.prev=this.next=null}return t.mixin(n.prototype,{set:function(t,n){var r=this.list.tail,s;this.size>=this.maxSize&&(this.list.remove(r),delete this.hash[r.key]),(s=this.hash[t])?(s.val=n,this.list.moveToFront(s)):(s=new i(t,n),this.list.add(s),this.hash[t]=s,this.size++)},get:function(t){var n=this.hash[t];if(n)return this.list.moveToFront(n),n.val},reset:function(){this.size=0,this.hash={},this.list=new r}}),t.mixin(r.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(e){this.remove(e),this.add(e)}}),n}(),s=function(){function i(e){this.prefix=["__",e,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix))}function s(){return(new Date).getTime()}function o(e){return JSON.stringify(t.isUndefined(e)?null:e)}function u(e){return JSON.parse(e)}var e,n;try{e=window.localStorage,e.setItem("~~~","!"),e.removeItem("~~~")}catch(r){e=null}return e&&window.JSON?n={_prefix:function(e){return this.prefix+e},_ttlKey:function(e){return this._prefix(e)+this.ttlKey},get:function(t){return this.isExpired(t)&&this.remove(t),u(e.getItem(this._prefix(t)))},set:function(n,r,i){return t.isNumber(i)?e.setItem(this._ttlKey(n),o(s()+i)):e.removeItem(this._ttlKey(n)),e.setItem(this._prefix(n),o(r))},remove:function(t){return e.removeItem(this._ttlKey(t)),e.removeItem(this._prefix(t)),this},clear:function(){var t,n,r=[],i=e.length;for(t=0;t<i;t++)(n=e.key(t)).match(this.keyMatcher)&&r.push(n.replace(this.keyMatcher,""));for(t=r.length;t--;)this.remove(r[t]);return this},isExpired:function(n){var r=u(e.getItem(this._ttlKey(n)));return t.isNumber(r)&&s()>r?!0:!1}}:n={get:t.noop,set:t.noop,remove:t.noop,clear:t.noop,isExpired:t.noop},t.mixin(i.prototype,n),i}(),o=function(){function u(t){t=t||{},this.cancelled=!1,this.lastUrl=null,this._send=t.transport?a(t.transport):e.ajax,this._get=t.rateLimiter?t.rateLimiter(this._get):this._get,this._cache=t.cache===!1?new i(0):o}function a(n){return function(i,s){function u(e){t.defer(function(){o.resolve(e)})}function a(e){t.defer(function(){o.reject(e)})}var o=e.Deferred();return n(i,s,u,a),o}}var n=0,r={},s=6,o=new i(10);return u.setMaxPendingRequests=function(t){s=t},u.resetCache=function(){o.reset()},t.mixin(u.prototype,{_get:function(e,t,i){function a(t){i&&i(null,t),o._cache.set(e,t)}function f(){i&&i(!0)}function l(){n--,delete r[e],o.onDeckRequestArgs&&(o._get.apply(o,o.onDeckRequestArgs),o.onDeckRequestArgs=null)}var o=this,u;if(this.cancelled||e!==this.lastUrl)return;(u=r[e])?u.done(a).fail(f):n<s?(n++,r[e]=this._send(e,t).done(a).fail(f).always(l)):this.onDeckRequestArgs=[].slice.call(arguments,0)},get:function(e,n,r){var i;return t.isFunction(n)&&(r=n,n={}),this.cancelled=!1,this.lastUrl=e,(i=this._cache.get(e))?t.defer(function(){r&&r(null,i)}):this._get(e,n,r),!!i},cancel:function(){this.cancelled=!0}}),u}(),u=function(){function n(t){t=t||{},(!t.datumTokenizer||!t.queryTokenizer)&&e.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=t.datumTokenizer,this.queryTokenizer=t.queryTokenizer,this.reset()}function r(e){return e=t.filter(e,function(e){return!!e}),e=t.map(e,function(e){return e.toLowerCase()}),e}function i(){return{ids:[],children:{}}}function s(e){var t={},n=[];for(var r=0,i=e.length;r<i;r++)t[e[r]]||(t[e[r]]=!0,n.push(e[r]));return n}function o(e,t){function u(e,t){return e-t}var n=0,r=0,i=[];e=e.sort(u),t=t.sort(u);var s=e.length,o=t.length;while(n<s&&r<o)e[n]<t[r]?n++:e[n]>t[r]?r++:(i.push(e[n]),n++,r++);return i}return t.mixin(n.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(e){var n=this;e=t.isArray(e)?e:[e],t.each(e,function(e){var s,o;s=n.datums.push(e)-1,o=r(n.datumTokenizer(e)),t.each(o,function(e){var t,r,o;t=n.trie,r=e.split("");while(o=r.shift())t=t.children[o]||(t.children[o]=i()),t.ids.push(s)})})},get:function(n){var i=this,u,a;return u=r(this.queryTokenizer(n)),t.each(u,function(e){var t,n,r,s;if(a&&a.length===0)return!1;t=i.trie,n=e.split("");while(t&&(r=n.shift()))t=t.children[r];if(!t||n.length!==0)return a=[],!1;s=t.ids.slice(0),a=a?o(a,s):s}),a?t.map(s(a),function(e){return i.datums[e]}):[]},reset:function(){this.datums=[],this.trie=i()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),n}(),a=function(){function r(e){return e.local||null}function i(r){var i,s;s={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}};if(i=r.prefetch||null)i=t.isString(i)?{url:i}:i,i=t.mixin(s,i),i.thumbprint=n+i.thumbprint,i.ajax.type=i.ajax.type||"GET",i.ajax.dataType=i.ajax.dataType||"json",!i.url&&e.error("prefetch requires url to be set");return i}function s(n){function s(e){return function(n){return t.debounce(n,e)}}function o(e){return function(n){return t.throttle(n,e)}}var r,i;i={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}};if(r=n.remote||null)r=t.isString(r)?{url:r}:r,r=t.mixin(i,r),r.rateLimiter=/^throttle$/i.test(r.rateLimitBy)?o(r.rateLimitWait):s(r.rateLimitWait),r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",delete r.rateLimitBy,delete r.rateLimitWait,!r.url&&e.error("remote requires url to be set");return r}return{local:r,prefetch:i,remote:s}}();(function(n){function l(t){(!t||!t.local&&!t.prefetch&&!t.remote)&&e.error("one of local, prefetch, or remote is required"),this.limit=t.limit||5,this.sorter=c(t.sorter),this.dupDetector=t.dupDetector||h,this.local=a.local(t),this.prefetch=a.prefetch(t),this.remote=a.remote(t),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new u({datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),this.storage=this.cacheKey?new s(this.cacheKey):null}function c(e){function n(t){return t.sort(e)}function r(e){return e}return t.isFunction(e)?n:r}function h(){return!1}var i,f;return i=n.Bloodhound,f={data:"data",protocol:"protocol",thumbprint:"thumbprint"},n.Bloodhound=l,l.noConflict=function(){return n.Bloodhound=i,l},l.tokenizers=r,t.mixin(l.prototype,{_loadPrefetch:function(n){function o(e){r.clear(),r.add(n.filter?n.filter(e):e),r._saveToStorage(r.index.serialize(),n.thumbprint,n.ttl)}var r=this,i,s;return(i=this._readFromStorage(n.thumbprint))?(this.index.bootstrap(i),s=e.Deferred().resolve()):s=e.ajax(n.url,n.ajax).done(o),s},_getFromRemote:function(t,n){function o(e,t){e?n([]):n(r.remote.filter?r.remote.filter(t):t)}var r=this,i,s;if(!this.transport)return;return t=t||"",s=encodeURIComponent(t),i=this.remote.replace?this.remote.replace(this.remote.url,t):this.remote.url.replace(this.remote.wildcard,s),this.transport.get(i,this.remote.ajax,o)},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(t,n,r){this.storage&&(this.storage.set(f.data,t,r),this.storage.set(f.protocol,location.protocol,r),this.storage.set(f.thumbprint,n,r))},_readFromStorage:function(t){var n={},r;return this.storage&&(n.data=this.storage.get(f.data),n.protocol=this.storage.get(f.protocol),n.thumbprint=this.storage.get(f.thumbprint)),r=n.thumbprint!==t||n.protocol!==location.protocol,n.data&&!r?n.data:null},_initialize:function(){function u(){r.add(t.isFunction(i)?i():i)}var r=this,i=this.local,s;return s=this.prefetch?this._loadPrefetch(this.prefetch):e.Deferred().resolve(),i&&s.done(u),this.transport=this.remote?new o(this.remote):null,this.initPromise=s.promise()},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){this.index.add(t)},get:function(n,r){function u(e){var n=s.slice(0);t.each(e,function(e){var r;return r=t.some(n,function(t){return i.dupDetector(e,t)}),!r&&n.push(e),n.length<i.limit}),r&&r(i.sorter(n))}var i=this,s=[],o=!1;s=this.index.get(n),s=this.sorter(s).slice(0,this.limit),s.length<this.limit?o=this._getFromRemote(n,u):this._cancelLastRemoteRequest(),o||(s.length>0||!this.transport)&&r&&r(s)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&o.resetCache()},ttAdapter:function(){return t.bind(this.get,this)}}),l})(this);var f=function(){return{wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'}}(),l=function(){var e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t.isMsie()&&t.isMsie()<=7&&t.mixin(e.input,{marginTop:"-1px"}),e}(),c=function(){function r(t){(!t||!t.el)&&e.error("EventBus initialized without el"),this.$el=e(t.el)}var n="typeahead:";return t.mixin(r.prototype,{trigger:function(e){var t=[].slice.call(arguments,1);this.$el.trigger(n+e,t)}}),r}(),h=function(){function n(t,n,r,i){var s;if(!r)return this;n=n.split(e),r=i?f(r,i):r,this._callbacks=this._callbacks||{};while(s=n.shift())this._callbacks[s]=this._callbacks[s]||{sync:[],async:[]},this._callbacks[s][t].push(r);return this}function r(e,t,r){return n.call(this,"async",e,t,r)}function i(e,t,r){return n.call(this,"sync",e,t,r)}function s(t){var n;if(!this._callbacks)return this;t=t.split(e);while(n=t.shift())delete this._callbacks[n];return this}function o(n){var r,i,s,o,a;if(!this._callbacks)return this;n=n.split(e),s=[].slice.call(arguments,1);while((r=n.shift())&&(i=this._callbacks[r]))o=u(i.sync,this,[r].concat(s)),a=u(i.async,this,[r].concat(s)),o()&&t(a);return this}function u(e,t,n){function r(){var r;for(var i=0,s=e.length;!r&&i<s;i+=1)r=e[i].apply(t,n)===!1;return!r}return r}function a(){var e;return window.setImmediate?e=function(t){setImmediate(function(){t()})}:e=function(t){setTimeout(function(){t()},0)},e}function f(e,t){return e.bind?e.bind(t):function(){e.apply(t,[].slice.call(arguments,0))}}var e=/\s+/,t=a();return{onSync:i,onAsync:r,off:s,trigger:o}}(),p=function(e){function r(e,n,r){var i=[],s;for(var o=0,u=e.length;o<u;o++)i.push(t.escapeRegExChars(e[o]));return s=r?"\\b("+i.join("|")+")\\b":"("+i.join("|")+")",n?new RegExp(s):new RegExp(s,"i")}var n={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(s){function u(t){var n,r,i;if(n=o.exec(t.data))i=e.createElement(s.tagName),s.className&&(i.className=s.className),r=t.splitText(n.index),r.splitText(n[0].length),i.appendChild(r.cloneNode(!0)),t.parentNode.replaceChild(i,r);return!!n}function a(e,t){var n,r=3;for(var i=0;i<e.childNodes.length;i++)n=e.childNodes[i],n.nodeType===r?i+=t(n)?1:0:a(n,t)}var o;s=t.mixin({},n,s);if(!s.node||!s.pattern)return;s.pattern=t.isArray(s.pattern)?s.pattern:[s.pattern],o=r(s.pattern,s.caseSensitive,s.wordsOnly),a(s.node,u)}}(window.document),d=function(){function r(r){var s=this,o,u,a,f;r=r||{},r.input||e.error("input is missing"),o=t.bind(this._onBlur,this),u=t.bind(this._onFocus,this),a=t.bind(this._onKeydown,this),f=t.bind(this._onInput,this),this.$hint=e(r.hint),this.$input=e(r.input).on("blur.tt",o).on("focus.tt",u).on("keydown.tt",a),this.$hint.length===0&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=t.noop),t.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(e){if(n[e.which||e.keyCode])return;t.defer(t.bind(s._onInput,s,e))}):this.$input.on("input.tt",f),this.query=this.$input.val(),this.$overflowHelper=i(this.$input)}function i(t){return e('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function s(e,t){return r.normalizeQuery(e)===r.normalizeQuery(t)}function o(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}var n;return n={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},r.normalizeQuery=function(e){return(e||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},t.mixin(r.prototype,h,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(t){var r=n[t.which||t.keyCode];this._managePreventDefault(r,t),r&&this._shouldTrigger(r,t)&&this.trigger(r+"Keyed",t)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(t,n){var r,i,s;switch(t){case"tab":i=this.getHint(),s=this.getInputValue(),r=i&&i!==s&&!o(n);break;case"up":case"down":r=!o(n);break;default:r=!1}r&&n.preventDefault()},_shouldTrigger:function(t,n){var r;switch(t){case"tab":r=!o(n);break;default:r=!0}return r},_checkInputValue:function(){var t,n,r;t=this.getInputValue(),n=s(t,this.query),r=n?this.query.length!==t.length:!1,this.query=t,n?r&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(t){this.query=t},getInputValue:function(){return this.$input.val()},setInputValue:function(t,n){this.$input.val(t),n?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,n,r,i;t=this.getInputValue(),n=this.getHint(),r=t!==n&&n.indexOf(t)===0,i=t!==""&&r&&!this.hasOverflow(),!i&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var e,n,r;return e=this.$input.val().length,n=this.$input[0].selectionStart,t.isNumber(n)?n===e:document.selection?(r=document.selection.createRange(),r.moveStart("character",-e),e===r.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null}}),r}(),v=function(){function s(n){n=n||{},n.templates=n.templates||{},n.source||e.error("missing source"),n.name&&!a(n.name)&&e.error("invalid dataset name: "+n.name),this.query=null,this.highlight=!!n.highlight,this.name=n.name||t.getUniqueId(),this.source=n.source,this.displayFn=o(n.display||n.displayKey),this.templates=u(n.templates,this.displayFn),this.$el=e(f.dataset.replace("%CLASS%",this.name))}function o(e){function n(t){return t[e]}return e=e||"value",t.isFunction(e)?e:n}function u(e,n){function r(e){return"<p>"+n(e)+"</p>"}return{empty:e.empty&&t.templatify(e.empty),header:e.header&&t.templatify(e.header),footer:e.footer&&t.templatify(e.footer),suggestion:e.suggestion||r}}function a(e){return/^[_a-zA-Z0-9-]+$/.test(e)}var n="ttDataset",r="ttValue",i="ttDatum";return s.extractDatasetName=function(r){return e(r).data(n)},s.extractValue=function(n){return e(n).data(r)},s.extractDatum=function(n){return e(n).data(i)},t.mixin(s.prototype,h,{_render:function(o,u){function h(){return a.templates.empty({query:o,isEmpty:!0})}function d(){function h(t){var s;return s=e(f.suggestion).append(a.templates.suggestion(t)).data(n,a.name).data(r,a.displayFn(t)).data(i,t),s.children().each(function(){e(this).css(l.suggestionChild)}),s}var s,c;return s=e(f.suggestions).css(l.suggestions),c=t.map(u,h),s.append.apply(s,c),a.highlight&&p({className:"tt-highlight",node:s[0],pattern:o}),s}function v(){return a.templates.header({query:o,isEmpty:!c})}function m(){return a.templates.footer({query:o,isEmpty:!c})}if(!this.$el)return;var a=this,c;this.$el.empty(),c=u&&u.length,!c&&this.templates.empty?this.$el.html(h()).prepend(a.templates.header?v():null).append(a.templates.footer?m():null):c&&this.$el.html(d()).prepend(a.templates.header?v():null).append(a.templates.footer?m():null),this.trigger("rendered")},getRoot:function(){return this.$el},update:function(t){function r(e){!n.canceled&&t===n.query&&n._render(t,e)}var n=this;this.query=t,this.canceled=!1,this.source(t,r)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),s}(),m=function(){function n(n){var i=this,s,o,u;n=n||{},n.menu||e.error("menu is required"),this.isOpen=!1,this.isEmpty=!0,this.datasets=t.map(n.datasets,r),s=t.bind(this._onSuggestionClick,this),o=t.bind(this._onSuggestionMouseEnter,this),u=t.bind(this._onSuggestionMouseLeave,this),this.$menu=e(n.menu).on("click.tt",".tt-suggestion",s).on("mouseenter.tt",".tt-suggestion",o).on("mouseleave.tt",".tt-suggestion",u),t.each(this.datasets,function(e){i.$menu.append(e.getRoot()),e.onSync("rendered",i._onRendered,i)})}function r(e){return new v(e)}return t.mixin(n.prototype,h,{_onSuggestionClick:function(n){this.trigger("suggestionClicked",e(n.currentTarget))},_onSuggestionMouseEnter:function(n){this._removeCursor(),this._setCursor(e(n.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function n(e){return e.isEmpty()}this.isEmpty=t.every(this.datasets,n),this.isEmpty?this._hide():this.isOpen&&this._show(),this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(t,n){t.first().addClass("tt-cursor"),!n&&this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(t){var n,r,i,s;if(!this.isOpen)return;r=this._getCursor(),n=this._getSuggestions(),this._removeCursor(),i=n.index(r)+t,i=(i+1)%(n.length+1)-1;if(i===-1){this.trigger("cursorRemoved");return}i<-1&&(i=n.length-1),this._setCursor(s=n.eq(i)),this._ensureVisible(s)},_ensureVisible:function(t){var n,r,i,s;n=t.position().top,r=n+t.outerHeight(!0),i=this.$menu.scrollTop(),s=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),n<0?this.$menu.scrollTop(i+n):s<r&&this.$menu.scrollTop(i+(r-s))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(t){this.$menu.css(t==="ltr"?l.ltr:l.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(t){var n=null;return t.length&&(n={raw:v.extractDatum(t),value:v.extractValue(t),datasetName:v.extractDatasetName(t)}),n},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(n){function r(e){e.update(n)}t.each(this.datasets,r)},empty:function(){function n(e){e.clear()}t.each(this.datasets,n),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function n(e){e.destroy()}this.$menu.off(".tt"),this.$menu=null,t.each(this.datasets,n)}}),n}(),g=function(){function r(n){var r,s,o;n=n||{},n.input||e.error("missing input"),this.isActivated=!1,this.autoselect=!!n.autoselect,this.minLength=t.isNumber(n.minLength)?n.minLength:1,this.$node=i(n.input,n.withHint),r=this.$node.find(".tt-dropdown-menu"),s=this.$node.find(".tt-input"),o=this.$node.find(".tt-hint"),s.on("blur.tt",function(e){var n,i,o;n=document.activeElement,i=r.is(n),o=r.has(n).length>0,t.isMsie()&&(i||o)&&(e.preventDefault(),e.stopImmediatePropagation(),t.defer(function(){s.focus()}))}),r.on("mousedown.tt",function(e){e.preventDefault()}),this.eventBus=n.eventBus||new c({el:s}),this.dropdown=(new m({menu:r,datasets:n.datasets})).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=(new d({input:s,hint:o})).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._setLanguageDirection()}function i(t,r){var i,o,u,a;i=e(t),o=e(f.wrapper).css(l.wrapper),u=e(f.dropdown).css(l.dropdown),a=i.clone().css(l.hint).css(s(i)),a.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1}),i.data(n,{dir:i.attr("dir"),autocomplete:i.attr("autocomplete"),spellcheck:i.attr("spellcheck"),style:i.attr("style")}),i.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(r?l.input:l.inputWithNoHint);try{!i.attr("dir")&&i.attr("dir","auto")}catch(c){}return i.wrap(o).parent().prepend(r?a:null).append(u)}function s(e){return{backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}}function o(e){var r=e.find(".tt-input");t.each(r.data(n),function(e,n){t.isUndefined(e)?r.removeAttr(n):r.attr(n,e)}),r.detach().removeData(n).removeClass("tt-input").insertAfter(e),e.remove()}var n="ttAttrs";return t.mixin(r.prototype,{_onSuggestionClicked:function(t,n){var r;(r=this.dropdown.getDatumForSuggestion(n))&&this._select(r)},_onCursorMoved:function(){var t=this.dropdown.getDatumForCursor();this.input.setInputValue(t.value,!0),this.eventBus.trigger("cursorchanged",t.raw,t.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint(),this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint(),this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0,this.dropdown.open()},_onBlurred:function(){this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()},_onEnterKeyed:function(t,n){var r,i;r=this.dropdown.getDatumForCursor(),i=this.dropdown.getDatumForTopSuggestion(),r?(this._select(r),n.preventDefault()):this.autoselect&&i&&(this._select(i),n.preventDefault())},_onTabKeyed:function(t,n){var r;(r=this.dropdown.getDatumForCursor())?(this._select(r),n.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){this.dir==="rtl"&&this._autocomplete()},_onRightKeyed:function(){this.dir==="ltr"&&this._autocomplete()},_onQueryChanged:function(t,n){this.input.clearHintIfInvalid(),n.length>=this.minLength?this.dropdown.update(n):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var t;this.dir!==(t=this.input.getLanguageDirection())&&(this.dir=t,this.$node.css("direction",t),this.dropdown.setLanguageDirection(t))},_updateHint:function(){var n,r,i,s,o,u;n=this.dropdown.getDatumForTopSuggestion(),n&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(r=this.input.getInputValue(),i=d.normalizeQuery(r),s=t.escapeRegExChars(i),o=new RegExp("^(?:"+s+")(.+$)","i"),u=o.exec(n.value),u?this.input.setHint(r+u[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(t){var n,r,i,s;n=this.input.getHint(),r=this.input.getQuery(),i=t||this.input.isCursorAtEnd(),n&&r!==n&&i&&(s=this.dropdown.getDatumForTopSuggestion(),s&&this.input.setInputValue(s.value),this.eventBus.trigger("autocompleted",s.raw,s.datasetName))},_select:function(n){this.input.setQuery(n.value),this.input.setInputValue(n.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",n.raw,n.datasetName),this.dropdown.close(),t.defer(t.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(n){n=t.toStr(n),this.isActivated?this.input.setInputValue(n):(this.input.setQuery(n),this.input.setInputValue(n,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),o(this.$node),this.$node=null}}),r}();(function(){var n,r,i;n=e.fn.typeahead,r="ttTypeahead",i={initialize:function(i,s){function o(){var n=e(this),o,u;t.each(s,function(e){e.highlight=!!i.highlight}),u=new g({input:n,eventBus:o=new c({el:n}),withHint:t.isUndefined(i.hint)?!0:!!i.hint,minLength:i.minLength,autoselect:i.autoselect,datasets:s}),n.data(r,u)}return s=t.isArray(s)?s:[].slice.call(arguments,1),i=i||{},this.each(o)},open:function(){function n(){var t=e(this),n;(n=t.data(r))&&n.open()}return this.each(n)},close:function(){function n(){var t=e(this),n;(n=t.data(r))&&n.close()}return this.each(n)},val:function(n){function i(){var t=e(this),i;(i=t.data(r))&&i.setVal(n)}function s(e){var t,n;if(t=e.data(r))n=t.getVal();return n}return arguments.length?this.each(i):s(this.first())},destroy:function(){function n(){var t=e(this),n;if(n=t.data(r))n.destroy(),t.removeData(r)}return this.each(n)}},e.fn.typeahead=function(t){var n;return i[t]&&t!=="initialize"?(n=this.filter(function(){return!!e(this).data(r)}),i[t].apply(n,[].slice.call(arguments,1))):i.initialize.apply(this,arguments)},e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this}})()}(window.jQuery),define("typeahead",function(){}),define("search",["typeahead","smashers","cardInterface"],function(e,t,n){function i(e){var i=new Bloodhound({local:e,datumTokenizer:function(e){return Bloodhound.tokenizers.whitespace(e.name)},queryTokenizer:Bloodhound.tokenizers.whitespace,limit:10});i.initialize(!0),r.typeahead({hint:!1,minLength:2,highlight:!0},{source:i.ttAdapter(),displayKey:"name",templates:{empty:"<div class='tt-empty-results'>No results found.</div>",suggestion:_.compile($("#suggestion-template").html())}}).on("typeahead:selected",function(e,i){r.typeahead("val",""),r.blur(),r.typeahead("blur");var s=t.getSmasher({id:i.pk});s.fetch().success(function(){n.activeSet().add(s)})})}var r=$("#smash-autocomplete");return function(e){e.compile=function(e){var t=this.template(e);return t.render=function(e){return this(e)},t}}(window._),i}),require.config({paths:{jquery:"bower_components/jquery/dist/jquery.min",underscore:"bower_components/underscore/underscore-min",backbone:"bower_components/backbone/backbone",animatedModal:"animatedModal/animatedModal.min",sweetalert:"bower_components/sweetalert/lib/sweet-alert.min"}}),define("app",["jquery","underscore","backbone"],function(e,t,n){function r(e){var t=null;if(document.cookie&&document.cookie!=""){var n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=jQuery.trim(n[r]);if(i.substring(0,e.length+1)==e+"="){t=decodeURIComponent(i.substring(e.length+1));break}}}return t}function i(e){return/^(GET|HEAD|OPTIONS|TRACE)$/.test(e)}e.ajaxSetup({beforeSend:function(e,t){!i(t.type)&&!this.crossDomain&&e.setRequestHeader("X-CSRFToken",r("csrftoken"))}}),window.TastypieModel=n.Model.extend({base_url:function(){var e=n.Model.prototype.url.call(this);return e.charAt(e.length-1)=="/"?e:e+"/"},url:function(){return this.base_url()}}),window.TastypieCollection=n.Collection.extend({parse:function(e){return this.recent_meta=e.meta||{},e.objects||e}});var s=require(["login"]);require(["smashers"],function(e){!t.isUndefined(window.user)&&!window.user.error&&e.setActiveUser(window.user)});var o=require(["cardInterface"]);require(["search"],function(e){e(window.people)}),require(["coreUI"],function(e){e.init(),window.user&&!window.user.error&&e.setNumMatches(window.user.num_matches)})});
\ No newline at end of file
diff --git a/smashers/static/smashers/scripts/cardInterface.js b/smashers/static/smashers/scripts/cardInterface.js
index f1bb7fa..f0b6d08 100644
--- a/smashers/static/smashers/scripts/cardInterface.js
+++ b/smashers/static/smashers/scripts/cardInterface.js
@@ -26,6 +26,7 @@ define("cardInterface", ["smashers"], function(smashers) {
})
},
"change:headshot": function(model, collection, opts) {
+ console.log(arguments)
}
})
},
diff --git a/smashers/static/smashers/scripts/coreUI.js b/smashers/static/smashers/scripts/coreUI.js
index cb21a0b..04a51c6 100644
--- a/smashers/static/smashers/scripts/coreUI.js
+++ b/smashers/static/smashers/scripts/coreUI.js
@@ -31,9 +31,7 @@ define("coreUI", ["smashers", "cardInterface", "sweetalert", "animatedModal"], f
var output = document.getElementById('output');
output.src = reader.result;
};
- if (e.target.files[0]) {
- reader.readAsDataURL(e.target.files[0]);
- }
+ reader.readAsDataURL(e.target.files[0]);
},
"click .js-upload": function(e) {
var $this = $(e.currentTarget);
diff --git a/smashers/static/smashers/scripts/#.js b/smashers/static/smashers/scripts/#.js
index 022f0f5..cb2092e 100644
--- a/smashers/static/smashers/scripts/#.js
+++ b/smashers/static/smashers/scripts/#.js
@@ -7,7 +7,7 @@ define("login", ["sweetalert", "cardInterface", "smashers", "coreUI", "animatedM
modalTarget: "registrationModal"
});
- $loginWrap.find(".login-inputs input").keydown(function(e) {
+ $loginWrap.find(".inputs input").keydown(function(e) {
var key = e.keyCode || e.which;
if (key === 13) {
tryLogin();
@@ -74,6 +74,7 @@ define("login", ["sweetalert", "cardInterface", "smashers", "coreUI", "animatedM
});
}
}).error(function(response) {
+ console.log(response)
swal({
type: "error",
title: "Make sure you register!",
diff --git a/smashers/static/smashers/scripts/smashers.js b/smashers/static/smashers/scripts/smashers.js
index 15ec71a..605b06d 100644
--- a/smashers/static/smashers/scripts/smashers.js
+++ b/smashers/static/smashers/scripts/smashers.js
@@ -74,11 +74,7 @@ define("smashers", ["sweetalert"], function(swal) {
text: messageGenerator(firstname),
type: "success" ,
timer: 2300
- });
- // Sorry :(
- var matches = parseInt($("#num-matches").text());
- $("#num-matches").text(++matches)
-
+ })
}
}).
error(function() {
diff --git a/smashers/static/smashers/stylesheets/base.css b/smashers/static/smashers/stylesheets/base.css
index 1c12193..ae2dfd5 100644
--- a/smashers/static/smashers/stylesheets/base.css
+++ b/smashers/static/smashers/stylesheets/base.css
@@ -1143,7 +1143,7 @@ a:hover, a:focus {
left: 50%;
top: 20px;
margin-left: -44px;
- z-index: 10;
+ z-index: 100;
}
/* line 134, ../sass/screen.scss */
#choices li.show-matches-wrapper button::before {
diff --git a/smashers/static/smashers/stylesheets/screen.css b/smashers/static/smashers/stylesheets/screen.css
index 15942ee..6429e23 100644
--- a/smashers/static/smashers/stylesheets/screen.css
+++ b/smashers/static/smashers/stylesheets/screen.css
@@ -1078,7 +1078,7 @@ a:hover, a:focus {
left: 50%;
top: 20px;
margin-left: -44px;
- z-index: 10;
+ z-index: 100;
}
/* line 134, ../sass/screen.scss */
#choices li.show-matches-wrapper button::before {
diff --git a/smashers/templates/base.html b/smashers/templates/base.html
index be76707..330f79f 100644
--- a/smashers/templates/base.html
+++ b/smashers/templates/base.html
@@ -86,6 +86,9 @@
{% include 'templates.html' %}
<p class="wrapper center disclaimer">Use this app at your own risk. The owners are not liable for anything that occurs here. If you have concerns, contact us <a href="mailto:jumbosmashers@gmail.com">here.</a></p>
<script src="{% static 'smashers/scripts/swingfull.js' %}"></script>
- <script src="{% static 'smashers/scripts/require.min.js' %}" data-main="app"></script>
+ <script src="{% static 'smashers/scripts/require.min.js' %}"></script>
+ <script src="{% static 'smashers/scripts/app-built.js' %}"></script>
+ <script type="text/javascript">require(["app"]);</script>
+
</body>
</html>