Skip to content

Instantly share code, notes, and snippets.

@ben-ng
Created January 11, 2014 01:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ben-ng/8365700 to your computer and use it in GitHub Desktop.
Save ben-ng/8365700 to your computer and use it in GitHub Desktop.
requirebin sketch
var Backbone = require('backbone')
, $ = require('jquery')(window)
, View
, myView
, testModel;
Backbone.$ = $;
testModel = new Backbone.Model();
View = Backbone.View.extend({
template: '<a href="#" class="js-trigger">Fire The Missles</a>'
, initialize: function () {
// Listen to the same thing twice
this.listenTo(testModel, 'fakeEvent', this.doThing);
this.listenTo(testModel, 'fakeEvent', this.doThing);
}
, events: {
'click .js-trigger': 'triggerTheThing'
}
, triggerTheThing: function () {
testModel.trigger('fakeEvent');
}
, doThing: function () {
alert('Missle Fired');
}
, render: function () {
this.$el.html(this.template);
}
});
myView = new View({el: document.body});
myView.render();
require=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw Error("Cannot find module '"+s+"'")}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;r.length>s;s++)i(r[s]);return i}({DRZdmu:[function(e,t){(function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e):function(e){if(!e.document)throw Error("jQuery requires a window with a document");return n(e)}:n(e)})(this,function(e){function t(e){var t=e.length,n=Z.type(e);return"function"===n||Z.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function n(e,t,n){if(Z.isFunction(t))return Z.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return Z.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return Z.filter(t,e,n);t=Z.filter(t,e)}return Z.grep(e,function(e){return U.call(t,e)>=0!==n})}function r(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function i(e){var t=pt[e]={};return Z.each(e.match(ht)||[],function(e,n){t[n]=!0}),t}function o(){Q.removeEventListener("DOMContentLoaded",o,!1),e.removeEventListener("load",o,!1),Z.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+Math.random()}function a(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(xt,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:yt.test(n)?Z.parseJSON(n):n}catch(i){}mt.set(e,t,n)}else n=void 0;return n}function u(){return!0}function c(){return!1}function l(){try{return Q.activeElement}catch(e){}}function f(e,t){return Z.nodeName(e,"table")&&Z.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function h(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function p(e){var t=Lt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function d(e,t){for(var n=0,r=e.length;r>n;n++)vt.set(e[n],"globalEval",!t||vt.get(t[n],"globalEval"))}function g(e,t){var n,r,i,o,s,a,u,c;if(1===t.nodeType){if(vt.hasData(e)&&(o=vt.access(e),s=vt.set(t,o),c=o.events)){delete s.handle,s.events={};for(i in c)for(n=0,r=c[i].length;r>n;n++)Z.event.add(t,i,c[i][n])}mt.hasData(e)&&(a=mt.access(e),u=Z.extend({},a),mt.set(t,u))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&Z.nodeName(e,t)?Z.merge([e],n):n}function m(e,t){var n=t.nodeName.toLowerCase();"input"===n&&kt.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function y(t,n){var r=Z(n.createElement(t)).appendTo(n.body),i=e.getDefaultComputedStyle?e.getDefaultComputedStyle(r[0]).display:Z.css(r[0],"display");return r.detach(),i}function x(e){var t=Q,n=Pt[e];return n||(n=y(e,t),"none"!==n&&n||(Rt=(Rt||Z("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Rt[0].contentDocument,t.write(),t.close(),n=y(e,t),Rt.detach()),Pt[e]=n),n}function b(e,t,n){var r,i,o,s,a=e.style;return n=n||Bt(e),n&&(s=n.getPropertyValue(t)||n[t]),n&&(""!==s||Z.contains(e.ownerDocument,e)||(s=Z.style(e,t)),It.test(s)&&$t.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function w(e,t){return{get:function(){return e()?(delete this.get,void 0):(this.get=t).apply(this,arguments)}}}function T(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),r=t,i=Jt.length;i--;)if(t=Jt[i]+n,t in e)return t;return r}function k(e,t,n){var r=zt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function C(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=Z.css(e,n+wt[o],!0,i)),r?("content"===n&&(s-=Z.css(e,"padding"+wt[o],!0,i)),"margin"!==n&&(s-=Z.css(e,"border"+wt[o]+"Width",!0,i))):(s+=Z.css(e,"padding"+wt[o],!0,i),"padding"!==n&&(s+=Z.css(e,"border"+wt[o]+"Width",!0,i)));return s}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Bt(e),s="border-box"===Z.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=b(e,t,o),(0>i||null==i)&&(i=e.style[t]),It.test(i))return i;r=s&&(G.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+C(e,t,n||(s?"border":"content"),r,o)+"px"}function N(e,t){for(var n,r,i,o=[],s=0,a=e.length;a>s;s++)r=e[s],r.style&&(o[s]=vt.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Tt(r)&&(o[s]=vt.access(r,"olddisplay",x(r.nodeName)))):o[s]||(i=Tt(r),(n&&"none"!==n||!i)&&vt.set(r,"olddisplay",i?n:Z.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}function j(e,t,n,r,i){return new j.prototype.init(e,t,n,r,i)}function S(){return setTimeout(function(){Yt=void 0}),Yt=Z.now()}function _(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)n=wt[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function A(e,t,n){for(var r,i=(tn[t]||[]).concat(tn["*"]),o=0,s=i.length;s>o;o++)if(r=i[o].call(n,t,e))return r}function D(e,t,n){var r,i,o,s,a,u,c,l=this,f={},h=e.style,p=e.nodeType&&Tt(e),d=vt.get(e,"fxshow");n.queue||(a=Z._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,l.always(function(){l.always(function(){a.unqueued--,Z.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],c=Z.css(e,"display"),"none"===c&&(c=x(e.nodeName)),"inline"===c&&"none"===Z.css(e,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",l.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Qt.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!d||void 0===d[r])continue;p=!0}f[r]=d&&d[r]||Z.style(e,r)}if(!Z.isEmptyObject(f)){d?"hidden"in d&&(p=d.hidden):d=vt.access(e,"fxshow",{}),o&&(d.hidden=!p),p?Z(e).show():l.done(function(){Z(e).hide()}),l.done(function(){var t;vt.remove(e,"fxshow");for(t in f)Z.style(e,t,f[t])});for(r in f)s=A(p?d[r]:0,r,l),r in d||(d[r]=s.start,p&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function q(e,t){var n,r,i,o,s;for(n in e)if(r=Z.camelCase(n),i=t[r],o=e[n],Z.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),s=Z.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function O(e,t,n){var r,i,o=0,s=en.length,a=Z.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Yt||S(),n=Math.max(0,c.startTime+c.duration-t),r=n/c.duration||0,o=1-r,s=0,u=c.tweens.length;u>s;s++)c.tweens[s].run(o);return a.notifyWith(e,[c,o,n]),1>o&&u?n:(a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:Z.extend({},t),opts:Z.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Yt||S(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Z.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)c.tweens[n].run(1);return t?a.resolveWith(e,[c,t]):a.rejectWith(e,[c,t]),this}}),l=c.props;for(q(l,c.opts.specialEasing);s>o;o++)if(r=en[o].call(c,e,l,c.opts))return r;return Z.map(l,A,c),Z.isFunction(c.opts.start)&&c.opts.start.call(e,c),Z.fx.timer(Z.extend(u,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function H(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(ht)||[];if(Z.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function L(e,t,n,r){function i(a){var u;return o[a]=!0,Z.each(e[a]||[],function(e,a){var c=a(t,n,r);return"string"!=typeof c||s||o[c]?s?!(u=c):void 0:(t.dataTypes.unshift(c),i(c),!1)}),u}var o={},s=e===wn;return i(t.dataTypes[0])||!o["*"]&&i("*")}function M(e,t){var n,r,i=Z.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&Z.extend(!0,e,r),e}function F(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):void 0}function R(e,t,n,r){var i,o,s,a,u,c={},l=e.dataTypes.slice();if(l[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=c[u+" "+o]||c["* "+o],!s)for(i in c)if(a=i.split(" "),a[1]===o&&(s=c[u+" "+a[0]]||c["* "+a[0]])){s===!0?s=c[i]:c[i]!==!0&&(o=a[0],l.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(f){return{state:"parsererror",error:s?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function P(e,t,n,r){var i;if(Z.isArray(t))Z.each(t,function(t,i){n||En.test(e)?r(e,i):P(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==Z.type(t))r(e,t);else for(i in t)P(e+"["+i+"]",t[i],n,r)}function $(e){return Z.isWindow(e)?e:9===e.nodeType&&e.defaultView}var I=[],B=I.slice,W=I.concat,z=I.push,U=I.indexOf,X={},V=X.toString,J=X.hasOwnProperty,Y="".trim,G={},Q=e.document,K="2.1.0-beta3",Z=function(e,t){return new Z.fn.init(e,t)},et=/^-ms-/,tt=/-([\da-z])/gi,nt=function(e,t){return t.toUpperCase()};Z.fn=Z.prototype={jquery:K,constructor:Z,selector:"",length:0,toArray:function(){return B.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:B.call(this)},pushStack:function(e){var t=Z.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return Z.each(this,e,t)},map:function(e){return this.pushStack(Z.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(B.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:z,sort:I.sort,splice:I.splice},Z.extend=Z.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||Z.isFunction(s)||(s={}),a===u&&(s=this,a--);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(c&&r&&(Z.isPlainObject(r)||(i=Z.isArray(r)))?(i?(i=!1,o=n&&Z.isArray(n)?n:[]):o=n&&Z.isPlainObject(n)?n:{},s[t]=Z.extend(c,o,r)):void 0!==r&&(s[t]=r));return s},Z.extend({expando:"jQuery"+(K+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw Error(e)},noop:function(){},isFunction:function(e){return"function"===Z.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return e-parseFloat(e)>=0},isPlainObject:function(e){if("object"!==Z.type(e)||e.nodeType||Z.isWindow(e))return!1;try{if(e.constructor&&!J.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!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?X[V.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=Z.trim(e),e&&(1===e.indexOf("use strict")?(t=Q.createElement("script"),t.text=e,Q.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(et,"ms-").replace(tt,nt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,o=0,s=e.length,a=t(e);if(r){if(a)for(;s>o&&(i=n.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=n.apply(e[o],r),i===!1)break}else if(a)for(;s>o&&(i=n.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=n.call(e[o],o,e[o]),i===!1)break;return e},trim:function(e){return null==e?"":Y.call(e)},makeArray:function(e,n){var r=n||[];return null!=e&&(t(Object(e))?Z.merge(r,"string"==typeof e?[e]:e):z.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:U.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=[],o=0,s=e.length,a=!n;s>o;o++)r=!t(e[o],o),r!==a&&i.push(e[o]);return i},map:function(e,n,r){var i,o=0,s=e.length,a=t(e),u=[];if(a)for(;s>o;o++)i=n(e[o],o,r),null!=i&&u.push(i);else for(o in e)i=n(e[o],o,r),null!=i&&u.push(i);return W.apply([],u)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),Z.isFunction(e)?(r=B.call(arguments,2),i=function(){return e.apply(t||this,r.concat(B.call(arguments)))},i.guid=e.guid=e.guid||Z.guid++,i):void 0},now:Date.now,support:G}),Z.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){X["[object "+t+"]"]=t.toLowerCase()});var rt=function(e){function t(e,t,n,r){var i,o,s,a,u,c,f,d,g,v;if((t?t.ownerDocument||t:I)!==O&&q(t),t=t||O,n=n||[],!e||"string"!=typeof e)return n;if(1!==(a=t.nodeType)&&9!==a)return[];if(L&&!r){if(i=xt.exec(e))if(s=i[1]){if(9===a){if(o=t.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&P(t,o)&&o.id===s)return n.push(o),n}else{if(i[2])return et.apply(n,t.getElementsByTagName(e)),n;if((s=i[3])&&k.getElementsByClassName&&t.getElementsByClassName)return et.apply(n,t.getElementsByClassName(s)),n}if(k.qsa&&(!M||!M.test(e))){if(d=f=$,g=t,v=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(c=h(e),(f=t.getAttribute("id"))?d=f.replace(wt,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",u=c.length;u--;)c[u]=d+p(c[u]);g=bt.test(e)&&l(t.parentNode)||t,v=c.join(",")}if(v)try{return et.apply(n,g.querySelectorAll(v)),n}catch(m){}finally{f||t.removeAttribute("id")}}}return w(e.replace(ct,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>E.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[$]=!0,e}function i(e){var t=O.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)E.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&typeof e.getElementsByTagName!==J&&e}function f(){}function h(e,n){var r,i,o,s,a,u,c,l=U[e+" "];if(l)return n?0:l.slice(0);for(a=e,u=[],c=E.preFilter;a;){(!r||(i=lt.exec(a)))&&(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),r=!1,(i=ft.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(ct," ")}),a=a.slice(r.length));for(s in E.filter)!(i=gt[s].exec(a))||c[s]&&!(i=c[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?t.error(e):U(e,u).slice(0)}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=W++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,s){var a,u,c,l=B+" "+o;if(s){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,s))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(c=t[$]||(t[$]={}),(u=c[r])&&u[0]===l){if((a=u[1])===!0||a===C)return a===!0}else if(u=c[r]=[l],u[1]=e(t,n,s)||C,u[1]===!0)return!0}}function g(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function v(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,c=null!=t;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),c&&t.push(a));return s}function m(e,t,n,i,o,s){return i&&!i[$]&&(i=m(i)),o&&!o[$]&&(o=m(o,s)),r(function(r,s,a,u){var c,l,f,h=[],p=[],d=s.length,g=r||b(t||"*",a.nodeType?[a]:a,[]),m=!e||!r&&t?g:v(g,h,e,a,u),y=n?o||(r?e:d||i)?[]:s:m;if(n&&n(m,y,a,u),i)for(c=v(y,p),i(c,[],a,u),l=c.length;l--;)(f=c[l])&&(y[p[l]]=!(m[p[l]]=f));if(r){if(o||e){if(o){for(c=[],l=y.length;l--;)(f=y[l])&&c.push(m[l]=f);o(null,y=[],c,u)}for(l=y.length;l--;)(f=y[l])&&(c=o?nt.call(r,f):h[l])>-1&&(r[c]=!(s[c]=f))}}else y=v(y===s?y.splice(d,y.length):y),o?o(null,s,y,u):et.apply(s,y)})}function y(e){for(var t,n,r,i=e.length,o=E.relative[e[0].type],s=o||E.relative[" "],a=o?1:0,u=d(function(e){return e===t},s,!0),c=d(function(e){return nt.call(t,e)>-1},s,!0),l=[function(e,n,r){return!o&&(r||n!==_)||((t=n).nodeType?u(e,n,r):c(e,n,r))}];i>a;a++)if(n=E.relative[e[a].type])l=[d(g(l),n)];else{if(n=E.filter[e[a].type].apply(null,e[a].matches),n[$]){for(r=++a;i>r&&!E.relative[e[r].type];r++);return m(a>1&&g(l),a>1&&p(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ct,"$1"),n,r>a&&y(e.slice(a,r)),i>r&&y(e=e.slice(r)),i>r&&p(e))}l.push(n)}return g(l)}function x(e,n){var i=0,o=n.length>0,s=e.length>0,a=function(r,a,u,c,l){var f,h,p,d=0,g="0",m=r&&[],y=[],x=_,b=r||s&&E.find.TAG("*",l),w=B+=null==x?1:Math.random()||.1,T=b.length;for(l&&(_=a!==O&&a,C=i);g!==T&&null!=(f=b[g]);g++){if(s&&f){for(h=0;p=e[h++];)if(p(f,a,u)){c.push(f);break}l&&(B=w,C=++i)}o&&((f=!p&&f)&&d--,r&&m.push(f))}if(d+=g,o&&g!==d){for(h=0;p=n[h++];)p(m,y,a,u);if(r){if(d>0)for(;g--;)m[g]||y[g]||(y[g]=K.call(c));y=v(y)}et.apply(c,y),l&&!r&&y.length>0&&d+n.length>1&&t.uniqueSort(c)}return l&&(B=w,_=x),m};return o?r(a):a}function b(e,n,r){for(var i=0,o=n.length;o>i;i++)t(e,n[i],r);return r}function w(e,t,n,r){var i,o,s,a,u,c=h(e);if(!r&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&k.getById&&9===t.nodeType&&L&&E.relative[o[1].type]){if(t=(E.find.ID(s.matches[0].replace(Tt,kt),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=gt.needsContext.test(e)?0:o.length;i--&&(s=o[i],!E.relative[a=s.type]);)if((u=E.find[a])&&(r=u(s.matches[0].replace(Tt,kt),bt.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return et.apply(n,r),n;break}}return S(e,c)(r,t,!L,n,bt.test(e)&&l(t.parentNode)||t),n}var T,k,C,E,N,j,S,_,A,D,q,O,H,L,M,F,R,P,$="sizzle"+-new Date,I=e.document,B=0,W=0,z=n(),U=n(),X=n(),V=function(e,t){return e===t&&(D=!0),0},J="undefined",Y=1<<31,G={}.hasOwnProperty,Q=[],K=Q.pop,Z=Q.push,et=Q.push,tt=Q.slice,nt=Q.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},rt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",ot="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",st=ot.replace("w","w#"),at="\\["+it+"*("+ot+")"+it+"*(?:([*^$|!~]?=)"+it+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+st+")|)|)"+it+"*\\]",ut=":("+ot+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+at.replace(3,8)+")*)|.*)\\)|)",ct=RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),lt=RegExp("^"+it+"*,"+it+"*"),ft=RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ht=RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),pt=RegExp(ut),dt=RegExp("^"+st+"$"),gt={ID:RegExp("^#("+ot+")"),CLASS:RegExp("^\\.("+ot+")"),TAG:RegExp("^("+ot.replace("w","w*")+")"),ATTR:RegExp("^"+at),PSEUDO:RegExp("^"+ut),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:RegExp("^(?:"+rt+")$","i"),needsContext:RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},vt=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,yt=/^[^{]+\{\s*\[native \w/,xt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,bt=/[+~]/,wt=/'|\\/g,Tt=RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),kt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{et.apply(Q=tt.call(I.childNodes),I.childNodes),Q[I.childNodes.length].nodeType}catch(Ct){et={apply:Q.length?function(e,t){Z.apply(e,tt.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}k=t.support={},j=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},q=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:I,r=n.defaultView;return n!==O&&9===n.nodeType&&n.documentElement?(O=n,H=n.documentElement,L=!j(n),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){q()},!1):r.attachEvent&&r.attachEvent("onunload",function(){q()})),k.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),k.getElementsByTagName=i(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),k.getElementsByClassName=yt.test(n.getElementsByClassName)&&i(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),k.getById=i(function(e){return H.appendChild(e).id=$,!n.getElementsByName||!n.getElementsByName($).length}),k.getById?(E.find.ID=function(e,t){if(typeof t.getElementById!==J&&L){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},E.filter.ID=function(e){var t=e.replace(Tt,kt);return function(e){return e.getAttribute("id")===t}}):(delete E.find.ID,E.filter.ID=function(e){var t=e.replace(Tt,kt);return function(e){var n=typeof e.getAttributeNode!==J&&e.getAttributeNode("id");return n&&n.value===t}}),E.find.TAG=k.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==J?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},E.find.CLASS=k.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==J&&L?t.getElementsByClassName(e):void 0},F=[],M=[],(k.qsa=yt.test(n.querySelectorAll))&&(i(function(e){e.innerHTML="<select t=''><option selected=''></option></select>",e.querySelectorAll("[t^='']").length&&M.push("[*^$]="+it+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||M.push("\\["+it+"*(?:value|"+rt+")"),e.querySelectorAll(":checked").length||M.push(":checked")}),i(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&M.push("name"+it+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(k.matchesSelector=yt.test(R=H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&i(function(e){k.disconnectedMatch=R.call(e,"div"),R.call(e,"[s!='']:x"),F.push("!=",ut)}),M=M.length&&RegExp(M.join("|")),F=F.length&&RegExp(F.join("|")),t=yt.test(H.compareDocumentPosition),P=t||yt.test(H.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)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return D=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!k.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===I&&P(I,e)?-1:t===n||t.ownerDocument===I&&P(I,t)?1:A?nt.call(A,e)-nt.call(A,t):0:4&r?-1:1)}:function(e,t){if(e===t)return D=!0,0;var r,i=0,o=e.parentNode,a=t.parentNode,u=[e],c=[t];if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:A?nt.call(A,e)-nt.call(A,t):0;if(o===a)return s(e,t);for(r=e;r=r.parentNode;)u.unshift(r);for(r=t;r=r.parentNode;)c.unshift(r);for(;u[i]===c[i];)i++;return i?s(u[i],c[i]):u[i]===I?-1:c[i]===I?1:0},n):O},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==O&&q(e),n=n.replace(ht,"='$1']"),!(!k.matchesSelector||!L||F&&F.test(n)||M&&M.test(n)))try{var r=R.call(e,n);if(r||k.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,O,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==O&&q(e),P(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==O&&q(e);var n=E.attrHandle[t.toLowerCase()],r=n&&G.call(E.attrHandle,t.toLowerCase())?n(e,t,!L):void 0;return void 0!==r?r:k.attributes||!L?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!k.detectDuplicates,A=!k.sortStable&&e.slice(0),e.sort(V),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return A=null,e},N=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=N(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=N(t);return n},E=t.selectors={cacheLength:50,createPseudo:r,match:gt,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(Tt,kt),e[3]=(e[4]||e[5]||"").replace(Tt,kt),"~="===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]||t.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]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return gt.CHILD.test(e[0])?null:(e[3]&&void 0!==e[4]?e[2]=e[4]:n&&pt.test(n)&&(t=h(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(Tt,kt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=RegExp("(^|"+it+")"+e+"("+it+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==J&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,h,p,d,g=o!==s?"nextSibling":"previousSibling",v=t.parentNode,m=a&&t.nodeName.toLowerCase(),y=!u&&!a;if(v){if(o){for(;g;){for(f=t;f=f[g];)if(a?f.nodeName.toLowerCase()===m:1===f.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?v.firstChild:v.lastChild],s&&y){for(l=v[$]||(v[$]={}),c=l[e]||[],p=c[0]===B&&c[1],h=c[0]===B&&c[2],f=p&&v.childNodes[p];f=++p&&f&&f[g]||(h=p=0)||d.pop();)if(1===f.nodeType&&++h&&f===t){l[e]=[B,p,h];break}}else if(y&&(c=(t[$]||(t[$]={}))[e])&&c[0]===B)h=c[1];else for(;(f=++p&&f&&f[g]||(h=p=0)||d.pop())&&((a?f.nodeName.toLowerCase()!==m:1!==f.nodeType)||!++h||(y&&((f[$]||(f[$]={}))[e]=[B,h]),f!==t)););return h-=i,h===r||0===h%r&&h/r>=0}}},PSEUDO:function(e,n){var i,o=E.pseudos[e]||E.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[$]?o(n):o.length>1?(i=[e,e,"",n],E.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=nt.call(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(ct,"$1"));return i[$]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||N(t)).indexOf(e)>-1}}),lang:r(function(e){return dt.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(Tt,kt).toLowerCase(),function(t){var n;do if(n=L?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===H},focus:function(e){return e===O.activeElement&&(!O.hasFocus||O.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(6>e.nodeType)return!1;return!0},parent:function(e){return!E.pseudos.empty(e)},header:function(e){return mt.test(e.nodeName)},input:function(e){return vt.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:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}},E.pseudos.nth=E.pseudos.eq;for(T in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})E.pseudos[T]=a(T);for(T in{submit:!0,reset:!0})E.pseudos[T]=u(T);return f.prototype=E.filters=E.pseudos,E.setFilters=new f,S=t.compile=function(e,t){var n,r=[],i=[],o=X[e+" "];if(!o){for(t||(t=h(e)),n=t.length;n--;)o=y(t[n]),o[$]?r.push(o):i.push(o);o=X(e,x(i,r))}return o},k.sortStable=$.split("").sort(V).join("")===$,k.detectDuplicates=!!D,q(),k.sortDetached=i(function(e){return 1&e.compareDocumentPosition(O.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),k.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(rt,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);Z.find=rt,Z.expr=rt.selectors,Z.expr[":"]=Z.expr.pseudos,Z.unique=rt.uniqueSort,Z.text=rt.getText,Z.isXMLDoc=rt.isXML,Z.contains=rt.contains;var it=Z.expr.match.needsContext,ot=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,st=/^.[^:#\[\.,]*$/;Z.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Z.find.matchesSelector(r,e)?[r]:[]:Z.find.matches(e,Z.grep(t,function(e){return 1===e.nodeType}))},Z.fn.extend({find:function(e){var t=0,n=this.length,r=[],i=this;
if("string"!=typeof e)return this.pushStack(Z(e).filter(function(){for(;n>t;t++)if(Z.contains(i[t],this))return!0}));for(t=0;n>t;t++)Z.find(e,i[t],r);return r=this.pushStack(n>1?Z.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(n(this,e||[],!1))},not:function(e){return this.pushStack(n(this,e||[],!0))},is:function(e){return!!n(this,"string"==typeof e&&it.test(e)?Z(e):e||[],!1).length}});var at,ut=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ct=Z.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ut.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||at).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Z?t[0]:t,Z.merge(this,Z.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Q,!0)),ot.test(n[1])&&Z.isPlainObject(t))for(n in t)Z.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=Q.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=Q,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):Z.isFunction(e)?at.ready!==void 0?at.ready(e):e(Z):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),Z.makeArray(e,this))};ct.prototype=Z.fn,at=Z(Q);var lt=/^(?:parents|prev(?:Until|All))/,ft={children:!0,contents:!0,next:!0,prev:!0};Z.extend({dir:function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&Z(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),Z.fn.extend({has:function(e){var t=Z(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(Z.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],s=it.test(e)||"string"!=typeof e?Z(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&Z.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Z.unique(o):o)},index:function(e){return e?"string"==typeof e?U.call(Z(e),this[0]):U.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?Z(e,t):Z.makeArray(e&&e.nodeType?[e]:e),r=Z.merge(this.get(),n);return this.pushStack(Z.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Z.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Z.dir(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return Z.dir(e,"nextSibling")},prevAll:function(e){return Z.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Z.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Z.dir(e,"previousSibling",n)},siblings:function(e){return Z.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Z.sibling(e.firstChild)},contents:function(e){return e.contentDocument||Z.merge([],e.childNodes)}},function(e,t){Z.fn[e]=function(n,r){var i=Z.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=Z.filter(r,i)),this.length>1&&(ft[e]||Z.unique(i),lt.test(e)&&i.reverse()),this.pushStack(i)}});var ht=/\S+/g,pt={};Z.Callbacks=function(e){e="string"==typeof e?pt[e]||i(e):Z.extend({},e);var t,n,r,o,s,a,u=[],c=!e.once&&[],l=function(i){for(t=e.memory&&i,n=!0,a=o||0,o=0,s=u.length,r=!0;u&&s>a;a++)if(u[a].apply(i[0],i[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,u&&(c?c.length&&l(c.shift()):t?u=[]:f.disable())},f={add:function(){if(u){var n=u.length;(function i(t){Z.each(t,function(t,n){var r=Z.type(n);"function"===r?e.unique&&f.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),r?s=u.length:t&&(o=n,l(t))}return this},remove:function(){return u&&Z.each(arguments,function(e,t){for(var n;(n=Z.inArray(t,u,n))>-1;)u.splice(n,1),r&&(s>=n&&s--,a>=n&&a--)}),this},has:function(e){return e?Z.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],s=0,this},disable:function(){return u=c=t=void 0,this},disabled:function(){return!u},lock:function(){return c=void 0,t||f.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!u||n&&!c||(t=t||[],t=[e,t.slice?t.slice():t],r?c.push(t):l(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},Z.extend({Deferred:function(e){var t=[["resolve","done",Z.Callbacks("once memory"),"resolved"],["reject","fail",Z.Callbacks("once memory"),"rejected"],["notify","progress",Z.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Z.Deferred(function(n){Z.each(t,function(t,o){var s=Z.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&Z.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?Z.extend(e,r):r}},i={};return r.pipe=r.then,Z.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=B.call(arguments),s=o.length,a=1!==s||e&&Z.isFunction(e.promise)?s:0,u=1===a?e:Z.Deferred(),c=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?B.call(arguments):i,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(t=Array(s),n=Array(s),r=Array(s);s>i;i++)o[i]&&Z.isFunction(o[i].promise)?o[i].promise().done(c(i,r,o)).fail(u.reject).progress(c(i,n,t)):--a;return a||u.resolveWith(r,o),u.promise()}});var dt;Z.fn.ready=function(e){return Z.ready.promise().done(e),this},Z.extend({isReady:!1,readyWait:1,holdReady:function(e){e?Z.readyWait++:Z.ready(!0)},ready:function(e){(e===!0?--Z.readyWait:Z.isReady)||(Z.isReady=!0,e!==!0&&--Z.readyWait>0||(dt.resolveWith(Q,[Z]),Z.fn.trigger&&Z(Q).trigger("ready").off("ready")))}}),Z.ready.promise=function(t){return dt||(dt=Z.Deferred(),"complete"===Q.readyState?setTimeout(Z.ready):(Q.addEventListener("DOMContentLoaded",o,!1),e.addEventListener("load",o,!1))),dt.promise(t)},Z.ready.promise();var gt=Z.access=function(e,t,n,r,i,o,s){var a=0,u=e.length,c=null==n;if("object"===Z.type(n)){i=!0;for(a in n)Z.access(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,Z.isFunction(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(Z(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:c?t.call(e):u?t(e[0],n):o};Z.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},s.uid=1,s.accepts=Z.acceptData,s.prototype={key:function(e){if(!s.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=s.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,Z.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(Z.isEmptyObject(o))Z.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,Z.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(void 0===t)this.cache[o]={};else{Z.isArray(t)?r=t.concat(t.map(Z.camelCase)):(i=Z.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(ht)||[])),n=r.length;for(;n--;)delete s[r[n]]}},hasData:function(e){return!Z.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var vt=new s,mt=new s,yt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,xt=/([A-Z])/g;Z.extend({hasData:function(e){return mt.hasData(e)||vt.hasData(e)},data:function(e,t,n){return mt.access(e,t,n)},removeData:function(e,t){mt.remove(e,t)},_data:function(e,t,n){return vt.access(e,t,n)},_removeData:function(e,t){vt.remove(e,t)}}),Z.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=mt.get(o),1===o.nodeType&&!vt.get(o,"hasDataAttrs"))){for(n=s.length;n--;)r=s[n].name,0===r.indexOf("data-")&&(r=Z.camelCase(r.slice(5)),a(o,r,i[r]));vt.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){mt.set(this,e)}):gt(this,function(t){var n,r=Z.camelCase(e);if(o&&void 0===t){if(n=mt.get(o,e),void 0!==n)return n;if(n=mt.get(o,r),void 0!==n)return n;if(n=a(o,r,void 0),void 0!==n)return n}else this.each(function(){var n=mt.get(this,r);mt.set(this,r,t),-1!==e.indexOf("-")&&void 0!==n&&mt.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){mt.remove(this,e)})}}),Z.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=vt.get(e,t),n&&(!r||Z.isArray(n)?r=vt.access(e,t,Z.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=Z.queue(e,t),r=n.length,i=n.shift(),o=Z._queueHooks(e,t),s=function(){Z.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return vt.get(e,n)||vt.access(e,n,{empty:Z.Callbacks("once memory").add(function(){vt.remove(e,[t+"queue",n])})})}}),Z.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?Z.queue(this[0],e):void 0===t?this:this.each(function(){var n=Z.queue(this,e,t);Z._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Z.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Z.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=Z.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)n=vt.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var bt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,wt=["Top","Right","Bottom","Left"],Tt=function(e,t){return e=t||e,"none"===Z.css(e,"display")||!Z.contains(e.ownerDocument,e)},kt=/^(?:checkbox|radio)$/i;(function(){var e,t=Q.createDocumentFragment(),n=t.appendChild(Q.createElement("div"));n.innerHTML="<input type='radio' checked='checked' name='t'/>",G.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,e=Q.createElement("input"),e.type="checkbox",e.checked=!0,G.noCloneChecked=e.cloneNode(!0).checked})();var Ct="undefined";G.focusinBubbles="onfocusin"in e;var Et=/^key/,Nt=/^(?:mouse|contextmenu)|click/,jt=/^(?:focusinfocus|focusoutblur)$/,St=/^([^.]*)(?:\.(.+)|)$/;Z.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,c,l,f,h,p,d,g,v=vt.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=Z.guid++),(u=v.events)||(u=v.events={}),(s=v.handle)||(s=v.handle=function(t){return typeof Z!==Ct&&Z.event.triggered!==t.type?Z.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ht)||[""],c=t.length;c--;)a=St.exec(t[c])||[],p=g=a[1],d=(a[2]||"").split(".").sort(),p&&(f=Z.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=Z.event.special[p]||{},l=Z.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&Z.expr.match.needsContext.test(i),namespace:d.join(".")},o),(h=u[p])||(h=u[p]=[],h.delegateCount=0,f.setup&&f.setup.call(e,r,d,s)!==!1||e.addEventListener&&e.addEventListener(p,s,!1)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),Z.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,c,l,f,h,p,d,g,v=vt.hasData(e)&&vt.get(e);if(v&&(u=v.events)){for(t=(t||"").match(ht)||[""],c=t.length;c--;)if(a=St.exec(t[c])||[],p=g=a[1],d=(a[2]||"").split(".").sort(),p){for(f=Z.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,h=u[p]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)l=h[o],!i&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(h.splice(o,1),l.selector&&h.delegateCount--,f.remove&&f.remove.call(e,l));s&&!h.length&&(f.teardown&&f.teardown.call(e,d,v.handle)!==!1||Z.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)Z.event.remove(e,p+t[c],n,r,!0);Z.isEmptyObject(u)&&(delete v.handle,vt.remove(e,"events"))}},trigger:function(t,n,r,i){var o,s,a,u,c,l,f,h=[r||Q],p=J.call(t,"type")?t.type:t,d=J.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||Q,3!==r.nodeType&&8!==r.nodeType&&!jt.test(p+Z.event.triggered)&&(p.indexOf(".")>=0&&(d=p.split("."),p=d.shift(),d.sort()),c=0>p.indexOf(":")&&"on"+p,t=t[Z.expando]?t:new Z.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=d.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:Z.makeArray(n,[t]),f=Z.event.special[p]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!Z.isWindow(r)){for(u=f.delegateType||p,jt.test(u+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),a=s;a===(r.ownerDocument||Q)&&h.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=h[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||p,l=(vt.get(s,"events")||{})[t.type]&&vt.get(s,"handle"),l&&l.apply(s,n),l=c&&s[c],l&&l.apply&&Z.acceptData(s)&&(t.result=l.apply(s,n),t.result===!1&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!Z.acceptData(r)||c&&Z.isFunction(r[p])&&!Z.isWindow(r)&&(a=r[c],a&&(r[c]=null),Z.event.triggered=p,r[p](),Z.event.triggered=void 0,a&&(r[c]=a)),t.result}},dispatch:function(e){e=Z.event.fix(e);var t,n,r,i,o,s=[],a=B.call(arguments),u=(vt.get(this,"events")||{})[e.type]||[],c=Z.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=Z.event.handlers.call(this,e,u),t=0;(i=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((Z.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?Z(i,this).index(u)>=0:Z.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},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,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Q,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===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[Z.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];for(s||(this.fixHooks[i]=s=Nt.test(i)?this.mouseHooks:Et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new Z.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=Q),3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==l()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===l()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&Z.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return Z.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=Z.extend(new Z.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?Z.event.trigger(i,null,t):Z.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},Z.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},Z.Event=function(e,t){return this instanceof Z.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.getPreventDefault&&e.getPreventDefault()?u:c):this.type=e,t&&Z.extend(this,t),this.timeStamp=e&&e.timeStamp||Z.now(),this[Z.expando]=!0,void 0):new Z.Event(e,t)},Z.Event.prototype={isDefaultPrevented:c,isPropagationStopped:c,isImmediatePropagationStopped:c,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u,this.stopPropagation()}},Z.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){Z.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!Z.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),G.focusinBubbles||Z.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Z.event.simulate(t,e.target,Z.event.fix(e),!0)};Z.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=vt.access(r,t);i||r.addEventListener(e,n,!0),vt.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=vt.access(r,t)-1;i?vt.access(r,t,i):(r.removeEventListener(e,n,!0),vt.remove(r,t))}}}),Z.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=void 0):null==r&&("string"==typeof t?(r=n,n=void 0):(r=n,n=t,t=void 0)),r===!1)r=c;else if(!r)return this;return 1===i&&(o=r,r=function(e){return Z().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=Z.guid++)),this.each(function(){Z.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,Z(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=c),this.each(function(){Z.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){Z.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?Z.event.trigger(e,t,n,!0):void 0}});var _t=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,At=/<([\w:]+)/,Dt=/<|&#?\w+;/,qt=/<(?:script|style|link)/i,Ot=/checked\s*(?:[^=]|=\s*.checked.)/i,Ht=/^$|\/(?:java|ecma)script/i,Lt=/^true\/(.*)/,Mt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ft={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,"",""]};Ft.optgroup=Ft.option,Ft.tbody=Ft.tfoot=Ft.colgroup=Ft.caption=Ft.thead,Ft.th=Ft.td,Z.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=Z.contains(e.ownerDocument,e);if(!(G.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Z.isXMLDoc(e)))for(s=v(a),o=v(e),r=0,i=o.length;i>r;r++)m(o[r],s[r]);if(t)if(n)for(o=o||v(e),s=s||v(a),r=0,i=o.length;i>r;r++)g(o[r],s[r]);else g(e,a);return s=v(a,"script"),s.length>0&&d(s,!u&&v(e,"script")),a},buildFragment:function(e,t,n,r){for(var i,o,s,a,u,c,l=t.createDocumentFragment(),f=[],h=0,p=e.length;p>h;h++)if(i=e[h],i||0===i)if("object"===Z.type(i))Z.merge(f,i.nodeType?[i]:i);else if(Dt.test(i)){for(o=o||l.appendChild(t.createElement("div")),s=(At.exec(i)||["",""])[1].toLowerCase(),a=Ft[s]||Ft._default,o.innerHTML=a[1]+i.replace(_t,"<$1></$2>")+a[2],c=a[0];c--;)o=o.lastChild;Z.merge(f,o.childNodes),o=l.firstChild,o.textContent=""}else f.push(t.createTextNode(i));for(l.textContent="",h=0;i=f[h++];)if((!r||-1===Z.inArray(i,r))&&(u=Z.contains(i.ownerDocument,i),o=v(l.appendChild(i),"script"),u&&d(o),n))for(c=0;i=o[c++];)Ht.test(i.type||"")&&n.push(i);return l},cleanData:function(e){for(var t,n,r,i,o,s,a=Z.event.special,u=0;void 0!==(n=e[u]);u++){if(Z.acceptData(n)&&(o=n[vt.expando],o&&(t=vt.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;void 0!==(i=r[s]);s++)a[i]?Z.event.remove(n,i):Z.removeEvent(n,i,t.handle);vt.cache[o]&&delete vt.cache[o]}delete mt.cache[n[mt.expando]]}}}),Z.fn.extend({text:function(e){return gt(this,function(e){return void 0===e?Z.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=f(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=f(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 n,r=e?Z.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||Z.cleanData(v(n)),n.parentNode&&(t&&Z.contains(n.ownerDocument,n)&&d(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Z.cleanData(v(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 Z.clone(this,e,t)})},html:function(e){return gt(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!qt.test(e)&&!Ft[(At.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(_t,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(Z.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,Z.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=W.apply([],e);var n,r,i,o,s,a,u=0,c=this.length,l=this,f=c-1,d=e[0],g=Z.isFunction(d);if(g||c>1&&"string"==typeof d&&!G.checkClone&&Ot.test(d))return this.each(function(n){var r=l.eq(n);g&&(e[0]=d.call(this,n,r.html())),r.domManip(e,t)});if(c&&(n=Z.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(i=Z.map(v(n,"script"),h),o=i.length;c>u;u++)s=n,u!==f&&(s=Z.clone(s,!0,!0),o&&Z.merge(i,v(s,"script"))),t.call(this[u],s,u);if(o)for(a=i[i.length-1].ownerDocument,Z.map(i,p),u=0;o>u;u++)s=i[u],Ht.test(s.type||"")&&!vt.access(s,"globalEval")&&Z.contains(a,s)&&(s.src?Z._evalUrl&&Z._evalUrl(s.src):Z.globalEval(s.textContent.replace(Mt,"")))}return this}}),Z.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Z.fn[e]=function(e){for(var n,r=[],i=Z(e),o=i.length-1,s=0;o>=s;s++)n=s===o?this:this.clone(!0),Z(i[s])[t](n),z.apply(r,n.get());return this.pushStack(r)}});var Rt,Pt={},$t=/^margin/,It=RegExp("^("+bt+")(?!px)[a-z%]+$","i"),Bt=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};(function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",o.appendChild(s);var t=e.getComputedStyle(a,null);n="1%"!==t.top,r="4px"===t.width,o.removeChild(s)}var n,r,i="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",o=Q.documentElement,s=Q.createElement("div"),a=Q.createElement("div");a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",G.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(a),e.getComputedStyle&&Z.extend(G,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},reliableMarginRight:function(){var t,n=a.appendChild(Q.createElement("div"));return n.style.cssText=a.style.cssText=i,n.style.marginRight=n.style.width="0",a.style.width="1px",o.appendChild(s),t=!parseFloat(e.getComputedStyle(n,null).marginRight),o.removeChild(s),a.innerHTML="",t}})})(),Z.swap=function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i};var Wt=/^(none|table(?!-c[ea]).+)/,zt=RegExp("^("+bt+")(.*)$","i"),Ut=RegExp("^([+-])=("+bt+")","i"),Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},Jt=["Webkit","O","Moz","ms"];Z.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=b(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=Z.camelCase(t),u=e.style;return t=Z.cssProps[a]||(Z.cssProps[a]=T(u,a)),s=Z.cssHooks[t]||Z.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:u[t]:(o=typeof n,"string"===o&&(i=Ut.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(Z.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||Z.cssNumber[a]||(n+="px"),G.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u[t]="",u[t]=n)),void 0)}},css:function(e,t,n,r){var i,o,s,a=Z.camelCase(t);return t=Z.cssProps[a]||(Z.cssProps[a]=T(e.style,a)),s=Z.cssHooks[t]||Z.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=b(e,t,r)),"normal"===i&&t in Vt&&(i=Vt[t]),""===n||n?(o=parseFloat(i),n===!0||Z.isNumeric(o)?o||0:i):i}}),Z.each(["height","width"],function(e,t){Z.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&Wt.test(Z.css(e,"display"))?Z.swap(e,Xt,function(){return E(e,t,r)}):E(e,t,r):void 0},set:function(e,n,r){var i=r&&Bt(e);return k(e,n,r?C(e,t,r,"border-box"===Z.css(e,"boxSizing",!1,i),i):0)}}}),Z.cssHooks.marginRight=w(G.reliableMarginRight,function(e,t){return t?Z.swap(e,{display:"inline-block"},b,[e,"marginRight"]):void 0}),Z.each({margin:"",padding:"",border:"Width"},function(e,t){Z.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+wt[r]+t]=o[r]||o[r-2]||o[0];return i}},$t.test(e)||(Z.cssHooks[e+t].set=k)}),Z.fn.extend({css:function(e,t){return gt(this,function(e,t,n){var r,i,o={},s=0;if(Z.isArray(t)){for(r=Bt(e),i=t.length;i>s;s++)o[t[s]]=Z.css(e,t[s],!1,r);return o}return void 0!==n?Z.style(e,t,n):Z.css(e,t)},e,t,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Tt(this)?Z(this).show():Z(this).hide()})}}),Z.Tween=j,j.prototype={constructor:j,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(Z.cssNumber[n]?"":"px")},cur:function(){var e=j.propHooks[this.prop];return e&&e.get?e.get(this):j.propHooks._default.get(this)},run:function(e){var t,n=j.propHooks[this.prop];return this.pos=t=this.options.duration?Z.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):j.propHooks._default.set(this),this}},j.prototype.init.prototype=j.prototype,j.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Z.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Z.fx.step[e.prop]?Z.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Z.cssProps[e.prop]]||Z.cssHooks[e.prop])?Z.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},j.propHooks.scrollTop=j.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Z.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Z.fx=j.prototype.init,Z.fx.step={};var Yt,Gt,Qt=/^(?:toggle|show|hide)$/,Kt=RegExp("^(?:([+-])=|)("+bt+")([a-z%]*)$","i"),Zt=/queueHooks$/,en=[D],tn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Kt.exec(t),o=i&&i[3]||(Z.cssNumber[e]?"":"px"),s=(Z.cssNumber[e]||"px"!==o&&+r)&&Kt.exec(Z.css(n.elem,e)),a=1,u=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do a=a||".5",s/=a,Z.style(n.elem,e,s+o);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};Z.Animation=Z.extend(O,{tweener:function(e,t){Z.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],tn[n]=tn[n]||[],tn[n].unshift(t)},prefilter:function(e,t){t?en.unshift(e):en.push(e)}}),Z.speed=function(e,t,n){var r=e&&"object"==typeof e?Z.extend({},e):{complete:n||!n&&t||Z.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Z.isFunction(t)&&t};return r.duration=Z.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in Z.fx.speeds?Z.fx.speeds[r.duration]:Z.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){Z.isFunction(r.old)&&r.old.call(this),r.queue&&Z.dequeue(this,r.queue)},r},Z.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Tt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Z.isEmptyObject(e),o=Z.speed(t,n,r),s=function(){var t=O(this,Z.extend({},e),o);(i||vt.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=Z.timers,s=vt.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&Zt.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&Z.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=vt.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=Z.timers,s=r?r.length:0;for(n.finish=!0,Z.queue(this,e,[]),i&&i.stop&&i.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;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),Z.each(["toggle","show","hide"],function(e,t){var n=Z.fn[t];Z.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(_(t,!0),e,r,i)
}}),Z.each({slideDown:_("show"),slideUp:_("hide"),slideToggle:_("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Z.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Z.timers=[],Z.fx.tick=function(){var e,t=0,n=Z.timers;for(Yt=Z.now();n.length>t;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||Z.fx.stop(),Yt=void 0},Z.fx.timer=function(e){e()&&Z.timers.push(e)&&Z.fx.start()},Z.fx.interval=13,Z.fx.start=function(){Gt||(Gt=setInterval(Z.fx.tick,Z.fx.interval))},Z.fx.stop=function(){clearInterval(Gt),Gt=null},Z.fx.speeds={slow:600,fast:200,_default:400},Z.fn.delay=function(e,t){return e=Z.fx?Z.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=Q.createElement("input"),t=Q.createElement("select"),n=t.appendChild(Q.createElement("option"));e.type="checkbox",G.checkOn=""!==e.value,G.optSelected=n.selected,t.disabled=!0,G.optDisabled=!n.disabled,e=Q.createElement("input"),e.value="t",e.type="radio",G.radioValue="t"===e.value}();var nn,rn,on=Z.expr.attrHandle;Z.fn.extend({attr:function(e,t){return gt(this,Z.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Z.removeAttr(this,e)})}}),Z.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===Ct?Z.prop(e,t,n):(1===o&&Z.isXMLDoc(e)||(t=t.toLowerCase(),r=Z.attrHooks[t]||(Z.expr.match.bool.test(t)?rn:nn)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=Z.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):(Z.removeAttr(e,t),void 0))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(ht);if(o&&1===e.nodeType)for(;n=o[i++];)r=Z.propFix[n]||n,Z.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!G.radioValue&&"radio"===t&&Z.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),rn={set:function(e,t,n){return t===!1?Z.removeAttr(e,n):e.setAttribute(n,n),n}},Z.each(Z.expr.match.bool.source.match(/\w+/g),function(e,t){var n=on[t]||Z.find.attr;on[t]=function(e,t,r){var i,o;return r||(o=on[t],on[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,on[t]=o),i}});var sn=/^(?:input|select|textarea|button)$/i;Z.fn.extend({prop:function(e,t){return gt(this,Z.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Z.propFix[e]||e]})}}),Z.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!Z.isXMLDoc(e),o&&(t=Z.propFix[t]||t,i=Z.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||sn.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),G.optSelected||(Z.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),Z.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Z.propFix[this.toLowerCase()]=this});var an=/[\t\r\n\f]/g;Z.fn.extend({addClass:function(e){var t,n,r,i,o,s,a="string"==typeof e&&e,u=0,c=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(ht)||[];c>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(an," "):" ")){for(o=0;i=t[o++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");s=Z.trim(r),n.className!==s&&(n.className=s)}return this},removeClass:function(e){var t,n,r,i,o,s,a=0===arguments.length||"string"==typeof e&&e,u=0,c=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(ht)||[];c>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(an," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");s=e?Z.trim(r):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):Z.isFunction(e)?this.each(function(n){Z(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,r=0,i=Z(this),o=e.match(ht)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(n===Ct||"boolean"===n)&&(this.className&&vt.set(this,"__className__",this.className),this.className=this.className||e===!1?"":vt.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(an," ").indexOf(t)>=0)return!0;return!1}});var un=/\r/g;Z.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=Z.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,Z(this).val()):e,null==i?i="":"number"==typeof i?i+="":Z.isArray(i)&&(i=Z.map(i,function(e){return null==e?"":e+""})),t=Z.valHooks[this.type]||Z.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=Z.valHooks[i.type]||Z.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(un,""):null==n?"":n)}}}),Z.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(G.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&Z.nodeName(n.parentNode,"optgroup"))){if(t=Z(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=Z.makeArray(t),s=i.length;s--;)r=i[s],(r.selected=Z.inArray(Z(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Z.each(["radio","checkbox"],function(){Z.valHooks[this]={set:function(e,t){return Z.isArray(t)?e.checked=Z.inArray(Z(e).val(),t)>=0:void 0}},G.checkOn||(Z.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),Z.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){Z.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Z.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 cn=Z.now(),ln=/\?/;Z.parseJSON=function(e){return JSON.parse(e+"")},Z.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&Z.error("Invalid XML: "+e),t};var fn,hn,pn=/#.*$/,dn=/([?&])_=[^&]*/,gn=/^(.*?):[ \t]*([^\r\n]*)$/gm,vn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,mn=/^(?:GET|HEAD)$/,yn=/^\/\//,xn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,bn={},wn={},Tn="*/".concat("*");try{hn=location.href}catch(kn){hn=Q.createElement("a"),hn.href="",hn=hn.href}fn=xn.exec(hn.toLowerCase())||[],Z.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:hn,type:"GET",isLocal:vn.test(fn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Tn,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":Z.parseJSON,"text xml":Z.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?M(M(e,Z.ajaxSettings),t):M(Z.ajaxSettings,e)},ajaxPrefilter:H(bn),ajaxTransport:H(wn),ajax:function(e,t){function n(e,t,n,s){var u,l,m,y,b,T=t;2!==x&&(x=2,a&&clearTimeout(a),r=void 0,o=s||"",w.readyState=e>0?4:0,u=e>=200&&300>e||304===e,n&&(y=F(f,w,n)),y=R(f,y,w,u),u?(f.ifModified&&(b=w.getResponseHeader("Last-Modified"),b&&(Z.lastModified[i]=b),b=w.getResponseHeader("etag"),b&&(Z.etag[i]=b)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=y.state,l=y.data,m=y.error,u=!m)):(m=T,(e||!T)&&(T="error",0>e&&(e=0))),w.status=e,w.statusText=(t||T)+"",u?d.resolveWith(h,[l,T,w]):d.rejectWith(h,[w,T,m]),w.statusCode(v),v=void 0,c&&p.trigger(u?"ajaxSuccess":"ajaxError",[w,f,u?l:m]),g.fireWith(h,[w,T]),c&&(p.trigger("ajaxComplete",[w,f]),--Z.active||Z.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,a,u,c,l,f=Z.ajaxSetup({},t),h=f.context||f,p=f.context&&(h.nodeType||h.jquery)?Z(h):Z.event,d=Z.Deferred(),g=Z.Callbacks("once memory"),v=f.statusCode||{},m={},y={},x=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=gn.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return x||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)v[t]=[v[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return r&&r.abort(t),n(0,t),this}};if(d.promise(w).complete=g.add,w.success=w.done,w.error=w.fail,f.url=((e||f.url||hn)+"").replace(pn,"").replace(yn,fn[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=Z.trim(f.dataType||"*").toLowerCase().match(ht)||[""],null==f.crossDomain&&(u=xn.exec(f.url.toLowerCase()),f.crossDomain=!(!u||u[1]===fn[1]&&u[2]===fn[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(fn[3]||("http:"===fn[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=Z.param(f.data,f.traditional)),L(bn,f,t,w),2===x)return w;c=f.global,c&&0===Z.active++&&Z.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!mn.test(f.type),i=f.url,f.hasContent||(f.data&&(i=f.url+=(ln.test(i)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=dn.test(i)?i.replace(dn,"$1_="+cn++):i+(ln.test(i)?"&":"?")+"_="+cn++)),f.ifModified&&(Z.lastModified[i]&&w.setRequestHeader("If-Modified-Since",Z.lastModified[i]),Z.etag[i]&&w.setRequestHeader("If-None-Match",Z.etag[i])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Tn+"; q=0.01":""):f.accepts["*"]);for(l in f.headers)w.setRequestHeader(l,f.headers[l]);if(f.beforeSend&&(f.beforeSend.call(h,w,f)===!1||2===x))return w.abort();b="abort";for(l in{success:1,error:1,complete:1})w[l](f[l]);if(r=L(wn,f,t,w)){w.readyState=1,c&&p.trigger("ajaxSend",[w,f]),f.async&&f.timeout>0&&(a=setTimeout(function(){w.abort("timeout")},f.timeout));try{x=1,r.send(m,n)}catch(T){if(!(2>x))throw T;n(-1,T)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return Z.get(e,t,n,"json")},getScript:function(e,t){return Z.get(e,void 0,t,"script")}}),Z.each(["get","post"],function(e,t){Z[t]=function(e,n,r,i){return Z.isFunction(n)&&(i=i||r,r=n,n=void 0),Z.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),Z.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Z.fn[t]=function(e){return this.on(t,e)}}),Z._evalUrl=function(e){return Z.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},Z.fn.extend({wrapAll:function(e){var t;return Z.isFunction(e)?this.each(function(t){Z(this).wrapAll(e.call(this,t))}):(this[0]&&(t=Z(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return Z.isFunction(e)?this.each(function(t){Z(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Z(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Z.isFunction(e);return this.each(function(n){Z(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Z.nodeName(this,"body")||Z(this).replaceWith(this.childNodes)}).end()}}),Z.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight},Z.expr.filters.visible=function(e){return!Z.expr.filters.hidden(e)};var Cn=/%20/g,En=/\[\]$/,Nn=/\r?\n/g,jn=/^(?:submit|button|image|reset|file)$/i,Sn=/^(?:input|select|textarea|keygen)/i;Z.param=function(e,t){var n,r=[],i=function(e,t){t=Z.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=Z.ajaxSettings&&Z.ajaxSettings.traditional),Z.isArray(e)||e.jquery&&!Z.isPlainObject(e))Z.each(e,function(){i(this.name,this.value)});else for(n in e)P(n,e[n],t,i);return r.join("&").replace(Cn,"+")},Z.fn.extend({serialize:function(){return Z.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Z.prop(this,"elements");return e?Z.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Z(this).is(":disabled")&&Sn.test(this.nodeName)&&!jn.test(e)&&(this.checked||!kt.test(e))}).map(function(e,t){var n=Z(this).val();return null==n?null:Z.isArray(n)?Z.map(n,function(e){return{name:t.name,value:e.replace(Nn,"\r\n")}}):{name:t.name,value:n.replace(Nn,"\r\n")}}).get()}}),Z.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var _n=0,An={},Dn={0:200,1223:204},qn=Z.ajaxSettings.xhr();e.ActiveXObject&&Z(e).on("unload",function(){for(var e in An)An[e]()}),G.cors=!!qn&&"withCredentials"in qn,G.ajax=qn=!!qn,Z.ajaxTransport(function(e){var t;return G.cors||qn&&!e.crossDomain?{send:function(n,r){var i,o=e.xhr(),s=++_n;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)o.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete An[s],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?r(o.status,o.statusText):r(Dn[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=An[s]=t("abort"),o.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}:void 0}),Z.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return Z.globalEval(e),e}}}),Z.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Z.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=Z("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),Q.head.appendChild(t[0])},abort:function(){n&&n()}}}});var On=[],Hn=/(=)\?(?=&|$)|\?\?/;Z.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||Z.expando+"_"+cn++;return this[e]=!0,e}}),Z.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,s,a=t.jsonp!==!1&&(Hn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hn.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=Z.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Hn,"$1"+i):t.jsonp!==!1&&(t.url+=(ln.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||Z.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},r.always(function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,On.push(i)),s&&Z.isFunction(o)&&o(s[0]),s=o=void 0}),"script"):void 0}),Z.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Q;var r=ot.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=Z.buildFragment([e],t,i),i&&i.length&&Z(i).remove(),Z.merge([],r.childNodes))};var Ln=Z.fn.load;Z.fn.load=function(e,t,n){if("string"!=typeof e&&Ln)return Ln.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");return a>=0&&(r=e.slice(a),e=e.slice(0,a)),Z.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),s.length>0&&Z.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?Z("<div>").append(Z.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,o||[e.responseText,t,e])}),this},Z.expr.filters.animated=function(e){return Z.grep(Z.timers,function(t){return e===t.elem}).length};var Mn=e.document.documentElement;Z.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,c,l=Z.css(e,"position"),f=Z(e),h={};"static"===l&&(e.style.position="relative"),a=f.offset(),o=Z.css(e,"top"),u=Z.css(e,"left"),c=("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1,c?(r=f.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),Z.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(h.top=t.top-a.top+s),null!=t.left&&(h.left=t.left-a.left+i),"using"in t?t.using.call(e,h):f.css(h)}},Z.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){Z.offset.setOffset(this,e,t)});var t,n,r=this[0],i={top:0,left:0},o=r&&r.ownerDocument;if(o)return t=o.documentElement,Z.contains(t,r)?(typeof r.getBoundingClientRect!==Ct&&(i=r.getBoundingClientRect()),n=$(o),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===Z.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),Z.nodeName(e[0],"html")||(r=e.offset()),r.top+=Z.css(e[0],"borderTopWidth",!0),r.left+=Z.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-Z.css(n,"marginTop",!0),left:t.left-r.left-Z.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Mn;e&&!Z.nodeName(e,"html")&&"static"===Z.css(e,"position");)e=e.offsetParent;return e||Mn})}}),Z.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;Z.fn[t]=function(i){return gt(this,function(t,i,o){var s=$(t);return void 0===o?s?s[n]:t[i]:(s?s.scrollTo(r?e.pageXOffset:o,r?o:e.pageYOffset):t[i]=o,void 0)},t,i,arguments.length,null)}}),Z.each(["top","left"],function(e,t){Z.cssHooks[t]=w(G.pixelPosition,function(e,n){return n?(n=b(e,t),It.test(n)?Z(e).position()[t]+"px":n):void 0})}),Z.each({Height:"height",Width:"width"},function(e,t){Z.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){Z.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||i===!0?"margin":"border");return gt(this,function(t,n,r){var i;return Z.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?Z.css(t,n,s):Z.style(t,n,r,s)},t,o?r:void 0,o,null)}})}),Z.fn.size=function(){return this.length},Z.fn.andSelf=Z.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return Z});var Fn=e.jQuery,Rn=e.$;return Z.noConflict=function(t){return e.$===Z&&(e.$=Rn),t&&e.jQuery===Z&&(e.jQuery=Fn),Z},e.jQuery=e.$=Z,Z})},{}],jquery:[function(e,t){t.exports=e("DRZdmu")},{}]},{},[]),require=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw Error("Cannot find module '"+s+"'")}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;r.length>s;s++)i(r[s]);return i}({"6eV94k":[function(e,t,n){(function(){var t=this,r=t.Backbone,i=[];i.push;var o=i.slice;i.splice;var s;s=n!==void 0?n:t.Backbone={},s.VERSION="1.1.0";var a=t._;a||void 0===e||(a=e("underscore")),s.$=t.jQuery||t.Zepto||t.ender||t.$,s.noConflict=function(){return t.Backbone=r,this},s.emulateHTTP=!1,s.emulateJSON=!1;var u=s.Events={on:function(e,t,n){if(!l(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,n){if(!l(this,"once",e,[t,n])||!t)return this;var r=this,i=a.once(function(){r.off(e,i),t.apply(this,arguments)});return i._callback=t,this.on(e,i,n)},off:function(e,t,n){var r,i,o,s,u,c,f,h;if(!this._events||!l(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events={},this;for(s=e?[e]:a.keys(this._events),u=0,c=s.length;c>u;u++)if(e=s[u],o=this._events[e]){if(this._events[e]=r=[],t||n)for(f=0,h=o.length;h>f;f++)i=o[f],(t&&t!==i.callback&&t!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=o.call(arguments,1);if(!l(this,"trigger",e,t))return this;var n=this._events[e],r=this._events.all;return n&&f(n,t),r&&f(r,arguments),this},stopListening:function(e,t,n){var r=this._listeningTo;if(!r)return this;var i=!t&&!n;n||"object"!=typeof t||(n=this),e&&((r={})[e._listenId]=e);for(var o in r)e=r[o],e.off(t,n,this),(i||a.isEmpty(e._events))&&delete this._listeningTo[o];return this}},c=/\s+/,l=function(e,t,n,r){if(!n)return!0;if("object"==typeof n){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(c.test(n)){for(var o=n.split(c),s=0,a=o.length;a>s;s++)e[t].apply(e,[o[s]].concat(r));return!1}return!0},f=function(e,t){var n,r=-1,i=e.length,o=t[0],s=t[1],a=t[2];switch(t.length){case 0:for(;i>++r;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;i>++r;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;i>++r;)(n=e[r]).callback.call(n.ctx,o,s);return;case 3:for(;i>++r;)(n=e[r]).callback.call(n.ctx,o,s,a);return;default:for(;i>++r;)(n=e[r]).callback.apply(n.ctx,t)}},h={listenTo:"on",listenToOnce:"once"};a.each(h,function(e,t){u[t]=function(t,n,r){var i=this._listeningTo||(this._listeningTo={}),o=t._listenId||(t._listenId=a.uniqueId("l"));return i[o]=t,r||"object"!=typeof n||(r=this),t[e](n,r,this),this}}),u.bind=u.on,u.unbind=u.off,a.extend(s,u);var p=s.Model=function(e,t){var n=e||{};t||(t={}),this.cid=a.uniqueId("c"),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(n=this.parse(n,t)||{}),n=a.defaults({},n,a.result(this,"defaults")),this.set(n,t),this.changed={},this.initialize.apply(this,arguments)};a.extend(p.prototype,u,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(){return a.clone(this.attributes)},sync:function(){return s.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return a.escape(this.get(e))},has:function(e){return null!=this.get(e)},set:function(e,t,n){var r,i,o,s,u,c,l,f;if(null==e)return this;if("object"==typeof e?(i=e,n=t):(i={})[e]=t,n||(n={}),!this._validate(i,n))return!1;o=n.unset,u=n.silent,s=[],c=this._changing,this._changing=!0,c||(this._previousAttributes=a.clone(this.attributes),this.changed={}),f=this.attributes,l=this._previousAttributes,this.idAttribute in i&&(this.id=i[this.idAttribute]);for(r in i)t=i[r],a.isEqual(f[r],t)||s.push(r),a.isEqual(l[r],t)?delete this.changed[r]:this.changed[r]=t,o?delete f[r]:f[r]=t;if(!u){s.length&&(this._pending=!0);for(var h=0,p=s.length;p>h;h++)this.trigger("change:"+s[h],this,f[s[h]],n)}if(c)return this;if(!u)for(;this._pending;)this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,a.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var n in this.attributes)t[n]=void 0;return this.set(t,a.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!a.isEmpty(this.changed):a.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?a.clone(this.changed):!1;var t,n=!1,r=this._changing?this._previousAttributes:this.attributes;for(var i in e)a.isEqual(r[i],t=e[i])||((n||(n={}))[i]=t);return n},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return a.clone(this._previousAttributes)},fetch:function(e){e=e?a.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,n=e.success;return e.success=function(r){return t.set(t.parse(r,e),e)?(n&&n(t,r,e),t.trigger("sync",t,r,e),void 0):!1},R(this,e),this.sync("read",this,e)},save:function(e,t,n){var r,i,o,s=this.attributes;if(null==e||"object"==typeof e?(r=e,n=t):(r={})[e]=t,n=a.extend({validate:!0},n),r&&!n.wait){if(!this.set(r,n))return!1}else if(!this._validate(r,n))return!1;r&&n.wait&&(this.attributes=a.extend({},s,r)),void 0===n.parse&&(n.parse=!0);var u=this,c=n.success;return n.success=function(e){u.attributes=s;var t=u.parse(e,n);return n.wait&&(t=a.extend(r||{},t)),a.isObject(t)&&!u.set(t,n)?!1:(c&&c(u,e,n),u.trigger("sync",u,e,n),void 0)},R(this,n),i=this.isNew()?"create":n.patch?"patch":"update","patch"===i&&(n.attrs=r),o=this.sync(i,this,n),r&&n.wait&&(this.attributes=s),o},destroy:function(e){e=e?a.clone(e):{};var t=this,n=e.success,r=function(){t.trigger("destroy",t,t.collection,e)};if(e.success=function(i){(e.wait||t.isNew())&&r(),n&&n(t,i,e),t.isNew()||t.trigger("sync",t,i,e)},this.isNew())return e.success(),!1;R(this,e);var i=this.sync("delete",this,e);return e.wait||r(),i},url:function(){var e=a.result(this,"urlRoot")||a.result(this.collection,"url")||F();return this.isNew()?e:e+("/"===e.charAt(e.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(e){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(e){return this._validate({},a.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=a.extend({},this.attributes,e);var n=this.validationError=this.validate(e,t)||null;return n?(this.trigger("invalid",this,n,a.extend(t,{validationError:n})),!1):!0}});var d=["keys","values","pairs","invert","pick","omit"];a.each(d,function(e){p.prototype[e]=function(){var t=o.call(arguments);return t.unshift(this.attributes),a[e].apply(a,t)}});var g=s.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,a.extend({silent:!0},t))},v={add:!0,remove:!0,merge:!0},m={add:!0,remove:!1};a.extend(g.prototype,u,{model:p,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return s.sync.apply(this,arguments)},add:function(e,t){return this.set(e,a.extend({merge:!1},t,m))},remove:function(e,t){var n=!a.isArray(e);e=n?[e]:a.clone(e),t||(t={});var r,i,o,s;for(r=0,i=e.length;i>r;r++)s=e[r]=this.get(e[r]),s&&(delete this._byId[s.id],delete this._byId[s.cid],o=this.indexOf(s),this.models.splice(o,1),this.length--,t.silent||(t.index=o,s.trigger("remove",s,this,t)),this._removeReference(s));return n?e[0]:e},set:function(e,t){t=a.defaults({},t,v),t.parse&&(e=this.parse(e,t));var n=!a.isArray(e);e=n?e?[e]:[]:a.clone(e);var r,i,o,s,u,c,l,f=t.at,h=this.model,d=this.comparator&&null==f&&t.sort!==!1,g=a.isString(this.comparator)?this.comparator:null,m=[],y=[],x={},b=t.add,w=t.merge,T=t.remove,k=!d&&b&&T?[]:!1;for(r=0,i=e.length;i>r;r++){if(u=e[r],o=u instanceof p?s=u:u[h.prototype.idAttribute],c=this.get(o))T&&(x[c.cid]=!0),w&&(u=u===s?s.attributes:u,t.parse&&(u=c.parse(u,t)),c.set(u,t),d&&!l&&c.hasChanged(g)&&(l=!0)),e[r]=c;else if(b){if(s=e[r]=this._prepareModel(u,t),!s)continue;m.push(s),s.on("all",this._onModelEvent,this),this._byId[s.cid]=s,null!=s.id&&(this._byId[s.id]=s)}k&&k.push(c||s)}if(T){for(r=0,i=this.length;i>r;++r)x[(s=this.models[r]).cid]||y.push(s);y.length&&this.remove(y,t)}if(m.length||k&&k.length)if(d&&(l=!0),this.length+=m.length,null!=f)for(r=0,i=m.length;i>r;r++)this.models.splice(f+r,0,m[r]);else{k&&(this.models.length=0);var C=k||m;for(r=0,i=C.length;i>r;r++)this.models.push(C[r])}if(l&&this.sort({silent:!0}),!t.silent){for(r=0,i=m.length;i>r;r++)(s=m[r]).trigger("add",s,this,t);(l||k&&k.length)&&this.trigger("sort",this,t)}return n?e[0]:e},reset:function(e,t){t||(t={});for(var n=0,r=this.models.length;r>n;n++)this._removeReference(this.models[n]);return t.previousModels=this.models,this._reset(),e=this.add(e,a.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,a.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,a.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(){return o.apply(this.models,arguments)},get:function(e){return null==e?void 0:this._byId[e.id]||this._byId[e.cid]||this._byId[e]},at:function(e){return this.models[e]},where:function(e,t){return a.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 Error("Cannot sort a set without a comparator");return e||(e={}),a.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(a.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return a.invoke(this.models,"get",e)},fetch:function(e){e=e?a.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=e.success,n=this;return e.success=function(r){var i=e.reset?"reset":"set";n[i](r,e),t&&t(n,r,e),n.trigger("sync",n,r,e)},R(this,e),this.sync("read",this,e)},create:function(e,t){if(t=t?a.clone(t):{},!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var n=this,r=t.success;return t.success=function(e,t,i){i.wait&&n.add(e,i),r&&r(e,t,i)},e.save(null,t),e},parse:function(e){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 p)return e.collection||(e.collection=this),e;t=t?a.clone(t):{},t.collection=this;var n=new this.model(e,t);return n.validationError?(this.trigger("invalid",this,n.validationError,t),!1):n},_removeReference:function(e){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){("add"!==e&&"remove"!==e||n===this)&&("destroy"===e&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],null!=t.id&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments))}});var y=["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"];a.each(y,function(e){g.prototype[e]=function(){var t=o.call(arguments);return t.unshift(this.models),a[e].apply(a,t)}});var x=["groupBy","countBy","sortBy"];a.each(x,function(e){g.prototype[e]=function(t,n){var r=a.isFunction(t)?t:function(e){return e.get(t)};return a[e](this.models,r,n)}});var b=s.View=function(e){this.cid=a.uniqueId("view"),e||(e={}),a.extend(this,a.pick(e,T)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},w=/^(\S+)\s*(.*)$/,T=["model","collection","el","id","attributes","className","tagName","events"];
a.extend(b.prototype,u,{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,t){return this.$el&&this.undelegateEvents(),this.$el=e instanceof s.$?e:s.$(e),this.el=this.$el[0],t!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=a.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var n=e[t];if(a.isFunction(n)||(n=this[e[t]]),n){var r=t.match(w),i=r[1],o=r[2];n=a.bind(n,this),i+=".delegateEvents"+this.cid,""===o?this.$el.on(i,n):this.$el.on(i,o,n)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(a.result(this,"el"),!1);else{var e=a.extend({},a.result(this,"attributes"));this.id&&(e.id=a.result(this,"id")),this.className&&(e["class"]=a.result(this,"className"));var t=s.$("<"+a.result(this,"tagName")+">").attr(e);this.setElement(t,!1)}}}),s.sync=function(e,t,n){var r=C[e];a.defaults(n||(n={}),{emulateHTTP:s.emulateHTTP,emulateJSON:s.emulateJSON});var i={type:r,dataType:"json"};if(n.url||(i.url=a.result(t,"url")||F()),null!=n.data||!t||"create"!==e&&"update"!==e&&"patch"!==e||(i.contentType="application/json",i.data=JSON.stringify(n.attrs||t.toJSON(n))),n.emulateJSON&&(i.contentType="application/x-www-form-urlencoded",i.data=i.data?{model:i.data}:{}),n.emulateHTTP&&("PUT"===r||"DELETE"===r||"PATCH"===r)){i.type="POST",n.emulateJSON&&(i.data._method=r);var o=n.beforeSend;n.beforeSend=function(e){return e.setRequestHeader("X-HTTP-Method-Override",r),o?o.apply(this,arguments):void 0}}"GET"===i.type||n.emulateJSON||(i.processData=!1),"PATCH"===i.type&&k&&(i.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var u=n.xhr=s.ajax(a.extend(i,n));return t.trigger("request",t,u,n),u};var k=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),C={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};s.ajax=function(){return s.$.ajax.apply(s.$,arguments)};var E=s.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},N=/\((.*?)\)/g,j=/(\(\?)?:\w+/g,S=/\*\w+/g,_=/[\-{}\[\]+?.,\\\^$|#\s]/g;a.extend(E.prototype,u,{initialize:function(){},route:function(e,t,n){a.isRegExp(e)||(e=this._routeToRegExp(e)),a.isFunction(t)&&(n=t,t=""),n||(n=this[t]);var r=this;return s.history.route(e,function(i){var o=r._extractParameters(e,i);n&&n.apply(r,o),r.trigger.apply(r,["route:"+t].concat(o)),r.trigger("route",t,o),s.history.trigger("route",r,t,o)}),this},navigate:function(e,t){return s.history.navigate(e,t),this},_bindRoutes:function(){if(this.routes){this.routes=a.result(this,"routes");for(var e,t=a.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(_,"\\$&").replace(N,"(?:$1)?").replace(j,function(e,t){return t?e:"([^/]+)"}).replace(S,"(.*?)"),RegExp("^"+e+"$")},_extractParameters:function(e,t){var n=e.exec(t).slice(1);return a.map(n,function(e){return e?decodeURIComponent(e):null})}});var A=s.History=function(){this.handlers=[],a.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},D=/^[#\/]|\s+$/g,q=/^\/+|\/+$/g,O=/msie [\w.]+/,H=/\/$/,L=/[?#].*$/;A.started=!1,a.extend(A.prototype,u,{interval:50,getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(null==e)if(this._hasPushState||!this._wantsHashChange||t){e=this.location.pathname;var n=this.root.replace(H,"");e.indexOf(n)||(e=e.slice(n.length))}else e=this.getHash();return e.replace(D,"")},start:function(e){if(A.started)throw Error("Backbone.history has already been started");A.started=!0,this.options=a.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 t=this.getFragment(),n=document.documentMode,r=O.exec(navigator.userAgent.toLowerCase())&&(!n||7>=n);this.root=("/"+this.root+"/").replace(q,"/"),r&&this._wantsHashChange&&(this.iframe=s.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(t)),this._hasPushState?s.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!r?s.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=t;var i=this.location,o=i.pathname.replace(/[^\/]$/,"$&/")===this.root;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!o)return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0;this._hasPushState&&o&&i.hash&&(this.fragment=this.getHash().replace(D,""),this.history.replaceState({},document.title,this.root+this.fragment+i.search))}return this.options.silent?void 0:this.loadUrl()},stop:function(){s.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),A.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getFragment(this.getHash(this.iframe))),e===this.fragment?!1:(this.iframe&&this.navigate(e),this.loadUrl(),void 0)},loadUrl:function(e){return e=this.fragment=this.getFragment(e),a.any(this.handlers,function(t){return t.route.test(e)?(t.callback(e),!0):void 0})},navigate:function(e,t){if(!A.started)return!1;t&&t!==!0||(t={trigger:!!t});var n=this.root+(e=this.getFragment(e||""));if(e=e.replace(L,""),this.fragment!==e){if(this.fragment=e,""===e&&"/"!==n&&(n=n.slice(0,-1)),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))}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),s.history=new A;var M=function(e,t){var n,r=this;n=e&&a.has(e,"constructor")?e.constructor:function(){return r.apply(this,arguments)},a.extend(n,r,t);var i=function(){this.constructor=n};return i.prototype=r.prototype,n.prototype=new i,e&&a.extend(n.prototype,e),n.__super__=r.prototype,n};p.extend=g.extend=E.extend=b.extend=A.extend=M;var F=function(){throw Error('A "url" property or function must be specified')},R=function(e,t){var n=t.error;t.error=function(r){n&&n(e,r,t),e.trigger("error",e,r,t)}}}).call(this)},{underscore:3}],backbone:[function(e,t){t.exports=e("6eV94k")},{}],3:[function(e,t,n){(function(){var e=this,r=e._,i={},o=Array.prototype,s=Object.prototype,a=Function.prototype,u=o.push,c=o.slice,l=o.concat,f=s.toString,h=s.hasOwnProperty,p=o.forEach,d=o.map,g=o.reduce,v=o.reduceRight,m=o.filter,y=o.every,x=o.some,b=o.indexOf,w=o.lastIndexOf,T=Array.isArray,k=Object.keys,C=a.bind,E=function(e){return e instanceof E?e:this instanceof E?(this._wrapped=e,void 0):new E(e)};n!==void 0?(t!==void 0&&t.exports&&(n=t.exports=E),n._=E):e._=E,E.VERSION="1.5.2";var N=E.each=E.forEach=function(e,t,n){if(null!=e)if(p&&e.forEach===p)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,o=e.length;o>r;r++)if(t.call(n,e[r],r,e)===i)return}else for(var s=E.keys(e),r=0,o=s.length;o>r;r++)if(t.call(n,e[s[r]],s[r],e)===i)return};E.map=E.collect=function(e,t,n){var r=[];return null==e?r:d&&e.map===d?e.map(t,n):(N(e,function(e,i,o){r.push(t.call(n,e,i,o))}),r)};var j="Reduce of empty array with no initial value";E.reduce=E.foldl=E.inject=function(e,t,n,r){var i=arguments.length>2;if(null==e&&(e=[]),g&&e.reduce===g)return r&&(t=E.bind(t,r)),i?e.reduce(t,n):e.reduce(t);if(N(e,function(e,o,s){i?n=t.call(r,n,e,o,s):(n=e,i=!0)}),!i)throw new TypeError(j);return n},E.reduceRight=E.foldr=function(e,t,n,r){var i=arguments.length>2;if(null==e&&(e=[]),v&&e.reduceRight===v)return r&&(t=E.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var o=e.length;if(o!==+o){var s=E.keys(e);o=s.length}if(N(e,function(a,u,c){u=s?s[--o]:--o,i?n=t.call(r,n,e[u],u,c):(n=e[u],i=!0)}),!i)throw new TypeError(j);return n},E.find=E.detect=function(e,t,n){var r;return S(e,function(e,i,o){return t.call(n,e,i,o)?(r=e,!0):void 0}),r},E.filter=E.select=function(e,t,n){var r=[];return null==e?r:m&&e.filter===m?e.filter(t,n):(N(e,function(e,i,o){t.call(n,e,i,o)&&r.push(e)}),r)},E.reject=function(e,t,n){return E.filter(e,function(e,r,i){return!t.call(n,e,r,i)},n)},E.every=E.all=function(e,t,n){t||(t=E.identity);var r=!0;return null==e?r:y&&e.every===y?e.every(t,n):(N(e,function(e,o,s){return(r=r&&t.call(n,e,o,s))?void 0:i}),!!r)};var S=E.some=E.any=function(e,t,n){t||(t=E.identity);var r=!1;return null==e?r:x&&e.some===x?e.some(t,n):(N(e,function(e,o,s){return r||(r=t.call(n,e,o,s))?i:void 0}),!!r)};E.contains=E.include=function(e,t){return null==e?!1:b&&e.indexOf===b?-1!=e.indexOf(t):S(e,function(e){return e===t})},E.invoke=function(e,t){var n=c.call(arguments,2),r=E.isFunction(t);return E.map(e,function(e){return(r?t:e[t]).apply(e,n)})},E.pluck=function(e,t){return E.map(e,function(e){return e[t]})},E.where=function(e,t,n){return E.isEmpty(t)?n?void 0:[]:E[n?"find":"filter"](e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},E.findWhere=function(e,t){return E.where(e,t,!0)},E.max=function(e,t,n){if(!t&&E.isArray(e)&&e[0]===+e[0]&&65535>e.length)return Math.max.apply(Math,e);if(!t&&E.isEmpty(e))return-1/0;var r={computed:-1/0,value:-1/0};return N(e,function(e,i,o){var s=t?t.call(n,e,i,o):e;s>r.computed&&(r={value:e,computed:s})}),r.value},E.min=function(e,t,n){if(!t&&E.isArray(e)&&e[0]===+e[0]&&65535>e.length)return Math.min.apply(Math,e);if(!t&&E.isEmpty(e))return 1/0;var r={computed:1/0,value:1/0};return N(e,function(e,i,o){var s=t?t.call(n,e,i,o):e;r.computed>s&&(r={value:e,computed:s})}),r.value},E.shuffle=function(e){var t,n=0,r=[];return N(e,function(e){t=E.random(n++),r[n-1]=r[t],r[t]=e}),r},E.sample=function(e,t,n){return 2>arguments.length||n?e[E.random(e.length-1)]:E.shuffle(e).slice(0,Math.max(0,t))};var _=function(e){return E.isFunction(e)?e:function(t){return t[e]}};E.sortBy=function(e,t,n){var r=_(t);return E.pluck(E.map(e,function(e,t,i){return{value:e,index:t,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return e.index-t.index}),"value")};var A=function(e){return function(t,n,r){var i={},o=null==n?E.identity:_(n);return N(t,function(n,s){var a=o.call(r,n,s,t);e(i,a,n)}),i}};E.groupBy=A(function(e,t,n){(E.has(e,t)?e[t]:e[t]=[]).push(n)}),E.indexBy=A(function(e,t,n){e[t]=n}),E.countBy=A(function(e,t){E.has(e,t)?e[t]++:e[t]=1}),E.sortedIndex=function(e,t,n,r){n=null==n?E.identity:_(n);for(var i=n.call(r,t),o=0,s=e.length;s>o;){var a=o+s>>>1;i>n.call(r,e[a])?o=a+1:s=a}return o},E.toArray=function(e){return e?E.isArray(e)?c.call(e):e.length===+e.length?E.map(e,E.identity):E.values(e):[]},E.size=function(e){return null==e?0:e.length===+e.length?e.length:E.keys(e).length},E.first=E.head=E.take=function(e,t,n){return null==e?void 0:null==t||n?e[0]:c.call(e,0,t)},E.initial=function(e,t,n){return c.call(e,0,e.length-(null==t||n?1:t))},E.last=function(e,t,n){return null==e?void 0:null==t||n?e[e.length-1]:c.call(e,Math.max(e.length-t,0))},E.rest=E.tail=E.drop=function(e,t,n){return c.call(e,null==t||n?1:t)},E.compact=function(e){return E.filter(e,E.identity)};var D=function(e,t,n){return t&&E.every(e,E.isArray)?l.apply(n,e):(N(e,function(e){E.isArray(e)||E.isArguments(e)?t?u.apply(n,e):D(e,t,n):n.push(e)}),n)};E.flatten=function(e,t){return D(e,t,[])},E.without=function(e){return E.difference(e,c.call(arguments,1))},E.uniq=E.unique=function(e,t,n,r){E.isFunction(t)&&(r=n,n=t,t=!1);var i=n?E.map(e,n,r):e,o=[],s=[];return N(i,function(n,r){(t?r&&s[s.length-1]===n:E.contains(s,n))||(s.push(n),o.push(e[r]))}),o},E.union=function(){return E.uniq(E.flatten(arguments,!0))},E.intersection=function(e){var t=c.call(arguments,1);return E.filter(E.uniq(e),function(e){return E.every(t,function(t){return E.indexOf(t,e)>=0})})},E.difference=function(e){var t=l.apply(o,c.call(arguments,1));return E.filter(e,function(e){return!E.contains(t,e)})},E.zip=function(){for(var e=E.max(E.pluck(arguments,"length").concat(0)),t=Array(e),n=0;e>n;n++)t[n]=E.pluck(arguments,""+n);return t},E.object=function(e,t){if(null==e)return{};for(var n={},r=0,i=e.length;i>r;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},E.indexOf=function(e,t,n){if(null==e)return-1;var r=0,i=e.length;if(n){if("number"!=typeof n)return r=E.sortedIndex(e,t),e[r]===t?r:-1;r=0>n?Math.max(0,i+n):n}if(b&&e.indexOf===b)return e.indexOf(t,n);for(;i>r;r++)if(e[r]===t)return r;return-1},E.lastIndexOf=function(e,t,n){if(null==e)return-1;var r=null!=n;if(w&&e.lastIndexOf===w)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);for(var i=r?n:e.length;i--;)if(e[i]===t)return i;return-1},E.range=function(e,t,n){1>=arguments.length&&(t=e||0,e=0),n=arguments[2]||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=0,o=Array(r);r>i;)o[i++]=e,e+=n;return o};var q=function(){};E.bind=function(e,t){var n,r;if(C&&e.bind===C)return C.apply(e,c.call(arguments,1));if(!E.isFunction(e))throw new TypeError;return n=c.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(c.call(arguments)));q.prototype=e.prototype;var i=new q;q.prototype=null;var o=e.apply(i,n.concat(c.call(arguments)));return Object(o)===o?o:i}},E.partial=function(e){var t=c.call(arguments,1);return function(){return e.apply(this,t.concat(c.call(arguments)))}},E.bindAll=function(e){var t=c.call(arguments,1);if(0===t.length)throw Error("bindAll must be passed function names");return N(t,function(t){e[t]=E.bind(e[t],e)}),e},E.memoize=function(e,t){var n={};return t||(t=E.identity),function(){var r=t.apply(this,arguments);return E.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},E.delay=function(e,t){var n=c.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},E.defer=function(e){return E.delay.apply(E,[e,1].concat(c.call(arguments,1)))},E.throttle=function(e,t,n){var r,i,o,s=null,a=0;n||(n={});var u=function(){a=n.leading===!1?0:new Date,s=null,o=e.apply(r,i)};return function(){var c=new Date;a||n.leading!==!1||(a=c);var l=t-(c-a);return r=this,i=arguments,0>=l?(clearTimeout(s),s=null,a=c,o=e.apply(r,i)):s||n.trailing===!1||(s=setTimeout(u,l)),o}},E.debounce=function(e,t,n){var r,i,o,s,a;return function(){o=this,i=arguments,s=new Date;var u=function(){var c=new Date-s;t>c?r=setTimeout(u,t-c):(r=null,n||(a=e.apply(o,i)))},c=n&&!r;return r||(r=setTimeout(u,t)),c&&(a=e.apply(o,i)),a}},E.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},E.wrap=function(e,t){return function(){var n=[e];return u.apply(n,arguments),t.apply(this,n)}},E.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},E.after=function(e,t){return function(){return 1>--e?t.apply(this,arguments):void 0}},E.keys=k||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)E.has(e,n)&&t.push(n);return t},E.values=function(e){for(var t=E.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=e[t[i]];return r},E.pairs=function(e){for(var t=E.keys(e),n=t.length,r=Array(n),i=0;n>i;i++)r[i]=[t[i],e[t[i]]];return r},E.invert=function(e){for(var t={},n=E.keys(e),r=0,i=n.length;i>r;r++)t[e[n[r]]]=n[r];return t},E.functions=E.methods=function(e){var t=[];for(var n in e)E.isFunction(e[n])&&t.push(n);return t.sort()},E.extend=function(e){return N(c.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},E.pick=function(e){var t={},n=l.apply(o,c.call(arguments,1));return N(n,function(n){n in e&&(t[n]=e[n])}),t},E.omit=function(e){var t={},n=l.apply(o,c.call(arguments,1));for(var r in e)E.contains(n,r)||(t[r]=e[r]);return t},E.defaults=function(e){return N(c.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e},E.clone=function(e){return E.isObject(e)?E.isArray(e)?e.slice():E.extend({},e):e},E.tap=function(e,t){return t(e),e};var O=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 E&&(e=e._wrapped),t instanceof E&&(t=t._wrapped);var i=f.call(e);if(i!=f.call(t))return!1;switch(i){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;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;for(var o=n.length;o--;)if(n[o]==e)return r[o]==t;var s=e.constructor,a=t.constructor;if(s!==a&&!(E.isFunction(s)&&s instanceof s&&E.isFunction(a)&&a instanceof a))return!1;n.push(e),r.push(t);var u=0,c=!0;if("[object Array]"==i){if(u=e.length,c=u==t.length)for(;u--&&(c=O(e[u],t[u],n,r)););}else{for(var l in e)if(E.has(e,l)&&(u++,!(c=E.has(t,l)&&O(e[l],t[l],n,r))))break;if(c){for(l in t)if(E.has(t,l)&&!u--)break;c=!u}}return n.pop(),r.pop(),c};E.isEqual=function(e,t){return O(e,t,[],[])},E.isEmpty=function(e){if(null==e)return!0;if(E.isArray(e)||E.isString(e))return 0===e.length;for(var t in e)if(E.has(e,t))return!1;return!0},E.isElement=function(e){return!(!e||1!==e.nodeType)},E.isArray=T||function(e){return"[object Array]"==f.call(e)},E.isObject=function(e){return e===Object(e)},N(["Arguments","Function","String","Number","Date","RegExp"],function(e){E["is"+e]=function(t){return f.call(t)=="[object "+e+"]"}}),E.isArguments(arguments)||(E.isArguments=function(e){return!(!e||!E.has(e,"callee"))}),E.isFunction=function(e){return"function"==typeof e},E.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},E.isNaN=function(e){return E.isNumber(e)&&e!=+e},E.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==f.call(e)},E.isNull=function(e){return null===e},E.isUndefined=function(e){return void 0===e},E.has=function(e,t){return h.call(e,t)},E.noConflict=function(){return e._=r,this},E.identity=function(e){return e},E.times=function(e,t,n){for(var r=Array(Math.max(0,e)),i=0;e>i;i++)r[i]=t.call(n,i);return r},E.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var H={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}};H.unescape=E.invert(H.escape);var L={escape:RegExp("["+E.keys(H.escape).join("")+"]","g"),unescape:RegExp("("+E.keys(H.unescape).join("|")+")","g")};E.each(["escape","unescape"],function(e){E[e]=function(t){return null==t?"":(""+t).replace(L[e],function(t){return H[e][t]})}}),E.result=function(e,t){if(null==e)return void 0;var n=e[t];return E.isFunction(n)?n.call(e):n},E.mixin=function(e){N(E.functions(e),function(t){var n=E[t]=e[t];E.prototype[t]=function(){var e=[this._wrapped];return u.apply(e,arguments),$.call(this,n.apply(E,e))}})};var M=0;E.uniqueId=function(e){var t=++M+"";return e?e+t:t},E.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var F=/(.)^/,R={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},P=/\\|'|\r|\n|\t|\u2028|\u2029/g;E.template=function(e,t,n){var r;n=E.defaults({},n,E.templateSettings);var i=RegExp([(n.escape||F).source,(n.interpolate||F).source,(n.evaluate||F).source].join("|")+"|$","g"),o=0,s="__p+='";e.replace(i,function(t,n,r,i,a){return s+=e.slice(o,a).replace(P,function(e){return"\\"+R[e]}),n&&(s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(s+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(s+="';\n"+i+"\n__p+='"),o=a+t.length,t}),s+="';\n",n.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{r=Function(n.variable||"obj","_",s)}catch(a){throw a.source=s,a}if(t)return r(t,E);var u=function(e){return r.call(this,e,E)};return u.source="function("+(n.variable||"obj")+"){\n"+s+"}",u},E.chain=function(e){return E(e).chain()};var $=function(e){return this._chain?E(e).chain():e};E.mixin(E),N(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=o[e];E.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!=e&&"splice"!=e||0!==n.length||delete n[0],$.call(this,n)}}),N(["concat","join","slice"],function(e){var t=o[e];E.prototype[e]=function(){return $.call(this,t.apply(this._wrapped,arguments))}}),E.extend(E.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this)},{}]},{},[]);var Backbone=require("backbone"),$=require("jquery")(window),View,myView,testModel;Backbone.$=$,testModel=new Backbone.Model,View=Backbone.View.extend({template:'<a href="#" class="js-trigger">Fire The Missles</a>',initialize:function(){this.listenTo(testModel,"fakeEvent",this.doThing),this.listenTo(testModel,"fakeEvent",this.doThing)},events:{"click .js-trigger":"triggerTheThing"},triggerTheThing:function(){testModel.trigger("fakeEvent")},doThing:function(){alert("Missle Fired")},render:function(){this.$el.html(this.template)}}),myView=new View({el:document.body}),myView.render();
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; }
body, html { height: 100%; width: 100%; }</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment