beanstalkd_view 1.1.3 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/Gruntfile.js +41 -0
  2. data/README.md +13 -1
  3. data/Rakefile +0 -2
  4. data/lib/beanstalkd_view/beanstalkd_utils.rb +11 -16
  5. data/lib/beanstalkd_view/resources/css/beanstalkd_view.css +76 -0
  6. data/lib/beanstalkd_view/resources/js/beanstalkd_view.js +242 -0
  7. data/lib/beanstalkd_view/resources/js/beanstalkd_view.min.js +6 -0
  8. data/lib/beanstalkd_view/server.rb +0 -17
  9. data/lib/beanstalkd_view/version.rb +1 -1
  10. data/lib/beanstalkd_view/views/index.erb +30 -78
  11. data/lib/beanstalkd_view/views/job_info_popup.erb +67 -6
  12. data/lib/beanstalkd_view/views/layout.erb +2 -7
  13. data/lib/beanstalkd_view/views/peek_range.erb +1 -1
  14. data/lib/beanstalkd_view/views/tube_stats.erb +34 -35
  15. data/lib/beanstalkd_view.rb +0 -1
  16. data/package.json +10 -0
  17. data/spec/{integration → features}/rails_integration_spec.rb +1 -1
  18. data/spec/{integration → features}/sinatra_integration_spec.rb +1 -1
  19. data/spec/rails_app/log/test.log +990 -3
  20. data/spec/support/integration_test_shared_examples.rb +3 -3
  21. data/spec/support/queue_browser_shared_examples.rb +13 -13
  22. data/{lib/beanstalkd_view/resources → web}/css/app.css +0 -0
  23. data/{lib/beanstalkd_view/resources → web}/css/vendor/bootstrap.min.css +0 -0
  24. data/web/js/draw_chart.js +49 -0
  25. data/web/js/initialization.js +20 -0
  26. data/web/js/peek_jobs.js +135 -0
  27. data/web/js/peek_range.js +24 -0
  28. data/{lib/beanstalkd_view/resources → web}/js/vendor/bluff-0.3.6.2/bluff-min.js +0 -0
  29. data/{lib/beanstalkd_view/resources → web}/js/vendor/bluff-0.3.6.2/js-class.js +0 -0
  30. data/{lib/beanstalkd_view/resources → web}/js/vendor/bootstrap.min.js +0 -0
  31. data/{lib/beanstalkd_view/resources → web}/js/vendor/jquery-1.7.1.min.js +0 -0
  32. data/{lib/beanstalkd_view/resources → web}/js/vendor/json2.js +0 -0
  33. data/web/js/vendor/underscore-min.js +1 -0
  34. metadata +25 -34
  35. data/lib/beanstalkd_view/resources/js/app.js +0 -4
  36. data/lib/beanstalkd_view/resources/js/peek_jobs.js +0 -169
  37. data/lib/beanstalkd_view/resources/js/peek_range.js +0 -21
