hexagonaljs-rails 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ /*! jQuery v1.7.2 jquery.com | jquery.org/license */
2
+ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
3
+ a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.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(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
4
+ .clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
@@ -0,0 +1,23 @@
1
+
2
+ (function($){var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};$.toJSON=typeof JSON==='object'&&JSON.stringify?JSON.stringify:function(o){if(o===null){return'null';}
3
+ var type=typeof o;if(type==='undefined'){return undefined;}
4
+ if(type==='number'||type==='boolean'){return''+o;}
5
+ if(type==='string'){return $.quoteString(o);}
6
+ if(type==='object'){if(typeof o.toJSON==='function'){return $.toJSON(o.toJSON());}
7
+ if(o.constructor===Date){var month=o.getUTCMonth()+1,day=o.getUTCDate(),year=o.getUTCFullYear(),hours=o.getUTCHours(),minutes=o.getUTCMinutes(),seconds=o.getUTCSeconds(),milli=o.getUTCMilliseconds();if(month<10){month='0'+month;}
8
+ if(day<10){day='0'+day;}
9
+ if(hours<10){hours='0'+hours;}
10
+ if(minutes<10){minutes='0'+minutes;}
11
+ if(seconds<10){seconds='0'+seconds;}
12
+ if(milli<100){milli='0'+milli;}
13
+ if(milli<10){milli='0'+milli;}
14
+ return'"'+year+'-'+month+'-'+day+'T'+
15
+ hours+':'+minutes+':'+seconds+'.'+milli+'Z"';}
16
+ if(o.constructor===Array){var ret=[];for(var i=0;i<o.length;i++){ret.push($.toJSON(o[i])||'null');}
17
+ return'['+ret.join(',')+']';}
18
+ var name,val,pairs=[];for(var k in o){type=typeof k;if(type==='number'){name='"'+k+'"';}else if(type==='string'){name=$.quoteString(k);}else{continue;}
19
+ type=typeof o[k];if(type==='function'||type==='undefined'){continue;}
20
+ val=$.toJSON(o[k]);pairs.push(name+':'+val);}
21
+ return'{'+pairs.join(',')+'}';}};$.evalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(src){return eval('('+src+')');};$.secureEvalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(src){var filtered=src.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered)){return eval('('+src+')');}else{throw new SyntaxError('Error parsing JSON, source is not valid.');}};$.quoteString=function(string){if(string.match(escapeable)){return'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==='string'){return c;}
22
+ c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
23
+ return'"'+string+'"';};})(jQuery);
@@ -0,0 +1,111 @@
1
+ /*
2
+ * Sugar Library v1.3
3
+ *
4
+ * Freely distributable and licensed under the MIT-style license.
5
+ * Copyright (c) 2012 Andrew Plummer
6
+ * http://sugarjs.com/
7
+ *
8
+ * ---------------------------- */
9
+ (function(){var j=true,k=null,m=false;function aa(a){return function(){return a}}var p=Object,r=Array,s=RegExp,t=Date,u=String,v=Number,w=Math,ba=typeof global!=="undefined"?global:this,ca=p.defineProperty&&p.defineProperties,x="Array,Boolean,Date,Function,Number,String,RegExp".split(","),da=y(x[0]),ea=y(x[1]),fa=y(x[2]),z=y(x[3]),D=y(x[4]),E=y(x[5]),F=y(x[6]);function y(a){return function(b){return ga(b,a)}}function ga(a,b){return p.prototype.toString.call(a)==="[object "+b+"]"}
10
+ function ha(a){if(!a.SugarMethods){ia(a,"SugarMethods",{});G(a,m,m,{restore:function(){var b=arguments.length===0,c=H(arguments);I(a.SugarMethods,function(d,e){if(b||c.indexOf(d)>-1)ia(e.za?a.prototype:a,d,e.method)})},extend:function(b,c,d){G(a,d!==m,c,b)}})}}function G(a,b,c,d){var e=b?a.prototype:a,g;ha(a);I(d,function(f,i){g=e[f];if(typeof c==="function")i=ja(e[f],i,c);if(c!==m||!e[f])ia(e,f,i);a.SugarMethods[f]={za:b,method:i,Ga:g}})}
11
+ function J(a,b,c,d,e){var g={};d=E(d)?d.split(","):d;d.forEach(function(f,i){e(g,f,i)});G(a,b,c,g)}function ja(a,b,c){return function(){return a&&(c===j||!c.apply(this,arguments))?a.apply(this,arguments):b.apply(this,arguments)}}function ia(a,b,c){if(ca)p.defineProperty(a,b,{value:c,configurable:j,enumerable:m,writable:j});else a[b]=c}function H(a,b){var c=[],d=0;for(d=0;d<a.length;d++){c.push(a[d]);b&&b.call(a,a[d],d)}return c}function K(a){return a!==void 0}function L(a){return a===void 0}
12
+ function ka(a){return a&&typeof a==="object"}function la(a){return!!a&&ga(a,"Object")&&u(a.constructor)===u(p)}function ma(a,b){return p.hasOwnProperty.call(a,b)}function I(a,b){for(var c in a)if(ma(a,c))if(b.call(a,c,a[c])===m)break}function na(a,b){I(b,function(c){a[c]=b[c]});return a}function M(a){na(this,a)}M.prototype.constructor=p;function N(a,b,c,d){var e=[];a=parseInt(a);for(var g=d<0;!g&&a<=b||g&&a>=b;){e.push(a);c&&c.call(this,a);a+=d||1}return e}
13
+ function O(a,b,c){c=w[c||"round"];var d=w.pow(10,w.abs(b||0));if(b<0)d=1/d;return c(a*d)/d}function P(a,b){return O(a,b,"floor")}function Q(a,b,c,d){d=w.abs(a).toString(d||10);d=oa(b-d.replace(/\.\d+/,"").length,"0")+d;if(c||a<0)d=(a<0?"-":"+")+d;return d}function qa(a){if(a>=11&&a<=13)return"th";else switch(a%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}
14
+ function ra(){return"\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff"}function oa(a,b){return r(w.max(0,K(a)?a:1)+1).join(b||"")}function sa(a,b){var c=a.toString().match(/[^/]*$/)[0];if(b)c=(c+b).split("").sort().join("").replace(/([gimy])\1+/g,"$1");return c}function R(a){E(a)||(a=u(a));return a.replace(/([\\/'*+?|()\[\]{}.^$])/g,"\\$1")}
15
+ function S(a,b){var c,d,e,g,f,i,h=typeof a;if(h==="string")return a;d=p.prototype.toString.call(a);c=d==="[object Object]";e=d==="[object Array]";if(a!=k&&c||e){b||(b=[]);if(b.length>1)for(f=b.length;f--;)if(b[f]===a)return"CYC";b.push(a);c=u(a.constructor);g=e?a:p.keys(a).sort();for(f=0;f<g.length;f++){i=e?f:g[f];c+=i+S(a[i],b)}b.pop()}else c=1/a===-Infinity?"-0":u(a&&a.valueOf());return h+d+c}
16
+ function ta(a,b,c){var d=[],e=a.length,g=b[b.length-1]!==m,f;H(b,function(i){if(ea(i))return m;if(g){i%=e;if(i<0)i=e+i}f=c?a.charAt(i)||"":a[i];d.push(f)});return d.length<2?d[0]:d}function ua(a,b){J(b,j,m,a,function(c,d){c[d+(d==="equal"?"s":"")]=function(){return p[d].apply(k,[this].concat(H(arguments)))}})}ha(p);I(x,function(a,b){ha(ba[b])});
17
+ G(p,m,m,{keys:function(a){var b=[];if(!ka(a)&&!F(a)&&!z(a))throw new TypeError("Object required");I(a,function(c){b.push(c)});return b}});function va(a,b,c,d){var e=a.length,g=d==-1,f=g?e-1:0;c=isNaN(c)?f:parseInt(c>>0);if(c<0)c=e+c;if(!g&&c<0||g&&c>=e)c=f;for(;g&&c>=0||!g&&c<e;){if(a[c]===b)return c;c+=d}return-1}
18
+ function wa(a,b,c,d){var e=a.length,g=0,f=K(c);xa(b);if(e==0&&!f)throw new TypeError("Reduce called on empty array with no initial value");else if(f)c=c;else{c=a[d?e-1:g];g++}for(;g<e;){f=d?e-g-1:g;if(f in a)c=b(c,a[f],f,a);g++}return c}function xa(a){if(!a||!a.call)throw new TypeError("Callback is not callable");}function ya(a){if(a.length===0)throw new TypeError("First argument must be defined");}G(r,m,m,{isArray:function(a){return ga(a,"Array")}});
19
+ G(r,j,m,{every:function(a,b){var c=this.length,d=0;for(ya(arguments);d<c;){if(d in this&&!a.call(b,this[d],d,this))return m;d++}return j},some:function(a,b){var c=this.length,d=0;for(ya(arguments);d<c;){if(d in this&&a.call(b,this[d],d,this))return j;d++}return m},map:function(a,b){var c=this.length,d=0,e=Array(c);for(ya(arguments);d<c;){if(d in this)e[d]=a.call(b,this[d],d,this);d++}return e},filter:function(a,b){var c=this.length,d=0,e=[];for(ya(arguments);d<c;){d in this&&a.call(b,this[d],d,this)&&
20
+ e.push(this[d]);d++}return e},indexOf:function(a,b){if(E(this))return this.indexOf(a,b);return va(this,a,b,1)},lastIndexOf:function(a,b){if(E(this))return this.lastIndexOf(a,b);return va(this,a,b,-1)},forEach:function(a,b){var c=this.length,d=0;for(xa(a);d<c;){d in this&&a.call(b,this[d],d,this);d++}},reduce:function(a,b){return wa(this,a,b)},reduceRight:function(a,b){return wa(this,a,b,j)}});G(t,m,m,{now:function(){return(new t).getTime()}});
21
+ (function(){var a=ra().match(/^\s+$/);try{u.prototype.trim.call([1])}catch(b){a=m}G(u,j,!a,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(s("^["+ra()+"]+"),"")},trimRight:function(){return this.replace(s("["+ra()+"]+$"),"")}})})();
22
+ (function(){var a=m;if(Function.prototype.ta){a=function(){};var b=a.ta();a=new b instanceof b&&!(new a instanceof b)}G(Function,j,!a,{bind:function(c){var d=this,e=H(arguments).slice(1),g,f;if(!z(this))throw new TypeError("Function.prototype.bind called on a non-function");f=function(){return d.apply(d.prototype&&this instanceof d?this:c,e.concat(H(arguments)))};g=function(){};g.prototype=this.prototype;f.prototype=new g;return f}})})();
23
+ (function(){var a=new t(t.UTC(1999,11,31));a=a.toISOString&&a.toISOString()==="1999-12-31T00:00:00.000Z";J(t,j,!a,"toISOString,toJSON",function(b,c){b[c]=function(){return Q(this.getUTCFullYear(),4)+"-"+Q(this.getUTCMonth()+1,2)+"-"+Q(this.getUTCDate(),2)+"T"+Q(this.getUTCHours(),2)+":"+Q(this.getUTCMinutes(),2)+":"+Q(this.getUTCSeconds(),2)+"."+Q(this.getUTCMilliseconds(),3)+"Z"}})})();
24
+ function za(a,b,c,d){var e=j;if(a===b)return j;else if(F(b)&&E(a))return s(b).test(a);else if(z(b))return b.apply(c,d);else if(la(b)&&ka(a)){I(b,function(g){za(a[g],b[g],c,[a[g],a])||(e=m)});return p.keys(b).length>0&&e}else return S(a)===S(b)}function T(a,b,c,d){return L(b)?a:z(b)?b.apply(c,d||[]):z(a[b])?a[b].call(a):a[b]}
25
+ function U(a,b,c,d){var e,g;if(c<0)c=a.length+c;g=isNaN(c)?0:c;for(c=d===j?a.length+g:a.length;g<c;){e=g%a.length;if(e in a){if(b.call(a,a[e],e,a)===m)break}else return Aa(a,b,g,d);g++}}function Aa(a,b,c){var d=[],e;for(e in a)e in a&&e>>>0==e&&e!=4294967295&&e>=c&&d.push(parseInt(e));d.sort().each(function(g){return b.call(a,a[g],g,a)});return a}function Ba(a,b,c,d,e){var g,f;U(a,function(i,h,l){if(za(i,b,l,[i,h,l])){g=i;f=h;return m}},c,d);return e?f:g}
26
+ function Ca(a,b){var c=[],d={},e,g;U(a,function(f,i){g=b?T(f,b,a,[f,i,a]):f;e=S(g);if(!(e in d&&(typeof f!=="function"||f===d[e]))){d[e]=g;c.push(f)}});return c}function Da(a,b,c){var d=[],e={};b.each(function(g){e[S(g)]=g});a.each(function(g){var f=S(g);if((f in e&&(typeof g!=="function"||g===e[f]))!=c){delete e[f];d.push(g)}});return d}function Ga(a,b,c){b=b||Infinity;c=c||0;var d=[];U(a,function(e){if(da(e)&&c<b)d=d.concat(Ga(e,b,c+1));else d.push(e)});return d}
27
+ function Ha(a){var b=[];H(a,function(c){b=b.concat(c)});return b}function Ia(a,b,c,d){var e,g=[],f=c==="max",i=c==="min",h=Array.isArray(a);I(a,function(l){var n=a[l];l=T(n,b,a,h?[n,parseInt(l),a]:[]);if(l===e)g.push(n);else if(L(e)||f&&l>e||i&&l<e){g=[n];e=l}});h||(g=Ga(g,1));return d?g:g[0]}function Ja(a){if(r[Ka])a=a.toLowerCase();return a.replace(r[La],"")}function Ma(a,b){var c=a.charAt(b);return(r[Na]||{})[c]||c}function Oa(a){var b=r[Pa];return a?b.indexOf(a):k}
28
+ var Pa="AlphanumericSortOrder",La="AlphanumericSortIgnore",Ka="AlphanumericSortIgnoreCase",Na="AlphanumericSortEquivalents";G(r,m,m,{create:function(){var a=[];H(arguments,function(b){if(b&&b.callee)b=H(b);a=a.concat(b)});return a}});
29
+ G(r,j,m,{find:function(a,b,c){return Ba(this,a,b,c)},findAll:function(a,b,c){var d=[];U(this,function(e,g,f){za(e,a,f,[e,g,f])&&d.push(e)},b,c);return d},findIndex:function(a,b,c){a=Ba(this,a,b,c,j);return L(a)?-1:a},count:function(a){if(L(a))return this.length;return this.findAll(a).length},removeAt:function(a,b){if(L(a))return this;if(L(b))b=a;for(var c=0;c<=b-a;c++)this.splice(a,1);return this},include:function(a,b){return this.clone().add(a,b)},exclude:function(){return r.prototype.remove.apply(this.clone(),
30
+ arguments)},clone:function(){return na([],this)},unique:function(a){return Ca(this,a)},flatten:function(a){return Ga(this,a)},union:function(){return Ca(this.concat(Ha(arguments)))},intersect:function(){return Da(this,Ha(arguments),m)},subtract:function(){return Da(this,Ha(arguments),j)},at:function(){return ta(this,arguments)},first:function(a){if(L(a))return this[0];if(a<0)a=0;return this.slice(0,a)},last:function(a){if(L(a))return this[this.length-1];return this.slice(this.length-a<0?0:this.length-
31
+ a)},from:function(a){return this.slice(a)},to:function(a){if(L(a))a=this.length;return this.slice(0,a)},min:function(a,b){return Ia(this,a,"min",b)},max:function(a,b){return Ia(this,a,"max",b)},least:function(a,b){return Ia(this.groupBy.apply(this,[a]),"length","min",b)},most:function(a,b){return Ia(this.groupBy.apply(this,[a]),"length","max",b)},sum:function(a){a=a?this.map(a):this;return a.length>0?a.reduce(function(b,c){return b+c}):0},average:function(a){a=a?this.map(a):this;return a.length>0?
32
+ a.sum()/a.length:0},inGroups:function(a,b){var c=arguments.length>1,d=this,e=[],g=O(this.length/a,void 0,"ceil");N(0,a-1,function(f){f=f*g;var i=d.slice(f,f+g);c&&i.length<g&&N(1,g-i.length,function(){i=i.add(b)});e.push(i)});return e},inGroupsOf:function(a,b){var c=[],d=this.length,e=this,g;if(d===0||a===0)return e;if(L(a))a=1;if(L(b))b=k;N(0,O(d/a,void 0,"ceil")-1,function(f){for(g=e.slice(a*f,a*f+a);g.length<a;)g.push(b);c.push(g)});return c},isEmpty:function(){return this.compact().length==0},
33
+ sortBy:function(a,b){var c=this.clone();c.sort(function(d,e){var g,f;g=T(d,a,c,[d]);f=T(e,a,c,[e]);if(E(g)&&E(f)){g=g;f=f;var i,h,l,n,o=0,q=0;g=Ja(g);f=Ja(f);do{l=Ma(g,o);n=Ma(f,o);i=Oa(l);h=Oa(n);if(i===-1||h===-1){i=g.charCodeAt(o)||k;h=f.charCodeAt(o)||k}l=l!==g.charAt(o);n=n!==f.charAt(o);if(l!==n&&q===0)q=l-n;o+=1}while(i!=k&&h!=k&&i===h);g=i===h?q:i<h?-1:1}else g=g<f?-1:g>f?1:0;return g*(b?-1:1)});return c},randomize:function(){for(var a=this.concat(),b,c,d=a.length;d;b=parseInt(w.random()*
34
+ d),c=a[--d],a[d]=a[b],a[b]=c);return a},zip:function(){var a=H(arguments);return this.map(function(b,c){return[b].concat(a.map(function(d){return c in d?d[c]:k}))})},sample:function(a){var b=[],c=this.clone(),d;if(L(a))a=1;for(;b.length<a;){d=P(w.random()*(c.length-1));b.push(c[d]);c.removeAt(d);if(c.length==0)break}return arguments.length>0?b:b[0]},each:function(a,b,c){U(this,a,b,c);return this},add:function(a,b){if(!D(v(b))||isNaN(b))b=this.length;r.prototype.splice.apply(this,[b,0].concat(a));
35
+ return this},remove:function(){var a,b=this;H(arguments,function(c){for(a=0;a<b.length;)if(za(b[a],c,b,[b[a],a,b]))b.splice(a,1);else a++});return b},compact:function(a){var b=[];U(this,function(c){if(da(c))b.push(c.compact());else if(a&&c)b.push(c);else!a&&c!=k&&c.valueOf()===c.valueOf()&&b.push(c)});return b},groupBy:function(a,b){var c=this,d={},e;U(c,function(g,f){e=T(g,a,c,[g,f,c]);d[e]||(d[e]=[]);d[e].push(g)});b&&I(d,b);return d},none:function(){return!this.any.apply(this,arguments)}});
36
+ G(r,j,m,{all:r.prototype.every,any:r.prototype.some,insert:r.prototype.add});function Qa(a){if(a&&a.valueOf)a=a.valueOf();return p.keys(a)}function Ra(a,b){J(p,m,m,a,function(c,d){c[d]=function(e,g,f){f=r.prototype[d].call(Qa(e),function(i){return b?T(e[i],g,e,[i,e[i],e]):za(e[i],g,e,[i,e[i],e])},f);if(da(f))f=f.reduce(function(i,h){i[h]=e[h];return i},{});return f}});ua(a,M)}
37
+ G(p,m,m,{map:function(a,b){return Qa(a).reduce(function(c,d){c[d]=T(a[d],b,a,[d,a[d],a]);return c},{})},reduce:function(a){var b=Qa(a).map(function(c){return a[c]});return b.reduce.apply(b,H(arguments).slice(1))},size:function(a){return Qa(a).length}});(function(){J(r,j,function(){var a=arguments;return a.length>0&&!z(a[0])},"map,every,all,some,any,none,filter",function(a,b){a[b]=function(c){return this[b](function(d,e){return b==="map"?T(d,c,this,[d,e,this]):za(d,c,this,[d,e,this])})}})})();
38
+ (function(){r[Pa]="A\u00c1\u00c0\u00c2\u00c3\u0104BC\u0106\u010c\u00c7D\u010e\u00d0E\u00c9\u00c8\u011a\u00ca\u00cb\u0118FG\u011eH\u0131I\u00cd\u00cc\u0130\u00ce\u00cfJKL\u0141MN\u0143\u0147\u00d1O\u00d3\u00d2\u00d4PQR\u0158S\u015a\u0160\u015eT\u0164U\u00da\u00d9\u016e\u00db\u00dcVWXY\u00ddZ\u0179\u017b\u017d\u00de\u00c6\u0152\u00d8\u00d5\u00c5\u00c4\u00d6".split("").map(function(b){return b+b.toLowerCase()}).join("");var a={};U("A\u00c1\u00c0\u00c2\u00c3\u00c4,C\u00c7,E\u00c9\u00c8\u00ca\u00cb,I\u00cd\u00cc\u0130\u00ce\u00cf,O\u00d3\u00d2\u00d4\u00d5\u00d6,S\u00df,U\u00da\u00d9\u00db\u00dc".split(","),
39
+ function(b){var c=b.charAt(0);U(b.slice(1).split(""),function(d){a[d]=c;a[d.toLowerCase()]=c.toLowerCase()})});r[Ka]=j;r[Na]=a})();Ra("each,any,all,none,count,find,findAll,isEmpty");Ra("sum,average,min,max,least,most",j);ua("map,reduce,size",M);
40
+ var V,Sa,Ta=["ampm","hour","minute","second","ampm","utc","offset_sign","offset_hours","offset_minutes","ampm"],Ua="({t})?\\s*(\\d{1,2}(?:[,.]\\d+)?)(?:{h}(\\d{1,2}(?:[,.]\\d+)?)?{m}(?::?(\\d{1,2}(?:[,.]\\d+)?){s})?\\s*(?:({t})|(Z)|(?:([+-])(\\d{2,2})(?::?(\\d{2,2}))?)?)?|\\s*({t}))",Va={},Wa,Xa,Ya,Za=[],$a=[{ba:"f{1,4}|ms|milliseconds",format:function(a){return a.getMilliseconds()}},{ba:"ss?|seconds",format:function(a){return a.getSeconds()}},{ba:"mm?|minutes",format:function(a){return a.getMinutes()}},
41
+ {ba:"hh?|hours|12hr",format:function(a){a=W(a,"get",void 0,"Hours");return a===0?12:a-P(a/13)*12}},{ba:"HH?|24hr",format:function(a){return a.getHours()}},{ba:"dd?|date|day",format:function(a){return a.getDate()}},{ba:"dow|weekday",ma:j,format:function(a,b,c){return b.weekdays[a.getDay()+(c-1)*7]}},{ba:"MM?",format:function(a){return a.getMonth()+1}},{ba:"mon|month",ma:j,format:function(a,b,c){return b.months[a.getMonth()+(c-1)*12]}},{ba:"y{2,4}|year",format:function(a){return a.getFullYear()}},{ba:"[Tt]{1,2}",
42
+ format:function(a,b,c,d){a=b.ampm[P(a.getHours()/12)];if(d.length===1)a=a.slice(0,1);if(d.slice(0,1)==="T")a=a.toUpperCase();return a}},{ba:"z{1,4}|tz|timezone",text:j,format:function(a,b,c,d){a=a.getUTCOffset();if(d=="z"||d=="zz")a=a.replace(/(\d{2})(\d{2})/,function(e,g){return Q(g,d.length)});return a}},{ba:"iso(tz|timezone)",format:function(a){return a.getUTCOffset(j)}},{ba:"ord",format:function(a){a=a.getDate();return a+qa(a)}}],X=[{$:"year",method:"FullYear",da:function(a){return(365+(a?a.isLeapYear()?
43
+ 1:0:0.25))*24*60*60*1E3}},{$:"month",method:"Month",na:j,da:function(a,b){var c=30.4375,d;if(a){d=a.daysInMonth();if(b<=d.days())c=d}return c*24*60*60*1E3}},{$:"week",method:"Week",da:aa(6048E5)},{$:"day",method:"Date",na:j,da:aa(864E5)},{$:"hour",method:"Hours",da:aa(36E5)},{$:"minute",method:"Minutes",da:aa(6E4)},{$:"second",method:"Seconds",da:aa(1E3)},{$:"millisecond",method:"Milliseconds",da:aa(1)}],ab={};function bb(a){na(this,a);this.ha=Za.concat()}
44
+ bb.prototype={getMonth:function(a){return D(a)?a-1:this.months.indexOf(a)%12},ra:function(a){return this.weekdays.indexOf(a)%7},qa:function(a){var b;return D(a)?a:a&&(b=this.numbers.indexOf(a))!==-1?(b+1)%10:1},xa:function(a){var b=this;return a.replace(s(this.num,"g"),function(c){return b.qa(c)||""})},va:function(a){return V.units[this.units.indexOf(a)%8]},Da:function(a){return this.pa(a,a[2]>0?"future":"past")},ua:function(a){return this.pa(cb(a),"duration")},ya:function(a){a=a||this.code;return a===
45
+ "en"||a==="en-US"?j:this.variant},Ba:function(a){return a===this.ampm[1]},pa:function(a,b){var c=a[0],d=a[1],e=a[2],g,f,i;if(this.code=="ru"){i=c.toString().slice(-1);switch(j){case i==1:i=1;break;case i>=2&&i<=4:i=2;break;default:i=3}}else i=this.plural&&c>1?1:0;f=this.units[i*8+d]||this.units[d];if(this.capitalizeUnit)f=db(f);g=this.modifiers.filter(function(h){return h.name=="sign"&&h.value==(e>0?1:-1)})[0];return this[b].replace(/\{(.*?)\}/g,function(h,l){switch(l){case "num":return c;case "unit":return f;
46
+ case "sign":return g.src}})},wa:function(){return this.oa?[this.oa].concat(this.ha):this.ha},addFormat:function(a,b,c,d,e){var g=c||[],f=this,i;a=a.replace(/\s+/g,"[-,. ]*");a=a.replace(/\{([^,]+?)\}/g,function(h,l){var n=l.match(/\?$/),o=l.match(/(\d)(?:-(\d))?/),q=l.match(/^\d+$/),B=l.replace(/[^a-z]+$/,""),C,A;if(q)C=f.optionals[q[0]];else if(f[B])C=f[B];else if(f[B+"s"]){C=f[B+"s"];if(o){A=[];C.forEach(function(Ea,pa){var Fa=pa%(f.units?8:C.length);if(Fa>=o[1]&&Fa<=(o[2]||o[1]))A.push(Ea)});C=
47
+ A}C=eb(C)}if(q)return"(?:"+C+")?";else{c||g.push(B);return"("+C+")"+(n?"?":"")}});if(b){b=fb(Ua,f,e);e=["t","[\\s\\u3000]"].concat(f.timeMarker);i=a.match(/\\d\{\d,\d\}\)+\??$/);gb(f,"(?:"+b+")[,\\s\\u3000]+?"+a,Ta.concat(g),d);gb(f,a+"(?:[,\\s]*(?:"+e.join("|")+(i?"+":"*")+")"+b+")?",g.concat(Ta),d)}else gb(f,a,g,d)}};function hb(a,b){var c;E(a)||(a="");c=ab[a]||ab[a.slice(0,2)];if(b===m&&!c)throw Error("Invalid locale.");return c||Sa}
48
+ function ib(a,b){function c(i){var h=f[i];if(E(h))f[i]=h.split(",");else h||(f[i]=[])}function d(i,h){i=i.split("+").map(function(l){return l.replace(/(.+):(.+)$/,function(n,o,q){return q.split("|").map(function(B){return o+B}).join("|")})}).join("|");return i.split("|").forEach(h)}function e(i,h,l){var n=[];if(f[i]){f[i].forEach(function(o,q){d(o,function(B,C){n[C*l+q]=B.toLowerCase()})});if(h)n=n.concat(f[i].map(function(o){return o.slice(0,3).toLowerCase()}));return f[i]=n}}function g(i,h,l){i=
49
+ "\\d{"+i+","+h+"}";if(l)i+="|(?:"+eb(f.numbers)+")+";return i}var f;f=new bb(b);c("modifiers");"months,weekdays,units,numbers,articles,optionals,timeMarker,ampm,timeSuffixes,dateParse,timeParse".split(",").forEach(c);e("months",j,12);e("weekdays",j,7);e("units",m,8);e("numbers",m,10);f.code=a;f.date=g(1,2,f.digitDate);f.year=g(4,4);f.num=function(){var i=["\\d+"].concat(f.articles);if(f.numbers)i=i.concat(f.numbers);return eb(i)}();(function(){var i=[];f.ia={};f.modifiers.forEach(function(h){var l=
50
+ h.name;d(h.src,function(n){var o=f[l];f.ia[n]=h;i.push({name:l,src:n,value:h.value});f[l]=o?o+"|"+n:n})});f.day+="|"+eb(f.weekdays);f.modifiers=i})();if(f.monthSuffix){f.month=g(1,2);f.months=N(1,12).map(function(i){return i+f.monthSuffix})}f.full_month=g(1,2)+"|"+eb(f.months);f.timeSuffixes.length>0&&f.addFormat(fb(Ua,f),m,Ta);f.addFormat("{day}",j);f.addFormat("{month}"+(f.monthSuffix||""));f.addFormat("{year}"+(f.yearSuffix||""));f.timeParse.forEach(function(i){f.addFormat(i,j)});f.dateParse.forEach(function(i){f.addFormat(i)});
51
+ return ab[a]=f}function gb(a,b,c,d){a.ha.unshift({Ea:d,Aa:a,Ca:s("^"+b+"$","i"),to:c})}function db(a){return a.slice(0,1).toUpperCase()+a.slice(1)}function eb(a){return a.filter(function(b){return!!b}).join("|")}function jb(a,b){var c;if(la(a[0]))return a;else if(D(a[0])&&!D(a[1]))return[a[0]];else if(E(a[0])&&b)return[kb(a[0]),a[1]];c={};Xa.forEach(function(d,e){c[d.$]=a[e]});return[c]}
52
+ function kb(a,b){var c={};match=a.match(/^(\d+)?\s?(\w+?)s?$/i);if(L(b))b=parseInt(match[1])||1;c[match[2].toLowerCase()]=b;return c}function lb(a,b){var c={},d,e;b.forEach(function(g,f){d=a[f+1];if(!(L(d)||d==="")){if(g==="year")c.Fa=d;e=parseFloat(d.replace(/,/,"."));c[g]=!isNaN(e)?e:d.toLowerCase()}});return c}function mb(a){a=a.trim().replace(/^(just )?now|\.+$/i,"");return nb(a)}
53
+ function nb(a){return a.replace(Wa,function(b,c,d){var e=0,g=1,f,i;if(c)return b;d.split("").reverse().forEach(function(h){h=Va[h];var l=h>9;if(l){if(f)e+=g;g*=h/(i||1);i=h}else{if(f===m)g*=10;e+=g*h}f=l});if(f)e+=g;return e})}
54
+ function ob(a,b,c){var d=new t,e=m,g,f,i,h,l,n,o,q,B;if(fa(a))d=a.clone();else if(D(a))d=new t(a);else if(la(a)){d=(new t).set(a,j);h=a}else if(E(a)){g=hb(b);a=mb(a);g&&I(g.wa(),function(C,A){var Ea=a.match(A.Ca);if(Ea){i=A;f=i.Aa;h=lb(Ea,i.to,f);f.oa=i;if(h.timestamp){h=h.timestamp;return m}if(i.Ea&&!E(h.month)&&(E(h.date)||g.ya(b))){q=h.month;h.month=h.date;h.date=q}if(h.year&&h.Fa.length===2)h.year=O((new t).getFullYear()/100)*100-O(h.year/100)*100+h.year;if(h.month){h.month=f.getMonth(h.month);
55
+ if(h.shift&&!h.unit)h.unit=f.units[7]}if(h.weekday&&h.date)delete h.weekday;else if(h.weekday){h.weekday=f.ra(h.weekday);if(h.shift&&!h.unit)h.unit=f.units[5]}if(h.day&&(q=f.ia[h.day])){h.day=q.value;d.reset();e=j}else if(h.day&&(n=f.ra(h.day))>-1){delete h.day;if(h.num&&h.month){B=function(){pb(d,{weekday:n+7*(h.num-1)},m,m,m,1)};h.day=1}else h.weekday=n}if(h.date&&!D(h.date))h.date=f.xa(h.date);if(f.Ba(h.ampm)&&h.hour<12)h.hour+=12;if("offset_hours"in h||"offset_minutes"in h){h.utc=j;h.offset_minutes=
56
+ h.offset_minutes||0;h.offset_minutes+=h.offset_hours*60;if(h.offset_sign==="-")h.offset_minutes*=-1;h.minute-=h.offset_minutes}if(h.unit){e=j;o=f.qa(h.num);l=f.va(h.unit);if(h.shift||h.edge){o*=(q=f.ia[h.shift])?q.value:0;if(l==="month"&&K(h.date)){d.set({day:h.date},j);delete h.date}if(l==="year"&&K(h.month)){d.set({month:h.month,day:h.date},j);delete h.month;delete h.date}}if(h.sign&&(q=f.ia[h.sign]))o*=q.value;if(K(h.weekday)){d.set({weekday:h.weekday},j);delete h.weekday}h[l]=(h[l]||0)+o}if(h.year_sign===
57
+ "-")h.year*=-1;Ya.slice(1,4).forEach(function(pa,Fa){var xb=h[pa.$],yb=xb%1;if(yb){h[Ya[Fa].$]=O(yb*(pa.$==="second"?1E3:60));h[pa.$]=P(xb)}});return m}});if(i)if(e)d.advance(h);else{h.utc&&d.reset();pb(d,h,j,h.utc,m,c)}else d=a?new t(a):new t;if(h&&h.edge){q=f.ia[h.edge];I(Ya.slice(4),function(C,A){if(K(h[A.$])){l=A.$;return m}});if(l==="year")h.fa="month";else if(l==="month"||l==="week")h.fa="day";d[(q.value<0?"endOf":"beginningOf")+db(l)]();q.value===-2&&d.reset()}B&&B()}return{ea:d,set:h}}
58
+ function qb(a){a.addDays(4-(a.getDay()||7)).reset();return 1+P(a.daysSince(a.clone().beginningOfYear())/7)}function cb(a){var b,c=w.abs(a),d=c,e=0;Ya.slice(1).forEach(function(g,f){b=P(O(c/g.da()*10)/10);if(b>=1){d=b;e=f+1}});return[d,e,a]}
59
+ function rb(a,b,c,d){var e,g=hb(d),f=s(/^[A-Z]/);if(a.isValid())if(Date[b])b=Date[b];else{if(z(b)){e=cb(a.millisecondsFromNow());b=b.apply(a,e.concat(g))}}else return"Invalid Date";if(!b&&c){e=e||cb(a.millisecondsFromNow());if(e[1]===0){e[1]=1;e[0]=1}return g.Da(e)}b=b||"long";b=g[b]||b;$a.forEach(function(i){b=b.replace(s("\\{("+i.ba+")(\\d)?\\}",i.ma?"i":""),function(h,l,n){h=i.format(a,g,n||1,l);n=l.length;var o=l.match(/^(.)\1+$/);if(i.ma){if(n===3)h=h.slice(0,3);if(o||l.match(f))h=db(h)}else if(o&&
60
+ !i.text)h=(D(h)?Q(h,n):h.toString()).slice(-n);return h})});return b}function sb(a,b,c){var d=ob(b),e=0,g=b=0,f;if(c>0){b=g=c;f=j}if(!d.ea.isValid())return m;if(d.set&&d.set.fa){X.forEach(function(h){if(h.$===d.set.fa)e=h.da(d.ea,a-d.ea)-1});c=db(d.set.fa);if(d.set.edge||d.set.shift)d.ea["beginningOf"+c]();if(d.set.fa==="month")i=d.ea.clone()["endOf"+c]().getTime();if(!f&&d.set.sign&&d.set.fa!="millisecond"){b=50;g=-50}}f=a.getTime();c=d.ea.getTime();var i=i||c+e;return f>=c-b&&f<=i+g}
61
+ function pb(a,b,c,d,e,g){function f(n){return K(b[n])?b[n]:b[n+"s"]}var i;if(D(b)&&e)b={milliseconds:b};else if(D(b)){a.setTime(b);return a}if(b.date)b.day=b.date;I(Ya,function(n,o){var q=o.$==="day";if(K(f(o.$))||q&&K(f("weekday"))){b.fa=o.$;return m}else if(c&&o.$!=="week"&&(!q||!K(f("week"))))W(a,"set",d,o.method,q?1:0)});X.forEach(function(n,o){var q=n.$,B=n.method,C=X[o-1],A;A=f(q);if(!L(A)){g&&n.na&&!K(f(C.$))&&W(new t,"get",d,n.method)>=A===(g===1)&&a[C.ja](g);if(e){if(q==="week"){A=(b.day||
62
+ 0)+A*7;B="Date"}A=A*e+W(a,"get",m,B)}else q==="month"&&K(f("day"))&&a.setDate(15);W(a,"set",d,B,A);if(e&&q==="month"){q=A;if(q<0)q+=12;q%12!=a.getMonth()&&a.setDate(0)}}});if(!e&&!K(f("day"))&&K(f("weekday"))){i=f("weekday");var h,l;if(K(g)){h=W(a,"get",d,"Day")-i%7>=0;l=g===1;if(h===l)i+=g*7}W(a,"set",d,"Weekday",i)}return a}function W(a,b,c,d,e){return a[b+(c?"UTC":"")+d](e)}
63
+ function fb(a,b,c){var d={h:0,m:1,s:2},e;b=b||V;return a.replace(/{([a-z])}/g,function(g,f){var i=[],h=f==="h",l=h&&!c;if(f==="t")return b.ampm.join("|");else{h&&i.push(":");if(e=b.timeSuffixes[d[f]])i.push(e+"\\s*");return i.length===0?"":"(?:"+i.join("|")+")"+(l?"":"?")}})}function tb(a,b){var c;c=D(a[1])?jb(a)[0]:a[0];return ob(c,a[1],b).ea}
64
+ t.extend({create:function(){return tb(arguments)},past:function(){return tb(arguments,-1)},future:function(){return tb(arguments,1)},addLocale:function(a,b){return ib(a,b)},setLocale:function(a){var b=hb(a,m);Sa=b;if(a&&a!=b.code)b.code=a;return b},getLocale:function(a){return!a?Sa:hb(a,m)},addFormat:function(a,b,c){gb(hb(c),a,b)}},m,m);
65
+ t.extend({set:function(){var a=jb(arguments);return pb(this,a[0],a[1])},setUTC:function(){var a=jb(arguments);return pb(this,a[0],a[1],j)},setWeekday:function(a){L(a)||this.setDate(this.getDate()+a-this.getDay())},setUTCWeekday:function(a){L(a)||this.setDate(this.getUTCDate()+a-this.getDay())},setWeek:function(a){if(!L(a)){this.setMonth(0);this.setDate(a*7+1)}},setUTCWeek:function(a){if(!L(a)){this.setMonth(0);this.setUTCDate(a*7+1)}},getWeek:function(){return qb(this)},getUTCWeek:function(){return qb(this.toUTC())},
66
+ getUTCOffset:function(a){var b=this.la?0:this.getTimezoneOffset(),c=a===j?":":"";if(!b&&a)return"Z";return Q(O(-b/60),2,j)+c+Q(b%60,2)},toUTC:function(){if(this.la)return this;var a=this.clone().addMinutes(this.getTimezoneOffset());a.la=j;return a},isUTC:function(){return this.la||this.getTimezoneOffset()===0},advance:function(){var a=jb(arguments,j);return pb(this,a[0],a[1],m,1)},rewind:function(){var a=jb(arguments,j);return pb(this,a[0],a[1],m,-1)},isValid:function(){return!isNaN(this.getTime())},
67
+ isAfter:function(a,b){return this.getTime()>t.create(a).getTime()-(b||0)},isBefore:function(a,b){return this.getTime()<t.create(a).getTime()+(b||0)},isBetween:function(a,b,c){var d=this.getTime();a=t.create(a).getTime();var e=t.create(b).getTime();b=w.min(a,e);a=w.max(a,e);c=c||0;return b-c<d&&a+c>d},isLeapYear:function(){var a=this.getFullYear();return a%4===0&&a%100!==0||a%400===0},daysInMonth:function(){return 32-(new t(this.getFullYear(),this.getMonth(),32)).getDate()},format:function(a,b){return rb(this,
68
+ a,m,b)},relative:function(a,b){if(E(a)){b=a;a=k}return rb(this,a,j,b)},is:function(a,b){var c;if(this.isValid()){if(E(a)){a=a.trim().toLowerCase();switch(j){case a==="future":return this.getTime()>(new t).getTime();case a==="past":return this.getTime()<(new t).getTime();case a==="weekday":return this.getDay()>0&&this.getDay()<6;case a==="weekend":return this.getDay()===0||this.getDay()===6;case (c=V.weekdays.indexOf(a)%7)>-1:return this.getDay()===c;case (c=V.months.indexOf(a)%12)>-1:return this.getMonth()===
69
+ c}}return sb(this,a,b)}},reset:function(a){var b={},c;a=a||"hours";if(a==="date")a="days";c=X.some(function(d){return a===d.$||a===d.$+"s"});b[a]=a.match(/^days?/)?1:0;return c?this.set(b,j):this},clone:function(){return new t(this.getTime())}});t.extend({iso:function(){return this.toISOString()},getWeekday:t.prototype.getDay,getUTCWeekday:t.prototype.getUTCDay});
70
+ function ub(a,b){function c(){return O(this*b)}function d(){return tb(arguments)[a.ja](this)}function e(){return tb(arguments)[a.ja](-this)}var g=a.$,f={};f[g]=c;f[g+"s"]=c;f[g+"Before"]=e;f[g+"sBefore"]=e;f[g+"Ago"]=e;f[g+"sAgo"]=e;f[g+"After"]=d;f[g+"sAfter"]=d;f[g+"FromNow"]=d;f[g+"sFromNow"]=d;v.extend(f)}v.extend({duration:function(a){return hb(a).ua(this)}});
71
+ V=Sa=t.addLocale("en",{plural:j,timeMarker:"at",ampm:"am,pm",months:"January,February,March,April,May,June,July,August,September,October,November,December",weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",units:"millisecond:|s,second:|s,minute:|s,hour:|s,day:|s,week:|s,month:|s,year:|s",numbers:"one,two,three,four,five,six,seven,eight,nine,ten",articles:"a,an,the",optionals:"the,st|nd|rd|th,of","short":"{Month} {d}, {yyyy}","long":"{Month} {d}, {yyyy} {h}:{mm}{tt}",full:"{Weekday} {Month} {d}, {yyyy} {h}:{mm}:{ss}{tt}",
72
+ past:"{num} {unit} {sign}",future:"{num} {unit} {sign}",duration:"{num} {unit}",modifiers:[{name:"day",src:"yesterday",value:-1},{name:"day",src:"today",value:0},{name:"day",src:"tomorrow",value:1},{name:"sign",src:"ago|before",value:-1},{name:"sign",src:"from now|after|from|in",value:1},{name:"edge",src:"last day",value:-2},{name:"edge",src:"end",value:-1},{name:"edge",src:"first day|beginning",value:1},{name:"shift",src:"last",value:-1},{name:"shift",src:"the|this",value:0},{name:"shift",src:"next",
73
+ value:1}],dateParse:["{num} {unit} {sign}","{sign} {num} {unit}","{num} {unit=4-5} {sign} {day}","{month} {year}","{shift} {unit=5-7}","{0} {edge} of {shift?} {unit=4-7?}{month?}{year?}"],timeParse:["{0} {num}{1} {day} of {month} {year?}","{weekday?} {month} {date}{1} {year?}","{date} {month} {year}","{shift} {weekday}","{shift} week {weekday}","{weekday} {2} {shift} week","{0} {date}{1} of {month}","{0}{month?} {date?}{1} of {shift} {unit=6-7}"]});Ya=X.concat().reverse();Xa=X.concat();
74
+ Xa.splice(2,1);
75
+ J(t,j,m,X,function(a,b,c){var d=b.$,e=db(d),g=b.da(),f,i;b.ja="add"+e+"s";f=function(h,l){return O((this.getTime()-t.create(h,l).getTime())/g)};i=function(h,l){return O((t.create(h,l).getTime()-this.getTime())/g)};a[d+"sAgo"]=i;a[d+"sUntil"]=i;a[d+"sSince"]=f;a[d+"sFromNow"]=f;a[b.ja]=function(h,l){var n={};n[d]=h;return this.advance(n,l)};ub(b,g);c<3&&["Last","This","Next"].forEach(function(h){a["is"+h+e]=function(){return this.is(h+" "+d)}});if(c<4){a["beginningOf"+e]=function(){var h={};switch(d){case "year":h.year=
76
+ this.getFullYear();break;case "month":h.month=this.getMonth();break;case "day":h.day=this.getDate();break;case "week":h.weekday=0}return this.set(h,j)};a["endOf"+e]=function(){var h={hours:23,minutes:59,seconds:59,milliseconds:999};switch(d){case "year":h.month=11;h.day=31;break;case "month":h.day=this.daysInMonth();break;case "week":h.weekday=6}return this.set(h,j)}}});V.addFormat("([+-])?(\\d{4,4})[-.]?{full_month}[-.]?(\\d{1,2})?",j,["year_sign","year","month","date"],m,j);
77
+ V.addFormat("(\\d{1,2})[-.\\/]{full_month}(?:[-.\\/](\\d{2,4}))?",j,["date","month","year"],j);V.addFormat("{full_month}[-.](\\d{4,4})",m,["month","year"]);V.addFormat("\\/Date\\((\\d+(?:\\+\\d{4,4})?)\\)\\/",m,["timestamp"]);V.addFormat(fb(Ua,V),m,Ta);Za=V.ha.slice(0,7).reverse();V.ha=V.ha.slice(7).concat(Za);J(t,j,m,"short,long,full",function(a,b){a[b]=function(c){return rb(this,b,m,c)}});
78
+ "\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341\u767e\u5343\u4e07".split("").forEach(function(a,b){if(b>9)b=w.pow(10,b-9);Va[a]=b});"\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19".split("").forEach(function(a,b){Va[a]=b});Wa=s("([\u671f\u9031\u5468])?([\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d\u5341\u767e\u5343\u4e07\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19]+)(?!\u6628)","g");
79
+ (function(){var a="today,yesterday,tomorrow,weekday,weekend,future,past".split(","),b=V.weekdays.slice(0,7),c=V.months.slice(0,12);J(t,j,m,a.concat(b).concat(c),function(d,e){d["is"+db(e)]=function(){return this.is(e)}})})();t.extend({RFC1123:"{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {tz}",RFC1036:"{Weekday}, {dd}-{Mon}-{yy} {HH}:{mm}:{ss} {tz}",ISO8601_DATE:"{yyyy}-{MM}-{dd}",ISO8601_DATETIME:"{yyyy}-{MM}-{dd}T{HH}:{mm}:{ss}.{fff}{isotz}"},m,m);
80
+ function vb(a,b){this.start=t.create(a);this.end=t.create(b)}vb.prototype.toString=function(){return this.isValid()?this.start.full()+".."+this.end.full():"Invalid DateRange"};
81
+ G(vb,j,m,{isValid:function(){return this.start<this.end},duration:function(){return this.isValid()?this.end.getTime()-this.start.getTime():NaN},contains:function(a){var b=this;return(a.start&&a.end?[a.start,a.end]:[a]).every(function(c){return c>=b.start&&c<=b.end})},every:function(a,b){var c=this.start.clone(),d=[],e=0,g;if(E(a)){c.advance(kb(a,0),j);g=kb(a)}else g={milliseconds:a};for(;c<=this.end;){d.push(c);b&&b(c,e);c=c.clone().advance(g,j);e++}return d},union:function(a){return new vb(this.start<
82
+ a.start?this.start:a.start,this.end>a.end?this.end:a.end)},intersect:function(a){return new vb(this.start>a.start?this.start:a.start,this.end<a.end?this.end:a.end)}});J(vb,j,m,"Millisecond,Second,Minute,Hour,Day,Week,Month,Year",function(a,b){a["each"+b]=function(c){return this.every(b,c)}});G(t,m,m,{range:function(a,b){return new vb(a,b)}});
83
+ function wb(a,b,c,d,e){if(!a.ga)a.ga=[];D(b)||(b=0);a.ga.push(setTimeout(function(){a.ga.splice(g,1);c.apply(d,e||[])},b));var g=a.ga.length}
84
+ G(Function,j,m,{lazy:function(a,b){function c(){if(!(g&&e.length>b-2)){e.push([this,arguments]);f()}}var d=this,e=[],g=m,f,i,h;a=a||1;b=b||Infinity;i=O(a,void 0,"ceil");h=O(i/a);f=function(){if(!(g||e.length==0)){for(var l=w.max(e.length-h,0);e.length>l;)Function.prototype.apply.apply(d,e.shift());wb(c,i,function(){g=m;f()});g=j}};return c},delay:function(a){var b=H(arguments).slice(1);wb(this,a,this,this,b);return this},throttle:function(a){return this.lazy(a,1)},debounce:function(a){var b=this;
85
+ return function(){b.cancel();wb(b,a,b,this,arguments)}},cancel:function(){if(da(this.ga))for(;this.ga.length>0;)clearTimeout(this.ga.shift());return this},after:function(a){var b=this,c=0,d=[];if(D(a)){if(a===0){b.call();return b}}else a=1;return function(){var e;d.push(H(arguments));c++;if(c==a){e=b.call(this,d);c=0;d=[];return e}}},once:function(){var a=this;return function(){return ma(a,"memo")?a.memo:a.memo=a.apply(this,arguments)}},fill:function(){var a=this,b=H(arguments);return function(){var c=
86
+ H(arguments);b.forEach(function(d,e){if(d!=k||e>=c.length)c.splice(e,0,d)});return a.apply(this,c)}}});
87
+ function zb(a,b,c,d,e,g){var f=a.toFixed(20),i=f.search(/\./);f=f.search(/[1-9]/);i=i-f;if(i>0)i-=1;e=w.max(w.min((i/3).floor(),e===m?c.length:e),-d);d=c.charAt(e+d-1);if(i<-9){e=-3;b=i.abs()-9;d=c.slice(0,1)}return(a/(g?(2).pow(10*e):(10).pow(e*3))).round(b||0).format()+d.trim()}
88
+ G(v,m,m,{random:function(a,b){var c,d;if(arguments.length==1){b=a;a=0}c=w.min(a||0,L(b)?1:b);d=w.max(a||0,L(b)?1:b);return O(w.random()*(d-c)+c)}});
89
+ G(v,j,m,{log:function(a){return w.log(this)/(a?w.log(a):1)},abbr:function(a){return zb(this,a,"kmbt",0,4)},metric:function(a,b){return zb(this,a,"n\u03bcm kMGTPE",4,L(b)?1:b)},bytes:function(a,b){return zb(this,a,"kMGTPE",0,L(b)?4:b,j)+"B"},isInteger:function(){return this%1==0},isOdd:function(){return!this.isMultipleOf(2)},isEven:function(){return this.isMultipleOf(2)},isMultipleOf:function(a){return this%a===0},format:function(a,b,c){var d,e,g=/(\d+)(\d{3})/;if(u(b).match(/\d/))throw new TypeError("Thousands separator cannot contain numbers.");
90
+ d=D(a)?O(this,a||0).toFixed(w.max(a,0)):this.toString();b=b||",";c=c||".";e=d.split(".");d=e[0];for(e=e[1]||"";d.match(g);)d=d.replace(g,"$1"+b+"$2");if(e.length>0)d+=c+oa((a||0)-e.length,"0")+e;return d},hex:function(a){return this.pad(a||1,m,16)},upto:function(a,b,c){return N(this,a,b,c||1)},downto:function(a,b,c){return N(this,a,b,-(c||1))},times:function(a){if(a)for(var b=0;b<this;b++)a.call(this,b);return this.toNumber()},chr:function(){return u.fromCharCode(this)},pad:function(a,b,c){return Q(this,
91
+ a,b,c)},ordinalize:function(){var a=this.abs();a=parseInt(a.toString().slice(-2));return this+qa(a)},toNumber:function(){return parseFloat(this,10)}});J(v,j,m,"round,floor,ceil",function(a,b){a[b]=function(c){return O(this,c,b)}});J(v,j,m,"abs,pow,sin,asin,cos,acos,tan,atan,exp,pow,sqrt",function(a,b){a[b]=function(c,d){return w[b](this,c,d)}});
92
+ var Ab="isObject,isNaN".split(","),Bb="keys,values,each,merge,clone,equal,watch,tap,has".split(",");
93
+ function Cb(a,b,c,d){var e=/^(.+?)(\[.*\])$/,g,f,i;if(d!==m&&(f=b.match(e))){i=f[1];b=f[2].replace(/^\[|\]$/g,"").split("][");b.forEach(function(h){g=!h||h.match(/^\d+$/);if(!i&&da(a))i=a.length;a[i]||(a[i]=g?[]:{});a=a[i];i=h});if(!i&&g)i=a.length.toString();Cb(a,i,c)}else a[b]=c.match(/^[\d.]+$/)?parseFloat(c):c==="true"?j:c==="false"?m:c}G(p,m,j,{watch:function(a,b,c){if(ca){var d=a[b];p.defineProperty(a,b,{enumerable:j,configurable:j,get:function(){return d},set:function(e){d=c.call(a,b,d,e)}})}}});
94
+ G(p,m,function(a,b){return z(b)},{keys:function(a,b){var c=p.keys(a);c.forEach(function(d){b.call(a,d,a[d])});return c}});
95
+ G(p,m,m,{isObject:function(a){return la(a)},isNaN:function(a){return D(a)&&a.valueOf()!==a.valueOf()},equal:function(a,b){return S(a)===S(b)},extended:function(a){return new M(a)},merge:function(a,b,c,d){var e,g;if(a&&typeof b!="string")for(e in b)if(ma(b,e)&&a){g=b[e];if(K(a[e])){if(d===m)continue;if(z(d))g=d.call(b,e,a[e],b[e])}if(c===j&&g&&ka(g))if(fa(g))g=new t(g.getTime());else if(F(g))g=new s(g.source,sa(g));else{a[e]||(a[e]=r.isArray(g)?[]:{});p.merge(a[e],b[e],c,d);continue}a[e]=g}return a},
96
+ values:function(a,b){var c=[];I(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},clone:function(a,b){if(!ka(a))return a;if(r.isArray(a))return a.concat();var c=a instanceof M?new M:{};return p.merge(c,a,b)},fromQueryString:function(a,b){var c=p.extended();a=a&&a.toString?a.toString():"";decodeURIComponent(a.replace(/^.*?\?/,"")).split("&").forEach(function(d){d=d.split("=");d.length===2&&Cb(c,d[0],d[1],b)});return c},tap:function(a,b){var c=b;z(b)||(c=function(){b&&a[b]()});c.call(a,a);return a},
97
+ has:function(a,b){return ma(a,b)}});J(p,m,m,x,function(a,b){var c="is"+b;Ab.push(c);a[c]=function(d){return ga(d,b)}});(function(){G(p,m,function(){return arguments.length===0},{extend:function(){ua(Ab.concat(Bb),p)}})})();ua(Bb,M);
98
+ G(s,m,m,{escape:function(a){return R(a)}});
99
+ G(s,j,m,{getFlags:function(){return sa(this)},setFlags:function(a){return s(this.source,a)},addFlag:function(a){return this.setFlags(sa(this,a))},removeFlag:function(a){return this.setFlags(sa(this).replace(a,""))}});
100
+ var Db,Eb;
101
+ G(u,j,m,{escapeRegExp:function(){return R(this)},escapeURL:function(a){return a?encodeURIComponent(this):encodeURI(this)},unescapeURL:function(a){return a?decodeURI(this):decodeURIComponent(this)},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},encodeBase64:function(){return Db(this)},decodeBase64:function(){return Eb(this)},each:function(a,b){var c,
102
+ d;if(z(a)){b=a;a=/[\s\S]/g}else if(a)if(E(a))a=s(R(a),"gi");else{if(F(a))a=s(a.source,sa(a,"g"))}else a=/[\s\S]/g;c=this.match(a)||[];if(b)for(d=0;d<c.length;d++)c[d]=b.call(this,c[d],d,c)||c[d];return c},shift:function(a){var b="";a=a||0;this.codes(function(c){b+=u.fromCharCode(c+a)});return b},codes:function(a){for(var b=[],c=0;c<this.length;c++){var d=this.charCodeAt(c);b.push(d);a&&a.call(this,d,c)}return b},chars:function(a){return this.each(a)},words:function(a){return this.trim().each(/\S+/g,
103
+ a)},lines:function(a){return this.trim().each(/^.*$/gm,a)},paragraphs:function(a){var b=this.trim().split(/[\r\n]{2,}/);return b=b.map(function(c){if(a)var d=a.call(c);return d?d:c})},startsWith:function(a,b){if(L(b))b=j;var c=F(a)?a.source.replace("^",""):R(a);return s("^"+c,b?"":"i").test(this)},endsWith:function(a,b){if(L(b))b=j;var c=F(a)?a.source.replace("$",""):R(a);return s(c+"$",b?"":"i").test(this)},isBlank:function(){return this.trim().length===0},has:function(a){return this.search(F(a)?
104
+ a:R(a))!==-1},add:function(a,b){b=L(b)?this.length:b;return this.slice(0,b)+a+this.slice(b)},remove:function(a){return this.replace(a,"")},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.trim().replace(/([\r\n\s\u3000])+/g,function(a,b){return b==="\u3000"?b:" "})},at:function(){return ta(this,arguments,j)},from:function(a){return this.slice(a)},to:function(a){if(L(a))a=this.length;return this.slice(0,a)},dasherize:function(){return this.underscore().replace(/_/g,
105
+ "-")},underscore:function(){return this.replace(/[-\s]+/g,"_").replace(u.Inflector&&u.Inflector.acronymRegExp,function(a,b){return(b>0?"_":"")+a.toLowerCase()}).replace(/([A-Z\d]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase()},camelize:function(a){return this.underscore().replace(/(^|_)([^_]+)/g,function(b,c,d,e){b=d;b=(c=u.Inflector)&&c.acronyms[b];b=E(b)?b:void 0;e=a!==m||e>0;if(b)return e?b:b.toLowerCase();return e?d.capitalize():d})},spacify:function(){return this.underscore().replace(/_/g,
106
+ " ")},stripTags:function(){var a=this;H(arguments.length>0?arguments:[""],function(b){a=a.replace(s("</?"+R(b)+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;H(arguments.length>0?arguments:["\\S+"],function(b){b=s("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi");a=a.replace(b,"")});return a},truncate:function(a,b,c,d){var e="",g="",f=this.toString(),i="["+ra()+"]+",h="[^"+ra()+"]*",l=s(i+h+"$");d=L(d)?"...":u(d);if(f.length<=a)return f;switch(c){case "left":a=f.length-a;e=d;f=f.slice(a);
107
+ l=s("^"+h+i);break;case "middle":a=P(a/2);g=d+f.slice(f.length-a).trimLeft();f=f.slice(0,a);break;default:a=a;g=d;f=f.slice(0,a)}if(b===m&&this.slice(a,a+1).match(/\S/))f=f.remove(l);return e+f+g},pad:function(a,b){return oa(b,a)+this+oa(b,a)},padLeft:function(a,b){return oa(b,a)+this},padRight:function(a,b){return this+oa(b,a)},first:function(a){if(L(a))a=1;return this.substr(0,a)},last:function(a){if(L(a))a=1;return this.substr(this.length-a<0?0:this.length-a)},repeat:function(a){var b="",c=0;if(D(a)&&
108
+ a>0)for(;c<a;){b+=this;c++}return b},toNumber:function(a){var b=this.replace(/,/g,"");return b.match(/\./)?parseFloat(b):parseInt(b,a||10)},capitalize:function(a){var b;return this.toLowerCase().replace(a?/[\s\S]/g:/^\S/,function(c){var d=c.toUpperCase(),e;e=b?c:d;b=d!==c;return e})},assign:function(){var a={};H(arguments,function(b,c){if(la(b))na(a,b);else a[c+1]=b});return this.replace(/\{([^{]+?)\}/g,function(b,c){return ma(a,c)?a[c]:b})},namespace:function(a){a=a||ba;I(this.split("."),function(b,
109
+ c){return!!(a=a[c])});return a}});G(u,j,m,{insert:u.prototype.add});
110
+ (function(a){if(this.btoa){Db=this.btoa;Eb=this.atob}else{var b=/[^A-Za-z0-9\+\/\=]/g;Db=function(c){var d="",e,g,f,i,h,l,n=0;do{e=c.charCodeAt(n++);g=c.charCodeAt(n++);f=c.charCodeAt(n++);i=e>>2;e=(e&3)<<4|g>>4;h=(g&15)<<2|f>>6;l=f&63;if(isNaN(g))h=l=64;else if(isNaN(f))l=64;d=d+a.charAt(i)+a.charAt(e)+a.charAt(h)+a.charAt(l)}while(n<c.length);return d};Eb=function(c){var d="",e,g,f,i,h,l=0;if(c.match(b))throw Error("String contains invalid base64 characters");c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");
111
+ do{e=a.indexOf(c.charAt(l++));g=a.indexOf(c.charAt(l++));i=a.indexOf(c.charAt(l++));h=a.indexOf(c.charAt(l++));e=e<<2|g>>4;g=(g&15)<<4|i>>2;f=(i&3)<<6|h;d+=u.fromCharCode(e);if(i!=64)d+=u.fromCharCode(g);if(h!=64)d+=u.fromCharCode(f)}while(l<c.length);return d}}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");})();
@@ -0,0 +1,1059 @@
1
+ // Underscore.js 1.3.3
2
+ // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
3
+ // Underscore is freely distributable under the MIT license.
4
+ // Portions of Underscore are inspired or borrowed from Prototype,
5
+ // Oliver Steele's Functional, and John Resig's Micro-Templating.
6
+ // For all details and documentation:
7
+ // http://documentcloud.github.com/underscore
8
+
9
+ (function() {
10
+
11
+ // Baseline setup
12
+ // --------------
13
+
14
+ // Establish the root object, `window` in the browser, or `global` on the server.
15
+ var root = this;
16
+
17
+ // Save the previous value of the `_` variable.
18
+ var previousUnderscore = root._;
19
+
20
+ // Establish the object that gets returned to break out of a loop iteration.
21
+ var breaker = {};
22
+
23
+ // Save bytes in the minified (but not gzipped) version:
24
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
25
+
26
+ // Create quick reference variables for speed access to core prototypes.
27
+ var slice = ArrayProto.slice,
28
+ unshift = ArrayProto.unshift,
29
+ toString = ObjProto.toString,
30
+ hasOwnProperty = ObjProto.hasOwnProperty;
31
+
32
+ // All **ECMAScript 5** native function implementations that we hope to use
33
+ // are declared here.
34
+ var
35
+ nativeForEach = ArrayProto.forEach,
36
+ nativeMap = ArrayProto.map,
37
+ nativeReduce = ArrayProto.reduce,
38
+ nativeReduceRight = ArrayProto.reduceRight,
39
+ nativeFilter = ArrayProto.filter,
40
+ nativeEvery = ArrayProto.every,
41
+ nativeSome = ArrayProto.some,
42
+ nativeIndexOf = ArrayProto.indexOf,
43
+ nativeLastIndexOf = ArrayProto.lastIndexOf,
44
+ nativeIsArray = Array.isArray,
45
+ nativeKeys = Object.keys,
46
+ nativeBind = FuncProto.bind;
47
+
48
+ // Create a safe reference to the Underscore object for use below.
49
+ var _ = function(obj) { return new wrapper(obj); };
50
+
51
+ // Export the Underscore object for **Node.js**, with
52
+ // backwards-compatibility for the old `require()` API. If we're in
53
+ // the browser, add `_` as a global object via a string identifier,
54
+ // for Closure Compiler "advanced" mode.
55
+ if (typeof exports !== 'undefined') {
56
+ if (typeof module !== 'undefined' && module.exports) {
57
+ exports = module.exports = _;
58
+ }
59
+ exports._ = _;
60
+ } else {
61
+ root['_'] = _;
62
+ }
63
+
64
+ // Current version.
65
+ _.VERSION = '1.3.3';
66
+
67
+ // Collection Functions
68
+ // --------------------
69
+
70
+ // The cornerstone, an `each` implementation, aka `forEach`.
71
+ // Handles objects with the built-in `forEach`, arrays, and raw objects.
72
+ // Delegates to **ECMAScript 5**'s native `forEach` if available.
73
+ var each = _.each = _.forEach = function(obj, iterator, context) {
74
+ if (obj == null) return;
75
+ if (nativeForEach && obj.forEach === nativeForEach) {
76
+ obj.forEach(iterator, context);
77
+ } else if (obj.length === +obj.length) {
78
+ for (var i = 0, l = obj.length; i < l; i++) {
79
+ if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
80
+ }
81
+ } else {
82
+ for (var key in obj) {
83
+ if (_.has(obj, key)) {
84
+ if (iterator.call(context, obj[key], key, obj) === breaker) return;
85
+ }
86
+ }
87
+ }
88
+ };
89
+
90
+ // Return the results of applying the iterator to each element.
91
+ // Delegates to **ECMAScript 5**'s native `map` if available.
92
+ _.map = _.collect = function(obj, iterator, context) {
93
+ var results = [];
94
+ if (obj == null) return results;
95
+ if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
96
+ each(obj, function(value, index, list) {
97
+ results[results.length] = iterator.call(context, value, index, list);
98
+ });
99
+ if (obj.length === +obj.length) results.length = obj.length;
100
+ return results;
101
+ };
102
+
103
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
104
+ // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
105
+ _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
106
+ var initial = arguments.length > 2;
107
+ if (obj == null) obj = [];
108
+ if (nativeReduce && obj.reduce === nativeReduce) {
109
+ if (context) iterator = _.bind(iterator, context);
110
+ return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
111
+ }
112
+ each(obj, function(value, index, list) {
113
+ if (!initial) {
114
+ memo = value;
115
+ initial = true;
116
+ } else {
117
+ memo = iterator.call(context, memo, value, index, list);
118
+ }
119
+ });
120
+ if (!initial) throw new TypeError('Reduce of empty array with no initial value');
121
+ return memo;
122
+ };
123
+
124
+ // The right-associative version of reduce, also known as `foldr`.
125
+ // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
126
+ _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
127
+ var initial = arguments.length > 2;
128
+ if (obj == null) obj = [];
129
+ if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
130
+ if (context) iterator = _.bind(iterator, context);
131
+ return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
132
+ }
133
+ var reversed = _.toArray(obj).reverse();
134
+ if (context && !initial) iterator = _.bind(iterator, context);
135
+ return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator);
136
+ };
137
+
138
+ // Return the first value which passes a truth test. Aliased as `detect`.
139
+ _.find = _.detect = function(obj, iterator, context) {
140
+ var result;
141
+ any(obj, function(value, index, list) {
142
+ if (iterator.call(context, value, index, list)) {
143
+ result = value;
144
+ return true;
145
+ }
146
+ });
147
+ return result;
148
+ };
149
+
150
+ // Return all the elements that pass a truth test.
151
+ // Delegates to **ECMAScript 5**'s native `filter` if available.
152
+ // Aliased as `select`.
153
+ _.filter = _.select = function(obj, iterator, context) {
154
+ var results = [];
155
+ if (obj == null) return results;
156
+ if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
157
+ each(obj, function(value, index, list) {
158
+ if (iterator.call(context, value, index, list)) results[results.length] = value;
159
+ });
160
+ return results;
161
+ };
162
+
163
+ // Return all the elements for which a truth test fails.
164
+ _.reject = function(obj, iterator, context) {
165
+ var results = [];
166
+ if (obj == null) return results;
167
+ each(obj, function(value, index, list) {
168
+ if (!iterator.call(context, value, index, list)) results[results.length] = value;
169
+ });
170
+ return results;
171
+ };
172
+
173
+ // Determine whether all of the elements match a truth test.
174
+ // Delegates to **ECMAScript 5**'s native `every` if available.
175
+ // Aliased as `all`.
176
+ _.every = _.all = function(obj, iterator, context) {
177
+ var result = true;
178
+ if (obj == null) return result;
179
+ if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
180
+ each(obj, function(value, index, list) {
181
+ if (!(result = result && iterator.call(context, value, index, list))) return breaker;
182
+ });
183
+ return !!result;
184
+ };
185
+
186
+ // Determine if at least one element in the object matches a truth test.
187
+ // Delegates to **ECMAScript 5**'s native `some` if available.
188
+ // Aliased as `any`.
189
+ var any = _.some = _.any = function(obj, iterator, context) {
190
+ iterator || (iterator = _.identity);
191
+ var result = false;
192
+ if (obj == null) return result;
193
+ if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
194
+ each(obj, function(value, index, list) {
195
+ if (result || (result = iterator.call(context, value, index, list))) return breaker;
196
+ });
197
+ return !!result;
198
+ };
199
+
200
+ // Determine if a given value is included in the array or object using `===`.
201
+ // Aliased as `contains`.
202
+ _.include = _.contains = function(obj, target) {
203
+ var found = false;
204
+ if (obj == null) return found;
205
+ if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
206
+ found = any(obj, function(value) {
207
+ return value === target;
208
+ });
209
+ return found;
210
+ };
211
+
212
+ // Invoke a method (with arguments) on every item in a collection.
213
+ _.invoke = function(obj, method) {
214
+ var args = slice.call(arguments, 2);
215
+ return _.map(obj, function(value) {
216
+ return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
217
+ });
218
+ };
219
+
220
+ // Convenience version of a common use case of `map`: fetching a property.
221
+ _.pluck = function(obj, key) {
222
+ return _.map(obj, function(value){ return value[key]; });
223
+ };
224
+
225
+ // Return the maximum element or (element-based computation).
226
+ _.max = function(obj, iterator, context) {
227
+ if (!iterator && _.isArray(obj) && obj[0] === +obj[0]) return Math.max.apply(Math, obj);
228
+ if (!iterator && _.isEmpty(obj)) return -Infinity;
229
+ var result = {computed : -Infinity};
230
+ each(obj, function(value, index, list) {
231
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
232
+ computed >= result.computed && (result = {value : value, computed : computed});
233
+ });
234
+ return result.value;
235
+ };
236
+
237
+ // Return the minimum element (or element-based computation).
238
+ _.min = function(obj, iterator, context) {
239
+ if (!iterator && _.isArray(obj) && obj[0] === +obj[0]) return Math.min.apply(Math, obj);
240
+ if (!iterator && _.isEmpty(obj)) return Infinity;
241
+ var result = {computed : Infinity};
242
+ each(obj, function(value, index, list) {
243
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
244
+ computed < result.computed && (result = {value : value, computed : computed});
245
+ });
246
+ return result.value;
247
+ };
248
+
249
+ // Shuffle an array.
250
+ _.shuffle = function(obj) {
251
+ var shuffled = [], rand;
252
+ each(obj, function(value, index, list) {
253
+ rand = Math.floor(Math.random() * (index + 1));
254
+ shuffled[index] = shuffled[rand];
255
+ shuffled[rand] = value;
256
+ });
257
+ return shuffled;
258
+ };
259
+
260
+ // Sort the object's values by a criterion produced by an iterator.
261
+ _.sortBy = function(obj, val, context) {
262
+ var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
263
+ return _.pluck(_.map(obj, function(value, index, list) {
264
+ return {
265
+ value : value,
266
+ criteria : iterator.call(context, value, index, list)
267
+ };
268
+ }).sort(function(left, right) {
269
+ var a = left.criteria, b = right.criteria;
270
+ if (a === void 0) return 1;
271
+ if (b === void 0) return -1;
272
+ return a < b ? -1 : a > b ? 1 : 0;
273
+ }), 'value');
274
+ };
275
+
276
+ // Groups the object's values by a criterion. Pass either a string attribute
277
+ // to group by, or a function that returns the criterion.
278
+ _.groupBy = function(obj, val) {
279
+ var result = {};
280
+ var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
281
+ each(obj, function(value, index) {
282
+ var key = iterator(value, index);
283
+ (result[key] || (result[key] = [])).push(value);
284
+ });
285
+ return result;
286
+ };
287
+
288
+ // Use a comparator function to figure out at what index an object should
289
+ // be inserted so as to maintain order. Uses binary search.
290
+ _.sortedIndex = function(array, obj, iterator) {
291
+ iterator || (iterator = _.identity);
292
+ var low = 0, high = array.length;
293
+ while (low < high) {
294
+ var mid = (low + high) >> 1;
295
+ iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
296
+ }
297
+ return low;
298
+ };
299
+
300
+ // Safely convert anything iterable into a real, live array.
301
+ _.toArray = function(obj) {
302
+ if (!obj) return [];
303
+ if (_.isArray(obj)) return slice.call(obj);
304
+ if (_.isArguments(obj)) return slice.call(obj);
305
+ if (obj.toArray && _.isFunction(obj.toArray)) return obj.toArray();
306
+ return _.values(obj);
307
+ };
308
+
309
+ // Return the number of elements in an object.
310
+ _.size = function(obj) {
311
+ return _.isArray(obj) ? obj.length : _.keys(obj).length;
312
+ };
313
+
314
+ // Array Functions
315
+ // ---------------
316
+
317
+ // Get the first element of an array. Passing **n** will return the first N
318
+ // values in the array. Aliased as `head` and `take`. The **guard** check
319
+ // allows it to work with `_.map`.
320
+ _.first = _.head = _.take = function(array, n, guard) {
321
+ return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
322
+ };
323
+
324
+ // Returns everything but the last entry of the array. Especcialy useful on
325
+ // the arguments object. Passing **n** will return all the values in
326
+ // the array, excluding the last N. The **guard** check allows it to work with
327
+ // `_.map`.
328
+ _.initial = function(array, n, guard) {
329
+ return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
330
+ };
331
+
332
+ // Get the last element of an array. Passing **n** will return the last N
333
+ // values in the array. The **guard** check allows it to work with `_.map`.
334
+ _.last = function(array, n, guard) {
335
+ if ((n != null) && !guard) {
336
+ return slice.call(array, Math.max(array.length - n, 0));
337
+ } else {
338
+ return array[array.length - 1];
339
+ }
340
+ };
341
+
342
+ // Returns everything but the first entry of the array. Aliased as `tail`.
343
+ // Especially useful on the arguments object. Passing an **index** will return
344
+ // the rest of the values in the array from that index onward. The **guard**
345
+ // check allows it to work with `_.map`.
346
+ _.rest = _.tail = function(array, index, guard) {
347
+ return slice.call(array, (index == null) || guard ? 1 : index);
348
+ };
349
+
350
+ // Trim out all falsy values from an array.
351
+ _.compact = function(array) {
352
+ return _.filter(array, function(value){ return !!value; });
353
+ };
354
+
355
+ // Return a completely flattened version of an array.
356
+ _.flatten = function(array, shallow) {
357
+ return _.reduce(array, function(memo, value) {
358
+ if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
359
+ memo[memo.length] = value;
360
+ return memo;
361
+ }, []);
362
+ };
363
+
364
+ // Return a version of the array that does not contain the specified value(s).
365
+ _.without = function(array) {
366
+ return _.difference(array, slice.call(arguments, 1));
367
+ };
368
+
369
+ // Produce a duplicate-free version of the array. If the array has already
370
+ // been sorted, you have the option of using a faster algorithm.
371
+ // Aliased as `unique`.
372
+ _.uniq = _.unique = function(array, isSorted, iterator) {
373
+ var initial = iterator ? _.map(array, iterator) : array;
374
+ var results = [];
375
+ // The `isSorted` flag is irrelevant if the array only contains two elements.
376
+ if (array.length < 3) isSorted = true;
377
+ _.reduce(initial, function (memo, value, index) {
378
+ if (isSorted ? _.last(memo) !== value || !memo.length : !_.include(memo, value)) {
379
+ memo.push(value);
380
+ results.push(array[index]);
381
+ }
382
+ return memo;
383
+ }, []);
384
+ return results;
385
+ };
386
+
387
+ // Produce an array that contains the union: each distinct element from all of
388
+ // the passed-in arrays.
389
+ _.union = function() {
390
+ return _.uniq(_.flatten(arguments, true));
391
+ };
392
+
393
+ // Produce an array that contains every item shared between all the
394
+ // passed-in arrays. (Aliased as "intersect" for back-compat.)
395
+ _.intersection = _.intersect = function(array) {
396
+ var rest = slice.call(arguments, 1);
397
+ return _.filter(_.uniq(array), function(item) {
398
+ return _.every(rest, function(other) {
399
+ return _.indexOf(other, item) >= 0;
400
+ });
401
+ });
402
+ };
403
+
404
+ // Take the difference between one array and a number of other arrays.
405
+ // Only the elements present in just the first array will remain.
406
+ _.difference = function(array) {
407
+ var rest = _.flatten(slice.call(arguments, 1), true);
408
+ return _.filter(array, function(value){ return !_.include(rest, value); });
409
+ };
410
+
411
+ // Zip together multiple lists into a single array -- elements that share
412
+ // an index go together.
413
+ _.zip = function() {
414
+ var args = slice.call(arguments);
415
+ var length = _.max(_.pluck(args, 'length'));
416
+ var results = new Array(length);
417
+ for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
418
+ return results;
419
+ };
420
+
421
+ // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
422
+ // we need this function. Return the position of the first occurrence of an
423
+ // item in an array, or -1 if the item is not included in the array.
424
+ // Delegates to **ECMAScript 5**'s native `indexOf` if available.
425
+ // If the array is large and already in sort order, pass `true`
426
+ // for **isSorted** to use binary search.
427
+ _.indexOf = function(array, item, isSorted) {
428
+ if (array == null) return -1;
429
+ var i, l;
430
+ if (isSorted) {
431
+ i = _.sortedIndex(array, item);
432
+ return array[i] === item ? i : -1;
433
+ }
434
+ if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
435
+ for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i;
436
+ return -1;
437
+ };
438
+
439
+ // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
440
+ _.lastIndexOf = function(array, item) {
441
+ if (array == null) return -1;
442
+ if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
443
+ var i = array.length;
444
+ while (i--) if (i in array && array[i] === item) return i;
445
+ return -1;
446
+ };
447
+
448
+ // Generate an integer Array containing an arithmetic progression. A port of
449
+ // the native Python `range()` function. See
450
+ // [the Python documentation](http://docs.python.org/library/functions.html#range).
451
+ _.range = function(start, stop, step) {
452
+ if (arguments.length <= 1) {
453
+ stop = start || 0;
454
+ start = 0;
455
+ }
456
+ step = arguments[2] || 1;
457
+
458
+ var len = Math.max(Math.ceil((stop - start) / step), 0);
459
+ var idx = 0;
460
+ var range = new Array(len);
461
+
462
+ while(idx < len) {
463
+ range[idx++] = start;
464
+ start += step;
465
+ }
466
+
467
+ return range;
468
+ };
469
+
470
+ // Function (ahem) Functions
471
+ // ------------------
472
+
473
+ // Reusable constructor function for prototype setting.
474
+ var ctor = function(){};
475
+
476
+ // Create a function bound to a given object (assigning `this`, and arguments,
477
+ // optionally). Binding with arguments is also known as `curry`.
478
+ // Delegates to **ECMAScript 5**'s native `Function.bind` if available.
479
+ // We check for `func.bind` first, to fail fast when `func` is undefined.
480
+ _.bind = function bind(func, context) {
481
+ var bound, args;
482
+ if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
483
+ if (!_.isFunction(func)) throw new TypeError;
484
+ args = slice.call(arguments, 2);
485
+ return bound = function() {
486
+ if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
487
+ ctor.prototype = func.prototype;
488
+ var self = new ctor;
489
+ var result = func.apply(self, args.concat(slice.call(arguments)));
490
+ if (Object(result) === result) return result;
491
+ return self;
492
+ };
493
+ };
494
+
495
+ // Bind all of an object's methods to that object. Useful for ensuring that
496
+ // all callbacks defined on an object belong to it.
497
+ _.bindAll = function(obj) {
498
+ var funcs = slice.call(arguments, 1);
499
+ if (funcs.length == 0) funcs = _.functions(obj);
500
+ each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
501
+ return obj;
502
+ };
503
+
504
+ // Memoize an expensive function by storing its results.
505
+ _.memoize = function(func, hasher) {
506
+ var memo = {};
507
+ hasher || (hasher = _.identity);
508
+ return function() {
509
+ var key = hasher.apply(this, arguments);
510
+ return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
511
+ };
512
+ };
513
+
514
+ // Delays a function for the given number of milliseconds, and then calls
515
+ // it with the arguments supplied.
516
+ _.delay = function(func, wait) {
517
+ var args = slice.call(arguments, 2);
518
+ return setTimeout(function(){ return func.apply(null, args); }, wait);
519
+ };
520
+
521
+ // Defers a function, scheduling it to run after the current call stack has
522
+ // cleared.
523
+ _.defer = function(func) {
524
+ return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
525
+ };
526
+
527
+ // Returns a function, that, when invoked, will only be triggered at most once
528
+ // during a given window of time.
529
+ _.throttle = function(func, wait) {
530
+ var context, args, timeout, throttling, more, result;
531
+ var whenDone = _.debounce(function(){ more = throttling = false; }, wait);
532
+ return function() {
533
+ context = this; args = arguments;
534
+ var later = function() {
535
+ timeout = null;
536
+ if (more) func.apply(context, args);
537
+ whenDone();
538
+ };
539
+ if (!timeout) timeout = setTimeout(later, wait);
540
+ if (throttling) {
541
+ more = true;
542
+ } else {
543
+ result = func.apply(context, args);
544
+ }
545
+ whenDone();
546
+ throttling = true;
547
+ return result;
548
+ };
549
+ };
550
+
551
+ // Returns a function, that, as long as it continues to be invoked, will not
552
+ // be triggered. The function will be called after it stops being called for
553
+ // N milliseconds. If `immediate` is passed, trigger the function on the
554
+ // leading edge, instead of the trailing.
555
+ _.debounce = function(func, wait, immediate) {
556
+ var timeout;
557
+ return function() {
558
+ var context = this, args = arguments;
559
+ var later = function() {
560
+ timeout = null;
561
+ if (!immediate) func.apply(context, args);
562
+ };
563
+ if (immediate && !timeout) func.apply(context, args);
564
+ clearTimeout(timeout);
565
+ timeout = setTimeout(later, wait);
566
+ };
567
+ };
568
+
569
+ // Returns a function that will be executed at most one time, no matter how
570
+ // often you call it. Useful for lazy initialization.
571
+ _.once = function(func) {
572
+ var ran = false, memo;
573
+ return function() {
574
+ if (ran) return memo;
575
+ ran = true;
576
+ return memo = func.apply(this, arguments);
577
+ };
578
+ };
579
+
580
+ // Returns the first function passed as an argument to the second,
581
+ // allowing you to adjust arguments, run code before and after, and
582
+ // conditionally execute the original function.
583
+ _.wrap = function(func, wrapper) {
584
+ return function() {
585
+ var args = [func].concat(slice.call(arguments, 0));
586
+ return wrapper.apply(this, args);
587
+ };
588
+ };
589
+
590
+ // Returns a function that is the composition of a list of functions, each
591
+ // consuming the return value of the function that follows.
592
+ _.compose = function() {
593
+ var funcs = arguments;
594
+ return function() {
595
+ var args = arguments;
596
+ for (var i = funcs.length - 1; i >= 0; i--) {
597
+ args = [funcs[i].apply(this, args)];
598
+ }
599
+ return args[0];
600
+ };
601
+ };
602
+
603
+ // Returns a function that will only be executed after being called N times.
604
+ _.after = function(times, func) {
605
+ if (times <= 0) return func();
606
+ return function() {
607
+ if (--times < 1) { return func.apply(this, arguments); }
608
+ };
609
+ };
610
+
611
+ // Object Functions
612
+ // ----------------
613
+
614
+ // Retrieve the names of an object's properties.
615
+ // Delegates to **ECMAScript 5**'s native `Object.keys`
616
+ _.keys = nativeKeys || function(obj) {
617
+ if (obj !== Object(obj)) throw new TypeError('Invalid object');
618
+ var keys = [];
619
+ for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
620
+ return keys;
621
+ };
622
+
623
+ // Retrieve the values of an object's properties.
624
+ _.values = function(obj) {
625
+ return _.map(obj, _.identity);
626
+ };
627
+
628
+ // Return a sorted list of the function names available on the object.
629
+ // Aliased as `methods`
630
+ _.functions = _.methods = function(obj) {
631
+ var names = [];
632
+ for (var key in obj) {
633
+ if (_.isFunction(obj[key])) names.push(key);
634
+ }
635
+ return names.sort();
636
+ };
637
+
638
+ // Extend a given object with all the properties in passed-in object(s).
639
+ _.extend = function(obj) {
640
+ each(slice.call(arguments, 1), function(source) {
641
+ for (var prop in source) {
642
+ obj[prop] = source[prop];
643
+ }
644
+ });
645
+ return obj;
646
+ };
647
+
648
+ // Return a copy of the object only containing the whitelisted properties.
649
+ _.pick = function(obj) {
650
+ var result = {};
651
+ each(_.flatten(slice.call(arguments, 1)), function(key) {
652
+ if (key in obj) result[key] = obj[key];
653
+ });
654
+ return result;
655
+ };
656
+
657
+ // Fill in a given object with default properties.
658
+ _.defaults = function(obj) {
659
+ each(slice.call(arguments, 1), function(source) {
660
+ for (var prop in source) {
661
+ if (obj[prop] == null) obj[prop] = source[prop];
662
+ }
663
+ });
664
+ return obj;
665
+ };
666
+
667
+ // Create a (shallow-cloned) duplicate of an object.
668
+ _.clone = function(obj) {
669
+ if (!_.isObject(obj)) return obj;
670
+ return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
671
+ };
672
+
673
+ // Invokes interceptor with the obj, and then returns obj.
674
+ // The primary purpose of this method is to "tap into" a method chain, in
675
+ // order to perform operations on intermediate results within the chain.
676
+ _.tap = function(obj, interceptor) {
677
+ interceptor(obj);
678
+ return obj;
679
+ };
680
+
681
+ // Internal recursive comparison function.
682
+ function eq(a, b, stack) {
683
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
684
+ // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
685
+ if (a === b) return a !== 0 || 1 / a == 1 / b;
686
+ // A strict comparison is necessary because `null == undefined`.
687
+ if (a == null || b == null) return a === b;
688
+ // Unwrap any wrapped objects.
689
+ if (a._chain) a = a._wrapped;
690
+ if (b._chain) b = b._wrapped;
691
+ // Invoke a custom `isEqual` method if one is provided.
692
+ if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);
693
+ if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);
694
+ // Compare `[[Class]]` names.
695
+ var className = toString.call(a);
696
+ if (className != toString.call(b)) return false;
697
+ switch (className) {
698
+ // Strings, numbers, dates, and booleans are compared by value.
699
+ case '[object String]':
700
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
701
+ // equivalent to `new String("5")`.
702
+ return a == String(b);
703
+ case '[object Number]':
704
+ // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
705
+ // other numeric values.
706
+ return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
707
+ case '[object Date]':
708
+ case '[object Boolean]':
709
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
710
+ // millisecond representations. Note that invalid dates with millisecond representations
711
+ // of `NaN` are not equivalent.
712
+ return +a == +b;
713
+ // RegExps are compared by their source patterns and flags.
714
+ case '[object RegExp]':
715
+ return a.source == b.source &&
716
+ a.global == b.global &&
717
+ a.multiline == b.multiline &&
718
+ a.ignoreCase == b.ignoreCase;
719
+ }
720
+ if (typeof a != 'object' || typeof b != 'object') return false;
721
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
722
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
723
+ var length = stack.length;
724
+ while (length--) {
725
+ // Linear search. Performance is inversely proportional to the number of
726
+ // unique nested structures.
727
+ if (stack[length] == a) return true;
728
+ }
729
+ // Add the first object to the stack of traversed objects.
730
+ stack.push(a);
731
+ var size = 0, result = true;
732
+ // Recursively compare objects and arrays.
733
+ if (className == '[object Array]') {
734
+ // Compare array lengths to determine if a deep comparison is necessary.
735
+ size = a.length;
736
+ result = size == b.length;
737
+ if (result) {
738
+ // Deep compare the contents, ignoring non-numeric properties.
739
+ while (size--) {
740
+ // Ensure commutative equality for sparse arrays.
741
+ if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;
742
+ }
743
+ }
744
+ } else {
745
+ // Objects with different constructors are not equivalent.
746
+ if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
747
+ // Deep compare objects.
748
+ for (var key in a) {
749
+ if (_.has(a, key)) {
750
+ // Count the expected number of properties.
751
+ size++;
752
+ // Deep compare each member.
753
+ if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;
754
+ }
755
+ }
756
+ // Ensure that both objects contain the same number of properties.
757
+ if (result) {
758
+ for (key in b) {
759
+ if (_.has(b, key) && !(size--)) break;
760
+ }
761
+ result = !size;
762
+ }
763
+ }
764
+ // Remove the first object from the stack of traversed objects.
765
+ stack.pop();
766
+ return result;
767
+ }
768
+
769
+ // Perform a deep comparison to check if two objects are equal.
770
+ _.isEqual = function(a, b) {
771
+ return eq(a, b, []);
772
+ };
773
+
774
+ // Is a given array, string, or object empty?
775
+ // An "empty" object has no enumerable own-properties.
776
+ _.isEmpty = function(obj) {
777
+ if (obj == null) return true;
778
+ if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
779
+ for (var key in obj) if (_.has(obj, key)) return false;
780
+ return true;
781
+ };
782
+
783
+ // Is a given value a DOM element?
784
+ _.isElement = function(obj) {
785
+ return !!(obj && obj.nodeType == 1);
786
+ };
787
+
788
+ // Is a given value an array?
789
+ // Delegates to ECMA5's native Array.isArray
790
+ _.isArray = nativeIsArray || function(obj) {
791
+ return toString.call(obj) == '[object Array]';
792
+ };
793
+
794
+ // Is a given variable an object?
795
+ _.isObject = function(obj) {
796
+ return obj === Object(obj);
797
+ };
798
+
799
+ // Is a given variable an arguments object?
800
+ _.isArguments = function(obj) {
801
+ return toString.call(obj) == '[object Arguments]';
802
+ };
803
+ if (!_.isArguments(arguments)) {
804
+ _.isArguments = function(obj) {
805
+ return !!(obj && _.has(obj, 'callee'));
806
+ };
807
+ }
808
+
809
+ // Is a given value a function?
810
+ _.isFunction = function(obj) {
811
+ return toString.call(obj) == '[object Function]';
812
+ };
813
+
814
+ // Is a given value a string?
815
+ _.isString = function(obj) {
816
+ return toString.call(obj) == '[object String]';
817
+ };
818
+
819
+ // Is a given value a number?
820
+ _.isNumber = function(obj) {
821
+ return toString.call(obj) == '[object Number]';
822
+ };
823
+
824
+ // Is a given object a finite number?
825
+ _.isFinite = function(obj) {
826
+ return _.isNumber(obj) && isFinite(obj);
827
+ };
828
+
829
+ // Is the given value `NaN`?
830
+ _.isNaN = function(obj) {
831
+ // `NaN` is the only value for which `===` is not reflexive.
832
+ return obj !== obj;
833
+ };
834
+
835
+ // Is a given value a boolean?
836
+ _.isBoolean = function(obj) {
837
+ return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
838
+ };
839
+
840
+ // Is a given value a date?
841
+ _.isDate = function(obj) {
842
+ return toString.call(obj) == '[object Date]';
843
+ };
844
+
845
+ // Is the given value a regular expression?
846
+ _.isRegExp = function(obj) {
847
+ return toString.call(obj) == '[object RegExp]';
848
+ };
849
+
850
+ // Is a given value equal to null?
851
+ _.isNull = function(obj) {
852
+ return obj === null;
853
+ };
854
+
855
+ // Is a given variable undefined?
856
+ _.isUndefined = function(obj) {
857
+ return obj === void 0;
858
+ };
859
+
860
+ // Has own property?
861
+ _.has = function(obj, key) {
862
+ return hasOwnProperty.call(obj, key);
863
+ };
864
+
865
+ // Utility Functions
866
+ // -----------------
867
+
868
+ // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
869
+ // previous owner. Returns a reference to the Underscore object.
870
+ _.noConflict = function() {
871
+ root._ = previousUnderscore;
872
+ return this;
873
+ };
874
+
875
+ // Keep the identity function around for default iterators.
876
+ _.identity = function(value) {
877
+ return value;
878
+ };
879
+
880
+ // Run a function **n** times.
881
+ _.times = function (n, iterator, context) {
882
+ for (var i = 0; i < n; i++) iterator.call(context, i);
883
+ };
884
+
885
+ // Escape a string for HTML interpolation.
886
+ _.escape = function(string) {
887
+ return (''+string).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;');
888
+ };
889
+
890
+ // If the value of the named property is a function then invoke it;
891
+ // otherwise, return it.
892
+ _.result = function(object, property) {
893
+ if (object == null) return null;
894
+ var value = object[property];
895
+ return _.isFunction(value) ? value.call(object) : value;
896
+ };
897
+
898
+ // Add your own custom functions to the Underscore object, ensuring that
899
+ // they're correctly added to the OOP wrapper as well.
900
+ _.mixin = function(obj) {
901
+ each(_.functions(obj), function(name){
902
+ addToWrapper(name, _[name] = obj[name]);
903
+ });
904
+ };
905
+
906
+ // Generate a unique integer id (unique within the entire client session).
907
+ // Useful for temporary DOM ids.
908
+ var idCounter = 0;
909
+ _.uniqueId = function(prefix) {
910
+ var id = idCounter++;
911
+ return prefix ? prefix + id : id;
912
+ };
913
+
914
+ // By default, Underscore uses ERB-style template delimiters, change the
915
+ // following template settings to use alternative delimiters.
916
+ _.templateSettings = {
917
+ evaluate : /<%([\s\S]+?)%>/g,
918
+ interpolate : /<%=([\s\S]+?)%>/g,
919
+ escape : /<%-([\s\S]+?)%>/g
920
+ };
921
+
922
+ // When customizing `templateSettings`, if you don't want to define an
923
+ // interpolation, evaluation or escaping regex, we need one that is
924
+ // guaranteed not to match.
925
+ var noMatch = /.^/;
926
+
927
+ // Certain characters need to be escaped so that they can be put into a
928
+ // string literal.
929
+ var escapes = {
930
+ '\\': '\\',
931
+ "'": "'",
932
+ 'r': '\r',
933
+ 'n': '\n',
934
+ 't': '\t',
935
+ 'u2028': '\u2028',
936
+ 'u2029': '\u2029'
937
+ };
938
+
939
+ for (var p in escapes) escapes[escapes[p]] = p;
940
+ var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
941
+ var unescaper = /\\(\\|'|r|n|t|u2028|u2029)/g;
942
+
943
+ // Within an interpolation, evaluation, or escaping, remove HTML escaping
944
+ // that had been previously added.
945
+ var unescape = function(code) {
946
+ return code.replace(unescaper, function(match, escape) {
947
+ return escapes[escape];
948
+ });
949
+ };
950
+
951
+ // JavaScript micro-templating, similar to John Resig's implementation.
952
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
953
+ // and correctly escapes quotes within interpolated code.
954
+ _.template = function(text, data, settings) {
955
+ settings = _.defaults(settings || {}, _.templateSettings);
956
+
957
+ // Compile the template source, taking care to escape characters that
958
+ // cannot be included in a string literal and then unescape them in code
959
+ // blocks.
960
+ var source = "__p+='" + text
961
+ .replace(escaper, function(match) {
962
+ return '\\' + escapes[match];
963
+ })
964
+ .replace(settings.escape || noMatch, function(match, code) {
965
+ return "'+\n_.escape(" + unescape(code) + ")+\n'";
966
+ })
967
+ .replace(settings.interpolate || noMatch, function(match, code) {
968
+ return "'+\n(" + unescape(code) + ")+\n'";
969
+ })
970
+ .replace(settings.evaluate || noMatch, function(match, code) {
971
+ return "';\n" + unescape(code) + "\n;__p+='";
972
+ }) + "';\n";
973
+
974
+ // If a variable is not specified, place data values in local scope.
975
+ if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
976
+
977
+ source = "var __p='';" +
978
+ "var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n" +
979
+ source + "return __p;\n";
980
+
981
+ var render = new Function(settings.variable || 'obj', '_', source);
982
+ if (data) return render(data, _);
983
+ var template = function(data) {
984
+ return render.call(this, data, _);
985
+ };
986
+
987
+ // Provide the compiled function source as a convenience for build time
988
+ // precompilation.
989
+ template.source = 'function(' + (settings.variable || 'obj') + '){\n' +
990
+ source + '}';
991
+
992
+ return template;
993
+ };
994
+
995
+ // Add a "chain" function, which will delegate to the wrapper.
996
+ _.chain = function(obj) {
997
+ return _(obj).chain();
998
+ };
999
+
1000
+ // The OOP Wrapper
1001
+ // ---------------
1002
+
1003
+ // If Underscore is called as a function, it returns a wrapped object that
1004
+ // can be used OO-style. This wrapper holds altered versions of all the
1005
+ // underscore functions. Wrapped objects may be chained.
1006
+ var wrapper = function(obj) { this._wrapped = obj; };
1007
+
1008
+ // Expose `wrapper.prototype` as `_.prototype`
1009
+ _.prototype = wrapper.prototype;
1010
+
1011
+ // Helper function to continue chaining intermediate results.
1012
+ var result = function(obj, chain) {
1013
+ return chain ? _(obj).chain() : obj;
1014
+ };
1015
+
1016
+ // A method to easily add functions to the OOP wrapper.
1017
+ var addToWrapper = function(name, func) {
1018
+ wrapper.prototype[name] = function() {
1019
+ var args = slice.call(arguments);
1020
+ unshift.call(args, this._wrapped);
1021
+ return result(func.apply(_, args), this._chain);
1022
+ };
1023
+ };
1024
+
1025
+ // Add all of the Underscore functions to the wrapper object.
1026
+ _.mixin(_);
1027
+
1028
+ // Add all mutator Array functions to the wrapper.
1029
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
1030
+ var method = ArrayProto[name];
1031
+ wrapper.prototype[name] = function() {
1032
+ var wrapped = this._wrapped;
1033
+ method.apply(wrapped, arguments);
1034
+ var length = wrapped.length;
1035
+ if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0];
1036
+ return result(wrapped, this._chain);
1037
+ };
1038
+ });
1039
+
1040
+ // Add all accessor Array functions to the wrapper.
1041
+ each(['concat', 'join', 'slice'], function(name) {
1042
+ var method = ArrayProto[name];
1043
+ wrapper.prototype[name] = function() {
1044
+ return result(method.apply(this._wrapped, arguments), this._chain);
1045
+ };
1046
+ });
1047
+
1048
+ // Start chaining a wrapped Underscore object.
1049
+ wrapper.prototype.chain = function() {
1050
+ this._chain = true;
1051
+ return this;
1052
+ };
1053
+
1054
+ // Extracts the result from a wrapped and chained object.
1055
+ wrapper.prototype.value = function() {
1056
+ return this._wrapped;
1057
+ };
1058
+
1059
+ }).call(this);