@@ -0,0 +1,6 @@
1
+ (function(t,e){function i(t){return O.isWindow(t)?t:9===t.nodeType?t.defaultView||t.parentWindow:!1}function n(t){if(!yi[t]){var e=M.body,i=O("<"+t+">").appendTo(e),n=i.css("display");i.remove(),("none"===n||""===n)&&(_i||(_i=M.createElement("iframe"),_i.frameBorder=_i.width=_i.height=0),e.appendChild(_i),mi&&_i.createElement||(mi=(_i.contentWindow||_i.contentDocument).document,mi.write(("CSS1Compat"===M.compatMode?"<!doctype html>":"")+"<html><body>"),mi.close()),i=mi.createElement(t),mi.body.appendChild(i),n=O.css(i,"display"),e.removeChild(_i)),yi[t]=n}return yi[t]}function s(t,e){var i={};return O.each(ki.concat.apply([],ki.slice(0,e)),function(){i[this]=t}),i}function r(){vi=e}function o(){return setTimeout(r,0),vi=O.now()}function a(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function l(){try{return new t.XMLHttpRequest}catch(e){}}function h(t,i){t.dataFilter&&(i=t.dataFilter(i,t.dataType));var n,s,r,o,a,l,h,u,c=t.dataTypes,f={},d=c.length,p=c[0];for(n=1;d>n;n++){if(1===n)for(s in t.converters)"string"==typeof s&&(f[s.toLowerCase()]=t.converters[s]);if(o=p,p=c[n],"*"===p)p=o;else if("*"!==o&&o!==p){if(a=o+" "+p,l=f[a]||f["* "+p],!l){u=e;for(h in f)if(r=h.split(" "),(r[0]===o||"*"===r[0])&&(u=f[r[1]+" "+p])){h=f[h],h===!0?l=u:u===!0&&(l=h);break}}!l&&!u&&O.error("No conversion from "+a.replace(" "," to ")),l!==!0&&(i=l?l(i):u(h(i)))}}return i}function u(t,i,n){var s,r,o,a,l=t.contents,h=t.dataTypes,u=t.responseFields;for(r in u)r in n&&(i[u[r]]=n[r]);for(;"*"===h[0];)h.shift(),s===e&&(s=t.mimeType||i.getResponseHeader("content-type"));if(s)for(r in l)if(l[r]&&l[r].test(s)){h.unshift(r);break}if(h[0]in n)o=h[0];else{for(r in n){if(!h[0]||t.converters[r+" "+h[0]]){o=r;break}a||(a=r)}o=o||a}return o?(o!==h[0]&&h.unshift(o),n[o]):void 0}function c(t,e,i,n){if(O.isArray(e))O.each(e,function(e,s){i||qe.test(t)?n(t,s):c(t+"["+("object"==typeof s||O.isArray(s)?e:"")+"]",s,i,n)});else if(i||null==e||"object"!=typeof e)n(t,e);else for(var s in e)c(t+"["+s+"]",e[s],i,n)}function f(t,i){var n,s,r=O.ajaxSettings.flatOptions||{};for(n in i)i[n]!==e&&((r[n]?t:s||(s={}))[n]=i[n]);s&&O.extend(!0,t,s)}function d(t,i,n,s,r,o){r=r||i.dataTypes[0],o=o||{},o[r]=!0;for(var a,l=t[r],h=0,u=l?l.length:0,c=t===oi;u>h&&(c||!a);h++)a=l[h](i,n,s),"string"==typeof a&&(!c||o[a]?a=e:(i.dataTypes.unshift(a),a=d(t,i,n,s,a,o)));return(c||!a)&&!o["*"]&&(a=d(t,i,n,s,"*",o)),a}function p(t){return function(e,i){if("string"!=typeof e&&(i=e,e="*"),O.isFunction(i))for(var n,s,r,o=e.toLowerCase().split(ii),a=0,l=o.length;l>a;a++)n=o[a],r=/^\+/.test(n),r&&(n=n.substr(1)||"*"),s=t[n]=t[n]||[],s[r?"unshift":"push"](i)}}function _(t,e,i){var n="width"===e?t.offsetWidth:t.offsetHeight,s="width"===e?Pe:ze,r=0,o=s.length;if(n>0){if("border"!==i)for(;o>r;r++)i||(n-=parseFloat(O.css(t,"padding"+s[r]))||0),"margin"===i?n+=parseFloat(O.css(t,i+s[r]))||0:n-=parseFloat(O.css(t,"border"+s[r]+"Width"))||0;return n+"px"}if(n=De(t,e,e),(0>n||null==n)&&(n=t.style[e]||0),n=parseFloat(n)||0,i)for(;o>r;r++)n+=parseFloat(O.css(t,"padding"+s[r]))||0,"padding"!==i&&(n+=parseFloat(O.css(t,"border"+s[r]+"Width"))||0),"margin"===i&&(n+=parseFloat(O.css(t,i+s[r]))||0);return n+"px"}function m(t,e){e.src?O.ajax({url:e.src,async:!1,dataType:"script"}):O.globalEval((e.text||e.textContent||e.innerHTML||"").replace(Se,"/*$0*/")),e.parentNode&&e.parentNode.removeChild(e)}function g(t){var e=M.createElement("div");return Ne.appendChild(e),e.innerHTML=t.outerHTML,e.firstChild}function v(t){var e=(t.nodeName||"").toLowerCase();"input"===e?y(t):"script"!==e&&t.getElementsByTagName!==void 0&&O.grep(t.getElementsByTagName("input"),y)}function y(t){("checkbox"===t.type||"radio"===t.type)&&(t.defaultChecked=t.checked)}function b(t){return t.getElementsByTagName!==void 0?t.getElementsByTagName("*"):t.querySelectorAll!==void 0?t.querySelectorAll("*"):[]}function x(t,e){var i;1===e.nodeType&&(e.clearAttributes&&e.clearAttributes(),e.mergeAttributes&&e.mergeAttributes(t),i=e.nodeName.toLowerCase(),"object"===i?e.outerHTML=t.outerHTML:"input"!==i||"checkbox"!==t.type&&"radio"!==t.type?"option"===i?e.selected=t.defaultSelected:("input"===i||"textarea"===i)&&(e.defaultValue=t.defaultValue):(t.checked&&(e.defaultChecked=e.checked=t.checked),e.value!==t.value&&(e.value=t.value)),e.removeAttribute(O.expando))}function k(t,e){if(1===e.nodeType&&O.hasData(t)){var i,n,s,r=O._data(t),o=O._data(e,r),a=r.events;if(a){delete o.handle,o.events={};for(i in a)for(n=0,s=a[i].length;s>n;n++)O.event.add(e,i+(a[i][n].namespace?".":"")+a[i][n].namespace,a[i][n],a[i][n].data)}o.data&&(o.data=O.extend({},o.data))}}function w(t){return O.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function A(t){var e=_e.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}function T(t,e,i){if(e=e||0,O.isFunction(e))return O.grep(t,function(t,n){var s=!!e.call(t,n,t);return s===i});if(e.nodeType)return O.grep(t,function(t){return t===e===i});if("string"==typeof e){var n=O.grep(t,function(t){return 1===t.nodeType});if(ce.test(e))return O.filter(e,n,!i);e=O.filter(e,n)}return O.grep(t,function(t){return O.inArray(t,e)>=0===i})}function E(t){return!t||!t.parentNode||11===t.parentNode.nodeType}function S(){return!0}function C(){return!1}function N(t,e,i){var n=e+"defer",s=e+"queue",r=e+"mark",o=O._data(t,n);!(!o||"queue"!==i&&O._data(t,s)||"mark"!==i&&O._data(t,r)||!setTimeout(function(){!O._data(t,s)&&!O._data(t,r)&&(O.removeData(t,n,!0),o.fire())},0))}function D(t){for(var e in t)if(("data"!==e||!O.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function B(t,i,n){if(n===e&&1===t.nodeType){var s="data-"+i.replace(P,"-$1").toLowerCase();if(n=t.getAttribute(s),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:O.isNumeric(n)?parseFloat(n):R.test(n)?O.parseJSON(n):n}catch(r){}O.data(t,i,n)}else n=e}return n}function L(t){var e,i,n=F[t]={};for(t=t.split(/\s+/),e=0,i=t.length;i>e;e++)n[t[e]]=!0;return n}var M=t.document,j=t.navigator,$=t.location,O=function(){function i(){if(!a.isReady){try{M.documentElement.doScroll("left")}catch(t){return setTimeout(i,1),void 0}a.ready()}}var n,s,r,o,a=function(t,e){return new a.fn.init(t,e,n)},l=t.jQuery,h=t.$,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,c=/\S/,f=/^\s+/,d=/\s+$/,p=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,_=/^[\],:{}\s]*$/,m=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,g=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,y=/(webkit)[ \/]([\w.]+)/,b=/(opera)(?:.*version)?[ \/]([\w.]+)/,x=/(msie) ([\w.]+)/,k=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/gi,A=/^-ms-/,T=function(t,e){return(e+"").toUpperCase()},E=j.userAgent,S=Object.prototype.toString,C=Object.prototype.hasOwnProperty,N=Array.prototype.push,D=Array.prototype.slice,B=String.prototype.trim,L=Array.prototype.indexOf,$={};return a.fn=a.prototype={constructor:a,init:function(t,i,n){var s,r,o,l;if(!t)return this;if(t.nodeType)return this.context=this[0]=t,this.length=1,this;if("body"===t&&!i&&M.body)return this.context=M,this[0]=M.body,this.selector=t,this.length=1,this;if("string"==typeof t){if(s="<"!==t.charAt(0)||">"!==t.charAt(t.length-1)||3>t.length?u.exec(t):[null,t,null],s&&(s[1]||!i)){if(s[1])return i=i instanceof a?i[0]:i,l=i?i.ownerDocument||i:M,o=p.exec(t),o?a.isPlainObject(i)?(t=[M.createElement(o[1])],a.fn.attr.call(t,i,!0)):t=[l.createElement(o[1])]:(o=a.buildFragment([s[1]],[l]),t=(o.cacheable?a.clone(o.fragment):o.fragment).childNodes),a.merge(this,t);if(r=M.getElementById(s[2]),r&&r.parentNode){if(r.id!==s[2])return n.find(t);this.length=1,this[0]=r}return this.context=M,this.selector=t,this}return!i||i.jquery?(i||n).find(t):this.constructor(i).find(t)}return a.isFunction(t)?n.ready(t):(t.selector!==e&&(this.selector=t.selector,this.context=t.context),a.makeArray(t,this))},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return D.call(this,0)},get:function(t){return null==t?this.toArray():0>t?this[this.length+t]:this[t]},pushStack:function(t,e,i){var n=this.constructor();return a.isArray(t)?N.apply(n,t):a.merge(n,t),n.prevObject=this,n.context=this.context,"find"===e?n.selector=this.selector+(this.selector?" ":"")+i:e&&(n.selector=this.selector+"."+e+"("+i+")"),n},each:function(t,e){return a.each(this,t,e)},ready:function(t){return a.bindReady(),r.add(t),this},eq:function(t){return t=+t,-1===t?this.slice(t):this.slice(t,t+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(D.apply(this,arguments),"slice",D.call(arguments).join(","))},map:function(t){return this.pushStack(a.map(this,function(e,i){return t.call(e,i,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:N,sort:[].sort,splice:[].splice},a.fn.init.prototype=a.fn,a.extend=a.fn.extend=function(){var t,i,n,s,r,o,l=arguments[0]||{},h=1,u=arguments.length,c=!1;for("boolean"==typeof l&&(c=l,l=arguments[1]||{},h=2),"object"!=typeof l&&!a.isFunction(l)&&(l={}),u===h&&(l=this,--h);u>h;h++)if(null!=(t=arguments[h]))for(i in t)n=l[i],s=t[i],l!==s&&(c&&s&&(a.isPlainObject(s)||(r=a.isArray(s)))?(r?(r=!1,o=n&&a.isArray(n)?n:[]):o=n&&a.isPlainObject(n)?n:{},l[i]=a.extend(c,o,s)):s!==e&&(l[i]=s));return l},a.extend({noConflict:function(e){return t.$===a&&(t.$=h),e&&t.jQuery===a&&(t.jQuery=l),a},isReady:!1,readyWait:1,holdReady:function(t){t?a.readyWait++:a.ready(!0)},ready:function(t){if(t===!0&&!--a.readyWait||t!==!0&&!a.isReady){if(!M.body)return setTimeout(a.ready,1);if(a.isReady=!0,t!==!0&&--a.readyWait>0)return;r.fireWith(M,[a]),a.fn.trigger&&a(M).trigger("ready").off("ready")}},bindReady:function(){if(!r){if(r=a.Callbacks("once memory"),"complete"===M.readyState)return setTimeout(a.ready,1);if(M.addEventListener)M.addEventListener("DOMContentLoaded",o,!1),t.addEventListener("load",a.ready,!1);else if(M.attachEvent){M.attachEvent("onreadystatechange",o),t.attachEvent("onload",a.ready);var e=!1;try{e=null==t.frameElement}catch(n){}M.documentElement.doScroll&&e&&i()}}},isFunction:function(t){return"function"===a.type(t)},isArray:Array.isArray||function(t){return"array"===a.type(t)},isWindow:function(t){return t&&"object"==typeof t&&"setInterval"in t},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},type:function(t){return null==t?t+"":$[S.call(t)]||"object"},isPlainObject:function(t){if(!t||"object"!==a.type(t)||t.nodeType||a.isWindow(t))return!1;try{if(t.constructor&&!C.call(t,"constructor")&&!C.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(i){return!1}var n;for(n in t);return n===e||C.call(t,n)},isEmptyObject:function(t){for(var e in t)return!1;return!0},error:function(t){throw Error(t)},parseJSON:function(e){return"string"==typeof e&&e?(e=a.trim(e),t.JSON&&t.JSON.parse?t.JSON.parse(e):_.test(e.replace(m,"@").replace(g,"]").replace(v,""))?Function("return "+e)():(a.error("Invalid JSON: "+e),void 0)):null},parseXML:function(i){var n,s;try{t.DOMParser?(s=new DOMParser,n=s.parseFromString(i,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(i))}catch(r){n=e}return(!n||!n.documentElement||n.getElementsByTagName("parsererror").length)&&a.error("Invalid XML: "+i),n},noop:function(){},globalEval:function(e){e&&c.test(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(A,"ms-").replace(w,T)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toUpperCase()===e.toUpperCase()},each:function(t,i,n){var s,r=0,o=t.length,l=o===e||a.isFunction(t);if(n)if(l){for(s in t)if(i.apply(t[s],n)===!1)break}else for(;o>r&&i.apply(t[r++],n)!==!1;);else if(l){for(s in t)if(i.call(t[s],s,t[s])===!1)break}else for(;o>r&&i.call(t[r],r,t[r++])!==!1;);return t},trim:B?function(t){return null==t?"":B.call(t)}:function(t){return null==t?"":(t+"").replace(f,"").replace(d,"")},makeArray:function(t,e){var i=e||[];if(null!=t){var n=a.type(t);null==t.length||"string"===n||"function"===n||"regexp"===n||a.isWindow(t)?N.call(i,t):a.merge(i,t)}return i},inArray:function(t,e,i){var n;if(e){if(L)return L.call(e,t,i);for(n=e.length,i=i?0>i?Math.max(0,n+i):i:0;n>i;i++)if(i in e&&e[i]===t)return i}return-1},merge:function(t,i){var n=t.length,s=0;if("number"==typeof i.length)for(var r=i.length;r>s;s++)t[n++]=i[s];else for(;i[s]!==e;)t[n++]=i[s++];return t.length=n,t},grep:function(t,e,i){var n,s=[];i=!!i;for(var r=0,o=t.length;o>r;r++)n=!!e(t[r],r),i!==n&&s.push(t[r]);return s},map:function(t,i,n){var s,r,o=[],l=0,h=t.length,u=t instanceof a||h!==e&&"number"==typeof h&&(h>0&&t[0]&&t[h-1]||0===h||a.isArray(t));if(u)for(;h>l;l++)s=i(t[l],l,n),null!=s&&(o[o.length]=s);else for(r in t)s=i(t[r],r,n),null!=s&&(o[o.length]=s);return o.concat.apply([],o)},guid:1,proxy:function(t,i){if("string"==typeof i){var n=t[i];i=t,t=n}if(!a.isFunction(t))return e;var s=D.call(arguments,2),r=function(){return t.apply(i,s.concat(D.call(arguments)))};return r.guid=t.guid=t.guid||r.guid||a.guid++,r},access:function(t,i,n,s,r,o){var l=t.length;if("object"==typeof i){for(var h in i)a.access(t,h,i[h],s,r,n);return t}if(n!==e){s=!o&&s&&a.isFunction(n);for(var u=0;l>u;u++)r(t[u],i,s?n.call(t[u],u,r(t[u],i)):n,o);return t}return l?r(t[0],i):e},now:function(){return(new Date).getTime()},uaMatch:function(t){t=t.toLowerCase();var e=y.exec(t)||b.exec(t)||x.exec(t)||0>t.indexOf("compatible")&&k.exec(t)||[];return{browser:e[1]||"",version:e[2]||"0"}},sub:function(){function t(e,i){return new t.fn.init(e,i)}a.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(i,n){return n&&n instanceof a&&!(n instanceof t)&&(n=t(n)),a.fn.init.call(this,i,n,e)},t.fn.init.prototype=t.fn;var e=t(M);return t},browser:{}}),a.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(t,e){$["[object "+e+"]"]=e.toLowerCase()}),s=a.uaMatch(E),s.browser&&(a.browser[s.browser]=!0,a.browser.version=s.version),a.browser.webkit&&(a.browser.safari=!0),c.test(" ")&&(f=/^[\s\xA0]+/,d=/[\s\xA0]+$/),n=a(M),M.addEventListener?o=function(){M.removeEventListener("DOMContentLoaded",o,!1),a.ready()}:M.attachEvent&&(o=function(){"complete"===M.readyState&&(M.detachEvent("onreadystatechange",o),a.ready())}),a}(),F={};O.Callbacks=function(t){t=t?F[t]||L(t):{};var i,n,s,r,o,a=[],l=[],h=function(e){var i,n,s,r;for(i=0,n=e.length;n>i;i++)s=e[i],r=O.type(s),"array"===r?h(s):"function"===r&&(!t.unique||!c.has(s))&&a.push(s)},u=function(e,h){for(h=h||[],i=!t.memory||[e,h],n=!0,o=s||0,s=0,r=a.length;a&&r>o;o++)if(a[o].apply(e,h)===!1&&t.stopOnFalse){i=!0;break}n=!1,a&&(t.once?i===!0?c.disable():a=[]:l&&l.length&&(i=l.shift(),c.fireWith(i[0],i[1])))},c={add:function(){if(a){var t=a.length;h(arguments),n?r=a.length:i&&i!==!0&&(s=t,u(i[0],i[1]))}return this},remove:function(){if(a)for(var e=arguments,i=0,s=e.length;s>i;i++)for(var l=0;a.length>l&&(e[i]!==a[l]||(n&&r>=l&&(r--,o>=l&&o--),a.splice(l--,1),!t.unique));l++);return this},has:function(t){if(a)for(var e=0,i=a.length;i>e;e++)if(t===a[e])return!0;return!1},empty:function(){return a=[],this},disable:function(){return a=l=i=e,this},disabled:function(){return!a},lock:function(){return l=e,(!i||i===!0)&&c.disable(),this},locked:function(){return!l},fireWith:function(e,s){return l&&(n?t.once||l.push([e,s]):(!t.once||!i)&&u(e,s)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c};var I=[].slice;O.extend({Deferred:function(t){var e,i=O.Callbacks("once memory"),n=O.Callbacks("once memory"),s=O.Callbacks("memory"),r="pending",o={resolve:i,reject:n,notify:s},a={done:i.add,fail:n.add,progress:s.add,state:function(){return r},isResolved:i.fired,isRejected:n.fired,then:function(t,e,i){return l.done(t).fail(e).progress(i),this},always:function(){return l.done.apply(l,arguments).fail.apply(l,arguments),this},pipe:function(t,e,i){return O.Deferred(function(n){O.each({done:[t,"resolve"],fail:[e,"reject"],progress:[i,"notify"]},function(t,e){var i,s=e[0],r=e[1];O.isFunction(s)?l[t](function(){i=s.apply(this,arguments),i&&O.isFunction(i.promise)?i.promise().then(n.resolve,n.reject,n.notify):n[r+"With"](this===l?n:this,[i])}):l[t](n[r])})}).promise()},promise:function(t){if(null==t)t=a;else for(var e in a)t[e]=a[e];return t}},l=a.promise({});for(e in o)l[e]=o[e].fire,l[e+"With"]=o[e].fireWith;return l.done(function(){r="resolved"},n.disable,s.lock).fail(function(){r="rejected"},i.disable,s.lock),t&&t.call(l,l),l},when:function(t){function e(t){return function(e){o[t]=arguments.length>1?I.call(arguments,0):e,l.notifyWith(h,o)}}function i(t){return function(e){n[t]=arguments.length>1?I.call(arguments,0):e,--a||l.resolveWith(l,n)}}var n=I.call(arguments,0),s=0,r=n.length,o=Array(r),a=r,l=1>=r&&t&&O.isFunction(t.promise)?t:O.Deferred(),h=l.promise();if(r>1){for(;r>s;s++)n[s]&&n[s].promise&&O.isFunction(n[s].promise)?n[s].promise().then(i(s),l.reject,e(s)):--a;a||l.resolveWith(l,n)}else l!==t&&l.resolveWith(l,r?[t]:[]);return h}}),O.support=function(){var e,i,n,s,r,o,a,l,h,u,c,f,d=M.createElement("div");if(M.documentElement,d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",i=d.getElementsByTagName("*"),n=d.getElementsByTagName("a")[0],!i||!i.length||!n)return{};s=M.createElement("select"),r=s.appendChild(M.createElement("option")),o=d.getElementsByTagName("input")[0],e={leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(n.getAttribute("style")),hrefNormalized:"/a"===n.getAttribute("href"),opacity:/^0.55/.test(n.style.opacity),cssFloat:!!n.style.cssFloat,checkOn:"on"===o.value,optSelected:r.selected,getSetAttribute:"t"!==d.className,enctype:!!M.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==M.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},o.checked=!0,e.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,e.optDisabled=!r.disabled;try{delete d.test}catch(p){e.deleteExpando=!1}if(!d.addEventListener&&d.attachEvent&&d.fireEvent&&(d.attachEvent("onclick",function(){e.noCloneEvent=!1}),d.cloneNode(!0).fireEvent("onclick")),o=M.createElement("input"),o.value="t",o.setAttribute("type","radio"),e.radioValue="t"===o.value,o.setAttribute("checked","checked"),d.appendChild(o),l=M.createDocumentFragment(),l.appendChild(d.lastChild),e.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,e.appendChecked=o.checked,l.removeChild(o),l.appendChild(d),d.innerHTML="",t.getComputedStyle&&(a=M.createElement("div"),a.style.width="0",a.style.marginRight="0",d.style.width="2px",d.appendChild(a),e.reliableMarginRight=0===(parseInt((t.getComputedStyle(a,null)||{marginRight:0}).marginRight,10)||0)),d.attachEvent)for(c in{submit:1,change:1,focusin:1})u="on"+c,f=u in d,f||(d.setAttribute(u,"return;"),f="function"==typeof d[u]),e[c+"Bubbles"]=f;return l.removeChild(d),l=s=r=a=d=o=null,O(function(){var t,i,n,s,r,o,a,l,u,c,p=M.getElementsByTagName("body")[0];!p||(o=1,a="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",u="style='"+a+"border:5px solid #000;padding:0;'",c="<div "+u+"><div></div></div>"+"<table "+u+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",t=M.createElement("div"),t.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+o+"px",p.insertBefore(t,p.firstChild),d=M.createElement("div"),t.appendChild(d),d.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",h=d.getElementsByTagName("td"),f=0===h[0].offsetHeight,h[0].style.display="",h[1].style.display="none",e.reliableHiddenOffsets=f&&0===h[0].offsetHeight,d.innerHTML="",d.style.width=d.style.paddingLeft="1px",O.boxModel=e.boxModel=2===d.offsetWidth,d.style.zoom!==void 0&&(d.style.display="inline",d.style.zoom=1,e.inlineBlockNeedsLayout=2===d.offsetWidth,d.style.display="",d.innerHTML="<div style='width:4px;'></div>",e.shrinkWrapBlocks=2!==d.offsetWidth),d.style.cssText=a+l,d.innerHTML=c,i=d.firstChild,n=i.firstChild,s=i.nextSibling.firstChild.firstChild,r={doesNotAddBorder:5!==n.offsetTop,doesAddBorderForTableAndCells:5===s.offsetTop},n.style.position="fixed",n.style.top="20px",r.fixedPosition=20===n.offsetTop||15===n.offsetTop,n.style.position=n.style.top="",i.style.overflow="hidden",i.style.position="relative",r.subtractsBorderForOverflowNotVisible=-5===n.offsetTop,r.doesNotIncludeMarginInBodyOffset=p.offsetTop!==o,p.removeChild(t),d=t=null,O.extend(e,r))}),e}();var R=/^(?:\{.*\}|\[.*\])$/,P=/([A-Z])/g;O.extend({cache:{},uuid:0,expando:"jQuery"+(O.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(t){return t=t.nodeType?O.cache[t[O.expando]]:t[O.expando],!!t&&!D(t)},data:function(t,i,n,s){if(O.acceptData(t)){var r,o,a,l=O.expando,h="string"==typeof i,u=t.nodeType,c=u?O.cache:t,f=u?t[l]:t[l]&&l,d="events"===i;if(!(f&&c[f]&&(d||s||c[f].data)||!h||n!==e))return;return f||(u?t[l]=f=++O.uuid:f=l),c[f]||(c[f]={},u||(c[f].toJSON=O.noop)),("object"==typeof i||"function"==typeof i)&&(s?c[f]=O.extend(c[f],i):c[f].data=O.extend(c[f].data,i)),r=o=c[f],s||(o.data||(o.data={}),o=o.data),n!==e&&(o[O.camelCase(i)]=n),d&&!o[i]?r.events:(h?(a=o[i],null==a&&(a=o[O.camelCase(i)])):a=o,a)}},removeData:function(t,e,i){if(O.acceptData(t)){var n,s,r,o=O.expando,a=t.nodeType,l=a?O.cache:t,h=a?t[o]:o;if(!l[h])return;if(e&&(n=i?l[h]:l[h].data)){O.isArray(e)||(e in n?e=[e]:(e=O.camelCase(e),e=e in n?[e]:e.split(" ")));for(s=0,r=e.length;r>s;s++)delete n[e[s]];if(!(i?D:O.isEmptyObject)(n))return}if(!i&&(delete l[h].data,!D(l[h])))return;O.support.deleteExpando||!l.setInterval?delete l[h]:l[h]=null,a&&(O.support.deleteExpando?delete t[o]:t.removeAttribute?t.removeAttribute(o):t[o]=null)}},_data:function(t,e,i){return O.data(t,e,i,!0)},acceptData:function(t){if(t.nodeName){var e=O.noData[t.nodeName.toLowerCase()];if(e)return e!==!0&&t.getAttribute("classid")===e}return!0}}),O.fn.extend({data:function(t,i){var n,s,r,o=null;if(t===void 0){if(this.length&&(o=O.data(this[0]),1===this[0].nodeType&&!O._data(this[0],"parsedAttrs"))){s=this[0].attributes;for(var a=0,l=s.length;l>a;a++)r=s[a].name,0===r.indexOf("data-")&&(r=O.camelCase(r.substring(5)),B(this[0],r,o[r]));O._data(this[0],"parsedAttrs",!0)}return o}return"object"==typeof t?this.each(function(){O.data(this,t)}):(n=t.split("."),n[1]=n[1]?"."+n[1]:"",i===e?(o=this.triggerHandler("getData"+n[1]+"!",[n[0]]),o===e&&this.length&&(o=O.data(this[0],t),o=B(this[0],t,o)),o===e&&n[1]?this.data(n[0]):o):this.each(function(){var e=O(this),s=[n[0],i];e.triggerHandler("setData"+n[1]+"!",s),O.data(this,t,i),e.triggerHandler("changeData"+n[1]+"!",s)}))},removeData:function(t){return this.each(function(){O.removeData(this,t)})}}),O.extend({_mark:function(t,e){t&&(e=(e||"fx")+"mark",O._data(t,e,(O._data(t,e)||0)+1))},_unmark:function(t,e,i){if(t!==!0&&(i=e,e=t,t=!1),e){i=i||"fx";var n=i+"mark",s=t?0:(O._data(e,n)||1)-1;s?O._data(e,n,s):(O.removeData(e,n,!0),N(e,i,"mark"))}},queue:function(t,e,i){var n;return t?(e=(e||"fx")+"queue",n=O._data(t,e),i&&(!n||O.isArray(i)?n=O._data(t,e,O.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(t,e){e=e||"fx";var i=O.queue(t,e),n=i.shift(),s={};"inprogress"===n&&(n=i.shift()),n&&("fx"===e&&i.unshift("inprogress"),O._data(t,e+".run",s),n.call(t,function(){O.dequeue(t,e)},s)),i.length||(O.removeData(t,e+"queue "+e+".run",!0),N(t,e,"queue"))}}),O.fn.extend({queue:function(t,i){return"string"!=typeof t&&(i=t,t="fx"),i===e?O.queue(this[0],t):this.each(function(){var e=O.queue(this,t,i);"fx"===t&&"inprogress"!==e[0]&&O.dequeue(this,t)})},dequeue:function(t){return this.each(function(){O.dequeue(this,t)})},delay:function(t,e){return t=O.fx?O.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,i){var n=setTimeout(e,t);i.stop=function(){clearTimeout(n)}})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,i){function n(){--l||r.resolveWith(o,[o])}"string"!=typeof t&&(i=t,t=e),t=t||"fx";for(var s,r=O.Deferred(),o=this,a=o.length,l=1,h=t+"defer",u=t+"queue",c=t+"mark";a--;)(s=O.data(o[a],h,e,!0)||(O.data(o[a],u,e,!0)||O.data(o[a],c,e,!0))&&O.data(o[a],h,O.Callbacks("once memory"),!0))&&(l++,s.add(n));return n(),r.promise()}});var z,J,H,X=/[\n\t\r]/g,q=/\s+/,W=/\r/g,U=/^(?:button|input)$/i,V=/^(?:button|input|object|select|textarea)$/i,G=/^a(?:rea)?$/i,Q=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Y=O.support.getSetAttribute;O.fn.extend({attr:function(t,e){return O.access(this,t,e,!0,O.attr)},removeAttr:function(t){return this.each(function(){O.removeAttr(this,t)})},prop:function(t,e){return O.access(this,t,e,!0,O.prop)},removeProp:function(t){return t=O.propFix[t]||t,this.each(function(){try{this[t]=e,delete this[t]}catch(i){}})},addClass:function(t){var e,i,n,s,r,o,a;if(O.isFunction(t))return this.each(function(e){O(this).addClass(t.call(this,e,this.className))});if(t&&"string"==typeof t)for(e=t.split(q),i=0,n=this.length;n>i;i++)if(s=this[i],1===s.nodeType)if(s.className||1!==e.length){for(r=" "+s.className+" ",o=0,a=e.length;a>o;o++)~r.indexOf(" "+e[o]+" ")||(r+=e[o]+" ");s.className=O.trim(r)}else s.className=t;return this},removeClass:function(t){var i,n,s,r,o,a,l;if(O.isFunction(t))return this.each(function(e){O(this).removeClass(t.call(this,e,this.className))});if(t&&"string"==typeof t||t===e)for(i=(t||"").split(q),n=0,s=this.length;s>n;n++)if(r=this[n],1===r.nodeType&&r.className)if(t){for(o=(" "+r.className+" ").replace(X," "),a=0,l=i.length;l>a;a++)o=o.replace(" "+i[a]+" "," ");r.className=O.trim(o)}else r.className="";return this},toggleClass:function(t,e){var i=typeof t,n="boolean"==typeof e;return O.isFunction(t)?this.each(function(i){O(this).toggleClass(t.call(this,i,this.className,e),e)}):this.each(function(){if("string"===i)for(var s,r=0,o=O(this),a=e,l=t.split(q);s=l[r++];)a=n?a:!o.hasClass(s),o[a?"addClass":"removeClass"](s);else("undefined"===i||"boolean"===i)&&(this.className&&O._data(this,"__className__",this.className),this.className=this.className||t===!1?"":O._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",i=0,n=this.length;n>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(X," ").indexOf(e)>-1)return!0;return!1},val:function(t){var i,n,s,r=this[0];return arguments.length?(s=O.isFunction(t),this.each(function(n){var r,o=O(this);1===this.nodeType&&(r=s?t.call(this,n,o.val()):t,null==r?r="":"number"==typeof r?r+="":O.isArray(r)&&(r=O.map(r,function(t){return null==t?"":t+""})),i=O.valHooks[this.nodeName.toLowerCase()]||O.valHooks[this.type],i&&"set"in i&&i.set(this,r,"value")!==e||(this.value=r))})):r?(i=O.valHooks[r.nodeName.toLowerCase()]||O.valHooks[r.type],i&&"get"in i&&(n=i.get(r,"value"))!==e?n:(n=r.value,"string"==typeof n?n.replace(W,""):null==n?"":n)):void 0}}),O.extend({valHooks:{option:{get:function(t){var e=t.attributes.value;return!e||e.specified?t.value:t.text}},select:{get:function(t){var e,i,n,s,r=t.selectedIndex,o=[],a=t.options,l="select-one"===t.type;if(0>r)return null;for(i=l?r:0,n=l?r+1:a.length;n>i;i++)if(s=a[i],!(!s.selected||(O.support.optDisabled?s.disabled:null!==s.getAttribute("disabled"))||s.parentNode.disabled&&O.nodeName(s.parentNode,"optgroup"))){if(e=O(s).val(),l)return e;o.push(e)}return l&&!o.length&&a.length?O(a[r]).val():o},set:function(t,e){var i=O.makeArray(e);return O(t).find("option").each(function(){this.selected=O.inArray(O(this).val(),i)>=0}),i.length||(t.selectedIndex=-1),i}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(t,i,n,s){var r,o,a,l=t.nodeType;return t&&3!==l&&8!==l&&2!==l?s&&i in O.attrFn?O(t)[i](n):t.getAttribute===void 0?O.prop(t,i,n):(a=1!==l||!O.isXMLDoc(t),a&&(i=i.toLowerCase(),o=O.attrHooks[i]||(Q.test(i)?J:z)),n!==e?null===n?(O.removeAttr(t,i),void 0):o&&"set"in o&&a&&(r=o.set(t,n,i))!==e?r:(t.setAttribute(i,""+n),n):o&&"get"in o&&a&&null!==(r=o.get(t,i))?r:(r=t.getAttribute(i),null===r?e:r)):void 0},removeAttr:function(t,e){var i,n,s,r,o=0;if(e&&1===t.nodeType)for(n=e.toLowerCase().split(q),r=n.length;r>o;o++)s=n[o],s&&(i=O.propFix[s]||s,O.attr(t,s,""),t.removeAttribute(Y?s:i),Q.test(s)&&i in t&&(t[i]=!1))},attrHooks:{type:{set:function(t,e){if(U.test(t.nodeName)&&t.parentNode)O.error("type property can't be changed");else if(!O.support.radioValue&&"radio"===e&&O.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}},value:{get:function(t,e){return z&&O.nodeName(t,"button")?z.get(t,e):e in t?t.value:null},set:function(t,e,i){return z&&O.nodeName(t,"button")?z.set(t,e,i):(t.value=e,void 0)}}},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(t,i,n){var s,r,o,a=t.nodeType;return t&&3!==a&&8!==a&&2!==a?(o=1!==a||!O.isXMLDoc(t),o&&(i=O.propFix[i]||i,r=O.propHooks[i]),n!==e?r&&"set"in r&&(s=r.set(t,n,i))!==e?s:t[i]=n:r&&"get"in r&&null!==(s=r.get(t,i))?s:t[i]):void 0},propHooks:{tabIndex:{get:function(t){var i=t.getAttributeNode("tabindex");return i&&i.specified?parseInt(i.value,10):V.test(t.nodeName)||G.test(t.nodeName)&&t.href?0:e}}}}),O.attrHooks.tabindex=O.propHooks.tabIndex,J={get:function(t,i){var n,s=O.prop(t,i);return s===!0||"boolean"!=typeof s&&(n=t.getAttributeNode(i))&&n.nodeValue!==!1?i.toLowerCase():e},set:function(t,e,i){var n;return e===!1?O.removeAttr(t,i):(n=O.propFix[i]||i,n in t&&(t[n]=!0),t.setAttribute(i,i.toLowerCase())),i}},Y||(H={name:!0,id:!0},z=O.valHooks.button={get:function(t,i){var n;return n=t.getAttributeNode(i),n&&(H[i]?""!==n.nodeValue:n.specified)?n.nodeValue:e},set:function(t,e,i){var n=t.getAttributeNode(i);return n||(n=M.createAttribute(i),t.setAttributeNode(n)),n.nodeValue=e+""}},O.attrHooks.tabindex.set=z.set,O.each(["width","height"],function(t,e){O.attrHooks[e]=O.extend(O.attrHooks[e],{set:function(t,i){return""===i?(t.setAttribute(e,"auto"),i):void 0}})}),O.attrHooks.contenteditable={get:z.get,set:function(t,e,i){""===e&&(e="false"),z.set(t,e,i)}}),O.support.hrefNormalized||O.each(["href","src","width","height"],function(t,i){O.attrHooks[i]=O.extend(O.attrHooks[i],{get:function(t){var n=t.getAttribute(i,2);return null===n?e:n}})}),O.support.style||(O.attrHooks.style={get:function(t){return t.style.cssText.toLowerCase()||e},set:function(t,e){return t.style.cssText=""+e}}),O.support.optSelected||(O.propHooks.selected=O.extend(O.propHooks.selected,{get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}})),O.support.enctype||(O.propFix.enctype="encoding"),O.support.checkOn||O.each(["radio","checkbox"],function(){O.valHooks[this]={get:function(t){return null===t.getAttribute("value")?"on":t.value}}}),O.each(["radio","checkbox"],function(){O.valHooks[this]=O.extend(O.valHooks[this],{set:function(t,e){return O.isArray(e)?t.checked=O.inArray(O(t).val(),e)>=0:void 0}})});var K=/^(?:textarea|input|select)$/i,Z=/^([^\.]*)?(?:\.(.+))?$/,te=/\bhover(\.\S+)?\b/,ee=/^key/,ie=/^(?:mouse|contextmenu)|click/,ne=/^(?:focusinfocus|focusoutblur)$/,se=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,re=function(t){var e=se.exec(t);return e&&(e[1]=(e[1]||"").toLowerCase(),e[3]=e[3]&&RegExp("(?:^|\\s)"+e[3]+"(?:\\s|$)")),e},oe=function(t,e){var i=t.attributes||{};return!(e[1]&&t.nodeName.toLowerCase()!==e[1]||e[2]&&(i.id||{}).value!==e[2]||e[3]&&!e[3].test((i["class"]||{}).value))},ae=function(t){return O.event.special.hover?t:t.replace(te,"mouseenter$1 mouseleave$1")
2
+ };O.event={add:function(t,i,n,s,r){var o,a,l,h,u,c,f,d,p,_,m;if(3!==t.nodeType&&8!==t.nodeType&&i&&n&&(o=O._data(t))){for(n.handler&&(p=n,n=p.handler),n.guid||(n.guid=O.guid++),l=o.events,l||(o.events=l={}),a=o.handle,a||(o.handle=a=function(t){return void 0===O||t&&O.event.triggered===t.type?e:O.event.dispatch.apply(a.elem,arguments)},a.elem=t),i=O.trim(ae(i)).split(" "),h=0;i.length>h;h++)u=Z.exec(i[h])||[],c=u[1],f=(u[2]||"").split(".").sort(),m=O.event.special[c]||{},c=(r?m.delegateType:m.bindType)||c,m=O.event.special[c]||{},d=O.extend({type:c,origType:u[1],data:s,handler:n,guid:n.guid,selector:r,quick:re(r),namespace:f.join(".")},p),_=l[c],_||(_=l[c]=[],_.delegateCount=0,m.setup&&m.setup.call(t,s,f,a)!==!1||(t.addEventListener?t.addEventListener(c,a,!1):t.attachEvent&&t.attachEvent("on"+c,a))),m.add&&(m.add.call(t,d),d.handler.guid||(d.handler.guid=n.guid)),r?_.splice(_.delegateCount++,0,d):_.push(d),O.event.global[c]=!0;t=null}},global:{},remove:function(t,e,i,n,s){var r,o,a,l,h,u,c,f,d,p,_,m,g=O.hasData(t)&&O._data(t);if(g&&(f=g.events)){for(e=O.trim(ae(e||"")).split(" "),r=0;e.length>r;r++)if(o=Z.exec(e[r])||[],a=l=o[1],h=o[2],a){for(d=O.event.special[a]||{},a=(n?d.delegateType:d.bindType)||a,_=f[a]||[],u=_.length,h=h?RegExp("(^|\\.)"+h.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null,c=0;_.length>c;c++)m=_[c],!(!s&&l!==m.origType||i&&i.guid!==m.guid||h&&!h.test(m.namespace)||n&&n!==m.selector&&("**"!==n||!m.selector)||(_.splice(c--,1),m.selector&&_.delegateCount--,!d.remove||!d.remove.call(t,m)));0===_.length&&u!==_.length&&((!d.teardown||d.teardown.call(t,h)===!1)&&O.removeEvent(t,a,g.handle),delete f[a])}else for(a in f)O.event.remove(t,a+e[r],i,n,!0);O.isEmptyObject(f)&&(p=g.handle,p&&(p.elem=null),O.removeData(t,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(i,n,s,r){if(!s||3!==s.nodeType&&8!==s.nodeType){var o,a,l,h,u,c,f,d,p,_,m=i.type||i,g=[];if(ne.test(m+O.event.triggered))return;if(m.indexOf("!")>=0&&(m=m.slice(0,-1),a=!0),m.indexOf(".")>=0&&(g=m.split("."),m=g.shift(),g.sort()),(!s||O.event.customEvent[m])&&!O.event.global[m])return;if(i="object"==typeof i?i[O.expando]?i:new O.Event(m,i):new O.Event(m),i.type=m,i.isTrigger=!0,i.exclusive=a,i.namespace=g.join("."),i.namespace_re=i.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,c=0>m.indexOf(":")?"on"+m:"",!s){o=O.cache;for(l in o)o[l].events&&o[l].events[m]&&O.event.trigger(i,n,o[l].handle.elem,!0);return}if(i.result=e,i.target||(i.target=s),n=null!=n?O.makeArray(n):[],n.unshift(i),f=O.event.special[m]||{},f.trigger&&f.trigger.apply(s,n)===!1)return;if(p=[[s,f.bindType||m]],!r&&!f.noBubble&&!O.isWindow(s)){for(_=f.delegateType||m,h=ne.test(_+m)?s:s.parentNode,u=null;h;h=h.parentNode)p.push([h,_]),u=h;u&&u===s.ownerDocument&&p.push([u.defaultView||u.parentWindow||t,_])}for(l=0;p.length>l&&!i.isPropagationStopped();l++)h=p[l][0],i.type=p[l][1],d=(O._data(h,"events")||{})[i.type]&&O._data(h,"handle"),d&&d.apply(h,n),d=c&&h[c],d&&O.acceptData(h)&&d.apply(h,n)===!1&&i.preventDefault();return i.type=m,!(r||i.isDefaultPrevented()||f._default&&f._default.apply(s.ownerDocument,n)!==!1||"click"===m&&O.nodeName(s,"a")||!O.acceptData(s)||!c||!s[m]||("focus"===m||"blur"===m)&&0===i.target.offsetWidth||O.isWindow(s)||(u=s[c],u&&(s[c]=null),O.event.triggered=m,s[m](),O.event.triggered=e,!u||!(s[c]=u))),i.result}},dispatch:function(i){i=O.event.fix(i||t.event);var n,s,r,o,a,l,h,u,c,f,d=(O._data(this,"events")||{})[i.type]||[],p=d.delegateCount,_=[].slice.call(arguments,0),m=!i.exclusive&&!i.namespace,g=[];if(_[0]=i,i.delegateTarget=this,p&&!i.target.disabled&&(!i.button||"click"!==i.type))for(o=O(this),o.context=this.ownerDocument||this,r=i.target;r!=this;r=r.parentNode||this){for(l={},u=[],o[0]=r,n=0;p>n;n++)c=d[n],f=c.selector,l[f]===e&&(l[f]=c.quick?oe(r,c.quick):o.is(f)),l[f]&&u.push(c);u.length&&g.push({elem:r,matches:u})}for(d.length>p&&g.push({elem:this,matches:d.slice(p)}),n=0;g.length>n&&!i.isPropagationStopped();n++)for(h=g[n],i.currentTarget=h.elem,s=0;h.matches.length>s&&!i.isImmediatePropagationStopped();s++)c=h.matches[s],(m||!i.namespace&&!c.namespace||i.namespace_re&&i.namespace_re.test(c.namespace))&&(i.data=c.data,i.handleObj=c,a=((O.event.special[c.origType]||{}).handle||c.handler).apply(h.elem,_),a!==e&&(i.result=a,a===!1&&(i.preventDefault(),i.stopPropagation())));return i.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(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,i){var n,s,r,o=i.button,a=i.fromElement;return null==t.pageX&&null!=i.clientX&&(n=t.target.ownerDocument||M,s=n.documentElement,r=n.body,t.pageX=i.clientX+(s&&s.scrollLeft||r&&r.scrollLeft||0)-(s&&s.clientLeft||r&&r.clientLeft||0),t.pageY=i.clientY+(s&&s.scrollTop||r&&r.scrollTop||0)-(s&&s.clientTop||r&&r.clientTop||0)),!t.relatedTarget&&a&&(t.relatedTarget=a===t.target?i.toElement:a),!t.which&&o!==e&&(t.which=1&o?1:2&o?3:4&o?2:0),t}},fix:function(t){if(t[O.expando])return t;var i,n,s=t,r=O.event.fixHooks[t.type]||{},o=r.props?this.props.concat(r.props):this.props;for(t=O.Event(s),i=o.length;i;)n=o[--i],t[n]=s[n];return t.target||(t.target=s.srcElement||M),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey===e&&(t.metaKey=t.ctrlKey),r.filter?r.filter(t,s):t},special:{ready:{setup:O.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(t,e,i){O.isWindow(this)&&(this.onbeforeunload=i)},teardown:function(t,e){this.onbeforeunload===e&&(this.onbeforeunload=null)}}},simulate:function(t,e,i,n){var s=O.extend(new O.Event,i,{type:t,isSimulated:!0,originalEvent:{}});n?O.event.trigger(s,null,e):O.event.dispatch.call(e,s),s.isDefaultPrevented()&&i.preventDefault()}},O.event.handle=O.event.dispatch,O.removeEvent=M.removeEventListener?function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i,!1)}:function(t,e,i){t.detachEvent&&t.detachEvent("on"+e,i)},O.Event=function(t,e){return this instanceof O.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.returnValue===!1||t.getPreventDefault&&t.getPreventDefault()?S:C):this.type=t,e&&O.extend(this,e),this.timeStamp=t&&t.timeStamp||O.now(),this[O.expando]=!0,void 0):new O.Event(t,e)},O.Event.prototype={preventDefault:function(){this.isDefaultPrevented=S;var t=this.originalEvent;!t||(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=S;var t=this.originalEvent;!t||(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=S,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C},O.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(t,e){O.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,s=t.relatedTarget,r=t.handleObj;return r.selector,(!s||s!==n&&!O.contains(n,s))&&(t.type=r.origType,i=r.handler.apply(this,arguments),t.type=e),i}}}),O.support.submitBubbles||(O.event.special.submit={setup:function(){return O.nodeName(this,"form")?!1:(O.event.add(this,"click._submit keypress._submit",function(t){var i=t.target,n=O.nodeName(i,"input")||O.nodeName(i,"button")?i.form:e;n&&!n._submit_attached&&(O.event.add(n,"submit._submit",function(t){this.parentNode&&!t.isTrigger&&O.event.simulate("submit",this.parentNode,t,!0)}),n._submit_attached=!0)}),void 0)},teardown:function(){return O.nodeName(this,"form")?!1:(O.event.remove(this,"._submit"),void 0)}}),O.support.changeBubbles||(O.event.special.change={setup:function(){return K.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(O.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._just_changed=!0)}),O.event.add(this,"click._change",function(t){this._just_changed&&!t.isTrigger&&(this._just_changed=!1,O.event.simulate("change",this,t,!0))})),!1):(O.event.add(this,"beforeactivate._change",function(t){var e=t.target;K.test(e.nodeName)&&!e._change_attached&&(O.event.add(e,"change._change",function(t){this.parentNode&&!t.isSimulated&&!t.isTrigger&&O.event.simulate("change",this.parentNode,t,!0)}),e._change_attached=!0)}),void 0)},handle:function(t){var e=t.target;return this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type?t.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return O.event.remove(this,"._change"),K.test(this.nodeName)}}),O.support.focusinBubbles||O.each({focus:"focusin",blur:"focusout"},function(t,e){var i=0,n=function(t){O.event.simulate(e,t.target,O.event.fix(t),!0)};O.event.special[e]={setup:function(){0===i++&&M.addEventListener(t,n,!0)},teardown:function(){0===--i&&M.removeEventListener(t,n,!0)}}}),O.fn.extend({on:function(t,i,n,s,r){var o,a;if("object"==typeof t){"string"!=typeof i&&(n=i,i=e);for(a in t)this.on(a,i,n,t[a],r);return this}if(null==n&&null==s?(s=i,n=i=e):null==s&&("string"==typeof i?(s=n,n=e):(s=n,n=i,i=e)),s===!1)s=C;else if(!s)return this;return 1===r&&(o=s,s=function(t){return O().off(t),o.apply(this,arguments)},s.guid=o.guid||(o.guid=O.guid++)),this.each(function(){O.event.add(this,t,s,n,i)})},one:function(t,e,i,n){return this.on.call(this,t,e,i,n,1)},off:function(t,i,n){if(t&&t.preventDefault&&t.handleObj){var s=t.handleObj;return O(t.delegateTarget).off(s.namespace?s.type+"."+s.namespace:s.type,s.selector,s.handler),this}if("object"==typeof t){for(var r in t)this.off(r,i,t[r]);return this}return(i===!1||"function"==typeof i)&&(n=i,i=e),n===!1&&(n=C),this.each(function(){O.event.remove(this,t,n,i)})},bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},live:function(t,e,i){return O(this.context).on(t,this.selector,e,i),this},die:function(t,e){return O(this.context).off(t,this.selector||"**",e),this},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1==arguments.length?this.off(t,"**"):this.off(e,t,i)},trigger:function(t,e){return this.each(function(){O.event.trigger(t,e,this)})},triggerHandler:function(t,e){return this[0]?O.event.trigger(t,e,this[0],!0):void 0},toggle:function(t){var e=arguments,i=t.guid||O.guid++,n=0,s=function(i){var s=(O._data(this,"lastToggle"+t.guid)||0)%n;return O._data(this,"lastToggle"+t.guid,s+1),i.preventDefault(),e[s].apply(this,arguments)||!1};for(s.guid=i;e.length>n;)e[n++].guid=i;return this.click(s)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),O.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(t,e){O.fn[e]=function(t,i){return null==i&&(i=t,t=null),arguments.length>0?this.on(e,null,t,i):this.trigger(e)},O.attrFn&&(O.attrFn[e]=!0),ee.test(e)&&(O.event.fixHooks[e]=O.event.keyHooks),ie.test(e)&&(O.event.fixHooks[e]=O.event.mouseHooks)}),function(){function t(t,e,i,n,r,o){for(var a=0,l=n.length;l>a;a++){var h=n[a];if(h){var u=!1;for(h=h[t];h;){if(h[s]===i){u=n[h.sizset];break}if(1===h.nodeType)if(o||(h[s]=i,h.sizset=a),"string"!=typeof e){if(h===e){u=!0;break}}else if(f.filter(e,[h]).length>0){u=h;break}h=h[t]}n[a]=u}}}function i(t,e,i,n,r,o){for(var a=0,l=n.length;l>a;a++){var h=n[a];if(h){var u=!1;for(h=h[t];h;){if(h[s]===i){u=n[h.sizset];break}if(1===h.nodeType&&!o&&(h[s]=i,h.sizset=a),h.nodeName.toLowerCase()===e){u=h;break}h=h[t]}n[a]=u}}}var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,s="sizcache"+(Math.random()+"").replace(".",""),r=0,o=Object.prototype.toString,a=!1,l=!0,h=/\\/g,u=/\r\n/g,c=/\W/;[0,0].sort(function(){return l=!1,0});var f=function(t,e,i,s){i=i||[],e=e||M;var r=e;if(1!==e.nodeType&&9!==e.nodeType)return[];if(!t||"string"!=typeof t)return i;var a,l,h,u,c,d,m,g,y=!0,b=f.isXML(e),x=[],w=t;do if(n.exec(""),a=n.exec(w),a&&(w=a[3],x.push(a[1]),a[2])){u=a[3];break}while(a);if(x.length>1&&_.exec(t))if(2===x.length&&p.relative[x[0]])l=k(x[0]+x[1],e,s);else for(l=p.relative[x[0]]?[e]:f(x.shift(),e);x.length;)t=x.shift(),p.relative[t]&&(t+=x.shift()),l=k(t,l,s);else if(!s&&x.length>1&&9===e.nodeType&&!b&&p.match.ID.test(x[0])&&!p.match.ID.test(x[x.length-1])&&(c=f.find(x.shift(),e,b),e=c.expr?f.filter(c.expr,c.set)[0]:c.set[0]),e)for(c=s?{expr:x.pop(),set:v(s)}:f.find(x.pop(),1!==x.length||"~"!==x[0]&&"+"!==x[0]||!e.parentNode?e:e.parentNode,b),l=c.expr?f.filter(c.expr,c.set):c.set,x.length>0?h=v(l):y=!1;x.length;)d=x.pop(),m=d,p.relative[d]?m=x.pop():d="",null==m&&(m=e),p.relative[d](h,m,b);else h=x=[];if(h||(h=l),h||f.error(d||t),"[object Array]"===o.call(h))if(y)if(e&&1===e.nodeType)for(g=0;null!=h[g];g++)h[g]&&(h[g]===!0||1===h[g].nodeType&&f.contains(e,h[g]))&&i.push(l[g]);else for(g=0;null!=h[g];g++)h[g]&&1===h[g].nodeType&&i.push(l[g]);else i.push.apply(i,h);else v(h,i);return u&&(f(u,r,i,s),f.uniqueSort(i)),i};f.uniqueSort=function(t){if(b&&(a=l,t.sort(b),a))for(var e=1;t.length>e;e++)t[e]===t[e-1]&&t.splice(e--,1);return t},f.matches=function(t,e){return f(t,null,null,e)},f.matchesSelector=function(t,e){return f(e,null,null,[t]).length>0},f.find=function(t,e,i){var n,s,r,o,a,l;if(!t)return[];for(s=0,r=p.order.length;r>s;s++)if(a=p.order[s],(o=p.leftMatch[a].exec(t))&&(l=o[1],o.splice(1,1),"\\"!==l.substr(l.length-1)&&(o[1]=(o[1]||"").replace(h,""),n=p.find[a](o,e,i),null!=n))){t=t.replace(p.match[a],"");break}return n||(n=e.getElementsByTagName!==void 0?e.getElementsByTagName("*"):[]),{set:n,expr:t}},f.filter=function(t,i,n,s){for(var r,o,a,l,h,u,c,d,_,m=t,g=[],v=i,y=i&&i[0]&&f.isXML(i[0]);t&&i.length;){for(a in p.filter)if(null!=(r=p.leftMatch[a].exec(t))&&r[2]){if(u=p.filter[a],c=r[1],o=!1,r.splice(1,1),"\\"===c.substr(c.length-1))continue;if(v===g&&(g=[]),p.preFilter[a])if(r=p.preFilter[a](r,v,n,g,s,y)){if(r===!0)continue}else o=l=!0;if(r)for(d=0;null!=(h=v[d]);d++)h&&(l=u(h,r,d,v),_=s^l,n&&null!=l?_?o=!0:v[d]=!1:_&&(g.push(h),o=!0));if(l!==e){if(n||(v=g),t=t.replace(p.match[a],""),!o)return[];break}}if(t===m){if(null!=o)break;f.error(t)}m=t}return v},f.error=function(t){throw Error("Syntax error, unrecognized expression: "+t)};var d=f.getText=function(t){var e,i,n=t.nodeType,s="";if(n){if(1===n||9===n){if("string"==typeof t.textContent)return t.textContent;if("string"==typeof t.innerText)return t.innerText.replace(u,"");for(t=t.firstChild;t;t=t.nextSibling)s+=d(t)}else if(3===n||4===n)return t.nodeValue}else for(e=0;i=t[e];e++)8!==i.nodeType&&(s+=d(i));return s},p=f.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(t){return t.getAttribute("href")},type:function(t){return t.getAttribute("type")}},relative:{"+":function(t,e){var i="string"==typeof e,n=i&&!c.test(e),s=i&&!n;n&&(e=e.toLowerCase());for(var r,o=0,a=t.length;a>o;o++)if(r=t[o]){for(;(r=r.previousSibling)&&1!==r.nodeType;);t[o]=s||r&&r.nodeName.toLowerCase()===e?r||!1:r===e}s&&f.filter(e,t,!0)},">":function(t,e){var i,n="string"==typeof e,s=0,r=t.length;if(n&&!c.test(e)){for(e=e.toLowerCase();r>s;s++)if(i=t[s]){var o=i.parentNode;t[s]=o.nodeName.toLowerCase()===e?o:!1}}else{for(;r>s;s++)i=t[s],i&&(t[s]=n?i.parentNode:i.parentNode===e);n&&f.filter(e,t,!0)}},"":function(e,n,s){var o,a=r++,l=t;"string"==typeof n&&!c.test(n)&&(n=n.toLowerCase(),o=n,l=i),l("parentNode",n,a,e,o,s)},"~":function(e,n,s){var o,a=r++,l=t;"string"==typeof n&&!c.test(n)&&(n=n.toLowerCase(),o=n,l=i),l("previousSibling",n,a,e,o,s)}},find:{ID:function(t,e,i){if(e.getElementById!==void 0&&!i){var n=e.getElementById(t[1]);return n&&n.parentNode?[n]:[]}},NAME:function(t,e){if(e.getElementsByName!==void 0){for(var i=[],n=e.getElementsByName(t[1]),s=0,r=n.length;r>s;s++)n[s].getAttribute("name")===t[1]&&i.push(n[s]);return 0===i.length?null:i}},TAG:function(t,e){return e.getElementsByTagName!==void 0?e.getElementsByTagName(t[1]):void 0}},preFilter:{CLASS:function(t,e,i,n,s,r){if(t=" "+t[1].replace(h,"")+" ",r)return t;for(var o,a=0;null!=(o=e[a]);a++)o&&(s^(o.className&&(" "+o.className+" ").replace(/[\t\n\r]/g," ").indexOf(t)>=0)?i||n.push(o):i&&(e[a]=!1));return!1},ID:function(t){return t[1].replace(h,"")},TAG:function(t){return t[1].replace(h,"").toLowerCase()},CHILD:function(t){if("nth"===t[1]){t[2]||f.error(t[0]),t[2]=t[2].replace(/^\+|\s*/g,"");var e=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===t[2]&&"2n"||"odd"===t[2]&&"2n+1"||!/\D/.test(t[2])&&"0n+"+t[2]||t[2]);t[2]=e[1]+(e[2]||1)-0,t[3]=e[3]-0}else t[2]&&f.error(t[0]);return t[0]=r++,t},ATTR:function(t,e,i,n,s,r){var o=t[1]=t[1].replace(h,"");return!r&&p.attrMap[o]&&(t[1]=p.attrMap[o]),t[4]=(t[4]||t[5]||"").replace(h,""),"~="===t[2]&&(t[4]=" "+t[4]+" "),t},PSEUDO:function(t,e,i,s,r){if("not"===t[1]){if(!((n.exec(t[3])||"").length>1||/^\w/.test(t[3]))){var o=f.filter(t[3],e,i,!0^r);return i||s.push.apply(s,o),!1}t[3]=f(t[3],null,null,e)}else if(p.match.POS.test(t[0])||p.match.CHILD.test(t[0]))return!0;return t},POS:function(t){return t.unshift(!0),t}},filters:{enabled:function(t){return t.disabled===!1&&"hidden"!==t.type},disabled:function(t){return t.disabled===!0},checked:function(t){return t.checked===!0},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},parent:function(t){return!!t.firstChild},empty:function(t){return!t.firstChild},has:function(t,e,i){return!!f(i[3],t).length},header:function(t){return/h\d/i.test(t.nodeName)},text:function(t){var e=t.getAttribute("type"),i=t.type;return"input"===t.nodeName.toLowerCase()&&"text"===i&&(e===i||null===e)},radio:function(t){return"input"===t.nodeName.toLowerCase()&&"radio"===t.type},checkbox:function(t){return"input"===t.nodeName.toLowerCase()&&"checkbox"===t.type},file:function(t){return"input"===t.nodeName.toLowerCase()&&"file"===t.type},password:function(t){return"input"===t.nodeName.toLowerCase()&&"password"===t.type},submit:function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&"submit"===t.type},image:function(t){return"input"===t.nodeName.toLowerCase()&&"image"===t.type},reset:function(t){var e=t.nodeName.toLowerCase();return("input"===e||"button"===e)&&"reset"===t.type},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},input:function(t){return/input|select|textarea|button/i.test(t.nodeName)},focus:function(t){return t===t.ownerDocument.activeElement}},setFilters:{first:function(t,e){return 0===e},last:function(t,e,i,n){return e===n.length-1},even:function(t,e){return 0===e%2},odd:function(t,e){return 1===e%2},lt:function(t,e,i){return i[3]-0>e},gt:function(t,e,i){return e>i[3]-0},nth:function(t,e,i){return i[3]-0===e},eq:function(t,e,i){return i[3]-0===e}},filter:{PSEUDO:function(t,e,i,n){var s=e[1],r=p.filters[s];if(r)return r(t,i,e,n);if("contains"===s)return(t.textContent||t.innerText||d([t])||"").indexOf(e[3])>=0;if("not"===s){for(var o=e[3],a=0,l=o.length;l>a;a++)if(o[a]===t)return!1;return!0}f.error(s)},CHILD:function(t,e){var i,n,r,o,a,l,h=e[1],u=t;switch(h){case"only":case"first":for(;u=u.previousSibling;)if(1===u.nodeType)return!1;if("first"===h)return!0;u=t;case"last":for(;u=u.nextSibling;)if(1===u.nodeType)return!1;return!0;case"nth":if(i=e[2],n=e[3],1===i&&0===n)return!0;if(r=e[0],o=t.parentNode,o&&(o[s]!==r||!t.nodeIndex)){for(a=0,u=o.firstChild;u;u=u.nextSibling)1===u.nodeType&&(u.nodeIndex=++a);o[s]=r}return l=t.nodeIndex-n,0===i?0===l:0===l%i&&l/i>=0}},ID:function(t,e){return 1===t.nodeType&&t.getAttribute("id")===e},TAG:function(t,e){return"*"===e&&1===t.nodeType||!!t.nodeName&&t.nodeName.toLowerCase()===e},CLASS:function(t,e){return(" "+(t.className||t.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(t,e){var i=e[1],n=f.attr?f.attr(t,i):p.attrHandle[i]?p.attrHandle[i](t):null!=t[i]?t[i]:t.getAttribute(i),s=n+"",r=e[2],o=e[4];return null==n?"!="===r:!r&&f.attr?null!=n:"="===r?s===o:"*="===r?s.indexOf(o)>=0:"~="===r?(" "+s+" ").indexOf(o)>=0:o?"!="===r?s!==o:"^="===r?0===s.indexOf(o):"$="===r?s.substr(s.length-o.length)===o:"|="===r?s===o||s.substr(0,o.length+1)===o+"-":!1:s&&n!==!1},POS:function(t,e,i,n){var s=e[2],r=p.setFilters[s];return r?r(t,i,e,n):void 0}}},_=p.match.POS,m=function(t,e){return"\\"+(e-0+1)};for(var g in p.match)p.match[g]=RegExp(p.match[g].source+/(?![^\[]*\])(?![^\(]*\))/.source),p.leftMatch[g]=RegExp(/(^(?:.|\r|\n)*?)/.source+p.match[g].source.replace(/\\(\d+)/g,m));var v=function(t,e){return t=Array.prototype.slice.call(t,0),e?(e.push.apply(e,t),e):t};try{Array.prototype.slice.call(M.documentElement.childNodes,0)[0].nodeType}catch(y){v=function(t,e){var i=0,n=e||[];if("[object Array]"===o.call(t))Array.prototype.push.apply(n,t);else if("number"==typeof t.length)for(var s=t.length;s>i;i++)n.push(t[i]);else for(;t[i];i++)n.push(t[i]);return n}}var b,x;M.documentElement.compareDocumentPosition?b=function(t,e){return t===e?(a=!0,0):t.compareDocumentPosition&&e.compareDocumentPosition?4&t.compareDocumentPosition(e)?-1:1:t.compareDocumentPosition?-1:1}:(b=function(t,e){if(t===e)return a=!0,0;if(t.sourceIndex&&e.sourceIndex)return t.sourceIndex-e.sourceIndex;var i,n,s=[],r=[],o=t.parentNode,l=e.parentNode,h=o;if(o===l)return x(t,e);if(!o)return-1;if(!l)return 1;for(;h;)s.unshift(h),h=h.parentNode;for(h=l;h;)r.unshift(h),h=h.parentNode;i=s.length,n=r.length;for(var u=0;i>u&&n>u;u++)if(s[u]!==r[u])return x(s[u],r[u]);return u===i?x(t,r[u],-1):x(s[u],e,1)},x=function(t,e,i){if(t===e)return i;for(var n=t.nextSibling;n;){if(n===e)return-1;n=n.nextSibling}return 1}),function(){var t=M.createElement("div"),i="script"+(new Date).getTime(),n=M.documentElement;t.innerHTML="<a name='"+i+"'/>",n.insertBefore(t,n.firstChild),M.getElementById(i)&&(p.find.ID=function(t,i,n){if(i.getElementById!==void 0&&!n){var s=i.getElementById(t[1]);return s?s.id===t[1]||s.getAttributeNode!==void 0&&s.getAttributeNode("id").nodeValue===t[1]?[s]:e:[]}},p.filter.ID=function(t,e){var i=t.getAttributeNode!==void 0&&t.getAttributeNode("id");return 1===t.nodeType&&i&&i.nodeValue===e}),n.removeChild(t),n=t=null}(),function(){var t=M.createElement("div");t.appendChild(M.createComment("")),t.getElementsByTagName("*").length>0&&(p.find.TAG=function(t,e){var i=e.getElementsByTagName(t[1]);if("*"===t[1]){for(var n=[],s=0;i[s];s++)1===i[s].nodeType&&n.push(i[s]);i=n}return i}),t.innerHTML="<a href='#'></a>",t.firstChild&&t.firstChild.getAttribute!==void 0&&"#"!==t.firstChild.getAttribute("href")&&(p.attrHandle.href=function(t){return t.getAttribute("href",2)}),t=null}(),M.querySelectorAll&&function(){var t=f,e=M.createElement("div"),i="__sizzle__";if(e.innerHTML="<p class='TEST'></p>",!e.querySelectorAll||0!==e.querySelectorAll(".TEST").length){f=function(e,n,s,r){if(n=n||M,!r&&!f.isXML(n)){var o=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(e);if(o&&(1===n.nodeType||9===n.nodeType)){if(o[1])return v(n.getElementsByTagName(e),s);if(o[2]&&p.find.CLASS&&n.getElementsByClassName)return v(n.getElementsByClassName(o[2]),s)}if(9===n.nodeType){if("body"===e&&n.body)return v([n.body],s);if(o&&o[3]){var a=n.getElementById(o[3]);if(!a||!a.parentNode)return v([],s);if(a.id===o[3])return v([a],s)}try{return v(n.querySelectorAll(e),s)}catch(l){}}else if(1===n.nodeType&&"object"!==n.nodeName.toLowerCase()){var h=n,u=n.getAttribute("id"),c=u||i,d=n.parentNode,_=/^\s*[+~]/.test(e);u?c=c.replace(/'/g,"\\$&"):n.setAttribute("id",c),_&&d&&(n=n.parentNode);try{if(!_||d)return v(n.querySelectorAll("[id='"+c+"'] "+e),s)}catch(m){}finally{u||h.removeAttribute("id")}}}return t(e,n,s,r)};for(var n in t)f[n]=t[n];e=null}}(),function(){var t=M.documentElement,e=t.matchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.msMatchesSelector;if(e){var i=!e.call(M.createElement("div"),"div"),n=!1;try{e.call(M.documentElement,"[test!='']:sizzle")}catch(s){n=!0}f.matchesSelector=function(t,s){if(s=s.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!f.isXML(t))try{if(n||!p.match.PSEUDO.test(s)&&!/!=/.test(s)){var r=e.call(t,s);if(r||!i||t.document&&11!==t.document.nodeType)return r}}catch(o){}return f(s,null,null,[t]).length>0}}}(),function(){var t=M.createElement("div");if(t.innerHTML="<div class='test e'></div><div class='test'></div>",t.getElementsByClassName&&0!==t.getElementsByClassName("e").length){if(t.lastChild.className="e",1===t.getElementsByClassName("e").length)return;p.order.splice(1,0,"CLASS"),p.find.CLASS=function(t,e,i){return void 0===e.getElementsByClassName||i?void 0:e.getElementsByClassName(t[1])},t=null}}(),f.contains=M.documentElement.contains?function(t,e){return t!==e&&(t.contains?t.contains(e):!0)}:M.documentElement.compareDocumentPosition?function(t,e){return!!(16&t.compareDocumentPosition(e))}:function(){return!1},f.isXML=function(t){var e=(t?t.ownerDocument||t:0).documentElement;return e?"HTML"!==e.nodeName:!1};var k=function(t,e,i){for(var n,s=[],r="",o=e.nodeType?[e]:e;n=p.match.PSEUDO.exec(t);)r+=n[0],t=t.replace(p.match.PSEUDO,"");t=p.relative[t]?t+"*":t;for(var a=0,l=o.length;l>a;a++)f(t,o[a],s,i);return f.filter(r,s)};f.attr=O.attr,f.selectors.attrMap={},O.find=f,O.expr=f.selectors,O.expr[":"]=O.expr.filters,O.unique=f.uniqueSort,O.text=f.getText,O.isXMLDoc=f.isXML,O.contains=f.contains}();var le=/Until$/,he=/^(?:parents|prevUntil|prevAll)/,ue=/,/,ce=/^.[^:#\[\.,]*$/,fe=Array.prototype.slice,de=O.expr.match.POS,pe={children:!0,contents:!0,next:!0,prev:!0};O.fn.extend({find:function(t){var e,i,n=this;if("string"!=typeof t)return O(t).filter(function(){for(e=0,i=n.length;i>e;e++)if(O.contains(n[e],this))return!0});var s,r,o,a=this.pushStack("","find",t);for(e=0,i=this.length;i>e;e++)if(s=a.length,O.find(t,this[e],a),e>0)for(r=s;a.length>r;r++)for(o=0;s>o;o++)if(a[o]===a[r]){a.splice(r--,1);break}return a},has:function(t){var e=O(t);return this.filter(function(){for(var t=0,i=e.length;i>t;t++)if(O.contains(this,e[t]))return!0})},not:function(t){return this.pushStack(T(this,t,!1),"not",t)},filter:function(t){return this.pushStack(T(this,t,!0),"filter",t)},is:function(t){return!!t&&("string"==typeof t?de.test(t)?O(t,this.context).index(this[0])>=0:O.filter(t,this).length>0:this.filter(t).length>0)},closest:function(t,e){var i,n,s=[],r=this[0];if(O.isArray(t)){for(var o=1;r&&r.ownerDocument&&r!==e;){for(i=0;t.length>i;i++)O(r).is(t[i])&&s.push({selector:t[i],elem:r,level:o});r=r.parentNode,o++}return s}var a=de.test(t)||"string"!=typeof t?O(t,e||this.context):0;for(i=0,n=this.length;n>i;i++)for(r=this[i];r;){if(a?a.index(r)>-1:O.find.matchesSelector(r,t)){s.push(r);break}if(r=r.parentNode,!r||!r.ownerDocument||r===e||11===r.nodeType)break}return s=s.length>1?O.unique(s):s,this.pushStack(s,"closest",t)},index:function(t){return t?"string"==typeof t?O.inArray(this[0],O(t)):O.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(t,e){var i="string"==typeof t?O(t,e):O.makeArray(t&&t.nodeType?[t]:t),n=O.merge(this.get(),i);return this.pushStack(E(i[0])||E(n[0])?n:O.unique(n))},andSelf:function(){return this.add(this.prevObject)}}),O.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return O.dir(t,"parentNode")},parentsUntil:function(t,e,i){return O.dir(t,"parentNode",i)},next:function(t){return O.nth(t,2,"nextSibling")},prev:function(t){return O.nth(t,2,"previousSibling")},nextAll:function(t){return O.dir(t,"nextSibling")},prevAll:function(t){return O.dir(t,"previousSibling")},nextUntil:function(t,e,i){return O.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return O.dir(t,"previousSibling",i)},siblings:function(t){return O.sibling(t.parentNode.firstChild,t)},children:function(t){return O.sibling(t.firstChild)},contents:function(t){return O.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:O.makeArray(t.childNodes)}},function(t,e){O.fn[t]=function(i,n){var s=O.map(this,e,i);return le.test(t)||(n=i),n&&"string"==typeof n&&(s=O.filter(n,s)),s=this.length>1&&!pe[t]?O.unique(s):s,(this.length>1||ue.test(n))&&he.test(t)&&(s=s.reverse()),this.pushStack(s,t,fe.call(arguments).join(","))}}),O.extend({filter:function(t,e,i){return i&&(t=":not("+t+")"),1===e.length?O.find.matchesSelector(e[0],t)?[e[0]]:[]:O.find.matches(t,e)},dir:function(t,i,n){for(var s=[],r=t[i];r&&9!==r.nodeType&&(n===e||1!==r.nodeType||!O(r).is(n));)1===r.nodeType&&s.push(r),r=r[i];return s},nth:function(t,e,i){e=e||1;for(var n=0;t&&(1!==t.nodeType||++n!==e);t=t[i]);return t},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}});var _e="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",me=/ jQuery\d+="(?:\d+|null)"/g,ge=/^\s+/,ve=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ye=/<([\w:]+)/,be=/<tbody/i,xe=/<|&#?\w+;/,ke=/<(?:script|style)/i,we=/<(?:script|object|embed|option|style)/i,Ae=RegExp("<(?:"+_e+")","i"),Te=/checked\s*(?:[^=]|=\s*.checked.)/i,Ee=/\/(java|ecma)script/i,Se=/^\s*<!(?:\[CDATA\[|\-\-)/,Ce={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,"",""]},Ne=A(M);Ce.optgroup=Ce.option,Ce.tbody=Ce.tfoot=Ce.colgroup=Ce.caption=Ce.thead,Ce.th=Ce.td,O.support.htmlSerialize||(Ce._default=[1,"div<div>","</div>"]),O.fn.extend({text:function(t){return O.isFunction(t)?this.each(function(e){var i=O(this);i.text(t.call(this,e,i.text()))}):"object"!=typeof t&&t!==e?this.empty().append((this[0]&&this[0].ownerDocument||M).createTextNode(t)):O.text(this)},wrapAll:function(t){if(O.isFunction(t))return this.each(function(e){O(this).wrapAll(t.call(this,e))});if(this[0]){var e=O(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return O.isFunction(t)?this.each(function(e){O(this).wrapInner(t.call(this,e))}):this.each(function(){var e=O(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=O.isFunction(t);return this.each(function(i){O(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){O.nodeName(this,"body")||O(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(t){1===this.nodeType&&this.appendChild(t)})},prepend:function(){return this.domManip(arguments,!0,function(t){1===this.nodeType&&this.insertBefore(t,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(t){this.parentNode.insertBefore(t,this)});if(arguments.length){var t=O.clean(arguments);return t.push.apply(t,this.toArray()),this.pushStack(t,"before",arguments)
3
+ }},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(t){this.parentNode.insertBefore(t,this.nextSibling)});if(arguments.length){var t=this.pushStack(this,"after",arguments);return t.push.apply(t,O.clean(arguments)),t}},remove:function(t,e){for(var i,n=0;null!=(i=this[n]);n++)(!t||O.filter(t,[i]).length)&&(!e&&1===i.nodeType&&(O.cleanData(i.getElementsByTagName("*")),O.cleanData([i])),i.parentNode&&i.parentNode.removeChild(i));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)for(1===t.nodeType&&O.cleanData(t.getElementsByTagName("*"));t.firstChild;)t.removeChild(t.firstChild);return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return O.clone(this,t,e)})},html:function(t){if(t===e)return this[0]&&1===this[0].nodeType?this[0].innerHTML.replace(me,""):null;if("string"!=typeof t||ke.test(t)||!O.support.leadingWhitespace&&ge.test(t)||Ce[(ye.exec(t)||["",""])[1].toLowerCase()])O.isFunction(t)?this.each(function(e){var i=O(this);i.html(t.call(this,e,i.html()))}):this.empty().append(t);else{t=t.replace(ve,"<$1></$2>");try{for(var i=0,n=this.length;n>i;i++)1===this[i].nodeType&&(O.cleanData(this[i].getElementsByTagName("*")),this[i].innerHTML=t)}catch(s){this.empty().append(t)}}return this},replaceWith:function(t){return this[0]&&this[0].parentNode?O.isFunction(t)?this.each(function(e){var i=O(this),n=i.html();i.replaceWith(t.call(this,e,n))}):("string"!=typeof t&&(t=O(t).detach()),this.each(function(){var e=this.nextSibling,i=this.parentNode;O(this).remove(),e?O(e).before(t):O(i).append(t)})):this.length?this.pushStack(O(O.isFunction(t)?t():t),"replaceWith",t):this},detach:function(t){return this.remove(t,!0)},domManip:function(t,i,n){var s,r,o,a,l=t[0],h=[];if(!O.support.checkClone&&3===arguments.length&&"string"==typeof l&&Te.test(l))return this.each(function(){O(this).domManip(t,i,n,!0)});if(O.isFunction(l))return this.each(function(s){var r=O(this);t[0]=l.call(this,s,i?r.html():e),r.domManip(t,i,n)});if(this[0]){if(a=l&&l.parentNode,s=O.support.parentNode&&a&&11===a.nodeType&&a.childNodes.length===this.length?{fragment:a}:O.buildFragment(t,this,h),o=s.fragment,r=1===o.childNodes.length?o=o.firstChild:o.firstChild,r){i=i&&O.nodeName(r,"tr");for(var u=0,c=this.length,f=c-1;c>u;u++)n.call(i?w(this[u],r):this[u],s.cacheable||c>1&&f>u?O.clone(o,!0,!0):o)}h.length&&O.each(h,m)}return this}}),O.buildFragment=function(t,e,i){var n,s,r,o,a=t[0];return e&&e[0]&&(o=e[0].ownerDocument||e[0]),o.createDocumentFragment||(o=M),1===t.length&&"string"==typeof a&&512>a.length&&o===M&&"<"===a.charAt(0)&&!we.test(a)&&(O.support.checkClone||!Te.test(a))&&(O.support.html5Clone||!Ae.test(a))&&(s=!0,r=O.fragments[a],r&&1!==r&&(n=r)),n||(n=o.createDocumentFragment(),O.clean(t,o,n,i)),s&&(O.fragments[a]=r?n:1),{fragment:n,cacheable:s}},O.fragments={},O.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){O.fn[t]=function(i){var n=[],s=O(i),r=1===this.length&&this[0].parentNode;if(r&&11===r.nodeType&&1===r.childNodes.length&&1===s.length)return s[e](this[0]),this;for(var o=0,a=s.length;a>o;o++){var l=(o>0?this.clone(!0):this).get();O(s[o])[e](l),n=n.concat(l)}return this.pushStack(n,t,s.selector)}}),O.extend({clone:function(t,e,i){var n,s,r,o=O.support.html5Clone||!Ae.test("<"+t.nodeName)?t.cloneNode(!0):g(t);if(!(O.support.noCloneEvent&&O.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||O.isXMLDoc(t)))for(x(t,o),n=b(t),s=b(o),r=0;n[r];++r)s[r]&&x(n[r],s[r]);if(e&&(k(t,o),i))for(n=b(t),s=b(o),r=0;n[r];++r)k(n[r],s[r]);return n=s=null,o},clean:function(t,e,i,n){var s;e=e||M,e.createElement===void 0&&(e=e.ownerDocument||e[0]&&e[0].ownerDocument||M);for(var r,o,a=[],l=0;null!=(o=t[l]);l++)if("number"==typeof o&&(o+=""),o){if("string"==typeof o)if(xe.test(o)){o=o.replace(ve,"<$1></$2>");var h=(ye.exec(o)||["",""])[1].toLowerCase(),u=Ce[h]||Ce._default,c=u[0],f=e.createElement("div");for(e===M?Ne.appendChild(f):A(e).appendChild(f),f.innerHTML=u[1]+o+u[2];c--;)f=f.lastChild;if(!O.support.tbody){var d=be.test(o),p="table"!==h||d?"<table>"!==u[1]||d?[]:f.childNodes:f.firstChild&&f.firstChild.childNodes;for(r=p.length-1;r>=0;--r)O.nodeName(p[r],"tbody")&&!p[r].childNodes.length&&p[r].parentNode.removeChild(p[r])}!O.support.leadingWhitespace&&ge.test(o)&&f.insertBefore(e.createTextNode(ge.exec(o)[0]),f.firstChild),o=f.childNodes}else o=e.createTextNode(o);var _;if(!O.support.appendChecked)if(o[0]&&"number"==typeof(_=o.length))for(r=0;_>r;r++)v(o[r]);else v(o);o.nodeType?a.push(o):a=O.merge(a,o)}if(i)for(s=function(t){return!t.type||Ee.test(t.type)},l=0;a[l];l++)if(!n||!O.nodeName(a[l],"script")||a[l].type&&"text/javascript"!==a[l].type.toLowerCase()){if(1===a[l].nodeType){var m=O.grep(a[l].getElementsByTagName("script"),s);a.splice.apply(a,[l+1,0].concat(m))}i.appendChild(a[l])}else n.push(a[l].parentNode?a[l].parentNode.removeChild(a[l]):a[l]);return a},cleanData:function(t){for(var e,i,n,s=O.cache,r=O.event.special,o=O.support.deleteExpando,a=0;null!=(n=t[a]);a++)if((!n.nodeName||!O.noData[n.nodeName.toLowerCase()])&&(i=n[O.expando])){if(e=s[i],e&&e.events){for(var l in e.events)r[l]?O.event.remove(n,l):O.removeEvent(n,l,e.handle);e.handle&&(e.handle.elem=null)}o?delete n[O.expando]:n.removeAttribute&&n.removeAttribute(O.expando),delete s[i]}}});var De,Be,Le,Me=/alpha\([^)]*\)/i,je=/opacity=([^)]*)/,$e=/([A-Z]|^ms)/g,Oe=/^-?\d+(?:px)?$/i,Fe=/^-?\d/,Ie=/^([\-+])=([\-+.\de]+)/,Re={position:"absolute",visibility:"hidden",display:"block"},Pe=["Left","Right"],ze=["Top","Bottom"];O.fn.css=function(t,i){return 2===arguments.length&&i===e?this:O.access(this,t,i,!0,function(t,i,n){return n!==e?O.style(t,i,n):O.css(t,i)})},O.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=De(t,"opacity","opacity");return""===i?"1":i}return t.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":O.support.cssFloat?"cssFloat":"styleFloat"},style:function(t,i,n,s){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,a=O.camelCase(i),l=t.style,h=O.cssHooks[a];if(i=O.cssProps[a]||a,n===e)return h&&"get"in h&&(r=h.get(t,!1,s))!==e?r:l[i];if(o=typeof n,"string"===o&&(r=Ie.exec(n))&&(n=+(r[1]+1)*+r[2]+parseFloat(O.css(t,i)),o="number"),null==n||"number"===o&&isNaN(n))return;if("number"===o&&!O.cssNumber[a]&&(n+="px"),!(h&&"set"in h&&(n=h.set(t,n))===e))try{l[i]=n}catch(u){}}},css:function(t,i,n){var s,r;return i=O.camelCase(i),r=O.cssHooks[i],i=O.cssProps[i]||i,"cssFloat"===i&&(i="float"),r&&"get"in r&&(s=r.get(t,!0,n))!==e?s:De?De(t,i):void 0},swap:function(t,e,i){var n={};for(var s in e)n[s]=t.style[s],t.style[s]=e[s];i.call(t);for(s in e)t.style[s]=n[s]}}),O.curCSS=O.css,O.each(["height","width"],function(t,e){O.cssHooks[e]={get:function(t,i,n){var s;return i?0!==t.offsetWidth?_(t,e,n):(O.swap(t,Re,function(){s=_(t,e,n)}),s):void 0},set:function(t,e){return Oe.test(e)?(e=parseFloat(e),e>=0?e+"px":void 0):e}}}),O.support.opacity||(O.cssHooks.opacity={get:function(t,e){return je.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,s=O.isNumeric(e)?"alpha(opacity="+100*e+")":"",r=n&&n.filter||i.filter||"";i.zoom=1,e>=1&&""===O.trim(r.replace(Me,""))&&(i.removeAttribute("filter"),n&&!n.filter)||(i.filter=Me.test(r)?r.replace(Me,s):r+" "+s)}}),O(function(){O.support.reliableMarginRight||(O.cssHooks.marginRight={get:function(t,e){var i;return O.swap(t,{display:"inline-block"},function(){i=e?De(t,"margin-right","marginRight"):t.style.marginRight}),i}})}),M.defaultView&&M.defaultView.getComputedStyle&&(Be=function(t,e){var i,n,s;return e=e.replace($e,"-$1").toLowerCase(),(n=t.ownerDocument.defaultView)&&(s=n.getComputedStyle(t,null))&&(i=s.getPropertyValue(e),""===i&&!O.contains(t.ownerDocument.documentElement,t)&&(i=O.style(t,e))),i}),M.documentElement.currentStyle&&(Le=function(t,e){var i,n,s,r=t.currentStyle&&t.currentStyle[e],o=t.style;return null===r&&o&&(s=o[e])&&(r=s),!Oe.test(r)&&Fe.test(r)&&(i=o.left,n=t.runtimeStyle&&t.runtimeStyle.left,n&&(t.runtimeStyle.left=t.currentStyle.left),o.left="fontSize"===e?"1em":r||0,r=o.pixelLeft+"px",o.left=i,n&&(t.runtimeStyle.left=n)),""===r?"auto":r}),De=Be||Le,O.expr&&O.expr.filters&&(O.expr.filters.hidden=function(t){var e=t.offsetWidth,i=t.offsetHeight;return 0===e&&0===i||!O.support.reliableHiddenOffsets&&"none"===(t.style&&t.style.display||O.css(t,"display"))},O.expr.filters.visible=function(t){return!O.expr.filters.hidden(t)});var Je,He,Xe=/%20/g,qe=/\[\]$/,We=/\r?\n/g,Ue=/#.*$/,Ve=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ge=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Qe=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Ye=/^(?:GET|HEAD)$/,Ke=/^\/\//,Ze=/\?/,ti=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,ei=/^(?:select|textarea)/i,ii=/\s+/,ni=/([?&])_=[^&]*/,si=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,ri=O.fn.load,oi={},ai={},li=["*/"]+["*"];try{Je=$.href}catch(hi){Je=M.createElement("a"),Je.href="",Je=Je.href}He=si.exec(Je.toLowerCase())||[],O.fn.extend({load:function(t,i,n){if("string"!=typeof t&&ri)return ri.apply(this,arguments);if(!this.length)return this;var s=t.indexOf(" ");if(s>=0){var r=t.slice(s,t.length);t=t.slice(0,s)}var o="GET";i&&(O.isFunction(i)?(n=i,i=e):"object"==typeof i&&(i=O.param(i,O.ajaxSettings.traditional),o="POST"));var a=this;return O.ajax({url:t,type:o,dataType:"html",data:i,complete:function(t,e,i){i=t.responseText,t.isResolved()&&(t.done(function(t){i=t}),a.html(r?O("<div>").append(i.replace(ti,"")).find(r):i)),n&&a.each(n,[i,e,t])}}),this},serialize:function(){return O.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?O.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ei.test(this.nodeName)||Ge.test(this.type))}).map(function(t,e){var i=O(this).val();return null==i?null:O.isArray(i)?O.map(i,function(t){return{name:e.name,value:t.replace(We,"\r\n")}}):{name:e.name,value:i.replace(We,"\r\n")}}).get()}}),O.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(t,e){O.fn[e]=function(t){return this.on(e,t)}}),O.each(["get","post"],function(t,i){O[i]=function(t,n,s,r){return O.isFunction(n)&&(r=r||s,s=n,n=e),O.ajax({type:i,url:t,data:n,success:s,dataType:r})}}),O.extend({getScript:function(t,i){return O.get(t,e,i,"script")},getJSON:function(t,e,i){return O.get(t,e,i,"json")},ajaxSetup:function(t,e){return e?f(t,O.ajaxSettings):(e=t,t=O.ajaxSettings),f(t,e),t},ajaxSettings:{url:Je,isLocal:Qe.test(He[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":li},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":t.String,"text html":!0,"text json":O.parseJSON,"text xml":O.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:p(oi),ajaxTransport:p(ai),ajax:function(t,i){function n(t,i,n,o){if(2!==w){w=2,l&&clearTimeout(l),a=e,r=o||"",A.readyState=t>0?4:0;var c,d,p,x,k,T=i,E=n?u(_,A,n):e;if(t>=200&&300>t||304===t)if(_.ifModified&&((x=A.getResponseHeader("Last-Modified"))&&(O.lastModified[s]=x),(k=A.getResponseHeader("Etag"))&&(O.etag[s]=k)),304===t)T="notmodified",c=!0;else try{d=h(_,E),T="success",c=!0}catch(S){T="parsererror",p=S}else p=T,(!T||t)&&(T="error",0>t&&(t=0));A.status=t,A.statusText=""+(i||T),c?v.resolveWith(m,[d,T,A]):v.rejectWith(m,[A,T,p]),A.statusCode(b),b=e,f&&g.trigger("ajax"+(c?"Success":"Error"),[A,_,c?d:p]),y.fireWith(m,[A,T]),f&&(g.trigger("ajaxComplete",[A,_]),--O.active||O.event.trigger("ajaxStop"))}}"object"==typeof t&&(i=t,t=e),i=i||{};var s,r,o,a,l,c,f,p,_=O.ajaxSetup({},i),m=_.context||_,g=m!==_&&(m.nodeType||m instanceof O)?O(m):O.event,v=O.Deferred(),y=O.Callbacks("once memory"),b=_.statusCode||{},x={},k={},w=0,A={readyState:0,setRequestHeader:function(t,e){if(!w){var i=t.toLowerCase();t=k[i]=k[i]||t,x[t]=e}return this},getAllResponseHeaders:function(){return 2===w?r:null},getResponseHeader:function(t){var i;if(2===w){if(!o)for(o={};i=Ve.exec(r);)o[i[1].toLowerCase()]=i[2];i=o[t.toLowerCase()]}return i===e?null:i},overrideMimeType:function(t){return w||(_.mimeType=t),this},abort:function(t){return t=t||"abort",a&&a.abort(t),n(0,t),this}};if(v.promise(A),A.success=A.done,A.error=A.fail,A.complete=y.add,A.statusCode=function(t){if(t){var e;if(2>w)for(e in t)b[e]=[b[e],t[e]];else e=t[A.status],A.then(e,e)}return this},_.url=((t||_.url)+"").replace(Ue,"").replace(Ke,He[1]+"//"),_.dataTypes=O.trim(_.dataType||"*").toLowerCase().split(ii),null==_.crossDomain&&(c=si.exec(_.url.toLowerCase()),_.crossDomain=!(!c||c[1]==He[1]&&c[2]==He[2]&&(c[3]||("http:"===c[1]?80:443))==(He[3]||("http:"===He[1]?80:443)))),_.data&&_.processData&&"string"!=typeof _.data&&(_.data=O.param(_.data,_.traditional)),d(oi,_,i,A),2===w)return!1;if(f=_.global,_.type=_.type.toUpperCase(),_.hasContent=!Ye.test(_.type),f&&0===O.active++&&O.event.trigger("ajaxStart"),!_.hasContent&&(_.data&&(_.url+=(Ze.test(_.url)?"&":"?")+_.data,delete _.data),s=_.url,_.cache===!1)){var T=O.now(),E=_.url.replace(ni,"$1_="+T);_.url=E+(E===_.url?(Ze.test(_.url)?"&":"?")+"_="+T:"")}(_.data&&_.hasContent&&_.contentType!==!1||i.contentType)&&A.setRequestHeader("Content-Type",_.contentType),_.ifModified&&(s=s||_.url,O.lastModified[s]&&A.setRequestHeader("If-Modified-Since",O.lastModified[s]),O.etag[s]&&A.setRequestHeader("If-None-Match",O.etag[s])),A.setRequestHeader("Accept",_.dataTypes[0]&&_.accepts[_.dataTypes[0]]?_.accepts[_.dataTypes[0]]+("*"!==_.dataTypes[0]?", "+li+"; q=0.01":""):_.accepts["*"]);for(p in _.headers)A.setRequestHeader(p,_.headers[p]);if(_.beforeSend&&(_.beforeSend.call(m,A,_)===!1||2===w))return A.abort(),!1;for(p in{success:1,error:1,complete:1})A[p](_[p]);if(a=d(ai,_,i,A)){A.readyState=1,f&&g.trigger("ajaxSend",[A,_]),_.async&&_.timeout>0&&(l=setTimeout(function(){A.abort("timeout")},_.timeout));try{w=1,a.send(x,n)}catch(S){if(!(2>w))throw S;n(-1,S)}}else n(-1,"No Transport");return A},param:function(t,i){var n=[],s=function(t,e){e=O.isFunction(e)?e():e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(i===e&&(i=O.ajaxSettings.traditional),O.isArray(t)||t.jquery&&!O.isPlainObject(t))O.each(t,function(){s(this.name,this.value)});else for(var r in t)c(r,t[r],i,s);return n.join("&").replace(Xe,"+")}}),O.extend({active:0,lastModified:{},etag:{}});var ui=O.now(),ci=/(\=)\?(&|$)|\?\?/i;O.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return O.expando+"_"+ui++}}),O.ajaxPrefilter("json jsonp",function(e,i,n){var s="application/x-www-form-urlencoded"===e.contentType&&"string"==typeof e.data;if("jsonp"===e.dataTypes[0]||e.jsonp!==!1&&(ci.test(e.url)||s&&ci.test(e.data))){var r,o=e.jsonpCallback=O.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a=t[o],l=e.url,h=e.data,u="$1"+o+"$2";return e.jsonp!==!1&&(l=l.replace(ci,u),e.url===l&&(s&&(h=h.replace(ci,u)),e.data===h&&(l+=(/\?/.test(l)?"&":"?")+e.jsonp+"="+o))),e.url=l,e.data=h,t[o]=function(t){r=[t]},n.always(function(){t[o]=a,r&&O.isFunction(a)&&t[o](r[0])}),e.converters["script json"]=function(){return r||O.error(o+" was not called"),r[0]},e.dataTypes[0]="json","script"}}),O.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(t){return O.globalEval(t),t}}}),O.ajaxPrefilter("script",function(t){t.cache===e&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),O.ajaxTransport("script",function(t){if(t.crossDomain){var i,n=M.head||M.getElementsByTagName("head")[0]||M.documentElement;return{send:function(s,r){i=M.createElement("script"),i.async="async",t.scriptCharset&&(i.charset=t.scriptCharset),i.src=t.url,i.onload=i.onreadystatechange=function(t,s){(s||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,n&&i.parentNode&&n.removeChild(i),i=e,s||r(200,"success"))},n.insertBefore(i,n.firstChild)},abort:function(){i&&i.onload(0,1)}}}});var fi,di=t.ActiveXObject?function(){for(var t in fi)fi[t](0,1)}:!1,pi=0;O.ajaxSettings.xhr=t.ActiveXObject?function(){return!this.isLocal&&l()||a()}:l,function(t){O.extend(O.support,{ajax:!!t,cors:!!t&&"withCredentials"in t})}(O.ajaxSettings.xhr()),O.support.ajax&&O.ajaxTransport(function(i){if(!i.crossDomain||O.support.cors){var n;return{send:function(s,r){var o,a,l=i.xhr();if(i.username?l.open(i.type,i.url,i.async,i.username,i.password):l.open(i.type,i.url,i.async),i.xhrFields)for(a in i.xhrFields)l[a]=i.xhrFields[a];i.mimeType&&l.overrideMimeType&&l.overrideMimeType(i.mimeType),!i.crossDomain&&!s["X-Requested-With"]&&(s["X-Requested-With"]="XMLHttpRequest");try{for(a in s)l.setRequestHeader(a,s[a])}catch(h){}l.send(i.hasContent&&i.data||null),n=function(t,s){var a,h,u,c,f;try{if(n&&(s||4===l.readyState))if(n=e,o&&(l.onreadystatechange=O.noop,di&&delete fi[o]),s)4!==l.readyState&&l.abort();else{a=l.status,u=l.getAllResponseHeaders(),c={},f=l.responseXML,f&&f.documentElement&&(c.xml=f),c.text=l.responseText;try{h=l.statusText}catch(d){h=""}a||!i.isLocal||i.crossDomain?1223===a&&(a=204):a=c.text?200:404}}catch(p){s||r(-1,p)}c&&r(a,h,c,u)},i.async&&4!==l.readyState?(o=++pi,di&&(fi||(fi={},O(t).unload(di)),fi[o]=n),l.onreadystatechange=n):n()},abort:function(){n&&n(0,1)}}}});var _i,mi,gi,vi,yi={},bi=/^(?:toggle|show|hide)$/,xi=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ki=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];O.fn.extend({show:function(t,e,i){var r,o;if(t||0===t)return this.animate(s("show",3),t,e,i);for(var a=0,l=this.length;l>a;a++)r=this[a],r.style&&(o=r.style.display,!O._data(r,"olddisplay")&&"none"===o&&(o=r.style.display=""),""===o&&"none"===O.css(r,"display")&&O._data(r,"olddisplay",n(r.nodeName)));for(a=0;l>a;a++)r=this[a],r.style&&(o=r.style.display,(""===o||"none"===o)&&(r.style.display=O._data(r,"olddisplay")||""));return this},hide:function(t,e,i){if(t||0===t)return this.animate(s("hide",3),t,e,i);for(var n,r,o=0,a=this.length;a>o;o++)n=this[o],n.style&&(r=O.css(n,"display"),"none"!==r&&!O._data(n,"olddisplay")&&O._data(n,"olddisplay",r));for(o=0;a>o;o++)this[o].style&&(this[o].style.display="none");return this},_toggle:O.fn.toggle,toggle:function(t,e,i){var n="boolean"==typeof t;return O.isFunction(t)&&O.isFunction(e)?this._toggle.apply(this,arguments):null==t||n?this.each(function(){var e=n?t:O(this).is(":hidden");O(this)[e?"show":"hide"]()}):this.animate(s("toggle",3),t,e,i),this},fadeTo:function(t,e,i,n){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,s){function r(){o.queue===!1&&O._mark(this);var e,i,s,r,a,l,h,u,c,f=O.extend({},o),d=1===this.nodeType,p=d&&O(this).is(":hidden");f.animatedProperties={};for(s in t){if(e=O.camelCase(s),s!==e&&(t[e]=t[s],delete t[s]),i=t[e],O.isArray(i)?(f.animatedProperties[e]=i[1],i=t[e]=i[0]):f.animatedProperties[e]=f.specialEasing&&f.specialEasing[e]||f.easing||"swing","hide"===i&&p||"show"===i&&!p)return f.complete.call(this);d&&("height"===e||"width"===e)&&(f.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],"inline"===O.css(this,"display")&&"none"===O.css(this,"float")&&(O.support.inlineBlockNeedsLayout&&"inline"!==n(this.nodeName)?this.style.zoom=1:this.style.display="inline-block"))}null!=f.overflow&&(this.style.overflow="hidden");for(s in t)r=new O.fx(this,f,s),i=t[s],bi.test(i)?(c=O._data(this,"toggle"+s)||("toggle"===i?p?"show":"hide":0),c?(O._data(this,"toggle"+s,"show"===c?"hide":"show"),r[c]()):r[i]()):(a=xi.exec(i),l=r.cur(),a?(h=parseFloat(a[2]),u=a[3]||(O.cssNumber[s]?"":"px"),"px"!==u&&(O.style(this,s,(h||1)+u),l=(h||1)/r.cur()*l,O.style(this,s,l+u)),a[1]&&(h=("-="===a[1]?-1:1)*h+l),r.custom(l,h,u)):r.custom(l,i,""));return!0}var o=O.speed(e,i,s);return O.isEmptyObject(t)?this.each(o.complete,[!1]):(t=O.extend({},t),o.queue===!1?this.each(r):this.queue(o.queue,r))},stop:function(t,i,n){return"string"!=typeof t&&(n=i,i=t,t=e),i&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){function e(t,e,i){var s=e[i];O.removeData(t,i,!0),s.stop(n)}var i,s=!1,r=O.timers,o=O._data(this);if(n||O._unmark(!0,this),null==t)for(i in o)o[i]&&o[i].stop&&i.indexOf(".run")===i.length-4&&e(this,o,i);else o[i=t+".run"]&&o[i].stop&&e(this,o,i);for(i=r.length;i--;)r[i].elem===this&&(null==t||r[i].queue===t)&&(n?r[i](!0):r[i].saveState(),s=!0,r.splice(i,1));(!n||!s)&&O.dequeue(this,t)})}}),O.each({slideDown:s("show",1),slideUp:s("hide",1),slideToggle:s("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){O.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),O.extend({speed:function(t,e,i){var n=t&&"object"==typeof t?O.extend({},t):{complete:i||!i&&e||O.isFunction(t)&&t,duration:t,easing:i&&e||e&&!O.isFunction(e)&&e};return n.duration=O.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in O.fx.speeds?O.fx.speeds[n.duration]:O.fx.speeds._default,(null==n.queue||n.queue===!0)&&(n.queue="fx"),n.old=n.complete,n.complete=function(t){O.isFunction(n.old)&&n.old.call(this),n.queue?O.dequeue(this,n.queue):t!==!1&&O._unmark(this)},n},easing:{linear:function(t,e,i,n){return i+n*t},swing:function(t,e,i,n){return(-Math.cos(t*Math.PI)/2+.5)*n+i}},timers:[],fx:function(t,e,i){this.options=e,this.elem=t,this.prop=i,e.orig=e.orig||{}}}),O.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(O.fx.step[this.prop]||O.fx.step._default)(this)},cur:function(){if(null!=this.elem[this.prop]&&(!this.elem.style||null==this.elem.style[this.prop]))return this.elem[this.prop];var t,e=O.css(this.elem,this.prop);return isNaN(t=parseFloat(e))?e&&"auto"!==e?e:0:t},custom:function(t,i,n){function s(t){return r.step(t)}var r=this,a=O.fx;this.startTime=vi||o(),this.end=i,this.now=this.start=t,this.pos=this.state=0,this.unit=n||this.unit||(O.cssNumber[this.prop]?"":"px"),s.queue=this.options.queue,s.elem=this.elem,s.saveState=function(){r.options.hide&&O._data(r.elem,"fxshow"+r.prop)===e&&O._data(r.elem,"fxshow"+r.prop,r.start)},s()&&O.timers.push(s)&&!gi&&(gi=setInterval(a.tick,a.interval))},show:function(){var t=O._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=t||O.style(this.elem,this.prop),this.options.show=!0,t!==e?this.custom(this.cur(),t):this.custom("width"===this.prop||"height"===this.prop?1:0,this.cur()),O(this.elem).show()},hide:function(){this.options.orig[this.prop]=O._data(this.elem,"fxshow"+this.prop)||O.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(t){var e,i,n,s=vi||o(),r=!0,a=this.elem,l=this.options;if(t||s>=l.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),l.animatedProperties[this.prop]=!0;for(e in l.animatedProperties)l.animatedProperties[e]!==!0&&(r=!1);if(r){if(null!=l.overflow&&!O.support.shrinkWrapBlocks&&O.each(["","X","Y"],function(t,e){a.style["overflow"+e]=l.overflow[t]}),l.hide&&O(a).hide(),l.hide||l.show)for(e in l.animatedProperties)O.style(a,e,l.orig[e]),O.removeData(a,"fxshow"+e,!0),O.removeData(a,"toggle"+e,!0);n=l.complete,n&&(l.complete=!1,n.call(a))}return!1}return 1/0==l.duration?this.now=s:(i=s-this.startTime,this.state=i/l.duration,this.pos=O.easing[l.animatedProperties[this.prop]](this.state,i,0,1,l.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},O.extend(O.fx,{tick:function(){for(var t,e=O.timers,i=0;e.length>i;i++)t=e[i],!t()&&e[i]===t&&e.splice(i--,1);e.length||O.fx.stop()},interval:13,stop:function(){clearInterval(gi),gi=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(t){O.style(t.elem,"opacity",t.now)},_default:function(t){t.elem.style&&null!=t.elem.style[t.prop]?t.elem.style[t.prop]=t.now+t.unit:t.elem[t.prop]=t.now}}}),O.each(["width","height"],function(t,e){O.fx.step[e]=function(t){O.style(t.elem,e,Math.max(0,t.now)+t.unit)}}),O.expr&&O.expr.filters&&(O.expr.filters.animated=function(t){return O.grep(O.timers,function(e){return t===e.elem}).length});var wi=/^t(?:able|d|h)$/i,Ai=/^(?:body|html)$/i;O.fn.offset="getBoundingClientRect"in M.documentElement?function(t){var e,n=this[0];if(t)return this.each(function(e){O.offset.setOffset(this,t,e)});if(!n||!n.ownerDocument)return null;if(n===n.ownerDocument.body)return O.offset.bodyOffset(n);try{e=n.getBoundingClientRect()}catch(s){}var r=n.ownerDocument,o=r.documentElement;if(!e||!O.contains(o,n))return e?{top:e.top,left:e.left}:{top:0,left:0};var a=r.body,l=i(r),h=o.clientTop||a.clientTop||0,u=o.clientLeft||a.clientLeft||0,c=l.pageYOffset||O.support.boxModel&&o.scrollTop||a.scrollTop,f=l.pageXOffset||O.support.boxModel&&o.scrollLeft||a.scrollLeft,d=e.top+c-h,p=e.left+f-u;return{top:d,left:p}}:function(t){var e=this[0];if(t)return this.each(function(e){O.offset.setOffset(this,t,e)});if(!e||!e.ownerDocument)return null;if(e===e.ownerDocument.body)return O.offset.bodyOffset(e);for(var i,n=e.offsetParent,s=e,r=e.ownerDocument,o=r.documentElement,a=r.body,l=r.defaultView,h=l?l.getComputedStyle(e,null):e.currentStyle,u=e.offsetTop,c=e.offsetLeft;(e=e.parentNode)&&e!==a&&e!==o&&(!O.support.fixedPosition||"fixed"!==h.position);)i=l?l.getComputedStyle(e,null):e.currentStyle,u-=e.scrollTop,c-=e.scrollLeft,e===n&&(u+=e.offsetTop,c+=e.offsetLeft,O.support.doesNotAddBorder&&(!O.support.doesAddBorderForTableAndCells||!wi.test(e.nodeName))&&(u+=parseFloat(i.borderTopWidth)||0,c+=parseFloat(i.borderLeftWidth)||0),s=n,n=e.offsetParent),O.support.subtractsBorderForOverflowNotVisible&&"visible"!==i.overflow&&(u+=parseFloat(i.borderTopWidth)||0,c+=parseFloat(i.borderLeftWidth)||0),h=i;return("relative"===h.position||"static"===h.position)&&(u+=a.offsetTop,c+=a.offsetLeft),O.support.fixedPosition&&"fixed"===h.position&&(u+=Math.max(o.scrollTop,a.scrollTop),c+=Math.max(o.scrollLeft,a.scrollLeft)),{top:u,left:c}},O.offset={bodyOffset:function(t){var e=t.offsetTop,i=t.offsetLeft;return O.support.doesNotIncludeMarginInBodyOffset&&(e+=parseFloat(O.css(t,"marginTop"))||0,i+=parseFloat(O.css(t,"marginLeft"))||0),{top:e,left:i}},setOffset:function(t,e,i){var n=O.css(t,"position");"static"===n&&(t.style.position="relative");var s,r,o=O(t),a=o.offset(),l=O.css(t,"top"),h=O.css(t,"left"),u=("absolute"===n||"fixed"===n)&&O.inArray("auto",[l,h])>-1,c={},f={};u?(f=o.position(),s=f.top,r=f.left):(s=parseFloat(l)||0,r=parseFloat(h)||0),O.isFunction(e)&&(e=e.call(t,i,a)),null!=e.top&&(c.top=e.top-a.top+s),null!=e.left&&(c.left=e.left-a.left+r),"using"in e?e.using.call(t,c):o.css(c)}},O.fn.extend({position:function(){if(!this[0])return null;var t=this[0],e=this.offsetParent(),i=this.offset(),n=Ai.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(O.css(t,"marginTop"))||0,i.left-=parseFloat(O.css(t,"marginLeft"))||0,n.top+=parseFloat(O.css(e[0],"borderTopWidth"))||0,n.left+=parseFloat(O.css(e[0],"borderLeftWidth"))||0,{top:i.top-n.top,left:i.left-n.left}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||M.body;t&&!Ai.test(t.nodeName)&&"static"===O.css(t,"position");)t=t.offsetParent;return t})}}),O.each(["Left","Top"],function(t,n){var s="scroll"+n;O.fn[s]=function(n){var r,o;return n===e?(r=this[0])?(o=i(r),o?"pageXOffset"in o?o[t?"pageYOffset":"pageXOffset"]:O.support.boxModel&&o.document.documentElement[s]||o.document.body[s]:r[s]):null:this.each(function(){o=i(this),o?o.scrollTo(t?O(o).scrollLeft():n,t?n:O(o).scrollTop()):this[s]=n})}}),O.each(["Height","Width"],function(t,i){var n=i.toLowerCase();O.fn["inner"+i]=function(){var t=this[0];return t?t.style?parseFloat(O.css(t,n,"padding")):this[n]():null},O.fn["outer"+i]=function(t){var e=this[0];return e?e.style?parseFloat(O.css(e,n,t?"margin":"border")):this[n]():null},O.fn[n]=function(t){var s=this[0];if(!s)return null==t?null:this;if(O.isFunction(t))return this.each(function(e){var i=O(this);i[n](t.call(this,e,i[n]()))});if(O.isWindow(s)){var r=s.document.documentElement["client"+i],o=s.document.body;return"CSS1Compat"===s.document.compatMode&&r||o&&o["client"+i]||r}if(9===s.nodeType)return Math.max(s.documentElement["client"+i],s.body["scroll"+i],s.documentElement["scroll"+i],s.body["offset"+i],s.documentElement["offset"+i]);if(t===e){var a=O.css(s,n),l=parseFloat(a);return O.isNumeric(l)?l:a}return this.css(n,"string"==typeof t?t:t+"px")}}),t.jQuery=t.$=O,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return O})})(window),function(){var t=this,e=t._,i={},n=Array.prototype,s=Object.prototype,r=Function.prototype,o=n.push,a=n.slice,l=n.concat,h=s.toString,u=s.hasOwnProperty,c=n.forEach,f=n.map,d=n.reduce,p=n.reduceRight,_=n.filter,m=n.every,g=n.some,v=n.indexOf,y=n.lastIndexOf,b=Array.isArray,x=Object.keys,k=r.bind,w=function(t){return t instanceof w?t:this instanceof w?(this._wrapped=t,void 0):new w(t)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):t._=w,w.VERSION="1.4.4";var A=w.each=w.forEach=function(t,e,n){if(null!=t)if(c&&t.forEach===c)t.forEach(e,n);else if(t.length===+t.length){for(var s=0,r=t.length;r>s;s++)if(e.call(n,t[s],s,t)===i)return}else for(var o in t)if(w.has(t,o)&&e.call(n,t[o],o,t)===i)return};w.map=w.collect=function(t,e,i){var n=[];return null==t?n:f&&t.map===f?t.map(e,i):(A(t,function(t,s,r){n[n.length]=e.call(i,t,s,r)}),n)};var T="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(t,e,i,n){var s=arguments.length>2;if(null==t&&(t=[]),d&&t.reduce===d)return n&&(e=w.bind(e,n)),s?t.reduce(e,i):t.reduce(e);if(A(t,function(t,r,o){s?i=e.call(n,i,t,r,o):(i=t,s=!0)}),!s)throw new TypeError(T);return i},w.reduceRight=w.foldr=function(t,e,i,n){var s=arguments.length>2;if(null==t&&(t=[]),p&&t.reduceRight===p)return n&&(e=w.bind(e,n)),s?t.reduceRight(e,i):t.reduceRight(e);var r=t.length;if(r!==+r){var o=w.keys(t);r=o.length}if(A(t,function(a,l,h){l=o?o[--r]:--r,s?i=e.call(n,i,t[l],l,h):(i=t[l],s=!0)}),!s)throw new TypeError(T);return i},w.find=w.detect=function(t,e,i){var n;return E(t,function(t,s,r){return e.call(i,t,s,r)?(n=t,!0):void 0}),n},w.filter=w.select=function(t,e,i){var n=[];return null==t?n:_&&t.filter===_?t.filter(e,i):(A(t,function(t,s,r){e.call(i,t,s,r)&&(n[n.length]=t)}),n)},w.reject=function(t,e,i){return w.filter(t,function(t,n,s){return!e.call(i,t,n,s)},i)},w.every=w.all=function(t,e,n){e||(e=w.identity);var s=!0;return null==t?s:m&&t.every===m?t.every(e,n):(A(t,function(t,r,o){return(s=s&&e.call(n,t,r,o))?void 0:i}),!!s)};var E=w.some=w.any=function(t,e,n){e||(e=w.identity);var s=!1;return null==t?s:g&&t.some===g?t.some(e,n):(A(t,function(t,r,o){return s||(s=e.call(n,t,r,o))?i:void 0}),!!s)};w.contains=w.include=function(t,e){return null==t?!1:v&&t.indexOf===v?-1!=t.indexOf(e):E(t,function(t){return t===e})},w.invoke=function(t,e){var i=a.call(arguments,2),n=w.isFunction(e);return w.map(t,function(t){return(n?e:t[e]).apply(t,i)})},w.pluck=function(t,e){return w.map(t,function(t){return t[e]})},w.where=function(t,e,i){return w.isEmpty(e)?i?null:[]:w[i?"find":"filter"](t,function(t){for(var i in e)if(e[i]!==t[i])return!1;return!0})},w.findWhere=function(t,e){return w.where(t,e,!0)},w.max=function(t,e,i){if(!e&&w.isArray(t)&&t[0]===+t[0]&&65535>t.length)return Math.max.apply(Math,t);if(!e&&w.isEmpty(t))return-1/0;var n={computed:-1/0,value:-1/0};return A(t,function(t,s,r){var o=e?e.call(i,t,s,r):t;o>=n.computed&&(n={value:t,computed:o})}),n.value},w.min=function(t,e,i){if(!e&&w.isArray(t)&&t[0]===+t[0]&&65535>t.length)return Math.min.apply(Math,t);
4
+ if(!e&&w.isEmpty(t))return 1/0;var n={computed:1/0,value:1/0};return A(t,function(t,s,r){var o=e?e.call(i,t,s,r):t;n.computed>o&&(n={value:t,computed:o})}),n.value},w.shuffle=function(t){var e,i=0,n=[];return A(t,function(t){e=w.random(i++),n[i-1]=n[e],n[e]=t}),n};var S=function(t){return w.isFunction(t)?t:function(e){return e[t]}};w.sortBy=function(t,e,i){var n=S(e);return w.pluck(w.map(t,function(t,e,s){return{value:t,index:e,criteria:n.call(i,t,e,s)}}).sort(function(t,e){var i=t.criteria,n=e.criteria;if(i!==n){if(i>n||void 0===i)return 1;if(n>i||void 0===n)return-1}return t.index<e.index?-1:1}),"value")};var C=function(t,e,i,n){var s={},r=S(e||w.identity);return A(t,function(e,o){var a=r.call(i,e,o,t);n(s,a,e)}),s};w.groupBy=function(t,e,i){return C(t,e,i,function(t,e,i){(w.has(t,e)?t[e]:t[e]=[]).push(i)})},w.countBy=function(t,e,i){return C(t,e,i,function(t,e){w.has(t,e)||(t[e]=0),t[e]++})},w.sortedIndex=function(t,e,i,n){i=null==i?w.identity:S(i);for(var s=i.call(n,e),r=0,o=t.length;o>r;){var a=r+o>>>1;s>i.call(n,t[a])?r=a+1:o=a}return r},w.toArray=function(t){return t?w.isArray(t)?a.call(t):t.length===+t.length?w.map(t,w.identity):w.values(t):[]},w.size=function(t){return null==t?0:t.length===+t.length?t.length:w.keys(t).length},w.first=w.head=w.take=function(t,e,i){return null==t?void 0:null==e||i?t[0]:a.call(t,0,e)},w.initial=function(t,e,i){return a.call(t,0,t.length-(null==e||i?1:e))},w.last=function(t,e,i){return null==t?void 0:null==e||i?t[t.length-1]:a.call(t,Math.max(t.length-e,0))},w.rest=w.tail=w.drop=function(t,e,i){return a.call(t,null==e||i?1:e)},w.compact=function(t){return w.filter(t,w.identity)};var N=function(t,e,i){return A(t,function(t){w.isArray(t)?e?o.apply(i,t):N(t,e,i):i.push(t)}),i};w.flatten=function(t,e){return N(t,e,[])},w.without=function(t){return w.difference(t,a.call(arguments,1))},w.uniq=w.unique=function(t,e,i,n){w.isFunction(e)&&(n=i,i=e,e=!1);var s=i?w.map(t,i,n):t,r=[],o=[];return A(s,function(i,n){(e?n&&o[o.length-1]===i:w.contains(o,i))||(o.push(i),r.push(t[n]))}),r},w.union=function(){return w.uniq(l.apply(n,arguments))},w.intersection=function(t){var e=a.call(arguments,1);return w.filter(w.uniq(t),function(t){return w.every(e,function(e){return w.indexOf(e,t)>=0})})},w.difference=function(t){var e=l.apply(n,a.call(arguments,1));return w.filter(t,function(t){return!w.contains(e,t)})},w.zip=function(){for(var t=a.call(arguments),e=w.max(w.pluck(t,"length")),i=Array(e),n=0;e>n;n++)i[n]=w.pluck(t,""+n);return i},w.object=function(t,e){if(null==t)return{};for(var i={},n=0,s=t.length;s>n;n++)e?i[t[n]]=e[n]:i[t[n][0]]=t[n][1];return i},w.indexOf=function(t,e,i){if(null==t)return-1;var n=0,s=t.length;if(i){if("number"!=typeof i)return n=w.sortedIndex(t,e),t[n]===e?n:-1;n=0>i?Math.max(0,s+i):i}if(v&&t.indexOf===v)return t.indexOf(e,i);for(;s>n;n++)if(t[n]===e)return n;return-1},w.lastIndexOf=function(t,e,i){if(null==t)return-1;var n=null!=i;if(y&&t.lastIndexOf===y)return n?t.lastIndexOf(e,i):t.lastIndexOf(e);for(var s=n?i:t.length;s--;)if(t[s]===e)return s;return-1},w.range=function(t,e,i){1>=arguments.length&&(e=t||0,t=0),i=arguments[2]||1;for(var n=Math.max(Math.ceil((e-t)/i),0),s=0,r=Array(n);n>s;)r[s++]=t,t+=i;return r},w.bind=function(t,e){if(t.bind===k&&k)return k.apply(t,a.call(arguments,1));var i=a.call(arguments,2);return function(){return t.apply(e,i.concat(a.call(arguments)))}},w.partial=function(t){var e=a.call(arguments,1);return function(){return t.apply(this,e.concat(a.call(arguments)))}},w.bindAll=function(t){var e=a.call(arguments,1);return 0===e.length&&(e=w.functions(t)),A(e,function(e){t[e]=w.bind(t[e],t)}),t},w.memoize=function(t,e){var i={};return e||(e=w.identity),function(){var n=e.apply(this,arguments);return w.has(i,n)?i[n]:i[n]=t.apply(this,arguments)}},w.delay=function(t,e){var i=a.call(arguments,2);return setTimeout(function(){return t.apply(null,i)},e)},w.defer=function(t){return w.delay.apply(w,[t,1].concat(a.call(arguments,1)))},w.throttle=function(t,e){var i,n,s,r,o=0,a=function(){o=new Date,s=null,r=t.apply(i,n)};return function(){var l=new Date,h=e-(l-o);return i=this,n=arguments,0>=h?(clearTimeout(s),s=null,o=l,r=t.apply(i,n)):s||(s=setTimeout(a,h)),r}},w.debounce=function(t,e,i){var n,s;return function(){var r=this,o=arguments,a=function(){n=null,i||(s=t.apply(r,o))},l=i&&!n;return clearTimeout(n),n=setTimeout(a,e),l&&(s=t.apply(r,o)),s}},w.once=function(t){var e,i=!1;return function(){return i?e:(i=!0,e=t.apply(this,arguments),t=null,e)}},w.wrap=function(t,e){return function(){var i=[t];return o.apply(i,arguments),e.apply(this,i)}},w.compose=function(){var t=arguments;return function(){for(var e=arguments,i=t.length-1;i>=0;i--)e=[t[i].apply(this,e)];return e[0]}},w.after=function(t,e){return 0>=t?e():function(){return 1>--t?e.apply(this,arguments):void 0}},w.keys=x||function(t){if(t!==Object(t))throw new TypeError("Invalid object");var e=[];for(var i in t)w.has(t,i)&&(e[e.length]=i);return e},w.values=function(t){var e=[];for(var i in t)w.has(t,i)&&e.push(t[i]);return e},w.pairs=function(t){var e=[];for(var i in t)w.has(t,i)&&e.push([i,t[i]]);return e},w.invert=function(t){var e={};for(var i in t)w.has(t,i)&&(e[t[i]]=i);return e},w.functions=w.methods=function(t){var e=[];for(var i in t)w.isFunction(t[i])&&e.push(i);return e.sort()},w.extend=function(t){return A(a.call(arguments,1),function(e){if(e)for(var i in e)t[i]=e[i]}),t},w.pick=function(t){var e={},i=l.apply(n,a.call(arguments,1));return A(i,function(i){i in t&&(e[i]=t[i])}),e},w.omit=function(t){var e={},i=l.apply(n,a.call(arguments,1));for(var s in t)w.contains(i,s)||(e[s]=t[s]);return e},w.defaults=function(t){return A(a.call(arguments,1),function(e){if(e)for(var i in e)null==t[i]&&(t[i]=e[i])}),t},w.clone=function(t){return w.isObject(t)?w.isArray(t)?t.slice():w.extend({},t):t},w.tap=function(t,e){return e(t),t};var D=function(t,e,i,n){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof w&&(t=t._wrapped),e instanceof w&&(e=e._wrapped);var s=h.call(t);if(s!=h.call(e))return!1;switch(s){case"[object String]":return t==e+"";case"[object Number]":return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object RegExp]":return t.source==e.source&&t.global==e.global&&t.multiline==e.multiline&&t.ignoreCase==e.ignoreCase}if("object"!=typeof t||"object"!=typeof e)return!1;for(var r=i.length;r--;)if(i[r]==t)return n[r]==e;i.push(t),n.push(e);var o=0,a=!0;if("[object Array]"==s){if(o=t.length,a=o==e.length)for(;o--&&(a=D(t[o],e[o],i,n)););}else{var l=t.constructor,u=e.constructor;if(l!==u&&!(w.isFunction(l)&&l instanceof l&&w.isFunction(u)&&u instanceof u))return!1;for(var c in t)if(w.has(t,c)&&(o++,!(a=w.has(e,c)&&D(t[c],e[c],i,n))))break;if(a){for(c in e)if(w.has(e,c)&&!o--)break;a=!o}}return i.pop(),n.pop(),a};w.isEqual=function(t,e){return D(t,e,[],[])},w.isEmpty=function(t){if(null==t)return!0;if(w.isArray(t)||w.isString(t))return 0===t.length;for(var e in t)if(w.has(t,e))return!1;return!0},w.isElement=function(t){return!(!t||1!==t.nodeType)},w.isArray=b||function(t){return"[object Array]"==h.call(t)},w.isObject=function(t){return t===Object(t)},A(["Arguments","Function","String","Number","Date","RegExp"],function(t){w["is"+t]=function(e){return h.call(e)=="[object "+t+"]"}}),w.isArguments(arguments)||(w.isArguments=function(t){return!(!t||!w.has(t,"callee"))}),true&&(w.isFunction=function(t){return"function"==typeof t}),w.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},w.isNaN=function(t){return w.isNumber(t)&&t!=+t},w.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"==h.call(t)},w.isNull=function(t){return null===t},w.isUndefined=function(t){return void 0===t},w.has=function(t,e){return u.call(t,e)},w.noConflict=function(){return t._=e,this},w.identity=function(t){return t},w.times=function(t,e,i){for(var n=Array(t),s=0;t>s;s++)n[s]=e.call(i,s);return n},w.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))};var B={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};B.unescape=w.invert(B.escape);var L={escape:RegExp("["+w.keys(B.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(B.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(t){w[t]=function(e){return null==e?"":(""+e).replace(L[t],function(e){return B[t][e]})}}),w.result=function(t,e){if(null==t)return null;var i=t[e];return w.isFunction(i)?i.call(t):i},w.mixin=function(t){A(w.functions(t),function(e){var i=w[e]=t[e];w.prototype[e]=function(){var t=[this._wrapped];return o.apply(t,arguments),F.call(this,i.apply(w,t))}})};var M=0;w.uniqueId=function(t){var e=++M+"";return t?t+e:e},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var j=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(t,e,i){var n;i=w.defaults({},i,w.templateSettings);var s=RegExp([(i.escape||j).source,(i.interpolate||j).source,(i.evaluate||j).source].join("|")+"|$","g"),r=0,o="__p+='";t.replace(s,function(e,i,n,s,a){return o+=t.slice(r,a).replace(O,function(t){return"\\"+$[t]}),i&&(o+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'"),n&&(o+="'+\n((__t=("+n+"))==null?'':__t)+\n'"),s&&(o+="';\n"+s+"\n__p+='"),r=a+e.length,e}),o+="';\n",i.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{n=Function(i.variable||"obj","_",o)}catch(a){throw a.source=o,a}if(e)return n(e,w);var l=function(t){return n.call(this,t,w)};return l.source="function("+(i.variable||"obj")+"){\n"+o+"}",l},w.chain=function(t){return w(t).chain()};var F=function(t){return this._chain?w(t).chain():t};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=n[t];w.prototype[t]=function(){var i=this._wrapped;return e.apply(i,arguments),"shift"!=t&&"splice"!=t||0!==i.length||delete i[0],F.call(this,i)}}),A(["concat","join","slice"],function(t){var e=n[t];w.prototype[t]=function(){return F.call(this,e.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),!function(t){t(function(){t.support.transition=function(){var t=function(){var t,e=document.createElement("bootstrap"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"};for(t in i)if(void 0!==e.style[t])return i[t]}();return t&&{end:t}}()})}(window.jQuery),!function(t){"use strict";var e='[data-dismiss="alert"]',i=function(i){t(i).on("click",e,this.close)};i.prototype.close=function(e){function i(){n.trigger("closed").remove()}var n,s=t(this),r=s.attr("data-target");r||(r=s.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),n=t(r),e&&e.preventDefault(),n.length||(n=s.hasClass("alert")?s:s.parent()),n.trigger(e=t.Event("close")),e.isDefaultPrevented()||(n.removeClass("in"),t.support.transition&&n.hasClass("fade")?n.on(t.support.transition.end,i):i())},t.fn.alert=function(e){return this.each(function(){var n=t(this),s=n.data("alert");s||n.data("alert",s=new i(this)),"string"==typeof e&&s[e].call(n)})},t.fn.alert.Constructor=i,t(function(){t("body").on("click.alert.data-api",e,i.prototype.close)})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.button.defaults,i)};e.prototype.setState=function(t){var e="disabled",i=this.$element,n=i.data(),s=i.is("input")?"val":"html";t+="Text",n.resetText||i.data("resetText",i[s]()),i[s](n[t]||this.options[t]),setTimeout(function(){"loadingText"==t?i.addClass(e).attr(e,e):i.removeClass(e).removeAttr(e)},0)},e.prototype.toggle=function(){var t=this.$element.parent('[data-toggle="buttons-radio"]');t&&t.find(".active").removeClass("active"),this.$element.toggleClass("active")},t.fn.button=function(i){return this.each(function(){var n=t(this),s=n.data("button"),r="object"==typeof i&&i;s||n.data("button",s=new e(this,r)),"toggle"==i?s.toggle():i&&s.setState(i)})},t.fn.button.defaults={loadingText:"loading..."},t.fn.button.Constructor=e,t(function(){t("body").on("click.button.data-api","[data-toggle^=button]",function(e){var i=t(e.target);i.hasClass("btn")||(i=i.closest(".btn")),i.button("toggle")})})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=i,this.options.slide&&this.slide(this.options.slide),"hover"==this.options.pause&&this.$element.on("mouseenter",t.proxy(this.pause,this)).on("mouseleave",t.proxy(this.cycle,this))};e.prototype={cycle:function(e){return e||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},to:function(e){var i=this.$element.find(".active"),n=i.parent().children(),s=n.index(i),r=this;if(!(e>n.length-1||0>e))return this.sliding?this.$element.one("slid",function(){r.to(e)}):s==e?this.pause().cycle():this.slide(e>s?"next":"prev",t(n[e]))},pause:function(t){return t||(this.paused=!0),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(e,i){var n=this.$element.find(".active"),s=i||n[e](),r=this.interval,o="next"==e?"left":"right",a="next"==e?"first":"last",l=this,h=t.Event("slide");if(this.sliding=!0,r&&this.pause(),s=s.length?s:this.$element.find(".item")[a](),!s.hasClass("active")){if(t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(h),h.isDefaultPrevented())return;s.addClass(e),s[0].offsetWidth,n.addClass(o),s.addClass(o),this.$element.one(t.support.transition.end,function(){s.removeClass([e,o].join(" ")).addClass("active"),n.removeClass(["active",o].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger("slid")},0)})}else{if(this.$element.trigger(h),h.isDefaultPrevented())return;n.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return r&&this.cycle(),this}}},t.fn.carousel=function(i){return this.each(function(){var n=t(this),s=n.data("carousel"),r=t.extend({},t.fn.carousel.defaults,"object"==typeof i&&i);s||n.data("carousel",s=new e(this,r)),"number"==typeof i?s.to(i):"string"==typeof i||(i=r.slide)?s[i]():r.interval&&s.cycle()})},t.fn.carousel.defaults={interval:5e3,pause:"hover"},t.fn.carousel.Constructor=e,t(function(){t("body").on("click.carousel.data-api","[data-slide]",function(e){var i,n=t(this),s=t(n.attr("data-target")||(i=n.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")),r=!s.data("modal")&&t.extend({},s.data(),n.data());s.carousel(r),e.preventDefault()})})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.collapse.defaults,i),this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};e.prototype={constructor:e,dimension:function(){var t=this.$element.hasClass("width");return t?"width":"height"},show:function(){var e,i,n,s;if(!this.transitioning){if(e=this.dimension(),i=t.camelCase(["scroll",e].join("-")),n=this.$parent&&this.$parent.find("> .accordion-group > .in"),n&&n.length){if(s=n.data("collapse"),s&&s.transitioning)return;n.collapse("hide"),s||n.data("collapse",null)}this.$element[e](0),this.transition("addClass",t.Event("show"),"shown"),this.$element[e](this.$element[0][i])}},hide:function(){var e;this.transitioning||(e=this.dimension(),this.reset(this.$element[e]()),this.transition("removeClass",t.Event("hide"),"hidden"),this.$element[e](0))},reset:function(t){var e=this.dimension();return this.$element.removeClass("collapse")[e](t||"auto")[0].offsetWidth,this.$element[null!==t?"addClass":"removeClass"]("collapse"),this},transition:function(e,i,n){var s=this,r=function(){"show"==i.type&&s.reset(),s.transitioning=0,s.$element.trigger(n)};this.$element.trigger(i),i.isDefaultPrevented()||(this.transitioning=1,this.$element[e]("in"),t.support.transition&&this.$element.hasClass("collapse")?this.$element.one(t.support.transition.end,r):r())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},t.fn.collapse=function(i){return this.each(function(){var n=t(this),s=n.data("collapse"),r="object"==typeof i&&i;s||n.data("collapse",s=new e(this,r)),"string"==typeof i&&s[i]()})},t.fn.collapse.defaults={toggle:!0},t.fn.collapse.Constructor=e,t(function(){t("body").on("click.collapse.data-api","[data-toggle=collapse]",function(e){var i,n=t(this),s=n.attr("data-target")||e.preventDefault()||(i=n.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),r=t(s).data("collapse")?"toggle":n.data();t(s).collapse(r)})})}(window.jQuery),!function(t){function e(){t(i).parent().removeClass("open")}var i='[data-toggle="dropdown"]',n=function(e){var i=t(e).on("click.dropdown.data-api",this.toggle);t("html").on("click.dropdown.data-api",function(){i.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(){var i,n,s,r=t(this);if(!r.is(".disabled, :disabled"))return n=r.attr("data-target"),n||(n=r.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),i=t(n),i.length||(i=r.parent()),s=i.hasClass("open"),e(),s||i.toggleClass("open"),!1}},t.fn.dropdown=function(e){return this.each(function(){var i=t(this),s=i.data("dropdown");s||i.data("dropdown",s=new n(this)),"string"==typeof e&&s[e].call(i)})},t.fn.dropdown.Constructor=n,t(function(){t("html").on("click.dropdown.data-api",e),t("body").on("click.dropdown",".dropdown form",function(t){t.stopPropagation()}).on("click.dropdown.data-api",i,n.prototype.toggle)})}(window.jQuery),!function(t){function e(){var e=this,n=setTimeout(function(){e.$element.off(t.support.transition.end),i.call(e)},500);this.$element.one(t.support.transition.end,function(){clearTimeout(n),i.call(e)})}function i(){this.$element.hide().trigger("hidden"),n.call(this)}function n(e){var i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var n=t.support.transition&&i;this.$backdrop=t('<div class="modal-backdrop '+i+'" />').appendTo(document.body),"static"!=this.options.backdrop&&this.$backdrop.click(t.proxy(this.hide,this)),n&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),n?this.$backdrop.one(t.support.transition.end,e):e()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(t.support.transition.end,t.proxy(s,this)):s.call(this)):e&&e()}function s(){this.$backdrop.remove(),this.$backdrop=null}function r(){var e=this;this.isShown&&this.options.keyboard?t(document).on("keyup.dismiss.modal",function(t){27==t.which&&e.hide()}):this.isShown||t(document).off("keyup.dismiss.modal")}var o=function(e,i){this.options=i,this.$element=t(e).delegate('[data-dismiss="modal"]',"click.dismiss.modal",t.proxy(this.hide,this))};o.prototype={constructor:o,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var e=this,i=t.Event("show");this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(t("body").addClass("modal-open"),this.isShown=!0,r.call(this),n.call(this,function(){var i=t.support.transition&&e.$element.hasClass("fade");e.$element.parent().length||e.$element.appendTo(document.body),e.$element.show(),i&&e.$element[0].offsetWidth,e.$element.addClass("in"),i?e.$element.one(t.support.transition.end,function(){e.$element.trigger("shown")}):e.$element.trigger("shown")}))},hide:function(n){n&&n.preventDefault(),n=t.Event("hide"),this.$element.trigger(n),this.isShown&&!n.isDefaultPrevented()&&(this.isShown=!1,t("body").removeClass("modal-open"),r.call(this),this.$element.removeClass("in"),t.support.transition&&this.$element.hasClass("fade")?e.call(this):i.call(this))}},t.fn.modal=function(e){return this.each(function(){var i=t(this),n=i.data("modal"),s=t.extend({},t.fn.modal.defaults,i.data(),"object"==typeof e&&e);n||i.data("modal",n=new o(this,s)),"string"==typeof e?n[e]():s.show&&n.show()})},t.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},t.fn.modal.Constructor=o,t(function(){t("body").on("click.modal.data-api",'[data-toggle="modal"]',function(e){var i,n=t(this),s=t(n.attr("data-target")||(i=n.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")),r=s.data("modal")?"toggle":t.extend({},s.data(),n.data());e.preventDefault(),s.modal(r)})})}(window.jQuery),!function(t){"use strict";var e=function(t,e){this.init("tooltip",t,e)};e.prototype={constructor:e,init:function(e,i,n){var s,r;this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.enabled=!0,"manual"!=this.options.trigger&&(s="hover"==this.options.trigger?"mouseenter":"focus",r="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(s,this.options.selector,t.proxy(this.enter,this)),this.$element.on(r,this.options.selector,t.proxy(this.leave,this))),this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(e){return e=t.extend({},t.fn[this.type].defaults,e,this.$element.data()),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},enter:function(e){var i=t(e.currentTarget)[this.type](this._options).data(this.type);return i.options.delay&&i.options.delay.show?(clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show),void 0):i.show()},leave:function(e){var i=t(e.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),i.options.delay&&i.options.delay.hide?(i.hoverState="out",this.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide),void 0):i.hide()},show:function(){var t,e,i,n,s,r,o;if(this.hasContent()&&this.enabled){switch(t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),r="function"==typeof this.options.placement?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,e=/in/.test(r),t.remove().css({top:0,left:0,display:"block"}).appendTo(e?this.$element:document.body),i=this.getPosition(e),n=t[0].offsetWidth,s=t[0].offsetHeight,e?r.split(" ")[1]:r){case"bottom":o={top:i.top+i.height,left:i.left+i.width/2-n/2};break;case"top":o={top:i.top-s,left:i.left+i.width/2-n/2};break;case"left":o={top:i.top+i.height/2-s/2,left:i.left-n};break;case"right":o={top:i.top+i.height/2-s/2,left:i.left+i.width}}t.css(o).addClass(r).addClass("in")}},isHTML:function(t){return"string"!=typeof t||"<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3||/^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(t)},setContent:function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.isHTML(e)?"html":"text"](e),t.removeClass("fade in top bottom left right")},hide:function(){function e(){var e=setTimeout(function(){i.off(t.support.transition.end).remove()},500);i.one(t.support.transition.end,function(){clearTimeout(e),i.remove()})}var i=this.tip();i.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?e():i.remove()},fixTitle:function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(e){return t.extend({},e?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},tip:function(){return this.$tip=this.$tip||t(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},t.fn.tooltip=function(i){return this.each(function(){var n=t(this),s=n.data("tooltip"),r="object"==typeof i&&i;s||n.data("tooltip",s=new e(this,r)),"string"==typeof i&&s[i]()})},t.fn.tooltip.Constructor=e,t.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0}}(window.jQuery),!function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype,{constructor:e,setContent:function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.isHTML(e)?"html":"text"](e),t.find(".popover-content > *")[this.isHTML(i)?"html":"text"](i),t.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var t,e=this.$element,i=this.options;return t=e.attr("data-content")||("function"==typeof i.content?i.content.call(e[0]):i.content)},tip:function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip}}),t.fn.popover=function(i){return this.each(function(){var n=t(this),s=n.data("popover"),r="object"==typeof i&&i;s||n.data("popover",s=new e(this,r)),"string"==typeof i&&s[i]()})},t.fn.popover.Constructor=e,t.fn.popover.defaults=t.extend({},t.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(t){function e(e,i){var n,s=t.proxy(this.process,this),r=t(e).is("body")?t(window):t(e);this.options=t.extend({},t.fn.scrollspy.defaults,i),this.$scrollElement=r.on("scroll.scroll.data-api",s),this.selector=(this.options.target||(n=t(e).attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=t("body"),this.refresh(),this.process()}e.prototype={constructor:e,refresh:function(){var e,i=this;this.offsets=t([]),this.targets=t([]),e=this.$body.find(this.selector).map(function(){var e=t(this),i=e.data("target")||e.attr("href"),n=/^#\w/.test(i)&&t(i);return n&&i.length&&[[n.position().top,i]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){i.offsets.push(this[0]),i.targets.push(this[1])})},process:function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=i-this.$scrollElement.height(),s=this.offsets,r=this.targets,o=this.activeTarget;if(e>=n)return o!=(t=r.last()[0])&&this.activate(t);for(t=s.length;t--;)o!=r[t]&&e>=s[t]&&(!s[t+1]||s[t+1]>=e)&&this.activate(r[t])},activate:function(e){var i,n;this.activeTarget=e,t(this.selector).parent(".active").removeClass("active"),n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parent("li").addClass("active"),i.parent(".dropdown-menu")&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate")}},t.fn.scrollspy=function(i){return this.each(function(){var n=t(this),s=n.data("scrollspy"),r="object"==typeof i&&i;s||n.data("scrollspy",s=new e(this,r)),"string"==typeof i&&s[i]()})},t.fn.scrollspy.Constructor=e,t.fn.scrollspy.defaults={offset:10},t(function(){t('[data-spy="scroll"]').each(function(){var e=t(this);e.scrollspy(e.data())})})}(window.jQuery),!function(t){"use strict";var e=function(e){this.element=t(e)};e.prototype={constructor:e,show:function(){var e,i,n,s=this.element,r=s.closest("ul:not(.dropdown-menu)"),o=s.attr("data-target");o||(o=s.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),s.parent("li").hasClass("active")||(e=r.find(".active a").last()[0],n=t.Event("show",{relatedTarget:e}),s.trigger(n),n.isDefaultPrevented()||(i=t(o),this.activate(s.parent("li"),r),this.activate(i,i.parent(),function(){s.trigger({type:"shown",relatedTarget:e})})))},activate:function(e,i,n){function s(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),o?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),n&&n()}var r=i.find("> .active"),o=n&&t.support.transition&&r.hasClass("fade");o?r.one(t.support.transition.end,s):s(),r.removeClass("in")}},t.fn.tab=function(i){return this.each(function(){var n=t(this),s=n.data("tab");s||n.data("tab",s=new e(this)),"string"==typeof i&&s[i]()})},t.fn.tab.Constructor=e,t(function(){t("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,i),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=t(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:e.top+e.height,left:e.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e,i=this;return this.query=this.$element.val(),this.query?(e=t.grep(this.source,function(t){return i.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,i=[],n=[],s=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?n.push(e):s.push(e):i.push(e);return i.concat(n,s)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var i=this;return e=t(e).map(function(e,n){return e=t(i.options.item).attr("data-value",n),e.find("a").html(i.highlighter(n)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),i=e.next();i.length||(i=t(this.$menu.find("li")[0])),i.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),(t.browser.webkit||t.browser.msie)&&this.$element.on("keydown",t.proxy(this.keypress,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this))},keyup:function(t){switch(t.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},keypress:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:if("keydown"!=t.type)break;t.preventDefault(),this.prev();break;case 40:if("keydown"!=t.type)break;t.preventDefault(),this.next()}t.stopPropagation()}},blur:function(){var t=this;setTimeout(function(){t.hide()},150)},click:function(t){t.stopPropagation(),t.preventDefault(),this.select()},mouseenter:function(e){this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")}},t.fn.typeahead=function(i){return this.each(function(){var n=t(this),s=n.data("typeahead"),r="object"==typeof i&&i;s||n.data("typeahead",s=new e(this,r)),"string"==typeof i&&s[i]()
5
+ })},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},t.fn.typeahead.Constructor=e,t(function(){t("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(e){var i=t(this);i.data("typeahead")||(e.preventDefault(),i.typeahead(i.data()))})})}(window.jQuery),this.JS=this.JS||{},JS.extend=function(t,e){e=e||{};for(var i in e)t[i]!==e[i]&&(t[i]=e[i]);return t},JS.extend(JS,{makeFunction:function(){return function(){return this.initialize?this.initialize.apply(this,arguments)||this:this}},makeBridge:function(t){var e=function(){};return e.prototype=t.prototype,new e},bind:function(){var t=JS.array(arguments),e=t.shift(),i=t.shift()||null;return function(){return e.apply(i,t.concat(JS.array(arguments)))}},callsSuper:function(t){return void 0===t.SUPER?t.SUPER=/\bcallSuper\b/.test(""+t):t.SUPER},mask:function(t){var e=(""+t).replace(/callSuper/g,"super");return t.toString=function(){return e},t},array:function(t){if(!t)return[];if(t.toArray)return t.toArray();for(var e=t.length,i=[];e--;)i[e]=t[e];return i},indexOf:function(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i;return-1},isFn:function(t){return t instanceof Function},isType:function(t,e){return t&&e?e instanceof Function&&t instanceof e||"string"==typeof e&&typeof t===e||t.isA&&t.isA(e):!1},ignore:function(t,e){return/^(include|extend)$/.test(t)&&"object"==typeof e}}),JS.Module=JS.makeFunction(),JS.extend(JS.Module.prototype,{END_WITHOUT_DOT:/([^\.])$/,initialize:function(t,e,i){this.__mod__=this,this.__inc__=[],this.__fns__={},this.__dep__=[],this.__mct__={},"string"==typeof t?this.__nom__=this.displayName=t:(this.__nom__=this.displayName="",i=e,e=t),i=i||{},this.__res__=i._1||null,e&&this.include(e,!1),JS.Module.__chainq__&&JS.Module.__chainq__.push(this)},setName:function(t){this.__nom__=this.displayName=t||"";for(var e in this.__mod__.__fns__)this.__name__(e);t&&this.__meta__&&this.__meta__.setName(t+".")},__name__:function(t){if(this.__nom__){var e=this.__mod__.__fns__[t]||{};return t=this.__nom__.replace(this.END_WITHOUT_DOT,"$1#")+t,JS.isFn(e.setName)?e.setName(t):(JS.isFn(e)&&(e.displayName=t),void 0)}},define:function(t,e,i,n){var s=(n||{})._0||this;this.__fns__[t]=e,this.__name__(t),JS.Module._0&&s&&JS.isFn(e)&&JS.Module._0(t,s),i!==!1&&this.resolve()},instanceMethod:function(t){var e=this.lookup(t).pop();return JS.isFn(e)?e:null},instanceMethods:function(t,e){var i,n=this.__mod__,e=e||[],s=n.ancestors(),r=s.length;for(i in n.__fns__)n.__fns__.hasOwnProperty(i)&&JS.isFn(n.__fns__[i])&&-1===JS.indexOf(e,i)&&e.push(i);if(t===!1)return e;for(;r--;)s[r].instanceMethods(!1,e);return e},include:function(t,e,i){if(e=e!==!1,!t)return e?this.resolve():this.uncache();i=i||{},t.__mod__&&(t=t.__mod__);var n,s,r,o,a=t.include,l=t.extend,h=i._4||this;if(t.__inc__&&t.__fns__)this.__inc__.push(t),t.__dep__.push(this),i._2?t.extended&&t.extended(i._2):t.included&&t.included(h);else{if(!i._5){if("object"==typeof a||JS.isType(a,JS.Module))for(n=[].concat(a),r=0,o=n.length;o>r;r++)h.include(n[r],e,i);if("object"==typeof l||JS.isType(l,JS.Module)){for(n=[].concat(l),r=0,o=n.length;o>r;r++)h.extend(n[r],!1);h.extend()}return i._5=!0,h.include(t,e,i)}for(s in t)JS.ignore(s,t[s])||this.define(s,t[s],!1,{_0:h||i._2||this})}e?this.resolve():this.uncache()},includes:function(t){var e=this.__mod__,i=e.__inc__.length;if(Object===t||e===t||e.__res__===t.prototype)return!0;for(;i--;)if(e.__inc__[i].includes(t))return!0;return!1},match:function(t){return t.isA&&t.isA(this)},ancestors:function(t){var e,i,n=this.__mod__,s=void 0===t,r=(n.__res__||{}).klass,o=r&&n.__res__===r.prototype?r:n;if(s&&n.__anc__)return n.__anc__.slice();for(t=t||[],e=0,i=n.__inc__.length;i>e;e++)n.__inc__[e].ancestors(t);return-1===JS.indexOf(t,o)&&t.push(o),s&&(n.__anc__=t.slice()),t},lookup:function(t){var e=this.__mod__,i=e.__mct__;if(i[t])return i[t].slice();var n,s,r,o=e.ancestors(),a=[];for(n=0,s=o.length;s>n;n++)r=o[n].__mod__.__fns__[t],r&&a.push(r);return i[t]=a.slice(),a},make:function(t,e){if(!JS.isFn(e)||!JS.callsSuper(e))return e;var i=this;return function(){return i.chain(this,t,arguments)}},chain:JS.mask(function(t,e,i){var n,s=this.lookup(e),r=s.length-1,o=t.callSuper,a=JS.array(i);return t.callSuper=function(){for(var e=arguments.length;e--;)a[e]=arguments[e];r-=1;var i=s[r].apply(t,a);return r+=1,i},n=s.pop().apply(t,a),o?t.callSuper=o:delete t.callSuper,n}),resolve:function(t){var e,i,n,s,r=this.__mod__,t=t||r,o=t.__res__;if(t===r)for(r.uncache(!1),e=r.__dep__.length;e--;)r.__dep__[e].resolve();if(o){for(e=0,i=r.__inc__.length;i>e;e++)r.__inc__[e].resolve(t);for(n in r.__fns__)s=t.make(n,r.__fns__[n]),o[n]!==s&&(o[n]=s)}},uncache:function(t){var e=this.__mod__,i=e.__dep__.length;if(e.__anc__=null,e.__mct__={},t!==!1)for(;i--;)e.__dep__[i].uncache()}}),JS.Class=JS.makeFunction(),JS.extend(JS.Class.prototype=JS.makeBridge(JS.Module),{initialize:function(t,e,i){"string"==typeof t?this.__nom__=this.displayName=t:(this.__nom__=this.displayName="",i=e,e=t);var n=JS.extend(JS.makeFunction(),this);n.klass=n.constructor=this.klass,JS.isFn(e)||(i=e,e=Object),n.inherit(e),n.include(i,!1),n.resolve();do e.inherited&&e.inherited(n);while(e=e.superclass);return n},inherit:function(t){this.superclass=t,this.__eigen__&&t.__eigen__&&this.extend(t.__eigen__(),!0),this.subclasses=[],(t.subclasses||[]).push(this);var e=this.prototype=JS.makeBridge(t);e.klass=e.constructor=this,this.__mod__=new JS.Module(this.__nom__,{},{_1:this.prototype}),this.include(JS.Kernel,!1),t!==Object&&this.include(t.__mod__||new JS.Module(t.prototype,{_1:t.prototype}),!1)},include:function(t,e,i){if(t){var n=this.__mod__,i=i||{};return i._4=this,n.include(t,e,i)}},define:function(t,e,i,n){var s=this.__mod__;n=n||{},n._0=this,s.define(t,e,i,n)}}),JS.Module=new JS.Class("Module",JS.Module.prototype),JS.Class=new JS.Class("Class",JS.Module,JS.Class.prototype),JS.Module.klass=JS.Module.constructor=JS.Class.klass=JS.Class.constructor=JS.Class,JS.extend(JS.Module,{_3:[],__chainq__:[],methodAdded:function(t,e){this._3.push([t,e])},_0:function(t,e){for(var i=this._3,n=i.length;n--;)i[n][0].call(i[n][1]||null,t,e)}}),JS.Kernel=JS.extend(new JS.Module("Kernel",{__eigen__:function(){if(this.__meta__)return this.__meta__;var t=this.__nom__,e=this.klass.__nom__,i=t||(e?"#<"+e+">":""),n=this.__meta__=new JS.Module(i?i+".":"",{},{_1:this});return n.include(this.klass.__mod__,!1),n},equals:function(t){return this===t},extend:function(t,e){return this.__eigen__().include(t,e,{_2:this})},hash:function(){return this.__hashcode__=this.__hashcode__||JS.Kernel.getHashCode()},isA:function(t){return this.__eigen__().includes(t)},method:function(t){var e=this,i=e.__mcache__=e.__mcache__||{};return(i[t]||{}).fn===e[t]?i[t].bd:(i[t]={fn:e[t],bd:JS.bind(e[t],e)}).bd},methods:function(){return this.__eigen__().instanceMethods(!0)},tap:function(t,e){return t.call(e||null,this),this}}),{__hashIndex__:0,getHashCode:function(){return this.__hashIndex__+=1,(Math.floor((new Date).getTime()/1e3)+this.__hashIndex__).toString(16)}}),JS.Module.include(JS.Kernel),JS.extend(JS.Module,JS.Kernel.__fns__),JS.Class.include(JS.Kernel),JS.extend(JS.Class,JS.Kernel.__fns__),JS.Interface=new JS.Class({initialize:function(t){this.test=function(e,i){for(var n=t.length;n--;)if(!JS.isFn(e[t[n]]))return i?t[n]:!1;return!0}},extend:{ensure:function(){for(var t,e,i=JS.array(arguments),n=i.shift();t=i.shift();)if(e=t.test(n,!0),e!==!0)throw Error("object does not implement "+e+"()")}}}),JS.Singleton=new JS.Class({initialize:function(t,e,i){return new new JS.Class(t,e,i)}}),Bluff={VERSION:"0.3.6",array:function(t){if(void 0===t.length)return[t];for(var e=[],i=t.length;i--;)e[i]=t[i];return e},array_new:function(t,e){for(var i=[];t--;)i.push(e);return i},each:function(t,e,i){for(var n=0,s=t.length;s>n;n++)e.call(i||null,t[n],n)},index:function(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i;return-1},keys:function(t){var e,i=[];for(e in t)i.push(e);return i},map:function(t,e,i){var n=[];return this.each(t,function(t){n.push(e.call(i||null,t))}),n},reverse_each:function(t,e,i){for(var n=t.length;n--;)e.call(i||null,t[n],n)},sum:function(t){for(var e=0,i=t.length;i--;)e+=t[i];return e},Mini:{}},Bluff.Base=new JS.Class({extend:{DEBUG:!1,DATA_LABEL_INDEX:0,DATA_VALUES_INDEX:1,DATA_COLOR_INDEX:2,LEGEND_MARGIN:20,TITLE_MARGIN:20,LABEL_MARGIN:10,DEFAULT_MARGIN:20,DEFAULT_TARGET_WIDTH:800,THOUSAND_SEPARATOR:","},top_margin:null,bottom_margin:null,right_margin:null,left_margin:null,title_margin:null,legend_margin:null,labels:null,center_labels_over_point:null,has_left_labels:null,x_axis_label:null,y_axis_label:null,y_axis_increment:null,colors:null,title:null,font:null,font_color:null,hide_line_markers:null,hide_legend:null,hide_title:null,hide_line_numbers:null,no_data_message:null,title_font_size:null,legend_font_size:null,marker_font_size:null,marker_color:null,marker_count:null,minimum_value:null,maximum_value:null,sort:null,additional_line_values:null,stacked:null,legend_box_size:null,tooltips:!1,initialize:function(t,e){this._0=new Bluff.Renderer(t),e=e||this.klass.DEFAULT_TARGET_WIDTH;var i;"number"!=typeof e?(i=e.split("x"),this._j=parseFloat(i[0]),this._t=parseFloat(i[1])):(this._j=parseFloat(e),this._t=.75*this._j),this.initialize_ivars(),this._1j(),this.theme_keynote(),this._10={}},initialize_ivars:function(){this._b=800,this._L=800*(this._t/this._j),this._5=0,this.marker_count=null,this.maximum_value=this.minimum_value=null,this._c=!1,this._1=[],this.labels={},this._u={},this.sort=!0,this.title=null,this._a=this._j/this._b,this.marker_font_size=21,this.legend_font_size=20,this.title_font_size=36,this.top_margin=this.bottom_margin=this.left_margin=this.right_margin=this.klass.DEFAULT_MARGIN,this.legend_margin=this.klass.LEGEND_MARGIN,this.title_margin=this.klass.TITLE_MARGIN,this.legend_box_size=20,this.no_data_message="No Data",this.hide_line_markers=this.hide_legend=this.hide_title=this.hide_line_numbers=!1,this.center_labels_over_point=!0,this.has_left_labels=!1,this.additional_line_values=[],this._1C=[],this._k={},this.x_axis_label=this.y_axis_label=null,this.y_axis_increment=null,this.stacked=null,this._9=null},set_margins:function(t){this.top_margin=this.left_margin=this.right_margin=this.bottom_margin=t},set_font:function(t){this.font=t,this._0.font=this.font},add_color:function(t){this.colors.push(t)},replace_colors:function(t){this.colors=t||[],this._w=0},set_theme:function(t){this._1j(),this._k={colors:["black","white"],additional_line_colors:[],marker_color:"white",font_color:"black",background_colors:null,background_image:null};for(var e in t)this._k[e]=t[e];this.colors=this._k.colors,this.marker_color=this._k.marker_color,this.font_color=this._k.font_color||this.marker_color,this._1C=this._k.additional_line_colors,this._M()},set_background:function(t){t.colors&&(this._k.background_colors=t.colors),t.image&&(this._k.background_image=t.image),this._M()},theme_keynote:function(){this._11="#6886B4",this._12="#FDD84E",this._v="#72AE6E",this._D="#D1695E",this._13="#8A6EAF",this._E="#EFAA43",this._F="white",this.colors=[this._12,this._11,this._v,this._D,this._13,this._E,this._F],this.set_theme({colors:this.colors,marker_color:"white",font_color:"white",background_colors:["black","#4a465a"]})},theme_37signals:function(){this._v="#339933",this._13="#cc99cc",this._11="#336699",this._12="#FFF804",this._D="#ff0000",this._E="#cf5910",this._G="black",this.colors=[this._12,this._11,this._v,this._D,this._13,this._E,this._G],this.set_theme({colors:this.colors,marker_color:"black",font_color:"black",background_colors:["#d1edf5","white"]})},theme_rails_keynote:function(){this._v="#00ff00",this._14="#333333",this._E="#ff5d00",this._D="#f61100",this._F="white",this._15="#999999",this._G="black",this.colors=[this._v,this._14,this._E,this._D,this._F,this._15,this._G],this.set_theme({colors:this.colors,marker_color:"white",font_color:"white",background_colors:["#0083a3","#0083a3"]})},theme_odeo:function(){this._14="#202020",this._F="white",this._1D="#a21764",this._v="#8ab438",this._15="#999999",this._1E="#3a5b87",this._G="black",this.colors=[this._14,this._F,this._1E,this._1D,this._v,this._15,this._G],this.set_theme({colors:this.colors,marker_color:"white",font_color:"white",background_colors:["#ff47a4","#ff1f81"]})},theme_pastel:function(){this.colors=["#a9dada","#aedaa9","#daaea9","#dadaa9","#a9a9da","#daaeda","#dadada"],this.set_theme({colors:this.colors,marker_color:"#aea9a9",font_color:"black",background_colors:"white"})},theme_greyscale:function(){this.colors=["#282828","#383838","#686868","#989898","#c8c8c8","#e8e8e8"],this.set_theme({colors:this.colors,marker_color:"#aea9a9",font_color:"black",background_colors:"white"})},data:function(t,e,i){e=void 0===e?[]:e,i=i||null,e=Bluff.array(e),this._1.push([t,e,i||this._1F()]),this._5=e.length>this._5?e.length:this._5,Bluff.each(e,function(t){void 0!==t&&(null===this.maximum_value&&null===this.minimum_value&&(this.maximum_value=this.minimum_value=t),this.maximum_value=this._1k(t)?t:this.maximum_value,this.maximum_value>=0&&(this._c=!0),this.minimum_value=this._1G(t)?t:this.minimum_value,0>this.minimum_value&&(this._c=!0))},this)},draw:function(){this.stacked&&this._1H(),this._1I(),this._x(function(){this._0.rectangle(this.left_margin,this.top_margin,this._b-this.right_margin,this._L-this.bottom_margin),this._0.rectangle(this._2,this._7,this._l,this._g)})},clear:function(){this._M()},on:function(t,e,i){var n=this._10[t]=this._10[t]||[];n.push([e,i])},trigger:function(t,e){var i=this._10[t];i&&Bluff.each(i,function(t){t[0].call(t[1],e)})},_1I:function(){return this._c?(this._16(),this._1K(),this.sort&&this._1L(),this._1M(),this._N(),this._1N(),this._1O(),void 0):this._1J()},_16:function(t){if(null===this._9||t===!0){if(this._9=[],!this._c)return;this._1l(),Bluff.each(this._1,function(t){var e=[];Bluff.each(t[this.klass.DATA_VALUES_INDEX],function(t){null===t||void 0===t?e.push(null):e.push((t-this.minimum_value)/this._i)},this),this._9.push([t[this.klass.DATA_LABEL_INDEX],e,t[this.klass.DATA_COLOR_INDEX]])},this)}},_1l:function(){this._i=this.maximum_value-this.minimum_value,this._i=this._i>0?this._i:1;var t=Math.round(Math.LOG10E*Math.log(this._i));this._1m=Math.pow(10,3-t)},_1K:function(){this._O=this.hide_line_markers?0:this._P(this.marker_font_size),this._1n=this.hide_title?0:this._P(this.title_font_size),this._1o=this.hide_legend?0:this._P(this.legend_font_size);var t,e,i,n,s,r,o;if(this.hide_line_markers)this._2=this.left_margin,this._17=this.right_margin,this._1p=this.bottom_margin;else{if(e=0,this.has_left_labels){t="";for(o in this.labels)t=t.length>this.labels[o].length?t:this.labels[o];e=1.25*this._H(this.marker_font_size,t)}else e=this._H(this.marker_font_size,this._Q(this.maximum_value));i=this.hide_line_numbers&&!this.has_left_labels?0:e+2*this.klass.LABEL_MARGIN,this._2=this.left_margin+i+(null===this.y_axis_label?0:this._O+2*this.klass.LABEL_MARGIN),n=-1/0;for(o in this.labels)n=n>Number(o)?n:Number(o);n=Math.round(n),s=n>=this._5-1&&this.center_labels_over_point?this._H(this.marker_font_size,this.labels[n])/2:0,this._17=this.right_margin+s,this._1p=this.bottom_margin+this._O+this.klass.LABEL_MARGIN}this._l=this._b-this._17,this._6=this._b-this._2-this._17,this._7=this.top_margin+(this.hide_title?this.title_margin:this._1n+this.title_margin)+(this.hide_legend?this.legend_margin:this._1o+this.legend_margin),r=null===this.x_axis_label?0:this._O+this.klass.LABEL_MARGIN,this._g=this._L-this._1p-r,this._3=this._g-this._7},_1N:function(){if(this.x_axis_label){var t=this._g+2*this.klass.LABEL_MARGIN+this._O;this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.stroke="transparent",this._0.pointsize=this._d(this.marker_font_size),this._0.gravity="north",this._0.annotate_scaled(this._b,1,0,t,this.x_axis_label,this._a),this._x(function(){this._0.line(0,t,this._b,t)})}},_N:function(){if(!this.hide_line_markers){null===this.y_axis_increment?(null===this.marker_count&&(Bluff.each([3,4,5,6,7],function(t){this.marker_count||0!==this._i%t||(this.marker_count=t)},this),this.marker_count=this.marker_count||4),this._18=this._i>0?this._19(this._i/this.marker_count):1):(this.maximum_value=Math.max(Math.ceil(this.maximum_value),this.y_axis_increment),this.minimum_value=Math.floor(this.minimum_value),this._1l(),this._16(!0),this.marker_count=Math.round(this._i/this.y_axis_increment),this._18=this.y_axis_increment),this._1P=this._3/(this._i/this._18);var t,e,i,n;for(t=0,e=this.marker_count;e>=t;t++)i=this._7+this._3-t*this._1P,this._0.stroke=this.marker_color,this._0.stroke_width=1,this._0.line(this._2,i,this._l,i),n=t*this._18+this.minimum_value,this.hide_line_numbers||(this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.font_weight="normal",this._0.stroke="transparent",this._0.pointsize=this._d(this.marker_font_size),this._0.gravity="east",this._0.annotate_scaled(this._2-this.klass.LABEL_MARGIN,1,0,i,this._Q(n),this._a))}},_1q:function(t){return(this._b-t)/2},_1M:function(){if(!this.hide_legend){this._I=Bluff.map(this._1,function(t){return t[this.klass.DATA_LABEL_INDEX]},this);var t=this.legend_box_size;this.font&&(this._0.font=this.font),this._0.pointsize=this.legend_font_size;var e=[[]];Bluff.each(this._I,function(i){var n=e.length-1,s=this._0.get_type_metrics(i),r=s.width+2.7*t;e[n].push(r),Bluff.sum(e[n])>.9*this._b&&e.push([e[n].pop()])},this);var i=this._1q(Bluff.sum(e[0])),n=this.hide_title?this.top_margin+this.title_margin:this.top_margin+this.title_margin+this._1n;this._x(function(){this._0.stroke_width=1,this._0.line(0,n,this._b,n)}),Bluff.each(this._I,function(s,r){this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.pointsize=this._d(this.legend_font_size),this._0.stroke="transparent",this._0.font_weight="normal",this._0.gravity="west",this._0.annotate_scaled(this._b,1,i+1.7*t,n,s,this._a),this._0.stroke="transparent",this._0.fill=this._1[r][this.klass.DATA_COLOR_INDEX],this._0.rectangle(i,n-t/2,i+t,n+t/2),this._0.pointsize=this.legend_font_size;var o,a=this._0.get_type_metrics(s),l=a.width+2.7*t;e[0].shift(),0==e[0].length?(this._x(function(){this._0.line(0,n,this._b,n)}),e.shift(),e.length>0&&(i=this._1q(Bluff.sum(e[0]))),o=Math.max(this._1o,t)+this.legend_margin,e.length>0&&(n+=o,this._7+=o,this._3=this._g-this._7)):i+=l},this),this._w=0}},_1O:function(){!this.hide_title&&this.title&&(this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.pointsize=this._d(this.title_font_size),this._0.font_weight="bold",this._0.gravity="north",this._0.annotate_scaled(this._b,1,0,this.top_margin,this.title,this._a))},_e:function(t,e){if(!this.hide_line_markers){var i;this.labels[e]&&!this._u[e]&&(i=this._g+this.klass.LABEL_MARGIN,this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.stroke="transparent",this._0.font_weight="normal",this._0.pointsize=this._d(this.marker_font_size),this._0.gravity="north",this._0.annotate_scaled(1,1,t,i,this.labels[e],this._a),this._u[e]=!0,this._x(function(){this._0.stroke_width=1,this._0.line(0,i,this._b,i)}))}},_y:function(t,e,i,n,s,r,o,a){if(this.tooltips){var l=this._0.tooltip(t,e,i,n,s,r,o);Bluff.Event.observe(l,"click",function(){var t={series:s,label:this.labels[a],value:o,color:r};this.trigger("click:datapoint",t)},this)}},_1J:function(){this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.stroke="transparent",this._0.font_weight="normal",this._0.pointsize=this._d(80),this._0.gravity="center",this._0.annotate_scaled(this._b,this._L/2,0,10,this.no_data_message,this._a)},_M:function(){var t=this._k.background_colors;switch(!0){case t instanceof Array:this._1Q.apply(this,t);break;case"string"==typeof t:this._1R(t);break;default:this._1S(this._k.background_image)}},_1R:function(t){this._0.render_solid_background(this._j,this._t,t)},_1Q:function(t,e){this._0.render_gradiated_background(this._j,this._t,t,e)},_1S:function(){},_1j:function(){this._w=0,this._u={},this._k={},this._0.scale(this._a,this._a)},_2k:function(t){return this._a*t},_d:function(t){var e=t*this._a;return e},_R:function(t,e){return t>e?e:t},_1k:function(t){return t>this.maximum_value},_1G:function(t){return this.minimum_value>t},_1r:function(t){return t},_2l:function(t){return t},_19:function(t){if(0==t)return 1;for(var e=1;10>t;)t*=10,e/=10;for(;t>100;)t/=10,e*=10;return Math.floor(t)*e},_1L:function(){var t=this._1T,e=this.klass.DATA_VALUES_INDEX;this._9.sort(function(i,n){return t(n[e])-t(i[e])}),this._1.sort(function(i,n){return t(n[e])-t(i[e])})},_1T:function(t){var e=0;return Bluff.each(t,function(t){e+=t||0}),e},_1H:function(){for(var t=[],e=this._5;e--;)t[e]=0;Bluff.each(this._1,function(e){Bluff.each(e[this.klass.DATA_VALUES_INDEX],function(e,i){t[i]+=e},this),e[this.klass.DATA_VALUES_INDEX]=Bluff.array(t)},this)},_x:function(t){this.klass.DEBUG&&(this._0.fill="transparent",this._0.stroke="turquoise",t.call(this))},_1F:function(){var t=this._w;return this._w=(this._w+1)%this.colors.length,this.colors[t]},_Q:function(t){var e=this.klass.THOUSAND_SEPARATOR,i=0==this._i%this.marker_count||null!==this.y_axis_increment?Math.round(t)+"":Math.floor(t*this._1m)/this._1m+"",n=i.split(".");return n[0]=n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+e),n.join(".")},_P:function(t){return this._0.caps_height(t)},_H:function(t,e){return this._0.text_width(t,e)}}),Bluff.Area=new JS.Class(Bluff.Base,{draw:function(){this.callSuper(),this._c&&(this._S=this._6/(this._5-1),this._0.stroke="transparent",Bluff.each(this._9,function(t){var e=[],i=0,n=0;Bluff.each(t[this.klass.DATA_VALUES_INDEX],function(t,s){var r=this._2+this._S*s,o=this._7+(this._3-t*this._3);i>0&&n>0?(e.push(r),e.push(o)):(e.push(this._2),e.push(this._g-1),e.push(r),e.push(o)),this._e(r,s),i=r,n=o},this),e.push(this._l),e.push(this._g-1),e.push(this._2),e.push(this._g-1),this._0.fill=t[this.klass.DATA_COLOR_INDEX],this._0.polyline(e)},this))}}),Bluff.BarConversion=new JS.Class({mode:null,zero:null,graph_top:null,graph_height:null,minimum_value:null,spread:null,getLeftYRightYscaled:function(t,e){var i;switch(this.mode){case 1:e[0]=this.graph_top+this.graph_height*(1-t)+1,e[1]=this.graph_top+this.graph_height-1;break;case 2:e[0]=this.graph_top+1,e[1]=this.graph_top+this.graph_height*(1-t)-1;break;case 3:i=t-this.minimum_value/this.spread,t>=this.zero?(e[0]=this.graph_top+this.graph_height*(1-(i-this.zero))+1,e[1]=this.graph_top+this.graph_height*(1-this.zero)-1):(e[0]=this.graph_top+this.graph_height*(1-(i-this.zero))+1,e[1]=this.graph_top+this.graph_height*(1-this.zero)-1);break;default:e[0]=0,e[1]=0}}}),Bluff.Bar=new JS.Class(Bluff.Base,{bar_spacing:.9,draw:function(){this.center_labels_over_point=Bluff.keys(this.labels).length>this._5,this.callSuper(),this._c&&this._T()},_T:function(){this._8=this._6/(this._5*this._1.length);var t=this._8*(1-this.bar_spacing)/2;this._0.stroke_opacity=0;var e=new Bluff.BarConversion;e.graph_height=this._3,e.graph_top=this._7,this.minimum_value>=0?e.mode=1:0>=this.maximum_value?e.mode=2:(e.mode=3,e.spread=this._i,e.minimum_value=this.minimum_value,e.zero=-this.minimum_value/this._i),Bluff.each(this._9,function(i,n){var s=this._1[n][this.klass.DATA_VALUES_INDEX];Bluff.each(i[this.klass.DATA_VALUES_INDEX],function(r,o){var a=this._2+this._8*(n+o+(this._1.length-1)*o)+t,l=a+this._8*this.bar_spacing,h=[];e.getLeftYRightYscaled(r,h),this._0.fill=i[this.klass.DATA_COLOR_INDEX],this._0.rectangle(a,h[0],l,h[1]),this._y(a,h[0],l-a,h[1]-h[0],i[this.klass.DATA_LABEL_INDEX],i[this.klass.DATA_COLOR_INDEX],s[o],o);var u=this._2+this._1.length*this._8*o+this._1.length*this._8/2;this._e(u-(this.center_labels_over_point?this._8/2:0),o)},this)},this),this.center_labels_over_point&&this._e(this._l,this._5)}}),Bluff.Line=new JS.Class(Bluff.Base,{baseline_value:null,baseline_color:null,line_width:null,dot_radius:null,hide_dots:null,hide_lines:null,initialize:function(t){if(arguments.length>3)throw"Wrong number of arguments";1===arguments.length||"number"!=typeof arguments[1]&&"string"!=typeof arguments[1]?this.callSuper(t,null):this.callSuper(),this.hide_dots=this.hide_lines=!1,this.baseline_color="red",this.baseline_value=null},draw:function(){if(this.callSuper(),this._c){this.x_increment=this._5>1?this._6/(this._5-1):this._6;var t;void 0!==this._U&&(t=this._7+(this._3-this._U*this._3),this._0.push(),this._0.stroke=this.baseline_color,this._0.fill_opacity=0,this._0.stroke_width=3,this._0.line(this._2,t,this._2+this._6,t),this._0.pop()),Bluff.each(this._9,function(t,e){var i=null,n=null,s=this._1[e][this.klass.DATA_VALUES_INDEX];this._1U=this._1V(t),Bluff.each(t[this.klass.DATA_VALUES_INDEX],function(e,r){var o=this._2+this.x_increment*r;if("number"==typeof e){this._e(o,r);var a=this._7+(this._3-e*this._3);this._0.stroke=t[this.klass.DATA_COLOR_INDEX],this._0.fill=t[this.klass.DATA_COLOR_INDEX],this._0.stroke_opacity=1,this._0.stroke_width=this.line_width||this._R(this._j/(6*this._9[0][this.klass.DATA_VALUES_INDEX].length),3);var l=this.dot_radius||this._R(this._j/(2*this._9[0][this.klass.DATA_VALUES_INDEX].length),7);this.hide_lines||null===i||null===n?this._1U&&this._0.circle(o,a,o-l,a):this._0.line(i,n,o,a),this.hide_dots||this._0.circle(o,a,o-l,a),this._y(o-l,a-l,2*l,2*l,t[this.klass.DATA_LABEL_INDEX],t[this.klass.DATA_COLOR_INDEX],s[r],r),i=o,n=a}},this)},this)}},_16:function(){this.maximum_value=Math.max(this.maximum_value,this.baseline_value),this.callSuper(),null!==this.baseline_value&&(this._U=this.baseline_value/this.maximum_value)},_1V:function(t){var e=0;return Bluff.each(t[this.klass.DATA_VALUES_INDEX],function(t){void 0!==t&&(e+=1)}),1===e}}),Bluff.Dot=new JS.Class(Bluff.Base,{draw:function(){if(this.has_left_labels=!0,this.callSuper(),this._c){var t=1;this._J=this._3/this._5,this._1a=this._J*t/this._9.length,this._0.stroke_opacity=0;var e=(Bluff.array_new(this._5,0),Bluff.array_new(this._5,this._2),this._J*(1-t)/2);Bluff.each(this._9,function(t,i){Bluff.each(t[this.klass.DATA_VALUES_INDEX],function(n,s){var r=this._2+n*this._6-Math.round(this._1a/6),o=this._7+this._J*s+e+Math.round(this._1a/2);0===i&&(this._0.stroke=this.marker_color,this._0.stroke_width=1,this._0.opacity=.1,this._0.line(this._2,o,this._2+this._6,o)),this._0.fill=t[this.klass.DATA_COLOR_INDEX],this._0.stroke="transparent",this._0.circle(r,o,r+Math.round(this._1a/3),o);var a=this._7+(this._J*s+this._J/2)+e;this._e(a,s)},this)},this)}},_N:function(){if(!this.hide_line_markers){this._0.stroke_antialias=!1,this._0.stroke_width=1;for(var t=5,e=this._19(this.maximum_value/t),i=0;t>=i;i++){var n=(this._l-this._2)/t,s=this._l-n*i-1,r=i-t,o=Math.abs(r)*e;this._0.stroke=this.marker_color,this._0.line(s,this._g,s,this._g+.5*this.klass.LABEL_MARGIN),this.hide_line_numbers||(this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.stroke="transparent",this._0.pointsize=this._d(this.marker_font_size),this._0.gravity="center",this._0.annotate_scaled(0,0,s,this._g+2*this.klass.LABEL_MARGIN,o,this._a)),this._0.stroke_antialias=!0}}},_e:function(t,e){this.labels[e]&&!this._u[e]&&(this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.stroke="transparent",this._0.font_weight="normal",this._0.pointsize=this._d(this.marker_font_size),this._0.gravity="east",this._0.annotate_scaled(1,1,this._2-2*this.klass.LABEL_MARGIN,t,this.labels[e],this._a),this._u[e]=!0)}}),Bluff.Net=new JS.Class(Bluff.Base,{hide_dots:null,line_width:null,dot_radius:null,initialize:function(){this.callSuper(),this.hide_dots=!1,this.hide_line_numbers=!0},draw:function(){if(this.callSuper(),this._c){this._z=this._3/2,this._A=this._2+this._6/2,this._B=this._7+this._3/2-10,this._S=this._6/(this._5-1);var t=this.dot_radius||this._R(this._j/(2.5*this._9[0][this.klass.DATA_VALUES_INDEX].length),7);this._0.stroke_opacity=1,this._0.stroke_width=this.line_width||this._R(this._j/(4*this._9[0][this.klass.DATA_VALUES_INDEX].length),3);var e;void 0!==this._U&&(e=this._7+(this._3-this._U*this._3),this._0.push(),this._0.stroke_color=this.baseline_color,this._0.fill_opacity=0,this._0.stroke_width=5,this._0.line(this._2,e,this._2+this._6,e),this._0.pop()),Bluff.each(this._9,function(e){Bluff.each(e[this.klass.DATA_VALUES_INDEX],function(i,n){if(void 0!==i){var s=2*n*Math.PI/this._5,r=i*this._z,o=this._A+Math.sin(s)*r,a=this._B-Math.cos(s)*r,l=e[this.klass.DATA_VALUES_INDEX].length>n+1?n+1:0,h=2*l*Math.PI/this._5,u=e[this.klass.DATA_VALUES_INDEX][l]*this._z,c=this._A+Math.sin(h)*u,f=this._B-Math.cos(h)*u;this._0.stroke=e[this.klass.DATA_COLOR_INDEX],this._0.fill=e[this.klass.DATA_COLOR_INDEX],this._0.line(o,a,c,f),this.hide_dots||this._0.circle(o,a,o-t,a)}},this)},this)}},_N:function(){if(!this.hide_line_markers){this._z=this._3/2,this._A=this._2+this._6/2,this._B=this._7+this._3/2-10;for(var t,e,i=0,n=this._5;n>i;i++)t=2*i*Math.PI/this._5,this._0.stroke=this.marker_color,this._0.stroke_width=1,this._0.line(this._A,this._B,this._A+Math.sin(t)*this._z,this._B-Math.cos(t)*this._z),e=this.labels[i]?this.labels[i]:"000",this._e(this._A,this._B,360*t/(2*Math.PI),this._z,e)}},_e:function(t,e,i,n,s){var r=1.1,o=t,a=e,l=i*Math.PI/180,h=o+n*r*Math.sin(l),u=a-n*r*Math.cos(l);this._0.fill=this.marker_color,this.font&&(this._0.font=this.font),this._0.pointsize=this._d(20),this._0.stroke="transparent",this._0.font_weight="bold",this._0.gravity="center",this._0.annotate_scaled(0,0,h,u,s,this._a)}}),Bluff.Pie=new JS.Class(Bluff.Base,{extend:{TEXT_OFFSET_PERCENTAGE:.08},zero_degreee:null,hide_labels_less_than:null,initialize_ivars:function(){this.callSuper(),this.zero_degree=0,this.hide_labels_less_than=0},draw:function(){if(this.hide_line_markers=!0,this.callSuper(),this._c){var t=this._3,e=.8*(Math.min(this._6,this._3)/2),i=(this._2+(this._6-t)/2,this._2+this._6/2),n=this._7+this._3/2-10,s=this._1W(),r=this.zero_degree,o=this.klass.DATA_VALUES_INDEX;this.sort&&this._1.sort(function(t,e){return t[o][0]-e[o][0]}),Bluff.each(this._1,function(t,o){if(t[this.klass.DATA_VALUES_INDEX][0]>0){this._0.fill=t[this.klass.DATA_COLOR_INDEX];var a=360*(t[this.klass.DATA_VALUES_INDEX][0]/s);this._0.circle(i,n,i+e,n,r,r+a+.5);var l,h=r+(r+a-r)/2,u=Math.round(100*(t[this.klass.DATA_VALUES_INDEX][0]/s));u>=this.hide_labels_less_than&&(l=this._Q(t[this.klass.DATA_VALUES_INDEX][0]),this._e(i,n,h,e+e*this.klass.TEXT_OFFSET_PERCENTAGE,l,t,o)),r+=a}},this)}},_e:function(t,e,i,n,s,r,o){var a=20,l=t,h=e,u=n+a,c=.15*u,f=l+(u+c)*Math.cos(i*Math.PI/180),d=h+u*Math.sin(i*Math.PI/180);this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.pointsize=this._d(this.marker_font_size),this._0.font_weight="bold",this._0.gravity="center",this._0.annotate_scaled(0,0,f,d,s,this._a),this._y(f-20,d-20,40,40,r[this.klass.DATA_LABEL_INDEX],r[this.klass.DATA_COLOR_INDEX],s,o)},_1W:function(){var t=0;return Bluff.each(this._1,function(e){t+=e[this.klass.DATA_VALUES_INDEX][0]},this),t}}),Bluff.SideBar=new JS.Class(Bluff.Base,{bar_spacing:.9,draw:function(){this.has_left_labels=!0,this.callSuper(),this._c&&this._T()},_T:function(){this._V=this._3/this._5,this._8=this._V/this._9.length,this._0.stroke_opacity=0;var t=Bluff.array_new(this._5,0),e=Bluff.array_new(this._5,this._2),i=this._8*(1-this.bar_spacing)/2;Bluff.each(this._9,function(n,s){var r=this._1[s][this.klass.DATA_VALUES_INDEX];Bluff.each(n[this.klass.DATA_VALUES_INDEX],function(o,a){var l=this._2+(this._6-o*this._6-t[a]),h=this._2+this._6-t[a],u=h-l,c=e[a]-1,f=this._7+this._V*a+this._8*s+i,d=c+u,p=f+this._8*this.bar_spacing;t[a]+=o*this._6,this._0.stroke="transparent",this._0.fill=n[this.klass.DATA_COLOR_INDEX],this._0.rectangle(c,f,d,p),this._y(c,f,d-c,p-f,n[this.klass.DATA_LABEL_INDEX],n[this.klass.DATA_COLOR_INDEX],r[a],a);var _=this._7+(this._V*a+this._V/2);this._e(_,a)},this)},this)},_N:function(){if(!this.hide_line_markers){this._0.stroke_antialias=!1,this._0.stroke_width=1;for(var t,e,i,n,s=5,r=this._19(this._i/s),o=0;s>=o;o++)t=(this._l-this._2)/s,e=this._l-t*o-1,i=o-s,n=Math.abs(i)*r+this.minimum_value,this._0.stroke=this.marker_color,this._0.line(e,this._g,e,this._7),this.hide_line_numbers||(this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.stroke="transparent",this._0.pointsize=this._d(this.marker_font_size),this._0.gravity="center",this._0.annotate_scaled(0,0,e,this._g+2*this.klass.LABEL_MARGIN,this._Q(n),this._a))
6
+ }},_e:function(t,e){this.labels[e]&&!this._u[e]&&(this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.stroke="transparent",this._0.font_weight="normal",this._0.pointsize=this._d(this.marker_font_size),this._0.gravity="east",this._0.annotate_scaled(1,1,this._2-2*this.klass.LABEL_MARGIN,t,this.labels[e],this._a),this._u[e]=!0)}}),Bluff.Spider=new JS.Class(Bluff.Base,{hide_text:null,hide_axes:null,transparent_background:null,initialize:function(t,e,i){this.callSuper(t,i),this._1X=e,this.hide_legend=!0},draw:function(){if(this.hide_line_markers=!0,this.callSuper(),this._c){var t=this._3,e=this._3/2,i=(this._2+(this._6-t)/2,this._2+this._6/2),n=this._7+this._3/2-25;this._1Y=e/this._1X;var s=(this._1Z(),2*Math.PI/this._1.length);this.hide_axes||this._20(i,n,e,s),this._21(i,n,s)}},_1s:function(t){return t*this._1Y},_e:function(t,e,i,n,s){var r=50,o=t,a=e+0,l=o+(n+r)*Math.cos(i),h=a+(n+r)*Math.sin(i);this._0.fill=this.marker_color,this.font&&(this._0.font=this.font),this._0.pointsize=this._d(this.legend_font_size),this._0.stroke="transparent",this._0.font_weight="bold",this._0.gravity="center",this._0.annotate_scaled(0,0,l,h,s,this._a)},_20:function(t,e,i,n,s){if(!this.hide_axes){var r=0;Bluff.each(this._1,function(o){this._0.stroke=s||o[this.klass.DATA_COLOR_INDEX],this._0.stroke_width=5;var a=i*Math.cos(r),l=i*Math.sin(r);this._0.line(t,e,t+a,e+l),this.hide_text||this._e(t,e,r,i,o[this.klass.DATA_LABEL_INDEX]),r+=n},this)}},_21:function(t,e,i,n){var s=[],r=0;Bluff.each(this._1,function(n){s.push(t+this._1s(n[this.klass.DATA_VALUES_INDEX][0])*Math.cos(r)),s.push(e+this._1s(n[this.klass.DATA_VALUES_INDEX][0])*Math.sin(r)),r+=i},this),this._0.stroke_width=1,this._0.stroke=n||this.marker_color,this._0.fill=n||this.marker_color,this._0.fill_opacity=.4,this._0.polyline(s)},_1Z:function(){var t=0;return Bluff.each(this._1,function(e){t+=e[this.klass.DATA_VALUES_INDEX][0]},this),t}}),Bluff.Base.StackedMixin=new JS.Module({_1b:function(){var t={};Bluff.each(this._1,function(e){Bluff.each(e[this.klass.DATA_VALUES_INDEX],function(e,i){t[i]||(t[i]=0),t[i]+=e},this)},this);for(var e in t)t[e]>this.maximum_value&&(this.maximum_value=t[e]);this.minimum_value=0}}),Bluff.StackedArea=new JS.Class(Bluff.Base,{include:Bluff.Base.StackedMixin,last_series_goes_on_bottom:null,draw:function(){if(this._1b(),this.callSuper(),this._c){this._S=this._6/(this._5-1),this._0.stroke="transparent";var t=Bluff.array_new(this._5,0),e=null,i=this.last_series_goes_on_bottom?"reverse_each":"each";Bluff[i](this._9,function(i){var n=e;e=[],Bluff.each(i[this.klass.DATA_VALUES_INDEX],function(i,n){var s=this._2+this._S*n,r=this._7+(this._3-i*this._3-t[n]);t[n]+=i*this._3,e.push(s),e.push(r),this._e(s,n)},this);var s,r;if(n){for(s=Bluff.array(e),r=n.length/2-1;r>=0;r--)s.push(n[2*r]),s.push(n[2*r+1]);s.push(e[0]),s.push(e[1])}else s=Bluff.array(e),s.push(this._l),s.push(this._g-1),s.push(this._2),s.push(this._g-1),s.push(e[0]),s.push(e[1]);this._0.fill=i[this.klass.DATA_COLOR_INDEX],this._0.polyline(s)},this)}}}),Bluff.StackedBar=new JS.Class(Bluff.Base,{include:Bluff.Base.StackedMixin,bar_spacing:.9,draw:function(){if(this._1b(),this.callSuper(),this._c){this._8=this._6/this._5;var t=this._8*(1-this.bar_spacing)/2;this._0.stroke_opacity=0;var e=Bluff.array_new(this._5,0);Bluff.each(this._9,function(i,n){var s=this._1[n][this.klass.DATA_VALUES_INDEX];Bluff.each(i[this.klass.DATA_VALUES_INDEX],function(n,r){var o=this._2+this._8*r+this._8*this.bar_spacing/2;if(this._e(o,r),0!=n){var a=this._2+this._8*r+t,l=this._7+(this._3-n*this._3-e[r])+1,h=a+this._8*this.bar_spacing,u=this._7+this._3-e[r]-1;e[r]+=n*this._3,this._0.fill=i[this.klass.DATA_COLOR_INDEX],this._0.rectangle(a,l,h,u),this._y(a,l,h-a,u-l,i[this.klass.DATA_LABEL_INDEX],i[this.klass.DATA_COLOR_INDEX],s[r],r)}},this)},this)}}}),Bluff.AccumulatorBar=new JS.Class(Bluff.StackedBar,{draw:function(){if(1!==this._1.length)throw"Incorrect number of datasets";var t=[],e=0,i=[];Bluff.each(this._1[0][this.klass.DATA_VALUES_INDEX],function(n){var s=-1/0;Bluff.each(i,function(t){s=Math.max(s,t)}),i.push(e>0?n+s:n),t.push(i[e]-n),e+=1},this),this.data("Accumulator",t),this.callSuper()}}),Bluff.SideStackedBar=new JS.Class(Bluff.SideBar,{include:Bluff.Base.StackedMixin,bar_spacing:.9,draw:function(){this.has_left_labels=!0,this._1b(),this.callSuper()},_T:function(){this._8=this._3/this._5;var t=Bluff.array_new(this._5,0),e=Bluff.array_new(this._5,this._2),i=this._8*(1-this.bar_spacing)/2;Bluff.each(this._9,function(n,s){var r=this._1[s][this.klass.DATA_VALUES_INDEX];Bluff.each(n[this.klass.DATA_VALUES_INDEX],function(s,o){var a=this._2+(this._6-s*this._6-t[o])+1,l=this._2+this._6-t[o]-1,h=l-a;this._0.fill=n[this.klass.DATA_COLOR_INDEX];var u=e[o],c=this._7+this._8*o+i,f=u+h,d=c+this._8*this.bar_spacing;e[o]+=h,t[o]+=s*this._6-2,this._0.rectangle(u,c,f,d),this._y(u,c,f-u,d-c,n[this.klass.DATA_LABEL_INDEX],n[this.klass.DATA_COLOR_INDEX],r[o],o);var p=this._7+this._8*o+this._8*this.bar_spacing/2;this._e(p,o)},this)},this)},_1k:function(t,e){return e=e||0,this._1r(t,e)>this.maximum_value},_1r:function(t,e){var i=0;return Bluff.each(this._1,function(t){i+=t[this.klass.DATA_VALUES_INDEX][e]},this),i}}),Bluff.Mini.Legend=new JS.Module({hide_mini_legend:!1,_1c:function(){if(!this.hide_mini_legend){this._I=Bluff.map(this._1,function(t){return t[this.klass.DATA_LABEL_INDEX]},this);var t=this._d(this._1.length*this._1t()+this.top_margin+this.bottom_margin);switch(this._22=this._L,this._23=this._b,this.legend_position){case"right":this._t=Math.max(this._t,t),this._j+=this._24()+this.left_margin;break;default:this._t+=t}this._M()}},_1t:function(){return 1.7*this._P(this.legend_font_size)},_24:function(){var t=0;return Bluff.each(this._I,function(e){t=Math.max(this._H(this.legend_font_size,e),t)},this),this._d(t+68)},_1d:function(){if(!this.hide_mini_legend){var t=40,e=100,i=40;this.font&&(this._0.font=this.font),this._0.pointsize=this.legend_font_size;var n,s;switch(this.legend_position){case"right":n=this._23+this.left_margin,s=this.top_margin+i;break;default:n=e,s=this._22+i}this._x(function(){this._0.line(0,s,this._b,s)}),Bluff.each(this._I,function(e,i){this._0.fill=this.font_color,this.font&&(this._0.font=this.font),this._0.pointsize=this._d(this.legend_font_size),this._0.stroke="transparent",this._0.font_weight="normal",this._0.gravity="west",this._0.annotate_scaled(this._b,1,n+1.7*t,s,this._25(e),this._a),this._0.stroke="transparent",this._0.fill=this._1[i][this.klass.DATA_COLOR_INDEX],this._0.rectangle(n,s-t/2,n+t,s+t/2),s+=this._1t()},this),this._w=0}},_25:function(t){for(var e=t+"";this._H(this._d(this.legend_font_size),e)>this._j-this.legend_left_margin-this.right_margin&&e.length>1;)e=e.substr(0,e.length-1);return e+(e.length<(t+"").length?"...":"")}}),Bluff.Mini.Bar=new JS.Class(Bluff.Bar,{include:Bluff.Mini.Legend,initialize_ivars:function(){this.callSuper(),this.hide_legend=!0,this.hide_title=!0,this.hide_line_numbers=!0,this.marker_font_size=50,this.minimum_value=0,this.maximum_value=0,this.legend_font_size=60},draw:function(){this._1c(),this.callSuper(),this._1d()}}),Bluff.Mini.Pie=new JS.Class(Bluff.Pie,{include:Bluff.Mini.Legend,initialize_ivars:function(){this.callSuper(),this.hide_legend=!0,this.hide_title=!0,this.hide_line_numbers=!0,this.marker_font_size=60,this.legend_font_size=60},draw:function(){this._1c(),this.callSuper(),this._1d()}}),Bluff.Mini.SideBar=new JS.Class(Bluff.SideBar,{include:Bluff.Mini.Legend,initialize_ivars:function(){this.callSuper(),this.hide_legend=!0,this.hide_title=!0,this.hide_line_numbers=!0,this.marker_font_size=50,this.legend_font_size=50},draw:function(){this._1c(),this.callSuper(),this._1d()}}),Bluff.Renderer=new JS.Class({extend:{WRAPPER_CLASS:"bluff-wrapper",TEXT_CLASS:"bluff-text",TARGET_CLASS:"bluff-tooltip-target"},font:"Arial, Helvetica, Verdana, sans-serif",gravity:"north",initialize:function(t){this._n=document.getElementById(t),this._4=this._n.getContext("2d")},scale:function(t,e){this._f=t,this._h=e||t},caps_height:function(t){var e=this._W(t,"X"),i=this._K(e).height;return this._X(e),i},text_width:function(t,e){var i=this._W(t,e),n=this._K(i).width;return this._X(i),n},get_type_metrics:function(t){var e=this._W(this.pointsize,t);document.body.appendChild(e);var i=this._K(e);return this._X(e),i},clear:function(t,e){this._n.width=t,this._n.height=e,this._4.clearRect(0,0,t,e);var i=this._1u(),n=i.childNodes,s=n.length;for(i.style.width=t+"px",i.style.height=e+"px";s--;)"canvas"!==n[s].tagName.toLowerCase()&&(Bluff.Event.stopObserving(n[s]),this._X(n[s]))},push:function(){this._4.save()},pop:function(){this._4.restore()},render_gradiated_background:function(t,e,i,n){this.clear(t,e);var s=this._4.createLinearGradient(0,0,0,e);s.addColorStop(0,i),s.addColorStop(1,n),this._4.fillStyle=s,this._4.fillRect(0,0,t,e)},render_solid_background:function(t,e,i){this.clear(t,e),this._4.fillStyle=i,this._4.fillRect(0,0,t,e)},annotate_scaled:function(t,e,i,n,s,r){var o=t*r>=1?t*r:1,a=e*r>=1?e*r:1,s=this._W(this.pointsize,s);s.style.color=this.fill,s.style.cursor="default",s.style.fontWeight=this.font_weight,s.style.textAlign="center",s.style.left=this._f*i+this._26(s,o)+"px",s.style.top=this._h*n+this._27(s,a)+"px"},tooltip:function(t,e,i,n,s,r,o){0>i&&(t+=i),0>n&&(e+=n);var a=this._n.parentNode,l=document.createElement("div");return l.className=this.klass.TARGET_CLASS,l.style.cursor="default",l.style.position="absolute",l.style.left=this._f*t-3+"px",l.style.top=this._h*e-3+"px",l.style.width=this._f*Math.abs(i)+5+"px",l.style.height=this._h*Math.abs(n)+5+"px",l.style.fontSize=0,l.style.overflow="hidden",Bluff.Event.observe(l,"mouseover",function(){Bluff.Tooltip.show(s,r,o)}),Bluff.Event.observe(l,"mouseout",function(){Bluff.Tooltip.hide()}),a.appendChild(l),l},circle:function(t,e,i,n,s,r){var o=Math.sqrt(Math.pow(i-t,2)+Math.pow(n-e,2)),a=0,l=2*Math.PI;this._4.fillStyle=this.fill,this._4.beginPath(),void 0!==s&&void 0!==r&&360!==Math.abs(Math.floor(r-s))&&(a=s*Math.PI/180,l=r*Math.PI/180,this._4.moveTo(this._f*(t+o*Math.cos(l)),this._h*(e+o*Math.sin(l))),this._4.lineTo(this._f*t,this._h*e),this._4.lineTo(this._f*(t+o*Math.cos(a)),this._h*(e+o*Math.sin(a)))),this._4.arc(this._f*t,this._h*e,this._f*o,a,l,!1),this._4.fill()},line:function(t,e,i,n){this._4.strokeStyle=this.stroke,this._4.lineWidth=this.stroke_width,this._4.beginPath(),this._4.moveTo(this._f*t,this._h*e),this._4.lineTo(this._f*i,this._h*n),this._4.stroke()},polyline:function(t){this._4.fillStyle=this.fill,this._4.globalAlpha=this.fill_opacity||1;try{this._4.strokeStyle=this.stroke}catch(e){}var i=t.shift(),n=t.shift();for(this._4.beginPath(),this._4.moveTo(this._f*i,this._h*n);t.length>0;)i=t.shift(),n=t.shift(),this._4.lineTo(this._f*i,this._h*n);this._4.fill()},rectangle:function(t,e,i,n){var s;t>i&&(s=t,t=i,i=s),e>n&&(s=e,e=n,n=s);try{this._4.fillStyle=this.fill,this._4.fillRect(this._f*t,this._h*e,this._f*(i-t),this._h*(n-e))}catch(r){}try{this._4.strokeStyle=this.stroke,"transparent"!==this.stroke&&this._4.strokeRect(this._f*t,this._h*e,this._f*(i-t),this._h*(n-e))}catch(r){}},_26:function(t,e){var i=this._K(t).width;switch(this.gravity){case"west":return 0;case"east":return e-i;case"north":case"south":case"center":return(e-i)/2}},_27:function(t,e){var i=this._K(t).height;switch(this.gravity){case"north":return 0;case"south":return e-i;case"west":case"east":case"center":return(e-i)/2}},_1u:function(){var t=this._n.parentNode;return t.className===this.klass.WRAPPER_CLASS?t:(t=document.createElement("div"),t.className=this.klass.WRAPPER_CLASS,t.style.position="relative",t.style.border="none",t.style.padding="0 0 0 0",this._n.parentNode.insertBefore(t,this._n),t.appendChild(this._n),t)},_W:function(t,e){var i=this._28(e);return i.style.fontFamily=this.font,i.style.fontSize="number"==typeof t?t+"px":t,i},_28:function(t){var e=document.createElement("div");return e.className=this.klass.TEXT_CLASS,e.style.position="absolute",e.appendChild(document.createTextNode(t)),this._1u().appendChild(e),e},_X:function(t){t.parentNode.removeChild(t),t.className===this.klass.TARGET_CLASS&&Bluff.Event.stopObserving(t)},_K:function(t){var e=t.style.display;return e&&"none"!==e?{width:t.offsetWidth,height:t.offsetHeight}:{width:t.clientWidth,height:t.clientHeight}}}),Bluff.Event={_Y:[],_1v:window.attachEvent&&-1===navigator.userAgent.indexOf("Opera"),observe:function(t,e,i,n){var s=Bluff.map(this._1w(t,e),function(t){return t._29});if(-1===Bluff.index(s,i)){var r=function(e){i.call(n||null,t,Bluff.Event._2a(e))};this._Y.push({_Z:t,_1e:e,_29:i,_1x:r}),t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}},stopObserving:function(t){var e=t?this._1w(t):this._Y;Bluff.each(e,function(t){t._Z.removeEventListener?t._Z.removeEventListener(t._1e,t._1x,!1):t._Z.detachEvent("on"+t._1e,t._1x)})},_1w:function(t,e){var i=[];return Bluff.each(this._Y,function(n){t&&n._Z!==t||e&&n._1e!==e||i.push(n)}),i},_2a:function(t){if(!this._1v)return t;if(!t)return!1;if(t._2b)return t;t._2b=!0;var e=this._2c(t);return t.target=t.srcElement,t.pageX=e.x,t.pageY=e.y,t},_2c:function(t){var e=document.documentElement,i=document.body||{scrollLeft:0,scrollTop:0};return{x:t.pageX||t.clientX+(e.scrollLeft||i.scrollLeft)-(e.clientLeft||0),y:t.pageY||t.clientY+(e.scrollTop||i.scrollTop)-(e.clientTop||0)}}},Bluff.Event._1v&&window.attachEvent("onunload",function(){Bluff.Event.stopObserving(),Bluff.Event._Y=null}),navigator.userAgent.indexOf("AppleWebKit/")>-1&&window.addEventListener("unload",function(){},!1),Bluff.Tooltip=new JS.Singleton({LEFT_OFFSET:20,TOP_OFFSET:-6,DATA_LENGTH:8,CLASS_NAME:"bluff-tooltip",setup:function(){this._o=document.createElement("div"),this._o.className=this.CLASS_NAME,this._o.style.position="absolute",this.hide(),document.body.appendChild(this._o),Bluff.Event.observe(document.body,"mousemove",function(t,e){this._o.style.left=e.pageX+this.LEFT_OFFSET+"px",this._o.style.top=e.pageY+this.TOP_OFFSET+"px"},this)},show:function(t,e,i){i=Number((i+"").substr(0,this.DATA_LENGTH)),this._o.innerHTML='<span class="color" style="background: '+e+';">&nbsp;</span> <span class="label">'+t+'</span> <span class="data">'+i+"</span>",this._o.style.display=""},hide:function(){this._o.style.display="none"}}),Bluff.Event.observe(window,"load",Bluff.Tooltip.method("setup")),Bluff.TableReader=new JS.Class({NUMBER_FORMAT:/\-?(0|[1-9]\d*)(\.\d+)?(e[\+\-]?\d+)?/i,initialize:function(t,e){this._1f=e||{},this._2d=this._1f.orientation||"auto",this._2e="string"==typeof t?document.getElementById(t):t},get_data:function(){return this._1||this._1y(),this._1},get_labels:function(){return this._1g||this._1y(),this._1g},get_title:function(){return this._2f},get_series:function(t){return this._1[t]?this._1[t]:this._1[t]={points:[]}},_1y:function(){this._C=this._m=0,this._p=this._q=0,this._1=[],this._1g={},this._r=[],this._s=[],this._1h=[],this._1i=[],this._1z(this._2e),this._2g(),this._2h(),Bluff.each(this._s,function(t,e){this.get_series(e-this._q).name=t},this),Bluff.each(this._r,function(t,e){this._1g[e-this._p]=t},this)},_1z:function(t){this._2i(t);var e,i=t.childNodes,n=i.length;for(e=0;n>e;e++)this._1z(i[e])},_2i:function(t){if(t.tagName){var e,i,n=this._1A(t.innerHTML);switch(t.tagName.toUpperCase()){case"TR":this._c||(this._p=this._C),this._C+=1,this._m=0;break;case"TD":this._c||(this._q=this._m),this._c=!0,this._m+=1,n=n.match(this.NUMBER_FORMAT),null===n?this.get_series(e).points[i]=null:(e=this._m-this._q-1,i=this._C-this._p-1,this.get_series(e).points[i]=parseFloat(n[0]));break;case"TH":this._m+=1,this._2j(t)&&(this._1i.push(this._m),this._1h.push(this._C)),1===this._m&&1===this._C?this._r[0]=this._s[0]=n:"row"===t.scope||1===this._m?this._r[this._C-1]=n:this._s[this._m-1]=n;break;case"CAPTION":this._2f=n}}},_2j:function(t){if(!this._1f.except)return!1;var e=this._1A(t.innerHTML),i=(t.className||"").split(/\s+/),n=[].concat(this._1f.except);if(Bluff.index(n,e)>=0)return!0;for(var s=i.length;s--;)if(Bluff.index(n,i[s])>=0)return!0;return!1},_2g:function(){for(var t,e=this._1i.length;e--;)t=this._1i[e],this._q>=t||(this._s.splice(t-1,1),t>=this._q&&this._1.splice(t-1-this._q,1));for(var t,e=this._1h.length;e--;)t=this._1h[e],this._p>=t||(this._r.splice(t-1,1),Bluff.each(this._1,function(e){t>=this._p&&e.points.splice(t-1-this._p,1)},this))},_2h:function(){switch(this._2d){case"auto":(this._r.length>1&&1===this._s.length||this._r.length<this._s.length)&&this._1B();break;case"rows":this._1B()}},_1B:function(){var t,e=this._1;this._1=[],Bluff.each(e,function(t,e){Bluff.each(t.points,function(t,i){this.get_series(i).points[e]=t},this)},this),t=this._r,this._r=this._s,this._s=t,t=this._p,this._p=this._q,this._q=t},_1A:function(t){return t.replace(/<\/?[^>]+>/gi,"")},extend:{Mixin:new JS.Module({data_from_table:function(t,e){var i=new Bluff.TableReader(t,e),n=i.get_data();Bluff.each(n,function(t){this.data(t.name,t.points)},this),this.labels=i.get_labels(),this.title=i.get_title()||this.title}})}}),Bluff.Base.include(Bluff.TableReader.Mixin),function(){$(document).ready(function(){function t(t,e){var i=new Bluff.Bar(t,460),n=["#6886B4","#FDD84E","#72AE6E","#D1695E","#8A6EAF","#EFAA43","white"];i.set_theme({colors:n,marker_color:"white",font_color:"white",background_colors:["#008000","#008000"]}),i.tooltips=!0,i.hide_line_markers=!1,i.minimum_value=0;var s=0;for(var r in e.items){var o=e.items[r];i.data(o.label,o.data),o.data>s&&(s=o.data)}i.maximum_value=s,i.draw()}if($("#total_jobs_chart").length>0){var e=$("#total_jobs_chart").data("set");null!==e&&(t("total_jobs_chart",e),$("#total_jobs_container").css("visibility","visible"))}if($("#buried_jobs_chart").length>0){var i=$("#buried_jobs_chart").data("set");null!==i&&(t("buried_jobs_chart",i),$("#buried_jobs_container").css("visibility","visible"))}})}(),function(){$(document).ready(function(){if($("[rel=tooltip]").tooltip(),$("#form_tube_name").length>0){var t=$("#form_tube_name").data("tubes");$("#form_tube_name").typeahead({source:t})}_.templateSettings={interpolate:/\{\{\=(.+?)\}\}/g,evaluate:/\{\{(.+?)\}\}/g}})}(),function(){$(document).ready(function(){function t(t){var e=document.getElementById("form_tube_name").value,i=document.getElementById("form_url_base").value;$.getJSON(i+"peek/"+encodeURIComponent(e)+"/"+t,function(t){t.hasOwnProperty("error")?alert(t.error):($("#job_info_popup_title").html(r(t)),$("#job_info_popup_body").html(o(t)),$("#job_info_popup_footer").html(n(e,t,i)),$("[rel=tooltip]").tooltip(),$("#job_info_popup").modal({}))}).error(function(){alert("An error occurred while trying to peek at the next job.")})}function e(){var t=document.getElementById("form_tube_name").value,e=document.getElementById("form_job_priority").value,n=document.getElementById("form_job_delay").value,r=document.getElementById("form_job_ttr").value,a=document.getElementById("form_job_body").value;""===t&&(t="default",document.getElementById("form_tube_name").value=t),""===e&&(e="65536",document.getElementById("form_job_priority").value=e),""===n&&(n="0",document.getElementById("form_job_delay").value=n),""===r&&(r="120",document.getElementById("form_job_ttr").value=r),""===a&&(a="{}",document.getElementById("form_job_body").value=a);var l=null,h=null;try{if(l=JSON.parse(a),l.constructor==Array)throw"Job Body JSON must be a Hash"}catch(u){h=u}null!==h?alert("Job Body JSON parse error: "+h):(data={},data.tube=t,data.pri=e,data.delay=n,data.ttr=r,data.body=JSON.stringify(l),$("#job_info_popup_title").html(s()),$("#job_info_popup_body").html(o(data)),$("#job_info_popup_footer").html(i()),$("#confirm_add_job_btn").click(function(){$("#add_job_form").submit()}),$("[rel=tooltip]").tooltip(),$("#job_info_popup").modal({}))}function i(){var t="";return t+='<a id="confirm_add_job_btn" href="#" class="btn">Add Job</a>'}function n(t,e,i){var n=e.id;e.pri;var s="";return s+='<a href="'+i+"delete/"+encodeURIComponent(t)+"/"+n+'" class="btn">Delete Job</a>'}function s(){return"<h3>Add new job?</h3>"}function r(t){var e=t.id,i=t.state;return"<h3>Job id: "+e+" ("+i+")</h3>"}function o(t){var e=_.template($("#job_modal_template").text());return e({data:t})}$("#peek_ready_btn").length>0&&$("#peek_ready_btn").click(function(e){e.preventDefault(),t("ready")}),$("#peek_delayed_btn").length>0&&$("#peek_delayed_btn").click(function(e){e.preventDefault(),t("delayed")}),$("#peek_buried_btn").length>0&&$("#peek_buried_btn").click(function(e){e.preventDefault(),t("buried")}),$("#add_job_btn").length>0&&$("#add_job_btn").click(function(t){t.preventDefault(),e()})})}(),function(){$(document).ready(function(){function t(){var t=$("#peek_range_tube_select").val();""===t?$("tr.datum[data-tube]").show():($('tr.datum[data-tube!="'+t+'"]').hide(),$('tr.datum[data-tube="'+t+'"]').show())}$("#peek_range_table").length>0&&($("#peek_range_tube_select").change(function(){t()}),t())})}();
@@ -14,23 +14,6 @@ module BeanstalkdView
14
14
  end
15
15
  set :static, true
16
16
 
17
- register Sinatra::AssetPack
18
- assets do
19
- js :application, '/js/application.js', [
20
- '/js/vendor/json2.js',
21
- '/js/vendor/jquery-1.7.1.min.js',
22
- '/js/vendor/bootstrap.min.js',
23
- '/js/vendor/bluff-0.3.6.2/js-class.js',
24
- '/js/vendor/bluff-0.3.6.2/bluff-min.js',
25
- '/js/app.js',
26
- '/js/peek_jobs.js',
27
- '/js/peek_range.js'
28
- ]
29
- css :application, '/css/application.css', [
30
- '/css/vendor/bootstrap.min.css',
31
- '/css/app.css']
32
- end
33
-
34
17
  get "/" do
35
18
  begin
36
19
  @connections = beanstalk.connections
@@ -1,3 +1,3 @@
1
1
  module BeanstalkdView
2
- VERSION = "1.1.3"
2
+ VERSION = "1.2.0"
3
3
  end